11g rac standby asm---04
一.主庫與從庫的oracle版本必須一致﹐主庫必須設定為歸檔模式(從庫安裝oracle並建庫)
二.強制主庫為logging狀態
Alter database force logging;
三.在主庫與從庫中同時生成密碼檔案
以oracle使用者登陸
$rm $ORACLE_HOME/dbs/orapw$ORACLE_SID
$orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=oracle entries=4
或
wmrac01$pwd
/u01/product/oracle/11.2.0/db_1/dbs
wmrac01$ll
total 21084
-rw-rw---- 1 oracle asmadmin 1544 Mar 1 15:12 hc_ccptdb1.dat
-rw-r----- 1 oracle oinstall 39 Mar 1 17:12 initccptdb1.ora
-rw-r--r-- 1 oracle oinstall 2851 May 15 2009 init.ora
-rw-r----- 1 oracle oinstall 1536 Mar 9 10:05 orapwccptdb1
-rw-r----- 1 oracle asmadmin 21544960 May 6 17:37 snapcf_ccptdb1.f
wmrac01$scp orapwccptdb1 10.118.253.47://u01/product/oracle/11.2.0/db_1/dbs/orapwccptdb
四.在主庫與從庫中設定相應的環境變數
以oracle使用者登陸
主庫﹕
node1 .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
BASH_ENV=$HOME/.BASHRC
export BASH_ENV
export TEMP=/tmp
export TMPDIR=/tmp
PATH=$PATH:$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin
PATH=${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
PATH=${PATH}:/u01/product/common/oracle/bin
export PATH
export ORACLE_SID=ccptdb1
ORACLE_BASE=/u01/product/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/11.2.0/db_1; export ORACLE_HOME
ORACLE_TERM=vt100;export ORACLE_TERM
export PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib;export LD_LIBRARY_PATH
#GRID_BASE=/u01/product/grid/crs; export ORACLE_BASE
#GRID_HOME=/u01/product/grid/11.2.0; export ORACLE_HOME
#export PATH=$GRID_HOME/bin:$PATH
JAVA_HOME=/usr/local/java;export JAVA_HOME
CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATH
set -u
#PS1=`hostname`'$';export PS1
PS1=`hostname`'$';export PS1
EDITOR=/bin/vi; export EDITOR
alias ll='ls -l';
alias ls='ls --color';
alias his='history';
node2 .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
BASH_ENV=$HOME/.BASHRC
export BASH_ENV
export TEMP=/tmp
export TMPDIR=/tmp
PATH=$PATH:$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin
PATH=${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
PATH=${PATH}:/u01/product/common/oracle/bin
export PATH
export ORACLE_SID=ccptdb2
ORACLE_BASE=/u01/product/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/11.2.0/db_1; export ORACLE_HOME
ORACLE_TERM=vt100;export ORACLE_TERM
export PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib;export LD_LIBRARY_PATH
#GRID_BASE=/u01/product/grid/crs; export ORACLE_BASE
#GRID_HOME=/u01/product/grid/11.2.0; export ORACLE_HOME
#export PATH=$GRID_HOME/bin:$PATH
JAVA_HOME=/usr/local/java;export JAVA_HOME
CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATH
set -u
#PS1=`hostname`'$';export PS1
PS1=`hostname`'$';export PS1
EDITOR=/bin/vi; export EDITOR
alias ll='ls -l';
alias ls='ls --color';
alias his='history';
備庫﹕
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
BASH_ENV=$HOME/.BASHRC
export BASH_ENV
export TEMP=/tmp
export TMPDIR=/tmp
PATH=$PATH:$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin
PATH=${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
PATH=${PATH}:/u01/product/common/oracle/bin
export PATH
export ORACLE_SID=ccptdb
ORACLE_BASE=/u01/product/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/11.2.0/db_1; export ORACLE_HOME
ORACLE_TERM=vt100;export ORACLE_TERM
export PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib;export LD_LIBRARY_PATH
#GRID_BASE=/u01/product/grid/crs; export ORACLE_BASE
#GRID_HOME=/u01/product/grid/11.2.0; export ORACLE_HOME
#export PATH=$GRID_HOME/bin:$PATH
JAVA_HOME=/usr/local/java;export JAVA_HOME
CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATH
set -u
#PS1=`hostname`'$';export PS1
PS1=`hostname`'$';export PS1
EDITOR=/bin/vi; export EDITOR
alias ll='ls -l';
alias ls='ls --color';
alias his='history';
五.主庫與從庫建立引數檔案
在主庫中生成pfile
$sqlplus ‘/as sysdba’
Create pfile=’/home/oracle/pfile.ora’ from spfile;
1. node1 pfile.ora
ccptdb1.__db_cache_size=4898947072
ccptdb2.__db_cache_size=5301600256
ccptdb1.__java_pool_size=67108864
ccptdb2.__java_pool_size=67108864
ccptdb1.__large_pool_size=67108864
ccptdb2.__large_pool_size=67108864
ccptdb1.__oracle_base='/u01/product/oracle'#ORACLE_BASE set from environment
ccptdb2.__oracle_base='/u01/product/grid/crs'#ORACLE_BASE set from environment
ccptdb1.__pga_aggregate_target=17381195776
ccptdb2.__pga_aggregate_target=16710107136
ccptdb1.__sga_target=9126805504
ccptdb2.__sga_target=9529458688
ccptdb1.__shared_io_pool_size=0
ccptdb2.__shared_io_pool_size=0
ccptdb1.__shared_pool_size=3758096384
ccptdb2.__shared_pool_size=3892314112
ccptdb1.__streams_pool_size=134217728
ccptdb2.__streams_pool_size=0
*.archive_lag_target=1800
ccptdb1.archive_lag_target=1800
ccptdb2.archive_lag_target=1800
*.audit_file_dest='/u01/product/oracle/admin/ccptdb/adump'
*.audit_trail='db'
*.cluster_database=true
*.compatible='11.2.0.0.0'
*.control_files='+DATA/ccptdb/control01.ctl','+DATA/ccptdb/control02.ctl'
*.db_block_size=16384
*.db_domain=''
*.db_name='ccptdb'
*.db_recovery_file_dest='+DATA'
*.db_recovery_file_dest_size=5218762752
*.diagnostic_dest='/u01/product/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=ccptdbXDB)'
ccptdb1.fal_client='CCPTDB1'
ccptdb2.fal_client='CCPTDB2'
*.fal_server='CCPTDBDG'
ccptdb1.instance_number=1
ccptdb2.instance_number=2
*.log_archive_config='DG_CONFIG=(ccptdb,ccptdbdg)'
*.log_archive_dest_1='LOCATION=+data VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=ccptdb'
*.log_archive_dest_2='SERVICE=ccptdbdg LGWR SYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ccptdbdg'
*.log_archive_format='%t_%s_%r.arc'
*.memory_target=26214400000
*.nls_sort='SCHINESE_PINYIN_M'
*.open_cursors=1000
*.processes=1000
*.remote_listener='wmscan:1521'
*.remote_login_passwordfile='exclusive'
*.sessions=1105
ccptdb2.thread=2
ccptdb1.thread=1
ccptdb2.undo_tablespace='UNDOTBS2'
ccptdb1.undo_tablespace='UNDOTBS1'
2. node2 pfile.ora
ccptdb1.__db_cache_size=4898947072
ccptdb2.__db_cache_size=5301600256
ccptdb1.__java_pool_size=67108864
ccptdb2.__java_pool_size=67108864
ccptdb1.__large_pool_size=67108864
ccptdb2.__large_pool_size=67108864
ccptdb1.__oracle_base='/u01/product/oracle'#ORACLE_BASE set from environment
ccptdb2.__oracle_base='/u01/product/grid/crs'#ORACLE_BASE set from environment
ccptdb1.__pga_aggregate_target=17381195776
ccptdb2.__pga_aggregate_target=16710107136
ccptdb1.__sga_target=9126805504
ccptdb2.__sga_target=9529458688
ccptdb1.__shared_io_pool_size=0
ccptdb2.__shared_io_pool_size=0
ccptdb1.__shared_pool_size=3758096384
ccptdb2.__shared_pool_size=3892314112
ccptdb1.__streams_pool_size=134217728
ccptdb2.__streams_pool_size=0
*.archive_lag_target=1800
ccptdb1.archive_lag_target=1800
ccptdb2.archive_lag_target=1800
*.audit_file_dest='/u01/product/oracle/admin/ccptdb/adump'
*.audit_trail='db'
*.cluster_database=true
*.compatible='11.2.0.0.0'
*.control_files='+DATA/ccptdb/control01.ctl','+DATA/ccptdb/control02.ctl'
*.db_block_size=16384
*.db_domain=''
*.db_name='ccptdb'
*.db_recovery_file_dest='+DATA'
*.db_recovery_file_dest_size=5218762752
*.diagnostic_dest='/u01/product/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=ccptdbXDB)'
ccptdb1.fal_client='CCPTDB1'
ccptdb2.fal_client='CCPTDB2'
*.fal_server='CCPTDBDG'
ccptdb1.instance_number=1
ccptdb2.instance_number=2
*.log_archive_config='DG_CONFIG=(ccptdb,ccptdbdg)'
*.log_archive_dest_1='LOCATION=+data VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=ccptdb'
*.log_archive_dest_2='SERVICE=ccptdbdg LGWR SYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ccptdbdg'
*.log_archive_format='%t_%s_%r.arc'
*.memory_target=26214400000
*.nls_sort='SCHINESE_PINYIN_M'
*.open_cursors=1000
*.processes=1000
*.remote_listener='wmscan:1521'
*.remote_login_passwordfile='exclusive'
*.sessions=1105
ccptdb2.thread=2
ccptdb1.thread=1
ccptdb2.undo_tablespace='UNDOTBS2'
ccptdb1.undo_tablespace='UNDOTBS1'
注意主庫設定﹕
ALTER SYSTEM SET LOG_ARCHIVE_CONFIG='DG_CONFIG=(ccptdb,ccptdbdg)';
alter system set log_archive_dest_1='LOCATION=+data VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=ccptdb';
alter system set log_archive_dest_2='SERVICE=ccptdbdg LGWR SYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ccptdbdg';
ALTER SYSTEM SET FAL_CLIENT = ccptdb1 sid='ccptdb1';
ALTER SYSTEM SET FAL_CLIENT = ccptdb2 sid='ccptdb2';
ALTER SYSTEM SET FAL_SERVER = ccptdbdg;
3. DG pfile.ora
ccptdb.__db_cache_size=13354663936
ccptdb.__java_pool_size=67108864
ccptdb.__large_pool_size=67108864
ccptdb.__oracle_base='/u01/product/oracle'#ORACLE_BASE set from environment
ccptdb.__pga_aggregate_target=10536091648
ccptdb.__sga_target=15703474176
ccptdb.__shared_io_pool_size=0
ccptdb.__shared_pool_size=2013265920
ccptdb.__streams_pool_size=0
*.audit_file_dest='/u01/product/oracle/admin/ccptdb/adump'
*.audit_trail='db'
*.cluster_database=false
*.compatible='11.2.0.0.0'
*.control_files='/data/ccptdb/control01.ctl','/data/ccptdb/control02.ctl','/data/ccptdb/control03.ctl'
*.db_block_size=16384
*.db_domain=''
*.db_file_name_convert='+data/ccptdb/datafile/','/data/ccptdb/','+indx/ccptdb/datafile/','/data/ccptdb/'
*.db_name='ccptdb'
*.db_recovery_file_dest='/u01/product/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=5218762752
*.db_unique_name='ccptdbdg'
*.diagnostic_dest='/u01/product/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=ccptdbXDB)'
*.fal_client='ccptdbdg'
*.fal_server='ccptdb1','ccptdb2'
*.local_listener='LISTENER_CCPTDB'
*.log_archive_config='DG_CONFIG=(ccptdb,ccptdbdg)'
*.log_archive_dest_1='LOCATION=/data/ccptdb/arch VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=ccptdbdg'
*.log_archive_dest_2='SERVICE=ccptdb LGWR SYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ccptdb'
*.log_archive_format='%t_%s_%r.arc'
*.log_file_name_convert='+data/ccptdb/onlinelog/','/data/ccptdb/'
*.memory_target=26214400000
*.open_cursors=300
*.processes=1000
*.remote_login_passwordfile='EXCLUSIVE'
*.sessions=1105
*.standby_file_management='AUTO'
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
注意備庫設定﹕
*.db_unique_name='ccptdbdg'
*.fal_client='ccptdbdg'
*.fal_server='ccptdb1','ccptdb2'
*.log_archive_config='DG_CONFIG=(ccptdb,ccptdbdg)'
*.log_archive_dest_1='LOCATION=/data/ccptdb1/arch VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=ccptdbdg'
*.log_archive_dest_2='SERVICE=ccptdb LGWR SYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ccptdb'
alter system set log_archive_dest_2='SERVICE=ccptdb LGWR SYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ccptdb';
六.對主庫做一次全備份
在主庫與從庫中建立相同的備份路徑
以oracle使用者登陸
$mkdir –p /data8/backup
$chmod 770 /data8/backup
做一次完整的RMAN熱備份
$rman target/
Rman> backup database format='/data/backup/%U_%s.bak';
Rman>sql"alter system archive log current";
Rman>backup filesperset 10 archivelog all format='/data/backup/%U_%s.bak';
alter database create standby controlfile as '/data/backup/dgcon01.ctl';
七.配置網路連線
主庫tnsnames.ora
wmrac01$cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/product/oracle/11.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
CCPTDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = wmscan)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ccptdb)
)
)
CCPTDBDG =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.118.253.47)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ccptdbdg)
)
)
wmrac02$cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/product/oracle/11.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
CCPTDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = wmscan)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ccptdb)
)
)
CCPTDBDG =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.118.253.47)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ccptdbdg)
)
)
備庫listener.ora
ccptdbsty$cat listener.ora
# listener.ora Network Configuration File: /u01/product/oracle/11.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.118.253.47)(PORT = 1521))
)
)
ADR_BASE_LISTENER = /u01/product/oracle
備庫tnsnames.ora
ccptdbsty$cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/product/oracle/11.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
CCPTDBDG =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.118.253.47)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ccptdbdg)
)
)
CCPTDB1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.118.253.51)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ccptdb)
(INSTANCE_NAME = ccptdb1)
)
)
CCPTDB2 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.118.253.52)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ccptdb)
(INSTANCE_NAME = ccptdb2)
)
)
CCPTDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.118.253.51)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.118.253.52)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ccptdb)
(FAILOVER_MODE =
(TYPE = SELECT)
(METHOD = BASIC)
(RETRIES = 180)
(DELAY = 5)
)
)
)
LISTENER_CCPTDB =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.118.253.47)(PORT = 1521))
九.啟動備庫
$sqlplus ‘/as sysdba’
Sql>startup nomount pfile=’/home/oracle/pfile.ora’;
Sql>alter database mount standby database;
採用LGWR程式傳輸日誌﹐必須建立備用日誌﹐而且日誌大小與主庫一樣﹐個數比主庫多一個
首先建立備用日誌
SQL>ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 group 111 ('/data/ccptdb/dgredo111a.log','/data/ccptdb/dgredo111b.log') SIZE 50M;
SQL>ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 group 112 ('/data/ccptdb/dgredo112a.log','/data/ccptdb/dgredo112b.log') SIZE 50M;
SQL>ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 group 113 ('/data/ccptdb/dgredo113a.log','/data/ccptdb/dgredo113b.log') SIZE 50M;
SQL>ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 group 114 ('/data/ccptdb/dgredo114a.log','/data/ccptdb/dgredo114b.log') SIZE 50M;
SQL>ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 group 115 ('/data/ccptdb/dgredo115a.log','/data/ccptdb/dgredo115b.log') SIZE 50M;
SQL>ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 group 116 ('/data/ccptdb/dgredo116a.log','/data/ccptdb/dgredo116b.log') SIZE 50M;
SQL>ALTER DATABASE ADD STANDBY LOGFILE THREAD 2 group 221 ('/data/ccptdb/dgredo221a.log','/data/ccptdb/dgredo221b.log') SIZE 50M;
SQL>ALTER DATABASE ADD STANDBY LOGFILE THREAD 2 group 222 ('/data/ccptdb/dgredo222a.log','/data/ccptdb/dgredo222b.log') SIZE 50M;
SQL>ALTER DATABASE ADD STANDBY LOGFILE THREAD 2 group 223 ('/data/ccptdb/dgredo223a.log','/data/ccptdb/dgredo223b.log') SIZE 50M;
SQL>ALTER DATABASE ADD STANDBY LOGFILE THREAD 2 group 224 ('/data/ccptdb/dgredo224a.log','/data/ccptdb/dgredo224b.log') SIZE 50M;
SQL>ALTER DATABASE ADD STANDBY LOGFILE THREAD 2 group 225 ('/data/ccptdb/dgredo225a.log','/data/ccptdb/dgredo225b.log') SIZE 50M;
SQL>ALTER DATABASE ADD STANDBY LOGFILE THREAD 2 group 226 ('/data/ccptdb/dgredo226a.log','/data/ccptdb/dgredo226b.log') SIZE 50M;
使用RMAN進行恢復
$rman target/
Rman>restore database;
Rman>restore archvielog all;
然後直接進入管理恢復狀態
$sqlplus ‘/as sysdba’
Sql>alter database recover managed standby database disconnect from session;
十.由於主庫為ASM檔案系統﹐需要將ASM格式的資料檔案轉化為普通檔案格式(如果有別名﹐則自動轉換﹐此步是可選項)
alter system set standby_file_management=manual ;
alter database rename file '/data/ccptdb/system.260.744649997' to '/data/ccptdb/system01.dbf' ;
alter database rename file '/data/ccptdb/sysaux.261.744650015' to '/data/ccptdb/sysaux01.dbf' ;
alter database rename file '/data/ccptdb/undotbs1.262.744650027' to '/data/ccptdb/undotbs101.dbf' ;
alter database rename file '/data/ccptdb/undotbs2.264.744650051' to '/data/ccptdb/undotbs201.dbf' ;
alter database rename file '/data/ccptdb/users.265.744650057' to '/data/ccptdb/users01.dbf' ;
為了standby啟用後可正常使用需要新增tempfile
alter tablespace temp add tempfile '/data/ccptdb/temp01.dbf' size 2000m;
alter tablespace temp add tempfile '/data/ccptdb/temp02.dbf' size 2000m;
由於ASM格式的資料檔案存在﹐在standby開啟後用TOAD無法正常顯示錶空間﹐需要刪除以下ASM格式的資料檔案
alter database tempfile '+DATA/ccptdb/tempfile/temp.263.744650033' offline;
alter database tempfile '+DATA/ccptdb/tempfile/temp.263.744650033' drop;
alter system set standby_file_management=auto ;
十一.關閉standby﹐重啟並高置為實時運用模式
shutdown immediate
startup
alter database recover managed standby database using current logfile;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25850100/viewspace-700252/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 11g RAC Data Guard 物理standby 建立Oracle
- Create RAC Standby Database for RAC Primary DatabaseDatabase
- 邏輯 rac standby和物理 rac standby的switchover 和 failoverAI
- RAC 下做Active 和standby 模式模式
- Oracle10g RAC配置standbyOracle
- RAC資料庫建立STANDBY(六)資料庫
- RAC資料庫建立STANDBY(五)資料庫
- RAC資料庫建立STANDBY(四)資料庫
- RAC資料庫建立STANDBY(三)資料庫
- RAC資料庫建立STANDBY(二)資料庫
- RAC資料庫建立STANDBY(一)資料庫
- 配置 Oracle 10g RAC primary + RAC physical standby dataguardOracle 10g
- 配置 Oracle 10g RAC primary + RAC logical standbyOracle 10g
- 【DataGuard】Oracle 11g physical standby switchoverOracle
- 建立Oracle 11g logical standbyOracle
- Oracle 11g Cross platform Active StandbyOracleROSPlatform
- (轉)RAC 下做Active 和standby 模式模式
- Oracle10g_RAC_Standby_MAA 3.0Oracle
- RMAN duplicate 建立standby RAC資料庫資料庫
- RAC環境STANDBY的SWITCHOVER切換
- 【RAC,DATAGUARD】Creating a physical standby from ASM (RAC ) primary之四ASM
- 【RAC】Creating a filesystem physical standby from ASM (RAC ) primary之三ASM
- 【RAC】Creating a filesystem physical standby from ASM (RAC ) primary 之二ASM
- 【RAC】Creating a filesystem physical standby from ASM (RAC ) primary之一ASM
- RAC DG 物理standby ASM無法啟動ASM
- hacmp boot ip\svc ip \standby ip\ rac ipACMboot
- RAC環境STANDBY的FAILOVER切換AI
- 11g rac 日誌
- 11g Dataguard中的snapshot standby特性
- 11g 新特性—— Active Database Duplication for A standby databaseDatabase
- oracle 11g中的snapshot standby特性Oracle
- Oracle RAC+DG 調整redo/standby log fileOracle
- RAC環境的物理STANDBY的 SWITCHOVER切換
- RAC環境LOGICAL STANDBY的SWITCHOVER切換
- 11G RAC+DG搭建
- 11G RAC 簡單命令
- AIX 安裝 11g RACAI
- RAC 11g的日誌