MERCADOS FINANCIEROS

martes, 17 de junio de 2014

Restore RMAN DBMS_BACKUP_RESTORE SIN CONTROLFILE

ORACLE_SID = [oracle] ? fonpett
The Oracle base has been set to /u01/app/oracle
[oracle@bdpruebas rman]$ sqlplus dba_fonpet as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Mon Jun 16 12:21:35 2014
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Enter password:
Connected to:
Oracle Database 11g Release 11.2.0.3.0 - 64bit Production
With the Automatic Storage Management option

SYS@fonpett> shu abort;
ORACLE instance shut down.
SYS@fonpett> exit
Disconnected from Oracle Database 11g Release 11.2.0.3.0 - 64bit Production
With the Automatic Storage Management option
[oracle@bdpruebas rman]$  .ora oraenv
ORACLE_SID = [fonpett] ? +ASM
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@bdpruebas rman]$ asmcmd
ASMCMD> cd +DG_DATA/fonpett/datafile
ASMCMD> ls -l
Type      Redund  Striped  Time             Sys  Name
DATAFILE  UNPROT  COARSE   JUN 07 06:00:00  Y    INDIC_FONPET_MOVIM.300.849581487
DATAFILE  UNPROT  COARSE   JUN 07 06:00:00  Y    INDIC_FONPET_MOVIM_01.303.849581487
DATAFILE  UNPROT  COARSE   JUN 07 06:00:00  Y    INDIC_FONPET_MOVIM_02.301.849581487
DATAFILE  UNPROT  COARSE   JUN 07 06:00:00  Y    INDIC_FONPET_MOVIM_REORG0.262.849581489
DATAFILE  UNPROT  COARSE   JUN 07 06:00:00  Y    INDIC_FONPET_PARAM.307.849580663
DATAFILE  UNPROT  COARSE   JUN 07 06:00:00  Y    SYSAUX.261.849581489
DATAFILE  UNPROT  COARSE   JUN 07 06:00:00  Y    SYSTEM.310.849580661
DATAFILE  UNPROT  COARSE   JUN 07 06:00:00  Y    TS_FONPET_MOVIM.263.849580661
DATAFILE  UNPROT  COARSE   JUN 07 06:00:00  Y    TS_FONPET_MOVIM.302.849581487
DATAFILE  UNPROT  COARSE   JUN 07 06:00:00  Y    TS_FONPET_MOVIM_01.304.849581487
DATAFILE  UNPROT  COARSE   JUN 07 06:00:00  Y    TS_FONPET_MOVIM_02.264.849581487
DATAFILE  UNPROT  COARSE   JUN 07 06:00:00  Y    TS_FONPET_PARAM.305.849580663
DATAFILE  UNPROT  COARSE   JUN 07 06:00:00  Y    TS_FONPET_REP.308.849580663
DATAFILE  UNPROT  COARSE   JUN 07 06:00:00  Y    UNDOTBS1.309.849580663
DATAFILE  UNPROT  COARSE   JUN 07 06:00:00  Y    USERS.306.849580663
ASMCMD> rm *3*
You may delete multiple files and/or directories.
Are you sure? (y/n) y
ASMCMD> ls -l
Type      Redund  Striped  Time             Sys  Name
DATAFILE  UNPROT  COARSE   JUN 07 06:00:00  Y    INDIC_FONPET_MOVIM_REORG0.262.849581489
DATAFILE  UNPROT  COARSE   JUN 07 06:00:00  Y    SYSAUX.261.849581489
DATAFILE  UNPROT  COARSE   JUN 07 06:00:00  Y    TS_FONPET_MOVIM_02.264.849581487
ASMCMD> pwd
+DG_DATA/fonpett/datafile
ASMCMD> rm INDIC_FONPET_MOVIM_REORG0.262.849581489
ASMCMD> rm SYSAUX.261.849581489
ASMCMD> rm TS_FONPET_MOVIM_02.264.849581487
ASMCMD> exit
[oracle@bdpruebas rman]$ pwd
/u02/backup/rman
[oracle@bdpruebas rman]$
[oracle@bdpruebas rman]$
[oracle@bdpruebas rman]$
[oracle@bdpruebas rman]$ . oraenv
ORACLE_SID = [+ASM] ? fonpett
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@bdpruebas rman]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Mon Jun 16 12:23:23 2014
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to an idle instance.

SYS@fonpett> startup nomount;
ORACLE instance started.
Total System Global Area 3206836224 bytes
Fixed Size    2232640 bytes
Variable Size 1493176000 bytes
Database Buffers 1694498816 bytes
Redo Buffers   16928768 bytes
SYS@fonpett> DECLARE
  2  v_dev varchar2(50);
  3  v_done boolean;
  4  type t_fileTable is table of varchar2(255) index by binary_integer;
  5  v_fileTable t_fileTable;
  6  v_maxPieces number:=2;
  7  BEGIN
v_fileTable(1):='/u02/backup/rman/full_FONPETP_v4p7q2hn_1_1_20140508.bak';
  8    9  v_fileTable(2):='/u02/backup/rman/full_FONPETP_v5p7q2ho_1_1_20140508.bak';
v_maxPieces:=2;
v_dev:=sys.dbms_backup_restore.deviceAllocate(type=>null, ident=>'d1');
 10   11   12  sys.dbms_backup_restore.restoreSetDatafile;
 13  dbms_backup_restore.RestoreDatafileTo( 1,'+DG_DATA/fonpetd/datafile/system01.dbf',0,'SYSTEM');
 14  FOR i IN 1..v_maxPieces LOOP
sys.dbms_backup_restore.restoreBackupPiece(done=>v_done, handle=>v_fileTable(i), params=>null);
 15  IF v_done THEN
 16   17  GOTO all_done;
 18  END IF;
 19  END LOOP;
 20  <>
 21  sys.dbms_backup_restore.deviceDeallocate;
 22  END;
 23  /
DECLARE
*
ERROR at line 1:
ORA-19624: operation failed, retry possible
ORA-19870: error while restoring backup piece
/u02/backup/rman/full_FONPETP_v4p7q2hn_1_1_20140508.bak
ORA-19505: failed to identify file
"/u02/backup/rman/full_FONPETP_v4p7q2hn_1_1_20140508.bak"
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9
ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 5827
ORA-06512: at line 15


SYS@fonpett> Disconnected from Oracle Database 11g Release 11.2.0.3.0 - 64bit Production
[oracle@bdpruebas rman]$ . oraenv
ORACLE_SID = [fonpett] ? +ASM
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@bdpruebas rman]$ cd
[oracle@bdpruebas rman]$ asmcmd
ASMCMD> cd +DG_DATE A/fonpett/
ASMCMD> ls -l
Type           Redund  Striped  Time             Sys  Name
                                                 Y    CONTROLFILE/
                                                 Y    ONLINELOG/
                                                 Y    TEMPFILE/
                                                 N    control01.ctl => +DG_DATA/FONPETT/CONTROLFILE/Current.256.817256805
                                                 N    redo01a.rdo => +DG_DATA/FONPETT/ONLINELOG/group_1.257.817256805
                                                 N    redo02a.rdo => +DG_DATA/FONPETT/ONLINELOG/group_2.258.817256807
                                                 N    redo03a.rdo => +DG_DATA/FONPETT/ONLINELOG/group_3.259.817256807
                                                 N    spfilefonpett.ora => +DG_DATA/DB_UNKNOWN/PARAMETERFILE/SPFILE.265.849580269
ASMCMD> mkdir DATAFILE
ASMCMD> ls -l
Type           Redund  Striped  Time             Sys  Name
                                                 Y    CONTROLFILE/
                                                 N    DATAFILE/
                                                 Y    ONLINELOG/
                                                 Y    TEMPFILE/
                                                 N    control01.ctl => +DG_DATA/FONPETT/CONTROLFILE/Current.256.817256805
                                                 N    redo01a.rdo => +DG_DATA/FONPETT/ONLINELOG/group_1.257.817256805
                                                 N    redo02a.rdo => +DG_DATA/FONPETT/ONLINELOG/group_2.258.817256807
                                                 N    redo03a.rdo => +DG_DATA/FONPETT/ONLINELOG/group_3.259.817256807
                                                 N    spfilefonpett.ora => +DG_DATA/DB_UNKNOWN/PARAMETERFILE/SPFILE.265.849580269
