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

From: Basil Jackson <BJackson_at_BOSGmbH.Com>
Date: 17 Oct 2001 04:55:41 -0700
Message-ID: <adec38b6.0110170355.32e76cfd_at_posting.google.com>


For me, using NT4, the syntax for SVRMgrL is the same as for SQLPlus

In other words,

SVRMGRL %1/%2_at_%3 would also work. Also, you could parameterize the SQL to be executed using

SVRMGRL %1/%2_at_%3 @%4

and call it with
test1.bat username password dbname scriptname

guxinhong_at_yahoo.com (simon gu) wrote in message news:<ae637542.0110141806.711acdba_at_posting.google.com>...
> how to pass parameters from dos to svrmgl enviornment or sqlplus executor?
> 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 Wed Oct 17 2001 - 13:55:41 CEST

Original text of this message