By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,713 Members | 1,503 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,713 IT Pros & Developers. It's quick & easy.

SQL statements inside shell script

P: 56
Hi,

I have written a shell script, in which I am connecting to the oracle database and doing some manipulation. while I am running the script, its showing me the messages I am displaying in the script as well the Oracle messages. But I dont want to display the oracle messages. Please let me know how to do this. Here I am pasting the output

dpdcs5:/home/rd31424/DBAScript $ ./newAdmMenu.sh
Enter the connect string [Ex. username/password@comsys_d1] : rd31424/smile123@comsys_d1
Enter User login ID : cc12345

SQL*Plus: Release 10.2.0.2.0 - Production on Sun Oct 12 18:29:25 2008
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
SQL> SP2-0734: unknown command beginning "#set echo ..." - rest of line ignored.
SQL> Connected.
SQL> SQL> 2 3 4
'USEREXISTS
-----------
user exists
SQL> SQL> Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
User to be created, is already exists
dpdcs5:/home/rd31424/DBAScript $



But I want the output as below:

dpdcs5:/home/rd31424/DBAScript $ ./newAdmMenu.sh
Enter the connect string [Ex. username/password@comsys_d1] : rd31424/smile123@comsys_d1
Enter User login ID : cc12345
User to be created, is already exists
dpdcs5:/home/rd31424/DBAScript $


Please help me.
Oct 12 '08 #1
Share this Question
Share on Google+
1 Reply

gpraghuram
Expert 100+
P: 1,275
Can you post the script where you connect to db and run the query?
I think you have a comment in that sql part with # which is wrong.


Raghu
Oct 13 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.