[oracle@bdpruebas rman]$ . oraenv
ORACLE_SID = [+ASM] ? fonpett
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@bdpruebas rman]$
[oracle@bdpruebas rman]$
[oracle@bdpruebas rman]$ sqlplus dba_fonpet as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Mon Jun 16 12:25:35 2014
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Enter password:
Connected to:
Oracle Database 11g Release 11.2.0.3.0 - 64bit Production
With the Automatic Storage Management option
SYS@fonpett> DECLARE
  2  v_dev varchar2(50);
  3  v_done boolean;
  4  type t_fileTable is table of varchar2(255) index by binary_integer;
  5  v_fileTable t_fileTable;
  6  v_maxPieces number:=2;
  7  BEGIN
v_fileTable(1):='/u02/backup/rman/full_FONPETP_v4p7q2hn_1_1_20140508.bak';
  8    9  v_fileTable(2):='/u02/backup/rman/full_FONPETP_v5p7q2ho_1_1_20140508.bak';
 10  v_maxPieces:=2;
 11  v_dev:=sys.dbms_backup_restore.deviceAllocate(type=>null, ident=>'d1');
 12  sys.dbms_backup_restore.restoreSetDatafile;
 13  dbms_backup_restore.RestoreDatafileTo( 1,'+DG_DATA/fonpetd/datafile/system01.dbf',0,'SYSTEM');
FOR i IN 1..v_maxPieces LOOP
 14   15  sys.dbms_backup_restore.restoreBackupPiece(done=>v_done, handle=>v_fileTable(i), params=>null);
IF v_done THEN
GOTO all_done;
 16   17   18  END IF;
 19  END LOOP;
 20  <>
 21  sys.dbms_backup_restore.deviceDeallocate;
END;
 22   23  /
DECLARE
*
ERROR at line 1:
ORA-19624: operation failed, retry possible
ORA-19870: error while restoring backup piece
/u02/backup/rman/full_FONPETP_v4p7q2hn_1_1_20140508.bak
ORA-19505: failed to identify file
"/u02/backup/rman/full_FONPETP_v4p7q2hn_1_1_20140508.bak"
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9
ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 5827
ORA-06512: at line 15


SYS@fonpett> ! ls -l /u02/backup/rman
total 10500004
-rw-r----- 1 root root  275106304 Jun 16 12:19 archivelog_FONPETP_vcp7q44p_1_1_20140508.bak
-rw-r----- 1 root root  122802834 Jun 16 12:14 full_asdbp_050814.dmp.gz
-rw-r--r-- 1 root root      28046 Jun 16 12:14 full_asdbp_050814.log.gz
-rw-r----- 1 root root 5916401664 Jun 16 12:12 full_FONPETP_v4p7q2hn_1_1_20140508.bak
-rw-r----- 1 root root 4437499904 Jun 16 12:13 full_FONPETP_v5p7q2ho_1_1_20140508.bak
-rw-r--r-- 1 root root      15718 Jun 16 12:15 gruposfonpet2014050820.ldif
-rw-r--r-- 1 root root     134963 Jun 16 12:16 usuariosfonpet2014050820.ldif
SYS@fonpett> ls -lrt
SP2-0042: unknown command "ls -lrt" - rest of line ignored.
SYS@fonpett> !ls -lrt
total 10500184
-rw-r----- 1 oracle oinstall 5916401664 Jun 16 12:12 full_FONPETP_v4p7q2hn_1_1_20140508.bak
-rw-r----- 1 oracle oinstall 4437499904 Jun 16 12:13 full_FONPETP_v5p7q2ho_1_1_20140508.bak
-rw-r----- 1 oracle oinstall  122802834 Jun 16 12:14 full_asdbp_050814.dmp.gz
-rw-r--r-- 1 oracle oinstall      28046 Jun 16 12:14 full_asdbp_050814.log.gz
-rw-r--r-- 1 oracle oinstall      15718 Jun 16 12:15 gruposfonpet2014050820.ldif
-rw-r--r-- 1 oracle oinstall     134963 Jun 16 12:16 usuariosfonpet2014050820.ldif
-rw-r----- 1 oracle oinstall  275106304 Jun 16 12:19 archivelog_FONPETP_vcp7q44p_1_1_20140508.bak
-rw-r--r-- 1 oracle oinstall     181161 Jun 16 12:26 log_rman_full_fonpetp_050814.log

SYS@fonpett> Disconnected from Oracle Database 11g Release 11.2.0.3.0 - 64bit Production
With the Automatic Storage Management option
[oracle@bdpruebas rman]$ sqlplus dba_fonpet as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Mon Jun 16 12:29:36 2014
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Enter password:
Connected to:
Oracle Database 11g Release 11.2.0.3.0 - 64bit Production
With the Automatic Storage Management option

SYS@fonpett> DECLARE
  v_dev varchar2(50);
  2    3    v_done boolean;
  4    type t_fileTable is table of varchar2(255) index by binary_integer;
  5    v_fileTable t_fileTable;
  6    v_maxPieces number:=2;
BEGIN
  v_fileTable(1):='/u02/backup/rman/full_FONPETP_v4p7q2hn_1_1_20140508.bak';
  7    8    9    v_fileTable(2):='/u02/backup/rman/full_FONPETP_v5p7q2ho_1_1_20140508.bak';
 10    v_maxPieces:=2;
 11    v_dev:=sys.dbms_backup_restore.deviceAllocate(type=>null, ident=>'d1');
 12    sys.dbms_backup_restore.restoreSetDatafile;
 13    dbms_backup_restore.RestoreDatafileTo( 1,'+DG_DATA/fonpetd/datafile/system01.dbf',0,'SYSTEM');
 14    FOR i IN 1..v_maxPieces LOOP
 15      sys.dbms_backup_restore.restoreBackupPiece(done=>v_done, handle=>v_fileTable(i), params=>null);
 16    IF v_done THEN
 17      GOTO all_done;
  END IF;
 18   19  END LOOP;
 20  <>
 21  sys.dbms_backup_restore.deviceDeallocate;
 22  END;
/ 23 
DECLARE
*
ERROR at line 1:
ORA-19624: operation failed, retry possible
ORA-19870: error while restoring backup piece
/u02/backup/rman/full_FONPETP_v4p7q2hn_1_1_20140508.bak
ORA-19504: failed to create file "+DG_DATA/fonpetd/datafile/system01.dbf"
ORA-17502: ksfdcre:4 Failed to create file
+DG_DATA/fonpetd/datafile/system01.dbf
ORA-15173: entry 'fonpetd' does not exist in directory '/'
ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 5827
ORA-06512: at line 15


SYS@fonpett> DECLARE
  v_dev varchar2(50);
  2    3    v_done boolean;
  4    type t_fileTable is table of varchar2(255) index by binary_integer;
  5    v_fileTable t_fileTable;
  6    v_maxPieces number:=2;
  7  BEGIN
  v_fileTable(1):='/u02/backup/rman/full_FONPETP_v4p7q2hn_1_1_20140508.bak';
  8    9    v_fileTable(2):='/u02/backup/rman/full_FONPETP_v5p7q2ho_1_1_20140508.bak';
 10    v_maxPieces:=2;
 11    v_dev:=sys.dbms_backup_restore.deviceAllocate(type=>null, ident=>'d1');
 12    sys.dbms_backup_restore.restoreSetDatafile;
  dbms_backup_restore.RestoreDatafileTo( 1,'+DG_DATA/fonpett/datafile/system01.dbf',0,'SYSTEM');
 13   14    FOR i IN 1..v_maxPieces LOOP
 15      sys.dbms_backup_restore.restoreBackupPiece(done=>v_done, handle=>v_fileTable(i), params=>null);
 16    IF v_done THEN
 17      GOTO all_done;
 18    END IF;
END LOOP;
 19   20  <>
 21  sys.dbms_backup_restore.deviceDeallocate;
 22  END;
 23  /

PL/SQL procedure successfully completed.

SYS@fonpett> DECLARE
v_dev varchar2(50);
  2    3  v_done boolean;
  4  type t_fileTable is table of varchar2(255) index by binary_integer;
  5  v_fileTable t_fileTable;
  6  v_maxPieces number:=2;
  7  BEGIN
v_fileTable(1):='/u02/backup/rman/full_FONPETP_v4p7q2hn_1_1_20140508.bak';
  8    9  v_fileTable(2):='/u02/backup/rman/full_FONPETP_v5p7q2ho_1_1_20140508.bak';
