I want to execute an oracle export but the name of the dump file I want to add the day-month-and year so that each day the dump file be created with a different name.
Don't worry about disk space because I have another script which removes dump files older than 4 days:
This is the script that Iám using:
set ORACLE_SID=OEM10G
set a=exp_oem10g_%DATE:.=%
set b=oem10g_%DATE:.=%
E:\oracle\product\10.2.0\db_1\BIN\expdp.exe backup_user/backup_user dumpfile=dpump_dir1:%b%.dmp filesize=0 content=all logfile=dpump_log1:%a%.log full=y
date /t >> E:\oracle\Dba\logs\%a%.log
c:
cd \progra~1\tivoli\tsm\baclient
dsmc incremental E:\oracle\Dba\exports\%b%.dmp >> E:\oracle\Dba\logs\%a%.log
date /t >> E:\oracle\Dba\logs\%a%.log
exit
The logfile it is written as exp_oem10g_Tue (type File) and the dump file is not written because it is like this:
What I want is that the dumpfile it is written as oem10g_2-27-07.dmp and the logfile as exp_oem10g_2-27-0.log --------------> The date of today
Incremental backup of volume 'E:\oracle\Dba\exports\oem10g_Tue'
Incremental backup of volume '02/27/2007.dmp' ----------->
Incremental backup of volume '02/27/2007.log'----------> This is supposed to be the log file
Tue 02/27/2007
ASKER
02-27-2007.DMP , but I want to be written as oem10g_2-27-2007.dmp.
Do you know how to do it, what do I have to add to what the variable newDate in order to get what I want?