When backing up a logical database, you may want to add a date variable to the dmp file to differentiate backup files of different dates and avoid accidental overwriting. Refer to eagle
When backing up a logical database, you may want to add a date variable to the dmp file to differentiate backup files of different dates and avoid accidental overwriting. Refer to eagle
When backing up a logical database, you may want to add a date variable to the dmp file to differentiate backup files of different dates and avoid accidental overwriting. Referring to eagle's book "sequential Oracle", we have tested some scripts as follows:
1. Linux or unix scripts
Includes a script:
Exp rman/rman file = 'date + % y % m % D'. dmp log = 'date + % y % m % d'. log
2. scripts on windows
The script can generate the dmp file of the current day and delete the dmp file of the previous day.
Script 1: exp_seagull.bat
Echo off
Sqlplus rman/rman @ vm10 @ exp_seagull. SQL
Script 2: exp_seagull. SQL
Column jintian new_val jt
Select to_char (sysdate, 'yyyymmdd') jintian from dual;
Host exp userid = rman/rman @ vm10 file = exp_seagull _ & jt .. dmp log = exp_seagull _ & jt .. log
Column qiantian new_val qt
Select to_char (sysdate-2, 'yyyymmdd') qiantian from dual;
Host del exp_seagull _ & qt .. dmp
Exit
,