Caso 3. Restaurar la base de datos de
producción para actualizar el ambiente de pruebas (FONPETP en FONPETT o en FONPETD):
En
este escenario se toma un backup del ambiente de producción para actualizar el
ambiente de pruebas. Existen diversos métodos para realizar esta actividad, sin
embargo en este escenario se utiliza la metodología “restore clone from
location”
Se
ubican las piezas a restaurar. Usualmente aparecen con formato de nombre tipo
copia + base de datos + nombre pieza + numero de pieza + canal + fecha. En este
caso se restaurará una copia de seguridad del 6 de junio
Si
las piezas se encuentran en otro servidor, será necesario transportarlas al
servidor donde se restaurará.
[oracle@bdprod fonpetp]$ ls -lrt
total 38071164
-rw-r----- 1 oracle asmadmin 21397504 Nov 17 2013 ctlstby_FONPETP.17112013
-rw-r----- 1 oracle oinstall 1818624 Jan 28 20:53
full_FONPETP_9pov7qj0_1_1_20140128.bak
-rw-r----- 1 root root
19688177664 May 4 08:28
full_FONPETP_ltp7angr_1_1_20140503.bak
-rw-r--r-- 1 root root
8348484697 May 4 18:48 backup.zip
drwxr-xr-x 2 oracle oinstall 4096 Jun 5 12:22 scripts
-rw-r----- 1 oracle oinstall 21856256 Jun 5 21:04 s_849443012.1048.849443015
drwxr-xr-x
2 oracle oinstall 20480 Jun 6 21:10 logs
-rw-r----- 1 oracle
asmadmin 5181661184 Jun 6 21:23
full_FONPETP_4upa6hdh_1_1_20140606.bak
-rw-r----- 1 oracle
asmadmin 5348573184 Jun 6 21:30 full_FONPETP_4tpa6hdh_1_1_20140606.bak
-rw-r----- 1 oracle asmadmin 350995456 Jun
6 21:30 arch_FONPETP_50pa6ijh_1_1_20140606.bak
-rw-r----- 1 oracle
asmadmin 21856256 Jun 6 21:31 ctrl_c-2150325182-20140606-00.bak
[oracle@bdprod fonpetp]$ scp -pr
full_FONPETP_4upa6hdh_1_1_20140606.bak full_FONPETP_4tpa6hdh_1_1_20140606.bak
archivelog_FONPETP_50pa6ijh_1_1_20140606.bak
controlfile_c-2150325182-20140606-00.bak 172.24.21.36:/u02/backup
oracle@172.24.21.36's password: **********
full_FONPETP_4upa6hdh_1_1_20140606.bak 100%
4942MB 88.2MB/s 00:56
full_FONPETP_4tpa6hdh_1_1_20140606.bak 100%
5101MB 83.6MB/s 01:01
archivelog_FONPETP_50pa6ijh_1_1_20140606.bak 100% 335MB
67.0MB/s 00:05
controlfile_c-2150325182-20140606-00.bak 100% 21MB
20.8MB/s 00:01
Eliminar
primero los archivos de la base de datos actual de desarrollo con la instancia
abajo. No eliminar el spfile y crear de nuevo los directorios eliminados
automáticamente por ASM.
[oracle@bddesarrollo ~]$ . oraenv
ORACLE_SID = [+ASM] ? fonpett
The Oracle base remains unchanged with
value /u01/app/oracle
[oracle@bddesarrollo ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production
on Thu Oct 2 19:36:01 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Release 11.2.0.3.0 -
64bit Production
With the Automatic Storage Management
option
SYS@fonpetd> shu immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@fonpetd> exit
Disconnected from Oracle Database 11g
Release 11.2.0.3.0 - 64bit Production
With the Automatic Storage Management
option
[oracle@bddesarrollo ~]$ . oraenv
ORACLE_SID = [fonpetd] ? +ASM
The Oracle base remains unchanged with
value /u01/app/oracle
[oracle@bddesarrollo ~]$ asmcmd
You may delete multiple files and/or
directories.
Are you sure? (y/n) y
ASMCMD> mkdir +DG_DATA/fonpett/datafile
ASMCMD> rm +DG_DATA/fonpett/controlfile/*
You may delete multiple files and/or
directories.
Are you sure? (y/n) y
ASMCMD> mkdir +DG_DATA/fonpett/controlfile
You may delete multiple files and/or
directories.
Are you sure? (y/n) y
ASMCMD> mkdir +DG_DATA/fonpett/tempfile
ASMCMD>
exit
ASMCMD> mkdir +DG_DATA/fonpett/onlinelog
ASMCMD> rm +DG_DATA/fonpett/onlinelog/*
You may delete multiple files and/or
directories.
Are you sure? (y/n) y
Iniciar
la base de datos en modo nomount y dejarla lista para la restauración
[oracle@bddesarrollo ~]$ . oraenv
ORACLE_SID = [+ASM] ? fonpett
The Oracle base remains unchanged with
value /u01/app/oracle
[oracle@bddesarrollo ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production
on Thu Oct 2 19:42:44 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SYS@fonpetd> alter system set db_name='FONPETP' scope=spfile;
System altered.
SYS@fonpetd> alter system set db_file_name_convert='+DG_DATA/fonpetp','+DG_DATA/fonpetd'
scope=spfile;
System altered.
SYS@fonpetd> alter system set log_file_name_convert='+DG_DATA/fonpetp','+DG_DATA/fonpetd'
scope=spfile;
System altered.
SYS@fonpetd> startup nomount;
ORACLE instance started.
Total System Global Area 1402982400
bytes
Fixed Size 2228304 bytes
Variable Size 1090523056 bytes
Database Buffers 301989888 bytes
Redo Buffers 8241152 bytes
SYS@fonpetd>
exit
En el servidor
donde se restaurará usando RMAN se aloja el canal auxiliar y se inicia la
restauracion. En este escenario se restaurará la base de datos fonpetp en
fonpett
[oracle@bdpruebas ~]$ . oraenv
ORACLE_SID = [oracle] ? fonpett
The Oracle base remains unchanged with
value /u01/app/oracle
[oracle@bdpruebas ~]$ rman auxiliary /
Recovery Manager: Release 11.2.0.3.0 -
Production on Sat Jun 7 02:36:58 2014
Copyright (c) 1982, 2011, Oracle and/or
its affiliates. All rights reserved.
connected to auxiliary database: FONPETP
(not mounted)
RMAN> run
{
DUPLICATE DATABASE 'FONPETP'
DBID 2150325182 TO fonpetd backup location '/u02/backup/rman/prueba_restauracion/';
}
Starting Duplicate Db at 07/06/2014
02:37:01
contents of Memory Script:
{
sql clone "create spfile from memory";
}
executing Memory Script
sql statement: create spfile from memory
contents of Memory Script:
{
shutdown clone immediate;
startup clone nomount;
}
executing Memory Script
Oracle instance shut down
connected to auxiliary database (not
started)
Oracle instance started
Total System Global Area 3206836224 bytes
Fixed Size 2232640 bytes
Variable Size 671092416 bytes
Database Buffers 2516582400 bytes
Redo Buffers 16928768 bytes
contents of Memory Script:
{
sql clone "alter system set
db_name =
''FONPETP'' comment=
''Modified by RMAN duplicate''
scope=spfile";
sql clone "alter system set
db_unique_name =
''FONPETT'' comment=
''Modified by RMAN duplicate''
scope=spfile";
shutdown clone immediate;
startup clone force nomount
restore clone primary controlfile from
'/u02/backup/controlfile_c-2150325182-20140606-00.bak';
alter clone database mount;
}
executing Memory Script
sql statement: alter system set db_name =
''FONPETP'' comment= ''Modified by RMAN duplicate'' scope=spfile
sql statement: alter system set db_unique_name = ''FONPETT'' comment= ''Modified by RMAN
duplicate'' scope=spfile
Oracle instance shut down
Oracle instance started
Total System Global Area 3206836224 bytes
Fixed Size 2232640 bytes
Variable Size 671092416 bytes
Database Buffers 2516582400 bytes
Redo Buffers 16928768 bytes
Starting restore at 07/06/2014 02:37:24
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=469 device
type=DISK
channel ORA_AUX_DISK_1: restoring
control file
channel ORA_AUX_DISK_1: restore
complete, elapsed time: 00:00:07
output file
name=+DG_DATA/fonpett/control01.ctl
output file
name=+DG_FRA/fonpett/control02.ctl
Finished restore at 07/06/2014 02:37:32
database mounted
released channel: ORA_AUX_DISK_1
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=469 device type=DISK
contents of Memory Script:
{
set until scn 75254117;
set newname for clone datafile 1
to new;
set newname for clone datafile 2
to new;
set newname for clone datafile 3
to new;
set newname for clone datafile 4
to new;
set newname for clone datafile 5
to new;
set newname for clone datafile 6
to new;
set newname for clone datafile 7
to new;
set newname for clone datafile 8
to new;
set newname for clone datafile 9
to new;
set newname for clone datafile 10
to new;
set newname for clone datafile 11
to new;
set newname for clone datafile 12
to new;
set newname for clone datafile 13
to new;
set newname for clone datafile 14
to new;
set newname for clone datafile 15
to new;
restore
clone database
;
}
executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 07/06/2014 02:37:38
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting
datafile backup set restore
channel ORA_AUX_DISK_1: specifying
datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring
datafile 00001 to +DG_DATA
channel ORA_AUX_DISK_1: restoring
datafile 00003 to +DG_DATA
channel ORA_AUX_DISK_1: restoring
datafile 00004 to +DG_DATA
channel ORA_AUX_DISK_1: restoring
datafile 00006 to +DG_DATA
channel ORA_AUX_DISK_1: restoring
datafile 00009 to +DG_DATA
channel ORA_AUX_DISK_1: restoring
datafile 00013 to +DG_DATA
channel ORA_AUX_DISK_1: restoring
datafile 00014 to +DG_DATA
channel ORA_AUX_DISK_1: reading from
backup piece /u02/backup/full_FONPETP_4tpa6hdh_1_1_20140606.bak
channel ORA_AUX_DISK_1: piece
handle=/u02/backup/full_FONPETP_4tpa6hdh_1_1_20140606.bak
tag=TAG20140606T211007
channel ORA_AUX_DISK_1: restored backup
piece 1
channel ORA_AUX_DISK_1: restore
complete, elapsed time: 00:13:46
channel ORA_AUX_DISK_1: starting
datafile backup set restore
channel ORA_AUX_DISK_1: specifying
datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring
datafile 00002 to +DG_DATA
channel ORA_AUX_DISK_1: restoring
datafile 00005 to +DG_DATA
channel ORA_AUX_DISK_1: restoring
datafile 00007 to +DG_DATA
channel ORA_AUX_DISK_1: restoring
datafile 00008 to +DG_DATA
channel ORA_AUX_DISK_1: restoring
datafile 00010 to +DG_DATA
channel ORA_AUX_DISK_1: restoring
datafile 00011 to +DG_DATA
channel ORA_AUX_DISK_1: restoring
datafile 00012 to +DG_DATA
channel ORA_AUX_DISK_1: restoring
datafile 00015 to +DG_DATA
channel ORA_AUX_DISK_1: reading from
backup piece /u02/backup/full_FONPETP_4upa6hdh_1_1_20140606.bak
channel ORA_AUX_DISK_1: piece
handle=/u02/backup/full_FONPETP_4upa6hdh_1_1_20140606.bak
tag=TAG20140606T211007
channel ORA_AUX_DISK_1: restored backup
piece 1
channel ORA_AUX_DISK_1: restore
complete, elapsed time: 00:13:55
Finished restore at 07/06/2014 03:05:21
contents of Memory Script:
{
switch clone datafile all;
}
executing Memory Script
datafile 1 switched to datafile copy
input datafile copy RECID=16
STAMP=849582321 file name=+DG_DATA/fonpett/datafile/system.310.849580661
datafile 2 switched to datafile copy
input datafile copy RECID=17 STAMP=849582321
file name=+DG_DATA/fonpett/datafile/sysaux.261.849581489
datafile 3 switched to datafile copy
input datafile copy RECID=18
STAMP=849582321 file name=+DG_DATA/fonpett/datafile/undotbs1.309.849580663
datafile 4 switched to datafile copy
input datafile copy RECID=19
STAMP=849582321 file name=+DG_DATA/fonpett/datafile/users.306.849580663
datafile 5 switched to datafile copy
input datafile copy RECID=20
STAMP=849582321 file
name=+DG_DATA/fonpett/datafile/indic_fonpet_movim_01.303.849581487
datafile 6 switched to datafile copy
input datafile copy RECID=21
STAMP=849582321 file
name=+DG_DATA/fonpett/datafile/indic_fonpet_param.307.849580663
datafile 7 switched to datafile copy
input datafile copy RECID=22
STAMP=849582322 file
name=+DG_DATA/fonpett/datafile/indic_fonpet_movim.300.849581487
datafile 8 switched to datafile copy
input datafile copy RECID=23
STAMP=849582322 file
name=+DG_DATA/fonpett/datafile/indic_fonpet_movim_reorg0.262.849581489
datafile 9 switched to datafile copy
input datafile copy RECID=24
STAMP=849582322 file
name=+DG_DATA/fonpett/datafile/ts_fonpet_param.305.849580663
datafile 10 switched to datafile copy
input datafile copy RECID=25
STAMP=849582322 file name=+DG_DATA/fonpett/datafile/ts_fonpet_movim_01.304.849581487
datafile 11 switched to datafile copy
input datafile copy RECID=26
STAMP=849582322 file
name=+DG_DATA/fonpett/datafile/indic_fonpet_movim_02.301.849581487
datafile 12 switched to datafile copy
input datafile copy RECID=27
STAMP=849582322 file
name=+DG_DATA/fonpett/datafile/ts_fonpet_movim_02.264.849581487
datafile 13 switched to datafile copy
input datafile copy RECID=28
STAMP=849582322 file name=+DG_DATA/fonpett/datafile/ts_fonpet_rep.308.849580663
datafile 14 switched to datafile copy
input datafile copy RECID=29
STAMP=849582322 file
name=+DG_DATA/fonpett/datafile/ts_fonpet_movim.263.849580661
datafile 15 switched to datafile copy
input datafile copy RECID=30
STAMP=849582322 file
name=+DG_DATA/fonpett/datafile/ts_fonpet_movim.302.849581487
contents of Memory Script:
{
set until scn 75254117;
recover
clone database
delete archivelog
;
}
executing Memory Script
executing command: SET until clause
Starting recover at 07/06/2014 03:05:23
using channel ORA_AUX_DISK_1
starting media recovery
channel ORA_AUX_DISK_1: starting
archived log restore to default destination
channel ORA_AUX_DISK_1: restoring
archived log
archived log thread=1 sequence=4539
channel ORA_AUX_DISK_1: reading from
backup piece /u02/backup/archivelog_FONPETP_50pa6ijh_1_1_20140606.bak
channel ORA_AUX_DISK_1: piece
handle=/u02/backup/archivelog_FONPETP_50pa6ijh_1_1_20140606.bak
tag=TAG20140606T213022
channel ORA_AUX_DISK_1: restored backup
piece 1
channel ORA_AUX_DISK_1: restore
complete, elapsed time: 00:00:07
archived log file
name=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/arch1_4539_838067579.dbf
thread=1 sequence=4539
channel clone_default: deleting archived
log(s)
archived log file
name=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/arch1_4539_838067579.dbf
RECID=1 STAMP=849582327
media recovery complete, elapsed time:
00:00:02
Finished recover at 07/06/2014 03:05:33
Oracle instance started
Total System Global Area 3206836224 bytes
Fixed Size 2232640 bytes
Variable Size 671092416 bytes
Database Buffers 2516582400 bytes
Redo Buffers 16928768 bytes
contents of Memory Script:
{
sql clone "alter system set
db_name =
''FONPETT'' comment=
''Reset to original value by RMAN''
scope=spfile";
sql clone "alter system reset
db_unique_name scope=spfile";
shutdown clone immediate;
startup clone nomount;
}
executing Memory Script
sql statement: alter system set db_name =
''FONPETT'' comment= ''Reset to original value by RMAN'' scope=spfile
sql statement: alter system reset db_unique_name scope=spfile
Oracle instance shut down
connected to auxiliary database (not
started)
Oracle instance started
Total System Global Area 3206836224 bytes
Fixed Size 2232640 bytes
Variable Size 671092416 bytes
Database Buffers 2516582400 bytes
Redo Buffers 16928768 bytes
sql statement: CREATE CONTROLFILE REUSE
SET DATABASE "FONPETT" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 2920
LOGFILE
GROUP 1 SIZE 50 M ,
GROUP 2 SIZE 50 M ,
GROUP 3 SIZE 50 M ,
GROUP 8 SIZE 50 M ,
GROUP 9 SIZE 50 M ,
GROUP 10 SIZE 50 M ,
GROUP 11 SIZE 50 M ,
GROUP 12 SIZE 50 M
DATAFILE
'+DG_DATA/fonpett/datafile/system.310.849580661'
CHARACTER SET WE8ISO8859P1
contents of Memory Script:
{
set newname for clone tempfile 1
to new;
switch clone tempfile all;
catalog clone datafilecopy
"+DG_DATA/fonpett/datafile/sysaux.261.849581489",
"+DG_DATA/fonpett/datafile/undotbs1.309.849580663",
"+DG_DATA/fonpett/datafile/users.306.849580663",
"+DG_DATA/fonpett/datafile/indic_fonpet_movim_01.303.849581487",
"+DG_DATA/fonpett/datafile/indic_fonpet_param.307.849580663",
"+DG_DATA/fonpett/datafile/indic_fonpet_movim.300.849581487",
"+DG_DATA/fonpett/datafile/indic_fonpet_movim_reorg0.262.849581489",
"+DG_DATA/fonpett/datafile/ts_fonpet_param.305.849580663",
"+DG_DATA/fonpett/datafile/ts_fonpet_movim_01.304.849581487",
"+DG_DATA/fonpett/datafile/indic_fonpet_movim_02.301.849581487",
"+DG_DATA/fonpett/datafile/ts_fonpet_movim_02.264.849581487",
"+DG_DATA/fonpett/datafile/ts_fonpet_rep.308.849580663",
"+DG_DATA/fonpett/datafile/ts_fonpet_movim.263.849580661",
"+DG_DATA/fonpett/datafile/ts_fonpet_movim.302.849581487";
switch clone datafile all;
}
executing Memory Script
executing command: SET NEWNAME
renamed tempfile 1 to +DG_DATA in
control file
cataloged datafile copy
datafile copy file
name=+DG_DATA/fonpett/datafile/sysaux.261.849581489 RECID=1 STAMP=849582366
cataloged datafile copy
datafile copy file
name=+DG_DATA/fonpett/datafile/undotbs1.309.849580663 RECID=2 STAMP=849582366
cataloged datafile copy
datafile copy file
name=+DG_DATA/fonpett/datafile/users.306.849580663 RECID=3 STAMP=849582366
cataloged datafile copy
datafile copy file
name=+DG_DATA/fonpett/datafile/indic_fonpet_movim_01.303.849581487 RECID=4
STAMP=849582366
cataloged datafile copy
datafile copy file
name=+DG_DATA/fonpett/datafile/indic_fonpet_param.307.849580663 RECID=5
STAMP=849582366
cataloged datafile copy
datafile copy file
name=+DG_DATA/fonpett/datafile/indic_fonpet_movim.300.849581487 RECID=6
STAMP=849582366
cataloged datafile copy
datafile copy file
name=+DG_DATA/fonpett/datafile/indic_fonpet_movim_reorg0.262.849581489 RECID=7
STAMP=849582366
cataloged datafile copy
datafile copy file
name=+DG_DATA/fonpett/datafile/ts_fonpet_param.305.849580663 RECID=8
STAMP=849582366
cataloged datafile copy
datafile copy file
name=+DG_DATA/fonpett/datafile/ts_fonpet_movim_01.304.849581487 RECID=9
STAMP=849582366
cataloged datafile copy
datafile copy file
name=+DG_DATA/fonpett/datafile/indic_fonpet_movim_02.301.849581487 RECID=10
STAMP=849582366
cataloged datafile copy
datafile copy file
name=+DG_DATA/fonpett/datafile/ts_fonpet_movim_02.264.849581487 RECID=11
STAMP=849582366
cataloged datafile copy
datafile copy file
name=+DG_DATA/fonpett/datafile/ts_fonpet_rep.308.849580663 RECID=12
STAMP=849582366
cataloged datafile copy
datafile copy file
name=+DG_DATA/fonpett/datafile/ts_fonpet_movim.263.849580661 RECID=13
STAMP=849582366
cataloged datafile copy
datafile copy file
name=+DG_DATA/fonpett/datafile/ts_fonpet_movim.302.849581487 RECID=14
STAMP=849582366
datafile 2 switched to datafile copy
input datafile copy RECID=1
STAMP=849582366 file name=+DG_DATA/fonpett/datafile/sysaux.261.849581489
datafile 3 switched to datafile copy
input datafile copy RECID=2
STAMP=849582366 file name=+DG_DATA/fonpett/datafile/undotbs1.309.849580663
datafile 4 switched to datafile copy
input datafile copy RECID=3
STAMP=849582366 file name=+DG_DATA/fonpett/datafile/users.306.849580663
datafile 5 switched to datafile copy
input datafile copy RECID=4
STAMP=849582366 file
name=+DG_DATA/fonpett/datafile/indic_fonpet_movim_01.303.849581487
datafile 6 switched to datafile copy
input datafile copy RECID=5
STAMP=849582366 file name=+DG_DATA/fonpett/datafile/indic_fonpet_param.307.849580663
datafile 7 switched to datafile copy
input datafile copy RECID=6
STAMP=849582366 file
name=+DG_DATA/fonpett/datafile/indic_fonpet_movim.300.849581487
datafile 8 switched to datafile copy
input datafile copy RECID=7
STAMP=849582366 file
name=+DG_DATA/fonpett/datafile/indic_fonpet_movim_reorg0.262.849581489
datafile 9 switched to datafile copy
input datafile copy RECID=8
STAMP=849582366 file
name=+DG_DATA/fonpett/datafile/ts_fonpet_param.305.849580663
datafile 10 switched to datafile copy
input datafile copy RECID=9
STAMP=849582366 file
name=+DG_DATA/fonpett/datafile/ts_fonpet_movim_01.304.849581487
datafile 11 switched to datafile copy
input datafile copy RECID=10
STAMP=849582366 file name=+DG_DATA/fonpett/datafile/indic_fonpet_movim_02.301.849581487
datafile 12 switched to datafile copy
input datafile copy RECID=11
STAMP=849582366 file
name=+DG_DATA/fonpett/datafile/ts_fonpet_movim_02.264.849581487
datafile 13 switched to datafile copy
input datafile copy RECID=12
STAMP=849582366 file name=+DG_DATA/fonpett/datafile/ts_fonpet_rep.308.849580663
datafile 14 switched to datafile copy
input datafile copy RECID=13
STAMP=849582366 file
name=+DG_DATA/fonpett/datafile/ts_fonpet_movim.263.849580661
datafile 15 switched to datafile copy
input datafile copy RECID=14
STAMP=849582366 file
name=+DG_DATA/fonpett/datafile/ts_fonpet_movim.302.849581487
Reenabling controlfile options for
auxiliary database
Executing: alter database force logging
contents of Memory Script:
{
Alter clone database open resetlogs;
}
executing Memory Script
database opened
Finished Duplicate Db at 07/06/2014
03:06:20
Recovery
Manager complete.
SQL> SET LINES 1000
SQL> SET PAGES 1000
SQL> COL DETALLE FORMAT A40
SQL> COL STATUS FORMAT A18
SQL> COL HORAS FORMAT 99.9
SQL> COL MB/SEC FORMAT 999
SQL> COL TIME FORMAT A11
SQL> COL FILENAME FORMAT A60
SQL> COMPUTE SUM OF TOTMB ON TYPE
SQL> COMPUTE SUM OF MB ON TYPE
SQL> COL SID FORMAT 99999
SQL> BREAK ON TYPE SKIP 1
SQL> COL DETALLE NOPRINT
SQL> SELECT B.TYPE, S.STATUS ||'/'|| DECODE(B.STATUS,'UNKNOWN','',B.STATUS)
STATUS, TO_CHAR(CLOSE_TIME, 'MM/DD HH:MI') AS TIME, S.SID,
S.OSUSER||'@'||S.MACHINE||'/'||S.terminal||'->'||SUBSTR(S.PROGRAM,1,INSTR(S.PROGRAM,'
')) AS DETALLE,
ROUND(TOTAL_BYTES/1024/1024) TOTMB, ROUND(BYTES/1024/1024) MB,
ROUND((ELAPSED_TIME)/60/60/24,1) AS HORAS,
ROUND(EFFECTIVE_BYTES_PER_SECOND/1024/1024) AS "MB/SEC",
substr(FILENAME,(instr(FILENAME,'/',-1,1)+1),length(FILENAME)) FILENAME
FROM V$BACKUP_ASYNC_IO B, V$SESSION S
--FROM V$BACKUP_SYNC_IO B, V$SESSION S
WHERE B.SID = S.SID
--AND S.SID=1138
AND (B.TYPE = 'AGGREGATE' OR B.IO_COUNT != 0)
ORDER BY 1, CLOSE_TIME;
TYPE
STATUS TIME SID
TOTMB MB HORAS MB/SEC FILENAME
--------- ------------------ -----------
------ ------ ----- ----- ------ --------------------------------------------
AGGREGATE ACTIVE/ 06/07 02:37 469 21
.0 21
ACTIVE/ 06/07
02:51 469 36755
1.0 45
ACTIVE/
469 13707
********* ------
-----
sum
50483
INPUT
ACTIVE/FINISHED 06/07
02:37 469 21
.0 7
controlfile_c-2150325182-20140606-00.bak
ACTIVE/FINISHED 06/07
02:37 469 21
.0 control01.ctl
INACTIVE/FINISHED 06/07
02:37 5 1
.0 archivelog_FONPETP_50pa6ijh_1_1_20140606.bak
INACTIVE/FINISHED 06/07
02:37 5 1
.0
full_FONPETP_4upa6hdh_1_1_20140606.bak
INACTIVE/FINISHED 06/07
02:37 5 1
.0
full_FONPETP_4tpa6hdh_1_1_20140606.bak
ACTIVE/FINISHED 06/07
02:51 469 5101
1.0 6
full_FONPETP_4tpa6hdh_1_1_20140606.bak
ACTIVE/IN PROGRESS
469 1662 full_FONPETP_4upa6hdh_1_1_20140606.bak
********* ------ -----
sum
6808
OUTPUT
ACTIVE/FINISHED 06/07
02:37 469 21
21 .0 21 control01.ctl
ACTIVE/FINISHED 06/07
02:37 469 1024
1024 .0 85
ts_fonpet_rep.308.849580663
ACTIVE/FINISHED 06/07
02:38 469 1024
1024 .0 37 undotbs1.309.849580663
ACTIVE/FINISHED 06/07
02:38 469 100
100 .0 3 ts_fonpet_param.305.849580663
ACTIVE/FINISHED 06/07
02:38 469 179
179 .0 5 users.306.849580663
ACTIVE/FINISHED 06/07
02:38 469 567
567 .1 12 indic_fonpet_param.307.849580663
ACTIVE/FINISHED 06/07
02:39 469 1134
1134 .1 13 system.310.849580661
ACTIVE/FINISHED 06/07
02:51 469 32728 32728
1.0 40
ts_fonpet_movim.263.849580661
ACTIVE/IN PROGRESS
469 1894 1226 sysaux.261.849581489
ACTIVE/IN PROGRESS 469
2500 1876
indic_fonpet_movim_reorg0.262.849581489
ACTIVE/IN PROGRESS
469 3000 1226 ts_fonpet_movim_02.264.849581487
ACTIVE/IN PROGRESS
469 3303 2822 indic_fonpet_movim.300.849581487
ACTIVE/IN PROGRESS
469 5000 1226 ts_fonpet_movim.302.849581487
ACTIVE/IN PROGRESS
469 5064 2569 indic_fonpet_movim_01.303.849581487
ACTIVE/IN PROGRESS
469 8334 1226 ts_fonpet_movim_01.304.849581487
ACTIVE/IN PROGRESS
469 4908 1535
indic_fonpet_movim_02.301.849581487
********* ------ -----
sum
70780 50483
16 rows selected.
SQL> SELECT OPNAME,
lpad(trunc(TIME_REMAINING/60),2,'0')||':'||lpad(((TIME_REMAINING/60)-trunc(TIME_REMAINING/60))*60,2,'0')
time
FROM V$SESSION_LONGOPS
WHERE SOFAR <> TOTALWORK;
OPNAME
TIME
----------------------------------------------------------------
-----------
RMAN: full datafile restore 08:45
RMAN:
aggregate input :
Una vez
finalizado el proceso de clonación se procede a validar el nombre de la base de
datos y el estado de los archivos de datos
[oracle@bdpruebas ~]$ . oraenv
ORACLE_SID = [fonpett] ? fonpett
The Oracle base remains unchanged with
value /u01/app/oracle
[oracle@bdpruebas ~]$ sqlplus dba_fonpet as sysdba
SQL*Plus: Release 11.2.0.3.0 Production
on Sat Jun 7 03:07:22 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Release 11.2.0.3.0 -
64bit Production
With the Automatic Storage Management
option
SYS@fonpett> show parameter db_name
NAME TYPE VALUE
------------------------------------
----------- ------------------------------
db_name string FONPETT
SYS@fonpett> show parameter db_unique_name
NAME TYPE VALUE
------------------------------------
----------- ------------------------------
db_unique_name string FONPETT
SYS@fonpett> show parameter instance_name
NAME TYPE VALUE
------------------------------------
----------- ------------------------------
instance_name string fonpett
SYS@fonpett> set lines 1000 pages 1000 trimspool on
SYS@fonpett> col name format a70
SYS@fonpett> select name, bytes, status from v$datafile;
NAME
BYTES STATUS
----------------------------------------------------------------------
---------- -------
+DG_DATA/fonpett/datafile/system.310.849580661 1189085184 SYSTEM
+DG_DATA/fonpett/datafile/sysaux.261.849581489 1986002944 ONLINE
+DG_DATA/fonpett/datafile/undotbs1.309.849580663 1073741824 ONLINE
+DG_DATA/fonpett/datafile/users.306.849580663 187432960 ONLINE
+DG_DATA/fonpett/datafile/indic_fonpet_movim_01.303.849581487 5309988864 ONLINE
+DG_DATA/fonpett/datafile/indic_fonpet_param.307.849580663 594214912 ONLINE
+DG_DATA/fonpett/datafile/indic_fonpet_movim.300.849581487 3463774208 ONLINE
+DG_DATA/fonpett/datafile/indic_fonpet_movim_reorg0.262.849581489 2621440000 ONLINE
+DG_DATA/fonpett/datafile/ts_fonpet_param.305.849580663 104857600 ONLINE
+DG_DATA/fonpett/datafile/ts_fonpet_movim_01.304.849581487 8738701312 ONLINE
+DG_DATA/fonpett/datafile/indic_fonpet_movim_02.301.849581487 5146411008 ONLINE
+DG_DATA/fonpett/datafile/ts_fonpet_movim_02.264.849581487 3145728000 ONLINE
+DG_DATA/fonpett/datafile/ts_fonpet_rep.308.849580663 1073741824 ONLINE
+DG_DATA/fonpett/datafile/ts_fonpet_movim.263.849580661 3.4318E+10 ONLINE
+DG_DATA/fonpett/datafile/ts_fonpet_movim.302.849581487 5242880000 ONLINE
15
rows selected.
No hay comentarios:
Publicar un comentario