DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: hide sqlplus username/password

  1. #1
    Hi,

    Is there a way I could hide my username and password when I run a unix script? At the moment I have as below:

    sqlplus -s john/take5 @/home/john/sql/runme.sql

    So, when I check the unix process list I can see the username and password. Anybody has any ideas to share?


    Thank you in advance.

    regards,
    feroz

  2. #2
    Join Date
    Apr 2001
    Posts
    219
    One way is to have Oracle do OS authentication or this:

    sqlplus -s < input.file


    input.file contains:
    john
    take5
    @/home/john/sql/runme.sql
    ______________________
    Applications come and go,
    but the data remains!

  3. #3
    Hi,

    I tried that before and it worked. The problem is within the sql file you require to get user input as well. It will prompt something like "Please enter value for max".


    any other way I could accomplish this?

    regards,
    feroz

  4. #4
    Join Date
    Mar 2000
    Location
    Atlanta, GA,USA
    Posts
    155
    You can use "sqlplus /nolog" and connect command in the first line of your script.

    Sergey Popov.

  5. #5
    Hi,

    That still failed as the sql script ask for user input. The only solution that I can think of is to pass parameter from unix script to sql script. This requires a lot of work if you have like 50-100 sql script. Im thinking of quick way to accomplish this. here the example:

    cho "Enter date"
    read date
    sqlplus -s << EOF
    `cat /root/.sql | cut -d" " -f1`/`cat /root/.sql | cut -d" " -f2`
    @/home/tbrake/rume.sql $date
    EOF

    Nobody can read or access .sql file ONLY root user.

    regards,
    feroz

  6. #6
    Join Date
    May 2002
    Posts
    42
    has your question changed from just hiding sqlplus username and password?

    I do like Zaggy says, except the first line of the input file is

    scott/tiger


    if you want to hide the contents of the input file you can use oracle's wrap tool to abscure the text in the input file. you will get a .plb that you cannot read but run in sqlplus. but check the .plb file as the password may just be spelled out. one way around this is to assign the password to a few different vars and then concatenate the vars together.

    Andrew


  7. #7
    Join Date
    Jul 2002
    Posts
    132
    U can install Hide utility.

    Hide is a utility - that prevents the ps command from showing the arguments - userid/password with the command

  8. #8
    Hi,

    Sound interesting. Where can I read more information about this HIDE utility? Any website?

    Thank you in advance.

    regards,
    feroz

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width