-
Export database help
hello all,
i want to export my database using export command. i have written a batch file & a parameter file to export data. the contents of the batch file is written below:
C:\oracle\ora90\BIN\exp.exe eibsprod/eibsprod@eibs131
PARFILE = h:\DUMPS\Exp_data.TXT
the batch file successfuly exports data using the parameter file to a file named eibs.dmp. the contents of the parameter file is written below:
file = h:\eibs.dmp
log = h:\Exp_log
owner = eibsprod
rows = y
i have to do this job everyday. now i want system date to be added to the file name. the file format is written below below
filename+date
-----------------
eibs29102005.dmp
eibs30102005.dmp
eibs31102005.dmp
eibs01112005.dmp
plz give me any suggestions.
regards
sakil
-
I don't know how you'd do this in windows with batch file scripting .. Maybe a simple c/java/vb/.net program will do the trick.
This is how I scripted it in LINUX. Maybe it'll help get you a little closer.
1. export to known filename
2. append the date to that file
3. remove old copies
#!/bin/bash
export ORACLE_SID=TOOLBOX
export ORACLE_HOME=/u1/oracle/9.2.0.6
export PATH=$ORACLE_HOME/bin:$PATH
export NLS_LANG=AMERICAN_AMERICA.UTF8
$ORACLE_HOME/bin/exp userid=system/..cut... log=/rman/export/TOOLBOX/full.log file=/rman/export/TOOLBOX/full.dmp full=y statistics=none
/bin/gzip /rman/export/TOOLBOX/*.dmp /rman/export/TOOLBOX/*.log
for file in /rman/export/TOOLBOX/full.*
do
mv $file $file-`date "+%y%m%d-at-%H%M"`
done
/usr/bin/find /rman/export/TOOLBOX -type f ! -mtime -2 -exec /bin/rm {} \;
-
Originally Posted by sakil
i have to do this job everyday. now i want system date to be added to the file name. the file format is written below below
filename+date
-----------------
eibs29102005.dmp
eibs30102005.dmp
eibs31102005.dmp
eibs01112005.dmp
sakil
Is it for Windows or Unix?
The same query i posted here 3months before, you can check the link:
If Windows:
http://www.dbasupport.com/forums/showthread.php?t=48566
"What is past is PROLOGUE"
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|