v_maxPieces:=2;
 10   11  v_dev:=sys.dbms_backup_restore.deviceAllocate(type=>null, ident=>'d1');
sys.dbms_backup_restore.restoreSetDatafile;
 12   13  dbms_backup_restore.RestoreDatafileTo( 2,'+DG_DATA/fonpett/datafile/systaux01.dbf',0,'SYSAUX');
 14  FOR i IN 1..v_maxPieces LOOP
 15  sys.dbms_backup_restore.restoreBackupPiece(done=>v_done, handle=>v_fileTable(i), params=>null);
IF v_done THEN
GOTO all_done;
 16   17   18  END IF;
END LOOP;
 19   20  sys.dbms_backup_restore.deviceDeallocate;
 21  <>
 22  sys.dbms_backup_restore.deviceDeallocate;
 23  END;
 24  /

PL/SQL procedure successfully completed.

SYS@fonpett> DECLARE
v_dev varchar2(50);
  2    3  v_done boolean;
  4  type t_fileTable is table of varchar2(255) index by binary_integer;
  5  v_fileTable t_fileTable;
  6  v_maxPieces number:=1;
  7  BEGIN
  8  v_fileTable(1):='/u02/backup/rman/full_FONPETP_v5p7q2ho_1_1_20140508.bak';
v_maxPieces:=1;
  9   10  v_dev:=sys.dbms_backup_restore.deviceAllocate(type=>null, ident=>'d1');
 11  sys.dbms_backup_restore.restoreSetDatafile;
 12  dbms_backup_restore.RestoreDatafileTo( 3,'+DG_DATA/fonpett/datafile/undotbs101.dbf',0,'UNDOTBS1');
 13  FOR i IN 1..v_maxPieces LOOP
 14  sys.dbms_backup_restore.restoreBackupPiece(done=>v_done, handle=>v_fileTable(i), params=>null);
IF v_done THEN
 15   16  GOTO all_done;
 17  END IF;
 18  END LOOP;
 19  <>
 20  sys.dbms_backup_restore.deviceDeallocate;
END;
 21   22  /

PL/SQL procedure successfully completed.

SYS@fonpett> DECLARE
v_dev varchar2(50);
  2    3  v_done boolean;
  4  type t_fileTable is table of varchar2(255) index by binary_integer;
  5  v_fileTable t_fileTable;
  6  v_maxPieces number:=1;
  7  BEGIN
  8  v_fileTable(1):='/u02/backup/rman/full_FONPETP_v4p7q2hn_1_1_20140508.bak';
  9  v_maxPieces:=1;
 10  v_dev:=sys.dbms_backup_restore.deviceAllocate(type=>null, ident=>'d1');
 11  sys.dbms_backup_restore.restoreSetDatafile;
 12  dbms_backup_restore.RestoreDatafileTo( 4,'+DG_DATA/fonpett/datafile/users01.dbf',0,'USERS');
 13  FOR i IN 1..v_maxPieces LOOP
 14  sys.dbms_backup_restore.restoreBackupPiece(done=>v_done, handle=>v_fileTable(i), params=>null);
IF v_done THEN
 15   16  GOTO all_done;
 17  END IF;
 18  END LOOP;
 19  <>
 20  sys.dbms_backup_restore.deviceDeallocate;
END;
 21   22  /

PL/SQL procedure successfully completed.

SYS@fonpett> DECLARE
  2  v_dev varchar2(50);
  3  v_done boolean;
type t_fileTable is table of varchar2(255) index by binary_integer;
v_fileTable t_fileTable;
  4    5    6  v_maxPieces number:=1;
  7  BEGIN
  8  v_fileTable(1):='/u02/backup/rman/full_FONPETP_v5p7q2ho_1_1_20140508.bak';
  9  v_maxPieces:=1;
 10  v_dev:=sys.dbms_backup_restore.deviceAllocate(type=>null, ident=>'d1');
 11  sys.dbms_backup_restore.restoreSetDatafile;
dbms_backup_restore.RestoreDatafileTo( 5,'+DG_DATA/fonpett/datafile/indic_fonpet_movim_01.dbf',0,'INDIC_FONPET_MOVIM');
 12   13  FOR i IN 1..v_maxPieces LOOP
 14  sys.dbms_backup_restore.restoreBackupPiece(done=>v_done, handle=>v_fileTable(i), params=>null);
 15  IF v_done THEN
 16  GOTO all_done;
 17  END IF;
END LOOP;
 18   19  <>
 20  sys.dbms_backup_restore.deviceDeallocate;
 21  END;
 22  /

PL/SQL procedure successfully completed.

SYS@fonpett> DECLARE
v_dev varchar2(50);
  2    3  v_done boolean;
  4  type t_fileTable is table of varchar2(255) index by binary_integer;
  5  v_fileTable t_fileTable;
  6  v_maxPieces number:=1;
  7  BEGIN
  8  v_fileTable(1):='/u02/backup/rman/full_FONPETP_v4p7q2hn_1_1_20140508.bak';
  9  v_maxPieces:=1;
v_dev:=sys.dbms_backup_restore.deviceAllocate(type=>null, ident=>'d1');
 10   11  sys.dbms_backup_restore.restoreSetDatafile;
 12  dbms_backup_restore.RestoreDatafileTo( 6,'+DG_DATA/fonpett/datafile/indic_fonpet_param.dbf',0,'INDIC_FONPET_PARAM');
 13  FOR i IN 1..v_maxPieces LOOP
 14  sys.dbms_backup_restore.restoreBackupPiece(done=>v_done, handle=>v_fileTable(i), params=>null);
 15  IF v_done THEN
 16  GOTO all_done;
 17  END IF;
 18  END LOOP;
<>
 19   20  sys.dbms_backup_restore.deviceDeallocate;
 21  END;
 22  /

PL/SQL procedure successfully completed.

SYS@fonpett> DECLARE
v_dev varchar2(50);
  2    3  v_done boolean;
  4  type t_fileTable is table of varchar2(255) index by binary_integer;
  5  v_fileTable t_fileTable;
  6  v_maxPieces number:=1;
  7  BEGIN
  8  v_fileTable(1):='/u02/backup/rman/full_FONPETP_v5p7q2ho_1_1_20140508.bak';
v_maxPieces:=1;
v_dev:=sys.dbms_backup_restore.deviceAllocate(type=>null, ident=>'d1');
  9   10   11  sys.dbms_backup_restore.restoreSetDatafile;
 12  dbms_backup_restore.RestoreDatafileTo( 7,'+DG_DATA/fonpett/datafile/indic_fonpet_movim.dbf',0,'INDIC_FONPET_MOVIM');
 13  FOR i IN 1..v_maxPieces LOOP
 14  sys.dbms_backup_restore.restoreBackupPiece(done=>v_done, handle=>v_fileTable(i), params=>null);
 15  IF v_done THEN
 16  GOTO all_done;
 17  END IF;
 18  END LOOP;
 19  <>
 20  sys.dbms_backup_restore.deviceDeallocate;
 21  END;
 22  /

PL/SQL procedure successfully completed.

SYS@fonpett> DECLARE
  2  v_dev varchar2(50);
  3  v_done boolean;
  4  type t_fileTable is table of varchar2(255) index by binary_integer;
  5  v_fileTable t_fileTable;
  6  v_maxPieces number:=1;
  7  BEGIN
v_fileTable(1):='/u02/backup/rman/full_FONPETP_v5p7q2ho_1_1_20140508.bak';
v_maxPieces:=1;
  8    9   10  v_dev:=sys.dbms_backup_restore.deviceAllocate(type=>null, ident=>'d1');
sys.dbms_backup_restore.restoreSetDatafile;
 11   12  dbms_backup_restore.RestoreDatafileTo( 8,'+DG_DATA/fonpett/datafile/indic_fonpet_movim_reorg0.dbf',0,'INDIC_FONPET_MOVIM_REORG');
 13  FOR i IN 1..v_maxPieces LOOP
sys.dbms_backup_restore.restoreBackupPiece(done=>v_done, handle=>v_fileTable(i), params=>null);
 14   15  IF v_done THEN
 16  GOTO all_done;
 17  END IF;
 18  END LOOP;
 19  <>
sys.dbms_backup_restore.deviceDeallocate;
 20   21  END;
