-
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
-
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!
-
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
-
You can use "sqlplus /nolog" and connect command in the first line of your script.
Sergey Popov.
-
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
-
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
-
U can install Hide utility.
Hide is a utility - that prevents the ps command from showing the arguments - userid/password with the command
-
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|