建立Data guard logical standby database須知
- 資料型別
1.1 Logical standby database 支援的資料型別
CHAR
NCHAR
VARCHAR2 and VARCHAR
NVARCHAR2
NUMBER
DATE
TIMESTAMP
TIMESTAMP WITH TIMEZONE
TIMESTAMP WITH LOCAL TIMEZONE
INTERVAL YEAR TO MONTH
INTERVAL DAY TO SECOND
RAW
CLOB and NCLOB
BLOB
LONG
LONG RAW
BINARY_FLOAT
BINARY_DOUBLE
[@more@]1.2 Logical standby database 不支援的資料型別
BFILE
ROWID, UROWID
User-defined types
Collections (including VARRAYS and nested tables)
XML type
Encrypted columns
Multimedia data types (including Spatial, Image, and Context)
- 不支援的表、序列和檢視
在建立一個logical standby database前,需要識別出主庫中那些不被支援的資料庫物件。這些主庫中不被支援的資料庫物件(資料型別,表,序列,檢視)的變化將不能被正確地反應到logical standby database,而且沒有任何報錯。下面有4個方面的物件不被支援(或者自動跳過)
■ 一些被跳過的schema,可以在主庫透過查詢DBA_LOGSTDBY_SKIP檢視,獲得詳細資訊
SQL>SELECT OWNER FROM DBA_LOGSTDBY_SKIP WHERE STATEMENT_OPT = 'INTERNAL SCHEMA';
■ 那些包含不支援資料型別的欄位的表
■ 壓縮的表
■ 加密的表
我們可以透過在主庫上查詢DBA_LOGSTDBY_UNSUPPORTED 檢視,來確定到底那些物件是不被支援的。
SQL> SELECT DISTINCT OWNER,TABLE_NAME FROM DBA_LOGSTDBY_UNSUPPORTED
ORDER BY OWNER,TABLE_NAME;
OWNER TABLE_NAME
----------- --------------------------
HR COUNTRIES
OE ORDERS
OE CUSTOMERS
OE WAREHOUSES
可以透過查詢DBA_LOGSTDBY_UNSUPPORTED 檢視,確定到到底那些列不被支援,列的資料型別是什麼?
SQL> SELECT COLUMN_NAME,DATA_TYPE FROM DBA_LOGSTDBY_UNSUPPORTED
WHERE OWNER='OE' AND TABLE_NAME = 'CUSTOMERS';
COLUMN_NAME DATA_TYPE
------------------------------- -------------------
CUST_ADDRESS CUST_ADDRESS_TYP
PHONE_NUMBERS PHONE_LIST_TYP
CUST_GEO_LOCATION SDO_GEOMETRY
我們在確定data guard備庫的型別時一定要慎重,透過上面的查詢可以知道主庫的那些物件不能被logical stdby db支援,如果這些物件中有一些是核心的表,那我們只能採用physical standby database。
- 在主庫中執行下面語句,在Logical Stdby db中將被跳過(SKIP)
ALTER DATABASE
ALTER SESSION
ALTER MATERIALIZED VIEW
ALTER MATERIALIZED VIEW LOG
ALTER SYSTEM
CREATE CONTROL FILE
CREATE DATABASE
CREATE DATABASE LINK
CREATE PFILE FROM SPFILE
CREATE SCHEMA AUTHORIZATION
CREATE MATERIALIZED VIEW
CREATE MATERIALIZED VIEW LOG
CREATE SPFILE FROM PFILE
DROP DATABASE LINK
DROP MATERIALIZED VIEW
DROP MATERIALIZED VIEW LOG
EXPLAIN
LOCK TABLE
SET CONSTRAINTS
SET ROLE
SET TRANSACTION
- Logical Stdby DB所支援的DDL語句
4.1 DBMS_LOGSTDBY.SKIP 過程的stmt引數及其關聯的SQL語句
Keyword Associated SQL Statements
NON_SCHEMA_DDL All DDL that does not pertain to a particular schema
SCHEMA_DDL All DDL statements that create, modify, or drop schema objects (for example: tables, indexes, and columns)
DML Includes DML statements on a table (for example: INSERT,UPDATE, and DELETE)
CLUSTER CREATE CLUSTER
AUDIT CLUSTER
DROP CLUSTER
TRUNCATE CLUSTER
CONTEXT CREATE CONTEXT
DROP CONTEXT
DATABASE LINK CREATE DATABASE LINK
DROP DATABASE LINK
DIMENSION CREATE DIMENSION
ALTER DIMENSION
DROP DIMENSION
DIRECTORY CREATE DIRECTORY
DROP DIRECTORY
ROLLBACK STATEMENT CREATE ROLLBACK SEGMENT
ALTER ROLLBACK SEGMENT
DROP ROLLBACK SEGMENT
SEQUENCE CREATE SEQUENCE
DROP SEQUENCE
SESSION Log-ons
SYNONYM CREATE SYNONYM
DROP SYNONYM
SYSTEM AUDIT AUDIT SQL_statements
NOAUDIT SQL_statements
SYSTEM GRANT GRANT system_privileges_and_roles
REVOKE system_privileges_and_roles
TABLE CREATE TABLE
DROP TABLE
TRUNCATE TABLE
TABLESPACE CREATE TABLESPACE
DROP TABLESPACE
TRUNCATE TABLESPACE
TRIGGER CREATE TRIGGER
ALTER TRIGGER with ENABLE and DISABLE clauses
DROP TRIGGER
ALTER TABLE with ENABLE ALL TRIGGERS clause
ALTER TABLE with DISABLE ALL TRIGGERS clause
TYPE CREATE TYPE
CREATE TYPE BODY
ALTER TYPE
DROP TYPE
DROP TYPE BODY
USER CREATE USER
ALTER USER
DROP USER
VIEW CREATE VIEW
DROP VIEW
4.2 跳過DDL SQL 語句的語句選項(條件)
Statement Option SQL Statements and Operations
ALTER SEQUENCE ALTER SEQUENCE
ALTER TABLE ALTER TABLE
COMMENT TABLE COMMENT ON TABLE table, view, materialized view
COMMENT ON COLUMN table.column, view.column,materialized_view.column
DELETE TABLE DELETE FROM table, view
EXECUTE PROCEDURE CALL
Execution of any procedure or function or access to any variable,library, or cursor inside a package.
GRANT DIRECTORY GRANT privilege ON directory
REVOKE privilege ON directory
GRANT PROCEDURE GRANT privilege ON procedure, function, package
REVOKE privilege ON procedure, function, package
GRANT SEQUENCE GRANT privilege ON sequence
REVOKE privilege ON sequence
GRANT TABLE GRANT privilege ON table, view, materialized view
REVOKE privilege ON table, view, materialized view
GRANT TYPE GRANT privilege ON TYPE
REVOKE privilege ON TYPE
INSERT TABLE INSERT INTO table, view
LOCK TABLE LOCK TABLE table, view
SELECT SEQUENCE Any statement containing sequence.CURRVAL or
SELECT TABLE SELECT FROM table, view, materialized view
REVOKE privilege ON table, view, materialized view
UPDATE TABLE UPDATE table, view
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/32980/viewspace-1039021/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle DG建立Logical Standby DatabaseOracleDatabase
- 4 Creating a Logical Standby Database 建立邏輯備庫Database
- 【DG】Data Guard搭建(physical standby)
- [20181113]Logical Standby建立2.txt
- Oracle DG建立Physical Standby DatabaseOracleDatabase
- Oracle 12.2 How to Generate AWRs in Active Data Guard Standby DatabasesOracleDatabase
- Convert a Physical Standby Database into a Snapshot Standby DatabaseDatabase
- 【mos 1265700.1】Oracle Patch Assurance - Data Guard Standby-First Patch ApplyOracleAPP
- 1.1 Logical Structure of Database ClusterStructDatabase
- 【DATAGUARD】Data Guard 12C 新特性:Far Sync Standby (Doc ID 2179719.1)
- Oracle 19C Data Guard基礎運維-01安裝物理standbyOracle運維
- Performing a Failover to a Physical Standby DatabaseORMAIDatabase
- Oracle DG Standby Database型別OracleDatabase型別
- Setup Standby Database on One PC(轉)Database
- 需要了解的Data Guard理論知識(一)
- 需要了解的Data Guard理論知識(二)
- 需要了解的Data Guard理論知識(三)
- Oracle 12.2 使用Database Link優化Standby Database WorkloadOracleDatabase優化
- Linux 建立LVM(Logical Volume)LinuxLVM
- Oracle Data Guard Broker元件Oracle元件
- Oracle Data Guard簡介Oracle
- 單機搭建Data Guard
- 2.3.1.1.3 Application Containers Use Case: Logical Data WarehouseAPPAI
- [20230110]sql profile run standby database.txtSQLDatabase
- bd_ticket_guard_client_dataclient
- Oracle Data Guard和Broker概述Oracle
- 1 關於 Oracle Data GuardOracle
- 2 Oracle Data Guard 安裝Oracle
- 1 Oracle Data Guard Broker 概念Oracle
- 使用Data Guard Broker進行Data Guard物理備用庫配置(Oracle 19c)Oracle
- Bd-Ticket-Guard-Client-Data逆向client
- 8 Oracle Data Guard Broker 屬性Oracle
- 9 Oracle Data Guard 故障診斷Oracle
- 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
- 在Oracle DG Standby庫上啟用flashback database功能OracleDatabase