/ 22 

PL/SQL procedure successfully completed.

SYS@fonpett> DECLARE
  2  v_dev varchar2(50);
  3  v_done boolean;
type t_fileTable is table of varchar2(255) index by binary_integer;
  4    5  v_fileTable t_fileTable;
  6  v_maxPieces number:=1;
  7  BEGIN
  8  v_fileTable(1):='/u02/backup/rman/full_FONPETP_v4p7q2hn_1_1_20140508.bak';
  9  v_maxPieces:=1;
 10  v_dev:=sys.dbms_backup_restore.deviceAllocate(type=>null, ident=>'d1');
 11  sys.dbms_backup_restore.restoreSetDatafile;
 12  dbms_backup_restore.RestoreDatafileTo( 9,'+DG_DATA/fonpett/datafile/ts_fonpet_param.dbf',0,'TS_FONPET_PARAM');
 13  FOR i IN 1..v_maxPieces LOOP
 14  sys.dbms_backup_restore.restoreBackupPiece(done=>v_done, handle=>v_fileTable(i), params=>null);
IF v_done THEN
 15   16  GOTO all_done;
 17  END IF;
 18  END LOOP;
 19  <>
 20  sys.dbms_backup_restore.deviceDeallocate;
END;
 21   22  /

PL/SQL procedure successfully completed.

SYS@fonpett> DECLARE
v_dev varchar2(50);
  2    3  v_done boolean;
  4  type t_fileTable is table of varchar2(255) index by binary_integer;
  5  v_fileTable t_fileTable;
  6  v_maxPieces number:=1;
  7  BEGIN
  8  v_fileTable(1):='/u02/backup/rman/full_FONPETP_v5p7q2ho_1_1_20140508.bak';
  9  v_maxPieces:=1;
 10  v_dev:=sys.dbms_backup_restore.deviceAllocate(type=>null, ident=>'d1');
sys.dbms_backup_restore.restoreSetDatafile;
 11   12  dbms_backup_restore.RestoreDatafileTo(10,'+DG_DATA/fonpett/datafile/ts_fonpet_movim_01.dbf',0,'TS_FONPET_MOVIM');
 13  FOR i IN 1..v_maxPieces LOOP
 14  sys.dbms_backup_restore.restoreBackupPiece(done=>v_done, handle=>v_fileTable(i), params=>null);
 15  IF v_done THEN
 16  GOTO all_done;
END IF;
 17   18  END LOOP;
 19  <>
sys.dbms_backup_restore.deviceDeallocate;
 20   21  END;
 22  /

PL/SQL procedure successfully completed.

SYS@fonpett> DECLARE
  2  v_dev varchar2(50);
  3  v_done boolean;
type t_fileTable is table of varchar2(255) index by binary_integer;
  4    5  v_fileTable t_fileTable;
  6  v_maxPieces number:=1;
  7  BEGIN
  8  v_fileTable(1):='/u02/backup/rman/full_FONPETP_v5p7q2ho_1_1_20140508.bak';
  9  v_maxPieces:=1;
 10  v_dev:=sys.dbms_backup_restore.deviceAllocate(type=>null, ident=>'d1');
sys.dbms_backup_restore.restoreSetDatafile;
 11   12  dbms_backup_restore.RestoreDatafileTo(11,'+DG_DATA/fonpett/datafile/indic_fonpet_movim_02.dbf',0,'INDIC_FONPET_MOVIM');
 13  FOR i IN 1..v_maxPieces LOOP
 14  sys.dbms_backup_restore.restoreBackupPiece(done=>v_done, handle=>v_fileTable(i), params=>null);
 15  IF v_done THEN
 16  GOTO all_done;
END IF;
 17   18  END LOOP;
 19  <>
 20  sys.dbms_backup_restore.deviceDeallocate;
 21  END;
 22  /

PL/SQL procedure successfully completed.

SYS@fonpett> login as: oracle
oracle@172.24.21.36's password:
Last login: Mon Jun 16 13:59:44 2014 from 192.168.100.225
[oracle@bdpruebas ~]$ . oraenv
ORACLE_SID = [oracle] ? fonpett
The Oracle base has been set to /u01/app/oracle
[oracle@bdpruebas ~]$ sqlplus dba?fonp??_fonpet as susdbaysdba
SQL*Plus: Release 11.2.0.3.0 Production on Mon Jun 16 14:00:07 2014
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Enter password:
Connected to:
Oracle Database 11g Release 11.2.0.3.0 - 64bit Production

SYS@fonpett> DECLARE
v_dev varchar2(50);
  2    3  v_done boolean;
  4  type t_fileTable is table of varchar2(255) index by binary_integer;
  5  v_fileTable t_fileTable;
  6  v_maxPieces number:=1;
  7  BEGIN
  8  v_fileTable(1):='/u02/backup/rman/full_FONPETP_v4p7q2hn_1_1_20140508.bak';
  9  v_maxPieces:=1;
 10  v_dev:=sys.dbms_backup_restore.deviceAllocate(type=>null, ident=>'d1');
 11  sys.dbms_backup_restore.restoreSetDatafile;
 12  dbms_backup_restore.RestoreDatafileTo(12,'+DG_DATA/fonpett/datafile/ts_fonpet_movim_02.dbf',0,'TS_FONPET_MOVIM');
FOR i IN 1..v_maxPieces LOOP
 13   14  sys.dbms_backup_restore.restoreBackupPiece(done=>v_done, handle=>v_fileTable(i), params=>null);
IF v_done THEN
 15   16  GOTO all_done;
 17  END IF;
 18  END LOOP;
 19  <>
sys.dbms_backup_restore.deviceDeallocate;
 20   21  END;
 22  /

PL/SQL procedure successfully completed.

SYS@fonpett> DECLARE
v_dev varchar2(50);
  2    3  v_done boolean;
  4  type t_fileTable is table of varchar2(255) index by binary_integer;
  5  v_fileTable t_fileTable;
  6  v_maxPieces number:=1;
  7  BEGIN
  8  v_fileTable(1):='/u02/backup/rman/full_FONPETP_v5p7q2ho_1_1_20140508.bak';
  9  v_maxPieces:=1;
 10  v_dev:=sys.dbms_backup_restore.deviceAllocate(type=>null, ident=>'d1');
 11  sys.dbms_backup_restore.restoreSetDatafile;
 12  dbms_backup_restore.RestoreDatafileTo(13,'+DG_DATA/fonpett/datafile/ts_fonpet_rep.dbf',0,'TS_FONPET_REP');
 13  FOR i IN 1..v_maxPieces LOOP
 14  sys.dbms_backup_restore.restoreBackupPiece(done=>v_done, handle=>v_fileTable(i), params=>null);
IF v_done THEN
 15   16  GOTO all_done;
 17  END IF;
 18  END LOOP;
 19  <>
 20  sys.dbms_backup_restore.deviceDeallocate;
END;
 21   22  /

PL/SQL procedure successfully completed.

SYS@fonpett> DECLARE
  2  v_dev varchar2(50);
  3  v_done boolean;
  4  type t_fileTable is table of varchar2(255) index by binary_integer;
  5  v_fileTable t_fileTable;
  6  v_maxPieces number:=1;
BEGIN
  7    8  v_fileTable(1):='/u02/backup/rman/full_FONPETP_v4p7q2hn_1_1_20140508.bak';
  9  v_maxPieces:=1;
 10  v_dev:=sys.dbms_backup_restore.deviceAllocate(type=>null, ident=>'d1');
 11  sys.dbms_backup_restore.restoreSetDatafile;
 12  dbms_backup_restore.RestoreDatafileTo(14,'+DG_DATA/fonpett/datafile/ts_fonpet_movim.dbf',0,'TS_FONPET_MOVIM');  FOR i IN 1..v_maxPieces LOOP
 13  sys.dbms_backup_restore.restoreBackupPiece(done=>v_done, handle=>v_fileTable(i), params=>null);
 14  IF v_done THEN
 15  GOTO all_done;
 16  END IF;
 17  END LOOP;
 18  <>
 19  sys.dbms_backup_restore.deviceDeallocate;
 20  END;
 21  /

PL/SQL procedure successfully completed.

