Re: Export parfile variables

From: Mike Rose <mmrose_at_home.com>
Date: Thu, 21 Jan 1999 08:37:45 GMT
Message-ID: <tHBp2.1590$cB6.693_at_news.rdc1.md.home.com>


You're close to a solution. See the markup below.

  1. Create a *.CMD or *.BAT (EXPORT.CMD) file that looks like the following:

EXP73 USERID=user/password CONSTRAINTS=N FILE=F:\EXPORTS\%1.DMP LOG=F:\EXPORTS\%1.LOG GRANTS=N INDEXES=N TABLES=USER.TABLE CONSISTENT=Y 2) Execute it using your 'date' environment variable as a parameter:

EXPORT.CMD %ORADATE% Your PARFILE was being read by EXP73, not the command processor so %ORADATE% wasn't available.
Notice that the *.CMD file must have EXP73 and all of it's parameters on one line or the command processor won't see them all. Still have the 121 byte limit on command lines. In future you might investigate the Oracle Data Manager which provides a GUI 'wrapper' for SQL*Loader, IMP, EXP and will allow 'batching'.

Mike Rose

riperez_at_compucom.com wrote in message <785iaq$4q$1_at_nnrp1.dejanews.com>...
>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 - 09:37:45 CET

Original text of this message