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

Pass unix variable to sqlplus

P: n/a
Oracle 8.1.7.4 on Hp Unix 11i
I am attempting to pass unix parameters on to sql plus
I did read on technet that with 9i it is very straightforward

Example script name whoisit
Pass sid 23
whoisit 23
returns
Vincento .....

Thanks for your time

Vince
Jul 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Vincento Harris wrote:
Oracle 8.1.7.4 on Hp Unix 11i
I am attempting to pass unix parameters on to sql plus
I did read on technet that with 9i it is very straightforward

Example script name whoisit
Pass sid 23
whoisit 23
returns
Vincento .....

Thanks for your time

Vince


sqlplus uid/paswd@connect @script param1[..param2]
script:
&1 == param1, &2 == param2, etc

SQL*Plus Users Guide & Reference
--

Regards,
Frank van Bortel

Jul 19 '05 #2

P: n/a
Got it to work
sqlplus user/password @"full path of XXX.sql file name" $1
in the sql where you are expecting the $1 parameter use &1 rather
than &variable you will normally used
Vincento
Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.