基于RMAN的同机数据库克隆(七)

2014-11-24 09:05:57 · 作者: · 浏览: 3
ytes Variable Size 260049588 bytes Database Buffers 109051904 bytes Redo Buffers 6197248 bytes sql statement: alter system set db_name = ''SYBO5'' 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 376635392 bytes Fixed Size 1336652 bytes Variable Size 260049588 bytes Database Buffers 109051904 bytes Redo Buffers 6197248 bytes sql statement: CREATE CONTROLFILE REUSE SET DATABASE "SYBO5" RESETLOGS ARCHIVELOG -->注意这里,重新创建控制文件 MAXLOGFILES 16 MAXLOGMEMBERS 3 MAXDATAFILES 100 MAXINSTANCES 8 MAXLOGHISTORY 292 LOGFILE GROUP 1 ( '/u01/database/sybo5/redo/redo01a.log', '/u01/database/sybo5/redo/redo01b.log' ) SIZE 10 M , GROUP 2 ( '/u01/database/sybo5/redo/redo02a.log', '/u01/database/sybo5/redo/redo02b.log' ) SIZE 10 M , GROUP 3 ( '/u01/database/sybo5/redo/redo03a.log', '/u01/database/sybo5/redo/redo03b.log' ) SIZE 10 M DATAFILE '/u01/database/sybo5/oradata/system01.dbf' CHARACTER SET AL32UTF8 contents of Memory Script: { set newname for tempfile 1 to "/u01/database/sybo5/oradata/temp01.dbf"; switch clone tempfile all; catalog clone datafilecopy "/u01/database/sybo5/oradata/sysaux01.dbf", "/u01/database/sybo5/oradata/undotbs01.dbf", "/u01/database/sybo5/oradata/users01.dbf", "/u01/database/sybo5/oradata/example01.dbf"; switch clone datafile all; } executing Memory Script executing command: SET NEWNAME renamed tempfile 1 to /u01/database/sybo5/oradata/temp01.dbf in control file cataloged datafile copy datafile copy file name=/u01/database/sybo5/oradata/sysaux01.dbf RECID=1 STAMP=821716521 cataloged datafile copy datafile copy file name=/u01/database/sybo5/oradata/undotbs01.dbf RECID=2 STAMP=821716521 cataloged datafile copy datafile copy file name=/u01/database/sybo5/oradata/users01.dbf RECID=3 STAMP=821716521 cataloged datafile copy datafile copy file name=/u01/database/sybo5/oradata/example01.dbf RECID=4 STAMP=821716521 datafile 2 switched to datafile copy input datafile copy RECID=1 STAMP=821716521 file name=/u01/database/sybo5/oradata/sysaux01.dbf datafile 3 switched to datafile copy input datafile copy RECID=2 STAMP=821716521 file name=/u01/database/sybo5/oradata/undotbs01.dbf datafile 4 switched to datafile copy input datafile copy RECID=3 STAMP=821716521 file name=/u01/database/sybo5/oradata/users01.dbf datafile 5 switched to datafile copy input datafile copy RECID=4 STAMP=821716521 file name=/u01/database/sybo5/oradata/example01.dbf contents of Memory Script: { Alter clone database open resetlogs; } executing Memory Script database opened Finished Duplicate Db at 2013/07/25 14:35:36 --验证克隆的结果 [oracle@linux3 dbs]$ export ORACLE_SID=sybo5 [oracle@linux3 dbs]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.1.0 Production on Thu Jul 25 14:38:21 2013 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL>
select * from t; NAME ACTION ---------- ---------