Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Parameter to teh spool command

Re: Parameter to teh spool command

From: A. Bardeen <abardeen1_at_yahoo.com>
Date: Thu, 1 Jun 2000 03:31:39 -0700 (PDT)
Message-Id: <10515.107379@fatcity.com>


Witold,

The & substitution parameter doesn't work in server manager as you noticed.

If you have to use svrmgrl, I think the only way you can do this is to dynamically build a script which contains the spool filename.

For example the following allows a user to specify the password for system at the command prompt, rather than hardcoding it into a script. You could easily modify it to specify the spool file name instead or in addition. I'm not a Unix person so my example is on NT, but it should be enough to give you an idea.

TEST.CMD - main batch file
MAKECONNECT.CMD - batch file to create CONNECT statement file
CONNECTSTMT.SQL
SCRIPT.SQL - sample script to run in svrmgr30

This will:
1. Create two files: CONNECTSTMT.SQL and FINALSCRIPT.SQL
2. Run FINALSCRIPT.SQL in svrmgr30 which creates spool file FINALSCRIPT.LOG
3. Deletes CONNECTSTMT.SQL and FINALSCRIPT.SQL


TEST.CMD: REM Usage: TEST.CMD <sid> <password_for_system> SET ORACLE_SID=%1
call makeconnect %2
copy connectstmt.sql+script.sql finalscript.sql svrmgr30 @finalscript.sql
del connectstmt.sql
del finalscript.sql

MAKECONNECT.CMD: echo CONNECT SYSTEM/%1 > connectstmt.sql

HTH,

Received on Thu Jun 01 2000 - 05:31:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US