MERCADOS FINANCIEROS

viernes, 31 de mayo de 2019

backup validate database;

RMAN> backup validate database;

Starting backup at 31-MAY-19
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=63 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA/ACME/DATAFILE/system.258.848598015
input datafile file number=00003 name=+DATA/ACME/DATAFILE/sysaux.257.848597951
input datafile file number=00002 name=+DATA/ACME/DATAFILE/example.266.848598231
input datafile file number=00004 name=+DATA/ACME/DATAFILE/undotbs1.260.848598093
input datafile file number=00006 name=+DATA/ACME/DATAFILE/users.259.848598091
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
1    OK     0              17580        99852           1768003 
  File Name: +DATA/ACME/DATAFILE/system.258.848598015
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              65092         
  Index      0              13550         
  Other      0              3618           

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
2    OK     0              31982        41361           1749417 
  File Name: +DATA/ACME/DATAFILE/example.266.848598231
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              4532           
  Index      0              1219           
  Other      0              3627           

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
3    OK     0              25595        90900           1768082 
  File Name: +DATA/ACME/DATAFILE/sysaux.257.848597951
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              14738         
  Index      0              7854           
  Other      0              42693         

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
4    OK     0              445          9601            1768082 
  File Name: +DATA/ACME/DATAFILE/undotbs1.260.848598093
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              0             
  Index      0              0             
  Other      0              9155           

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
6    OK     0              17           642             1753277 
  File Name: +DATA/ACME/DATAFILE/users.259.848598091
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              30             
  Index      0              5             
  Other      0              588           

channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
List of Control File and SPFILE
===============================
File Type    Status Blocks Failing Blocks Examined
------------ ------ -------------- ---------------
SPFILE       OK     0              2             
Control File OK     0              612           
Finished backup at 31-MAY-19

RMAN>

restore database validate

RMAN> restore database validate;

Starting restore at 31-MAY-19
using channel ORA_DISK_1

channel ORA_DISK_1: starting validation of datafile backup set
channel ORA_DISK_1: reading from backup piece +FRA/ACME/BACKUPSET/2019_05_31/nnndf0_tag20190531t200530_0.260.1009742731
channel ORA_DISK_1: piece handle=+FRA/ACME/BACKUPSET/2019_05_31/nnndf0_tag20190531t200530_0.260.1009742731 tag=TAG20190531T200530
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:17
channel ORA_DISK_1: starting validation of datafile backup set
channel ORA_DISK_1: reading from backup piece +FRA/ACME/BACKUPSET/2019_05_31/nnndf0_tag20190531t204246_0.264.1009744967
channel ORA_DISK_1: piece handle=+FRA/ACME/BACKUPSET/2019_05_31/nnndf0_tag20190531t204246_0.264.1009744967 tag=TAG20190531T204246
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting validation of datafile backup set
channel ORA_DISK_1: reading from backup piece +FRA/ACME/BACKUPSET/2019_05_31/nnndf0_tag20190531t204820_0.266.1009745301
channel ORA_DISK_1: piece handle=+FRA/ACME/BACKUPSET/2019_05_31/nnndf0_tag20190531t204820_0.266.1009745301 tag=TAG20190531T204820
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting validation of datafile backup set
channel ORA_DISK_1: reading from backup piece +FRA/ACME/BACKUPSET/2019_05_31/nnndf0_tag20190531t205058_0.267.1009745459
channel ORA_DISK_1: piece handle=+FRA/ACME/BACKUPSET/2019_05_31/nnndf0_tag20190531t205058_0.267.1009745459 tag=TAG20190531T205058
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:07
Finished restore at 31-MAY-19

RMAN>

RMAN> restore archivelog from time 'sysdate-1' validate;

backup validate tablespace

RMAN> backup validate tablespace system;

