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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【DG】Data Guard搭建(physical standby)
- 【DG】Data Guard主備庫Failove切換AI
- 【DG】Data Guard主備庫Switchover切換
- 【ASK_ORACLE】Oracle Data Guard(一)DG架構Oracle架構
- Oracle DG建立Logical Standby DatabaseOracleDatabase
- 12c DG新特性 - Active Data Guard Far Sync (Doc ID 2179719.1)
- G008-ORACLE-DG ORACLE 19C Active Data Guard DML RedirectionOracle
- Oracle Data Guard Broker元件Oracle元件
- Oracle Data Guard簡介Oracle
- 單機搭建Data Guard
- 2.3.1.1.3 Application Containers Use Case: Logical Data WarehouseAPPAI
- 1 關於 Oracle Data GuardOracle
- 2 Oracle Data Guard 安裝Oracle
- 1 Oracle Data Guard Broker 概念Oracle
- bd_ticket_guard_client_dataclient
- Oracle Data Guard和Broker概述Oracle
- Oracle 19C Data Guard基礎運維-07 failover後閃回恢復dg架構Oracle運維AI架構
- 使用Data Guard Broker進行Data Guard物理備用庫配置(Oracle 19c)Oracle
- 8 Oracle Data Guard Broker 屬性Oracle
- 9 Oracle Data Guard 故障診斷Oracle
- Bd-Ticket-Guard-Client-Data逆向client
- oracle 11g data guard維護Oracle
- 4.1.6 Oracle Restart 與 Oracle Data Guard 整合OracleREST
- 【DATAGUARD】Oracle19c Data Guard BrokerOracle
- 2 開始實用 Oracle Data GuardOracle
- 19 Oracle Data Guard 相關檢視Oracle
- 6 Oracle Data Guard Protection Modes 保護模式Oracle模式
- 15 Oracle Data Guard Scenarios 保護場景OracleiOS
- A Oracle Data Guard Broker 升級和降級Oracle
- Oracle 12.2 How to Generate AWRs in Active Data Guard Standby DatabasesOracleDatabase
- Oracle Data Guard Feature 12cR2系列(二)Oracle
- Oracle Data Guard Feature 12cR2系列(一)Oracle
- 18 與Oracle Data Guard 相關的SQL語句OracleSQL
- [20221111]19c配置Data Guard Broker問題.txt
- 使用Broker管理Data Guard——停用、改保護模式等模式
- 需要了解的Data Guard理論知識(一)
- 需要了解的Data Guard理論知識(二)
- 需要了解的Data Guard理論知識(三)
- use azure data studio to create external table for oracleOracle