|
-
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 {} \;
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
|