cancel
Showing results for 
Search instead for 
Did you mean: 

Can we use encrypted password in dbisql statement ?

Former Member
0 Kudos

Hi Experts,

I am executing some scripts on host for monitoring purpose. In this scripts I used the DBA password, It is visible to others by using the ps -ef | grep sql statement on host. So we want to hide the DBA password from other users working on the same host ..

By using the encrypted password in dbisql client utility in windows platform working fine dbisql2.jpg. Successfully connected.

In command line it is giving below errors. Please find the screenshots. dbiqsl11.jpg

Accepted Solutions (1)

Accepted Solutions (1)

Gisung
Advisor
Advisor
0 Kudos

Hi,

I recommend to use DSN(Data Source Name) instead of connection string as follows.

1) vi .odbc.ini file at the IQ home directory.

iq@VM02:/IQ> cat .odbc.ini
[SAPIQDB]
UID=DBA
PWD=sql
ENG=SAPIQSERVER
DBN=SAPIQDB
Commlinks=tcpip{port=2640}

2) optional , encrypt the .odbc.ini file using dbfhide
3) connect to IQ using dsn name
- dbisql -c dsn=SAPIQDB -nogui
4) find a process using ps -ef

VM02:~ # ps -elf | grep dbisql 0 S iq 5349 3788 2 80 0 - 728070 futex_ 08:43 pts/1 00:00:00 /IQ/shared/SAPJRE-7_1_015_64BIT/bin/java -Xmx1000 m -Dsybase.native.executable=/IQ/IQ-16_0/bin64/dbisql -Dsun.java2d.noddraw=true -Dsun.java2d.d3d=false -cp /IQ/IQ-16_0/java/ .....
Q-16_0/lib64:/IQ/OCS-15_0/lib:/IQ/OCS-15_0/lib3p64:/IQ/OCS-15_0/lib3p: sybase.isql.ISQLLoader -c dsn=SAPIQDB -nogui 0 S root 5418 5299 0 80 0 - 2309 pipe_w 08:43 pts/2 00:00:00 grep --color=auto dbisql

Best Regards,
Gi-Sung Jang

Former Member
0 Kudos

Thank you very much Gi-Sung Jang.

Answers (1)

Answers (1)

Gisung
Advisor
Advisor
0 Kudos

Hi,

To protect the information in a configuration file (for example, because it contains passwords),
use the File Hiding (dbfhide) utility to obfuscate the contents of configuration files.

[dbfhide Database Administration Utility]
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc00168.1604/doc/html/san12...

ex) dbisql -c dsn=TEST -nogui

1) cp .odbc.ini .odbc.ini_Back
2) dbfhide .odbc.ini_Back .odbc.ini
3) dbisql -c dsn=TEST -nogui

Best Regards,
Gi-Sung Jang

Former Member
0 Kudos

Thanks for reply Gi-Sung,

We are Scheduled some monitoring jobs on host using crontab.

Below is the output of ps -ef |grep sql on host.

How can we hide password in below satement. Here sybase user statement is running. load user on same host can also see the same output.

ps -ef | grep sql
sybase 28960 28952 99 17:08 ? 00:18:41 /SYBASEIQ16/IQ16SP08/shared/SAPJRE-7_1_015_64BIT/bin/java -Xmx1000m -Dsybase.native.executable=/SYBASEIQ16/IQ1
6SP08/IQ-16_0/bin64/dbisql -Dsun.java2d.noddraw=true -Dsun.java2d.d3d=false -cp /SYBASEIQ16/IQ16SP08/IQ-16_0/java/isql.jar:/SYBASEIQ16/IQ16SP08/IQ-16_0/java/j
logon.jar:/SYBASEIQ16/IQ16SP08/IQ-16_0/java/SCEditor1600.jar:/SYBASEIQ16/IQ16SP08/IQ-16_0/java/JComponents1600.jar:/SYBASEIQ16/IQ16SP08/IQ-16_0/java/jsyblib16
00.jar:/SYBASEIQ16/IQ16SP08/IQ-16_0/java/batik-anim.jar:/SYBASEIQ16/IQ16SP08/IQ-16_0/java/batik-awt-util.jar:/SYBASEIQ16/IQ16SP08/IQ-16_0/java/batik-bridge.ja
r:/SYBASEIQ16/IQ16SP08/IQ-16_0/java/batik-codec.jar:/SYBASEIQ16/IQ16SP08/IQ-16_0/java/batik-css.jar:/SYBASEIQ16/IQ16SP08/IQ-16_0/java/batik-dom.jar:/SYBASEIQ1
6/IQ16SP08/IQ-16_0/java/batik-ext.jar:/SYBASEIQ16/IQ16SP08/IQ-16_0/java/batik-extension.jar:/SYBASEIQ16/IQ16SP08/IQ-16_0/java/batik-gui-util.jar:/SYBASEIQ16/I
Q16SP08/IQ-16_0/java/batik-gvt.jar:/SYBASEIQ16/IQ16SP08/IQ-16_0/java/batik-parser.jar:/SYBASEIQ16/IQ16SP08/IQ-16_0/java/batik-script.jar:/SYBASEIQ16/IQ16SP08/
IQ-16_0/java/batik-svg-dom.jar:/SYBASEIQ16/IQ16SP08/IQ-16_0/java/batik-svggen.jar:/SYBASEIQ16/IQ16SP08/IQ-16_0/java/batik-swing.jar:/SYBASEIQ16/IQ16SP08/IQ-16
_0/java/batik-transcoder.jar:/SYBASEIQ16/IQ16SP08/IQ-16_0/java/batik-util.jar:/SYBASEIQ16/IQ16SP08/IQ-16_0/java/batik-xml.jar:/SYBASEIQ16/IQ16SP08/IQ-16_0/jav
a/js.jar:/SYBASEIQ16/IQ16SP08/IQ-16_0/java/pdf-transcoder.jar:/SYBASEIQ16/IQ16SP08/IQ-16_0/java/xerces_2_5_0.jar:/SYBASEIQ16/IQ16SP08/IQ-16_0/java/xml-apis-ex
t.jar:/SYBASEIQ16/IQ16SP08/IQ-16_0/java/xml-apis.jar sybase.isql.ISQLLoader -c uid=dba;pwd=p@ssword09$;eng=dwh_prod04 -nogui -d1 /opt/sybase/scripts/mod_script
s/sql/tbl_iqconnection1.sql

Regards,

KrishnamRaju