RE: Scheduled export in windows...

RE: Scheduled export in windows...

 

  


Hi Todd,

Thanks for your suggestions... that will definitely help me in future...

In fact I have created a .bat file with the following contents:

D:\oracle\ora92\bin\EXP.EXE username/[Email Address Removed]
file=E:\Dumps\exp_%date:~7,2%_%date:~4,2%_%date:~10,4%.dmp
log=E:\Dumps\exp_%date:~7,2%_%date:~4,2%_%date:~10,4%.log
tables=(test)
consistent=y
statistics=none

and run this .bat file through Windows scheduler. Its working fine now..


Thanks & Regards,

Manash Pratim Baruah | Collaboration Platform LCS-E-commerce| DBA Team|
Tech Mahindra Ltd.|
Sharda Center, 6th Floor Annex Building, Pune-4, India
www.techmahindra.com


-----Original Message-----
From: Todd Pepling
[mailto:oracledba-ezmlmshield-x21438799.[Email address protected]
Sent: Tuesday, October 30, 2007 11:51 PM
To: LazyDBA Discussion
Subject: RE: Scheduled export in windows...

Create a .bat/.cmd file like so:

@echo off

for /f "tokens=2-4 delims=/ " %%a in ('date /t') do set
EXP_DATE=%%c-%%a-%%b

set EXP_DIR=E:\Dumps
set EXP_PARFILE=%EXP_DIR%\exp_%EXP_DATE%.par
set PASSWORD=password

echo [Email Address Removed] <mailto:[Email Address Removed] file=%EXP_DIR%\exp_%EXP_DATE%.dmp >>%EXP_PARFILE% echo
log=%EXP_DIR%\exp_%EXP_DATE%.log >>%EXP_PARFILE%
echo tables=(test) >>%EXP_PARFILE%
echo consistent=y >>%EXP_PARFILE%
echo statistics=none >>%EXP_PARFILE%

echo %PASSWORD% | D:\oracle\ora92\bin\EXP.EXE parfile=%EXP_PARFILE%

Todd Pepling
[Email address protected]
724-766-3492

________________________________

From: Manash Baruah [mailto:oracledba-ezmlmshield-x67384497.[Email
address protected]
Sent: Tue 10/30/2007 3:29
To: LazyDBA Discussion
Subject: Scheduled export in windows...




Hi All,

I need to run export utility (EXP) every day in windows to export a
particular table. I have scheduled the job in windows job scheduler
which is working fine. But the problem is, it overwrites the existing
dump file created the previous day. To avoid this I wanted to create the
dump file suffixed with the date it is created and used the following
string in the Run parameter to be provided in the job:

D:\oracle\ora92\bin\EXP.EXE Username/[Email Address Removed] log=E:\Dumps\exp_%DATE%.log tables=(test)
consistent=y statistics=none

But, it created a dump file with the name "exp_%DATE%.dmp" and not with
the name exp_30-10-07.dmp or something like that. I have tried the
following:

exp_%DATE%.dmp
exp_%date%.dmp
exp_%SYSDATE%.dmp
exp_%TODAY%.dmp

etc...

Could anybody provide a solution please...

Thanks & Regards,

Manash Pratim Baruah | Collaboration Platform LCS-E-commerce| DBA Team|
Tech Mahindra Ltd.|

Sharda Center, 6th Floor Annex Building, Pune-4

( Office: 91-20-66018100 | Extn: 8028 |

Email: manashb <mailto:[Email address protected] @techmahindra.com

www.techmahindra.com <http://www.techmahindra.com/>




========================================================================
====================================================


Disclaimer:

This message and the information contained herein is proprietary and
confidential and subject to the Tech Mahindra policy statement, you may
review the policy at <a
href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahind
ra.com/Disclaimer.html</a> externally and <a
href="http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahind
ra.com/Disclaimer.html</a> internally within Tech Mahindra.

========================================================================
====================================================


---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY To post a
dba job: http://jobs.lazydba.com <http://jobs.lazydba.com/> To Subscribe
: http://www.LazyDBA.com <http://www.lazydba.com/> To unsubscribe:
http://www.lazydba.com/unsubscribe.html






---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY To post a
dba job: http://jobs.lazydba.com To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html



============================================================================================================================


Disclaimer:

This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at <a href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.com/Disclaimer.html</a> externally and <a href="http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahindra.com/Disclaimer.html</a> internally within Tech Mahindra.

============================================================================================================================

Oracle LazyDBA home page