oracle 10g logical standby db creation
1,構建一個物理備庫,我們已經有了,哈哈,對吧
2,停止物理備庫日誌應用
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
3,調整主庫用於支援邏輯備庫
如主庫切換為邏輯備庫
配置如下引數
LOG_ARCHIVE_DEST_3=
'LOCATION=/oracle/centos/
VALID_FOR=(STANDBY_LOGFILES,STANDBY_ROLE)
DB_UNIQUE_NAME=centos'
LOG_ARCHIVE_DEST_STATE_3=ENABLE
4,在重作資料中構建資料字典
在主庫
EXECUTE DBMS_LOGSTDBY.BUILD;
5,轉變為邏輯備庫
在備庫
alter database recover to logical standby logic; --為新的邏輯備庫起的新db_name
orapwd file=./orapwrhel password=system entries=10 force=y --為新logical standby db構建password file
6,為邏輯備庫調節某些引數
shutdown immediate;
startup mount;
*.log_archive_config='dg_config=(centos,rhel)'
*.log_archive_dest_1='location=/oracle/rhelarch valid_for=(online_logfiles,all_roles) db_unique_name=rhel' --logical standby db本地日誌的歸檔所有
*.log_archive_dest_2='location=/oracle/receive_centos_arch valid_for=(standby_logfiles,standby_role) db_unique_name=rhel' ---主庫歸檔傳送過來,接收所在地
7,開啟邏輯備庫
ALTER DATABASE OPEN RESETLOGS;
8,開始邏輯備庫日誌應用
ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE;
9,備庫重作日誌的(standby logfile)的相關資訊
SQL> select group#,dbid,archived,status from v$standby_log;
GROUP# DBID ARC STATUS
---------- ---------------------------------------- --- ----------
4 UNASSIGNED NO UNASSIGNED
5 3004476886 YES ACTIVE
6 UNASSIGNED YES UNASSIGNED
SQL>
10,以上日誌新增,可採用如下操作
Example 3-2 Adding a Standby Redo Log File Group to a Specific Group Number
You can also specify a number that identifies the group using the GROUP clause:
SQL> ALTER DATABASE ADD STANDBY LOGFILE GROUP 10
2> ('/oracle/dbs/log1c.rdo','/oracle/dbs/log2c.rdo') SIZE 500M;
Using group numbers can make administering standby redo log file groups easier. However, the group number must be between 1 and the value of the MAXLOGFILES clause. Do not skip log file group numbers (that is, do not number groups 10, 20, 30, and so on), or you will use additional space in the standby database control file.
Note:
Although the standby redo log is only used when the database is running in the standby role, Oracle recommends that you create a standby redo log on the primary database so that the primary database can switch over quickly to the standby role without the need for additional DBA intervention. Consider using Oracle Enterprise Manager to automatically configure standby redo log on both your primary and standby databases.
Step 5 Verify the standby redo log file groups were created.
To verify the standby redo log file groups are created and running correctly, invoke a log switch on the primary database, and then query either the V$STANDBY_LOG view or the V$LOGFILE view on the standby database once it has been created. For example:
SQL> SELECT GROUP#,THREAD#,SEQUENCE#,ARCHIVED,STATUS FROM V$STANDBY_LOG;
GROUP# THREAD# SEQUENCE# ARC STATUS
---------- ---------- ---------- --- ----------
3 1 16 NO ACTIVE
4 0 0 YES UNASSIGNED
5 0 0 YES UNASSIGNED
11,最後一點,因為我們是基於物理備庫,轉換為邏輯備庫,所以邏輯備庫採用了新的db_name,故主備庫的tnsnames.ora及listener.ora檔案要重建,及重啟
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-625525/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle DG建立Logical Standby DatabaseOracleDatabase
- [20181113]Logical Standby建立2.txt
- 4 Creating a Logical Standby Database 建立邏輯備庫Database
- Oracle的快照standbyOracle
- Oracle 10g/11g下如何將物理Standby庫臨時啟用用於災備測試Oracle 10g
- Oracle DG Standby Database型別OracleDatabase型別
- Oracle DG建立Physical Standby DatabaseOracleDatabase
- oracle 10g flashback databaseOracle 10gDatabase
- Oracle 19c Concepts(12):Logical Storage StructuresOracleStruct
- Scheduler in Oracle Database 10g(轉)OracleDatabase
- Oracle 10g 下載地址Oracle 10g
- oracle 10G特性之awrOracle 10g
- ISO 映象安裝oracle 10gOracle 10g
- Oracle 10g RAC故障處理Oracle 10g
- Oracle 10g 增刪節點Oracle 10g
- Oracle:db file scattered readOracle
- Oracle dataguard報錯:Error 1017 received logging on to the standbyOracleError
- 2.4.1 Service Creation in a CDB
- Oracle 12.2 How to Generate AWRs in Active Data Guard Standby DatabasesOracleDatabase
- Oracle 12.2 使用Database Link優化Standby Database WorkloadOracleDatabase優化
- Oracle 12.2 physical standby備庫收集AWR報告Oracle
- Oracle RAC+DG 調整redo/standby log fileOracle
- Oracle連線Db2OracleDB2
- Oracle DB 資料準備Oracle
- Oracle 10g expdp attach引數體驗Oracle 10g
- 2.3.2.1 Creation of Application Common ObjectsAPPObject
- 在Oracle DG Standby庫上啟用flashback database功能OracleDatabase
- oracle 10g函式大全–日期型函式Oracle 10g函式
- 關於Oracle 10g ASM磁碟大小的限制Oracle 10gASM
- ORACLE9I升級到10G(zt)Oracle
- Oracle 10g大檔案表空間(轉)Oracle 10g
- windows2008R2安裝oracle 10gWindowsOracle 10g
- Oracle 10g RAC 資料儲存更換Oracle 10g
- Delivery Automatic Creation for UB type STO
- 【mos 1265700.1】Oracle Patch Assurance - Data Guard Standby-First Patch ApplyOracleAPP
- dataguard 搭建 oracle_sid相同 2節點 primary+standbyOracle
- dataguard 搭建 oracle_sid不同 2節點 primary+standbyOracle
- Convert a Physical Standby Database into a Snapshot Standby DatabaseDatabase
- oracle 10g建立資料庫鏈的簡化Oracle 10g資料庫