Starting backup at 31-MAY-19
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=63 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA/ACME/DATAFILE/system.258.848598015
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:55
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
1    OK     0              17580        99852           1767091 
  File Name: +DATA/ACME/DATAFILE/system.258.848598015
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              65092         
  Index      0              13550         
  Other      0              3618           

channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
List of Control File and SPFILE
===============================
File Type    Status Blocks Failing Blocks Examined
------------ ------ -------------- ---------------
SPFILE       OK     0              2             
Control File OK     0              612           
Finished backup at 31-MAY-19

RMAN DEBUG ON

$rman target / debug=ALL log=/u01/backup/rman.txt
The above command records all the info of the commands issued in the rmandebug.txt file and the debugging information is for all the five categories.
  • At the RMAN prompt
If you want to specify, you can specify the debug option at the RMAN prompt itself with any other RMAN standalone command like below:
RMAN>debug on;
RMAN>backup database;
RMAN>debug off;
  • From a run block
If you are running multiple commands in one go, you can start the debugging of all of them by supplying the option of debug inside the run block as shown below:
        RMAN> run {
                          debug on;
                          allocate channel c1 type disk;
                          backup database;
                          debug off;
                  }

miércoles, 22 de mayo de 2019

RMAN Veritas Duplicate TAPE

RECUPERACION DE NOMINA VERITAS CATALOGO RMAN SENA

connect catalog rman/rman@CATALOGO;
connect target sys/sena@NOMINA_SENA;
connect auxiliary sys/prueba;
resync catalog;

RUN {
ALLOCATE AUXILIARY CHANNEL ch00
TYPE 'SBT_TAPE' parms 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64.1,ENV=(NB_ORA_CLIENT=sdigbogsisg021-bck,NB_ORA_POLICY=sdigbogsisg021_DB_NOMINA_F_DS,NB_ORA_SERV=bksrv01,NB
_ORA_SCHED=Default-Application-Backup)';

ALLOCATE AUXILIARY CHANNEL ch01
TYPE 'SBT_TAPE' parms 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64.1,ENV=(NB_ORA_CLIENT=sdigbogsisg021-bck,NB_ORA_POLICY=sdigbogsisg021_DB_NOMINA_F_DS,NB_ORA_SERV=bksrv01,NB
_ORA_SCHED=Default-Application-Backup)';

BACKUP DATABASE PLUS ARCHIVELOG;
}


