Home » RDBMS Server » Server Utilities » expdp in windows batch file (Oracle 11g R2 - Windows Server 2008 R2 Enterprise)
expdp in windows batch file [message #658036] Thu, 01 December 2016 03:19 Go to next message
ashussain
Messages: 35
Registered: March 2011
Location: Saudi Arabia
Member

Hi,

Need your help to run a batch file under windows for expdp in Windows Server 2008 R2 Enterprise Edition, Oracle 11gR2.

My batch file: dumpfile.bat contains....

del *.old
ren *.log *.log.old
ren *.DMP *.DMP.old
expdp system/***** DUMPFILE=DUMP_DIR:schname_%u.dmp LOGFILE=DUMP_DIR:schlog.log SCHEMAS=schemaname PARALLEL=4


This batch file is generating a single file as shcnameschlog.LOG which seems to be a single dump file. But if I run the above expdp command directly under DOS, it is running fine and generating four dump files like schname_01.DMP, schname_02.DMP, schname_03.DMP and schname_04.DMP.

Please let me know, where am I going wrong.

Thanks in Advance.

Regards,
Aijaz S Hussain
Re: expdp in windows batch file [message #658040 is a reply to message #658036] Thu, 01 December 2016 03:48 Go to previous messageGo to next message
John Watson
Messages: 8962
Registered: January 2010
Location: Global Village
Senior Member
The % is interpreted by the Windows shell as a reference to a command line parameter. You need to use %% to interpret it as a literal,
Re: expdp in windows batch file [message #658041 is a reply to message #658040] Thu, 01 December 2016 04:42 Go to previous message
ashussain
Messages: 35
Registered: March 2011
Location: Saudi Arabia
Member

Thanks a lot for your swift reply to my query, Mr. John. I modified my batch file using %% and it's working fine!
Thanks again.
Previous Topic: Message 2100???
Next Topic: sqlldr WHEN clause using <=
Goto Forum:
  


Current Time: Mon Dec 23 02:26:40 CST 2024