SYS@fonpett> variable devicename varchar2(255);
DECLARE
omfname varchar2(512) := NULL;
done boolean;
begin
dbms_output.put_line(' ');
SYS@fonpett>   2    3    4    5    6  dbms_output.put_line(' Allocating device.... ');
  7  dbms_output.put_line(' Specifying datafiles... ');
  8  :devicename := dbms_backup_restore.deviceAllocate;
  9  dbms_output.put_line(' Specifing datafiles... ');
 10  dbms_backup_restore.restoreSetDataFile;
 11  dbms_backup_restore.RestoreDatafileTo(15,'+DG_DATA/fonpett/datafile/ts_fonpet_movim_2.dbf',0,'TS_FONPET_MOVIM');
 12  dbms_output.put_line(' Restoring ... ');
 13  dbms_backup_restore.restoreBackupPiece('/u02/backup/rman/full_FONPETP_v5p7q2ho_1_1_20140508.bak', done);
 14  if done then
 15  dbms_output.put_line(' Restore done.');
 16  else
 17  dbms_output.put_line(' ORA-XXXX: Restore failed ');
 18  end if;
 19  dbms_backup_restore.deviceDeallocate;
 20  end;
 21  /
PL/SQL procedure successfully completed.
SYS@fonpett>
SYS@fonpett> CREATE CONTROLFILE SET DATABASE "FONPETT" RESETLOGS ARCHIVELOG
MAXLOGFILES 32 MAXLOGMEMBERS 3 MAXDATAFILES 100 MAXINSTANCES 8 MAXLOGHISTORY 2920
  2    3  LOGFILE
  4  GROUP  1 ('+DG_DATA/fonpett/onlinelog/redo01a.rdo','+DG_FRA/fonpett/onlinelog/redo01b.rdo') SIZE 50M BLOCKSIZE 512,
  5  GROUP  2 ('+DG_DATA/fonpett/onlinelog/redo02a.rdo','+DG_FRA/fonpett/onlinelog/redo02b.rdo') SIZE 50M BLOCKSIZE 512,
  6  GROUP  3 ('+DG_DATA/fonpett/onlinelog/redo03a.rdo','+DG_FRA/fonpett/onlinelog/redo03b.rdo') SIZE 50M BLOCKSIZE 512,
  7  GROUP  4 ('+DG_DATA/fonpett/onlinelog/redo04a.rdo','+DG_FRA/fonpett/onlinelog/redo04b.rdo') SIZE 50M BLOCKSIZE 512,
  8  GROUP  5 ('+DG_DATA/fonpett/onlinelog/redo05a.rdo','+DG_FRA/fonpett/onlinelog/redo05b.rdo') SIZE 50M BLOCKSIZE 512,
  9  GROUP  6 ('+DG_DATA/fonpett/onlinelog/redo06a.rdo','+DG_FRA/fonpett/onlinelog/redo06b.rdo') SIZE 50M BLOCKSIZE 512,
 10  GROUP  7 ('+DG_DATA/fonpett/onlinelog/redo07a.rdo','+DG_FRA/fonpett/onlinelog/redo07b.rdo') SIZE 50M BLOCKSIZE 512,
 11  GROUP  8 ('+DG_DATA/fonpett/onlinelog/redo08a.rdo','+DG_FRA/fonpett/onlinelog/redo08b.rdo') SIZE 50M BLOCKSIZE 512,
 12  GROUP  9 '+DG_DATA/fonpett/onlinelog/redolog1.stb' SIZE 50M BLOCKSIZE 512,
 13  GROUP 10 '+DG_DATA/fonpett/onlinelog/redolog2.stb' SIZE 50M BLOCKSIZE 512,
 14  GROUP 11 '+DG_DATA/fonpett/onlinelog/redolog3.stb' SIZE 50M BLOCKSIZE 512,
 15  GROUP 13 '+DG_DATA/fonpett/onlinelog/redolog4.stb' SIZE 50M BLOCKSIZE 512,
 16  GROUP 14 '+DG_DATA/fonpett/onlinelog/redolog5.stb' SIZE 50M BLOCKSIZE 512,
 17  GROUP 15 '+DG_DATA/fonpett/onlinelog/redolog6.stb' SIZE 50M BLOCKSIZE 512,
 18  GROUP 16 '+DG_DATA/fonpett/onlinelog/redolog7.stb' SIZE 50M BLOCKSIZE 512,
 19  GROUP 17 '+DG_DATA/fonpett/onlinelog/redolog8.stb' SIZE 50M BLOCKSIZE 512,
 20  GROUP 18 '+DG_DATA/fonpett/onlinelog/redolog9.stb' SIZE 50M BLOCKSIZE 512
 21  DATAFILE
'+DG_DATA/fonpett/datafile/system01.dbf',
 22   23  '+DG_DATA/fonpett/datafile/systaux01.dbf',
 24  '+DG_DATA/fonpett/datafile/undotbs101.dbf',
 25  '+DG_DATA/fonpett/datafile/users01.dbf',
 26  '+DG_DATA/fonpett/datafile/indic_fonpet_movim_01.dbf',
 27  '+DG_DATA/fonpett/datafile/indic_fonpet_param.dbf',
 28  '+DG_DATA/fonpett/datafile/indic_fonpet_movim.dbf',
 29  '+DG_DATA/fonpett/datafile/indic_fonpet_movim_reorg0.dbf',
 30  '+DG_DATA/fonpett/datafile/ts_fonpet_param.dbf',
 31  '+DG_DATA/fonpett/datafile/ts_fonpet_movim_01.dbf',
 32  '+DG_DATA/fonpett/datafile/indic_fonpet_movim_02.dbf',
 33  '+DG_DATA/fonpett/datafile/ts_fonpet_movim_02.dbf',
 34  '+DG_DATA/fonpett/datafile/ts_fonpet_rep.dbf',
'+DG_DATA/fonpett/datafile/ts_fonpet_movim.dbf',
 35   36  '+DG_DATA/fonpett/datafile/ts_fonpet_movim_2.dbf'
 37  CHARACTER SET WE8ISO8859P1
 38  ;
CREATE CONTROLFILE SET DATABASE "FONPETT" RESETLOGS ARCHIVELOG
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-01504: database name 'FONPETT' does not match parameter db_name 'FONPETP'

SYS@fonpett> show parameter db_name
NAME     TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name      string FONPETP
SYS@fonpett> alter system set db_name='FONPETT' scope=                                         alter system set db_name='FONPETT' scope=spfile;
alter system set db_name='FONPETT' scope=spfile
*
ERROR at line 1:
ORA-32001: write to SPFILE requested but no SPFILE is in use

SYS@fonpett> create pfile='/tmp/init.ora' from spfile+ ='+DG_DATA/fonpett/spfilefonpett.ora';
File created.
SYS@fonpett> shu abort;
ORACLE instance shut down.
SYS@fonpett> create      !
[oracle@bdpruebas ~]$ vi /tmp/init.ora
"/tmp/init.ora" 28L, 976Cfonpett.__db_cache_size=1694498816
fonpett.__java_pool_size=50331648
fonpett.__large_pool_size=16777216
fonpett.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
fonpett.__pga_aggregate_target=1073741824
fonpett.__sga_target=3221225472
fonpett.__shared_io_pool_size=0
fonpett.__shared_pool_size=1409286144
fonpett.__streams_pool_size=16777216
*.audit_file_dest='/u01/app/oracle/admin/fonpett/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='+DG_DATA/fonpett/control01.ctl','+DG_FRA/fonpett/control02.ctl'#Restore Controlfile
*.db_block_size=8192
*.db_create_file_dest='+DG_DATA'
*.db_domain=''
*.db_name='FONPETP'
*.db_unique_name='FONPETT'
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=fonpettXDB)'
*.open_cursors=300
*.pga_aggregate_target=1073741824
*.processes=400
*.remote_login_passwordfile='EXCLUSIVE'
*.sessions=445
*.sga_target=3221225472
*.standby_file_management='MANUAL'
*.undo_tablespace='UNDOTBS1'
~                                                                                                                                                                      ~                                                                                                                                                                      ~                                                                                                                                                                      ~                                                                                                                                                                      ~                                                                                                                                                                      ~                                                                                                                                                                      ~                                                                                                                                                                      ~                                                                                                                                                                      ~                                                                                                                                                                      ~                                                                                                                                                                      ~                                                                                                                                                                      ~                                                                                                                                                                      ~                                                                                                                                                                      ~                                                                                                                                                                      ~                                                                                                                                                                      1,1All2345678910,112345678267,198-- INSERT --17,18All9T'8TT'917,18All:x
"/tmp/init.ora" 28L, 976C written