RUN {
ALLOCATE AUXILIARY CHANNEL ch00
TYPE 'SBT_TAPE' parms 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64.1,ENV=(NB_ORA_CLIENT=sdigbogsisg021-bck,NB_ORA_POLICY=sdigbogsisg021_DB_NOMINA_F_DS,NB_ORA_SERV=bksrv01,NB
_ORA_SCHED=Default-Application-Backup)';

ALLOCATE AUXILIARY CHANNEL ch01
TYPE 'SBT_TAPE' parms 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64.1,ENV=(NB_ORA_CLIENT=sdigbogsisg021-bck,NB_ORA_POLICY=sdigbogsisg021_DB_NOMINA_F_DS,NB_ORA_SERV=bksrv01,NB
_ORA_SCHED=Default-Application-Backup)';

SET NEWNAME FOR DATAFILE 1 to '/u02/oradata/NOMINA/sistema/system01.dbf' ;
SET NEWNAME FOR DATAFILE 2 to '/u02/oradata/NOMINA/sistema/undotbs01.dbf' ;
SET NEWNAME FOR DATAFILE 3 to '/u02/oradata/NOMINA/sistema/sysaux01.dbf' ;
SET NEWNAME FOR DATAFILE 4 to '/u02/oradata/NOMINA/sistema/users01.dbf' ;
SET NEWNAME FOR DATAFILE 5 to '/u02/oradata/NOMINA/sistema/cwmlite01.dbf' ;
SET NEWNAME FOR DATAFILE 6 to '/u02/oradata/NOMINA/sistema/drsys01.dbf' ;
SET NEWNAME FOR DATAFILE 7 to '/u02/oradata/NOMINA/sistema/indx01.dbf' ;
SET NEWNAME FOR DATAFILE 8 to '/u02/oradata/NOMINA/datos/KACTUS_DAT02.DBF' ;
SET NEWNAME FOR DATAFILE 9 to '/u02/oradata/NOMINA/datos/KACTUS_DAT01.DBF' ;
SET NEWNAME FOR DATAFILE 10 to '/u02/oradata/NOMINA/indices/KACTUS_NDX01.DBF' ;
SET NEWNAME FOR DATAFILE 11 to '/u02/oradata/NOMINA/datos/KACTUS_RBK01.DBF' ;
SET NEWNAME FOR DATAFILE 12 to '/u02/oradata/NOMINA/sistema/odm01.dbf' ;
SET NEWNAME FOR DATAFILE 13 to '/u02/oradata/NOMINA/sistema/tools01.dbf' ;
SET NEWNAME FOR DATAFILE 14 to '/u02/oradata/NOMINA/sistema/xdb01.dbf' ;
SET NEWNAME FOR DATAFILE 15 to '/u02/oradata/NOMINA/sistema/example01.dbf' ;
SET NEWNAME FOR DATAFILE 16 to '/u02/oradata/NOMINA/sistema/UNDOTBS201.dbf' ;
DUPLICATE TARGET DATABASE TO NOMINA
UNTIL TIME 'SYSDATE-2'
PFILE=/u1/app/oracle/product/10.2.0/dbs/initNOMINA.ora
NOFILENAMECHECK
LOGFILE
GROUP 1 ('/u02/oradata/NOMINA/redologs/redo01B.log') size 200M reuse,
GROUP 2 ('/u02/oradata/NOMINA/redologs/redo02B.log') size 200M reuse,
GROUP 3 ('/u02/oradata/NOMINA/redologs/redo03B.log') size 200M reuse ;
RELEASE CHANNEL ch00 ;
RELEASE CHANNEL ch01 ;
}



