Oracle RMAN: differenze tra le versioni

Da Emigar.
Jump to navigation Jump to search
Riga 49: Riga 49:
non ancora salvati
non ancora salvati
non cancellare subito ma tieni in linea per un certo tempo
non cancellare subito ma tieni in linea per un certo tempo


Sintassi testata su rman 10.2


backup archivelog all not backed up 1 times to destination "sbt_tape";
backup archivelog all not backed up 1 times to destination "sbt_tape";

Versione delle 07:47, 18 mag 2026

Duplicate Database

Restore Point in time

Restore point in time utilizando il catalogo, spfile presente, valorizzato db_create_file_dest diverso dal database sorgente:

startup nomount force;
run {
set dbid XXXXXXXXXX;
allocate channel c1 type disk;
set until time "to_date('2021-06-15:01:00:00','YYYY-MM-DD:hh24:mi:ss')";
restore controlfile from autobackup;
sql 'alter database mount';
sql 'alter database disable block change tracking';
set newname for database to new;
restore database;
switch datafile all;
recover database;
}

Recupero schema da backup

Istanza avviata con init o spfile:

processes=200
sga_target=10G
pga_aggregate_target=2G
db_block_size=8192
compatible="12.2.0"
log_archive_dest_1="location=+DG_ARCH"
db_files=1000
db_create_file_dest="+DG_DATA"
_system_trig_enabled=false
db_name="DBORA01"
db_unique_name="RECO01"
diagnostic_dest="/u01/app/oracle"
control_files="+DG_DATA/RECO01/controlfile/current.786.1075850995"

Da rman:

sql 'alter database mount clone database';
run {
 set until time "to_date('2021-06-20:03:20:00','YYYY-MM-DD:HH24:MI:SS')";
 set newname for database to new; 
 restore database skip forever tablespace USERS,TBS01,TBS02 ;
 switch datafile all;
 recover database skip forever tablespace USERS,TBS01,TBS02 ;
}

backup archive

non ancora salvati non cancellare subito ma tieni in linea per un certo tempo


Sintassi testata su rman 10.2

backup archivelog all not backed up 1 times to destination "sbt_tape";
backup as backupset device type sbt archivelog all not backed up 1 times;
delete noprompt archivelog all backed up 1 times to device type sbt;
delete noprompt archivelog all completed before 'sysdate-1' backed up 1 times to device type sbt;