[oracle@bdpruebas ~]$ !
[oracle@bdpruebas ~]$
[oracle@bdpruebas ~]$ cat /tmp/init.ora
fonpett.__db_cache_size=1694498816
fonpett.__java_pool_size=50331648
fonpett.__large_pool_size=16777216
fonpett.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
fonpett.__pga_aggregate_target=1073741824
fonpett.__sga_target=3221225472
fonpett.__shared_io_pool_size=0
fonpett.__shared_pool_size=1409286144
fonpett.__streams_pool_size=16777216
*.audit_file_dest='/u01/app/oracle/admin/fonpett/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='+DG_DATA/fonpett/control01.ctl','+DG_FRA/fonpett/control02.ctl'#Restore Controlfile
*.db_block_size=8192
*.db_create_file_dest='+DG_DATA'
*.db_domain=''
*.db_name='FONPETT'
*.db_unique_name='FONPETT'
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=fonpettXDB)'
*.open_cursors=300
*.pga_aggregate_target=1073741824
*.processes=400
*.remote_login_passwordfile='EXCLUSIVE'
*.sessions=445
*.sga_target=3221225472
*.standby_file_management='MANUAL'
*.undo_tablespace='UNDOTBS1'
[oracle@bdpruebas ~]$
[oracle@bdpruebas ~]$
[oracle@bdpruebas ~]$ exit
exit
SYS@fonpett> sql,    create spfile  + '         spfile='+DG_DATA/fonpett/spfilefonpett.ora' from pfile+   ='/tmp/init.ora';
File created.
                                                                                                                                                                      ~                                                                                                                                                                      17,1All892019879 65432:q!
[oracle@bdpruebas ~]$ . oraenv
ORACLE_SID = [fonpett] ?
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@bdpruebas ~]$ . oraenvvi /tmp/init.orasqlplus dba_fonpet as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Mon Jun 16 14:35:33 2014
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Enter password:
Connected to:
Oracle Database 11g Release 11.2.0.3.0 - 64bit Production
With the Automatic Storage Management option
SYS@fonpett> st  startup force nomount pfile_ = ='/tmp/init.ora';
ORACLE instance started.
Total System Global Area 3206836224 bytes
Fixed Size    2232640 bytes
Variable Size 1493176000 bytes
Database Buffers 1694498816 bytes
Redo Buffers   16928768 bytes
SYS@fonpett> show parameter db_name
NAME     TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name      string FONPETT

SYS@fonpett> CREATE CONTROLFILE SET DATABASE "FONPETT" RESETLOGS ARCHIVELOG
MAXLOGFILES 32 MAXLOGMEMBERS 3 MAXDATAFILES 100 MAXINSTANCES 8 MAXLOGHISTORY 2920
LOGFILE
  2    3    4  GROUP  1 ('+DG_DATA/fonpett/onlinelog/redo01a.rdo','+DG_FRA/fonpett/onlinelog/redo01b.rdo') SIZE 50M BLOCKSIZE 512,
  5  GROUP  2 ('+DG_DATA/fonpett/onlinelog/redo02a.rdo','+DG_FRA/fonpett/onlinelog/redo02b.rdo') SIZE 50M BLOCKSIZE 512,
  6  GROUP  3 ('+DG_DATA/fonpett/onlinelog/redo03a.rdo','+DG_FRA/fonpett/onlinelog/redo03b.rdo') SIZE 50M BLOCKSIZE 512,
  7  GROUP  4 ('+DG_DATA/fonpett/onlinelog/redo04a.rdo','+DG_FRA/fonpett/onlinelog/redo04b.rdo') SIZE 50M BLOCKSIZE 512,
GROUP  5 ('+DG_DATA/fonpett/onlinelog/redo05a.rdo','+DG_FRA/fonpett/onlinelog/redo05b.rdo') SIZE 50M BLOCKSIZE 512,
  8    9  GROUP  6 ('+DG_DATA/fonpett/onlinelog/redo06a.rdo','+DG_FRA/fonpett/onlinelog/redo06b.rdo') SIZE 50M BLOCKSIZE 512,
 10  GROUP  7 ('+DG_DATA/fonpett/onlinelog/redo07a.rdo','+DG_FRA/fonpett/onlinelog/redo07b.rdo') SIZE 50M BLOCKSIZE 512,
 11  GROUP  8 ('+DG_DATA/fonpett/onlinelog/redo08a.rdo','+DG_FRA/fonpett/onlinelog/redo08b.rdo') SIZE 50M BLOCKSIZE 512,
 12  GROUP  9 '+DG_DATA/fonpett/onlinelog/redolog1.stb' SIZE 50M BLOCKSIZE 512,
 13  GROUP 10 '+DG_DATA/fonpett/onlinelog/redolog2.stb' SIZE 50M BLOCKSIZE 512,
 14  GROUP 11 '+DG_DATA/fonpett/onlinelog/redolog3.stb' SIZE 50M BLOCKSIZE 512,
GROUP 13 '+DG_DATA/fonpett/onlinelog/redolog4.stb' SIZE 50M BLOCKSIZE 512,
 15   16  GROUP 14 '+DG_DATA/fonpett/onlinelog/redolog5.stb' SIZE 50M BLOCKSIZE 512,
 17  GROUP 15 '+DG_DATA/fonpett/onlinelog/redolog6.stb' SIZE 50M BLOCKSIZE 512,
 18  GROUP 16 '+DG_DATA/fonpett/onlinelog/redolog7.stb' SIZE 50M BLOCKSIZE 512,
 19  GROUP 17 '+DG_DATA/fonpett/onlinelog/redolog8.stb' SIZE 50M BLOCKSIZE 512,
 20  GROUP 18 '+DG_DATA/fonpett/onlinelog/redolog9.stb' SIZE 50M BLOCKSIZE 512
 21  DATAFILE
 22  '+DG_DATA/fonpett/datafile/system01.dbf',
 23  '+DG_DATA/fonpett/datafile/systaux01.dbf',
 24  '+DG_DATA/fonpett/datafile/undotbs101.dbf',
 25  '+DG_DATA/fonpett/datafile/users01.dbf',
 26  '+DG_DATA/fonpett/datafile/indic_fonpet_movim_01.dbf',
 27  '+DG_DATA/fonpett/datafile/indic_fonpet_param.dbf',
 28  '+DG_DATA/fonpett/datafile/indic_fonpet_movim.dbf',
 29  '+DG_DATA/fonpett/datafile/indic_fonpet_movim_reorg0.dbf',
 30  '+DG_DATA/fonpett/datafile/ts_fonpet_param.dbf',
 31  '+DG_DATA/fonpett/datafile/ts_fonpet_movim_01.dbf',
 32  '+DG_DATA/fonpett/datafile/indic_fonpet_movim_02.dbf',
 33  '+DG_DATA/fonpett/datafile/ts_fonpet_movim_02.dbf',
 34  '+DG_DATA/fonpett/datafile/ts_fonpet_rep.dbf',
 35  '+DG_DATA/fonpett/datafile/ts_fonpet_movim.dbf',
 36  '+DG_DATA/fonpett/datafile/ts_fonpet_movim_2.dbf'
 37  CHARACTER SET WE8ISO8859P1
; 38 
CREATE CONTROLFILE SET DATABASE "FONPETT" RESETLOGS ARCHIVELOG
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-00200: control file could not be created
ORA-00202: control file: '+DG_DATA/fonpett/control01.ctl'
ORA-17502: ksfdcre:4 Failed to create file +DG_DATA/fonpett/control01.ctl
ORA-15005: name "fonpett/control01.ctl" is already used by an existing alias