connect catalog rman/rmo3344@CATRMAN;
connect target sys/migracion00@credipro;
connect auxiliary sys/oracle;
RUN {
ALLOCATE AUXILIARY CHANNEL mi_cinta TYPE 'SBT_TAPE' parms 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64,ENV=(NB_ORA_CLIENT=omega-bck,NB_ORA_POLICY=CRVRS_OMEGA_DB_F_DIA,NB_ORA_SERV=bksrv01,NB_ORA_SCHED=Default-Application-Backup)';
SET NEWNAME FOR DATAFILE 1 to '/u00/mantenim/SYSTEM01.DBF' ;
SET NEWNAME FOR DATAFILE 2 to '/u11/mantenim/OPCPRO_MVTO_SDOCTBLE_01.DBF' ;
SET NEWNAME FOR DATAFILE 3 to '/u11/mantenim/SYSAUX01.DBF' ;
SET NEWNAME FOR DATAFILE 4 to '/u11/mantenim/USERS01.DBF' ;
SET NEWNAME FOR DATAFILE 5 to '/u11/mantenim/OPC_DATNORMAL' ;
SET NEWNAME FOR DATAFILE 6 to '/u11/mantenim/OPCPRO_CLIENTES01' ;
SET NEWNAME FOR DATAFILE 7 to '/u11/mantenim/OPCPRO_CUOTAS_FIJAS_01' ;
SET NEWNAME FOR DATAFILE 8 to '/u11/mantenim/OPCPRO_INDEX_02_01' ;
SET NEWNAME FOR DATAFILE 9 to '/u11/mantenim/OPCPRO_INDEX_MVTO_HIST_01' ;
SET NEWNAME FOR DATAFILE 10 to '/u11/mantenim/OPCPRO_INT_DIARIO_01' ;
SET NEWNAME FOR DATAFILE 11 to '/u11/mantenim/OPCPRO_LINEAS_MONEDAS_01' ;
SET NEWNAME FOR DATAFILE 12 to '/u11/mantenim/OPCPRO_MVTO_HISTORICO_01' ;
SET NEWNAME FOR DATAFILE 13 to '/u11/mantenim/OPCPRO_MVTO_SDO_CTBLE_01' ;
SET NEWNAME FOR DATAFILE 14 to '/u11/mantenim/OPCPRO_MVTO_SDO_DETALLE_01' ;
SET NEWNAME FOR DATAFILE 15 to '/u11/mantenim/OPCPRO_PEQ_0101' ;
SET NEWNAME FOR DATAFILE 16 to '/u11/mantenim/OPCPRO_SALDOS_CLIENTES_01' ;
SET NEWNAME FOR DATAFILE 17 to '/u11/mantenim/OPCPRO_CUOTAS_FIJAS_02' ;
SET NEWNAME FOR DATAFILE 18 to '/u11/mantenim/OPCPRO_CUOTAS_FIJAS_03' ;
SET NEWNAME FOR DATAFILE 19 to '/u11/mantenim/OPCPRO_DIRECCIONES01' ;
SET NEWNAME FOR DATAFILE 20 to '/u11/mantenim/OPCPRO_INDEX_01_02' ;
SET NEWNAME FOR DATAFILE 21 to '/u11/mantenim/OPCPRO_INDEX_02_02' ;
SET NEWNAME FOR DATAFILE 22 to '/u11/mantenim/OPCPRO_INDEX_MVTO_HIST_02' ;
SET NEWNAME FOR DATAFILE 23 to '/u11/mantenim/OPCPRO_INT_DIARIO_02' ;
SET NEWNAME FOR DATAFILE 24 to '/u11/mantenim/OPCPRO_MVTO_HISTORICO_02' ;
SET NEWNAME FOR DATAFILE 25 to '/u11/mantenim/OPCPRO_MVTO_SDO_CTBLE_02' ;
SET NEWNAME FOR DATAFILE 26 to '/u77/mantenim/OPCPRO_MVTO_SDO_CTBLE_03' ;
SET NEWNAME FOR DATAFILE 27 to '/u77/mantenim/OPCPRO_MVTO_SDO_DETALLE_02' ;
SET NEWNAME FOR DATAFILE 28 to '/u77/mantenim/OPCPRO_MVTO_SDO_DETALLE_03' ;
SET NEWNAME FOR DATAFILE 29 to '/u77/mantenim/OPCPRO_PEQ-0201' ;
SET NEWNAME FOR DATAFILE 30 to '/u77/mantenim/OPCPRO_TARJETAS01' ;
SET NEWNAME FOR DATAFILE 31 to '/u77/mantenim/OPCPRO_INDEX_01_01' ;
SET NEWNAME FOR DATAFILE 32 to '/u77/mantenim/OPCPRO_INT_DIARIO_03' ;
SET NEWNAME FOR DATAFILE 33 to '/u77/mantenim/OPCPRO_MVTO_HISTORICO_03' ;
SET NEWNAME FOR DATAFILE 34 to '/u77/mantenim/OPCPRO_PEQ-0202' ;
SET NEWNAME FOR DATAFILE 35 to '/u77/mantenim/OPCPRO_BI' ;
SET NEWNAME FOR DATAFILE 36 to '/u77/mantenim/OPCPRO_PEQ_0203' ;
SET NEWNAME FOR DATAFILE 37 to '/u77/mantenim/PERFSTAT01.DBF' ;
SET NEWNAME FOR DATAFILE 38 to '/u77/mantenim/OPCPRO_INDEX_01_03' ;
SET NEWNAME FOR DATAFILE 39 to '/u77/mantenim/OPCPRO_PEQ_0204' ;
SET NEWNAME FOR DATAFILE 40 to '/u77/mantenim/OPCPRO_INDEX_02_03' ;
SET NEWNAME FOR DATAFILE 41 to '/u88/mantenim/OPCPRO_MVTO_SDO_DETALLE_04' ;
SET NEWNAME FOR DATAFILE 42 to '/u88/mantenim/OPCPRO_INDEX_MVTO_HIST_03' ;
SET NEWNAME FOR DATAFILE 43 to '/u88/mantenim/OPCPRO_MVTO_SDO_CTBLE_04' ;
SET NEWNAME FOR DATAFILE 44 to '/u88/mantenim/OPCPRO_INDEX_01_04' ;
SET NEWNAME FOR DATAFILE 45 to '/u88/mantenim/OPCPRO_INT_DIARIO_04' ;
SET NEWNAME FOR DATAFILE 46 to '/u88/mantenim/OPC_DATNORMAL_2' ;
SET NEWNAME FOR DATAFILE 47 to '/u88/mantenim/CRED_DEPURA01.ORA' ;
SET NEWNAME FOR DATAFILE 48 to '/u88/mantenim/CRED_DEPURA02.ORA' ;
SET NEWNAME FOR DATAFILE 49 to '/u88/mantenim/OPCPRO_MVTO_SDO_DET_01' ;
SET NEWNAME FOR DATAFILE 50 to '/u88/mantenim/OPCPRO_MVTO_SDO_DET_02' ;
SET NEWNAME FOR DATAFILE 51 to '/u88/mantenim/OPC_CUSTOM_CV01.ORA' ;
SET NEWNAME FOR DATAFILE 52 to '/u88/mantenim/OPC_CUSTOM_CV02.ORA' ;
SET NEWNAME FOR DATAFILE 53 to '/u88/mantenim/OPCPRO_MVTO_SDO_DET_03' ;
SET NEWNAME FOR DATAFILE 54 to '/u88/mantenim/UNDOTBS_01' ;
SET NEWNAME FOR DATAFILE 55 to '/u88/mantenim/OPCPRO_MVTO_SDOCTBLE_02.DBF' ;
SET NEWNAME FOR DATAFILE 56 to '/u88/mantenim/OPCPRO_MVTO_SDOCTBLE_03.DBF' ;
SET NEWNAME FOR DATAFILE 57 to '/u88/mantenim/OPCPRO_MVTO_SDO_DETALLE_05' ;
SET NEWNAME FOR DATAFILE 58 to '/u99/mantenim/OPCPRO_MVTO_DIARIO_01' ;
SET NEWNAME FOR DATAFILE 59 to '/u99/mantenim/OPCPRO_MVTO_DIARIO_02' ;
SET NEWNAME FOR DATAFILE 60 to '/u99/mantenim/cpro_datafile00.ora' ;
SET NEWNAME FOR DATAFILE 61 to '/u99/mantenim/OPCPRO_MVTO_SDO_DETALLE_06.ORA' ;
SET NEWNAME FOR DATAFILE 62 to '/u99/mantenim/OPCPRO_INDEX_01_05' ;
SET NEWNAME FOR DATAFILE 63 to '/u99/mantenim/OPCPRO_INDEX_MVTO_HIST_04' ;
SET NEWNAME FOR DATAFILE 64 to '/u99/mantenim/OPCPRO_INT_DIARIO_05' ;
SET NEWNAME FOR DATAFILE 65 to '/u99/mantenim/OPCPRO_MVTO_DIARIO_03' ;
SET NEWNAME FOR DATAFILE 66 to '/u99/mantenim/OPC_DATNORMAL_3' ;
SET NEWNAME FOR DATAFILE 67 to '/u99/mantenim/OPCPRO_MVTO_SDOCTBLE_04.DBF' ;
DUPLICATE TARGET DATABASE TO mantenim
PFILE=/u01/oracle/db/10.2.0/dbs/initmantenim.ora
LOGFILE
GROUP 1 ('/u00/mantenim/redo01.log') size 200M reuse,
GROUP 2 ('/u00/mantenim/redo02.log') size 200M reuse,
GROUP 3 ('/u00/mantenim/redo03.log') size 200M reuse ;
RELEASE CHANNEL mi_cinta ;
}

