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 -- READ ONLY模式開啟物理Standby模式
- [PyTorch 學習筆記] 3.1 模型建立步驟與 nn.ModulePyTorch筆記模型
- Oracle DG建立Physical Standby DatabaseOracleDatabase
- Oracle DG建立Logical Standby DatabaseOracleDatabase
- 3 建立物理DG
- JS開發步驟學習筆記JS筆記
- 安裝 Nuxt.js 的步驟和注意事項UXJS
- 4.Rxjs介紹及注意事項JS
- XtraBackup 搭建從庫的一般步驟及 XtraBackup 8.0 的注意事項
- 大資料學習注意事項大資料
- kettle學習筆記(四)——kettle輸入步驟筆記
- 入門筆記 --- Golang 語法注意事項(一)筆記Golang
- SQLServer 物件建立注意事項之dboSQLServer物件
- Java入門學習注意事項有哪些?Java
- 搭建 nuget 私服及注意事項
- Guava HashMultimap使用及注意事項Guava
- 《實戰 Java 高併發程式設計》筆記——第4章 鎖的優化及注意事項(二)Java程式設計筆記優化
- vite構建專案步驟以及所遇到的坑,要注意的事項Vite
- 10GR2下建立物理standby STEP BY STEP
- DG-duplicate操作注意事項(各種報錯應對方法)
- Python eval的用法及注意事項Python
- 介面開發文件及注意事項
- Docker學習筆記(三):Dockerfile及多步驟構建映象Docker筆記
- 關於FreeRTOS移植到STM32F103上的步驟以及注意事項
- 大資料學習筆記之Hadoop安裝步驟詳解大資料筆記Hadoop
- 選擇香港伺服器需要注意哪些事項?這4點事項要牢記!伺服器
- Oracle 19C CBD Active DataGuard Standby passwd file 注意事項 ORA-01017Oracle
- AWS雲建立EC2與使用注意事項-踩坑記錄
- 多項式學習筆記筆記
- 【DATAGUARD】Oracle21c Dataguard建立注意事項及主要引數介紹Oracle
- swift學習筆記《4》Swift筆記
- python學習筆記4Python筆記
- Java學習筆記4Java筆記
- vue學習筆記4Vue筆記
- JAVA基礎學習筆記 一 計算機基礎、JAVA開發環境、開發注意事項Java筆記計算機開發環境
- 學習筆記1熱力學與統計物理筆記
- 段合併優化及注意事項優化
- SVN安裝配置及安全注意事項