Rem drv:
Rem
Rem $Header: db_comp_data_downgrade.sql 13-jul-2005.14:30:33 chyu Exp $
Rem
Rem db_comp_data_downgrade.sql
Rem
Rem Copyright (c) 2005, Oracle. All rights reserved.
Rem
Rem NAME
Rem db_comp_data_downgrade.sql -
Rem
Rem DESCRIPTION
Rem
Rem
Rem NOTES
Rem
Rem
Rem MODIFIED (MM/DD/YY)
Rem chyu 07/13/05 - chyu_new_repmgr_upg_db
Rem chyu 07/12/05 - Created; Wrapper file for the data downgrade
Rem
--------------------------------------------
-- Post Creation
--------------------------------------------
-- Do not use substitution variables in this script so that there is no
-- additional restrictions on the string values that are being inserted (such as ampersand
-- being interpreted specially by SQLPlus).
SET DEFINE OFF
--------------------------------------------
-- Registering metadata Database Configuration for target type oracle_database and snapshot type oracle_dbconfig
--------------------------------------------
ALTER SESSION SET CONSTRAINTS = DEFERRED;
DECLARE
metadata_id RAW(16) := SYS_GUID();
BEGIN
-- Remove all related metadatas
DELETE FROM MGMT_ECM_SNAPSHOT_MD_TABLES WHERE METADATA_ID IN (SELECT METADATA_ID FROM MGMT_ECM_SNAPSHOT_METADATA WHERE TARGET_TYPE = 'oracle_database' AND SNAPSHOT_TYPE = 'oracle_dbconfig');
DELETE FROM MGMT_ECM_SNAPSHOT_METADATA WHERE TARGET_TYPE = 'oracle_database' AND SNAPSHOT_TYPE = 'oracle_dbconfig';
-- Register metadata as loader metadata
INSERT INTO MGMT_ECM_SNAPSHOT_METADATA (SNAPSHOT_TYPE, TARGET_TYPE, KIND, METADATA_ID, UI_NAME, UI_ON, COMPARE_ON, HISTORY_ON, LINK_TABLE_NAME, AFTER_LOAD_PROC_NAME, AFTER_IMPORT_PROC_NAME, METADATA_VERSION, VIEW_URL, COMPARE_URL, HISTORY_URL, SAME_TARGET_COMPARE)
VALUES ('oracle_dbconfig', 'oracle_database', 'L', metadata_id, 'Database Configuration', 'N', 'Y', 'Y', NULL, NULL, NULL, '1.0', NULL, NULL, NULL, 'H');
-- Register metadata as presentation metadata
INSERT INTO MGMT_ECM_SNAPSHOT_METADATA (SNAPSHOT_TYPE, TARGET_TYPE, KIND, METADATA_ID, UI_NAME, UI_ON, COMPARE_ON, HISTORY_ON, LINK_TABLE_NAME, AFTER_LOAD_PROC_NAME, AFTER_IMPORT_PROC_NAME, METADATA_VERSION, VIEW_URL, COMPARE_URL, HISTORY_URL, SAME_TARGET_COMPARE)
VALUES ('oracle_dbconfig', 'oracle_database', 'P', metadata_id, 'Database Configuration', 'N', 'Y', 'Y', NULL, NULL, NULL, '1.0', NULL, NULL, NULL, 'H');
-- Register metadata for table MGMT_DB_DBNINSTANCEINFO_ECM
INSERT INTO MGMT_ECM_SNAPSHOT_MD_TABLES (METADATA_ID, NAME, UI_NAME, UI_ON, COMPARE_ON, HISTORY_ON, PARENT_TABLE_NAME, IS_SINGLE_ROW, TBL_ORDER)
VALUES (metadata_id, 'MGMT_DB_DBNINSTANCEINFO_ECM', 'Instance Information', 'N', 'Y', 'N', NULL, 'Y', 0);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_DBNINSTANCEINFO_ECM', 'DATABASE_NAME', 'Database Name', 'S', '9', 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 0);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_DBNINSTANCEINFO_ECM', 'GLOBAL_NAME', 'Global Name', 'S', '4000', 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 1);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_DBNINSTANCEINFO_ECM', 'BANNER', 'Version', 'S', '64', 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 2);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_DBNINSTANCEINFO_ECM', 'HOST_NAME', 'Host', 'S', '64', 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 3);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_DBNINSTANCEINFO_ECM', 'INSTANCE_NAME', 'Instance Name', 'S', '16', 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 4);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_DBNINSTANCEINFO_ECM', 'STARTUP_TIME', 'Instance Startup Time', 'D', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 5);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_DBNINSTANCEINFO_ECM', 'LOGINS', 'Restricted Mode', 'S', '10', 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 6);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_DBNINSTANCEINFO_ECM', 'LOG_MODE', 'Archive Log Mode', 'S', '12', 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 7);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_DBNINSTANCEINFO_ECM', 'OPEN_MODE', 'Read Only Mode', 'S', '10', 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 8);
-- Register metadata for table MGMT_DB_INIT_PARAMS_ECM
INSERT INTO MGMT_ECM_SNAPSHOT_MD_TABLES (METADATA_ID, NAME, UI_NAME, UI_ON, COMPARE_ON, HISTORY_ON, PARENT_TABLE_NAME, IS_SINGLE_ROW, TBL_ORDER)
VALUES (metadata_id, 'MGMT_DB_INIT_PARAMS_ECM', 'Initialization Parameters', 'N', 'Y', 'Y', NULL, 'N', 1);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_INIT_PARAMS_ECM', 'NAME', 'Name', 'S', '64', 'N', 'Y', 'Y', 'Y', 'N', 'N', 'N', NULL, 0);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_INIT_PARAMS_ECM', 'VALUE', 'Value', 'S', '512', 'N', 'Y', 'Y', 'N', 'N', 'N', 'N', NULL, 1);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_INIT_PARAMS_ECM', 'ISDEFAULT', NULL, 'S', '6', 'N', 'N', 'N', 'N', 'N', 'N', 'N', NULL, 2);
-- Register metadata for table MGMT_DB_CONTROLFILES_ECM
INSERT INTO MGMT_ECM_SNAPSHOT_MD_TABLES (METADATA_ID, NAME, UI_NAME, UI_ON, COMPARE_ON, HISTORY_ON, PARENT_TABLE_NAME, IS_SINGLE_ROW, TBL_ORDER)
VALUES (metadata_id, 'MGMT_DB_CONTROLFILES_ECM', 'Control files', 'N', 'Y', 'N', NULL, 'N', 2);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_CONTROLFILES_ECM', 'FILE_NAME', 'File Name', 'S', '512', 'N', 'Y', 'N', 'Y', 'N', 'N', 'N', NULL, 0);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_CONTROLFILES_ECM', 'STATUS', 'Status', 'S', '10', 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 1);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_CONTROLFILES_ECM', 'CREATION_DATE', 'Creation Date', 'D', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 2);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_CONTROLFILES_ECM', 'SEQUENCE_NUM', 'Sequence Num', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 3);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_CONTROLFILES_ECM', 'CHANGE_NUM', 'Change Num', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 4);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_CONTROLFILES_ECM', 'MOD_DATE', 'Modification Date', 'D', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 5);
-- Register metadata for table MGMT_DB_REDOLOGS_ECM
INSERT INTO MGMT_ECM_SNAPSHOT_MD_TABLES (METADATA_ID, NAME, UI_NAME, UI_ON, COMPARE_ON, HISTORY_ON, PARENT_TABLE_NAME, IS_SINGLE_ROW, TBL_ORDER)
VALUES (metadata_id, 'MGMT_DB_REDOLOGS_ECM', 'Redologs', 'N', 'Y', 'N', NULL, 'N', 3);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_REDOLOGS_ECM', 'GROUP_NUM', 'Group Num', 'N', NULL, 'N', 'Y', 'N', 'Y', 'N', 'N', 'N', NULL, 0);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_REDOLOGS_ECM', 'STATUS', 'Status', 'S', '16', 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 1);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_REDOLOGS_ECM', 'MEMBERS', 'Members', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 2);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_REDOLOGS_ECM', 'FILE_NAME', 'File Name', 'S', '512', 'N', 'Y', 'N', 'Y', 'N', 'N', 'N', NULL, 3);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_REDOLOGS_ECM', 'ARCHIVED', 'Archived', 'S', '3', 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 4);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_REDOLOGS_ECM', 'LOGSIZE', 'Log Size', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 5);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_REDOLOGS_ECM', 'SEQUENCE_NUM', 'Sequence Num', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 6);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_REDOLOGS_ECM', 'FIRST_CHANGE_SCN', 'First Change SCN', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 7);
-- Register metadata for table MGMT_DB_ROLLBACK_SEGS_ECM
INSERT INTO MGMT_ECM_SNAPSHOT_MD_TABLES (METADATA_ID, NAME, UI_NAME, UI_ON, COMPARE_ON, HISTORY_ON, PARENT_TABLE_NAME, IS_SINGLE_ROW, TBL_ORDER)
VALUES (metadata_id, 'MGMT_DB_ROLLBACK_SEGS_ECM', 'Rollback Segments', 'N', 'Y', 'N', NULL, 'N', 4);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_ROLLBACK_SEGS_ECM', 'ROLLNAME', 'Name', 'S', '64', 'N', 'Y', 'N', 'Y', 'N', 'N', 'N', NULL, 0);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_ROLLBACK_SEGS_ECM', 'STATUS', 'Status', 'S', '10', 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 1);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_ROLLBACK_SEGS_ECM', 'TABLESPACE_NAME', 'Tablespace Name', 'S', '30', 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 2);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_ROLLBACK_SEGS_ECM', 'EXTENTS', 'Extents', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 3);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_ROLLBACK_SEGS_ECM', 'ROLLSIZE', 'Size', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 4);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_ROLLBACK_SEGS_ECM', 'INITIAL_SIZE', 'Initial Size', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 5);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_ROLLBACK_SEGS_ECM', 'NEXT_SIZE', 'Next Size', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 6);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_ROLLBACK_SEGS_ECM', 'MAXIMUM_EXTENTS', 'Maximum Extents', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 7);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_ROLLBACK_SEGS_ECM', 'MINIMUM_EXTENTS', 'Minimum Extents', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 8);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_ROLLBACK_SEGS_ECM', 'PCT_INCREASE', 'Pct Increase', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 9);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_ROLLBACK_SEGS_ECM', 'OPTSIZE', 'Optimal Size', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 10);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_ROLLBACK_SEGS_ECM', 'AVEACTIVE', 'Average Active', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 11);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_ROLLBACK_SEGS_ECM', 'WRAPS', 'Wraps', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 12);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_ROLLBACK_SEGS_ECM', 'SHRINKS', 'Shrinks', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 13);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_ROLLBACK_SEGS_ECM', 'AVESHRINK', 'Average Shrink', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 14);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_ROLLBACK_SEGS_ECM', 'HWMSIZE', 'Hight Water Mark Size', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 15);
-- Register metadata for table MGMT_DB_SGA_ECM
INSERT INTO MGMT_ECM_SNAPSHOT_MD_TABLES (METADATA_ID, NAME, UI_NAME, UI_ON, COMPARE_ON, HISTORY_ON, PARENT_TABLE_NAME, IS_SINGLE_ROW, TBL_ORDER)
VALUES (metadata_id, 'MGMT_DB_SGA_ECM', 'System Global Area', 'N', 'Y', 'N', NULL, 'N', 5);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_SGA_ECM', 'SGANAME', 'Name', 'S', '64', 'N', 'Y', 'N', 'Y', 'N', 'N', 'N', NULL, 0);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_SGA_ECM', 'SGASIZE', 'Size', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 1);
-- Register metadata for table MGMT_DB_LICENSE_ECM
INSERT INTO MGMT_ECM_SNAPSHOT_MD_TABLES (METADATA_ID, NAME, UI_NAME, UI_ON, COMPARE_ON, HISTORY_ON, PARENT_TABLE_NAME, IS_SINGLE_ROW, TBL_ORDER)
VALUES (metadata_id, 'MGMT_DB_LICENSE_ECM', 'License', 'N', 'Y', 'N', NULL, 'N', 6);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_LICENSE_ECM', 'SESSIONS_MAX', 'Session Max', 'N', NULL, 'N', 'Y', 'N', 'Y', 'N', 'N', 'N', NULL, 0);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_LICENSE_ECM', 'SESSIONS_WARNING', 'Sessions Warning', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 1);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_LICENSE_ECM', 'SESSIONS_CURRENT', 'Session Current', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 2);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_LICENSE_ECM', 'SESSIONS_HIGHWATER', 'Sessions Highwater', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 3);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_LICENSE_ECM', 'USERS_MAX', 'Users Max', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 4);
-- Register metadata for table MGMT_DB_TABLESPACES_ECM
INSERT INTO MGMT_ECM_SNAPSHOT_MD_TABLES (METADATA_ID, NAME, UI_NAME, UI_ON, COMPARE_ON, HISTORY_ON, PARENT_TABLE_NAME, IS_SINGLE_ROW, TBL_ORDER)
VALUES (metadata_id, 'MGMT_DB_TABLESPACES_ECM', 'Tablespaces', 'N', 'Y', 'N', NULL, 'N', 7);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_TABLESPACES_ECM', 'TABLESPACE_NAME', 'Tablespace Name', 'S', '30', 'N', 'Y', 'N', 'Y', 'N', 'N', 'N', NULL, 0);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_TABLESPACES_ECM', 'CONTENTS', 'Contents', 'S', '9', 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 1);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_TABLESPACES_ECM', 'STATUS', 'Status', 'S', '10', 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 2);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_TABLESPACES_ECM', 'EXTENT_MANAGEMENT', 'Extent Management', 'S', '10', 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 3);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_TABLESPACES_ECM', 'ALLOCATION_TYPE', 'Allocation Type', 'S', '10', 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 4);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_TABLESPACES_ECM', 'LOGGING', 'Logging', 'S', '10', 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 5);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_TABLESPACES_ECM', 'TABLESPACE_SIZE', 'Size', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 6);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_TABLESPACES_ECM', 'INITIAL_EXT_SIZE', 'Initial Extent', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 7);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_TABLESPACES_ECM', 'NEXT_EXTENT', 'Next Extent', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 8);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_TABLESPACES_ECM', 'INCREMENT_BY', 'Increment', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 9);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_TABLESPACES_ECM', 'MAX_EXTENTS', 'Maximum Extents', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 10);
-- Register metadata for table MGMT_DB_DATAFILES_ECM
INSERT INTO MGMT_ECM_SNAPSHOT_MD_TABLES (METADATA_ID, NAME, UI_NAME, UI_ON, COMPARE_ON, HISTORY_ON, PARENT_TABLE_NAME, IS_SINGLE_ROW, TBL_ORDER)
VALUES (metadata_id, 'MGMT_DB_DATAFILES_ECM', 'Datafiles', 'N', 'Y', 'N', 'MGMT_DB_TABLESPACES_ECM', 'N', 8);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_DATAFILES_ECM', 'FILE_NAME', 'File Name', 'S', '512', 'N', 'Y', 'N', 'Y', 'N', 'N', 'N', NULL, 0);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_DATAFILES_ECM', 'STATUS', 'Status', 'S', '9', 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 1);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_DATAFILES_ECM', 'FILE_SIZE', 'Size', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 2);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_DATAFILES_ECM', 'AUTOEXTENSIBLE', 'Autoextensible', 'S', '3', 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 3);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_DATAFILES_ECM', 'INCREMENT_BY', 'Increment', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 4);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_DB_DATAFILES_ECM', 'MAX_FILE_SIZE', 'Max File Size', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 5);
-- Register metadata for table MGMT_HA_INFO_ECM
INSERT INTO MGMT_ECM_SNAPSHOT_MD_TABLES (METADATA_ID, NAME, UI_NAME, UI_ON, COMPARE_ON, HISTORY_ON, PARENT_TABLE_NAME, IS_SINGLE_ROW, TBL_ORDER)
VALUES (metadata_id, 'MGMT_HA_INFO_ECM', 'High Availability - General Information', 'N', 'Y', 'N', NULL, 'Y', 9);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_HA_INFO_ECM', 'DBID', 'Dbid', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 0);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_HA_INFO_ECM', 'LOG_MODE', 'Log Mode', 'S', '12', 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 1);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_HA_INFO_ECM', 'FORCE_LOGGING', 'Force Logging', 'S', '3', 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 2);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_HA_INFO_ECM', 'DATABASE_ROLE', 'Database Role', 'S', '16', 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 3);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_HA_INFO_ECM', 'FLASHBACK_ON', 'Flashback On', 'S', '3', 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 4);
-- Register metadata for table MGMT_HA_INIT_PARAMS_ECM
INSERT INTO MGMT_ECM_SNAPSHOT_MD_TABLES (METADATA_ID, NAME, UI_NAME, UI_ON, COMPARE_ON, HISTORY_ON, PARENT_TABLE_NAME, IS_SINGLE_ROW, TBL_ORDER)
VALUES (metadata_id, 'MGMT_HA_INIT_PARAMS_ECM', 'High Availability - Initialization Parameters', 'N', 'Y', 'N', NULL, 'N', 10);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_HA_INIT_PARAMS_ECM', 'NAME', 'Name', 'S', '64', 'N', 'Y', 'N', 'Y', 'N', 'N', 'N', NULL, 0);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_HA_INIT_PARAMS_ECM', 'VALUE', 'Value', 'S', '512', 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 1);
-- Register metadata for table MGMT_HA_FILES_ECM
INSERT INTO MGMT_ECM_SNAPSHOT_MD_TABLES (METADATA_ID, NAME, UI_NAME, UI_ON, COMPARE_ON, HISTORY_ON, PARENT_TABLE_NAME, IS_SINGLE_ROW, TBL_ORDER)
VALUES (metadata_id, 'MGMT_HA_FILES_ECM', 'High Availability - Database Files', 'N', 'Y', 'N', NULL, 'N', 11);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_HA_FILES_ECM', 'NAME', 'Name', 'S', '64', 'N', 'Y', 'N', 'Y', 'N', 'N', 'N', NULL, 0);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_HA_FILES_ECM', 'TOTALSIZE', 'Total Size', 'N', NULL, 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 1);
-- Register metadata for table MGMT_HA_RMAN_CONFIG_ECM
INSERT INTO MGMT_ECM_SNAPSHOT_MD_TABLES (METADATA_ID, NAME, UI_NAME, UI_ON, COMPARE_ON, HISTORY_ON, PARENT_TABLE_NAME, IS_SINGLE_ROW, TBL_ORDER)
VALUES (metadata_id, 'MGMT_HA_RMAN_CONFIG_ECM', 'High Availability - RMAN Configuration', 'N', 'Y', 'N', NULL, 'N', 12);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_HA_RMAN_CONFIG_ECM', 'NAME', 'Name', 'S', '65', 'N', 'Y', 'N', 'Y', 'N', 'N', 'N', NULL, 0);
INSERT INTO MGMT_ECM_SNAPSHOT_MD_COLUMNS (METADATA_ID, TABLE_NAME, NAME, UI_NAME, TYPE, TYPE_FORMAT, UI_ON, COMPARE_ON, HISTORY_ON, IS_KEY, IS_CONTEXT, IS_SUMMARY, IS_CHILD_LINK, LINK_COLUMN_NAME, COL_ORDER)
VALUES (metadata_id, 'MGMT_HA_RMAN_CONFIG_ECM', 'VALUE', 'Value', 'S', '1025', 'N', 'Y', 'N', 'N', 'N', 'N', 'N', NULL, 1);
END;
/
ALTER SESSION SET CONSTRAINTS = IMMEDIATE;
COMMIT;
-- End of metadata registration for metadata Database Configuration
SET DEFINE ON
Rem
Rem RREILLY 04/10/06
Rem
-- Un-Register ECM Policy Metadata for ASM
-- @RAR ISSUE: How do we clean up the MGMT_ECM_SNAPSHOT_MD_COLUMNS_TABLES?
-- -----------------------------------------------
-- Register Type: osm_instance
-- Leave this type as registered, but use old
-- style registration, with common msg bundle
-- -----------------------------------------------
BEGIN
MGMT_TARGET.register_target_type('osm_instance',
'ASM',
'oracle_storage_manager');
COMMIT;
END;
/
SHOW ERRORS;
-- Remove all related metadatas
DELETE FROM MGMT_ECM_SNAPSHOT_MD_TABLES WHERE METADATA_ID IN
(SELECT METADATA_ID FROM MGMT_ECM_SNAPSHOT_METADATA
WHERE TARGET_TYPE = 'osm_instance' AND SNAPSHOT_TYPE = 'oracle_osm');
DELETE FROM MGMT_ECM_SNAPSHOT_METADATA
WHERE TARGET_TYPE = 'osm_instance' AND SNAPSHOT_TYPE = 'oracle_osm';
SHOW ERRORS;
COMMIT;
Rem
Rem PBANTIS 04/10/07
Rem
-- NEED to create table here, so the data load can work
-- Create the 10gR1 Backup and Recovery tables.
-- Table for storing list of database targets registered.
CREATE TABLE MGMT_RCVCAT_CRED (
TARGET_GUID RAW(16) NOT NULL,
RCVCAT_CONNECT_STR VARCHAR(1024),
RCVCAT_USERNAME VARCHAR(128),
RCVCAT_PASSWORD RAW(128),
RCVCAT_GUID RAW(16),
UNIQUE(TARGET_GUID)
) MONITORING;
-- backup and recovery downgrade
DECLARE
BEGIN
-- Loop for each entry in the MGMT_RCVCAT_CONFIG and MGMT_RCVCAT_REPOS tables.
FOR repos_entry IN (select c.rcvcat_connect_str, c.rcvcat_username,
c.rcvcat_password, c.target_guid, r.use_rcvcat, r.target_guid
repos_target_guid from mgmt_rcvcat_config c, mgmt_rcvcat_repos r where
c.rcvcat_guid=r.rcvcat_guid)
LOOP
IF repos_entry.use_rcvcat = 'YES'
THEN
-- Create an entry for the target database in the MGMT_RCVCAT_CRED table.
insert into mgmt_rcvcat_cred (target_guid, rcvcat_connect_str,
rcvcat_username, rcvcat_password, rcvcat_guid)
values (repos_entry.repos_target_guid,
repos_entry.rcvcat_connect_str, repos_entry.rcvcat_username,
repos_entry.rcvcat_password, repos_entry.target_guid); commit;
END IF;
END LOOP;
EXCEPTION
WHEN NO_DATA_FOUND THEN
dbms_output.put_line('Downgrade: NO_DATA_FOUND in MGMT_RCVCAT_*
tables.');
END;
/