One can pass operating system variables to sqlplus using this syntax: select '&1' from &2;sqlplus username/password @cmdfile.sql var1 var2 var3 Parameter var1 will be mapped to SQL*Plus variable &1, var2 to &2, etc. Look at this example: sqlplus scott/tiger @x.sql '"test parameter"' dual Where x.sql consists of: exit 5; |
Oracle DBA FAQ >