CROSSCHECK BACKUP

rman>crosscheck datafilecopy all;
rman>crosscheck backup;
rman>crosscheck archivelog all;
rman>crosscheck copy;

rman>list copy of tablespace users;
rman>delete datafilecopy 553;

RMAN> CROSSCHECK BACKUP;
To list any expired backups detected by the CROSSCHECK command use:
RMAN> LIST EXPIRED BACKUP;
To delete any expired backups detected by the CROSSCHECK command use:
RMAN> DELETE EXPIRED BACKUP;
To crosscheck all archive logs use:
RMAN> CROSSCHECK ARCHIVELOG ALL;
To list all expired archive logs detected by the CROSSCHECK command use:
RMAN> LIST EXPIRED ARCHIVELOG ALL;
To delete all expired archive logs detected by the CROSSCHECK command use:
RMAN> DELETE EXPIRED ARCHIVELOG ALL;
To crosscheck all datafile image copies use:
RMAN> CROSSCHECK DATAFILECOPY ALL;
To list expired datafile copies use:
RMAN> LIST EXPIRED DATAFILECOPY ALL;
To delete expired datafile copies use:
RMAN> DELETE EXPIRED DATAFILECOPY ALL;
To crosscheck all backups of the USERS tablespace use:
RMAN> CROSSCHECK BACKUP OF TABLESPACE USERS;
To list expired backups of the USERS tablespace:
RMAN> LIST EXPIRED BACKUP OF TABLESPACE USERS;
To delete expired backups of the USERS tablespace:
RMAN> DELETE EXPIRED BACKUP OF TABLESPACE USERS;

