11GR2 Active Duplicate過程(單例項對單例項)
兩臺虛擬機器IP分別是192.168.13.128, 192.168.13.129, 源端service_name: test01, 目標端service_name:dup01
1. SOURCE端與TARGET端都要有相同的目錄結構, 在目標端建立所需的目錄結構
mkdir -p /u01/app/oracle/fast_recovery_area/dup01
mkdir -p /u01/app/oracle/oradata/dup01/
mkdir -p
/u01/app/oracle/admin/dup01/adump
2. 將源端的密碼檔案$ORACLE_HOME/dbs/orapwtest01拷貝至目標端$ORACLE_HOME/dbs/, 改名
scp oracle@192.168.13.128:/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwtest01 /u01/app/oracle/product/11.2.0/dbhome_1/dbs
mv /u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwtest01 /u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwdup01
3. 建立pfile, $ORACLE_HOME/dbs/initdup01.ora, 內容很簡單:
db_name=dup01
4. active需要靜態監聽, listener.ora檔案內容
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(
SID_DESC =
(GLOBAL_DBNAME = test01)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = test01)
)
(SID_DESC =
(GLOBAL_DBNAME = dup01)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = dup01)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = /u01/app/oracle
5. 源端配置兩個TNS(tnsnames.ora):
TEST01 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = test01)
)
)
dup01 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.13.129)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = dup01)
)
)
6. 將目標端啟動至nomount狀態
7.源端登入:
rman
target sys/sys@test01 auxiliary sys/sys@dup01
DUPLICATE
DATABASE TO dup01 FROM ACTIVE DATABASE SPFILE NOFILENAMECHECK;
如果沒出現問題,就可以看到如下輸出:
此處省略若干行....
sql statement: alter system set db_name = ''DUP01'' 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 835104768 bytes
Fixed Size 2257840 bytes
Variable Size 541068368 bytes
Database Buffers 285212672 bytes
Redo Buffers 6565888 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "DUP01" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 SIZE 50 M ,
GROUP 2 SIZE 50 M ,
GROUP 3 SIZE 50 M
DATAFILE
'/u01/app/oracle/oradata/test01/system01.dbf'
CHARACTER SET ZHS16GBK
contents of Memory Script:
{
set newname for tempfile 1 to
"/u01/app/oracle/oradata/test01/temp01.dbf";
switch clone tempfile all;
catalog clone datafilecopy "/u01/app/oracle/oradata/test01/sysaux01.dbf",
"/u01/app/oracle/oradata/test01/undotbs01.dbf",
"/u01/app/oracle/oradata/test01/users01.dbf",
"/u01/app/oracle/oradata/test01/example01.dbf";
switch clone datafile all;
}
executing Memory Script
executing command: SET NEWNAME
renamed tempfile 1 to /u01/app/oracle/oradata/test01/temp01.dbf in control file
cataloged datafile copy
datafile copy file name=/u01/app/oracle/oradata/test01/sysaux01.dbf RECID=1 STAMP=899163477
cataloged datafile copy
datafile copy file name=/u01/app/oracle/oradata/test01/undotbs01.dbf RECID=2 STAMP=899163477
cataloged datafile copy
datafile copy file name=/u01/app/oracle/oradata/test01/users01.dbf RECID=3 STAMP=899163477
cataloged datafile copy
datafile copy file name=/u01/app/oracle/oradata/test01/example01.dbf RECID=4 STAMP=899163477
datafile 2 switched to datafile copy
input datafile copy RECID=1 STAMP=899163477 file name=/u01/app/oracle/oradata/test01/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=2 STAMP=899163477 file name=/u01/app/oracle/oradata/test01/undotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=3 STAMP=899163477 file name=/u01/app/oracle/oradata/test01/users01.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=4 STAMP=899163477 file name=/u01/app/oracle/oradata/test01/example01.dbf
contents of Memory Script:
{
Alter clone database open resetlogs;
}
executing Memory Script
database opened
Finished Duplicate Db at 23-DEC-15
RMAN> quit
Recovery Manager complete.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8520577/viewspace-1877360/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- RAC 例項 遷移到 單例項 -- 使用RMAN Duplicate單例
- 單例項的duplicate(non ASM)單例ASM
- mysql 儲存過程簡單例項MySql儲存過程單例
- mysql儲存過程簡單例項MySql儲存過程單例
- duplicate搭建DG最大效能(rac-單例項)單例
- 單例項刪除ASM例項單例ASM
- Oracle 11g RAC 配置單例項 DataGuard(通過 DUPLICATE 方式)Oracle單例
- 單例與單例項之爭單例
- duplicate複製資料庫(rac-單例項)資料庫單例
- Spring 原始碼學習 - 單例bean的例項化過程Spring原始碼單例Bean
- websocket簡單例項Web單例
- JavaScript單例模式概念與例項JavaScript單例模式
- 單例模式 - 只有一個例項單例模式
- ORACLE 11gR2 單例項資料庫自啟Oracle單例資料庫
- 配置Oracle單例項隨機啟動(11gR2)Oracle單例隨機
- PHP 完整表單例項PHP單例
- 5.6單例項安裝單例
- RAC起單例項make單例
- oracle單例項轉RACOracle單例
- Redis單例項安裝Redis單例
- php對mysql簡單讀取的例項PHPMySql
- 【DG】在Linux平臺上搭建單例項的dataguard--duplicateLinux單例
- js選項卡簡單程式碼例項JS
- opengl簡單入門例項
- RAC+DG(asm單例項)ASM單例
- rac恢復到單例項單例
- Vue單檔案模板例項Vue
- javascript事件冒泡簡單例項JavaScript事件單例
- Spark 簡單例項(基本操作)Spark單例
- mysql 5.7單例項安裝MySql單例
- javascript this用法和簡單例項JavaScript單例
- 搭建RAC到單例項DG單例
- 單例項恢復至RAC單例
- zabbix監控單例項redis單例Redis
- oracle單例項通過dataguard遷移到RAC 轉Oracle單例
- 使用點陣圖選單項——點陣圖選單項例項 (轉)
- 單例項和單點故障怎麼辦?單例
- canal同步mysql,監聽單例項,多例項配置MySql單例