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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Problem getting shell variable under NT

Re: Problem getting shell variable under NT

From: Walter Dorninger <walter.dorninger_at_aon.at>
Date: 2000/04/26
Message-ID: <3907455d$0$72098@SSP1NO17.highway.telekom.at>#1/1

Problem:
The problem with your try is that no program is substituting your %user% and %password% tag.

Solution:
Before starting test.cmd (or at the beginning of test.cmd) execute the following statements:

echo CONNECT %user%/%PASS% > start.sql
echo STARTUP PFILE=%REP%\init.ora >> start.sql echo EXIT >>start.sql

This will build the propper start.sql File and then you can pass it to svrmgr23.exe

If you have further questions feel free to contact me...

Walter

"Romain SUAU" <romain.suau_at_axa.com> wrote in message news:3906B86C.9B00E3E3_at_axa.com...
> Hello,
>
> I'm trying to get back values set into shell scripts under sql command
> files launched by these scripts.
> For example, in a
>
> test.cmd
> #####################################
> REM This is the command file
> SET USER=username
> SET PASS=password
> SET REP=C:\TEST
> svrmgr23.exe < c:\start.sql
> #####################################
>
> start.sql
> #####################################
> # This is the sql file
>
> CONNECT %user%/%PASS%
> STARTUP PFILE=%REP%\init.ora
> EXIT
> #####################################
>
> This method does not work at all... I used to develop scripts under Unix
> where I could use ${...} for calling back shell variable values. I use
> Oracle under NT now and don't know how to do this...
>
> If you can send a copy of your response to rsuau_at_free.fr I would
> appreciate it a lot.
>
> Thanks for any help,
> Romain
>
>
Received on Wed Apr 26 2000 - 00:00:00 CDT

Original text of this message

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