Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Shell Script Heros
On 6 Nov 2006 21:48:21 -0800, "oracledba.amit_at_gmail.com"
<oracledba.amit_at_gmail.com> wrote:
>Dear Sirs,
>
>I am new to shell scripting and I have to create a shell script that
>will ask the user to enter DB Sid, User Name and Password. The script
>will then validate this information.
>
>If the user input is not valid, then he should be shown a message that
>user input was not right. And if the user-input is right, then I have
>to run few scripts, after showing him a messege that his input was
>right.
>
>Any clues on how to do that would be a good help.
>
>Thanking you in anticipation.
>
>Regards,
>Amit
Hi Amit
While I don't consider myself a shell script hero, here's how I did it for a client recently in korn shell on Solaris 8, youll need to set up values for $TMPDIR and $TMPFILE beforehand. The script will keep prompting you until it is able to connect to Oracle as system user. Just be aware that if it isn't able to connect for some other reason that password incorrect it may not be immediately obvious - but it's fairly easy to code for this.
Hope this helps
Tom Churchward
http://tcprof.tolan.fr - The home of tcprof, an Oracle 10046 Trace File Profiler.
# #-------------------------------------------------------- # system password #-------------------------------------------------------- #