Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How2 validate connection string in unix shell script

754269Feb 17 2010 — edited Feb 17 2010
I'm writing a unix shell script that will get the user/passwd/instance from user, form a connect string, and pass it to sqlplus. Now I want to validate if a proper/valid connection string was formed. Basically I want to do something like below

sqlplus -s $CONN_STR

and disconnect if valid string and still disconnect and return to prompt if not a valid string.

Is there a clean way I can check if the return was after a successful connect, and how to disconnect it in script and check that if an invalid string.
This post has been answered by Pierre Forstmann on Feb 17 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 17 2010
Added on Feb 17 2010
6 comments
3,498 views