rman duplicate建立異地auxiliary Database oracle_11g oracle_sid相同
rman duplicate
環境
oracle11g redhat6.5
主庫10.8.98.103 oratest001
從庫10.8.98.104 oratest002
主庫oracle_id test103 從庫只安裝了資料庫軟體
為了方便我這邊把備庫也設計為oracle_sid 為test103
即主庫和備庫環境變數一樣
[oracle@oratest002 ~]$ cat .bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin export PATH # Oracle Settings oracle TMP=/tmp; export TMP TMPDIR=$TMP; export TMPDIR export ORACLE_BASE=/oracle/app/oracle; export ORACLE_BASE ORACLE_HOME=$ORACLE_BASE/product/11.2.0; export ORACLE_HOME ORACLE_SID=test103; export ORACLE_SID ORACLE_TERM=xterm; export ORACLE_TERM PATH=/usr/sbin:$PATH; export PATH PATH=$ORACLE_HOME/bin:$PATH; export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANG if [ $USER = "oracle" ] || [ $USER = "grid" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi umask 022 fi
一、主庫修改為靜態監聽,並配置tnsnames.ora
[oracle@oratest001 admin]$ cat listener.ora # listener.ora Network Configuration File: /oracle/app/oracle/product/11.2.0/network/admin/listener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = test103) (ORACLE_HOME = /oracle/app/oracle/product/11.2.0) (SID_NAME = test103)) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.8.98.103)(PORT = 1521)) (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) ) ) ADR_BASE_LISTENER = /oracle/app/oracle [oracle@oratest001 admin]$ cat tnsnames.ora # tnsnames.ora Network Configuration File: /oracle/app/oracle/product/11.2.0/network/admin/tnsnames.ora # Generated by Oracle configuration tools. TEST103 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.8.98.103)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = test103) ) ) TEST104 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.8.98.104)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = test103) ) )
二、備庫修改為靜態監聽,並配置tnsnames.ora
[oracle@oratest002 admin]$ cat listener.ora # listener.ora Network Configuration File: /oracle/app/oracle/product/11.2.0/network/admin/listener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = test103) (ORACLE_HOME = /oracle/app/oracle/product/11.2.0) (SID_NAME = test103)) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.8.98.104)(PORT = 1521)) (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) ) ) ADR_BASE_LISTENER = /oracle/app/oracle [oracle@oratest002 admin]$ cat tnsnames.ora # tnsnames.ora Network Configuration File: /oracle/app/oracle/product/11.2.0/network/admin/tnsnames.ora # Generated by Oracle configuration tools. TEST103 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.8.98.103)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = test103) ) ) TEST104 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.8.98.104)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = test103) ) )
四、主庫往備庫copy引數檔案和密碼檔案
[oracle@oratest001 dbs]$ pwd /oracle/app/oracle/product/11.2.0/dbs [oracle@gacoratest001 dbs]$ scp tnsnames.ora listener.ora 10.8.98.104:/oracle/app/oracle/product/11.2.0/network/admin
在備庫上修改引數檔案
[oracle@oratest002 dbs]$ cat inittest103.ora *.audit_file_dest='/oracle/app/oracle/admin/test103/adump' *.audit_trail='db' *.compatible='11.2.0.4.0' *.control_files='/oracle/app/oracle/oradata/test103/control01.ctl','/oracle/app/oracle/oradata/test103/control02.ctl' *.db_block_size=8192 *.db_domain='' *.db_name='test103' *.diagnostic_dest='/oracle/app/oracle' *.dispatchers='(PROTOCOL=TCP) (SERVICE=test103XDB)' *.memory_target=4120903680 *.open_cursors=300 *.processes=150 *.remote_login_passwordfile='EXCLUSIVE' *.undo_tablespace='UNDOTBS1'
並建立相應的目錄
mkdir -p /oracle/app/oracle/admin/test103/adump mkdir -p /oracle/app/oracle/oradata/test103/
五、備庫啟動到nomount狀態,主庫open並且需要是歸檔模式
六、重啟監聽,並在主備庫測試tnsping。
主庫
[oracle@oratest001 admin]$ lsnrctl stop [oracle@oratest001 admin]$ lsnrctl start [oracle@oratest001 admin]$ tnsping test103 [oracle@oratest001 admin]$ tnsping test104
備庫同樣的操作,確保tnsping正確
七、在主庫上操作rman duplicate
[oracle@gacoratest001 dbs]$ rman target sys/oracle@test103 auxiliary sys/oracle@test104 Recovery Manager: Release 11.2.0.4.0 - Production on Sat Aug 21 12:17:32 2021 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to target database: TEST103 (DBID=333915497) connected to auxiliary database: TEST103 (not mounted) RMAN> duplicate target database to test103 from active database nofilenamecheck;
此處備庫就會開啟了
contents of Memory Script: { Alter clone database open resetlogs; } executing Memory Script database opened Finished Duplicate Db at 2021-08-21 12:18:55 RMAN>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/70004783/viewspace-2788060/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- rman duplicate建立異地auxiliary Database oracle_11g oracle_sid不同UXDatabaseOracle
- RMAN duplicate databaseDatabase
- 通過rman duplicate database!Database
- RMAN 6217 not connected to auxiliary database with a net service nameUXDatabase
- 【RMAN】RMAN-05001: auxiliary filename conflicts with the target databaseUXDatabase
- RMAN duplicate database到新主機Database
- 11g RMAN新特性active database duplicate 資料庫異構Database資料庫
- 使用RMAN DUPLICATE...FROM ACTIVE DATABASE命令來建立DataGuard物理備庫Database
- Oracle 11g Rman Active database duplicateOracleDatabase
- Duplicate Database from ASM to Non- ASM Database Using RMANDatabaseASM
- Oracle11g RMAN Duplicate from Active DatabaseOracleDatabase
- Duplicating Database using RMAN duplicate commandDatabase
- oracle實驗記錄Rman duplicate database(1)OracleDatabase
- oracle實驗記錄Rman duplicate database 2OracleDatabase
- RMAN DUPLICATE建立DataGuard物理備庫
- 使用RMAN建立Duplicate資料庫資料庫
- 【轉】RMAN建立duplicate資料庫資料庫
- 11g rman新特性 duplicate target database for standby from active databaseDatabase
- RMAN duplicate from active database 複製資料庫Database資料庫
- RMAN 'Duplicate Database' Feature in 11G [ID 452868.1]Database
- 使用 RMAN DUPLICATE...FROM ACTIVE DATABASE 建立物理備用資料庫的分步指南Database資料庫
- RMAN duplicate 建立standby RAC資料庫資料庫
- RMAN學習筆記_ Duplicate建立DataGuard筆記
- 使用oracle 11g rman新特性 duplicate target database for standby from active database 建立物理dataguard並開啟RealOracleDatabase
- duplicate databaseDatabase
- Performing duplicate database with ASM/OMF/RMAN (Doc ID 340848.1)ORMDatabaseASM
- RMAN Duplicate Database From RAC ASM To RAC ASM [ID 461479.1]DatabaseASM
- To use Rman to duplicate database be careful of db_file_name_convertDatabase
- RMAN-04006: error from auxiliary database: ORA-01034: ORACLE not availableErrorUXDatabaseOracleAI
- 11gR2中使用duplicate建立physical standby (從rman備份或從active database)Database
- rman duplicate target database RMAN-03002 RMAN-03015 RMAN-06136Database
- Creating a Physical Standby using RMAN DUPLICATE FROM ACTIVE DATABASEDatabase
- Oracle 11g Data Guard 使用 duplicate from active database 建立 standby databaseOracleDatabase
- Oracle 11g Data Guard 使用duplicate from active database 建立 standby databaseOracleDatabase
- 通過RMAN Duplicate建立Oracle物理standby備庫Oracle
- RMAN異地恢復實戰
- RMAN-04006: error from auxiliary database: ORA-01017: invalid username/password;ErrorUXDatabase
- 使用rman建立standby database的過程Database