how to pass parameters from dos to svrmgl enviornment or sqlplus executor?

From: simon gu <guxinhong_at_yahoo.com>
Date: 14 Oct 2001 19:06:19 -0700
Message-ID: <ae637542.0110141806.711acdba_at_posting.google.com>



how to pass parameters from dos to svrmgl enviornment or sqlplus executor? [Quoted] my intension is let a root .bat file handle a batchful database work?

for example, I start to feed parameters at c:\test.bat parameter1 parameter2 parameter3, and then inside test1.bat, execution go ito svrmgr> or sqlplus>, how do I refer to parameter1, parameter2, etc inside svrmgr> and inside sqlplus>?

thanks, any hint will do.

///////// test1.bat file//////////////////////////// 
setlocal
rem ...
rem ...

rem do something in sqlplus>
sqlplus %1/%2_at_%3 @c:\odc\odcdb1.sql

rem do things in svrmgr>
svrmgrl _at_c:\sql1.sql
endlocal  

the sql1.sql is as following

///////////sql1.sql//////////////////

connect internal as sysdba;
select sysdate from dual;
rem select parameter1 from dual;
exit; Received on Mon Oct 15 2001 - 04:06:19 CEST

Original text of this message