Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SVRMGR30 Command line parameters

Status
Not open for further replies.

MrBass

Technical User
Dec 21, 2000
22
0
0
DE
Hi,

Is it possible to have a connect string AND specify a SQL script to run within the same SVRMGR30 command line string?

Basically, I've created a DOS script to perform a backup of an 8.0.5 database. This script calls a SQL script that dumps the control file to trace and shuts down the database. I know that I can specify the connect string within the SQL script but that would mean hardcoding the SYSTEM password, which I'm reluctant to do. At the moment I can successfully connect to the database using:

SVRMGR30 "CONNECT SYSTEM/pwd@sid AS SYSDBA"

If I slap a '@c:\sqlscript.sql' at the end I get a 'Too many parameters' error. Is it possible to have both like SQLPLUS in Oracle 8.1.6 or am I stuffed?? [dazed]
 
To use your phrase, you are stuffed...
The only way to do what you are trying ( AFAIK) is to write
a batch file ( or shell script in Unixland) to
do the 2 steps needed..
Connect as sysdba then run sql script
If your workstation that has the batch on it is secure, there should not be an issue with the hard-coded password.

( if you could use OS level authentication then you could run the batch as an authorized user and use the
'Connect / as sysdba' method with no password after setting ORACLE_SID to the appropriate value)

[profile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top