SYS@fonpett> CREATE CONTROLFILE SET DATABASE "FONPETT" RESETLOGS ARCHIVELOG
MAXLOGFILES 32 MAXLOGMEMBERS 3 MAXDATAFILES 100 MAXINSTANCES 8 MAXLOGHISTORY 2920
  2    3  LOGFILE
  4  GROUP  1 ('+DG_DATA/fonpett/onlinelog/redo01a.rdo','+DG_FRA/fonpett/onlinelog/redo01b.rdo') SIZE 50M BLOCKSIZE 512,
  5  GROUP  2 ('+DG_DATA/fonpett/onlinelog/redo02a.rdo','+DG_FRA/fonpett/onlinelog/redo02b.rdo') SIZE 50M BLOCKSIZE 512,
  6  GROUP  3 ('+DG_DATA/fonpett/onlinelog/redo03a.rdo','+DG_FRA/fonpett/onlinelog/redo03b.rdo') SIZE 50M BLOCKSIZE 512,
  7  GROUP  4 ('+DG_DATA/fonpett/onlinelog/redo04a.rdo','+DG_FRA/fonpett/onlinelog/redo04b.rdo') SIZE 50M BLOCKSIZE 512,
  8  GROUP  5 ('+DG_DATA/fonpett/onlinelog/redo05a.rdo','+DG_FRA/fonpett/onlinelog/redo05b.rdo') SIZE 50M BLOCKSIZE 512,
  9  GROUP  6 ('+DG_DATA/fonpett/onlinelog/redo06a.rdo','+DG_FRA/fonpett/onlinelog/redo06b.rdo') SIZE 50M BLOCKSIZE 512,
 10  GROUP  7 ('+DG_DATA/fonpett/onlinelog/redo07a.rdo','+DG_FRA/fonpett/onlinelog/redo07b.rdo') SIZE 50M BLOCKSIZE 512,
 11  GROUP  8 ('+DG_DATA/fonpett/onlinelog/redo08a.rdo','+DG_FRA/fonpett/onlinelog/redo08b.rdo') SIZE 50M BLOCKSIZE 512,
 12  GROUP  9 '+DG_DATA/fonpett/onlinelog/redolog1.stb' SIZE 50M BLOCKSIZE 512,
 13  GROUP 10 '+DG_DATA/fonpett/onlinelog/redolog2.stb' SIZE 50M BLOCKSIZE 512,
 14  GROUP 11 '+DG_DATA/fonpett/onlinelog/redolog3.stb' SIZE 50M BLOCKSIZE 512,
GROUP 13 '+DG_DATA/fonpett/onlinelog/redolog4.stb' SIZE 50M BLOCKSIZE 512,
 15   16  GROUP 14 '+DG_DATA/fonpett/onlinelog/redolog5.stb' SIZE 50M BLOCKSIZE 512,
 17  GROUP 15 '+DG_DATA/fonpett/onlinelog/redolog6.stb' SIZE 50M BLOCKSIZE 512,
 18  GROUP 16 '+DG_DATA/fonpett/onlinelog/redolog7.stb' SIZE 50M BLOCKSIZE 512,
 19  GROUP 17 '+DG_DATA/fonpett/onlinelog/redolog8.stb' SIZE 50M BLOCKSIZE 512,
 20  GROUP 18 '+DG_DATA/fonpett/onlinelog/redolog9.stb' SIZE 50M BLOCKSIZE 512
 21  DATAFILE
 22  '+DG_DATA/fonpett/datafile/system01.dbf',
 23  '+DG_DATA/fonpett/datafile/systaux01.dbf',
 24  '+DG_DATA/fonpett/datafile/undotbs101.dbf',
 25  '+DG_DATA/fonpett/datafile/users01.dbf',
 26  '+DG_DATA/fonpett/datafile/indic_fonpet_movim_01.dbf',
 27  '+DG_DATA/fonpett/datafile/indic_fonpet_param.dbf',
 28  '+DG_DATA/fonpett/datafile/indic_fonpet_movim.dbf',
 29  '+DG_DATA/fonpett/datafile/indic_fonpet_movim_reorg0.dbf',
'+DG_DATA/fonpett/datafile/ts_fonpet_param.dbf',
 30   31  '+DG_DATA/fonpett/datafile/ts_fonpet_movim_01.dbf',
 32  '+DG_DATA/fonpett/datafile/indic_fonpet_movim_02.dbf',
 33  '+DG_DATA/fonpett/datafile/ts_fonpet_movim_02.dbf',
 34  '+DG_DATA/fonpett/datafile/ts_fonpet_rep.dbf',
 35  '+DG_DATA/fonpett/datafile/ts_fonpet_movim.dbf',
 36  '+DG_DATA/fonpett/datafile/ts_fonpet_movim_2.dbf'
 37  CHARACTER SET WE8ISO8859P1
 38  ;
Control file created.


SYS@fonpett> startup force  mount;
ORACLE instance started.
Total System Global Area 3206836224 bytes
Fixed Size    2232640 bytes
Variable Size 1493176000 bytes
Database Buffers 1694498816 bytes
Redo Buffers   16928768 bytes
Database mounted.

SYS@fonpett> show prameter       arameter back    db_name
NAME     TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name      string FONPETT
SYS@fonpett> exit
Disconnected from Oracle Database 11g Release 11.2.0.3.0 - 64bit Production
With the Automatic Storage Management option
[oracle@bdpruebas ~]$ rman target --/
Recovery Manager: Release 11.2.0.3.0 - Production on Mon Jun 16 14:41:27 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
connected to target database: FONPETT (DBID=2150325182, not open)
RMAN> catalog start with '/u02/backup/rman';
using target database control file instead of recovery catalog
searching for all files that match the pattern /u02/backup/rman
List of Files Unknown to the Database
=====================================
File Name: /u02/backup/rman/full_asdbp_050814.log.gz
File Name: /u02/backup/rman/full_FONPETP_v5p7q2ho_1_1_20140508.bak
File Name: /u02/backup/rman/full_asdbp_050814.dmp.gz
File Name: /u02/backup/rman/archivelog_FONPETP_vcp7q44p_1_1_20140508.bak
File Name: /u02/backup/rman/full_FONPETP_v4p7q2hn_1_1_20140508.bak
File Name: /u02/backup/rman/log_rman_full_fonpetp_050814.log
File Name: /u02/backup/rman/usuariosfonpet2014050820.ldif
File Name: /u02/backup/rman/gruposfonpet2014050820.ldif
Do you really want to catalog the above files (enter YES or NO)? YES
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /u02/backup/rman/full_FONPETP_v5p7q2ho_1_1_20140508.bak
File Name: /u02/backup/rman/archivelog_FONPETP_vcp7q44p_1_1_20140508.bak
File Name: /u02/backup/rman/full_FONPETP_v4p7q2hn_1_1_20140508.bak
List of Files Which Where Not Cataloged
=======================================
File Name: /u02/backup/rman/full_asdbp_050814.log.gz
  RMAN-07517: Reason: The file header is corrupted
File Name: /u02/backup/rman/full_asdbp_050814.dmp.gz
  RMAN-07517: Reason: The file header is corrupted
File Name: /u02/backup/rman/log_rman_full_fonpetp_050814.log
  RMAN-07517: Reason: The file header is corrupted
File Name: /u02/backup/rman/usuariosfonpet2014050820.ldif
  RMAN-07517: Reason: The file header is corrupted
File Name: /u02/backup/rman/gruposfonpet2014050820.ldif
  RMAN-07517: Reason: The file header is corrupted
RMAN> EXIT 

Recovery Manager complete.
[oracle@bdpruebas ~]$ export NLS_DATE_FORMAT="DD/MM/YYYY HH24:MI:SS"
[oracle@bdpruebas ~]$ export NLS_DATE_FORMAT="DD/MM/YYYY HH24:MI:SS"
SYS@fonpett> recover database using backup controlfile until cancel
ORA-00279: change 68294119 generated at 05/08/2014 21:10:16 needed for thread 1
ORA-00289: suggestion :
/u01/app/oracle/product/11.2.0/dbhome_1/dbs/arch1_3596_838067579.dbf
ORA-00280: change 68294119 for thread 1 is in sequence #3596

Specify log: {=suggested | filename | AUTO | CANCEL}
CANCEL
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '+DG_DATA/fonpett/datafile/system01.dbf'


ORA-01112: media recovery not started

rman target /
Recovery Manager: Release 11.2.0.3.0 - Production on Mon Jun 16 14:41:56 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
connected to target database: FONPETT (DBID=2150325182, not open)

RMAN> list backup of archivelog from logseq 3596;
using target database control file instead of recovery catalog
List of Backup Sets
===================

