Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Export parfile variables
This is a more or less ugly attempt to a solution, however it might work:
Try writing the parfile in your bat using echo commands as follows:
echo "USERID=..." > pfile
etc...
echo %ORADATE% > pfile
etc.
Hth,
Sybrand Bakker, Oracle DBA
riperez_at_compucom.com wrote:
> I'm trying to automate Oracle 7.3 Exports on a Windows NT 4.0 Server. I
> would like the export file and log file to be named after the date on which
> they were created (01201999.DMP & .LOG). I found a way to set a variable
> under NT with the date format I want (by using the FOR command to parse the
> system date) but it doesn't seem to get passed to the EXP73.EXE command line
> when it's reading my parfile.
>
> I have a batch file which runs:
>
> EXP73 PARFILE=PFILE
>
> My PFILE reads:
>
> USERID=user/password
> CONSTRAINTS=N
> FILE=F:\EXPORTS\%ORADATE%.DMP
> GRANTS=N
> INDEXES=N
> LOG=F:\EXPORTS\%ORADATE%.LOG
> TABLES=USER.TABLE
> CONSISTENT=Y
>
> When I use the "%ORADATE%" var within NT it works fine. Eg, C:\MD %ORADATE%,
> it
> will create a dir called "01201999". But, when I try and use this in the
> parfile the closest it gets to working is literally naming the exp files:
> '%ORADATE%'.DMP & '%oradate%'.LOG
>
> Any help on this would be appreciated.
>
> Thanks
> Rich Perez
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Received on Thu Jan 21 1999 - 00:18:17 CST