DG學習筆記(4)_建立物理Standby步驟及注意事項
DG學習筆記(4)_建立物理Standby步驟及注意事項
目錄
1 Turn on force logging
2 Backup the primary database and create Standby Controlfile
3 Copy files to standby site
4 Set parameters on the physical standby database
5 Start the standby database
6 Configure Oracle Net
7 Set parameters on the primary database
8 Start the transport of redo
9 Notes
1 Turn on force logging
ALTER DATABASE FORCE LOGGING;
Perform. the command in Mount state
2 Backup the primary database and create Standby Controlfile
2.1 Make sure the primary is in archive log mode
2.2 Create a backup of the primary database.
You can use any backup of the primary database so long as you have archived redo logs completely recover the database. The backup can be old or new, consistent or inconsistent, Hot backups (or open backups) allow you to keep the database open while performing the backup. Nevertheless, you may prefer to make a new closed, consistent backup using the RMAN or OS utility to prevent the application of a large number of archived redo logs.( 能使用任何形式的備份, 只要有完備的歸檔檔案. 最好的形式是一個Closed, Consistent Backup. 即準備, RMAN能做冷備嗎? 不行吧.RMAN要連線資料庫的,資料庫狀態至少為Mount)
2.3 Create the standby control file
ALTER DATABASE CREATE STANDBY CONTROL FILE AS file_name [reuse];
The filename for the created standby control file must be different from the filename of the current control file of the primary database. You can also use RMAN to create the standby database control file.(Standby control file name 必須與 Current control file name 不同, 當Copy到Standby端時,可以改回去的.只是生成的時候不同而已.)
3 Copy files to standby site
Datafiles
Backup control file
Parameter file
All available archived redo logs (如果用的是冷備不需要, 複製過去後,是否要Register呢 ?不用,因為Controlfile 中已做了記錄,只需放到相同的目錄下 )
Online redo logs. (Recommended for switchover and failover operations)
Conversion initialization parameters
DB_FILE_NAME_CONVERT
LOG_FILE_NAME_CONVERT
STANDBY_FILE_MANAGEMENT
These are set in Standby initialization file, and should be in the primary database initialization file as well. (Primary和Standby都要設這些引數, 不是隻在Standby設嗎?兩邊都設定的原因是方便以後的Switchover)
4 Set parameters on the physical standby database
DB_FILE_NAME_CONVERT
LOG_FILE_NAME_CONVERT
LOG_ARCHIVE_FORMAT
STANDBY_FILE_MANAGEMENT
Maintain consistency when you add or delete a datafile on the primary database
= Manual(default) datafiles must be added on the standby database manually
= Auto: Add the datafile automatically to the standby database.
(是否需要手動新增,刪除資料檔案,但對資料檔案的renaming還是必須手工做)
When you add a log file to the primary and want to add it to the standby as well then you
must:
• Set to MANUAL on the standby
• Redo log files on the primary
• Add them to the standbys
• Reset back to AUTO afterwards on the standby
(logfile不能自動新增,且必須將STANDBY_FILE_MANAGEMENT引數先圍置為manual. )
STANDBY_ARCHIVE_DEST
LOG_ARCHIVE_START
REMOTE_ARCHIVE_ENABLE
Example: STBY_INIT.ORA
compatible='9.2.0'
control_files='D:\USER01\ORADATAB\U01\control01.ctl'
db_file_name_convert=
'D:\USER01\ORADATAA\U01','D:\USER01\ORADATAB\U01',
'D:\USER01\ORADATAA\U02','D:\USER01\ORADATAB\U02'
db_name='TESTA'
lock_name_space='testb'
log_file_name_convert=
'D:\USER01\ORADATAA\U03','D:\USER01\ORADATAB\U03'
remote_archive_enable='TRUE'
remote_login_passwordfile='exclusive'
standby_archive_dest='D:\USER01\ORADATAB\U04'
standby_file_management='auto'
5 Start the standby database
Bring it to the mount stage
Crate standby redo logs
Start the managed recover process(MRP)
SQL> STARTUP MOUNT PFILE=STBY_INIT.ORA
SQL> ALTER DATABASE ADD STANDBY LOGFILE
(’/oracle/dbs/log1c.rdo’,’/oracle/dbs/log2c.rdo’) SIZE 500K;
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;
6 Configure Oracle Net
7 Set parameters on the primary database
LOG_ARCHIVE_DEST
LOG_ARCHIVE_STATE
ARCHIVE_LAG_TARGET:Set to the number of seconds after which a log switch must happen even if the log file is not full.(定時強制歸檔,減少Instance恢復時間)
LOG_ARCHIVE_TRACE
Example:
archive_lag_target=0
compatible='9.2.0'
db_name='TESTA'
log_archive_dest_1='LOCATION=D:\USER01\ORADATAA\ARCHIVE1'
log_archive_dest_state_1='ENABLE'
log_archive_dest_2='service=TESTB'
log_archive_dest_state_2='ENABLE'
log_archive_format='testa_%s.arc'
log_archive_max_processes=3
log_archive_start=TRUE
log_archive_trace=0
log_parallelism=1
remote_archive_enable='TRUE'
remote_login_passwordfile='exclusive'
standby_archive_dest='D:\USER01\ORADATAA\ARCHIVE2'
standby_file_management='MANUAL'
8 Start the transport of redo
ALTER SYSTEM ARCHIVE LOG CURRENT;
This will cause the archive process to archive the current log file and will start the transport of redo to the physical standby database. On the physical standby database the RFS process will start on reception of the redo.
9 Notes
1 Notes for Standby Database on The Same System
Set the LOCK_NAME_SPACE initialization parameter
Standby database datafiles must be in a different location
The standby database does not protect against disaster
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10248702/viewspace-629921/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- DG物理standby,switchover步驟
- Data Guard學習之物理standby建立步驟
- DG物理standby,failover步驟AI
- MySQL學習筆記--觸發器的建立與刪除及使用注意事項MySql筆記觸發器
- DG學習筆記(5)_Standby Redo Log筆記
- flash8.0的安裝步驟及注意事項
- 筆記本記憶體條怎麼裝?筆記本裝記憶體條的方法步驟、及注意事項筆記記憶體
- add disk to asm on aix操作步驟及注意事項-orastarASMAIAST
- Oracle10g物理DG詳細配置方法及步驟Oracle
- 筆記:MMM注意事項筆記
- 11g 兩個節點RAC 搭建單例項DG詳細步驟以及注意事項單例
- 一步一步學DataGuard(5)物理standby之建立示例
- JS開發步驟學習筆記JS筆記
- [PyTorch 學習筆記] 3.1 模型建立步驟與 nn.ModulePyTorch筆記模型
- oracle DG資料庫切換步驟筆記Oracle資料庫筆記
- 安裝 Nuxt.js 的步驟和注意事項UXJS
- 【DATAGUARD 學習】使用duplicate 建立物理standby 資料庫資料庫
- 【轉】編譯Ogre1.9 IOS Dependencies及Ogre Source步驟及相關注意事項…編譯iOS
- XtraBackup 搭建從庫的一般步驟及 XtraBackup 8.0 的注意事項
- kettle學習筆記(四)——kettle輸入步驟筆記
- 4.Rxjs介紹及注意事項JS
- 大資料學習注意事項大資料
- DG物理standby,Failover之後原primary重回DGAI
- Oracle 10g的安裝步驟和注意事項(轉)Oracle 10g
- Amoeba for MySQL學習研究之注意事項MySql
- Oracle DG建立Physical Standby DatabaseOracleDatabase
- 【Toad】使用Toad呼叫expdp資料泵備份資料步驟及注意事項
- DG -- READ ONLY模式開啟物理Standby模式
- RAC DG 物理standby ASM無法啟動ASM
- oracle 9iDATA GUARD物理STANDBY的 SWITCHOVER切換步驟Oracle
- 【DG】[三思筆記]一步一步學DataGuard筆記
- DG學習筆記(7)_保護模式筆記模式
- DG學習筆記(8)_Switchover and Failover筆記AI
- DG學習筆記(11)_Log Transport Services筆記
- 入門筆記 --- Golang 語法注意事項(一)筆記Golang
- Java入門學習注意事項有哪些?Java
- 【Mysql 學習】Linux RPM 注意事項MySqlLinux
- 11G透過物理standby進行滾動升級例項說明及注意