delete obsolete

lunes, 13 de mayo de 2019

BACKUP ARCHIVELOG

rman> backup archivelog all;
rman> backup archivelog delete input;
rman> backup archivelog all not backed up 1 times;
rman> delete archivelog all completed before 'sysdate - 2';
rman> delete noprompt archivelog all completed before 'sysdate - 2';

RMAN> run {
       allocate channel t1 type disk;
       backup
          format '/recover/oracle/%d/arc_%d_%t_%s'
          archivelog until time 'sysdate-10' delete input;
       }
RMAN> list archivelog all;
RMAN> list backup of archivelog all;


RMAN> crosscheck archivelog all;
RMAN> delete noprompt expired archivelog all;
RMAN> delete noprompt archivelog until time 'sysdate -7';
RMAN> backup as copy archivelog all to destination '/path/to/backup/';

RMAN> BACKUP ARCHIVELOG
  FROM SEQUENCE 288 UNTIL SEQUENCE 388
  THREAD 1
  DELETE INPUT;


RMAN> BACKUP DEVICE TYPE sbt
  ARCHIVELOG ALL FROM TIME 'SYSDATE-10'
  DELETE ALL INPUT;

miércoles, 8 de mayo de 2019

Restoring the Server Parameter File from a Control File Autobackup

Restoring the Server Parameter File from a Control File Autobackup

If you have configured control file autobackups, then the server parameter file is backed up with the control file whenever an autobackup is taken.
To restore the server parameter file from the control file autobackup, you must first set the DBID for your database and then use the RESTORE SPFILE FROM AUTOBACKUP command. If the autobackup is in a nondefault format, then first use the SET CONTROLFILE AUTOBACKUP FORMAT command to specify the format.
Example 20-1 sets the DBID and restores the server parameter file from a control file autobackup in a nondefault location.
 
Example 20-1 Restoring the Server Parameter File from a Control File Autobackup
 
SET DBID 320066378;
RUN 
{
  SET CONTROLFILE AUTOBACKUP FORMAT 
    FOR DEVICE TYPE DISK TO 'autobackup_format';
  RESTORE SPFILE FROM AUTOBACKUP;
}