oracle9i(9204)data guard(dg)_logical standby_adding_recreating table
Adding or Re-Creating Tables on a Logical Standby Database
Typically, you use table instantiation to re-create a table after an unrecoverable operation. You can also use the procedure to enable SQL apply operations on a table that was formerly skipped.
Before you can create a table, it must meet the requirements described in and that explain:
- How to determine if the primary database contains datatypes or tables that are not supported by a logical standby database
- How to ensure that table rows in the primary database can be uniquely identified
Note:The DBMS_LOGSTDBY PL/SQL package does not support the BLOB datatype, even though BLOB datatypes are supported by logical standby databases.
The following list and show how to re-create a table and resume SQL apply operations on that table:
- Stop log apply services to stop applying SQL statements to the database.
- Ensure no operations are being skipped by querying the DBA_LOGSTDBY_SKIP view.
If any operations are being skipped, resume application of each operation that is currently being skipped by using the DBMS_LOGSTDBY.UNSKIP procedure. If multiple filters were created on the table, you will need to execute the procedure multiple times.
- Re-create the table in the logical standby database using the DBMS_LOGSTDBY.INSTANTIATE_TABLE procedure. In addition to creating a table, this procedure also imports the data from the primary table using a database link. The link supplied to this procedure must have LOGSTDBY_ADMINISTRATOR role granted on the primary database.
- Resume log apply services.
Before accessing data in the newly added table, you should archive the current redo log on the primary database, and ensure that it is applied to the logical standby database.
demonstrates how to add the EMP table to a logical standby database.
Example 9-3 Adding a Table to a Logical Standby Database
SQL> ALTER DATABASE STOP LOGICAL STANDBY APPLY;
SQL> SELECT * FROM DBA_LOGSTDBY_SKIP;
ERROR STATEMENT_OPT OWNER NAME PROC
---------------------------------------------------------------------
N SCHEMA_DDL SCOTT EMP
N DML SCOTT EMP
SQL> EXECUTE DBMS_LOGSTDBY.UNSKIP('SCHEMA_DDL','SCOTT','EMP');
SQL> EXECUTE DBMS_LOGSTDBY.INSTANTIATE_TABLE('SCOTT','EMP','DBLINK');
SQL> ALTER DATABASE START LOGICAL STANDBY APPLY;
SQL> EXECUTE DBMS_LOGSTDBY.UNSKIP('DML','SCOTT','EMP');
Log on to the primary database and issue the following statements:
SQL> ALTER SYSTEM ARCHIVE LOG CURRENT;
SQL> SELECT FIRST_CHANGE# FROM V$LOG WHERE STATUS = 'CURRENT';
SQL> ALTER SYSTEM ARCHIVE LOG CURRENT;
When the value returned by the DBA_LOGSTDBY_PROGRESS.APPLIED_SCN
procedure is greater than the value selected from the query of the V$LOG view, the
database is consistent and you can safely run reports again.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-628173/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle9i(9204)data guard(dg)_logical standby_failover操作指南OracleAI
- oracle9i(9204)dg(data guard)_ place the standby database in manual recovery modeOracleDatabase
- oracle9204(9i)_dg(data guard)__Tuning Logical Standby DatabasesOracleDatabase
- oracle9i(9204)dg(data guard)_adding and dropping online redo logs_物理_physicalOracle
- oracle9204(9i)_dg(data guard)_archive gap_query_apply_transmitOracleHiveAPPMIT
- 【DG】Data Guard搭建(physical standby)
- 【DG】Oracle Data Guard官方直譯Oracle
- 建立Data guard logical standby database須知Database
- 【DG】Data Guard主備庫Switchover切換
- 物理DG!Oracle 10G Data Guard DemoOracle 10g
- 【DG】Data Guard主備庫Failove切換AI
- 【ASK_ORACLE】Oracle Data Guard(一)DG架構Oracle架構
- oracle9204(9i)_dg(data guard)_重新命名主庫資料檔案_指南_轉摘官檔Oracle
- 利用RMAN 建立Oracle9i RAC Data GuardOracle
- Oracle DG(Data Guard)支援異構平臺說明Oracle
- oracle10g data guard(dg)__flashback_physical databaseOracleDatabase
- Linux下的Oracle9i data guard配置過程LinuxOracle
- Implementing Oracle9i Data Guard for Higher AvailabilityOracleAI
- 利用RMAN 建立Oracle9i RAC Data Guard (updated)Oracle
- 利用RMAN 建立Oracle9i RAC Data Guard(完善版)Oracle
- oracle10g data guard role transition_physical_logical_switchover_failoverOracleAI
- 基於同一主機配置Oracle 11g Data Guard(logical standby)Oracle
- DATA GUARD部署模式——DATA GUARD概念和管理模式
- oracle9204(physical dg)配置_指南Oracle
- Oracle DG建立Logical Standby DatabaseOracleDatabase
- 介紹ORACLE DATA GUARD——DATA GUARD概念和管理Oracle
- 12c DG新特性 - Active Data Guard Far Sync (Doc ID 2179719.1)
- G008-ORACLE-DG ORACLE 19C Active Data Guard DML RedirectionOracle
- Data guard搭建
- oracle data guard!!Oracle
- Data Guard Broker系列之二:Data Guard Broker配置實戰
- DATA GUARD 簡介
- Data Guard 建立(ASM)ASM
- Oracle Data Guard配置Oracle
- 【DG】同一臺主機實現物理Data Guard配置安裝(精簡版)
- 與oracle10g data guard(dg)緊密關聯的相關檢視Oracle
- Oracle 11g Data Guard Enabling Active Data GuardOracle
- [Data Guard]Oracle10g Data Guard學習筆記(一)Oracle筆記