For ex.,
In Oracle:
select sysdate from dual;
In Netezza:
select current_date from _v_dual;
(Please note also that there is no sysdate in Netezza)
Few adventures in my slow running life...
For example:
Backup #1
Backup #2
Whereas a DELETE ALL INPUT will backup from one destination and delete both copies of the archivelog.
If you'd like to only backup and remove from a single archive destination, use the LIKE clause:
eg:
RMAN> backup archivelog until time 'sysdate -7' like '/u04/oracle/admin/TEST/arch/%' delete
input;
The above will only backup and delete from the LIKE destination
If archive logs are backed up to multiple destinations, and if the required retention policy is required to be different for different destinations, then the following can be done:
RMAN> run {
backup archivelog all;
delete archivelog until time 'sysdate -1' like '/am3/oradata/arch/%';
delete archivelog until time 'sysdate -5' like '/am3/oradata/arch1/AM3P2/%';
}
RMAN will backup and remove the archivelogs in numerical order from _dest_1 to dest_10. However,
if one of the archive destinations is an FRA, RMAN will always backup and remove from the FRA
first, and then work on the numerical order of the log_archive_dest_x
eg.
If the following parameters were set:
Oracle will backup and remove from the FRA, folllowed by archivelogs in log_archive_dest_1.
Finally, logs in log_archive_dest_3 will be removed.
During the restore process RMAN will check all archive destinations to make sure that the archivelog requested does not already exist. If the archivelog already exist in one of the destinations RMAN will not restore the file. If the archivelog does not exist in any of the destinations RMAN will restore it to the FRA if it exists. Otherwise it will restore it to the highest archive destination defined.
When using the FRA and ASM, the archivelog will be restored to the current directory, rather than the time at which it was generated. Even if using the SET ARCHIVELOG DESTINATION, an alias will be created to the current directory.
For example, on the 16 Aug 2010, when restoring the 13 Aug archivelogs:
RMAN> run {
allocate channel c1 type 'sbt_tape';
set archivelog destination to '+SHARED_FRA_DG01/P132/ARCHIVELOG/2010_08_13';
restore archivelog from time "to_date('13/08/2010:00:00:00','dd/mm/yyyy:hh24:mi:ss')"
until time "to_date('14/08/2010:00:00:00','dd/mm/yyyy:hh24:mi:ss')";
}
+SHARED_FRA_DG01/P132/ARCHIVELOG/2010_08_13
ASMCMD> ls -ltr
Type Redund Striped Time Sys Name
N 1_94528_708660567.dbf => +SHARED_FRA_DG01/P132/ARCHIVELOG/2010_08_16/thread_1_seq_94528.5341.727224533
N 1_94529_708660567.dbf => +SHARED_FRA_DG01/P132/ARCHIVELOG/2010_08_16/thread_1_seq_94529.3425.727224661
N 1_94530_708660567.dbf => +SHARED_FRA_DG01/P132/ARCHIVELOG/2010_08_16/thread_1_seq_94530.5644.727224779
PS: This content is an excerpt from oracle's metalink Article ID 443814.1 with few additional notes at the top.