Rem Rem $Header: rdbms/admin/catlsby.sql /st_rdbms_11.2.0/2 2011/02/25 10:20:41 gkulkarn Exp $ Rem Rem catlsby.sql Rem Rem Copyright (c) 2000, 2011, Oracle and/or its affiliates. Rem All rights reserved. Rem Rem NAME Rem catlsby.sql - Logical Standby tables and views Rem Rem DESCRIPTION Rem This file implements the following: Rem Tables: Rem logstdby$parameters Rem logstdby$events Rem logstdby$apply_progress Rem logstdby$apply_milestone Rem logstdby$event_options Rem logstdby$scn Rem logstdby$skip_transaction Rem logstdby$skip Rem logstdby$skip_support Rem logstdby$eds_tables Rem Rem NOTES Rem Must be run when connected to SYS or INTERNAL Rem Rem MODIFIED (MM/DD/YY) Rem gkulkarn 02/22/11 - Backport bug-10155004: Allow xml-OR Rem typed tables withgkulkarn_bug-10155004 from main Rem abrown 01/05/11 - Remove XMLOR and XMLCSX support from event Rem control Rem abrown 12/28/10 - Backport bug-10243237: enable csx in 11.2.0.2b Rem abrown 04/29/10 - bug-9479009: correct supported view for xmlor Rem abrown 03/23/10 - bug-9501098: XMLOR support Rem svivian 10/20/09 - EDS object and varray support Rem dvoss 01/29/10 - bug 9271131 - xml on securefile clob unsupported Rem svivian 08/31/09 - bug 8846666: dba_logstdby_eds_supported expanded Rem to include XMLTYPE and more scalars. Rem svivian 04/22/09 - refine dba_logstdby_eds_supported Rem dvoss 04/16/09 - skip indexes belong in sysaux Rem dvoss 04/08/09 - bug 8235260 - skip indexes Rem svivian 03/26/09 - add EDS infrastructure Rem jkundu 02/17/09 - logstdby$events.spare1 records start_scn of the Rem txn (bug 8260837) Rem dvoss 02/05/09 - logstdby$events.event_time should be not null Rem dvoss 02/04/09 - add indexes to logstdby$events Rem preilly 11/14/08 - Bug 7630082: Check for SecureFiles with Dedup option Rem bpwang 09/19/08 - 11.2 supports SecureFiles Rem rlong 09/25/08 - Rem nkgopal 08/11/08 - Bug 6830207: Add Alter Database Link changes Rem rlong 08/07/08 - Rem myalavar 07/07/08 - Rem svivian 06/10/08 - bug 6487578: add JAVA to logstdby$skip_support Rem jkundu 04/23/08 - dba_logstdby_log update for APPLIED column Rem myalavar 04/08/08 - add orddata(bug 6759944) to logstdby skip Rem rmacnico 03/25/08 - Bug 2931832: support ODCI Rem svivian 03/19/08 - add blocks, block_size to dba_logstdby_log Rem rmacnico 02/25/08 - Add 11.2 redo compat to supported view Rem tchorma 02/08/08 - Remove compression from unsupported views Rem dsemler 02/06/08 - Add APPQOSSYS user to exclusion list Rem rmacnico 11/26/07 - bug 6528315: support edition in 11.2 Rem rmacnico 09/14/07 - bug 6406689: unsupported DMLs Rem ineall 07/23/07 - Bug 5889516: Disqualify function based index in Rem dba_logstdby_not_unique Rem rmacnico 06/14/07 - lrg 3015662: add logstdby$ tabs to noexp$ Rem rmacnico 05/24/07 - bug 5666482: map primary scn Rem rmacnico 05/01/07 - bug 6019939: flashback archive support Rem sslim 03/27/07 - Bug 5947235: SBP and Processed SCNs in history Rem table Rem rmacnico 03/26/07 - bug 5496852: validate skip on user ddls Rem rmacnico 04/11/07 - lrg 2916540: iot overflow tables Rem rmacnico 04/04/07 - bug 5971328: increase col width for plsql skip Rem rmacnico 03/12/07 - bug 5906232: virtual column primary key Rem rmacnico 02/05/07 - bug 5726264: xml store as OR marked sys maint Rem rmacnico 01/24/07 - bug 5790970: xml store as csx (binary xml) Rem jmzhang 12/20/06 - 5700499: skip table with securefile column Rem abrown 10/02/06 - Hierarchically enabled XML tables unsupported in Rem V11 Rem dvoss 10/12/06 - skip XS$NULL Rem rmacnico 09/11/06 - bug 5472731: system, reference partitioned tables Rem rmacnico 09/01/06 - lrg 2531243: required synonym Rem rmacnico 08/17/06 - 5172550: include AQ in unsupported view Rem dvoss 08/01/06 - add xml typed table support Rem mtao 07/07/06 - proj 17789: dba_logstdby_log dont show dummy log Rem dkapoor 06/16/06 - add ORACLE_OCM in LOGSTDBY30498SKIP_SUPPORT Rem rmacnico 04/20/06 - Add kernal PL/SQL support Rem preilly 05/23/06 - Fix UNSUPPORTED view for schema based XML CLOB Rem smangala 05/22/06 - project17789: extend parameters table Rem ineall 03/21/06 - 4601343: Modify view logstdby_support to Rem avoid ORA-01425 Rem rmacnico 03/02/06 - 3584308: handle change in redo compat in lsby Rem rmacnico 03/03/06 - 5074345: fix cdef$ flags check Rem rmacnico 11/08/05 - cleanup skipped schemas (dglsms) Rem sslim 05/26/05 - Reveal corruption state in dba_logstdby_log Rem rmacnico 05/19/05 - Update skip_support categories Rem jmzhang 03/23/05 - change default ts for parameter table Rem jmzhang 03/29/05 - update dba_logstdby_unsupported Rem jmzhang 08/26/04 - remove logstdby_status Rem - remove logstdby_thread Rem jmzhang 08/17/04 - add logstdby_status Rem add logstdby_thread Rem clei 06/10/04 - disallow encrypted columns Rem ajadams 06/15/04 - add index to logstdby events table Rem rgupta 04/23/04 - create tables in SYSAUX tablespace Rem ajadams 05/13/04 - add logstdby_transaction Rem jmzhang 05/05/04 - add timestamp to apply_milestone Rem jnesheiw 03/11/04 - fix LOGSTDBY_PROGRESS view to show correct Rem thread# for RAC Rem mcusson 01/15/04 - LogMiner 10g IOT support Rem jnesheiw 12/18/03 - Re-enable partition check Rem raguzman 11/12/03 - use dba_server_registry not dba_registry Rem raguzman 10/29/03 - add list of schema names to skip Rem raguzman 09/24/03 - fix bit check for table_compression Rem jmzhang 09/11/03 - fix newest_scn in dba_logstdby_progress Rem raguzman 08/28/03 - add column to logstdby_support to support new Rem view logstdby_unsupported_tables for GUI Rem jnesheiw 08/28/03 - DBA_LOGSTDBY_PARAMETERS only displays type < 2 Rem jmzhang 07/28/03 - fix logstdby_support by adding s.ts# Rem gkulkarn 07/09/03 - IOT with mapping table is supported Rem jnesheiw 05/19/03 - increase objname size in logstdby$scn Rem raguzman 05/27/03 - support view are missing object tables Rem raguzman 05/31/03 - real time apply and views Rem smangala 05/05/03 - fix bug#2691312: ignore gaps for newest_scn Rem narora 03/19/03 - bug 2842797: default value of fetchlwm_scn Rem narora 01/13/03 - add fetchlwm_scn to apply_milestone Rem raguzman 12/19/02 - add logstdby_support internal use view Rem sslim 12/02/02 - lrg 1112873: should not drop tables Rem raguzman 11/18/02 - Simply supported queries Rem rguzman 07/19/02 - update views for data type support Rem rguzman 07/19/02 - do not drop tables, needed for upgrades Rem rguzman 10/25/02 - Fix PARAMETERS view and UNSUPPORTED attributes Rem jmzhang 10/10/02 - modify the comments of logstdby$parameters Rem rguzman 10/11/02 - Attributes column for DBA_LOGSTDBY_UNSUPPORTED Rem jmzhang 09/23/02 - Update system.logstdby$scn Rem rguzman 07/07/02 - DBA_LOGSTDBY_PROGRESS must work on RAC Rem rguzman 10/01/02 - skip using like feature Rem sslim 09/26/02 - Log Stream History Table Rem jmzhang 08/12/02 - UPdate DBA_LOGSTDBY_PROGRESS Rem jmzhang 08/12/02 - Update DBA_LOGSTDBY_LOG Rem gviswana 01/29/02 - CREATE OR REPLACE SYNONYM Rem narora 01/17/02 - milestone.spare1 = oldest scn, Rem - spare2=primary syncpoint scn Rem rguzman 01/24/02 - Modify UNSUPPORTED view, no ADTs Rem cfreiwal 11/14/01 - move logstby views to catlsby.sql Rem rguzman 10/12/01 - New columns for logstdby$paramters. Rem narora 09/21/01 - remove logstdby_coordinator/slave Rem dcassine 08/27/01 - Rem rguzman 09/12/01 - PROGRESS view to report better progress Rem dcassine 08/27/01 - LOGSTDBY$APPLY_MILESTONE.PROCESSED_SCN Rem jnesheiw 08/02/01 - skip_transaction spare1 name change. Rem rguzman 05/18/01 - Fix skip default. Rem rguzman 05/17/01 - No Long/Lob support for Alpha kit. Rem sslim 05/11/01 - Drop tables before creating them Rem jdavison 10/12/00 - Change varchar sizes to 2000. Rem narora 08/01/00 - make apply progress a partitioned table Rem rguzman 08/11/00 - Views: synonyms, snapshot logs & functional index Rem narora 06/20/00 - grant select on v$logstdby_coordinator, Rem - v$logstdby_apply Rem rguzman 05/26/00 - Add views Rem rguzman 04/11/00 - Created Rem -- This is needed so that SYS can later grant select_catalog to the views. grant select any table to sys with admin option / create table system.logstdby$parameters ( name varchar2(30), /* The name of the parameter */ value varchar2(2000), /* The value of the parameter */ type number, /* null = internal, 1 = persistent, 2 = sessional */ scn number, /* null or meaningful scn */ spare1 number, /* Future expansion */ spare2 number, /* Future expansion */ spare3 varchar2(2000) /* Future expansion */ ) tablespace SYSTEM / create table system.logstdby$events ( event_time timestamp not null, /* The timetamp the event took effect */ current_scn number, /* The change vector SCN for the change */ commit_scn number, /* SCN of commit record for failed transaction */ xidusn number, /* Trans id component of a failed transaction */ xidslt number, /* Trans id component of a failed transaction */ xidsqn number, /* Trans id component of a failed transaction */ errval number, /* Error number */ event varchar2(2000), /* first 2000 characters of statement */ full_event clob, /* The complete statement */ error varchar2(2000), /* error text associated with failure */ spare1 number, /* 11.2 (start_scn of the failed txn) */ spare2 number, /* Future expansion */ spare3 varchar2(2000) /* Future expansion */ ) LOB (full_event) STORE AS (TABLESPACE SYSAUX CACHE PCTVERSION 0 CHUNK 16k STORAGE (INITIAL 16K NEXT 16K)) TABLESPACE SYSAUX LOGGING / create index system.logstdby$events_ind on system.logstdby$events (event_time asc) tablespace SYSAUX LOGGING; create index system.logstdby$events_ind_scn on system.logstdby$events (commit_scn asc) tablespace SYSAUX LOGGING; create index system.logstdby$events_ind_xid on system.logstdby$events (xidusn, xidslt, xidsqn asc) tablespace SYSAUX LOGGING; -- Turns off partition check -- alter session set events '14524 trace name context forever, level 1'; create table system.logstdby$apply_progress ( xidusn number, /* Trans id component of an applied transaction */ xidslt number, /* Trans id component of an applied transaction */ xidsqn number, /* Trans id component of an applied transaction */ commit_scn number, /* SCN of commit record for applied transaction */ commit_time date, /* The timestamp corresponding to the commit scn */ spare1 number, /* Future expansion */ spare2 number, /* Future expansion */ spare3 varchar2(2000) /* Future expansion */ ) tablespace SYSAUX partition by range (commit_scn) (partition P0 values less than (0)) / -- Turns on partition check -- alter session set events '14524 trace name context off'; create table system.logstdby$apply_milestone ( session_id number not null, /* Log miner session id */ commit_scn number not null, /* low-water mark */ commit_time date, /* low-water mark time*/ synch_scn number not null, /* Synch-point SCN. */ epoch number not null, /* Incarnation number for apply engine */ processed_scn number not null, /* all comp txn