Skip to Content
avatar image
Former Member

Can we use encrypted password in dbisql statement ?

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

dbisql2.jpg (158.6 kB)
dbiqsl11.jpg (192.1 kB)
Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Mar 02, 2017 at 11:48 PM


    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

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 02, 2017 at 12:55 AM


    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]

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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
      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