BS Key  Size       Device Type Elapsed Time Completion Time   
------- ---------- ----------- ------------ -------------------
2       262.36M    DISK        00:00:00     08/05/2014 21:37:29
        BP Key: 2   Status: AVAILABLE  Compressed: NO  Tag: TAG20140508T213135
        Piece Name: /u02/backup/rman/archivelog_FONPETP_vcp7q44p_1_1_20140508.bak
  List of Archived Logs in backup set 2
  Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  ---- ------- ---------- ------------------- ---------- ---------
  1    3590    68245134   08/05/2014 14:26:51 68255946   08/05/2014 16:01:05
  1    3591    68255946   08/05/2014 16:01:05 68257325   08/05/2014 16:08:14
  1    3592    68257325   08/05/2014 16:08:14 68260491   08/05/2014 16:31:42
  1    3593    68260491   08/05/2014 16:31:42 68264133   08/05/2014 17:00:07
  1    3594    68264133   08/05/2014 17:00:07 68277112   08/05/2014 18:44:19
  1    3595    68277112   08/05/2014 18:44:19 68287826   08/05/2014 20:17:55
  1    3596    68287826   08/05/2014 20:17:55 68295909   08/05/2014 21:31:27

RMAN>
RMAN> restore archivelog from logseq 3590;
Starting restore at 16/06/2014 14:42:49
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=319 device type=DISK
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=3590
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=3591
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=3592
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=3593
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=3594
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=3595
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=3596
channel ORA_DISK_1: reading from backup piece /u02/backup/rman/archivelog_FONPETP_vcp7q44p_1_1_20140508.bak
channel ORA_DISK_1: piece handle=/u02/backup/rman/archivelog_FONPETP_vcp7q44p_1_1_20140508.bak tag=TAG20140508T213135
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
Finished restore at 16/06/2014 14:42:57
RMAN> list backup of archivelog  all;

List of Backup Sets
===================

BS Key  Size       Device Type Elapsed Time Completion Time   
------- ---------- ----------- ------------ -------------------
2       262.36M    DISK        00:00:00     08/05/2014 21:37:29
        BP Key: 2   Status: AVAILABLE  Compressed: NO  Tag: TAG20140508T213135
        Piece Name: /u02/backup/rman/archivelog_FONPETP_vcp7q44p_1_1_20140508.bak
  List of Archived Logs in backup set 2
  Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  ---- ------- ---------- ------------------- ---------- ---------
  1    3580    68215578   08/05/2014 11:03:22 68218390   08/05/2014 11:17:05
  1    3581    68218390   08/05/2014 11:17:05 68219047   08/05/2014 11:17:11
  1    3582    68219047   08/05/2014 11:17:11 68220601   08/05/2014 11:25:59
  1    3583    68220601   08/05/2014 11:25:59 68221736   08/05/2014 11:32:42
  1    3584    68221736   08/05/2014 11:32:42 68225001   08/05/2014 11:56:51
  1    3585    68225001   08/05/2014 11:56:51 68228020   08/05/2014 12:17:07
  1    3586    68228020   08/05/2014 12:17:07 68233698   08/05/2014 12:59:44
  1    3587    68233698   08/05/2014 12:59:44 68234397   08/05/2014 12:59:50
  1    3588    68234397   08/05/2014 12:59:50 68235608   08/05/2014 13:05:11
  1    3589    68235608   08/05/2014 13:05:11 68245134   08/05/2014 14:26:51
  1    3590    68245134   08/05/2014 14:26:51 68255946   08/05/2014 16:01:05
  1    3591    68255946   08/05/2014 16:01:05 68257325   08/05/2014 16:08:14
  1    3592    68257325   08/05/2014 16:08:14 68260491   08/05/2014 16:31:42
  1    3593    68260491   08/05/2014 16:31:42 68264133   08/05/2014 17:00:07
  1    3594    68264133   08/05/2014 17:00:07 68277112   08/05/2014 18:44:19
  1    3595    68277112   08/05/2014 18:44:19 68287826   08/05/2014 20:17:55
  1    3596    68287826   08/05/2014 20:17:55 68295909   08/05/2014 21:31:27
RMAN> exit

SYS@fonpett> recover database using backup controlfile in  until scn 68295909;
ORA-00277: illegal option to the UNTIL recovery flag SCN

SYS@fonpett> recover database using backup controlfile until change 68295908
Media recovery complete.

SYS@fonpett> select name, bytes, status from v$datafile;
NAME
--------------------------------------------------------------------------------
     BYTES STATUS
---------- -------
+DG_DATA/fonpett/datafile/system01.dbf
1126170624 SYSTEM
+DG_DATA/fonpett/datafile/systaux01.dbf
1986002944 RECOVER
+DG_DATA/fonpett/datafile/undotbs101.dbf
3191865344 RECOVER

NAME
--------------------------------------------------------------------------------
     BYTES STATUS
---------- -------
+DG_DATA/fonpett/datafile/users01.dbf
 187432960 RECOVER
+DG_DATA/fonpett/datafile/indic_fonpet_movim_01.dbf
5309988864 RECOVER
+DG_DATA/fonpett/datafile/indic_fonpet_param.dbf
 594214912 RECOVER

NAME
--------------------------------------------------------------------------------
     BYTES STATUS
---------- -------
+DG_DATA/fonpett/datafile/indic_fonpet_movim.dbf
3463774208 RECOVER
+DG_DATA/fonpett/datafile/indic_fonpet_movim_reorg0.dbf
2621440000 RECOVER
+DG_DATA/fonpett/datafile/ts_fonpet_param.dbf
 104857600 RECOVER

NAME
--------------------------------------------------------------------------------
     BYTES STATUS
---------- -------
+DG_DATA/fonpett/datafile/ts_fonpet_movim_01.dbf
8678146048 RECOVER
+DG_DATA/fonpett/datafile/indic_fonpet_movim_02.dbf
5146411008 RECOVER
+DG_DATA/fonpett/datafile/ts_fonpet_movim_02.dbf
3145728000 RECOVER

NAME
--------------------------------------------------------------------------------
     BYTES STATUS
---------- -------
+DG_DATA/fonpett/datafile/ts_fonpet_rep.dbf
5242880000 RECOVER
+DG_DATA/fonpett/datafile/ts_fonpet_movim.dbf
3.4318E+10 RECOVER
+DG_DATA/fonpett/datafile/ts_fonpet_movim_2.dbf
5242880000 RECOVER

15 rows selected.
SYS@fonpett> st lin     et lines 1000 pages 1000
SYS@fonpett> col name for mat a      mat a79
SYS@fonpett> /
NAME     BYTES STATUS
------------------------------------------------------------------------------- ---------- -------
+DG_DATA/fonpett/datafile/system01.dbf1126170624 SYSTEM
+DG_DATA/fonpett/datafile/systaux01.dbf 1986002944 RECOVER
+DG_DATA/fonpett/datafile/undotbs101.dbf3191865344 RECOVER
+DG_DATA/fonpett/datafile/users01.dbf 187432960 RECOVER
+DG_DATA/fonpett/datafile/indic_fonpet_movim_01.dbf5309988864 RECOVER
+DG_DATA/fonpett/datafile/indic_fonpet_param.dbf 594214912 RECOVER
+DG_DATA/fonpett/datafile/indic_fonpet_movim.dbf3463774208 RECOVER
+DG_DATA/fonpett/datafile/indic_fonpet_movim_reorg0.dbf 2621440000 RECOVER
+DG_DATA/fonpett/datafile/ts_fonpet_param.dbf 104857600 RECOVER
+DG_DATA/fonpett/datafile/ts_fonpet_movim_01.dbf8678146048 RECOVER
+DG_DATA/fonpett/datafile/indic_fonpet_movim_02.dbf5146411008 RECOVER
+DG_DATA/fonpett/datafile/ts_fonpet_movim_02.dbf3145728000 RECOVER
+DG_DATA/fonpett/datafile/ts_fonpet_rep.dbf5242880000 RECOVER
+DG_DATA/fonpett/datafile/ts_fonpet_movim.dbf3.4318E+10 RECOVER
+DG_DATA/fonpett/datafile/ts_fonpet_movim_2.dbf 5242880000 RECOVER
15 rows selected.

SYS@fonpett> alter database open resetlogs ;
Database altered.
SYS@fonpett>
SYS@fonpett> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

SYS@fonpett> startup
ORACLE instance started.
Total System Global Area 3206836224 bytes
Fixed Size    2232640 bytes
Variable Size 1493176000 bytes
Database Buffers 1694498816 bytes
Redo Buffers   16928768 bytes
Database mounted.
Database opened.
SYS@fonpett>

No hay comentarios: