Oracle April 2021 Critical Patch Advisory changed objects performed by each database patch.
For more details and the catalog, check the main post: Dissecting 210420 BP, PSU, RU and RUR
What exactly changed for each?
(click to see detailed line changes)
- 12.1.0.2
- 12.2.0.1
- 18.0.0.0
- SYS.DBMS_BACKUP_RESTORE - PACKAGE 18c (18.13RUR)
- SYS.DBMS_BACKUP_RESTORE - PACKAGE 18c (18.12RUR)
- SYS.DBMS_BACKUP_RESTORE - PACKAGE 18c (RU)
- SYS.DBMS_REGISTRY - PACKAGE 18c (18.12RUR)
- SYS.DBMS_REGISTRY - PACKAGE 18c (18.13RUR)
- SYS.DBMS_REGISTRY - PACKAGE 18c (RU)
- SYS.DBMS_RCVMAN - PACKAGE BODY 18c (18.13RUR)
- SYS.DBMS_RCVMAN - PACKAGE BODY 18c (18.12RUR)
- SYS.DBMS_RCVMAN - PACKAGE BODY 18c (RU)
- SYS.MON_MODS_V - VIEW 18c (RU)
- AUDSYS.DBMS_AUDIT_MGMT - PACKAGE BODY 19c (RU)
- 19.0.0.0
- CTXSYS.CTX_REPORT - PACKAGE BODY 19c (RU)
- CTXSYS.DRVPARX - PACKAGE BODY 19c (RU)
- CTXSYS.DRVRIO - PACKAGE BODY 19c (RU)
- CTXSYS.DRVXTAB - PACKAGE BODY 19c (RU)
- GSMADMIN_INTERNAL.DBMS_GSM_UTILITY - PACKAGE 19c (RU & 19.9RUR & 19.10RUR)
- GSMADMIN_INTERNAL.DBMS_GSM_DBADMIN - PACKAGE BODY 19c (19.9RUR & 19.10RUR)
- GSMADMIN_INTERNAL.DBMS_GSM_DBADMIN - PACKAGE BODY 19c (RU)
- GSMADMIN_INTERNAL.DBMS_GSM_POOLADMIN - PACKAGE BODY 19c (RU)
- GSMADMIN_INTERNAL.DBMS_GSM_POOLADMIN - PACKAGE BODY 19c (19.9RUR & 19.10RUR)
- GSMADMIN_INTERNAL.DBMS_GSM_UTILITY - PACKAGE BODY 19c (RU & 19.9RUR & 19.10RUR)
- MDSYS.SDO_GEOR - PACKAGE 19c (RU)
- MDSYS.SDO_GEOR_AUX - PACKAGE 19c (RU)
- MDSYS.SDO_GEOR_INT - PACKAGE 19c (RU)
- MDSYS.SDO_GEOM - PACKAGE BODY 19c (RU)
- MDSYS.SDO_GEOR - PACKAGE BODY 19c (RU)
- MDSYS.SDO_GEOR_AUX - PACKAGE BODY 19c (RU)
- MDSYS.SDO_GEOR_GDAL - PACKAGE BODY 19c (RU)
- MDSYS.SDO_GEOR_INT - PACKAGE BODY 19c (RU)
- MDSYS.SDO_LRS - PACKAGE BODY 19c (RU)
- MDSYS.SDO_META - PACKAGE BODY 19c (RU)
- MDSYS.SDO_UTIL - PACKAGE BODY 19c (RU)
- MDSYS.SDO_RDF_TRIPLE_S - TYPE BODY 19c (RU)
- MDSYS.SEMCONTEXTINDEXMETHODS - TYPE BODY 19c (RU)
- REMOTE_SCHEDULER_AGENT.CHECK_AGENT_VERSION - PROCEDURE 19c (RU)
- SYS.DBMS_APP_CONT_ADMIN - PACKAGE 19c (RU)
- SYS.DBMS_BACKUP_RESTORE - PACKAGE 19c (19.10RUR)
- SYS.DBMS_BACKUP_RESTORE - PACKAGE 19c (RU)
- SYS.DBMS_BACKUP_RESTORE - PACKAGE 19c (19.9RUR)
- SYS.DBMS_BLOCKCHAIN_TABLE - PACKAGE 19c (RU)
- SYS.DBMS_GSM_FIXED - PACKAGE 19c (RU)
- SYS.DBMS_GSM_FIXED - PACKAGE 19c (19.9RUR & 19.10RUR)
- SYS.DBMS_PDB_ALTER_SHARING - PACKAGE 19c (RU)
- SYS.DBMS_REDEFINITION_INTERNAL - PACKAGE 19c (RU)
- SYS.DBMS_REGISTRY - PACKAGE 19c (19.9RUR)
- SYS.DBMS_REGISTRY - PACKAGE 19c (RU)
- SYS.DBMS_REGISTRY - PACKAGE 19c (19.10RUR)
- SYS.DBMS_SODA - PACKAGE 19c (RU)
- SYS.DBMS_SODA_UTIL - PACKAGE 19c (RU)
- SYS.DBMS_SQLTCB_INTERNAL - PACKAGE 19c (RU)
- SYS.DBMS_STREAMS_ADM_UTL - PACKAGE 19c (RU)
- SYS.DBMS_USER_CERTS - PACKAGE 19c (RU)
- SYS.DBMS_APPLY_ADM_INTERNAL - PACKAGE BODY 19c (RU)
- SYS.DBMS_APP_CONT_ADMIN - PACKAGE BODY 19c (RU)
- SYS.DBMS_AUTO_INDEX_INTERNAL - PACKAGE BODY 19c (RU)
- SYS.DBMS_BACKUP_RESTORE - PACKAGE BODY 19c (RU)
- SYS.DBMS_BLOCKCHAIN_TABLE - PACKAGE BODY 19c (RU)
- SYS.DBMS_CAPTURE_ADM_INTERNAL - PACKAGE BODY 19c (RU)
- SYS.DBMS_GSM_FIXED - PACKAGE BODY 19c (19.9RUR & 19.10RUR)
- SYS.DBMS_GSM_FIXED - PACKAGE BODY 19c (RU)
- SYS.DBMS_IJOB - PACKAGE BODY 19c (19.9RUR)
- SYS.DBMS_LOGMNR_INTERNAL - PACKAGE BODY 19c (RU)
- SYS.DBMS_PDB_ALTER_SHARING - PACKAGE BODY 19c (RU)
- SYS.DBMS_RCVMAN - PACKAGE BODY 19c (19.9RUR)
- SYS.DBMS_RCVMAN - PACKAGE BODY 19c (RU)
- SYS.DBMS_RCVMAN - PACKAGE BODY 19c (19.10RUR)
- SYS.DBMS_SMB - PACKAGE BODY 19c (RU)
- SYS.DBMS_SMB_INTERNAL - PACKAGE BODY 19c (RU)
- SYS.DBMS_SODA - PACKAGE BODY 19c (RU)
- SYS.DBMS_SODA_UTIL - PACKAGE BODY 19c (RU)
- SYS.DBMS_SPM_INTERNAL - PACKAGE BODY 19c (RU)
- SYS.DBMS_SQLPATCH - PACKAGE BODY 19c (RU)
- SYS.DBMS_SQLTCB_INTERNAL - PACKAGE BODY 19c (RU)
- SYS.DBMS_SQLTUNE - PACKAGE BODY 19c (RU)
- SYS.DBMS_SQLTUNE_INTERNAL - PACKAGE BODY 19c (RU)
- SYS.DBMS_STREAMS_ADM_UTL - PACKAGE BODY 19c (RU)
- SYS.DBMS_STREAMS_ADM_UTL_INVOK - PACKAGE BODY 19c (RU)
- SYS.DBMS_STREAMS_DATAPUMP_UTIL - PACKAGE BODY 19c (RU)
- SYS.DBMS_SWRF_INTERNAL - PACKAGE BODY 19c (RU)
- SYS.DBMS_SWRF_REPORT_INTERNAL - PACKAGE BODY 19c (RU)
- SYS.DBMS_USER_CERTS - PACKAGE BODY 19c (RU)
- SYS.DBMS_XSTREAM_GG_INTERNAL - PACKAGE BODY 19c (RU)
- SYS.DBMS_XSTREAM_UTL_IVK - PACKAGE BODY 19c (RU)
- SYS.PRVT_COMPRESSION - PACKAGE BODY 19c (RU)
- SYS.DBMS_FEATURE_REGISTER_ALLFEAT - PROCEDURE 19c (RU)
- SYS.EXECASUSERID - PROCEDURE 19c (RU & 19.9RUR & 19.10RUR)
- SYS.LOGMNR$ALWAYSSUPLOG_PROC - PROCEDURE 19c (RU)
- SYS.JDOM_T - TYPE 19c (RU)
- SYS.JSON_ELEMENT_T - TYPE 19c (RU)
- SYS.JSON_OBJECT_T - TYPE 19c (RU)
- SYS.JSON_SCALAR_T - TYPE 19c (RU)
- SYS.SODA_COLLECTION_T - TYPE 19c (RU)
- SYS.SODA_OPERATION_T - TYPE 19c (RU)
- SYS.JDOM_T - TYPE BODY 19c (RU)
- SYS.JSON_ELEMENT_T - TYPE BODY 19c (RU)
- SYS.SODA_COLLECTION_T - TYPE BODY 19c (RU)
- SYS.SODA_OPERATION_T - TYPE BODY 19c (RU)
- SYS.ALL_BLOCKCHAIN_TABLES - VIEW 19c (RU)
- SYS.ALL_SNAPSHOTS - VIEW 19c (RU)
- SYS.AUDIT_UNIFIED_POLICIES - VIEW 19c (RU)
- SYS.CDB_AUTO_INDEX_VERIFICATIONS - VIEW 19c (RU)
- SYS.CDB_CERTIFICATES - VIEW 19c (RU)
- SYS.CDB_SNAPSHOTS - VIEW 19c (RU)
- SYS.DBA_AUTO_INDEX_VERIFICATIONS - VIEW 19c (RU)
- SYS.DBA_BLOCKCHAIN_TABLES - VIEW 19c (RU)
- SYS.DBA_GOLDENGATE_RULES - VIEW 19c (RU)
- SYS.DBA_JOBS - VIEW 19c (19.9RUR)
- SYS.DBA_JOBS_RUNNING - VIEW 19c (19.9RUR)
- SYS.DBA_REFRESH - VIEW 19c (RU)
- SYS.DBA_REFRESH_CHILDREN - VIEW 19c (RU)
- SYS.DBA_SNAPSHOTS - VIEW 19c (RU)
- SYS.DBA_SUPPLEMENTAL_LOGGING - VIEW 19c (RU)
- SYS.INT$AUDIT_UNIFIED_POLICIES - VIEW 19c (RU)
- SYS.USER_BLOCKCHAIN_TABLES - VIEW 19c (RU)
- SYS.USER_FLASHBACK_ARCHIVE_TABLES - VIEW 19c (RU)
- SYS.USER_SNAPSHOTS - VIEW 19c (RU)
- SYS._auto_index_log - VIEW 19c (RU)
- XDB.DBMS_SODA_ADMIN - PACKAGE 19c (RU)
- XDB.DBMS_SODA_ADMIN - PACKAGE BODY 19c (RU)
Changed Objects
P.S:
> = Added Lines
< = Removed Lines
12.1.0.2
1c1,13 < select owner, name table_name, --- > with redo_compat as > (select nvl((select min(s.redo_compat) > from system.logstdby$parameters p, > system.logmnr_session$ s, > sys.v$database d > where p.name in ('LMNR_SID', 'FUTURE_SESSION') and > p.value = s.session# and > d.database_role = 'LOGICAL STANDBY'), > (select p.value > from sys.v$parameter p > where p.name = 'compatible')) compat > from dual) > select owner, name table_name, 13c25,51 < from table(logstdby$tabf) l, tab$ t --- > from ( > select u.owner, u.name, u.type#, u.obj#, u.current_sby, u.gensby > from logstdby_support_tab_10_1 u, redo_compat c > where c.compat like '10.0%' or c.compat like '10.1%' or > c.compat like '8.%' or c.compat like '9.%' > UNION ALL > select u.owner, u.name, u.type#, u.obj#, u.current_sby, u.gensby > from logstdby_support_tab_10_2 u, redo_compat c > where c.compat like '10.2%' > UNION ALL > select u.owner, u.name, u.type#, u.obj#, u.current_sby, u.gensby > from logstdby_support_tab_11_1 u, redo_compat c > where c.compat like '11.0%' or c.compat like '11.1%' > UNION ALL > select u.owner, u.name, u.type#, u.obj#, u.current_sby, u.gensby > from logstdby_support_tab_11_2 u, redo_compat c > where c.compat like '11.2%' and c.compat not like '11.2.0.3%' > and c.compat not like '11.2.0.4%' > UNION ALL > select u.owner, u.name, u.type#, u.obj#, u.current_sby, u.gensby > from logstdby_support_tab_11_2b u, redo_compat c > where c.compat like '11.2.0.3%' or c.compat like '11.2.0.4%' > UNION ALL > select u.owner, u.name, u.type#, u.obj#, u.current_sby, u.gensby > from logstdby_support_tab_12_1 u, redo_compat c > where c.compat like '12.0%' or c.compat like '12.1%' > ) l, tab$ t
1c1,13 < select owner, table_name, column_name, attributes, --- > with redo_compat as > (select nvl((select min(s.redo_compat) > from system.logstdby$parameters p, > system.logmnr_session$ s, > sys.v$database d > where p.name in ('LMNR_SID', 'FUTURE_SESSION') and > p.value = s.session# and > d.database_role = 'LOGICAL STANDBY'), > (select p.value > from sys.v$parameter p > where p.name = 'compatible')) compat > from dual) > select owner, table_name, column_name, attributes, 36c48,80 < from table (logstdby$utabf('LOGSTDBY')) --- > from ( > select u.owner, u.table_name, u.column_name, u.scale, u.precision#, > u.charsetform, u.type#, u.attributes, u.gensby > from logstdby_unsupport_tab_10_1 u, redo_compat c > where c.compat like '10.0%' or c.compat like '10.1%' or > c.compat like '8.%' or c.compat like '9.%' > UNION ALL > select u.owner, u.table_name, u.column_name, u.scale, u.precision#, > u.charsetform, u.type#, u.attributes, u.gensby > from logstdby_unsupport_tab_10_2 u, redo_compat c > where c.compat like '10.2%' > UNION ALL > select u.owner, u.table_name, u.column_name, u.scale, u.precision#, > u.charsetform, u.type#, u.attributes, u.gensby > from logstdby_unsupport_tab_11_1 u, redo_compat c > where c.compat like '11.0%' or c.compat like '11.1%' > UNION ALL > select u.owner, u.table_name, u.column_name, u.scale, u.precision#, > u.charsetform, u.type#, u.attributes, u.gensby > from logstdby_unsupport_tab_11_2 u, redo_compat c > where c.compat like '11.2%' and c.compat not like '11.2.0.3%' > and c.compat not like '11.2.0.4%' > UNION ALL > select u.owner, u.table_name, u.column_name, u.scale, u.precision#, > u.charsetform, u.type#, u.attributes, u.gensby > from logstdby_unsupport_tab_11_2b u, redo_compat c > where c.compat like '11.2.0.3%' or c.compat like '11.2.0.4%' > UNION ALL > select u.owner, u.table_name, u.column_name, u.scale, u.precision#, > u.charsetform, u.type#, u.attributes, u.gensby > from logstdby_unsupport_tab_12_1 u, redo_compat c > where c.compat like '12.0%' or c.compat like '12.1%' > )
1,2c1,40 < select owner, name table_name < from table(sys.logstdby$tabf) --- > with redo_compat as > (select nvl((select min(s.redo_compat) > from system.logstdby$parameters p, > system.logmnr_session$ s, > sys.v$database d > where p.name in ('LMNR_SID', 'FUTURE_SESSION') and > p.value = s.session# and > d.database_role = 'LOGICAL STANDBY'), > (select p.value > from sys.v$parameter p > where p.name = 'compatible')) compat > from dual) > select owner, name table_name > from ( > select u.owner, u.name, u.gensby > from logstdby_support_tab_10_1 u, redo_compat c > where c.compat like '10.0%' or c.compat like '10.1%' or > c.compat like '8.%' or c.compat like '9.%' > UNION ALL > select u.owner, u.name, u.gensby > from logstdby_support_tab_10_2 u, redo_compat c > where c.compat like '10.2%' > UNION ALL > select u.owner, u.name, u.gensby > from logstdby_support_tab_11_1 u, redo_compat c > where c.compat like '11.0%' or c.compat like '11.1%' > UNION ALL > select u.owner, u.name, u.gensby > from logstdby_support_tab_11_2 u, redo_compat c > where c.compat like '11.2%' and c.compat not like '11.2.0.3%' > and c.compat not like '11.2.0.4%' > UNION ALL > select u.owner, u.name, u.gensby > from logstdby_support_tab_11_2b u, redo_compat c > where c.compat like '11.2.0.3%' or c.compat like '11.2.0.4%' > UNION ALL > select u.owner, u.name, u.gensby > from logstdby_support_tab_12_1 u, redo_compat c > where c.compat like '12.0%' or c.compat like '12.1%' > )
1c1,13 < select owner, table_name, column_name, attributes, --- > with redo_compat as > (select nvl((select min(s.redo_compat) > from system.logstdby$parameters p, > system.logmnr_session$ s, > sys.v$database d > where p.name in ('LMNR_SID', 'FUTURE_SESSION') and > p.value = s.session# and > d.database_role = 'LOGICAL STANDBY'), > (select p.value > from sys.v$parameter p > where p.name = 'compatible')) compat > from dual) > select owner, table_name, column_name, attributes, 36c48,80 < from table (logstdby$utabf('ROLLING')) --- > from ( > select u.owner, u.table_name, u.column_name, u.scale, u.precision#, > u.charsetform, u.type#, u.attributes, u.gensby > from logstdby_unsupport_tab_10_1 u, redo_compat c > where c.compat like '10.0%' or c.compat like '10.1%' or > c.compat like '8.%' or c.compat like '9.%' > UNION ALL > select u.owner, u.table_name, u.column_name, u.scale, u.precision#, > u.charsetform, u.type#, u.attributes, u.gensby > from logstdby_unsupport_tab_10_2 u, redo_compat c > where c.compat like '10.2%' > UNION ALL > select u.owner, u.table_name, u.column_name, u.scale, u.precision#, > u.charsetform, u.type#, u.attributes, u.gensby > from logstdby_unsupport_tab_11_1 u, redo_compat c > where c.compat like '11.0%' or c.compat like '11.1%' > UNION ALL > select u.owner, u.table_name, u.column_name, u.scale, u.precision#, > u.charsetform, u.type#, u.attributes, u.gensby > from logstdby_unsupport_tab_11_2 u, redo_compat c > where c.compat like '11.2%' and c.compat not like '11.2.0.3%' > and c.compat not like '11.2.0.4%' > UNION ALL > select u.owner, u.table_name, u.column_name, u.scale, u.precision#, > u.charsetform, u.type#, u.attributes, u.gensby > from logstdby_unsupport_tab_11_2b u, redo_compat c > where c.compat like '11.2.0.3%' or c.compat like '11.2.0.4%' > UNION ALL > select u.owner, u.table_name, u.column_name, u.scale, u.precision#, > u.charsetform, u.type#, u.attributes, u.gensby > from logstdby_ru_unsupport_tab_12_1 u, redo_compat c > where c.compat like '12.0%' or c.compat like '12.1%' > )
1c1,13 < select owner, name, type#, obj#, gensby full_sby, current_sby, --- > with redo_compat as > (select nvl((select min(s.redo_compat) > from system.logstdby$parameters p, > system.logmnr_session$ s, > sys.v$database d > where p.name in ('LMNR_SID', 'FUTURE_SESSION') and > p.value = s.session# and > d.database_role = 'LOGICAL STANDBY'), > (select p.value > from sys.v$parameter p > where p.name = 'compatible')) compat > from dual) > select owner, name, type#, obj#, gensby full_sby, current_sby, 29c41,67 < select * from table(logstdby$tabf)) l --- > select * from ( > select u.owner, u.name, u.type#, u.obj#, u.current_sby, u.gensby > from logstdby_support_tab_10_1 u, redo_compat c > where c.compat like '10.0%' or c.compat like '10.1%' or > c.compat like '8.%' or c.compat like '9.%' > UNION ALL > select u.owner, u.name, u.type#, u.obj#, u.current_sby, u.gensby > from logstdby_support_tab_10_2 u, redo_compat c > where c.compat like '10.2%' > UNION ALL > select u.owner, u.name, u.type#, u.obj#, u.current_sby, u.gensby > from logstdby_support_tab_11_1 u, redo_compat c > where c.compat like '11.0%' or c.compat like '11.1%' > UNION ALL > select u.owner, u.name, u.type#, u.obj#, u.current_sby, u.gensby > from logstdby_support_tab_11_2 u, redo_compat c > where c.compat like '11.2%' and c.compat not like '11.2.0.3%' > and c.compat not like '11.2.0.4%' > UNION ALL > select u.owner, u.name, u.type#, u.obj#, u.current_sby, u.gensby > from logstdby_support_tab_11_2b u, redo_compat c > where c.compat like '11.2.0.3%' or c.compat like '11.2.0.4%' > UNION ALL > select u.owner, u.name, u.type#, u.obj#, u.current_sby, u.gensby > from logstdby_support_tab_12_1 u, redo_compat c > where c.compat like '12.0%' or c.compat like '12.1%') > ) l
12.2.0.1
3028d3027 < 3060c3059 < || 'cross_shard=' || CROSS_SHARD); --- > || ' cross_shard=' || CROSS_SHARD); 3612c3611 < PUBKEY RAW(2000); --- > PUBKEY RAW(4000);
106c106,108 < EXECUTE IMMEDIATE 'SELECT count(private_key) FROM gsmadmin_internal.cloud' --- > EXECUTE IMMEDIATE > 'SELECT count(*) > FROM gsmadmin_internal.cloud where private_key is not null'
365a366 > 391c392 < CHUNK_NUMBER IN --- > CHUNK_NUMBER IN 393c394 < WHERE DATABASE_NUM = DBS(I).DATABASE_NUM AND --- > WHERE DATABASE_NUM = DBS(I).DATABASE_NUM AND 395c396 < ROWNUM <=DBS(I).SHAR; --- > ROWNUM <=DBS(I).SHAR; 398c399 < END SPREADROONDG; --- > END SPREADROONDG; 1355c1356 < LOC_PUBKEY RAW(2000); --- > LOC_PUBKEY RAW(4000); 4410c4411 < LOC_PUBKEY RAW(2000); --- > LOC_PUBKEY RAW(4000); 18324c18325 < STMT VARCHAR2(2000); --- > STMT VARCHAR2(4000); 18340c18341 < TMPVAR RAW(2000); --- > TMPVAR RAW(4000); 18755c18756 < LEFT OUTER JOIN DATABASE D --- > LEFT OUTER JOIN DATABASE D 18955d18955 <
18.0.0.0
12c12 < bannerVersion CONSTANT VARCHAR2(15) := '18.12.01.00'; --- > bannerVersion CONSTANT VARCHAR2(15) := '18.12.02.00'; 24,26c24,26 < fsn CONSTANT NUMBER := instr('18.12.01.00', '.'); < msn CONSTANT NUMBER := instr('18.12.01.00', '.', fsn + 1); < psn CONSTANT NUMBER := instr('18.12.01.00', '.', msn + 1); --- > fsn CONSTANT NUMBER := instr('18.12.02.00', '.'); > msn CONSTANT NUMBER := instr('18.12.02.00', '.', fsn + 1); > psn CONSTANT NUMBER := instr('18.12.02.00', '.', msn + 1); 29c29 < to_number(substr('18.12.01.00', 1, fsn - 1)); --- > to_number(substr('18.12.02.00', 1, fsn - 1)); 31c31 < to_number(substr('18.12.01.00', fsn + 1, msn - fsn - 1)); --- > to_number(substr('18.12.02.00', fsn + 1, msn - fsn - 1)); 33c33 < to_number(substr('18.12.01.00', msn + 1, psn - msn - 1)); --- > to_number(substr('18.12.02.00', msn + 1, psn - msn - 1)); 35c35 < to_number(substr('18.12.01.00', psn + 1)); --- > to_number(substr('18.12.02.00', psn + 1));
12c12 < bannerVersion CONSTANT VARCHAR2(15) := '18.13.00.00'; --- > bannerVersion CONSTANT VARCHAR2(15) := '18.13.01.00'; 24,26c24,26 < fsn CONSTANT NUMBER := instr('18.13.00.00', '.'); < msn CONSTANT NUMBER := instr('18.13.00.00', '.', fsn + 1); < psn CONSTANT NUMBER := instr('18.13.00.00', '.', msn + 1); --- > fsn CONSTANT NUMBER := instr('18.13.01.00', '.'); > msn CONSTANT NUMBER := instr('18.13.01.00', '.', fsn + 1); > psn CONSTANT NUMBER := instr('18.13.01.00', '.', msn + 1); 29c29 < to_number(substr('18.13.00.00', 1, fsn - 1)); --- > to_number(substr('18.13.01.00', 1, fsn - 1)); 31c31 < to_number(substr('18.13.00.00', fsn + 1, msn - fsn - 1)); --- > to_number(substr('18.13.01.00', fsn + 1, msn - fsn - 1)); 33c33 < to_number(substr('18.13.00.00', msn + 1, psn - msn - 1)); --- > to_number(substr('18.13.01.00', msn + 1, psn - msn - 1)); 35c35 < to_number(substr('18.13.00.00', psn + 1)); --- > to_number(substr('18.13.01.00', psn + 1));
12c12 < bannerVersion CONSTANT VARCHAR2(15) := '18.13.00.00'; --- > bannerVersion CONSTANT VARCHAR2(15) := '18.14.00.00'; 24,26c24,26 < fsn CONSTANT NUMBER := instr('18.13.00.00', '.'); < msn CONSTANT NUMBER := instr('18.13.00.00', '.', fsn + 1); < psn CONSTANT NUMBER := instr('18.13.00.00', '.', msn + 1); --- > fsn CONSTANT NUMBER := instr('18.14.00.00', '.'); > msn CONSTANT NUMBER := instr('18.14.00.00', '.', fsn + 1); > psn CONSTANT NUMBER := instr('18.14.00.00', '.', msn + 1); 29c29 < to_number(substr('18.13.00.00', 1, fsn - 1)); --- > to_number(substr('18.14.00.00', 1, fsn - 1)); 31c31 < to_number(substr('18.13.00.00', fsn + 1, msn - fsn - 1)); --- > to_number(substr('18.14.00.00', fsn + 1, msn - fsn - 1)); 33c33 < to_number(substr('18.13.00.00', msn + 1, psn - msn - 1)); --- > to_number(substr('18.14.00.00', msn + 1, psn - msn - 1)); 35c35 < to_number(substr('18.13.00.00', psn + 1)); --- > to_number(substr('18.14.00.00', psn + 1));
13c13 < '18.13.0.0.0'; --- > '18.13.1.0.0';
13c13 < '18.12.1.0.0'; --- > '18.12.2.0.0';
13c13 < '18.13.0.0.0'; --- > '18.14.0.0.0';
122c122 < CATALOGVERSION CONSTANT VARCHAR2(11) := '18.13.00.00'; --- > CATALOGVERSION CONSTANT VARCHAR2(11) := '18.13.01.00';
122c122 < CATALOGVERSION CONSTANT VARCHAR2(11) := '18.13.00.00'; --- > CATALOGVERSION CONSTANT VARCHAR2(11) := '18.14.00.00';
122c122 < CATALOGVERSION CONSTANT VARCHAR2(11) := '18.12.01.00'; --- > CATALOGVERSION CONSTANT VARCHAR2(11) := '18.12.02.00';
2c2 < nvl(m.obj#, x.objn), --- > m.obj#, 15c15 < from sys.mon_mods_all$ m full outer join --- > from sys.mon_mods_all$ m, 19c19,33 < on m.obj# = x.objn --- > where m.obj# = x.objn(+) > union all > select > x.objn, > nvl(x.ins, 0), > nvl(x.upd, 0), > nvl(x.del, 0), > sysdate, /* assume sysdate as timestamp for mods in memory */ > nvl(x.flags, 0), > nvl(x.dropseg, 0) > from sys.mon_mods_all$ m, > (select objn, sum(ins) ins, sum(upd) upd, sum(del) del, > max(bitand(flags, 1)) flags, sum(dropseg) dropseg > from sys.gv$dml_stats group by objn) x > where x.objn = m.obj#(+) and m.obj# is null
19.0.0.0
2170a2171,2172 > > 2172c2174 < NAME = UPPER(SYS_CONTEXT('USERENV', 'CON_NAME')); --- > NAME = SYS_CONTEXT('USERENV', 'CON_NAME'); 5583a5586,5589 > > > EXECUTE IMMEDIATE 'alter session set "_skip_app_object_check" =true'; > 5588a5595,5596 > > EXECUTE IMMEDIATE 'alter session set "_skip_app_object_check" =false'; 5596a5605,5606 > > EXECUTE IMMEDIATE 'alter session set "_skip_app_object_check" =false'; 5833a5844,5846 > M_NO_ROWS_STAT VARCHAR2(500); > M_CLI_TAB_NAME VARCHAR2(128); > M_NO_CLI_ROWS NUMBER := 0; 5848c5861,5874 < RAISE_ORA_ERROR(46250, 'CONTAINER_GUID'); --- > > > FOR C_CLI_SWP_TABLE IN > (SELECT NAME FROM SYS.CLI_TAB$ > WHERE GUID=M_CONTAINER_GUID AND NAME LIKE '%CLI_SWP%') > LOOP > M_CLI_TAB_NAME := DBMS_ASSERT.ENQUOTE_NAME(C_CLI_SWP_TABLE.NAME,FALSE); > M_NO_ROWS_STAT := 'select count(*) from audsys.'||M_CLI_TAB_NAME; > EXECUTE IMMEDIATE M_NO_ROWS_STAT INTO M_NO_CLI_ROWS; > EXIT WHEN M_NO_CLI_ROWS > 0; > END LOOP; > IF M_NO_CLI_ROWS > 0 THEN > RAISE_ORA_ERROR(46250, 'CONTAINER_GUID'); > END IF;
150c150,151 < IF (DRVUTL.ISPDBLOCKDOWN() = TRUE) THEN --- > > IF (DRVUTL.ISLOGGINGLOCKDOWN() = TRUE) THEN
27a28,35 > IF ((IDXO = CHR(0) OR IDXO IS NULL) OR > (IDXN = CHR(0) OR IDXN IS NULL) OR > IDXP = CHR(0)) THEN > DRUE.PUSH(DRIG.AC_OBJ_INVALID_FMT); > RAISE DR_DEF.TEXTILE_ERROR; > END IF; > >
211a212,226 > PROCEDURE EXEC_DDL ( > STMT IN CLOB, > IGNORE_ERRORS IN BOOLEAN DEFAULT FALSE > ) IS > BEGIN > > EXECUTE IMMEDIATE DBMS_ASSERT.NOOP(STMT); > > EXCEPTION > WHEN OTHERS THEN > IF (NOT IGNORE_ERRORS) THEN > RAISE DR_DEF.TEXTILE_ERROR; > END IF; > END EXEC_DDL; > 223a239,242 > XPFX DRVUTL.DR_QLID2; > I_SQL DRVUTL.DR_EXTRABUF; > LOWNER DRVUTL.DR_QID := DBMS_ASSERT.ENQUOTE_NAME(IDX.IDX_OWNER, FALSE); > LNAME DRVUTL.DR_QID := DBMS_ASSERT.ENQUOTE_NAME(IDX.IDX_NAME, FALSE); 264c283,294 < --- > > > > > XPFX := DRIUTL.MAKE_PFX(LOWNER, LNAME, '$', NULL); > > IF(DRIXMD.CHKINDEXOPTION(IDX.IDX_ID, 'H') <> > DRIXMD.CHKINDEXOPTION(IDX_SHADOW.IDX_ID, 'H')) THEN > I_SQL := 'alter table '||XPFX||'I" add token_offsets blob'; > EXEC_DDL(I_SQL); > END IF; > 334c364 < --- >
449,453c449,457 < IF(DRIXMD.CHKINDEXOPTION(IDXID, 'H') <> < DRIXMD.CHKINDEXOPTION(SHADOW_IDXID, 'H')) THEN < I_SQL := 'alter table '||XPFX||'I" add token_offsets blob'; < EXEC_DDL(I_SQL); < END IF; --- > > > > > > > > >
1712a1713 > err_bad_ddl constant number := -3893; 2311c2312,2313 < --- > bad_ddl EXCEPTION; > PRAGMA EXCEPTION_INIT(bad_ddl, -3893);
3561a3562 > DBMS_GSM_COMMON.WRITETOGWMTRACING('Sync: re-build DB-links'); 4318a4320,4322 > > SYS.DBMS_GSM_FIXED.SETCATALOGSYSLINK(GSMUSRPWD, GSM_ENDPOINT); > 4358a4363,4364 > > 7158,7163c7164,7170 < POS := INSTR(OP_STRING, ';'); < CUR_USER := SUBSTR(OP_STRING, 1, POS-1); < OP_STRING := SUBSTR(OP_STRING, POS+1); < DBMS_GSM_COMMON.WRITETOGWMTRACING('executeGenericProcedure: Executing ' < || OP_STRING || ' as ' || CUR_USER); < SYS.EXECASUSER(CUR_USER, TO_CLOB(OP_STRING)); --- > NULL; > > > > > >
1047a1048,1049 > SINGLE NUMBER; > UKN NUMBER; 1055a1058,1076 > > IF RAC_STATUS = GWM_RAC_ADMIN THEN > > SELECT COUNT(*) INTO SINGLE > FROM V$INSTANCE WHERE DATABASE_TYPE = 'SINGLE'; > IF SINGLE > 0 THEN > > RAC_STATUS := GWM_RAC_SIHA; > END IF; > > SELECT COUNT(*) INTO UKN > FROM V$INSTANCE WHERE DATABASE_TYPE = 'UNKNOWN'; > IF UKN > 0 THEN > > > RAC_STATUS := GWM_NORAC; > END IF; > END IF; > 4318a4340,4343 > > > SYS.DBMS_GSM_FIXED.SETCATALOGSYSLINK(GSMUSRPWD, GSM_ENDPOINT); > 4358a4384,4385 > > 7158,7163c7185,7191 < POS := INSTR(OP_STRING, ';'); < CUR_USER := SUBSTR(OP_STRING, 1, POS-1); < OP_STRING := SUBSTR(OP_STRING, POS+1); < DBMS_GSM_COMMON.WRITETOGWMTRACING('executeGenericProcedure: Executing ' < || OP_STRING || ' as ' || CUR_USER); < SYS.EXECASUSER(CUR_USER, TO_CLOB(OP_STRING)); --- > NULL; > > > > > >
14075,14101d14074 < IF NOT DB_ROLE = DBMS_GSM_COMMON.DB_ROLE_NONE < OR LAG = DBMS_GSM_COMMON.SPECIFIED_LAG < OR FAILOVER_PRIMARY = DBMS_GSM_COMMON.FAILOVER_PRIMARY_ON THEN < < IF LOC_POOL_TYPE = DBMS_GSM_COMMON.POOL_NOTSHARDED AND < NOT ISBROKERCONFIG(LOC_POOL_NAME) THEN < < IF NOT DB_ROLE = DBMS_GSM_COMMON.DB_ROLE_NONE THEN < SYS.DBMS_SYS_ERROR.RAISE_SYSTEM_ERROR( < DBMS_GSM_UTILITY.ERR_SVC_NON_BC); < END IF; < < IF LAG = DBMS_GSM_COMMON.SPECIFIED_LAG THEN < SYS.DBMS_SYS_ERROR.RAISE_SYSTEM_ERROR(DBMS_GSM_UTILITY.ERR_SVC_LAG); < END IF; < < IF FAILOVER_PRIMARY = DBMS_GSM_COMMON.FAILOVER_PRIMARY_ON THEN < SYS.DBMS_SYS_ERROR.RAISE_SYSTEM_ERROR( < DBMS_GSM_UTILITY.ERR_SVC_FAILOVER); < END IF; < < END IF; < < END IF; < < < 18872c18845,18846 < ELSIF DEPLOY_STATE = SS_DEPLOYED THEN --- > ELSIF DEPLOY_STATE = SS_DEPLOYED > AND SKIP_MOVE = DBMS_GSM_COMMON.ISFALSE THEN 22506,22507c22480,22488 < SYS.EXECASUSER(CUR_USER, TO_CLOB(L_STMT)); < END IF; --- > BEGIN > DBMS_SESSION.SET_CONTEXT('shard_ctx', 'int_ddl', 'TRUE'); > SYS.EXECASUSER(CUR_USER, TO_CLOB(L_STMT)); > DBMS_SESSION.CLEAR_CONTEXT('shard_ctx', ATTRIBUTE=>'int_ddl'); > EXCEPTION WHEN OTHERS THEN > DBMS_SESSION.CLEAR_CONTEXT('shard_ctx', ATTRIBUTE=>'int_ddl'); > RAISE; > END; > END IF;
22506,22507c22506,22514 < SYS.EXECASUSER(CUR_USER, TO_CLOB(L_STMT)); < END IF; --- > BEGIN > DBMS_SESSION.SET_CONTEXT('shard_ctx', 'int_ddl', 'TRUE'); > SYS.EXECASUSER(CUR_USER, TO_CLOB(L_STMT)); > DBMS_SESSION.CLEAR_CONTEXT('shard_ctx', ATTRIBUTE=>'int_ddl'); > EXCEPTION WHEN OTHERS THEN > DBMS_SESSION.CLEAR_CONTEXT('shard_ctx', ATTRIBUTE=>'int_ddl'); > RAISE; > END; > END IF;
1230c1230,1237 < SYS.EXECASUSERID(USER_ID, LOC_DDL_TEXT); --- > BEGIN > DBMS_SESSION.SET_CONTEXT('shard_ctx2', 'int_ddl', 'TRUE'); > SYS.EXECASUSERID(USER_ID, LOC_DDL_TEXT); > DBMS_SESSION.CLEAR_CONTEXT('shard_ctx2', ATTRIBUTE=>'int_ddl'); > EXCEPTION WHEN OTHERS THEN > DBMS_SESSION.CLEAR_CONTEXT('shard_ctx2', ATTRIBUTE=>'int_ddl'); > RAISE; > END; 2728c2735,2742 < SYS.EXECASUSER(USER_NAME, CRTSTMT); --- > BEGIN > DBMS_SESSION.SET_CONTEXT('shard_ctx2', 'int_ddl', 'TRUE'); > SYS.EXECASUSER(USER_NAME, CRTSTMT); > DBMS_SESSION.CLEAR_CONTEXT('shard_ctx2', ATTRIBUTE=>'int_ddl'); > EXCEPTION WHEN OTHERS THEN > DBMS_SESSION.CLEAR_CONTEXT('shard_ctx2', ATTRIBUTE=>'int_ddl'); > RAISE; > END; 2834c2848,2855 < SYS.EXECASUSER(USER_NAME, PRIVSTMT); --- > BEGIN > DBMS_SESSION.SET_CONTEXT('shard_ctx2', 'int_ddl', 'TRUE'); > SYS.EXECASUSER(USER_NAME, PRIVSTMT); > DBMS_SESSION.CLEAR_CONTEXT('shard_ctx2', ATTRIBUTE=>'int_ddl'); > EXCEPTION WHEN OTHERS THEN > DBMS_SESSION.CLEAR_CONTEXT('shard_ctx2', ATTRIBUTE=>'int_ddl'); > RAISE; > END; 2929c2950,2957 < SYS.EXECASUSER(USER_NAME, PRIVSTMT); --- > BEGIN > DBMS_SESSION.SET_CONTEXT('shard_ctx2', 'int_ddl', 'TRUE'); > SYS.EXECASUSER(USER_NAME, PRIVSTMT); > DBMS_SESSION.CLEAR_CONTEXT('shard_ctx2', ATTRIBUTE=>'int_ddl'); > EXCEPTION WHEN OTHERS THEN > DBMS_SESSION.CLEAR_CONTEXT('shard_ctx2', ATTRIBUTE=>'int_ddl'); > RAISE; > END;
1984a1985,2011 > Function generateStatistics > ( > georaster IN MDSYS.SDO_GEORASTER, > mask IN MDSYS.SDO_GEORASTER, > pyramidLevel IN NUMBER, > samplingFactor IN VARCHAR2, > samplingWindow IN MDSYS.SDO_NUMBER_ARRAY, > bandNumbers IN VARCHAR2 DEFAULT NULL, > nodata IN VARCHAR2 DEFAULT 'FALSE', > parallelParam IN VARCHAR2 DEFAULT NULL > ) > return MDSYS.SDO_NUMBER_ARRAY; > > Function generateStatistics > ( > georaster IN MDSYS.SDO_GEORASTER, > mask IN MDSYS.SDO_GEORASTER, > pyramidLevel IN NUMBER, > samplingFactor IN VARCHAR2, > samplingWindow IN MDSYS.SDO_GEOMETRY, > bandNumbers IN VARCHAR2 DEFAULT NULL, > nodata IN VARCHAR2 DEFAULT 'FALSE', > polygonClip IN VARCHAR2 DEFAULT NULL, > parallelParam IN VARCHAR2 DEFAULT NULL > ) > return MDSYS.SDO_NUMBER_ARRAY; > 2009a2037,2063 > Function generateStatisticsMax > ( > georaster IN MDSYS.SDO_GEORASTER, > mask IN MDSYS.SDO_GEORASTER, > pyramidLevel IN NUMBER, > samplingFactor IN VARCHAR2, > samplingWindow IN MDSYS.SDO_NUMBER_ARRAY, > bandNumbers IN VARCHAR2 DEFAULT NULL, > nodata IN VARCHAR2 DEFAULT 'FALSE', > parallelParam IN VARCHAR2 DEFAULT NULL > ) > return NUMBER; > > Function generateStatisticsMax > ( > georaster IN MDSYS.SDO_GEORASTER, > mask IN MDSYS.SDO_GEORASTER, > pyramidLevel IN NUMBER, > samplingFactor IN VARCHAR2, > samplingWindow IN MDSYS.SDO_GEOMETRY, > bandNumbers IN VARCHAR2 DEFAULT NULL, > nodata IN VARCHAR2 DEFAULT 'FALSE', > polygonClip IN VARCHAR2 DEFAULT NULL, > parallelParam IN VARCHAR2 DEFAULT NULL > ) > return NUMBER; > 2034a2089,2140 > Function generateStatisticsMin > ( > georaster IN MDSYS.SDO_GEORASTER, > mask IN MDSYS.SDO_GEORASTER, > pyramidLevel IN NUMBER, > samplingFactor IN VARCHAR2, > samplingWindow IN MDSYS.SDO_NUMBER_ARRAY, > bandNumbers IN VARCHAR2 DEFAULT NULL, > nodata IN VARCHAR2 DEFAULT 'FALSE', > parallelParam IN VARCHAR2 DEFAULT NULL > ) > return NUMBER; > > Function generateStatisticsMin > ( > georaster IN MDSYS.SDO_GEORASTER, > mask IN MDSYS.SDO_GEORASTER, > pyramidLevel IN NUMBER, > samplingFactor IN VARCHAR2, > samplingWindow IN MDSYS.SDO_GEOMETRY, > bandNumbers IN VARCHAR2 DEFAULT NULL, > nodata IN VARCHAR2 DEFAULT 'FALSE', > polygonClip IN VARCHAR2 DEFAULT NULL, > parallelParam IN VARCHAR2 DEFAULT NULL > ) > return NUMBER; > > Function generateStatisticsMean > ( > georaster IN MDSYS.SDO_GEORASTER, > pyramidLevel IN NUMBER, > samplingFactor IN VARCHAR2, > samplingWindow IN MDSYS.SDO_NUMBER_ARRAY, > bandNumbers IN VARCHAR2 DEFAULT NULL, > nodata IN VARCHAR2 DEFAULT 'FALSE', > parallelParam IN VARCHAR2 DEFAULT NULL > ) > return NUMBER; > > Function generateStatisticsMean > ( > georaster IN MDSYS.SDO_GEORASTER, > pyramidLevel IN NUMBER, > samplingFactor IN VARCHAR2, > samplingWindow IN MDSYS.SDO_GEOMETRY, > bandNumbers IN VARCHAR2 DEFAULT NULL, > nodata IN VARCHAR2 DEFAULT 'FALSE', > polygonClip IN VARCHAR2 DEFAULT NULL, > parallelParam IN VARCHAR2 DEFAULT NULL > ) > return NUMBER; > 2037a2144 > mask IN MDSYS.SDO_GEORASTER, 2049a2157 > mask IN MDSYS.SDO_GEORASTER, 2058a2167 > 2083a2193,2243 > Function generateStatisticsSTD > ( > georaster IN MDSYS.SDO_GEORASTER, > mask IN MDSYS.SDO_GEORASTER, > pyramidLevel IN NUMBER, > samplingFactor IN VARCHAR2, > samplingWindow IN MDSYS.SDO_NUMBER_ARRAY, > bandNumbers IN VARCHAR2 DEFAULT NULL, > nodata IN VARCHAR2 DEFAULT 'FALSE', > parallelParam IN VARCHAR2 DEFAULT NULL > ) > return NUMBER; > > Function generateStatisticsSTD > ( > georaster IN MDSYS.SDO_GEORASTER, > mask IN MDSYS.SDO_GEORASTER, > pyramidLevel IN NUMBER, > samplingFactor IN VARCHAR2, > samplingWindow IN MDSYS.SDO_GEOMETRY, > bandNumbers IN VARCHAR2 DEFAULT NULL, > nodata IN VARCHAR2 DEFAULT 'FALSE', > polygonClip IN VARCHAR2 DEFAULT NULL, > parallelParam IN VARCHAR2 DEFAULT NULL > ) > return NUMBER; > > Function generateStatisticsMedian > ( > georaster IN MDSYS.SDO_GEORASTER, > pyramidLevel IN NUMBER, > samplingFactor IN VARCHAR2, > samplingWindow IN MDSYS.SDO_NUMBER_ARRAY, > bandNumbers IN VARCHAR2 DEFAULT NULL, > nodata IN VARCHAR2 DEFAULT 'FALSE', > parallelParam IN VARCHAR2 DEFAULT NULL > ) > return NUMBER; > > Function generateStatisticsMedian > ( > georaster IN MDSYS.SDO_GEORASTER, > pyramidLevel IN NUMBER, > samplingFactor IN VARCHAR2, > samplingWindow IN MDSYS.SDO_GEOMETRY, > bandNumbers IN VARCHAR2 DEFAULT NULL, > nodata IN VARCHAR2 DEFAULT 'FALSE', > polygonClip IN VARCHAR2 DEFAULT NULL, > parallelParam IN VARCHAR2 DEFAULT NULL > ) > return NUMBER; 2087a2248 > mask IN MDSYS.SDO_GEORASTER, 2099a2261,2286 > mask IN MDSYS.SDO_GEORASTER, > pyramidLevel IN NUMBER, > samplingFactor IN VARCHAR2, > samplingWindow IN MDSYS.SDO_GEOMETRY, > bandNumbers IN VARCHAR2 DEFAULT NULL, > nodata IN VARCHAR2 DEFAULT 'FALSE', > polygonClip IN VARCHAR2 DEFAULT NULL, > parallelParam IN VARCHAR2 DEFAULT NULL > ) > return NUMBER; > > Function generateStatisticsMode > ( > georaster IN MDSYS.SDO_GEORASTER, > pyramidLevel IN NUMBER, > samplingFactor IN VARCHAR2, > samplingWindow IN MDSYS.SDO_NUMBER_ARRAY, > bandNumbers IN VARCHAR2 DEFAULT NULL, > nodata IN VARCHAR2 DEFAULT 'FALSE', > parallelParam IN VARCHAR2 DEFAULT NULL > ) > return NUMBER; > > Function generateStatisticsMode > ( > georaster IN MDSYS.SDO_GEORASTER, 2112a2300 > mask IN MDSYS.SDO_GEORASTER, 2124a2313,2365 > mask IN MDSYS.SDO_GEORASTER, > pyramidLevel IN NUMBER, > samplingFactor IN VARCHAR2, > samplingWindow IN MDSYS.SDO_GEOMETRY, > bandNumbers IN VARCHAR2 DEFAULT NULL, > nodata IN VARCHAR2 DEFAULT 'FALSE', > polygonClip IN VARCHAR2 DEFAULT NULL, > parallelParam IN VARCHAR2 DEFAULT NULL > ) > return NUMBER; > > Function generateStatisticsSum > ( > georaster IN MDSYS.SDO_GEORASTER, > pyramidLevel IN NUMBER, > samplingFactor IN VARCHAR2, > samplingWindow IN MDSYS.SDO_NUMBER_ARRAY, > bandNumbers IN VARCHAR2 DEFAULT NULL, > nodata IN VARCHAR2 DEFAULT 'FALSE', > parallelParam IN VARCHAR2 DEFAULT NULL > ) > return NUMBER; > > Function generateStatisticsSum > ( > georaster IN MDSYS.SDO_GEORASTER, > pyramidLevel IN NUMBER, > samplingFactor IN VARCHAR2, > samplingWindow IN MDSYS.SDO_GEOMETRY, > bandNumbers IN VARCHAR2 DEFAULT NULL, > nodata IN VARCHAR2 DEFAULT 'FALSE', > polygonClip IN VARCHAR2 DEFAULT NULL, > parallelParam IN VARCHAR2 DEFAULT NULL > ) > return NUMBER; > > Function generateStatisticsSum > ( > georaster IN MDSYS.SDO_GEORASTER, > mask IN MDSYS.SDO_GEORASTER, > pyramidLevel IN NUMBER, > samplingFactor IN VARCHAR2, > samplingWindow IN MDSYS.SDO_NUMBER_ARRAY, > bandNumbers IN VARCHAR2 DEFAULT NULL, > nodata IN VARCHAR2 DEFAULT 'FALSE', > parallelParam IN VARCHAR2 DEFAULT NULL > ) > return NUMBER; > > Function generateStatisticsSum > ( > georaster IN MDSYS.SDO_GEORASTER, > mask IN MDSYS.SDO_GEORASTER,
440a441,494 > FUNCTION GENERATESTATISTICSMASKP > ( > SRCRDT IN VARCHAR2, > SRCRID IN NUMBER, > X11 IN NUMBER, > Y11 IN NUMBER, > X12 IN NUMBER, > Y12 IN NUMBER, > MASKRDT IN VARCHAR2, > MASKRID IN NUMBER, > X21 IN NUMBER, > Y21 IN NUMBER, > X22 IN NUMBER, > Y22 IN NUMBER, > BANDS IN VARCHAR2, > SAMPLINGFACTOR IN PLS_INTEGER, > NODATA IN PLS_INTEGER, > DEGREE IN NUMBER, > PYRAMIDLEVEL IN PLS_INTEGER, > POLYGONCLIP IN PLS_INTEGER, > INTERGEOM IN MDSYS.SDO_GEOMETRY, > STMTHP IN SDO_GEOR_INT.PARALLELREFCUR > )RETURN SDO_GEOR_STATS > PIPELINED > PARALLEL_ENABLE (PARTITION STMTHP BY HASH(PID)); > > FUNCTION GENERATESTATISTICSMASK1P > ( > SRCRDT IN VARCHAR2, > SRCRID IN NUMBER, > X11 IN NUMBER, > Y11 IN NUMBER, > X12 IN NUMBER, > Y12 IN NUMBER, > MASKRDT IN VARCHAR2, > MASKRID IN NUMBER, > X21 IN NUMBER, > Y21 IN NUMBER, > X22 IN NUMBER, > Y22 IN NUMBER, > BANDS IN VARCHAR2, > SAMPLINGFACTOR IN PLS_INTEGER, > NODATA IN PLS_INTEGER, > MMAX IN NUMBER, > MMIN IN NUMBER, > DEGREE IN NUMBER, > PYRAMIDLEVEL IN PLS_INTEGER, > POLYGONCLIP IN PLS_INTEGER, > INTERGEOM IN MDSYS.SDO_GEOMETRY, > STMTHP IN SDO_GEOR_INT.PARALLELREFCUR > )RETURN SDO_GEOR_HIST_STATS > PIPELINED > PARALLEL_ENABLE (PARTITION STMTHP BY HASH(PID)); >
900a901,946 > FUNCTION GENERATESTATISTICSMASKP > ( > GROBJ IN MDSYS.SDO_GEORASTER, > X11 IN NUMBER, > Y11 IN NUMBER, > X12 IN NUMBER, > Y12 IN NUMBER, > MASK IN MDSYS.SDO_GEORASTER, > X21 IN NUMBER, > Y21 IN NUMBER, > X22 IN NUMBER, > Y22 IN NUMBER, > BANDS IN VARCHAR2, > SAMPLINGFACTOR IN PLS_INTEGER, > NODATA IN PLS_INTEGER, > DEGREE IN NUMBER, > PYRAMIDLEVEL IN PLS_INTEGER, > POLYGONCLIP IN PLS_INTEGER, > INTERGEOM IN MDSYS.SDO_GEOMETRY, > STMTHP IN SDO_GEOR_INT.PARALLELREFCUR > )RETURN MDSYS.SDO_NUMBER_ARRAY DETERMINISTIC; > > FUNCTION GENERATESTATISTICSMASK1P > ( > GROBJ IN MDSYS.SDO_GEORASTER, > X11 IN NUMBER, > Y11 IN NUMBER, > X12 IN NUMBER, > Y12 IN NUMBER, > MASK IN MDSYS.SDO_GEORASTER, > X21 IN NUMBER, > Y21 IN NUMBER, > X22 IN NUMBER, > Y22 IN NUMBER, > BANDS IN VARCHAR2, > SAMPLINGFACTOR IN PLS_INTEGER, > NODATA IN PLS_INTEGER, > MMAX IN NUMBER, > MMIN IN NUMBER, > DEGREE IN NUMBER, > PYRAMIDLEVEL IN PLS_INTEGER, > POLYGONCLIP IN PLS_INTEGER, > INTERGEOM IN MDSYS.SDO_GEOMETRY, > STMTHP IN SDO_GEOR_INT.PARALLELREFCUR > )RETURN MDSYS.SDO_NUMBER_ARRAY DETERMINISTIC; > 910a957,978 > ) > RETURN MDSYS.SDO_NUMBER_ARRAY DETERMINISTIC; > > FUNCTION GENERATESTATISTICSMASK > ( > GROBJ IN MDSYS.SDO_GEORASTER, > X11 IN NUMBER, > Y11 IN NUMBER, > X12 IN NUMBER, > Y12 IN NUMBER, > MASK IN MDSYS.SDO_GEORASTER, > X21 IN NUMBER, > Y21 IN NUMBER, > X22 IN NUMBER, > Y22 IN NUMBER, > BANDS IN VARCHAR2, > SAMPLINGFACTOR IN PLS_INTEGER, > NODATA IN PLS_INTEGER, > NEEDMODEMEDIAN IN PLS_INTEGER, > PYRAMIDLEVEL IN PLS_INTEGER, > POLYGONCLIP IN PLS_INTEGER, > INTERGEOM IN MDSYS.SDO_GEOMETRY
19a20,22 > DTW_H_VALUE NUMBER := 1000000000.0; > > 491c494 < IF ( KIND <> 'ENGINEERING' ) AND ( KIND <> 'PROJECTED' ) THEN --- > IF (KIND NOT IN ('PROJECTED', 'ENGINEERING')) THEN 566a570 > EVENT_LEVEL NUMBER; 661a666 > EVENT_LEVEL := MDSYS.SDO_3GL.GET_EVENT(54713); 665a671 > 669,670c675,678 < IF ( KIND <> 'ENGINEERING' ) AND ( KIND <> 'PROJECTED' ) THEN < RETURN '13029'; --- > IF (KIND NOT IN ('PROJECTED', 'ENGINEERING')) THEN > IF(EVENT_LEVEL = 0) THEN > RETURN '13029'; > END IF; 674a683,717 > IF ((NDIM = 3) AND (THELRSDIMPOS = 0)) THEN > IF(EVENT_LEVEL = 1) THEN > IF (THEGEOMETRY.SDO_SRID IS NOT NULL) THEN > NULL; > > > > > > > > END IF; > ELSIF(FLAG10G = 'TRUE') THEN > IF (THEGEOMETRY.SDO_SRID IS NOT NULL) THEN > EXECUTE IMMEDIATE > ' select count(*) from mdsys.sdo_coord_ref_system a ' || > ' where a.coord_ref_sys_kind = ''GEOGRAPHIC2D'' and a.srid = :1 ' > INTO CHCK3DSRID USING THEGEOMETRY.SDO_SRID; > IF (CHCK3DSRID = 1) THEN > RETURN '13029'; > END IF; > END IF; > ELSE > IF (THEGEOMETRY.SDO_SRID IS NOT NULL) THEN > EXECUTE IMMEDIATE > ' select count(*) from mdsys.sdo_coord_ref_system a ' || > ' where a.coord_ref_sys_kind in (''GEOGRAPHIC3D'', ''COMPOUND'') and a.srid = :1 ' > INTO CHCK3DSRID USING THEGEOMETRY.SDO_SRID; > > IF (CHCK3DSRID = 0) THEN > RETURN '13029'; > END IF; > END IF; > END IF; > END IF; 2173a2217,2218 > GEOM_SRID_KIND VARCHAR2(24); > EVENT_LEVEL NUMBER; 2209a2255,2268 > > IF(NOT(GEOM0.SDO_SRID IS NULL)) THEN > SELECT > COORD_REF_SYS_KIND > INTO > GEOM_SRID_KIND > FROM > SDO_COORD_REF_SYS CRS > WHERE > CRS.SRID = GEOM0.SDO_SRID; > ELSE > GEOM_SRID_KIND := NULL; > END IF; > 2216,2217c2275,2280 < (GEOM0.SDO_GTYPE != 3000)) THEN < MDSYS.MDERR.RAISE_MD_ERROR('MD', 'SDO', -13029); --- > (GEOM0.SDO_GTYPE != 3000) AND > (GEOM_SRID_KIND NOT IN ('PROJECTED', 'ENGINEERING'))) THEN > EVENT_LEVEL := MDSYS.SDO_3GL.GET_EVENT(54713); > IF(EVENT_LEVEL = 0) THEN > MDSYS.MDERR.RAISE_MD_ERROR('MD', 'SDO', -13029); > END IF; 2329a2393,2394 > GEOM_SRID_KIND VARCHAR2(24); > EVENT_LEVEL NUMBER; 2356a2422,2435 > > IF(NOT(GEOM.SDO_SRID IS NULL)) THEN > SELECT > COORD_REF_SYS_KIND > INTO > GEOM_SRID_KIND > FROM > SDO_COORD_REF_SYS CRS > WHERE > CRS.SRID = GEOM.SDO_SRID; > ELSE > GEOM_SRID_KIND := NULL; > END IF; > 2363,2364c2442,2447 < (GEOM.SDO_GTYPE != 3000)) THEN < MDSYS.MDERR.RAISE_MD_ERROR('MD', 'SDO', -13029); --- > (GEOM.SDO_GTYPE != 3000) AND > (GEOM_SRID_KIND NOT IN ('PROJECTED', 'ENGINEERING'))) THEN > EVENT_LEVEL := MDSYS.SDO_3GL.GET_EVENT(54713); > IF(EVENT_LEVEL = 0) THEN > MDSYS.MDERR.RAISE_MD_ERROR('MD', 'SDO', -13029); > END IF; 2438d2520 < GEOM2 SDO_GEOMETRY := TFM_TO_DEGREES(GEOM); 2440,2441c2522,2523 < DIM := GET_DIM_ARRAY(GEOM2, TOL); < RETURN SDO_AREA(GEOM2, DIM, UNIT); --- > DIM := GET_DIM_ARRAY(GEOM, TOL); > RETURN SDO_AREA(GEOM, DIM, UNIT); 2461a2544,2545 > GEOM_SRID_KIND VARCHAR2(24); > EVENT_LEVEL NUMBER; 2490a2575,2588 > > IF(NOT(GEOM.SDO_SRID IS NULL)) THEN > SELECT > COORD_REF_SYS_KIND > INTO > GEOM_SRID_KIND > FROM > SDO_COORD_REF_SYS CRS > WHERE > CRS.SRID = GEOM.SDO_SRID; > ELSE > GEOM_SRID_KIND := NULL; > END IF; > 2497,2498c2595,2600 < (GEOM.SDO_GTYPE != 3000)) THEN < MDSYS.MDERR.RAISE_MD_ERROR('MD', 'SDO', -13029); --- > (GEOM.SDO_GTYPE != 3000) AND > (GEOM_SRID_KIND NOT IN ('PROJECTED', 'ENGINEERING'))) THEN > EVENT_LEVEL := MDSYS.SDO_3GL.GET_EVENT(54713); > IF(EVENT_LEVEL = 0) THEN > MDSYS.MDERR.RAISE_MD_ERROR('MD', 'SDO', -13029); > END IF; 2521c2623,2628 < MDSYS.MDERR.RAISE_MD_ERROR('MD', 'SDO', -54668); --- > EVENT_LEVEL := MDSYS.SDO_3GL.GET_EVENT(54713); > IF(EVENT_LEVEL = 0) THEN > MDSYS.MDERR.RAISE_MD_ERROR('MD', 'SDO', -54668); > ELSE > RETURN NULL; > END IF; 4006a4114 > 4108a4217 > 4167c4276 < USING SYS.DBMS_ASSERT.NOOP(G_RESNAM_NQ); --- > USING G_RESNAM_NQ; 4263,4264c4372 < GSRID := 0; < DSRID := 0; --- > 4266a4375,4376 > ELSE > DSRID := 0; 4267a4378 > 4269c4380,4382 < GSRID := THEGEOMETRY.SDO_SRID; --- > GSRID := THEGEOMETRY.SDO_SRID; > ELSE > GSRID := 0; 4323,4325c4436,4439 < USER_NAME VARCHAR2(130); < G_RESNAM VARCHAR2(130); < G_RESNAM_NQ VARCHAR2(130); --- > G_RESOWN VARCHAR2(130); > G_RESTAB VARCHAR2(130); > G_RESTAB_NQ VARCHAR2(130); > G_TABOWN VARCHAR2(130); 4331,4333c4445,4447 < FULL_TABLE VARCHAR2(257); < COLUMN_NAME VARCHAR2(130); < TAB_ROWID VARCHAR2(24); --- > FULL_TABLE VARCHAR2(261); > G_RESCOL VARCHAR2(130); > UPD_ROWID VARCHAR2(24); 4359c4473 < USER_NAME := NLS_UPPER(SUBSTR(GEOM_TABLE, 1, INSTR(GEOM_TABLE, '.')-1)); --- > G_TABOWN := NLS_UPPER(SUBSTR(GEOM_TABLE, 1, INSTR(GEOM_TABLE, '.')-1)); 4367c4481 < USER_NAME := GEOM_SCHEMA; --- > G_TABOWN := GEOM_SCHEMA; 4369c4483 < USER_NAME := SYS_CONTEXT('USERENV', 'CURRENT_USER'); --- > G_TABOWN := SYS_CONTEXT('USERENV', 'CURRENT_USER'); 4387,4388c4501,4503 < IF ( SDO_UTIL.IS_BUMPY_CASE(RESULT_TABLE) ) THEN < G_RESNAM := RESULT_TABLE; --- > IF ( INSTR(RESULT_TABLE, '.') > 0 ) THEN > G_RESOWN := NLS_UPPER(SUBSTR(RESULT_TABLE, 1, INSTR(RESULT_TABLE, '.')-1)); > G_RESTAB := SUBSTR(RESULT_TABLE, INSTR(RESULT_TABLE, '.')+1); 4390c4505,4506 < G_RESNAM := REPLACE(NLS_UPPER(RESULT_TABLE), '"'); --- > G_RESOWN := SYS_CONTEXT('USERENV', 'CURRENT_USER'); > G_RESTAB := RESULT_TABLE; 4392d4507 < G_RESNAM_NQ := REPLACE(G_RESNAM, '"'); 4394,4397c4509,4518 < COLUMN_NAME := NULL; < STMT := 'SELECT count(*) ' || < 'FROM SYS.USER_TAB_COLUMNS ' || < 'WHERE TABLE_NAME = :tab ' || --- > IF ( NOT SDO_UTIL.IS_BUMPY_CASE(G_RESTAB) ) THEN > G_RESTAB := REPLACE(NLS_UPPER(G_RESTAB), '"'); > END IF; > G_RESTAB_NQ := REPLACE(G_RESTAB, '"'); > > G_RESCOL := NULL; > STMT := 'SELECT COUNT(*) ' || > 'FROM SYS.ALL_TAB_COLUMNS ' || > 'WHERE OWNER = :own ' || > 'AND TABLE_NAME = :tab ' || 4400c4521 < USING G_RESNAM_NQ; --- > USING G_RESOWN, G_RESTAB_NQ; 4408c4529 < STMT := 'SELECT count(*) ' || --- > STMT := 'SELECT COUNT(*) ' || 4413c4534 < USING USER_NAME, G_TABNAM_NQ; --- > USING G_TABOWN, G_TABNAM_NQ; 4422,4423c4543,4545 < 'FROM SYS.USER_TAB_COLUMNS ' || < 'WHERE TABLE_NAME = :tab ' || --- > 'FROM SYS.ALL_TAB_COLUMNS ' || > 'WHERE OWNER = :own ' || > 'AND TABLE_NAME = :tab ' || 4425,4426c4547,4548 < EXECUTE IMMEDIATE STMT INTO COLUMN_NAME < USING G_RESNAM_NQ; --- > EXECUTE IMMEDIATE STMT INTO G_RESCOL > USING G_RESOWN, G_RESTAB_NQ; 4428c4550,4552 < STMT := 'truncate table ' || SDO_UTIL.SET_QUOTED_NAME(G_RESNAM_NQ); --- > STMT := 'truncate table ' || > SYS.DBMS_ASSERT.ENQUOTE_NAME(G_RESOWN) || '.' || > SDO_UTIL.SET_QUOTED_NAME(G_RESTAB_NQ); 4433,4435c4557,4559 < USER_NAME, < G_TABNAM, < G_COLNAM, --- > SYS.DBMS_ASSERT.QUALIFIED_SQL_NAME(G_TABOWN), > SYS.DBMS_ASSERT.QUALIFIED_SQL_NAME(G_TABNAM), > SYS.DBMS_ASSERT.QUALIFIED_SQL_NAME(G_COLNAM), 4455,4456c4579,4581 < FULL_TABLE := SYS.DBMS_ASSERT.QUALIFIED_SQL_NAME(USER_NAME) || '.' || < SYS.DBMS_ASSERT.QUALIFIED_SQL_NAME(G_TABNAM); --- > > FULL_TABLE := SYS.DBMS_ASSERT.ENQUOTE_NAME(G_TABOWN) || '.' || > SYS.DBMS_ASSERT.ENQUOTE_NAME(G_TABNAM_NQ, FALSE); 4460c4585 < SYS.DBMS_ASSERT.QUALIFIED_SQL_NAME(G_COLNAM) || --- > SYS.DBMS_ASSERT.ENQUOTE_NAME(G_COLNAM, FALSE) || 4463,4464c4588,4590 < SYS.DBMS_ASSERT.QUALIFIED_SQL_NAME(G_COLNAM) || < ' is not null and rownum < 2'; --- > SYS.DBMS_ASSERT.ENQUOTE_NAME(G_COLNAM, FALSE) || > ' is not null ' || > 'fetch first 1 row only'; 4506,4510c4632,4636 < FULL_TABLE, < G_COLNAM, G_RESNAM_NQ, COMMIT_INTERVAL, < CONDITIONAL, CHCK3DSRID, < SM_MJR_AXIS, 1.0/INV_FLTN, G3D_GEOG_CRS_UOM_FACTOR, < IS_UNIT_RADIANS, DIMINFO(1).SDO_TOLERANCE); --- > FULL_TABLE, > G_COLNAM, G_RESTAB_NQ, COMMIT_INTERVAL, > CONDITIONAL, CHCK3DSRID, > SM_MJR_AXIS, 1.0/INV_FLTN, G3D_GEOG_CRS_UOM_FACTOR, > IS_UNIT_RADIANS, DIMINFO(1).SDO_TOLERANCE); 4513a4640 > 4515c4642,4644 < STMT := 'INSERT INTO ' || SDO_UTIL.SET_QUOTED_NAME(G_RESNAM_NQ) || --- > STMT := 'INSERT INTO ' || > SYS.DBMS_ASSERT.ENQUOTE_NAME(G_RESOWN) || '.' || > SDO_UTIL.SET_QUOTED_NAME(G_RESTAB_NQ) || 4518,4519c4647,4652 < < STMT := 'select rowid from ' || SDO_UTIL.SET_QUOTED_NAME(G_RESNAM_NQ); --- > > > > STMT := 'select rowid from ' || > SYS.DBMS_ASSERT.ENQUOTE_NAME(G_RESOWN) || '.' || > SDO_UTIL.SET_QUOTED_NAME(G_RESTAB_NQ); 4521c4654 < INTO TAB_ROWID; --- > INTO UPD_ROWID; 4523c4656,4657 < SDO_3GL.VALIDATE_LAYER_WITH_CONTEXT(G_TABNAM, G_COLNAM, --- > > SDO_3GL.VALIDATE_LAYER_WITH_CONTEXT(G_TABNAM, G_COLNAM, 4525,4531c4659,4664 < G_RESNAM, COMMIT_INTERVAL, < SYS.ODCIINDEXINFO(USER_NAME, 'DUMMY', < SYS.ODCICOLINFOLIST(SYS.ODCICOLINFO(USER_NAME, G_TABNAM, < G_COLNAM, < 'SDO_GEOMETRY', 'MDSYS',NULL, 0, NULL,NULL,NULL)), NULL, NULL, NULL,NULL,NULL), < COLUMN_NAME, TAB_ROWID); < --- > G_RESTAB, COMMIT_INTERVAL, > SYS.ODCIINDEXINFO(G_TABOWN, 'DUMMY', > SYS.ODCICOLINFOLIST(SYS.ODCICOLINFO(G_TABOWN, G_TABNAM, G_COLNAM, > 'SDO_GEOMETRY', 'MDSYS', NULL, 0, NULL, NULL, NULL)), NULL, NULL, NULL, NULL, NULL), > G_RESCOL, UPD_ROWID); > 4537c4670 < G_RESNAM, --- > G_RESTAB,
3499a3500,3505 > SRS MDSYS.SDO_GEOR_SRS; > ISAFFINE BOOLEAN := TRUE; > RESOLUTIONS MDSYS.SDO_NUMBER_ARRAY; > HALF_RES MDSYS.SDO_NUMBER_ARRAY; > PT0 MDSYS.SDO_GEOMETRY; > PT MDSYS.SDO_GEOMETRY; 3515,3528c3521,3649 < IF (POLYGONCLIP IS NOT NULL) AND (NLS_UPPER(POLYGONCLIP) = 'TRUE') AND (POLYGONCLIP1=1) < THEN < LEN:=DATASET.COUNT; < FOR II IN 0..(LEN/3-1) LOOP < CNT:=II*3+1; < STARTROW:=DATASET(CNT+1); < STARTCOL:=DATASET(CNT+2); < IF(POINTPOLYGON=0) < THEN < IF(CELLLOCATION='UPPERLEFT') < THEN < GEOM:=MDSYS.SDO_GEOMETRY(2003,NULL,NULL, < MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3), < MDSYS.SDO_ORDINATE_ARRAY(STARTROW,STARTCOL,STARTROW+1,STARTCOL+1)); --- > > SRS := MDSYS.SDO_GEOR.GETSRS(GEORASTER); > IF SRS IS NOT NULL THEN > ISAFFINE := MDSYS.SDO_GEOR_INT.IS_AFFINE_TRANSFORM(SRS); > IF ISAFFINE THEN > > IF SRS.ROWNUMERATOR(6) != 0 OR > SRS.COLUMNNUMERATOR(7) != 0 THEN > ISAFFINE := FALSE; > END IF; > END IF; > END IF; > > > > IF ISAFFINE THEN > > > RESOLUTIONS := MDSYS.SDO_GEOR.GETSPATIALRESOLUTIONS(GEORASTER); > IF (RESOLUTIONS IS NULL) THEN > > RESOLUTIONS := MDSYS.SDO_NUMBER_ARRAY(1, 1); > END IF; > > IF PYRAMIDLEVEL > 0 THEN > FOR I IN 1..PYRAMIDLEVEL LOOP > RESOLUTIONS(1) := RESOLUTIONS(1) + RESOLUTIONS(1); > RESOLUTIONS(2) := RESOLUTIONS(2) + RESOLUTIONS(2); > END LOOP; > END IF; > HALF_RES := MDSYS.SDO_NUMBER_ARRAY(RESOLUTIONS(1)/2, RESOLUTIONS(2)/2); > > > > IF (SRID IS NOT NULL) THEN > IF (CELLLOCATION = 'CENTER') THEN > PT0 := MDSYS.SDO_GEOR.GETMODELCOORDINATE(GEORASTER, PYRAMIDLEVEL, > MDSYS.SDO_NUMBER_ARRAY(OUTWINDOW(1), OUTWINDOW(2))); > ELSE > PT0 := MDSYS.SDO_GEOR.GETMODELCOORDINATE(GEORASTER, PYRAMIDLEVEL, > MDSYS.SDO_NUMBER_ARRAY(OUTWINDOW(1)+0.5, OUTWINDOW(2)+0.5)); > END IF; > ELSE > > > IF (CELLLOCATION = 'CENTER') THEN > PT0 := MDSYS.SDO_GEOMETRY(2001, NULL, > MDSYS.SDO_POINT_TYPE(OUTWINDOW(1), OUTWINDOW(2), NULL), > NULL, NULL); > ELSE > PT0 := MDSYS.SDO_GEOMETRY(2001, NULL, > MDSYS.SDO_POINT_TYPE(OUTWINDOW(1)+0.5, OUTWINDOW(2)+0.5, > NULL), NULL, NULL); > END IF; > END IF; > > IF (POLYGONCLIP IS NOT NULL) AND > (NLS_UPPER(POLYGONCLIP) = 'TRUE') AND > (POLYGONCLIP1=1) THEN > > > > LEN:=DATASET.COUNT; > FOR II IN 0..(LEN/3-1) LOOP > CNT:=II*3+1; > STARTROW:=DATASET(CNT+1); > STARTCOL:=DATASET(CNT+2); > > > IF SRID IS NOT NULL THEN > PT := MDSYS.SDO_GEOMETRY(2001, SRID, > MDSYS.SDO_POINT_TYPE(PT0.SDO_POINT.X + > (STARTCOL - OUTWINDOW(2))*RESOLUTIONS(2), > PT0.SDO_POINT.Y - > (STARTROW - OUTWINDOW(1))*RESOLUTIONS(1), > NULL), NULL, NULL); > ELSE > > > PT := MDSYS.SDO_GEOMETRY(2001, NULL, > MDSYS.SDO_POINT_TYPE( > PT0.SDO_POINT.X + (STARTROW - OUTWINDOW(1)), > PT0.SDO_POINT.Y + (STARTCOL - OUTWINDOW(2)), > NULL), NULL, NULL); > END IF; > > IF(POINTPOLYGON=1) THEN > GEOM := PT; > ELSE > IF SRID IS NOT NULL THEN > > > GEOM := MDSYS.SDO_GEOMETRY(2003, SRID, > NULL, > MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3), > MDSYS.SDO_ORDINATE_ARRAY( > PT.SDO_POINT.X - HALF_RES(2), > PT.SDO_POINT.Y - HALF_RES(1), > PT.SDO_POINT.X + HALF_RES(2), > PT.SDO_POINT.Y + HALF_RES(1) > )); > ELSE > GEOM := MDSYS.SDO_GEOMETRY(2003, NULL, NULL, > MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3), > MDSYS.SDO_ORDINATE_ARRAY( > PT.SDO_POINT.X - HALF_RES(1), > PT.SDO_POINT.Y - HALF_RES(2), > PT.SDO_POINT.X + HALF_RES(1), > PT.SDO_POINT.Y + HALF_RES(2) > )); > END IF; > END IF; > PIPE ROW(MDSYS.SDO_GEOR_CELL(DATASET(CNT), > PYRAMIDLEVEL, > STARTROW, > STARTCOL, > LAYERNUMBER, > GEOM)); > END LOOP; > > ELSE > > PT := PT0; > CNT := 1; > FOR STARTROW IN OUTWINDOW(1)..OUTWINDOW(3) LOOP > FOR STARTCOL IN OUTWINDOW(2)..OUTWINDOW(4) LOOP > > IF(POINTPOLYGON=1) THEN > GEOM := PT; 3530,3532c3651,3670 < GEOM:=MDSYS.SDO_GEOMETRY(2003,NULL,NULL, < MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3), < MDSYS.SDO_ORDINATE_ARRAY(STARTROW-0.5,STARTCOL-0.5,STARTROW+0.5,STARTCOL+0.5)); --- > IF SRID IS NOT NULL THEN > GEOM := MDSYS.SDO_GEOMETRY(2003, SRID, > NULL, > MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3), > MDSYS.SDO_ORDINATE_ARRAY( > PT.SDO_POINT.X - HALF_RES(2), > PT.SDO_POINT.Y - HALF_RES(1), > PT.SDO_POINT.X + HALF_RES(2), > PT.SDO_POINT.Y + HALF_RES(1) > )); > ELSE > GEOM := MDSYS.SDO_GEOMETRY(2003, NULL, NULL, > MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3), > MDSYS.SDO_ORDINATE_ARRAY( > PT.SDO_POINT.X - HALF_RES(1), > PT.SDO_POINT.Y - HALF_RES(2), > PT.SDO_POINT.X + HALF_RES(1), > PT.SDO_POINT.Y + HALF_RES(2) > )); > END IF; 3534,3537c3672,3682 < ELSE < IF(CELLLOCATION='UPPERLEFT') < THEN < GEOM:=MDSYS.SDO_GEOMETRY(2001,NULL,MDSYS.SDO_POINT_TYPE(STARTROW,STARTCOL,NULL),NULL,NULL); --- > PIPE ROW(MDSYS.SDO_GEOR_CELL(DATASET(CNT), > PYRAMIDLEVEL, > STARTROW, > STARTCOL, > LAYERNUMBER, > GEOM)); > CNT:= CNT + 1; > > > IF SRID IS NOT NULL THEN > PT.SDO_POINT.X := PT.SDO_POINT.X + RESOLUTIONS(2); 3539c3684 < GEOM:=MDSYS.SDO_GEOMETRY(2001,NULL,MDSYS.SDO_POINT_TYPE(STARTROW-0.5,STARTCOL-0.5,NULL),NULL,NULL); --- > PT.SDO_POINT.Y := PT.SDO_POINT.Y + RESOLUTIONS(2); 3540a3686,3694 > END LOOP; > > > IF SRID IS NOT NULL THEN > PT.SDO_POINT.X := PT0.SDO_POINT.X; > PT.SDO_POINT.Y := PT.SDO_POINT.Y - RESOLUTIONS(1); > ELSE > PT.SDO_POINT.Y := PT0.SDO_POINT.Y; > PT.SDO_POINT.X := PT.SDO_POINT.X + RESOLUTIONS(1); 3542,3554c3696,3712 < IF(SRID IS NOT NULL) < THEN < MDSYS.SDO_GEOR.GETMODELCOORDINATE(GEORASTER,PYRAMIDLEVEL,GEOM,WIN); < GEOM:=WIN; < END IF; < PIPE ROW(MDSYS.SDO_GEOR_CELL(DATASET(CNT),PYRAMIDLEVEL,STARTROW,STARTCOL,LAYERNUMBER,GEOM)); < END LOOP; < ELSE < FOR STARTROW IN OUTWINDOW(1)..OUTWINDOW(3) LOOP < FOR STARTCOL IN OUTWINDOW(2)..OUTWINDOW(4) LOOP < IF(POINTPOLYGON=0) < THEN < IF(CELLLOCATION='UPPERLEFT') --- > > END LOOP; > END IF; > > ELSE > > > IF (POLYGONCLIP IS NOT NULL) AND > (NLS_UPPER(POLYGONCLIP) = 'TRUE') AND > (POLYGONCLIP1=1) > THEN > LEN:=DATASET.COUNT; > FOR II IN 0..(LEN/3-1) LOOP > CNT:=II*3+1; > STARTROW:=DATASET(CNT+1); > STARTCOL:=DATASET(CNT+2); > IF(POINTPOLYGON=0) 3556,3558c3714,3725 < GEOM:=MDSYS.SDO_GEOMETRY(2003,NULL,NULL, < MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3), < MDSYS.SDO_ORDINATE_ARRAY(STARTROW,STARTCOL,STARTROW+1,STARTCOL+1)); --- > IF(CELLLOCATION='UPPERLEFT') > THEN > GEOM:=MDSYS.SDO_GEOMETRY(2003,NULL,NULL, > MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3), > MDSYS.SDO_ORDINATE_ARRAY(STARTROW,STARTCOL, > STARTROW+1,STARTCOL+1)); > ELSE > GEOM:=MDSYS.SDO_GEOMETRY(2003,NULL,NULL, > MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3), > MDSYS.SDO_ORDINATE_ARRAY(STARTROW-0.5,STARTCOL-0.5, > STARTROW+0.5,STARTCOL+0.5)); > END IF; 3560,3562c3727,3732 < GEOM:=MDSYS.SDO_GEOMETRY(2003,NULL,NULL, < MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3), < MDSYS.SDO_ORDINATE_ARRAY(STARTROW-0.5,STARTCOL-0.5,STARTROW+0.5,STARTCOL+0.5)); --- > IF(CELLLOCATION='UPPERLEFT') > THEN > GEOM:=MDSYS.SDO_GEOMETRY(2001,NULL,MDSYS.SDO_POINT_TYPE(STARTROW+0.5,STARTCOL+0.5,NULL),NULL,NULL); > ELSE > GEOM:=MDSYS.SDO_GEOMETRY(2001,NULL,MDSYS.SDO_POINT_TYPE(STARTROW,STARTCOL,NULL),NULL,NULL); > END IF; 3564,3565c3734 < ELSE < IF(CELLLOCATION='UPPERLEFT') --- > IF(SRID IS NOT NULL) 3567c3736,3755 < GEOM:=MDSYS.SDO_GEOMETRY(2001,NULL,MDSYS.SDO_POINT_TYPE(STARTROW,STARTCOL,NULL),NULL,NULL); --- > MDSYS.SDO_GEOR.GETMODELCOORDINATE(GEORASTER,PYRAMIDLEVEL,GEOM,WIN); > GEOM:=WIN; > END IF; > PIPE ROW(MDSYS.SDO_GEOR_CELL(DATASET(CNT),PYRAMIDLEVEL,STARTROW,STARTCOL,LAYERNUMBER,GEOM)); > END LOOP; > ELSE > FOR STARTROW IN OUTWINDOW(1)..OUTWINDOW(3) LOOP > FOR STARTCOL IN OUTWINDOW(2)..OUTWINDOW(4) LOOP > IF(POINTPOLYGON=0) > THEN > IF(CELLLOCATION='UPPERLEFT') > THEN > GEOM:=MDSYS.SDO_GEOMETRY(2003,NULL,NULL, > MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3), > MDSYS.SDO_ORDINATE_ARRAY(STARTROW,STARTCOL,STARTROW+1,STARTCOL+1)); > ELSE > GEOM:=MDSYS.SDO_GEOMETRY(2003,NULL,NULL, > MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3), > MDSYS.SDO_ORDINATE_ARRAY(STARTROW-0.5,STARTCOL-0.5,STARTROW+0.5,STARTCOL+0.5)); > END IF; 3569c3757,3762 < GEOM:=MDSYS.SDO_GEOMETRY(2001,NULL,MDSYS.SDO_POINT_TYPE(STARTROW-0.5,STARTCOL-0.5,NULL),NULL,NULL); --- > IF(CELLLOCATION='UPPERLEFT') > THEN > GEOM:=MDSYS.SDO_GEOMETRY(2001,NULL,MDSYS.SDO_POINT_TYPE(STARTROW+0.5,STARTCOL+0.5,NULL),NULL,NULL); > ELSE > GEOM:=MDSYS.SDO_GEOMETRY(2001,NULL,MDSYS.SDO_POINT_TYPE(STARTROW,STARTCOL,NULL),NULL,NULL); > END IF; 3571,3578c3764,3771 < END IF; < IF(SRID IS NOT NULL) < THEN < MDSYS.SDO_GEOR.GETMODELCOORDINATE(GEORASTER,PYRAMIDLEVEL,GEOM,WIN); < GEOM:=WIN; < END IF; < CNT:=(STARTROW-OUTWINDOW(1))*(OUTWINDOW(4)-OUTWINDOW(2)+1)+(STARTCOL-OUTWINDOW(2)+1); < PIPE ROW(MDSYS.SDO_GEOR_CELL(DATASET(CNT),PYRAMIDLEVEL,STARTROW,STARTCOL,LAYERNUMBER,GEOM)); --- > IF(SRID IS NOT NULL) > THEN > MDSYS.SDO_GEOR.GETMODELCOORDINATE(GEORASTER,PYRAMIDLEVEL,GEOM,WIN); > GEOM:=WIN; > END IF; > CNT:=(STARTROW-OUTWINDOW(1))*(OUTWINDOW(4)-OUTWINDOW(2)+1)+(STARTCOL-OUTWINDOW(2)+1); > PIPE ROW(MDSYS.SDO_GEOR_CELL(DATASET(CNT),PYRAMIDLEVEL,STARTROW,STARTCOL,LAYERNUMBER,GEOM)); > END LOOP; 3580,3581c3773,3774 < END LOOP; < END IF; --- > END IF; > END IF; 4021a4215 > GEOM MDSYS.SDO_GEOMETRY; 4043a4238,4241 > > GEOM := PTGEOM; > MDSYS.SDO_GEOR.GETCELLCOORDINATE(GEORASTER,PYRAMIDLEVEL,PTGEOM,GEOM); > 4047,4048c4245,4246 < RET:=MDSYS.SDO_GEOR_INT.GETCELLVALUES(GEORASTER,GEOR_PROP, PYRAMIDLEVEL, PTGEOM, DIM, < LAYERNUMBER, 1); --- > RET:=MDSYS.SDO_GEOR_INT.GETCELLVALUES(GEORASTER,GEOR_PROP, PYRAMIDLEVEL, > GEOM, DIM, LAYERNUMBER, 1); 6196c6394 < STAT:=MDSYS.SDO_NUMBER_ARRAY(0,0,0,0); --- > STAT:=MDSYS.SDO_NUMBER_ARRAY(0,0,0,0,0); 6200a6399 > STAT(5):=MM_SUM; 6394a6594,6598 > > IF (MMM_PIX = 0) THEN > CONTINUE; > END IF; > 6418a6623,6627 > IF (MM_PIX = 0) THEN > MDERR.RAISE_MD_ERROR('MD', 'SDO', -13393,'samplingWindow'); > RETURN NULL; > END IF; > 6534,6538c6743 < < < < < FUNCTION GENERATESTATISTICS --- > FUNCTION RETURNSTATISTICS2 6541c6746 < PYRAMIDLEVEL IN NUMBER, --- > MASK IN MDSYS.SDO_GEORASTER, 6543,6558c6748,6751 < SAMPLINGWINDOW IN MDSYS.SDO_NUMBER_ARRAY, < BANDNUMBERS IN VARCHAR2 DEFAULT NULL, < NODATA IN VARCHAR2 DEFAULT 'FALSE', < PARALLELPARAM IN VARCHAR2 DEFAULT NULL < ) < RETURN MDSYS.SDO_NUMBER_ARRAY < AS < STAT MDSYS.SDO_NUMBER_ARRAY; < BEGIN < STAT:=RETURNSTATISTICS1(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,PARALLELPARAM); < RETURN MDSYS.SDO_NUMBER_ARRAY(STAT(3),STAT(4),STAT(5),STAT(1),STAT(2),STAT(6), STAT(7)); < END GENERATESTATISTICS; < < FUNCTION GENERATESTATISTICS < ( < GEORASTER IN MDSYS.SDO_GEORASTER, --- > BANDNUMBERS IN VARCHAR2, > NODATA IN VARCHAR2, > PARALLELPARAM IN VARCHAR2, > NEEDMODEMEDIAN IN NUMBER, 6560,6565c6753,6756 < SAMPLINGFACTOR IN VARCHAR2, < SAMPLINGWINDOW IN MDSYS.SDO_GEOMETRY, < BANDNUMBERS IN VARCHAR2 DEFAULT NULL, < NODATA IN VARCHAR2 DEFAULT 'FALSE', < POLYGONCLIP IN VARCHAR2 DEFAULT NULL, < PARALLELPARAM IN VARCHAR2 DEFAULT NULL --- > COORD1 IN MDSYS.SDO_NUMBER_ARRAY, > COORD2 IN MDSYS.SDO_NUMBER_ARRAY, > POLYGONCLIP IN PLS_INTEGER, > INTERGEOM IN MDSYS.SDO_GEOMETRY 6569,6587c6760,6791 < STAT MDSYS.SDO_NUMBER_ARRAY; < BEGIN < STAT:=RETURNSTATISTICS1(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,POLYGONCLIP,PARALLELPARAM); < RETURN MDSYS.SDO_NUMBER_ARRAY(STAT(3),STAT(4),STAT(5),STAT(1),STAT(2),STAT(6), STAT(7)); < END GENERATESTATISTICS; < < FUNCTION GENERATESTATISTICSMAX < ( < GEORASTER IN MDSYS.SDO_GEORASTER, < PYRAMIDLEVEL IN NUMBER, < SAMPLINGFACTOR IN VARCHAR2, < SAMPLINGWINDOW IN MDSYS.SDO_NUMBER_ARRAY, < BANDNUMBERS IN VARCHAR2 DEFAULT NULL, < NODATA IN VARCHAR2 DEFAULT 'FALSE', < PARALLELPARAM IN VARCHAR2 DEFAULT NULL < ) < RETURN NUMBER < AS < STAT MDSYS.SDO_NUMBER_ARRAY; --- > DIM MDSYS.SDO_DIM_ARRAY; > NODATAN NUMBER; > STATS MDSYS.SDO_NUMBER_ARRAY := NULL; > NUM NUMBER; > SKIPFACTOR NUMBER; > FACTORSTR VARCHAR2(512); > CELLDEPTH VARCHAR2(32); > TYPE MY_CUR IS REF CURSOR; > M_CUR MY_CUR; > DEGREE NUMBER; > II NUMBER; > MM_MAX NUMBER; > MM_MIN NUMBER; > MM_PIX NUMBER; > MM_SUM NUMBER; > MM_SUM2 NUMBER; > MMM_MAX NUMBER; > MMM_MIN NUMBER; > MMM_PIX NUMBER; > MMM_SUM NUMBER; > MMM_SUM2 NUMBER; > MMM_ID NUMBER; > MMM_VALUE NUMBER; > MMM_MVALUE NUMBER; > MM_VALUE NUMBER; > MM_OLD_VALUE NUMBER; > MM_ID NUMBER; > MMM_MEDIAN NUMBER; > MMM_MODE NUMBER; > MMM_TEMPMEDIAN NUMBER; > > STMT VARCHAR2(32767); 6589,6591d6792 < STAT:=RETURNSTATISTICS(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,PARALLELPARAM); < RETURN STAT(1); < END GENERATESTATISTICSMAX; 6593,6609c6794,6801 < FUNCTION GENERATESTATISTICSMAX < ( < GEORASTER IN MDSYS.SDO_GEORASTER, < PYRAMIDLEVEL IN NUMBER, < SAMPLINGFACTOR IN VARCHAR2, < SAMPLINGWINDOW IN MDSYS.SDO_GEOMETRY, < BANDNUMBERS IN VARCHAR2 DEFAULT NULL, < NODATA IN VARCHAR2 DEFAULT 'FALSE', < POLYGONCLIP IN VARCHAR2 DEFAULT NULL, < PARALLELPARAM IN VARCHAR2 DEFAULT NULL < ) < RETURN NUMBER < AS < STAT MDSYS.SDO_NUMBER_ARRAY; < BEGIN < STAT:=RETURNSTATISTICS(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,POLYGONCLIP,PARALLELPARAM); < IF(STAT IS NOT NULL) --- > > IF GEORASTER IS NULL OR MASK IS NULL OR > COORD1 IS NULL OR COORD2 IS NULL THEN > RETURN NULL; > END IF; > > > IF (NLS_UPPER(MDSYS.SDO_GEOR.ISBLANK(GEORASTER))='TRUE') 6611,6612c6803,6842 < RETURN STAT(1); < ELSE --- > NODATAN:=MDSYS.SDO_GEOR.GETBLANKCELLVALUE(GEORASTER); > > > IF INTERGEOM IS NOT NULL AND POLYGONCLIP = 1 THEN > NUM := SDO_GEOR.GENERATESTATISTICSSUM( > MASK, PYRAMIDLEVEL, SAMPLINGFACTOR, INTERGEOM, > NULL, NULL,'true', PARALLELPARAM ); > ELSE > NUM := SDO_GEOR.GENERATESTATISTICSSUM( > MASK, PYRAMIDLEVEL, SAMPLINGFACTOR, COORD2, > NULL, NULL, PARALLELPARAM); > END IF; > > RETURN MDSYS.SDO_NUMBER_ARRAY(NODATAN,NODATAN,NODATAN,NODATAN,NODATAN,0,NODATAN*NUM); > END IF; > > > SKIPFACTOR:=-1; > FACTORSTR:=SAMPLINGFACTOR; > IF(FACTORSTR IS NOT NULL) > THEN > FACTORSTR:=REGEXP_SUBSTR(FACTORSTR,'samplingFactor[[:space:]]*=[[:space:]]*[[:digit:]]+',1,1,'i'); > IF(FACTORSTR IS NOT NULL) > THEN > FACTORSTR:=REGEXP_SUBSTR(FACTORSTR,'[[:digit:]]+',1,1,'i'); > IF(FACTORSTR IS NOT NULL) > THEN > BEGIN > SKIPFACTOR:=TO_NUMBER(FACTORSTR,'99999999999'); > EXCEPTION > WHEN OTHERS THEN > SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE, > 'EXCEPTION[prvtgr.sql(' || $$PLSQL_LINE || ')2]: ' || SQLERRM); RAISE; > END; > END IF; > END IF; > END IF; > IF(SKIPFACTOR<1) > THEN > MDERR.RAISE_MD_ERROR('MD', 'SDO', -13497,'Invalid samplingFactor; using string like "samplingFactor=5".'); 6615d6844 < END GENERATESTATISTICSMAX; 6616a6846,6850 > NODATAN:=0; > IF(NLS_UPPER(NODATA)='TRUE') > THEN > NODATAN:=1; > END IF; 6618,6634c6852,6857 < FUNCTION GENERATESTATISTICSMIN < ( < GEORASTER IN MDSYS.SDO_GEORASTER, < PYRAMIDLEVEL IN NUMBER, < SAMPLINGFACTOR IN VARCHAR2, < SAMPLINGWINDOW IN MDSYS.SDO_NUMBER_ARRAY, < BANDNUMBERS IN VARCHAR2 DEFAULT NULL, < NODATA IN VARCHAR2 DEFAULT 'FALSE', < PARALLELPARAM IN VARCHAR2 DEFAULT NULL < ) < RETURN NUMBER < AS < STAT MDSYS.SDO_NUMBER_ARRAY; < BEGIN < STAT:=RETURNSTATISTICS(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,PARALLELPARAM); < RETURN STAT(2); < END GENERATESTATISTICSMIN; --- > IF (SKIPFACTOR > COORD1(3) - COORD1(1) + 1) THEN > SKIPFACTOR := COORD1(3) - COORD1(1) + 1; > END IF; > IF (SKIPFACTOR > COORD1(4) - COORD1(2) + 1) THEN > SKIPFACTOR := COORD1(4) - COORD1(2) + 1; > END IF; 6636,6653c6859,6882 < FUNCTION GENERATESTATISTICSMIN < ( < GEORASTER IN MDSYS.SDO_GEORASTER, < PYRAMIDLEVEL IN NUMBER, < SAMPLINGFACTOR IN VARCHAR2, < SAMPLINGWINDOW IN MDSYS.SDO_GEOMETRY, < BANDNUMBERS IN VARCHAR2 DEFAULT NULL, < NODATA IN VARCHAR2 DEFAULT 'FALSE', < POLYGONCLIP IN VARCHAR2 DEFAULT NULL, < PARALLELPARAM IN VARCHAR2 DEFAULT NULL < ) < RETURN NUMBER < AS < STAT MDSYS.SDO_NUMBER_ARRAY; < BEGIN < STAT:=RETURNSTATISTICS(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,POLYGONCLIP,PARALLELPARAM); < RETURN STAT(2); < END GENERATESTATISTICSMIN; --- > IF(PARALLELPARAM IS NULL) > THEN > STATS:=MDSYS.SDO_GEOR_INT.GENERATESTATISTICSMASK(GEORASTER, > COORD1(2), COORD1(1), > COORD1(4), COORD1(3), > MASK, > COORD2(2), COORD2(1), > COORD2(4), COORD2(3), > BANDNUMBERS,SKIPFACTOR,NODATAN, > NEEDMODEMEDIAN, > PYRAMIDLEVEL, > POLYGONCLIP, > INTERGEOM > ); > ELSE > SELECT XMLCAST(XMLQUERY('declare default element namespace "http://xmlns.oracle.com/spatial/georaster"; /georasterMetadata/rasterInfo/cellDepth/text()' > PASSING GEORASTER.METADATA RETURNING CONTENT) AS VARCHAR2(256)) > INTO CELLDEPTH FROM SYS.DUAL; > DEGREE:=MDSYS.SDO_GEOR_INT.GETPARALLELDEGREE(PARALLELPARAM); > DELETE FROM MDSYS.SDO_GR_PARALLEL; > FOR II IN 0..DEGREE-1 LOOP > INSERT INTO MDSYS.SDO_GR_PARALLEL VALUES(II); > END LOOP; > COMMIT; 6655,6671c6884 < FUNCTION GENERATESTATISTICSMEAN < ( < GEORASTER IN MDSYS.SDO_GEORASTER, < PYRAMIDLEVEL IN NUMBER, < SAMPLINGFACTOR IN VARCHAR2, < SAMPLINGWINDOW IN MDSYS.SDO_NUMBER_ARRAY, < BANDNUMBERS IN VARCHAR2 DEFAULT NULL, < NODATA IN VARCHAR2 DEFAULT 'FALSE', < PARALLELPARAM IN VARCHAR2 DEFAULT NULL < ) < RETURN NUMBER < AS < STAT MDSYS.SDO_NUMBER_ARRAY; < BEGIN < STAT:=RETURNSTATISTICS(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,PARALLELPARAM); < RETURN STAT(3); < END GENERATESTATISTICSMEAN; --- > MM_PIX := 0; 6673,6690c6886,6898 < FUNCTION GENERATESTATISTICSMEAN < ( < GEORASTER IN MDSYS.SDO_GEORASTER, < PYRAMIDLEVEL IN NUMBER, < SAMPLINGFACTOR IN VARCHAR2, < SAMPLINGWINDOW IN MDSYS.SDO_GEOMETRY, < BANDNUMBERS IN VARCHAR2 DEFAULT NULL, < NODATA IN VARCHAR2 DEFAULT 'FALSE', < POLYGONCLIP IN VARCHAR2 DEFAULT NULL, < PARALLELPARAM IN VARCHAR2 DEFAULT NULL < ) < RETURN NUMBER < AS < STAT MDSYS.SDO_NUMBER_ARRAY; < BEGIN < STAT:=RETURNSTATISTICS(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,POLYGONCLIP,PARALLELPARAM); < RETURN STAT(3); < END GENERATESTATISTICSMEAN; --- > STMT := 'select m_max,m_min,m_pix,m_sum,m_sum2 from TABLE(mdsys.sdo_geor_aux.generateStatisticsMaskP(:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,:15,:16,:17,:18,:19,CURSOR(SELECT /*+ PARALLEL('||DEGREE||') */ pid from mdsys.SDO_GR_PARALLEL)))'; > II:=0; > OPEN M_CUR FOR STMT USING GEORASTER.RASTERDATATABLE, GEORASTER.RASTERID, > COORD1(2), COORD1(1), > COORD1(4), COORD1(3), > MASK.RASTERDATATABLE, MASK.RASTERID, > COORD2(2), COORD2(1), > COORD2(4), COORD2(3), > BANDNUMBERS,SKIPFACTOR,NODATAN,DEGREE, > PYRAMIDLEVEL, POLYGONCLIP, INTERGEOM; > LOOP > FETCH M_CUR INTO MMM_MAX,MMM_MIN,MMM_PIX,MMM_SUM,MMM_SUM2; > EXIT WHEN M_CUR%NOTFOUND; 6691a6900,6902 > IF (MMM_PIX = 0) THEN > CONTINUE; > END IF; 6693,6700c6904,8022 < FUNCTION GENERATESTATISTICSSTD < ( < GEORASTER IN MDSYS.SDO_GEORASTER, < PYRAMIDLEVEL IN NUMBER, < SAMPLINGFACTOR IN VARCHAR2, < SAMPLINGWINDOW IN MDSYS.SDO_NUMBER_ARRAY, < BANDNUMBERS IN VARCHAR2 DEFAULT NULL, < NODATA IN VARCHAR2 DEFAULT 'FALSE', --- > II:=II+1; > IF(II=1) > THEN > MM_MAX:=MMM_MAX; > MM_MIN:=MMM_MIN; > MM_PIX:=MMM_PIX; > MM_SUM:=MMM_SUM; > MM_SUM2:=MMM_SUM2; > ELSE > IF(MMM_MAX>MM_MAX) > THEN > MM_MAX:=MMM_MAX; > END IF; > IF(MMM_MIN<MM_MIN) > THEN > MM_MIN:=MMM_MIN; > END IF; > MM_PIX:=MM_PIX+MMM_PIX; > MM_SUM:=MM_SUM+MMM_SUM; > MM_SUM2:=MM_SUM2+MMM_SUM2; > END IF; > END LOOP; > CLOSE M_CUR; > > IF (MM_PIX = 0) THEN > MDERR.RAISE_MD_ERROR('MD', 'SDO', -13393,'mask'); > RETURN NULL; > END IF; > > > STATS:=MDSYS.SDO_NUMBER_ARRAY(0,0,0,0,0,0,0); > STATS(3):=MM_MIN; > STATS(4):=MM_MAX; > STATS(5):=MM_SUM/MM_PIX; > STATS(6):=SQRT((MM_SUM2-MM_PIX*(MM_SUM/MM_PIX)*(MM_SUM/MM_PIX))/(MM_PIX-1)); > STATS(7):=MM_SUM; > COMMIT; > > IF NEEDMODEMEDIAN = 0 THEN > STATS(1) := 0.0; > STATS(2) := 0.0; > RETURN STATS; > END IF; > > IF (MM_MIN = MM_MAX) THEN > STATS(1):=MM_MIN; > STATS(2):=MM_MIN; > RETURN STATS; > END IF; > > MMM_VALUE:=0; > MM_OLD_VALUE:=0; > MMM_MVALUE:=0; > MMM_TEMPMEDIAN:=-32769; > MMM_MEDIAN:=-32769; > > STMT := 'select m_id,sum(m_value) from TABLE(mdsys.sdo_geor_aux.generateStatisticsMask1P(:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,:15,:16,:17,:18,:19,:20,:21,CURSOR(SELECT /*+ PARALLEL('||DEGREE||') */ pid from mdsys.SDO_GR_PARALLEL))) group by m_id order by m_id'; > OPEN M_CUR FOR STMT USING GEORASTER.RASTERDATATABLE,GEORASTER.RASTERID, > COORD1(2), COORD1(1), > COORD1(4), COORD1(3), > MASK.RASTERDATATABLE, MASK.RASTERID, > COORD2(2), COORD2(1), > COORD2(4), COORD2(3), > BANDNUMBERS,SKIPFACTOR,NODATAN, > MM_MAX,MM_MIN,DEGREE, > PYRAMIDLEVEL, POLYGONCLIP, INTERGEOM; > LOOP > FETCH M_CUR INTO MM_ID,MM_VALUE; > EXIT WHEN M_CUR%NOTFOUND; > MMM_VALUE:=MMM_VALUE+MM_VALUE; > IF(MM_VALUE>MM_OLD_VALUE) > THEN > MMM_MODE:= MM_ID-1; > MM_OLD_VALUE:= MM_VALUE; > END IF; > IF((MMM_VALUE*2>=MM_PIX)AND(MMM_MEDIAN=-32769)) > THEN > MMM_MEDIAN:=MM_ID-1; > END IF; > END LOOP; > > IF CELLDEPTH='8BIT_S' > THEN > MMM_MEDIAN:= MMM_MEDIAN-128; > MMM_MODE:= MMM_MODE-128; > ELSIF CELLDEPTH='16BIT_S' > THEN > MMM_MEDIAN:= MMM_MEDIAN-32768; > MMM_MODE:= MMM_MODE-32768; > ELSIF CELLDEPTH='32BIT_U' > THEN > MMM_MODE:=MM_MIN+(MMM_MODE+0.5)*(MM_MAX-MM_MIN)/65535; > MMM_MEDIAN:=MM_MIN+(MMM_MEDIAN+0.5)*(MM_MAX-MM_MIN)/65535; > ELSIF CELLDEPTH='32BIT_S' > THEN > MMM_MODE:=MM_MIN+(MMM_MODE+0.5)*(MM_MAX-MM_MIN)/65535; > MMM_MEDIAN:=MM_MIN+(MMM_MEDIAN+0.5)*(MM_MAX-MM_MIN)/65535; > ELSIF CELLDEPTH='32BIT_REAL' > THEN > MMM_MODE:=MM_MIN+(MMM_MODE+0.5)*(MM_MAX-MM_MIN)/65535; > MMM_MEDIAN:=MM_MIN+(MMM_MEDIAN+0.5)*(MM_MAX-MM_MIN)/65535; > ELSIF CELLDEPTH='64BIT_REAL' > THEN > MMM_MODE:=MM_MIN+(MMM_MODE+0.5)*(MM_MAX-MM_MIN)/65535; > MMM_MEDIAN:=MM_MIN+(MMM_MEDIAN+0.5)*(MM_MAX-MM_MIN)/65535; > END IF; > > CLOSE M_CUR; > STATS(1):=MMM_MEDIAN; > STATS(2):=MMM_MODE; > END IF; > > RETURN STATS; > END RETURNSTATISTICS2; > > > FUNCTION CELLEXTENTTOCELLORDINATES(ORDS MDSYS.SDO_ORDINATE_ARRAY, > COORDLOC VARCHAR2) > RETURN SDO_NUMBER_ARRAY AS > RET SDO_NUMBER_ARRAY; > L_ORDS MDSYS.SDO_ORDINATE_ARRAY; > BEGIN > > > > L_ORDS := ORDS; > IF ORDS(1) > ORDS(3) THEN > L_ORDS(1) := ORDS(3); > L_ORDS(3) := ORDS(1); > END IF; > > > IF (COORDLOC IS NULL OR COORDLOC = 'CENTER') THEN > L_ORDS(1) := L_ORDS(1) + 0.5; > L_ORDS(2) := L_ORDS(2) + 0.5; > L_ORDS(3) := L_ORDS(3) - 0.5; > L_ORDS(4) := L_ORDS(4) - 0.5; > ELSE > L_ORDS(3) := L_ORDS(3) - 1; > L_ORDS(4) := L_ORDS(4) - 1; > END IF ; > > RET := SDO_NUMBER_ARRAY(); > RET.EXTEND(4); > > > FOR I IN 1..4 LOOP > > IF (COORDLOC IS NULL OR COORDLOC = 'CENTER') THEN > IF (L_ORDS(I) >= 0.0) THEN > RET(I) := FLOOR(L_ORDS(I) + 0.5); > ELSE > RET(I) := CEIL(L_ORDS(I) - 0.5); > END IF; > ELSE > RET(I) := FLOOR(L_ORDS(I)); > END IF; > END LOOP; > > RETURN RET; > > END CELLEXTENTTOCELLORDINATES; > > > > PROCEDURE INTERSECTGEORMASK( > GEORASTER IN MDSYS.SDO_GEORASTER, > MASK IN MDSYS.SDO_GEORASTER, > PYRAMIDLEVEL IN NUMBER, > GR_WIN OUT MDSYS.SDO_NUMBER_ARRAY, > MASK_WIN OUT MDSYS.SDO_NUMBER_ARRAY > ) AS > MASK_EXTENT MDSYS.SDO_GEOMETRY; > GR_EXTENT MDSYS.SDO_GEOMETRY; > CELLWIN MDSYS.SDO_GEOMETRY; > WIN1 MDSYS.SDO_NUMBER_ARRAY; > WIN2 MDSYS.SDO_NUMBER_ARRAY; > DIM MDSYS.SDO_DIM_ARRAY; > INTERGEOM MDSYS.SDO_GEOMETRY; > COORDLOC VARCHAR2(16); > DIMSIZES1 MDSYS.SDO_NUMBER_ARRAY; > DIMSIZES2 MDSYS.SDO_NUMBER_ARRAY; > ULT1 MDSYS.SDO_NUMBER_ARRAY; > ULT2 MDSYS.SDO_NUMBER_ARRAY; > SAVED_SRID NUMBER := NULL; > INTERGEOMMBR MDSYS.SDO_GEOMETRY; > CNT NUMBER; > TOLERANCE NUMBER; > BEGIN > GR_WIN := NULL; > MASK_WIN := NULL; > > MASK_EXTENT := SDO_GEOR.GENERATESPATIALEXTENT(MASK); > GR_EXTENT := SDO_GEOR.GENERATESPATIALEXTENT(GEORASTER); > > IF MASK_EXTENT.SDO_SRID IS NOT NULL THEN > > > > IF (GR_EXTENT.SDO_SRID IS NULL) THEN > MDERR.RAISE_MD_ERROR('MD', 'SDO', -13393,'mask'); > RETURN; > END IF; > > > IF(MASK_EXTENT.SDO_SRID != GR_EXTENT.SDO_SRID) THEN > MDERR.RAISE_MD_ERROR('MD', 'SDO', -13497, > 'mask and GeoRaster object had different SRID'); > RETURN; > END IF; > > > SELECT COUNT(*) INTO CNT FROM MDSYS.GEODETIC_SRIDS > WHERE SRID = GR_EXTENT.SDO_SRID; > IF CNT > 0 THEN > SAVED_SRID := GR_EXTENT.SDO_SRID; > GR_EXTENT.SDO_SRID := NULL; > MASK_EXTENT.SDO_SRID := NULL; > END IF; > > > TOLERANCE := 0.00000001; > INTERGEOM := SDO_GEOM.SDO_INTERSECTION(GR_EXTENT, MASK_EXTENT, TOLERANCE); > > > IF INTERGEOM IS NULL THEN > MDERR.RAISE_MD_ERROR('MD', 'SDO', -13497, > 'Mask area was outside the image'); > RETURN; > END IF; > > INTERGEOMMBR := SDO_GEOM.SDO_MBR(INTERGEOM); > IF SAVED_SRID IS NOT NULL THEN > INTERGEOMMBR.SDO_SRID := SAVED_SRID; > END IF; > > DIM := MDSYS.SDO_CONSTRUCT_DIM_ARRAY(MASK_EXTENT.GET_DIMS, > 0.000000000000005); > CELLWIN := SDO_GEOM.SDO_MBR(MDSYS.SDO_GEOR_INT.GETCELLCOORDINATE2( > GEORASTER, PYRAMIDLEVEL, > INTERGEOMMBR, DIM, 1)); > COORDLOC := SDO_GEOR.GETMODELCOORDLOCATION(GEORASTER); > WIN1 := CELLEXTENTTOCELLORDINATES(CELLWIN.SDO_ORDINATES, COORDLOC); > > CELLWIN := SDO_GEOM.SDO_MBR(MDSYS.SDO_GEOR_INT.GETCELLCOORDINATE2( > MASK, PYRAMIDLEVEL, > INTERGEOMMBR, DIM, 1)); > COORDLOC := SDO_GEOR.GETMODELCOORDLOCATION(MASK); > WIN2 := CELLEXTENTTOCELLORDINATES(CELLWIN.SDO_ORDINATES, COORDLOC); > > IF (WIN1(3)-WIN1(1) != WIN2(3)-WIN2(1) OR > WIN1(4)-WIN1(2) != WIN2(4)-WIN2(2)) THEN > MDERR.RAISE_MD_ERROR('MD', 'SDO', -13497, > 'Mask resolution is different from raster'); > RETURN; > END IF; > > ELSE > > DIMSIZES1 := SDO_GEOR.GETSPATIALDIMSIZES(GEORASTER); > ULT1 := SDO_GEOR.GETULTCOORDINATE(GEORASTER); > DIMSIZES2 := SDO_GEOR.GETSPATIALDIMSIZES(MASK); > ULT2 := SDO_GEOR.GETULTCOORDINATE(MASK); > > IF PYRAMIDLEVEL IS NOT NULL AND PYRAMIDLEVEL > 0 THEN > FOR I IN 1..PYRAMIDLEVEL LOOP > DIMSIZES1(1) := DIMSIZES1(1)/2; > DIMSIZES1(2) := DIMSIZES1(2)/2; > DIMSIZES2(1) := DIMSIZES2(1)/2; > DIMSIZES2(2) := DIMSIZES2(2)/2; > END LOOP; > DIMSIZES1(1) := FLOOR(DIMSIZES1(1)); > DIMSIZES1(2) := FLOOR(DIMSIZES1(2)); > DIMSIZES2(1) := FLOOR(DIMSIZES2(1)); > DIMSIZES2(2) := FLOOR(DIMSIZES2(2)); > END IF; > > WIN1 := SDO_NUMBER_ARRAY(0,0,0,0); > IF DIMSIZES1(1) < DIMSIZES2(1) THEN > WIN1(3) := DIMSIZES1(1)-1; > ELSE > WIN1(3) := DIMSIZES2(1)-1; > END IF; > IF DIMSIZES1(2) < DIMSIZES2(2) THEN > WIN1(4) := DIMSIZES1(2)-1; > ELSE > WIN1(4) := DIMSIZES2(2)-1; > END IF; > WIN2 := WIN1; > > > WIN1(1) := WIN1(1) + ULT1(1); > WIN1(3) := WIN1(3) + ULT1(1); > WIN1(2) := WIN1(2) + ULT1(2); > WIN1(4) := WIN1(4) + ULT1(2); > > WIN2(1) := WIN2(1) + ULT2(1); > WIN2(3) := WIN2(3) + ULT2(1); > WIN2(2) := WIN2(2) + ULT2(2); > WIN2(4) := WIN2(4) + ULT2(2); > > END IF; > > GR_WIN := WIN1; > MASK_WIN := WIN2; > > END INTERSECTGEORMASK; > > > FUNCTION RETURNSTATISTICS2_0 > ( > GEORASTER IN MDSYS.SDO_GEORASTER, > MASK IN MDSYS.SDO_GEORASTER, > SAMPLINGFACTOR IN VARCHAR2, > BANDNUMBERS IN VARCHAR2 DEFAULT NULL, > NODATA IN VARCHAR2 DEFAULT 'FALSE', > PARALLELPARAM IN VARCHAR2 DEFAULT NULL, > NEEDMODEMEDIAN IN NUMBER DEFAULT 1, > PYRAMIDLEVEL IN NUMBER DEFAULT 0 > ) > RETURN MDSYS.SDO_NUMBER_ARRAY > AS > SAMPLINGWINDOW MDSYS.SDO_GEOMETRY; > IN_EXTENT MDSYS.SDO_GEOMETRY; > WIN1 MDSYS.SDO_NUMBER_ARRAY; > WIN2 MDSYS.SDO_NUMBER_ARRAY; > BEGIN > IF GEORASTER IS NULL THEN > RETURN NULL; > END IF; > > IF SANITYCHECK(GEORASTER) = FALSE THEN > RETURN NULL; > END IF; > > IF MASK IS NULL THEN > MDERR.RAISE_MD_ERROR('MD', 'SDO', -13393,'mask'); > RETURN NULL; > END IF; > > IF SANITYCHECK(MASK) = FALSE THEN > MDERR.RAISE_MD_ERROR('MD', 'SDO', -13393,'mask'); > RETURN NULL; > END IF; > > > INTERSECTGEORMASK(GEORASTER, MASK, PYRAMIDLEVEL, WIN1, WIN2); > > RETURN RETURNSTATISTICS2(GEORASTER, MASK, SAMPLINGFACTOR, BANDNUMBERS, > NODATA, PARALLELPARAM, NEEDMODEMEDIAN, > PYRAMIDLEVEL, WIN1, WIN2, 0, NULL); > END RETURNSTATISTICS2_0; > > > FUNCTION RETURNSTATISTICS2_1 > ( > GEORASTER IN MDSYS.SDO_GEORASTER, > MASK IN MDSYS.SDO_GEORASTER, > SAMPLINGFACTOR IN VARCHAR2, > BANDNUMBERS IN VARCHAR2 DEFAULT NULL, > NODATA IN VARCHAR2 DEFAULT 'FALSE', > PARALLELPARAM IN VARCHAR2 DEFAULT NULL, > NEEDMODEMEDIAN IN NUMBER DEFAULT 1, > PYRAMIDLEVEL IN NUMBER DEFAULT 0, > SAMPLINGWINDOW IN MDSYS.SDO_NUMBER_ARRAY DEFAULT NULL > ) > RETURN MDSYS.SDO_NUMBER_ARRAY > AS > WIN1 MDSYS.SDO_NUMBER_ARRAY; > WIN2 MDSYS.SDO_NUMBER_ARRAY; > INTERGEOM MDSYS.SDO_GEOMETRY; > BEGIN > IF SAMPLINGWINDOW IS NULL THEN > RETURN RETURNSTATISTICS2_0(GEORASTER, MASK, SAMPLINGFACTOR, BANDNUMBERS, > NODATA, PARALLELPARAM, NEEDMODEMEDIAN, > PYRAMIDLEVEL); > END IF; > > IF GEORASTER IS NULL THEN > RETURN NULL; > END IF; > > IF SANITYCHECK(GEORASTER) = FALSE THEN > RETURN NULL; > END IF; > > IF MASK IS NULL THEN > MDERR.RAISE_MD_ERROR('MD', 'SDO', -13393,'mask'); > RETURN NULL; > END IF; > > IF SANITYCHECK(MASK) = FALSE THEN > MDERR.RAISE_MD_ERROR('MD', 'SDO', -13393,'mask'); > RETURN NULL; > END IF; > > > INTERSECTGEORMASK(GEORASTER, MASK, PYRAMIDLEVEL, WIN1, WIN2); > > > IF SAMPLINGWINDOW(1) > WIN1(3) OR > SAMPLINGWINDOW(2) > WIN1(4) OR > SAMPLINGWINDOW(3) < WIN1(1) OR > SAMPLINGWINDOW(4) < WIN1(2) THEN > > MDERR.RAISE_MD_ERROR('MD', 'SDO', -13497, > 'invalid samplingWindow, out of area'); > RETURN NULL; > END IF; > > IF SAMPLINGWINDOW(1) > WIN1(1) THEN > WIN2(1) := WIN2(1) + (SAMPLINGWINDOW(1) - WIN1(1)); > WIN1(1) := SAMPLINGWINDOW(1); > END IF; > > IF SAMPLINGWINDOW(2) > WIN1(2) THEN > WIN2(2) := WIN2(2) + (SAMPLINGWINDOW(2) - WIN1(2)); > WIN1(2) := SAMPLINGWINDOW(2); > END IF; > > IF SAMPLINGWINDOW(3) < WIN1(3) THEN > WIN2(3) := WIN2(3) - (WIN1(3) - SAMPLINGWINDOW(3)); > WIN1(3) := SAMPLINGWINDOW(3); > END IF; > > IF SAMPLINGWINDOW(4) < WIN1(4) THEN > WIN2(4) := WIN2(4) - (WIN1(4) - SAMPLINGWINDOW(4)); > WIN1(4) := SAMPLINGWINDOW(4); > END IF; > > RETURN RETURNSTATISTICS2(GEORASTER, MASK, SAMPLINGFACTOR, BANDNUMBERS, > NODATA, PARALLELPARAM, NEEDMODEMEDIAN, > PYRAMIDLEVEL, WIN1, WIN2, 0, NULL); > END RETURNSTATISTICS2_1; > > > FUNCTION RETURNSTATISTICS2_2 > ( > GEORASTER IN MDSYS.SDO_GEORASTER, > MASK IN MDSYS.SDO_GEORASTER, > SAMPLINGFACTOR IN VARCHAR2, > BANDNUMBERS IN VARCHAR2 DEFAULT NULL, > NODATA IN VARCHAR2 DEFAULT 'FALSE', > PARALLELPARAM IN VARCHAR2 DEFAULT NULL, > NEEDMODEMEDIAN IN NUMBER DEFAULT 1, > PYRAMIDLEVEL IN NUMBER DEFAULT 0, > SAMPLINGWINDOW IN MDSYS.SDO_GEOMETRY DEFAULT NULL, > POLYGONCLIP IN VARCHAR2 DEFAULT NULL > ) > RETURN MDSYS.SDO_NUMBER_ARRAY > AS > EXT1 MDSYS.SDO_GEOMETRY; > EXT2 MDSYS.SDO_GEOMETRY; > INTERGEOM MDSYS.SDO_GEOMETRY; > ISPC NUMBER; > WIN1 MDSYS.SDO_NUMBER_ARRAY; > WIN2 MDSYS.SDO_NUMBER_ARRAY; > DIM MDSYS.SDO_DIM_ARRAY; > CELLWIN MDSYS.SDO_GEOMETRY; > COORDLOC VARCHAR2(16); > SAVED_SRID NUMBER := NULL; > INTERGEOMMBR MDSYS.SDO_GEOMETRY; > CNT NUMBER; > SWIN MDSYS.SDO_GEOMETRY; > TOLERANCE NUMBER; > BEGIN > > IF SAMPLINGWINDOW IS NULL THEN > RETURN RETURNSTATISTICS2_0(GEORASTER, MASK, SAMPLINGFACTOR, BANDNUMBERS, > NODATA, PARALLELPARAM, NEEDMODEMEDIAN, > PYRAMIDLEVEL); > END IF; > > > IF GEORASTER IS NULL THEN > RETURN NULL; > END IF; > > IF SANITYCHECK(GEORASTER) = FALSE THEN > RETURN NULL; > END IF; > > IF MASK IS NULL THEN > MDERR.RAISE_MD_ERROR('MD', 'SDO', -13393,'mask'); > RETURN NULL; > END IF; > > IF SANITYCHECK(MASK) = FALSE THEN > MDERR.RAISE_MD_ERROR('MD', 'SDO', -13393,'mask'); > RETURN NULL; > END IF; > > > IF SAMPLINGWINDOW.SDO_SRID IS NULL OR SAMPLINGWINDOW.SDO_SRID < 0 THEN > MDERR.RAISE_MD_ERROR('MD', 'SDO', -13393,'samplingWindow'); > RETURN NULL; > END IF; > > IF MDSYS.SDO_GEOR_INT.CHECKGEODETICMBR(SAMPLINGWINDOW) = FALSE THEN > MDERR.RAISE_MD_ERROR('MD', 'SDO', -13393,'samplingWindow'); > RETURN NULL; > END IF; > > > EXT1 := SDO_GEOR.GENERATESPATIALEXTENT(GEORASTER); > IF EXT1.SDO_SRID IS NULL THEN > MDERR.RAISE_MD_ERROR('MD', 'SDO', -13497, > 'GeoRaster object not georeferenced'); > RETURN NULL; > END IF; > > > EXT2 := SDO_GEOR.GENERATESPATIALEXTENT(MASK); > IF EXT2.SDO_SRID IS NULL THEN > MDERR.RAISE_MD_ERROR('MD', 'SDO', -13497,'mask object not georeferenced'); > RETURN NULL; > END IF; > > > IF (EXT1.SDO_SRID != EXT2.SDO_SRID) THEN > MDERR.RAISE_MD_ERROR('MD', 'SDO', -13497, > 'mask must has same coordinate system as the georaster object'); > RETURN NULL; > END IF; > > > SELECT COUNT(*) INTO CNT FROM MDSYS.GEODETIC_SRIDS > WHERE SRID = EXT1.SDO_SRID; > > IF CNT > 0 THEN > SAVED_SRID := EXT1.SDO_SRID; > EXT1.SDO_SRID := NULL; > EXT2.SDO_SRID := NULL; > END IF; > > > TOLERANCE := 0.00000001; > INTERGEOM := SDO_GEOM.SDO_INTERSECTION(EXT1, EXT2, TOLERANCE); > > > IF INTERGEOM IS NULL THEN > MDERR.RAISE_MD_ERROR('MD', 'SDO', -13497,'Mask area was outside the image'); > RETURN NULL; > END IF; > > IF SAVED_SRID IS NOT NULL THEN > > > IF SAMPLINGWINDOW.SDO_SRID != SAVED_SRID THEN > SWIN := SDO_CS.TRANSFORM(SAMPLINGWINDOW, SAVED_SRID); > ELSE > SWIN := SAMPLINGWINDOW; > END IF; > SWIN.SDO_SRID := NULL; > INTERGEOM := SDO_GEOM.SDO_INTERSECTION(INTERGEOM, SWIN, TOLERANCE); > ELSIF (SAMPLINGWINDOW.SDO_SRID != EXT1.SDO_SRID) THEN > INTERGEOM := SDO_GEOM.SDO_INTERSECTION(INTERGEOM, > SDO_CS.TRANSFORM(SAMPLINGWINDOW, EXT1.SDO_SRID), TOLERANCE); > ELSE > INTERGEOM := SDO_GEOM.SDO_INTERSECTION(INTERGEOM, SAMPLINGWINDOW,TOLERANCE); > END IF; > > > IF INTERGEOM IS NULL THEN > MDERR.RAISE_MD_ERROR('MD', 'SDO', -13497, > 'SamplingWindow was outside the image'); > RETURN NULL; > END IF; > > INTERGEOMMBR := SDO_GEOM.SDO_MBR(INTERGEOM); > IF SAVED_SRID IS NOT NULL THEN > INTERGEOMMBR.SDO_SRID := SAVED_SRID; > END IF; > > > DIM := MDSYS.SDO_CONSTRUCT_DIM_ARRAY(SAMPLINGWINDOW.GET_DIMS, > 0.000000000000005); > CELLWIN := SDO_GEOM.SDO_MBR(MDSYS.SDO_GEOR_INT.GETCELLCOORDINATE2( > GEORASTER, PYRAMIDLEVEL, > INTERGEOMMBR, DIM, 1)); > COORDLOC := SDO_GEOR.GETMODELCOORDLOCATION(GEORASTER); > WIN1 := CELLEXTENTTOCELLORDINATES(CELLWIN.SDO_ORDINATES, COORDLOC); > > CELLWIN := SDO_GEOM.SDO_MBR(MDSYS.SDO_GEOR_INT.GETCELLCOORDINATE2( > MASK, PYRAMIDLEVEL, > INTERGEOMMBR, DIM, 1)); > COORDLOC := SDO_GEOR.GETMODELCOORDLOCATION(MASK); > WIN2 := CELLEXTENTTOCELLORDINATES(CELLWIN.SDO_ORDINATES, COORDLOC); > > IF (WIN1(3)-WIN1(1) != WIN2(3)-WIN2(1) OR > WIN1(4)-WIN1(2) != WIN2(4)-WIN2(2)) THEN > MDERR.RAISE_MD_ERROR('MD', 'SDO', -13497, > 'Mask resolution is different from raster'); > RETURN NULL; > END IF; > > IF UPPER(POLYGONCLIP) = 'TRUE' THEN > ISPC := 1; > ELSE > ISPC := 0; > END IF; > > RETURN RETURNSTATISTICS2(GEORASTER, MASK, SAMPLINGFACTOR, BANDNUMBERS, > NODATA, PARALLELPARAM, NEEDMODEMEDIAN, > PYRAMIDLEVEL, WIN1, WIN2, ISPC, INTERGEOM); > > END RETURNSTATISTICS2_2; > > > > > > > FUNCTION GENERATESTATISTICS > ( > GEORASTER IN MDSYS.SDO_GEORASTER, > PYRAMIDLEVEL IN NUMBER, > SAMPLINGFACTOR IN VARCHAR2, > SAMPLINGWINDOW IN MDSYS.SDO_NUMBER_ARRAY, > BANDNUMBERS IN VARCHAR2 DEFAULT NULL, > NODATA IN VARCHAR2 DEFAULT 'FALSE', > PARALLELPARAM IN VARCHAR2 DEFAULT NULL > ) > RETURN MDSYS.SDO_NUMBER_ARRAY > AS > STAT MDSYS.SDO_NUMBER_ARRAY; > BEGIN > STAT:=RETURNSTATISTICS1(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,PARALLELPARAM); > RETURN MDSYS.SDO_NUMBER_ARRAY(STAT(3),STAT(4),STAT(5),STAT(1),STAT(2),STAT(6), STAT(7)); > END GENERATESTATISTICS; > > FUNCTION GENERATESTATISTICS > ( > GEORASTER IN MDSYS.SDO_GEORASTER, > PYRAMIDLEVEL IN NUMBER, > SAMPLINGFACTOR IN VARCHAR2, > SAMPLINGWINDOW IN MDSYS.SDO_GEOMETRY, > BANDNUMBERS IN VARCHAR2 DEFAULT NULL, > NODATA IN VARCHAR2 DEFAULT 'FALSE', > POLYGONCLIP IN VARCHAR2 DEFAULT NULL, > PARALLELPARAM IN VARCHAR2 DEFAULT NULL > ) > RETURN MDSYS.SDO_NUMBER_ARRAY > AS > STAT MDSYS.SDO_NUMBER_ARRAY; > BEGIN > STAT:=RETURNSTATISTICS1(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,POLYGONCLIP,PARALLELPARAM); > RETURN MDSYS.SDO_NUMBER_ARRAY(STAT(3),STAT(4),STAT(5),STAT(1),STAT(2),STAT(6), STAT(7)); > END GENERATESTATISTICS; > > FUNCTION GENERATESTATISTICS > ( > GEORASTER IN MDSYS.SDO_GEORASTER, > MASK IN MDSYS.SDO_GEORASTER, > PYRAMIDLEVEL IN NUMBER, > SAMPLINGFACTOR IN VARCHAR2, > SAMPLINGWINDOW IN MDSYS.SDO_NUMBER_ARRAY, > BANDNUMBERS IN VARCHAR2 DEFAULT NULL, > NODATA IN VARCHAR2 DEFAULT 'FALSE', > PARALLELPARAM IN VARCHAR2 DEFAULT NULL > ) > RETURN MDSYS.SDO_NUMBER_ARRAY > AS > STAT MDSYS.SDO_NUMBER_ARRAY; > BEGIN > IF MASK IS NULL THEN > STAT:=RETURNSTATISTICS1(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,PARALLELPARAM); > RETURN MDSYS.SDO_NUMBER_ARRAY(STAT(3),STAT(4),STAT(5),STAT(1),STAT(2),STAT(6), STAT(7)); > ELSE > STAT:=RETURNSTATISTICS2_1(GEORASTER,MASK,SAMPLINGFACTOR, > BANDNUMBERS,NODATA,PARALLELPARAM, 1, > PYRAMIDLEVEL, SAMPLINGWINDOW); > IF STAT IS NOT NULL THEN > RETURN MDSYS.SDO_NUMBER_ARRAY( > STAT(3),STAT(4),STAT(5),STAT(1),STAT(2),STAT(6), STAT(7)); > ELSE > RETURN NULL; > END IF; > END IF; > END GENERATESTATISTICS; > > FUNCTION GENERATESTATISTICS > ( > GEORASTER IN MDSYS.SDO_GEORASTER, > MASK IN MDSYS.SDO_GEORASTER, > PYRAMIDLEVEL IN NUMBER, > SAMPLINGFACTOR IN VARCHAR2, > SAMPLINGWINDOW IN MDSYS.SDO_GEOMETRY, > BANDNUMBERS IN VARCHAR2 DEFAULT NULL, > NODATA IN VARCHAR2 DEFAULT 'FALSE', > POLYGONCLIP IN VARCHAR2 DEFAULT NULL, > PARALLELPARAM IN VARCHAR2 DEFAULT NULL > ) > RETURN MDSYS.SDO_NUMBER_ARRAY > AS > STAT MDSYS.SDO_NUMBER_ARRAY; > BEGIN > IF MASK IS NULL THEN > STAT:=RETURNSTATISTICS1(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,POLYGONCLIP,PARALLELPARAM); > RETURN MDSYS.SDO_NUMBER_ARRAY(STAT(3),STAT(4),STAT(5),STAT(1),STAT(2),STAT(6), STAT(7)); > ELSE > STAT:=RETURNSTATISTICS2_2(GEORASTER,MASK,SAMPLINGFACTOR, > BANDNUMBERS,NODATA,PARALLELPARAM, 1, > PYRAMIDLEVEL, SAMPLINGWINDOW, POLYGONCLIP); > IF STAT IS NOT NULL THEN > RETURN MDSYS.SDO_NUMBER_ARRAY( > STAT(3),STAT(4),STAT(5),STAT(1),STAT(2),STAT(6), STAT(7)); > ELSE > RETURN NULL; > END IF; > END IF; > END GENERATESTATISTICS; > > FUNCTION GENERATESTATISTICSMAX > ( > GEORASTER IN MDSYS.SDO_GEORASTER, > PYRAMIDLEVEL IN NUMBER, > SAMPLINGFACTOR IN VARCHAR2, > SAMPLINGWINDOW IN MDSYS.SDO_NUMBER_ARRAY, > BANDNUMBERS IN VARCHAR2 DEFAULT NULL, > NODATA IN VARCHAR2 DEFAULT 'FALSE', > PARALLELPARAM IN VARCHAR2 DEFAULT NULL > ) > RETURN NUMBER > AS > STAT MDSYS.SDO_NUMBER_ARRAY; > BEGIN > STAT:=RETURNSTATISTICS(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,PARALLELPARAM); > IF STAT IS NOT NULL THEN > RETURN STAT(1); > ELSE > RETURN NULL; > END IF; > END GENERATESTATISTICSMAX; > > FUNCTION GENERATESTATISTICSMAX > ( > GEORASTER IN MDSYS.SDO_GEORASTER, > PYRAMIDLEVEL IN NUMBER, > SAMPLINGFACTOR IN VARCHAR2, > SAMPLINGWINDOW IN MDSYS.SDO_GEOMETRY, > BANDNUMBERS IN VARCHAR2 DEFAULT NULL, > NODATA IN VARCHAR2 DEFAULT 'FALSE', > POLYGONCLIP IN VARCHAR2 DEFAULT NULL, > PARALLELPARAM IN VARCHAR2 DEFAULT NULL > ) > RETURN NUMBER > AS > STAT MDSYS.SDO_NUMBER_ARRAY; > BEGIN > STAT:=RETURNSTATISTICS(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,POLYGONCLIP,PARALLELPARAM); > IF(STAT IS NOT NULL) > THEN > RETURN STAT(1); > ELSE > RETURN NULL; > END IF; > END GENERATESTATISTICSMAX; > > FUNCTION GENERATESTATISTICSMAX > ( > GEORASTER IN MDSYS.SDO_GEORASTER, > MASK IN MDSYS.SDO_GEORASTER, > PYRAMIDLEVEL IN NUMBER, > SAMPLINGFACTOR IN VARCHAR2, > SAMPLINGWINDOW IN MDSYS.SDO_NUMBER_ARRAY, > BANDNUMBERS IN VARCHAR2 DEFAULT NULL, > NODATA IN VARCHAR2 DEFAULT 'FALSE', > PARALLELPARAM IN VARCHAR2 DEFAULT NULL > ) > RETURN NUMBER > AS > STAT MDSYS.SDO_NUMBER_ARRAY; > BEGIN > IF MASK IS NULL THEN > STAT:=RETURNSTATISTICS(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,PARALLELPARAM); > IF STAT IS NOT NULL THEN > RETURN STAT(1); > ELSE > RETURN NULL; > END IF; > ELSE > STAT:=RETURNSTATISTICS2_1(GEORASTER,MASK,SAMPLINGFACTOR, > BANDNUMBERS,NODATA,PARALLELPARAM,0, > PYRAMIDLEVEL, SAMPLINGWINDOW); > IF STAT IS NOT NULL THEN > RETURN STAT(4); > ELSE > RETURN NULL; > END IF; > END IF; > END GENERATESTATISTICSMAX; > > FUNCTION GENERATESTATISTICSMAX > ( > GEORASTER IN MDSYS.SDO_GEORASTER, > MASK IN MDSYS.SDO_GEORASTER, > PYRAMIDLEVEL IN NUMBER, > SAMPLINGFACTOR IN VARCHAR2, > SAMPLINGWINDOW IN MDSYS.SDO_GEOMETRY, > BANDNUMBERS IN VARCHAR2 DEFAULT NULL, > NODATA IN VARCHAR2 DEFAULT 'FALSE', > POLYGONCLIP IN VARCHAR2 DEFAULT NULL, > PARALLELPARAM IN VARCHAR2 DEFAULT NULL > ) > RETURN NUMBER > AS > STAT MDSYS.SDO_NUMBER_ARRAY; > BEGIN > IF MASK IS NULL THEN > STAT:=RETURNSTATISTICS(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,POLYGONCLIP,PARALLELPARAM); > IF(STAT IS NOT NULL) > THEN > RETURN STAT(1); > ELSE > RETURN NULL; > END IF; > ELSE > STAT:=RETURNSTATISTICS2_2(GEORASTER,MASK,SAMPLINGFACTOR, > BANDNUMBERS,NODATA,PARALLELPARAM,0, > PYRAMIDLEVEL, SAMPLINGWINDOW, POLYGONCLIP); > IF STAT IS NOT NULL THEN > RETURN STAT(4); > ELSE > RETURN NULL; > END IF; > END IF; > END GENERATESTATISTICSMAX; > > FUNCTION GENERATESTATISTICSMIN > ( > GEORASTER IN MDSYS.SDO_GEORASTER, > PYRAMIDLEVEL IN NUMBER, > SAMPLINGFACTOR IN VARCHAR2, > SAMPLINGWINDOW IN MDSYS.SDO_NUMBER_ARRAY, > BANDNUMBERS IN VARCHAR2 DEFAULT NULL, > NODATA IN VARCHAR2 DEFAULT 'FALSE', > PARALLELPARAM IN VARCHAR2 DEFAULT NULL > ) > RETURN NUMBER > AS > STAT MDSYS.SDO_NUMBER_ARRAY; > BEGIN > STAT:=RETURNSTATISTICS(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,PARALLELPARAM); > IF STAT IS NOT NULL THEN > RETURN STAT(2); > ELSE > RETURN NULL; > END IF; > END GENERATESTATISTICSMIN; > > FUNCTION GENERATESTATISTICSMIN > ( > GEORASTER IN MDSYS.SDO_GEORASTER, > PYRAMIDLEVEL IN NUMBER, > SAMPLINGFACTOR IN VARCHAR2, > SAMPLINGWINDOW IN MDSYS.SDO_GEOMETRY, > BANDNUMBERS IN VARCHAR2 DEFAULT NULL, > NODATA IN VARCHAR2 DEFAULT 'FALSE', > POLYGONCLIP IN VARCHAR2 DEFAULT NULL, > PARALLELPARAM IN VARCHAR2 DEFAULT NULL > ) > RETURN NUMBER > AS > STAT MDSYS.SDO_NUMBER_ARRAY; > BEGIN > STAT:=RETURNSTATISTICS(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,POLYGONCLIP,PARALLELPARAM); > IF STAT IS NOT NULL THEN > RETURN STAT(2); > ELSE > RETURN NULL; > END IF; > END GENERATESTATISTICSMIN; > > > FUNCTION GENERATESTATISTICSMIN > ( > GEORASTER IN MDSYS.SDO_GEORASTER, > MASK IN MDSYS.SDO_GEORASTER, > PYRAMIDLEVEL IN NUMBER, > SAMPLINGFACTOR IN VARCHAR2, > SAMPLINGWINDOW IN MDSYS.SDO_NUMBER_ARRAY, > BANDNUMBERS IN VARCHAR2 DEFAULT NULL, > NODATA IN VARCHAR2 DEFAULT 'FALSE', > PARALLELPARAM IN VARCHAR2 DEFAULT NULL > ) > RETURN NUMBER > AS > STAT MDSYS.SDO_NUMBER_ARRAY; > BEGIN > IF MASK IS NULL THEN > STAT:=RETURNSTATISTICS(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,PARALLELPARAM); > IF STAT IS NOT NULL THEN > RETURN STAT(2); > ELSE > RETURN NULL; > END IF; > ELSE > STAT:=RETURNSTATISTICS2_1(GEORASTER,MASK,SAMPLINGFACTOR, > BANDNUMBERS,NODATA,PARALLELPARAM,0, > PYRAMIDLEVEL, SAMPLINGWINDOW); > IF STAT IS NOT NULL THEN > RETURN STAT(3); > ELSE > RETURN NULL; > END IF; > END IF; > END GENERATESTATISTICSMIN; > > FUNCTION GENERATESTATISTICSMIN > ( > GEORASTER IN MDSYS.SDO_GEORASTER, > MASK IN MDSYS.SDO_GEORASTER, > PYRAMIDLEVEL IN NUMBER, > SAMPLINGFACTOR IN VARCHAR2, > SAMPLINGWINDOW IN MDSYS.SDO_GEOMETRY, > BANDNUMBERS IN VARCHAR2 DEFAULT NULL, > NODATA IN VARCHAR2 DEFAULT 'FALSE', > POLYGONCLIP IN VARCHAR2 DEFAULT NULL, > PARALLELPARAM IN VARCHAR2 DEFAULT NULL > ) > RETURN NUMBER > AS > STAT MDSYS.SDO_NUMBER_ARRAY; > BEGIN > IF MASK IS NULL THEN > > STAT:=RETURNSTATISTICS(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,POLYGONCLIP,PARALLELPARAM); > IF STAT IS NOT NULL THEN > RETURN STAT(2); > ELSE > RETURN NULL; > END IF; > ELSE > > STAT:=RETURNSTATISTICS2_2(GEORASTER,MASK,SAMPLINGFACTOR, > BANDNUMBERS,NODATA,PARALLELPARAM,0, > PYRAMIDLEVEL, SAMPLINGWINDOW, POLYGONCLIP); > IF STAT IS NOT NULL THEN > RETURN STAT(3); > ELSE > RETURN NULL; > END IF; > END IF; > END GENERATESTATISTICSMIN; > > FUNCTION GENERATESTATISTICSMEAN > ( > GEORASTER IN MDSYS.SDO_GEORASTER, > PYRAMIDLEVEL IN NUMBER, > SAMPLINGFACTOR IN VARCHAR2, > SAMPLINGWINDOW IN MDSYS.SDO_NUMBER_ARRAY, > BANDNUMBERS IN VARCHAR2 DEFAULT NULL, > NODATA IN VARCHAR2 DEFAULT 'FALSE', > PARALLELPARAM IN VARCHAR2 DEFAULT NULL > ) > RETURN NUMBER > AS > STAT MDSYS.SDO_NUMBER_ARRAY; > BEGIN > STAT:=RETURNSTATISTICS(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,PARALLELPARAM); > IF STAT IS NOT NULL THEN > RETURN STAT(3); > ELSE > RETURN NULL; > END IF; > END GENERATESTATISTICSMEAN; > > FUNCTION GENERATESTATISTICSMEAN > ( > GEORASTER IN MDSYS.SDO_GEORASTER, > PYRAMIDLEVEL IN NUMBER, > SAMPLINGFACTOR IN VARCHAR2, > SAMPLINGWINDOW IN MDSYS.SDO_GEOMETRY, > BANDNUMBERS IN VARCHAR2 DEFAULT NULL, > NODATA IN VARCHAR2 DEFAULT 'FALSE', > POLYGONCLIP IN VARCHAR2 DEFAULT NULL, > PARALLELPARAM IN VARCHAR2 DEFAULT NULL > ) > RETURN NUMBER > AS > STAT MDSYS.SDO_NUMBER_ARRAY; > BEGIN > STAT:=RETURNSTATISTICS(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,POLYGONCLIP,PARALLELPARAM); > IF STAT IS NOT NULL THEN > RETURN STAT(3); > ELSE > RETURN NULL; > END IF; > END GENERATESTATISTICSMEAN; > > FUNCTION GENERATESTATISTICSMEAN > ( > GEORASTER IN MDSYS.SDO_GEORASTER, > MASK IN MDSYS.SDO_GEORASTER, > PYRAMIDLEVEL IN NUMBER, > SAMPLINGFACTOR IN VARCHAR2, > SAMPLINGWINDOW IN MDSYS.SDO_NUMBER_ARRAY, > BANDNUMBERS IN VARCHAR2 DEFAULT NULL, > NODATA IN VARCHAR2 DEFAULT 'FALSE', > PARALLELPARAM IN VARCHAR2 DEFAULT NULL > ) > RETURN NUMBER > AS > STAT MDSYS.SDO_NUMBER_ARRAY; > BEGIN > IF MASK IS NULL THEN > > STAT:=RETURNSTATISTICS(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,PARALLELPARAM); > IF STAT IS NOT NULL THEN > RETURN STAT(3); > ELSE > RETURN NULL; > END IF; > ELSE > > STAT:=RETURNSTATISTICS2_1(GEORASTER,MASK,SAMPLINGFACTOR, > BANDNUMBERS,NODATA,PARALLELPARAM,0, > PYRAMIDLEVEL, SAMPLINGWINDOW); > IF STAT IS NOT NULL THEN > RETURN STAT(5); > ELSE > RETURN NULL; > END IF; > END IF; > END GENERATESTATISTICSMEAN; > > FUNCTION GENERATESTATISTICSMEAN > ( > GEORASTER IN MDSYS.SDO_GEORASTER, > MASK IN MDSYS.SDO_GEORASTER, > PYRAMIDLEVEL IN NUMBER, > SAMPLINGFACTOR IN VARCHAR2, > SAMPLINGWINDOW IN MDSYS.SDO_GEOMETRY, > BANDNUMBERS IN VARCHAR2 DEFAULT NULL, > NODATA IN VARCHAR2 DEFAULT 'FALSE', > POLYGONCLIP IN VARCHAR2 DEFAULT NULL, > PARALLELPARAM IN VARCHAR2 DEFAULT NULL > ) > RETURN NUMBER > AS > STAT MDSYS.SDO_NUMBER_ARRAY; > BEGIN > IF MASK IS NULL THEN > > STAT:=RETURNSTATISTICS(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,POLYGONCLIP,PARALLELPARAM); > IF STAT IS NOT NULL THEN > RETURN STAT(3); > ELSE > RETURN NULL; > END IF; > ELSE > > STAT:=RETURNSTATISTICS2_2(GEORASTER,MASK,SAMPLINGFACTOR, > BANDNUMBERS,NODATA,PARALLELPARAM,0, > PYRAMIDLEVEL, SAMPLINGWINDOW, POLYGONCLIP); > IF STAT IS NOT NULL THEN > RETURN STAT(5); > ELSE > RETURN NULL; > END IF; > END IF; > END GENERATESTATISTICSMEAN; > > FUNCTION GENERATESTATISTICSSTD > ( > GEORASTER IN MDSYS.SDO_GEORASTER, > PYRAMIDLEVEL IN NUMBER, > SAMPLINGFACTOR IN VARCHAR2, > SAMPLINGWINDOW IN MDSYS.SDO_NUMBER_ARRAY, > BANDNUMBERS IN VARCHAR2 DEFAULT NULL, > NODATA IN VARCHAR2 DEFAULT 'FALSE', > PARALLELPARAM IN VARCHAR2 DEFAULT NULL > ) > RETURN NUMBER > AS > STAT MDSYS.SDO_NUMBER_ARRAY; > BEGIN > STAT:=RETURNSTATISTICS(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,PARALLELPARAM); > IF STAT IS NOT NULL THEN > RETURN STAT(4); > ELSE > RETURN NULL; > END IF; > END GENERATESTATISTICSSTD; > > FUNCTION GENERATESTATISTICSSTD > ( > GEORASTER IN MDSYS.SDO_GEORASTER, > PYRAMIDLEVEL IN NUMBER, > SAMPLINGFACTOR IN VARCHAR2, > SAMPLINGWINDOW IN MDSYS.SDO_GEOMETRY, > BANDNUMBERS IN VARCHAR2 DEFAULT NULL, > NODATA IN VARCHAR2 DEFAULT 'FALSE', > POLYGONCLIP IN VARCHAR2 DEFAULT NULL, > PARALLELPARAM IN VARCHAR2 DEFAULT NULL > ) > RETURN NUMBER > AS > STAT MDSYS.SDO_NUMBER_ARRAY; > BEGIN > STAT:=RETURNSTATISTICS(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,POLYGONCLIP,PARALLELPARAM); > IF STAT IS NOT NULL THEN > RETURN STAT(4); > ELSE > RETURN NULL; > END IF; > END GENERATESTATISTICSSTD; > > > FUNCTION GENERATESTATISTICSSTD > ( > GEORASTER IN MDSYS.SDO_GEORASTER, > MASK IN MDSYS.SDO_GEORASTER, > PYRAMIDLEVEL IN NUMBER, > SAMPLINGFACTOR IN VARCHAR2, > SAMPLINGWINDOW IN MDSYS.SDO_NUMBER_ARRAY, > BANDNUMBERS IN VARCHAR2 DEFAULT NULL, > NODATA IN VARCHAR2 DEFAULT 'FALSE', 6707,6708c8029,8047 < STAT:=RETURNSTATISTICS(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,PARALLELPARAM); < RETURN STAT(4); --- > IF MASK IS NULL THEN > > STAT:=RETURNSTATISTICS(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,PARALLELPARAM); > IF STAT IS NOT NULL THEN > RETURN STAT(4); > ELSE > RETURN NULL; > END IF; > ELSE > > STAT:=RETURNSTATISTICS2_1(GEORASTER,MASK,SAMPLINGFACTOR, > BANDNUMBERS,NODATA,PARALLELPARAM,0, > PYRAMIDLEVEL, SAMPLINGWINDOW); > IF STAT IS NOT NULL THEN > RETURN STAT(6); > ELSE > RETURN NULL; > END IF; > END IF; 6713a8053 > MASK IN MDSYS.SDO_GEORASTER, 6726,6727c8066,8084 < STAT:=RETURNSTATISTICS(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,POLYGONCLIP,PARALLELPARAM); < RETURN STAT(4); --- > IF MASK IS NULL THEN > > STAT:=RETURNSTATISTICS(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,POLYGONCLIP,PARALLELPARAM); > IF STAT IS NOT NULL THEN > RETURN STAT(4); > ELSE > RETURN NULL; > END IF; > ELSE > > STAT:=RETURNSTATISTICS2_2(GEORASTER,MASK,SAMPLINGFACTOR, > BANDNUMBERS,NODATA,PARALLELPARAM,0, > PYRAMIDLEVEL, SAMPLINGWINDOW, POLYGONCLIP); > IF STAT IS NOT NULL THEN > RETURN STAT(6); > ELSE > RETURN NULL; > END IF; > END IF; 6744,6745c8101,8165 < STAT:=RETURNSTATISTICS1(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,PARALLELPARAM); < RETURN STAT(1); --- > STAT:=RETURNSTATISTICS1(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,PARALLELPARAM); > IF STAT IS NOT NULL THEN > RETURN STAT(1); > ELSE > RETURN NULL; > END IF; > END GENERATESTATISTICSMEDIAN; > > FUNCTION GENERATESTATISTICSMEDIAN > ( > GEORASTER IN MDSYS.SDO_GEORASTER, > PYRAMIDLEVEL IN NUMBER, > SAMPLINGFACTOR IN VARCHAR2, > SAMPLINGWINDOW IN MDSYS.SDO_GEOMETRY, > BANDNUMBERS IN VARCHAR2 DEFAULT NULL, > NODATA IN VARCHAR2 DEFAULT 'FALSE', > POLYGONCLIP IN VARCHAR2 DEFAULT NULL, > PARALLELPARAM IN VARCHAR2 DEFAULT NULL > ) > RETURN NUMBER > AS > STAT MDSYS.SDO_NUMBER_ARRAY; > BEGIN > STAT:=RETURNSTATISTICS1(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,POLYGONCLIP,PARALLELPARAM); > IF STAT IS NOT NULL THEN > RETURN STAT(1); > ELSE > RETURN NULL; > END IF; > END GENERATESTATISTICSMEDIAN; > > FUNCTION GENERATESTATISTICSMEDIAN > ( > GEORASTER IN MDSYS.SDO_GEORASTER, > MASK IN MDSYS.SDO_GEORASTER , > PYRAMIDLEVEL IN NUMBER, > SAMPLINGFACTOR IN VARCHAR2, > SAMPLINGWINDOW IN MDSYS.SDO_NUMBER_ARRAY, > BANDNUMBERS IN VARCHAR2 DEFAULT NULL, > NODATA IN VARCHAR2 DEFAULT 'FALSE', > PARALLELPARAM IN VARCHAR2 DEFAULT NULL > ) > RETURN NUMBER > AS > STAT MDSYS.SDO_NUMBER_ARRAY; > BEGIN > IF MASK IS NULL THEN > > STAT:=RETURNSTATISTICS1(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,PARALLELPARAM); > IF STAT IS NOT NULL THEN > RETURN STAT(1); > ELSE > RETURN NULL; > END IF; > ELSE > > STAT:=RETURNSTATISTICS2_1(GEORASTER,MASK,SAMPLINGFACTOR, > BANDNUMBERS,NODATA,PARALLELPARAM,1, > PYRAMIDLEVEL, SAMPLINGWINDOW); > IF STAT IS NOT NULL THEN > RETURN STAT(1); > ELSE > RETURN NULL; > END IF; > END IF; 6750a8171 > MASK IN MDSYS.SDO_GEORASTER , 6763,6764c8184,8202 < STAT:=RETURNSTATISTICS1(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,POLYGONCLIP,PARALLELPARAM); < RETURN STAT(1); --- > IF MASK IS NULL THEN > > STAT:=RETURNSTATISTICS1(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,POLYGONCLIP,PARALLELPARAM); > IF STAT IS NOT NULL THEN > RETURN STAT(1); > ELSE > RETURN NULL; > END IF; > ELSE > > STAT:=RETURNSTATISTICS2_2(GEORASTER,MASK,SAMPLINGFACTOR, > BANDNUMBERS,NODATA,PARALLELPARAM,1, > PYRAMIDLEVEL, SAMPLINGWINDOW, POLYGONCLIP); > IF STAT IS NOT NULL THEN > RETURN STAT(1); > ELSE > RETURN NULL; > END IF; > END IF; 6781,6782c8219,8224 < STAT:=RETURNSTATISTICS1(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,PARALLELPARAM); < RETURN STAT(2); --- > STAT:=RETURNSTATISTICS1(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,PARALLELPARAM); > IF STAT IS NOT NULL THEN > RETURN STAT(2); > ELSE > RETURN NULL; > END IF; 6800,6801c8242,8320 < STAT:=RETURNSTATISTICS1(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,POLYGONCLIP,PARALLELPARAM); < RETURN STAT(2); --- > STAT:=RETURNSTATISTICS1(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,POLYGONCLIP,PARALLELPARAM); > IF STAT IS NOT NULL THEN > RETURN STAT(2); > ELSE > RETURN NULL; > END IF; > END GENERATESTATISTICSMODE; > > FUNCTION GENERATESTATISTICSMODE > ( > GEORASTER IN MDSYS.SDO_GEORASTER, > MASK IN MDSYS.SDO_GEORASTER, > PYRAMIDLEVEL IN NUMBER, > SAMPLINGFACTOR IN VARCHAR2, > SAMPLINGWINDOW IN MDSYS.SDO_NUMBER_ARRAY, > BANDNUMBERS IN VARCHAR2 DEFAULT NULL, > NODATA IN VARCHAR2 DEFAULT 'FALSE', > PARALLELPARAM IN VARCHAR2 DEFAULT NULL > ) > RETURN NUMBER > AS > STAT MDSYS.SDO_NUMBER_ARRAY; > BEGIN > IF MASK IS NULL THEN > > STAT:=RETURNSTATISTICS1(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,PARALLELPARAM); > IF STAT IS NOT NULL THEN > RETURN STAT(2); > ELSE > RETURN NULL; > END IF; > ELSE > > STAT:=RETURNSTATISTICS2_1(GEORASTER,MASK,SAMPLINGFACTOR, > BANDNUMBERS,NODATA,PARALLELPARAM,1, > PYRAMIDLEVEL, SAMPLINGWINDOW); > IF STAT IS NOT NULL THEN > RETURN STAT(2); > ELSE > RETURN NULL; > END IF; > END IF; > END GENERATESTATISTICSMODE; > > FUNCTION GENERATESTATISTICSMODE > ( > GEORASTER IN MDSYS.SDO_GEORASTER, > MASK IN MDSYS.SDO_GEORASTER, > PYRAMIDLEVEL IN NUMBER, > SAMPLINGFACTOR IN VARCHAR2, > SAMPLINGWINDOW IN MDSYS.SDO_GEOMETRY, > BANDNUMBERS IN VARCHAR2, > NODATA IN VARCHAR2 DEFAULT 'FALSE', > POLYGONCLIP IN VARCHAR2 DEFAULT NULL, > PARALLELPARAM IN VARCHAR2 DEFAULT NULL > ) > RETURN NUMBER > AS > STAT MDSYS.SDO_NUMBER_ARRAY; > BEGIN > IF MASK IS NULL THEN > > STAT:=RETURNSTATISTICS1(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,POLYGONCLIP,PARALLELPARAM); > IF STAT IS NOT NULL THEN > RETURN STAT(2); > ELSE > RETURN NULL; > END IF; > ELSE > > STAT:=RETURNSTATISTICS2_2(GEORASTER,MASK,SAMPLINGFACTOR, > BANDNUMBERS,NODATA,PARALLELPARAM,1, > PYRAMIDLEVEL, SAMPLINGWINDOW, POLYGONCLIP); > IF STAT IS NOT NULL THEN > RETURN STAT(2); > ELSE > RETURN NULL; > END IF; > END IF; 6802a8322,8439 > > FUNCTION GENERATESTATISTICSSUM > ( > GEORASTER IN MDSYS.SDO_GEORASTER, > PYRAMIDLEVEL IN NUMBER, > SAMPLINGFACTOR IN VARCHAR2, > SAMPLINGWINDOW IN MDSYS.SDO_NUMBER_ARRAY, > BANDNUMBERS IN VARCHAR2 DEFAULT NULL, > NODATA IN VARCHAR2 DEFAULT 'FALSE', > PARALLELPARAM IN VARCHAR2 DEFAULT NULL > ) > RETURN NUMBER > AS > STAT MDSYS.SDO_NUMBER_ARRAY; > BEGIN > STAT:=RETURNSTATISTICS(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,PARALLELPARAM); > IF STAT IS NOT NULL THEN > RETURN STAT(5); > ELSE > RETURN NULL; > END IF; > END GENERATESTATISTICSSUM; > > FUNCTION GENERATESTATISTICSSUM > ( > GEORASTER IN MDSYS.SDO_GEORASTER, > PYRAMIDLEVEL IN NUMBER, > SAMPLINGFACTOR IN VARCHAR2, > SAMPLINGWINDOW IN MDSYS.SDO_GEOMETRY, > BANDNUMBERS IN VARCHAR2 DEFAULT NULL, > NODATA IN VARCHAR2 DEFAULT 'FALSE', > POLYGONCLIP IN VARCHAR2 DEFAULT NULL, > PARALLELPARAM IN VARCHAR2 DEFAULT NULL > ) > RETURN NUMBER > AS > STAT MDSYS.SDO_NUMBER_ARRAY; > BEGIN > STAT:=RETURNSTATISTICS(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,POLYGONCLIP,PARALLELPARAM); > IF STAT IS NOT NULL THEN > RETURN STAT(5); > ELSE > RETURN NULL; > END IF; > END GENERATESTATISTICSSUM; > > FUNCTION GENERATESTATISTICSSUM > ( > GEORASTER IN MDSYS.SDO_GEORASTER, > MASK IN MDSYS.SDO_GEORASTER, > PYRAMIDLEVEL IN NUMBER, > SAMPLINGFACTOR IN VARCHAR2, > SAMPLINGWINDOW IN MDSYS.SDO_NUMBER_ARRAY, > BANDNUMBERS IN VARCHAR2 DEFAULT NULL, > NODATA IN VARCHAR2 DEFAULT 'FALSE', > PARALLELPARAM IN VARCHAR2 DEFAULT NULL > ) > RETURN NUMBER > AS > STAT MDSYS.SDO_NUMBER_ARRAY; > BEGIN > IF MASK IS NULL THEN > > STAT:=RETURNSTATISTICS(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,PARALLELPARAM); > IF STAT IS NOT NULL THEN > RETURN STAT(5); > ELSE > RETURN NULL; > END IF; > ELSE > > STAT:=RETURNSTATISTICS2_1(GEORASTER,MASK,SAMPLINGFACTOR, > BANDNUMBERS,NODATA,PARALLELPARAM,0, > PYRAMIDLEVEL, SAMPLINGWINDOW); > IF STAT IS NOT NULL THEN > RETURN STAT(7); > ELSE > RETURN NULL; > END IF; > END IF; > END GENERATESTATISTICSSUM; > > FUNCTION GENERATESTATISTICSSUM > ( > GEORASTER IN MDSYS.SDO_GEORASTER, > MASK IN MDSYS.SDO_GEORASTER, > PYRAMIDLEVEL IN NUMBER, > SAMPLINGFACTOR IN VARCHAR2, > SAMPLINGWINDOW IN MDSYS.SDO_GEOMETRY, > BANDNUMBERS IN VARCHAR2 DEFAULT NULL, > NODATA IN VARCHAR2 DEFAULT 'FALSE', > POLYGONCLIP IN VARCHAR2 DEFAULT NULL, > PARALLELPARAM IN VARCHAR2 DEFAULT NULL > ) > RETURN NUMBER > AS > STAT MDSYS.SDO_NUMBER_ARRAY; > BEGIN > IF MASK IS NULL THEN > > STAT:=RETURNSTATISTICS(GEORASTER,PYRAMIDLEVEL,SAMPLINGFACTOR,SAMPLINGWINDOW,BANDNUMBERS,NODATA,POLYGONCLIP,PARALLELPARAM); > IF STAT IS NOT NULL THEN > RETURN STAT(5); > ELSE > RETURN NULL; > END IF; > ELSE > > STAT:=RETURNSTATISTICS2_2(GEORASTER,MASK,SAMPLINGFACTOR, > BANDNUMBERS,NODATA,PARALLELPARAM,0, > PYRAMIDLEVEL, SAMPLINGWINDOW, POLYGONCLIP); > IF STAT IS NOT NULL THEN > RETURN STAT(7); > ELSE > RETURN NULL; > END IF; > END IF; > END GENERATESTATISTICSSUM;
1002a1003,1137 > FUNCTION GENERATESTATISTICSMASKP > ( > SRCRDT IN VARCHAR2, > SRCRID IN NUMBER, > X11 IN NUMBER, > Y11 IN NUMBER, > X12 IN NUMBER, > Y12 IN NUMBER, > MASKRDT IN VARCHAR2, > MASKRID IN NUMBER, > X21 IN NUMBER, > Y21 IN NUMBER, > X22 IN NUMBER, > Y22 IN NUMBER, > BANDS IN VARCHAR2, > SAMPLINGFACTOR IN PLS_INTEGER, > NODATA IN PLS_INTEGER, > DEGREE IN NUMBER, > PYRAMIDLEVEL IN PLS_INTEGER, > POLYGONCLIP IN PLS_INTEGER, > INTERGEOM IN MDSYS.SDO_GEOMETRY, > STMTHP IN SDO_GEOR_INT.PARALLELREFCUR > )RETURN SDO_GEOR_STATS > PIPELINED > PARALLEL_ENABLE (PARTITION STMTHP BY HASH(PID)) IS > PRAGMA AUTONOMOUS_TRANSACTION; > STAT MDSYS.SDO_NUMBER_ARRAY; > STATS SDO_GEOR_STAT; > CNT NUMBER; > SRCGEORASTER MDSYS.SDO_GEORASTER; > MASKGEORASTER MDSYS.SDO_GEORASTER; > OWNER VARCHAR2(260); > TABLENAME VARCHAR2(260); > COLNAME VARCHAR2(1024); > BEGIN > SDO_GEOR_INT.SDO_FETCH_SYSDATA(SRCRDT, > SRCRID, > OWNER, > TABLENAME, > COLNAME); > EXECUTE IMMEDIATE 'SELECT t.'||SYS.DBMS_ASSERT.ENQUOTE_NAME(COLNAME)|| > ' FROM '||SYS.DBMS_ASSERT.ENQUOTE_NAME(OWNER,FALSE)||'.'||SYS.DBMS_ASSERT.ENQUOTE_NAME(TABLENAME)||' t where t.'||SYS.DBMS_ASSERT.ENQUOTE_NAME(COLNAME)||'.RASTERDATATABLE=:1 and t.'||SYS.DBMS_ASSERT.ENQUOTE_NAME(COLNAME)||'.RASTERID=:2' INTO SRCGEORASTER USING SRCRDT,SRCRID; > > SDO_GEOR_INT.SDO_FETCH_SYSDATA(MASKRDT, > MASKRID, > OWNER, > TABLENAME, > COLNAME); > EXECUTE IMMEDIATE 'SELECT t.'||SYS.DBMS_ASSERT.ENQUOTE_NAME(COLNAME)|| > ' FROM '||SYS.DBMS_ASSERT.ENQUOTE_NAME(OWNER,FALSE)||'.'||SYS.DBMS_ASSERT.ENQUOTE_NAME(TABLENAME)||' t where t.'||SYS.DBMS_ASSERT.ENQUOTE_NAME(COLNAME)||'.RASTERDATATABLE=:1 and t.'||SYS.DBMS_ASSERT.ENQUOTE_NAME(COLNAME)||'.RASTERID=:2' INTO MASKGEORASTER USING MASKRDT,MASKRID; > > STAT:=SDO_GEOR_INT.GENERATESTATISTICSMASKP(SRCGEORASTER,X11,Y11,X12,Y12,MASKGEORASTER,X21,Y21,X22,Y22,BANDS,SAMPLINGFACTOR,NODATA,DEGREE,PYRAMIDLEVEL,POLYGONCLIP,INTERGEOM,STMTHP); > > COMMIT; > > IF(STAT IS NOT NULL) > THEN > STATS := SDO_GEOR_STAT(STAT(1), STAT(2), STAT(3), STAT(4), STAT(5)); > > > > > > PIPE ROW(STATS); > END IF; > RETURN; > END GENERATESTATISTICSMASKP; > > FUNCTION GENERATESTATISTICSMASK1P > ( > SRCRDT IN VARCHAR2, > SRCRID IN NUMBER, > X11 IN NUMBER, > Y11 IN NUMBER, > X12 IN NUMBER, > Y12 IN NUMBER, > MASKRDT IN VARCHAR2, > MASKRID IN NUMBER, > X21 IN NUMBER, > Y21 IN NUMBER, > X22 IN NUMBER, > Y22 IN NUMBER, > BANDS IN VARCHAR2, > SAMPLINGFACTOR IN PLS_INTEGER, > NODATA IN PLS_INTEGER, > MMAX IN NUMBER, > MMIN IN NUMBER, > DEGREE IN NUMBER, > PYRAMIDLEVEL IN PLS_INTEGER, > POLYGONCLIP IN PLS_INTEGER, > INTERGEOM IN MDSYS.SDO_GEOMETRY, > STMTHP IN SDO_GEOR_INT.PARALLELREFCUR > )RETURN SDO_GEOR_HIST_STATS > PIPELINED > PARALLEL_ENABLE (PARTITION STMTHP BY HASH(PID)) IS > PRAGMA AUTONOMOUS_TRANSACTION; > STAT MDSYS.SDO_NUMBER_ARRAY; > STATS SDO_GEOR_HIST_STAT; > CNT NUMBER; > SRCGEORASTER MDSYS.SDO_GEORASTER; > MASKGEORASTER MDSYS.SDO_GEORASTER; > OWNER VARCHAR2(260); > TABLENAME VARCHAR2(260); > COLNAME VARCHAR2(1024); > BEGIN > SDO_GEOR_INT.SDO_FETCH_SYSDATA(SRCRDT, > SRCRID, > OWNER, > TABLENAME, > COLNAME); > EXECUTE IMMEDIATE 'SELECT t.'||SYS.DBMS_ASSERT.ENQUOTE_NAME(COLNAME)|| > ' FROM '||SYS.DBMS_ASSERT.ENQUOTE_NAME(OWNER,FALSE)||'.'||SYS.DBMS_ASSERT.ENQUOTE_NAME(TABLENAME)||' t where t.'||SYS.DBMS_ASSERT.ENQUOTE_NAME(COLNAME)||'.RASTERDATATABLE=:1 and t.'||SYS.DBMS_ASSERT.ENQUOTE_NAME(COLNAME)||'.RASTERID=:2' INTO SRCGEORASTER USING SRCRDT,SRCRID; > > SDO_GEOR_INT.SDO_FETCH_SYSDATA(MASKRDT, > MASKRID, > OWNER, > TABLENAME, > COLNAME); > EXECUTE IMMEDIATE 'SELECT t.'||SYS.DBMS_ASSERT.ENQUOTE_NAME(COLNAME)|| > ' FROM '||SYS.DBMS_ASSERT.ENQUOTE_NAME(OWNER,FALSE)||'.'||SYS.DBMS_ASSERT.ENQUOTE_NAME(TABLENAME)||' t where t.'||SYS.DBMS_ASSERT.ENQUOTE_NAME(COLNAME)||'.RASTERDATATABLE=:1 and t.'||SYS.DBMS_ASSERT.ENQUOTE_NAME(COLNAME)||'.RASTERID=:2' INTO MASKGEORASTER USING MASKRDT,MASKRID; > > STAT:=SDO_GEOR_INT.GENERATESTATISTICSMASK1P(SRCGEORASTER,X11,Y11,X12,Y12, > MASKGEORASTER, X21,Y21,X22,Y22,BANDS,SAMPLINGFACTOR,NODATA, > MMAX,MMIN,DEGREE,PYRAMIDLEVEL,POLYGONCLIP,INTERGEOM,STMTHP); > COMMIT; > IF(STAT IS NOT NULL) > THEN > FOR CNT IN 1..STAT.COUNT LOOP > STATS := MDSYS.SDO_GEOR_HIST_STAT(CNT, STAT(CNT)); > PIPE ROW(STATS); > END LOOP; > END IF; > RETURN; > END GENERATESTATISTICSMASK1P; >
25a26,28 > IF INSTR(FILENAME, '/') > 0 OR INSTR(FILENAME, '\') > 0 THEN > MDSYS.MDERR.RAISE_MD_ERROR( 'MD', 'SDO', -13393, 'FileName'); > END IF; 273a277 > RET NUMBER; 274a279,286 > > RET := REGEXP_INSTR(OUTFILENAME, '[^a-zA-Z0-9_.]'); > IF RET > 0 THEN > MDSYS.MDERR.RAISE_MD_ERROR( 'MD', 'SDO', -13393, > 'outFilename'); > RETURN ; > END IF; >
7318a7319,7519 > FUNCTION GENERATESTATISTICSMASKP > ( > GROBJ IN MDSYS.SDO_GEORASTER, > X11 IN NUMBER, > Y11 IN NUMBER, > X12 IN NUMBER, > Y12 IN NUMBER, > MASK IN MDSYS.SDO_GEORASTER, > X21 IN NUMBER, > Y21 IN NUMBER, > X22 IN NUMBER, > Y22 IN NUMBER, > BANDS IN VARCHAR2, > SAMPLINGFACTOR IN PLS_INTEGER, > NODATA IN PLS_INTEGER, > DEGREE IN NUMBER, > PYRAMIDLEVEL IN PLS_INTEGER, > POLYGONCLIP IN PLS_INTEGER, > INTERGEOM IN MDSYS.SDO_GEOMETRY, > STMTHP IN SDO_GEOR_INT.PARALLELREFCUR > )RETURN MDSYS.SDO_NUMBER_ARRAY DETERMINISTIC > IS LANGUAGE C > NAME "georGenerateStatisticsMaskP" > LIBRARY ORDMD_GEOR_LIBS > WITH CONTEXT > PARAMETERS( > CONTEXT, > GROBJ, > GROBJ INDICATOR STRUCT, > X11 OCINUMBER, > X11 INDICATOR, > Y11 OCINUMBER, > Y11 INDICATOR, > X12 OCINUMBER, > X12 INDICATOR, > Y12 OCINUMBER, > Y12 INDICATOR, > MASK, > MASK INDICATOR STRUCT, > X21 OCINUMBER, > X21 INDICATOR, > Y21 OCINUMBER, > Y21 INDICATOR, > X22 OCINUMBER, > X22 INDICATOR, > Y22 OCINUMBER, > Y22 INDICATOR, > BANDS OCISTRING, > BANDS INDICATOR, > SAMPLINGFACTOR UB4, > SAMPLINGFACTOR INDICATOR, > NODATA UB4, > NODATA INDICATOR, > DEGREE, > DEGREE INDICATOR, > PYRAMIDLEVEL SB4, > PYRAMIDLEVEL INDICATOR, > POLYGONCLIP UB4, > POLYGONCLIP INDICATOR, > INTERGEOM, > INTERGEOM INDICATOR STRUCT, > STMTHP OCIREFCURSOR, > RETURN INDICATOR, > RETURN); > > FUNCTION GENERATESTATISTICSMASK1P > ( > GROBJ IN MDSYS.SDO_GEORASTER, > X11 IN NUMBER, > Y11 IN NUMBER, > X12 IN NUMBER, > Y12 IN NUMBER, > MASK IN MDSYS.SDO_GEORASTER, > X21 IN NUMBER, > Y21 IN NUMBER, > X22 IN NUMBER, > Y22 IN NUMBER, > BANDS IN VARCHAR2, > SAMPLINGFACTOR IN PLS_INTEGER, > NODATA IN PLS_INTEGER, > MMAX IN NUMBER, > MMIN IN NUMBER, > DEGREE IN NUMBER, > PYRAMIDLEVEL IN PLS_INTEGER, > POLYGONCLIP IN PLS_INTEGER, > INTERGEOM IN MDSYS.SDO_GEOMETRY, > STMTHP IN SDO_GEOR_INT.PARALLELREFCUR > )RETURN MDSYS.SDO_NUMBER_ARRAY DETERMINISTIC > IS LANGUAGE C > NAME "georGenerateStatisticsMask1P" > LIBRARY ORDMD_GEOR_LIBS > WITH CONTEXT > PARAMETERS( > CONTEXT, > GROBJ, > GROBJ INDICATOR STRUCT, > X11 OCINUMBER, > X11 INDICATOR, > Y11 OCINUMBER, > Y11 INDICATOR, > X12 OCINUMBER, > X12 INDICATOR, > Y12 OCINUMBER, > Y12 INDICATOR, > MASK, > MASK INDICATOR STRUCT, > X21 OCINUMBER, > X21 INDICATOR, > Y21 OCINUMBER, > Y21 INDICATOR, > X22 OCINUMBER, > X22 INDICATOR, > Y22 OCINUMBER, > Y22 INDICATOR, > BANDS OCISTRING, > BANDS INDICATOR, > SAMPLINGFACTOR UB4, > SAMPLINGFACTOR INDICATOR, > NODATA UB4, > NODATA INDICATOR, > MMAX, > MMAX INDICATOR, > MMIN, > MMIN INDICATOR, > DEGREE, > DEGREE INDICATOR, > PYRAMIDLEVEL SB4, > PYRAMIDLEVEL INDICATOR, > POLYGONCLIP UB4, > POLYGONCLIP INDICATOR, > INTERGEOM, > INTERGEOM INDICATOR STRUCT, > STMTHP OCIREFCURSOR, > RETURN INDICATOR, > RETURN); > > > FUNCTION GENERATESTATISTICSMASK > ( > GROBJ IN MDSYS.SDO_GEORASTER, > X11 IN NUMBER, > Y11 IN NUMBER, > X12 IN NUMBER, > Y12 IN NUMBER, > MASK IN MDSYS.SDO_GEORASTER, > X21 IN NUMBER, > Y21 IN NUMBER, > X22 IN NUMBER, > Y22 IN NUMBER, > BANDS IN VARCHAR2, > SAMPLINGFACTOR IN PLS_INTEGER, > NODATA IN PLS_INTEGER, > NEEDMODEMEDIAN IN PLS_INTEGER, > PYRAMIDLEVEL IN PLS_INTEGER, > POLYGONCLIP IN PLS_INTEGER, > INTERGEOM IN MDSYS.SDO_GEOMETRY > ) > RETURN MDSYS.SDO_NUMBER_ARRAY DETERMINISTIC > IS LANGUAGE C > NAME "georGenerateStatisticsMask" > LIBRARY ORDMD_GEOR_LIBS > WITH CONTEXT > PARAMETERS( > CONTEXT, > GROBJ, > GROBJ INDICATOR STRUCT, > X11 OCINUMBER, > X11 INDICATOR, > Y11 OCINUMBER, > Y11 INDICATOR, > X12 OCINUMBER, > X12 INDICATOR, > Y12 OCINUMBER, > Y12 INDICATOR, > MASK, > MASK INDICATOR STRUCT, > X21 OCINUMBER, > X21 INDICATOR, > Y21 OCINUMBER, > Y21 INDICATOR, > X22 OCINUMBER, > X22 INDICATOR, > Y22 OCINUMBER, > Y22 INDICATOR, > BANDS OCISTRING, > BANDS INDICATOR, > SAMPLINGFACTOR UB4, > SAMPLINGFACTOR INDICATOR, > NODATA UB4, > NODATA INDICATOR, > NEEDMODEMEDIAN UB4, > NEEDMODEMEDIAN INDICATOR, > PYRAMIDLEVEL SB4, > PYRAMIDLEVEL INDICATOR, > POLYGONCLIP UB4, > POLYGONCLIP INDICATOR, > INTERGEOM, > INTERGEOM INDICATOR STRUCT, > RETURN INDICATOR, > RETURN); >
7855a7856 > EVENT_LEVEL NUMBER; 7862a7864 > EVENT_LEVEL := MDSYS.SDO_3GL.GET_EVENT(54713); 7864c7866 < IF ( MD_LRS.GEODETIC_2D_GEOM(GEOM_SEGMENT) = 'TRUE' ) THEN --- > IF (( MD_LRS.GEODETIC_2D_GEOM(GEOM_SEGMENT) = 'TRUE') AND (EVENT_LEVEL = 0)) THEN
270c270 < STMT VARCHAR2(256); --- > STMT VARCHAR2(4000); 274,277c274,280 < EXECUTE IMMEDIATE < ' select GEORASTER_TABLE_NAME from MDSYS.sdo_geor_sysdata_table ' || < ' where SDO_OWNER = :1 and RDT_TABLE_NAME = :2 and rownum < 2' < INTO GR_TABLE USING OWNER, RDT; --- > STMT := 'select GEORASTER_TABLE_NAME ' || > 'from mdsys.sdo_geor_sysdata_table ' || > 'where SDO_OWNER = :1 ' || > 'and RDT_TABLE_NAME = :2 ' || > 'fetch first 1 row only'; > > EXECUTE IMMEDIATE STMT INTO GR_TABLE USING OWNER, RDT;
187c187 < CH VARCHAR2(2); --- > CH VARCHAR2(24);
161a162 > BEGIN 169a171,174 > EXCEPTION > WHEN OTHERS THEN > NULL; > END; 431a437 > BEGIN 439a446,449 > EXCEPTION > WHEN OTHERS THEN > NULL; > END; 570a581 > BEGIN 578a590,593 > EXCEPTION > WHEN OTHERS THEN > NULL; > END; 682a698 > BEGIN 690a707,710 > EXCEPTION > WHEN OTHERS THEN > NULL; > END;
9,10c9,10 < SEM_APIS.SET_NETWORK_INFO_CP_TO_PKGS(NULL, NULL); < SEM_RDFCTX_DR.COPY_NETWORK_INFO_TO_PKG_VARS; --- > >
50a51,53 > > VALID_VERSION_NUMBERS.TRIM(VALID_VERSION_NUMBERS.COUNT - 1); > AGENT_VERSION_NUMBERS.TRIM(AGENT_VERSION_NUMBERS.COUNT - 1);
167a168,204 > PROCEDURE ACCHK_VIEWS; > -- This procedure creates the views for acchk protected analisys > -- Call this procedure at PDB level or CDB root level before > -- using any other ACCHK procedure. > -- This procedure must be called once on each PDB or CDB root > -- as required. > -- > -- Input Parameters(s): > -- NONE > -- > -- Error > -- Appropriate error raised by server. > > PROCEDURE ACCHK_SET(enabled IN BOOLEAN, > disable_time IN NUMBER DEFAULT 600); > -- This procedure enables or disables the data collection > -- for acchk protection analysis. > -- Set is at the PDB level or CDB root level, or non-CDB in the instance > -- and does not remain in effect across instance restarts. > -- Set can be used on both primary and standby databases. > -- Set is not transfered automatically to standby. > -- > -- Input Parameter(s): > -- enabled - TRUE or FALSE > -- TRUE: Enable ACCHK data collection. > -- FALSE: Disable ACCHK data collection. > -- disable_time - Optional parameter. Default 600 seconds. > -- Used to disable ACCHK data collecting automatically > -- in a given number of seconds. > -- Valid range is from 60 up to 3600 seconds. > -- This parameter will take effect if ACCHK is not > -- explicitly disabled by the user. > -- This parameter is ignored when enabled is FALSE. > -- > -- error: > -- Appropiate error raised by server. >
12c12 < bannerVersion CONSTANT VARCHAR2(15) := '19.10.00.00'; --- > bannerVersion CONSTANT VARCHAR2(15) := '19.10.01.00'; 24,26c24,26 < fsn CONSTANT NUMBER := instr('19.10.00.00', '.'); < msn CONSTANT NUMBER := instr('19.10.00.00', '.', fsn + 1); < psn CONSTANT NUMBER := instr('19.10.00.00', '.', msn + 1); --- > fsn CONSTANT NUMBER := instr('19.10.01.00', '.'); > msn CONSTANT NUMBER := instr('19.10.01.00', '.', fsn + 1); > psn CONSTANT NUMBER := instr('19.10.01.00', '.', msn + 1); 29c29 < to_number(substr('19.10.00.00', 1, fsn - 1)); --- > to_number(substr('19.10.01.00', 1, fsn - 1)); 31c31 < to_number(substr('19.10.00.00', fsn + 1, msn - fsn - 1)); --- > to_number(substr('19.10.01.00', fsn + 1, msn - fsn - 1)); 33c33 < to_number(substr('19.10.00.00', msn + 1, psn - msn - 1)); --- > to_number(substr('19.10.01.00', msn + 1, psn - msn - 1)); 35c35 < to_number(substr('19.10.00.00', psn + 1)); --- > to_number(substr('19.10.01.00', psn + 1));
12c12 < bannerVersion CONSTANT VARCHAR2(15) := '19.09.01.00'; --- > bannerVersion CONSTANT VARCHAR2(15) := '19.09.02.00'; 24,26c24,26 < fsn CONSTANT NUMBER := instr('19.09.01.00', '.'); < msn CONSTANT NUMBER := instr('19.09.01.00', '.', fsn + 1); < psn CONSTANT NUMBER := instr('19.09.01.00', '.', msn + 1); --- > fsn CONSTANT NUMBER := instr('19.09.02.00', '.'); > msn CONSTANT NUMBER := instr('19.09.02.00', '.', fsn + 1); > psn CONSTANT NUMBER := instr('19.09.02.00', '.', msn + 1); 29c29 < to_number(substr('19.09.01.00', 1, fsn - 1)); --- > to_number(substr('19.09.02.00', 1, fsn - 1)); 31c31 < to_number(substr('19.09.01.00', fsn + 1, msn - fsn - 1)); --- > to_number(substr('19.09.02.00', fsn + 1, msn - fsn - 1)); 33c33 < to_number(substr('19.09.01.00', msn + 1, psn - msn - 1)); --- > to_number(substr('19.09.02.00', msn + 1, psn - msn - 1)); 35c35 < to_number(substr('19.09.01.00', psn + 1)); --- > to_number(substr('19.09.02.00', psn + 1));
12c12 < bannerVersion CONSTANT VARCHAR2(15) := '19.10.00.00'; --- > bannerVersion CONSTANT VARCHAR2(15) := '19.11.00.00'; 24,26c24,26 < fsn CONSTANT NUMBER := instr('19.10.00.00', '.'); < msn CONSTANT NUMBER := instr('19.10.00.00', '.', fsn + 1); < psn CONSTANT NUMBER := instr('19.10.00.00', '.', msn + 1); --- > fsn CONSTANT NUMBER := instr('19.11.00.00', '.'); > msn CONSTANT NUMBER := instr('19.11.00.00', '.', fsn + 1); > psn CONSTANT NUMBER := instr('19.11.00.00', '.', msn + 1); 29c29 < to_number(substr('19.10.00.00', 1, fsn - 1)); --- > to_number(substr('19.11.00.00', 1, fsn - 1)); 31c31 < to_number(substr('19.10.00.00', fsn + 1, msn - fsn - 1)); --- > to_number(substr('19.11.00.00', fsn + 1, msn - fsn - 1)); 33c33 < to_number(substr('19.10.00.00', msn + 1, psn - msn - 1)); --- > to_number(substr('19.11.00.00', msn + 1, psn - msn - 1)); 35c35 < to_number(substr('19.10.00.00', psn + 1)); --- > to_number(substr('19.11.00.00', psn + 1)); 9346a9347,9372 > -- > > PROCEDURE restoreSetDataFile( check_logical IN boolean > ,cleanup IN boolean > ,service IN varchar2 > ,chunksize IN binary_integer > ,rs_flags IN binary_integer > ,preplugin IN boolean > ,sparse_restore IN binary_integer > ,encdec_restore IN binary_integer > ,encdec_keyid IN varchar2); > -- Description and return values can be found with original declaration > -- above. New parameter: > -- encdec_keyid - user provided key id with which to encrypt/decrypt > > PROCEDURE restoreSetDataFile( check_logical IN boolean > ,cleanup IN boolean > ,service IN varchar2 > ,sparse_restore IN binary_integer > ,encdec_restore IN binary_integer > ,encdec_keyid IN varchar2); > -- Description and return values can be found with original declaration > -- above. New parameters: > -- > -- Input parameter: > -- encdec_keyid - user provided key id with which to encrypt/decrypt
67a68,72 > PROCEDURE import_dropped( > schema_name IN VARCHAR2, > table_name IN VARCHAR2, > drop_time IN TIMESTAMP WITH TIME ZONE); >
31a32,40 > function getCatalogEP > return varchar2; > PROCEDURE checkCatalogSysLink; > PROCEDURE setCatalogSysLink(gsmusrpwd IN VARCHAR2, gsm_endpoint IN VARCHAR2); > PROCEDURE trimDDL (ddl_id IN number, > pwd_start OUT number, > trim_ddl OUT varchar2); > >
31a32,36 > function getCatalogEP > return varchar2; > PROCEDURE checkCatalogSysLink; > PROCEDURE setCatalogSysLink(gsmusrpwd IN VARCHAR2, gsm_endpoint IN VARCHAR2); >
6c6,7 < edition_name IN varchar2 DEFAULT NULL); --- > edition_name IN varchar2 DEFAULT NULL, > force IN boolean DEFAULT FALSE); 16c17,18 < edition_name IN varchar2 DEFAULT NULL); --- > edition_name IN varchar2 DEFAULT NULL, > force IN boolean DEFAULT FALSE); 25c27,29 < edition_name IN varchar2 DEFAULT NULL); --- > edition_name IN varchar2 DEFAULT NULL, > force IN boolean DEFAULT FALSE); > 34c38,40 < edition_name IN varchar2 DEFAULT NULL); --- > edition_name IN varchar2 DEFAULT NULL, > force IN boolean DEFAULT FALSE); >
72c72,74 < WHERE NAME='ORA$BASE' AND TYPE# = 57)) ED_ID, --- > WHERE NAME=(SELECT VALUE$ > FROM PROPS$ WHERE NAME='DEFAULT_EDITION') AND > TYPE# = 57)) ED_ID, 75c77,78 < 'ORA$BASE') ED_NAME --- > (SELECT VALUE$ FROM PROPS$ WHERE NAME='DEFAULT_EDITION')) > ED_NAME 95c98,100 < WHERE NAME='ORA$BASE' AND TYPE# = 57)) ED_ID, --- > WHERE NAME=(SELECT VALUE$ > FROM PROPS$ WHERE NAME='DEFAULT_EDITION') AND > TYPE# = 57)) ED_ID, 98c103,104 < 'ORA$BASE') ED_NAME --- > (SELECT VALUE$ FROM PROPS$ WHERE NAME='DEFAULT_EDITION')) > ED_NAME
13c13 < '19.9.1.0.0'; --- > '19.9.2.0.0';
13c13 < '19.10.0.0.0'; --- > '19.10.1.0.0';
13c13 < '19.10.0.0.0'; --- > '19.11.0.0.0';
10,11c10,25 < CREATE_MODE_DDL CONSTANT PLS_INTEGER := 1; < CREATE_MODE_MAP CONSTANT PLS_INTEGER := 2; --- > CREATE_MODE_DDL CONSTANT PLS_INTEGER := 1; > CREATE_MODE_MAP CONSTANT PLS_INTEGER := 2; > > -- Data guide format constants > DATAGUIDE_FORMAT_HIERARCHICAL CONSTANT PLS_INTEGER := 1; > DATAGUIDE_FORMAT_FLAT CONSTANT PLS_INTEGER := 2; > > -- Data guide flag constants > DATAGUIDE_PRETTY CONSTANT PLS_INTEGER := 1; > DATAGUIDE_GEOJSON CONSTANT PLS_INTEGER := 2; > DATAGUIDE_GATHER_STATS CONSTANT PLS_INTEGER := 4; > > -- MV refresh constants > MV_REFRESH_ON_STATEMENT CONSTANT PLS_INTEGER := 1; > MV_REFRESH_ON_COMMIT CONSTANT PLS_INTEGER := 2; > MV_REFRESH_ON_DEMAND CONSTANT PLS_INTEGER := 3; 28a43,48 > > FUNCTION get_As_Of_SCN > RETURN NUMBER; > > FUNCTION get_As_Of_Timestamp > RETURN VARCHAR2;
33c33,37 < --- > procedure list_usage_statistics(P_OWNER in varchar2, > P_STATISTICS out varchar2, > P_ACCESS_TYPE in varchar2 default 'READ', > P_SORT in number default 1, > P_LIMIT in number default 100);
321a322 >
3a4,11 > DUC_STOP_ONLY CONSTANT NUMBER := 1; > DUC_DROP_ONLY CONSTANT NUMBER := 2; > DUC_PRIV_ONLY CONSTANT NUMBER := 3; > DUC_STOP_DROP CONSTANT NUMBER := 4; > DUC_DROP_PRIV CONSTANT NUMBER := 5; > DUC_ALL CONSTANT NUMBER := 6; > > 393c401,402 < CANON_STREAMS_NAME IN VARCHAR2 DEFAULT NULL); --- > CANON_STREAMS_NAME IN VARCHAR2 DEFAULT NULL, > CANON_SOURCE_DB IN VARCHAR2 DEFAULT NULL); 471,473c480,481 < PROCEDURE PROCESS_DROP_USER_CASCADE(CANON_DROPPED_USER IN VARCHAR2); < < PROCEDURE PROCESS_DROP_USER_PRIVILEGE(CANON_DROPPED_USER IN VARCHAR2); --- > PROCEDURE PROCESS_DROP_USER_CASCADE(CANON_DROPPED_USER IN VARCHAR2, > DUC_MODE IN NUMBER DEFAULT DUC_ALL);
5c5 < cert_guid OUT RAW); --- > cert_id OUT RAW); 8c8 < cert_guid IN RAW); --- > cert_id IN RAW);
615a616,620 > DELETE FROM SYS.STREAMS$_RULES WHERE > STREAMS_NAME = CANON_APPLY_NAME AND > STREAMS_TYPE = DBMS_STREAMS_ADM_UTL.STREAMS_TYPE_APPLY; > >
444a445,1253 > > > > > > > > > > > > PROCEDURE ACCHK_VIEWS IS > > COMP VARCHAR2(30); > FIRSTDOT NUMBER; > SECDOT NUMBER; > MAJOR NUMBER; > MINOR NUMBER; > DUMMY NUMBER; > ACCHK_VIEWS_COUNT NUMBER; > ACCHK_EXCEPTION EXCEPTION; > ERROR_MESSAGE VARCHAR2(512); > BEGIN > > > > > > ERROR_MESSAGE := 'Error detecting ACCHK views'; > SELECT COUNT(O.NAME) INTO ACCHK_VIEWS_COUNT > FROM > SYS.OBJ$ O > WHERE > UPPER(O.NAME) > IN > ('DBA_ACCHK_EVENTS', > 'DBA_ACCHK_STATISTICS', > 'DBA_ACCHK_EVENTS_SUMMARY', > 'DBA_ACCHK_STATISTICS_SUMMARY', > 'CDB_ACCHK_EVENTS', > 'CDB_ACCHK_STATISTICS', > 'CDB_ACCHK_EVENTS_SUMMARY', > 'CDB_ACCHK_STATISTICS_SUMMARY') > AND > O.TYPE# = 4; > > > > > IF ACCHK_VIEWS_COUNT != 8 THEN > > > SELECT VALUE INTO COMP FROM V$PARAMETER WHERE LOWER(NAME) = 'compatible'; > FIRSTDOT := INSTR(COMP, '.'); > SECDOT := INSTR(COMP, '.', 1, 2); > MAJOR := TO_NUMBER(SUBSTR(COMP, 1, (FIRSTDOT-1))); > MINOR := TO_NUMBER(SUBSTR(COMP, (FIRSTDOT+1), (SECDOT-FIRSTDOT))); > > > IF (MAJOR > 12 OR (MAJOR = 12 AND MINOR >= 2)) THEN > GOTO ACCHKCREATEVIEWSANDROLE; > ELSE > > > > ERROR_MESSAGE := > 'Please, set COMPATIBLE parameter to 12.2.0.0 or greater to use ACCHK'; > RAISE ACCHK_EXCEPTION; > END IF; > END IF; > > <<ACCHKCREATEVIEWSANDROLE>> > > EXECUTE IMMEDIATE 'alter session set "_ORACLE_SCRIPT" = true'; > > > > > BEGIN > EXECUTE IMMEDIATE 'CREATE ROLE ACCHK_READ'; > EXCEPTION > WHEN OTHERS THEN > IF SQLCODE = -1921 THEN NULL; > ELSE > RAISE; > END IF; > END; > > > > > > > EXECUTE IMMEDIATE > 'CREATE OR REPLACE VIEW DBA_ACCHK_EVENTS AS > SELECT > inst_id, con_id, timestamp, session_id, serial#, jdata.* > FROM > GV$DIAG_TRACE_FILE_CONTENTS, > JSON_TABLE(payload,''$'' > COLUMNS( > SERVICE_NAME VARCHAR2(64) PATH ''$.ctx.svc'', > PROGRAM VARCHAR2(84) PATH ''$.ctx.prg'', > MODULE VARCHAR2(64) PATH ''$.ctx.mod'', > ACTION VARCHAR2(64) PATH ''$.ctx.act'', > SQL_ID VARCHAR2(13) PATH ''$.ctx.sql_id'', > CALL_NAME VARCHAR2(20) PATH ''$.ctx.call_name'', > EVENT_TYPE VARCHAR2(16) PATH ''$.event.type'', > ERROR_CODE NUMBER PATH ''$.event.error_code'')) > jdata > WHERE > ((SYS_CONTEXT(''USERENV'', ''CON_ID'') = con_id) OR > (SYS_CONTEXT(''USERENV'', ''CON_ID'') = 0 )) > AND > component_name = ''progint_appcont_rdbms'' > AND > payload like ''%"event" :%'''; > > > > > > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_EVENTS.INST_ID is > ''Instance number the session was using'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_EVENTS.CON_ID IS > ''Container ID the session was using'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_EVENTS.TIMESTAMP IS > ''Timestamp when the event occurred'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_EVENTS.SESSION_ID IS > ''User session ID which generated the trace record'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_EVENTS.SERIAL# IS > ''User session serial number which produced the trace record'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_EVENTS.SERVICE_NAME IS > ''Service name of the session'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_EVENTS.PROGRAM IS > ''Operating system program name'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_EVENTS.MODULE IS > ''Name of the currently executing module'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_EVENTS.ACTION IS > ''Name of the currently executing action'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_EVENTS.SQL_ID IS > ''SQL identifier of the SQL statement that is currently being executed'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_EVENTS.CALL_NAME IS > ''User call that is currently being executed'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_EVENTS.EVENT_TYPE IS > ''Type of the event recorded'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_EVENTS.ERROR_CODE is > ''The oracle error message number'''; > > > > > > > > EXECUTE IMMEDIATE > 'CREATE OR REPLACE VIEW DBA_ACCHK_STATISTICS AS > SELECT > inst_id, con_id, timestamp, session_id, serial#, jdata.* > FROM > GV$DIAG_TRACE_FILE_CONTENTS, > JSON_TABLE(payload, ''$'' > COLUMNS( > STAT_TYPE VARCHAR(32) PATH > ''$.stats.type'', > SERVICE_NAME VARCHAR(64) PATH > ''$.ctx.svc'', > FAILOVER_TYPE VARCHAR(16) PATH > ''$.svcattr.FAILOVER_TYPE'', > FAILOVER_RESTORE VARCHAR(16) PATH > ''$.svcattr.FAILOVER_RESTORE'', > RESET_STATE VARCHAR(16) PATH > ''$.svcattr.RESET_STATE'', > PROGRAM VARCHAR(84) PATH > ''$.ctx.prg'', > BEGIN_REQUESTS NUMBER PATH > ''$.stats.begin_requests'', > END_REQUESTS NUMBER PATH > ''$.stats.end_requests'', > USER_CALLS_IN_REQUESTS NUMBER PATH > ''$.stats.user_calls_in_requests'', > PROTECTED_CALLS_IN_REQUESTS NUMBER PATH > ''$.stats.protected_calls_in_requests'', > TIME_IN_REQUESTS NUMBER PATH > ''$.stats.time_in_requests'', > TIME_PROTECTED_IN_REQUESTS NUMBER PATH > ''$.stats.time_protected_in_requests'')) > jdata > WHERE > ((SYS_CONTEXT(''USERENV'',''CON_ID'') = con_id) OR > (SYS_CONTEXT(''USERENV'',''CON_ID'') = 0 )) > AND > component_name = ''progint_appcont_rdbms'' > AND > payload like ''%"stats" :%'' > AND > jdata.stat_type = ''SESSION_STATISTICS'''; > > > > > > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_STATISTICS.INST_ID IS > ''Instance number the session was using'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_STATISTICS.CON_ID IS > ''Container ID the session was using'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_STATISTICS.TIMESTAMP IS > ''Displays the timestamp when the event occurred'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_STATISTICS.SESSION_ID IS > ''User session ID which generated the trace record'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_STATISTICS.SERIAL# IS > ''User session serial number which produced the trace record'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_STATISTICS.SERVICE_NAME IS > ''Service name of the session'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_STATISTICS.FAILOVER_TYPE IS > ''FAILOVER_TYPE service setting'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_STATISTICS.FAILOVER_RESTORE > IS ''FAILOVER_RESTORE service setting'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_STATISTICS.RESET_STATE IS > ''RESET_STATE service setting'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_STATISTICS.PROGRAM IS > ''Operating system program name'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_STATISTICS.BEGIN_REQUESTS IS > ''Number of begin requests received for this session'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_STATISTICS.END_REQUESTS IS > ''Number of end requests received for this session'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN > DBA_ACCHK_STATISTICS.USER_CALLS_IN_REQUESTS IS > ''Number of user calls received from the application within requests' || > ' (between begin request and end request)'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN > DBA_ACCHK_STATISTICS.PROTECTED_CALLS_IN_REQUESTS IS > ''Number of user calls protected by Application Continuity' || > ' (between begin request and end request)'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_STATISTICS.TIME_IN_REQUESTS > IS ''Time in microseconds spent in user calls within requests' || > ' (between begin request and end request)'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN > DBA_ACCHK_STATISTICS.TIME_PROTECTED_IN_REQUESTS IS > ''Time in microseconds for user calls protected by Application' || > ' Continuity within requests (between begin request and end request)'''; > > > > > > > > EXECUTE IMMEDIATE > 'CREATE OR REPLACE VIEW DBA_ACCHK_STATISTICS_SUMMARY AS > SELECT > stats.inst_id, > stats.con_id, > stats.service_name, > stats.failover_type, > stats.failover_restore, > stats.reset_state, > SUM(CASE > WHEN stats.begin_requests = 0 then stats.end_requests > WHEN stats.begin_requests > stats.end_requests THEN > stats.begin_requests > ELSE stats.end_requests > END) > TOTAL_REQUESTS, > 100*sum(stats.protected_calls_in_requests) / > NULLIF(sum(stats.user_calls_in_requests),0) > PROTECTED_CALLS_PERCENT, > 100*sum(stats.time_protected_in_requests) / > NULLIF(sum(stats.time_in_requests),0) > PROTECTED_TIME_PERCENT, > SUM(stats.user_calls_in_requests) / > NULLIF(SUM( > CASE > WHEN stats.begin_requests = 0 THEN stats.end_requests > WHEN stats.begin_requests > stats.end_requests THEN > stats.begin_requests > ELSE stats.end_requests > END), 0) > AVG_USER_CALLS_IN_REQUESTS, > SUM(stats.protected_calls_in_requests) / > NULLIF(SUM( > CASE > WHEN stats.begin_requests = 0 THEN stats.end_requests > WHEN stats.begin_requests > stats.end_requests THEN > stats.begin_requests > ELSE stats.end_requests > END), 0) > AVG_PROTECTED_CALLS_IN_REQUESTS, > SUM(stats.time_in_requests) / > NULLIF(SUM( > CASE > WHEN stats.begin_requests = 0 THEN stats.end_requests > WHEN stats.begin_requests > stats.end_requests THEN > stats.begin_requests > ELSE stats.end_requests > END), 0) > AVG_TIME_IN_REQUESTS, > SUM(stats.time_protected_in_requests) / > NULLIF(SUM( > CASE > WHEN stats.begin_requests = 0 THEN stats.end_requests > WHEN stats.begin_requests > stats.end_requests THEN > stats.begin_requests > ELSE stats.end_requests > END) , 0) > AVG_TIME_PROTECTED_IN_REQUESTS > FROM > DBA_ACCHK_STATISTICS stats > GROUP BY > stats.inst_id, > stats.con_id, > stats.service_name, > stats.failover_type, > stats.failover_restore, > stats.reset_state > ORDER BY > stats.inst_id, > stats.con_id, > stats.service_name, > stats.failover_type, > stats.failover_restore, > stats.reset_state'; > > > > > > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_STATISTICS_SUMMARY.INST_ID IS > ''Instance number the session was using'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_STATISTICS_SUMMARY.CON_ID IS > ''Container ID the session was using'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN > DBA_ACCHK_STATISTICS_SUMMARY.SERVICE_NAME IS > ''Service name of the session'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN > DBA_ACCHK_STATISTICS_SUMMARY.FAILOVER_TYPE IS > ''FAILOVER_TYPE service setting'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN > DBA_ACCHK_STATISTICS_SUMMARY.FAILOVER_RESTORE IS > ''FAILOVER_RESTORE service setting'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN > DBA_ACCHK_STATISTICS_SUMMARY.RESET_STATE IS > ''RESET_STATE service setting'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN > DBA_ACCHK_STATISTICS_SUMMARY.TOTAL_REQUESTS IS > ''Number of requests received for this session'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN > DBA_ACCHK_STATISTICS_SUMMARY.PROTECTED_CALLS_PERCENT IS > ''Percentage of user calls within requests protected by' || > ' Application Continuity'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN > DBA_ACCHK_STATISTICS_SUMMARY.PROTECTED_TIME_PERCENT IS > ''Percentage of time spent within requests protected by' || > ' Application Continuity for failover'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN > DBA_ACCHK_STATISTICS_SUMMARY.AVG_USER_CALLS_IN_REQUESTS IS > ''Average number of user calls received from the appplication' || > ' within requests (between begin request and end request)'''; > EXECUTE IMMEDIATE 'COMMENT ON > COLUMN DBA_ACCHK_STATISTICS_SUMMARY.AVG_PROTECTED_CALLS_IN_REQUESTS IS > ''Average number of user calls protected by Application Continuity' || > ' within requests (between begin request and end request)'''; > EXECUTE IMMEDIATE 'COMMENT ON > COLUMN DBA_ACCHK_STATISTICS_SUMMARY.AVG_TIME_IN_REQUESTS IS > ''Average time in microseconds spent in user calls within requests' || > ' (between begin request and end request)'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN > DBA_ACCHK_STATISTICS_SUMMARY.AVG_TIME_PROTECTED_IN_REQUESTS IS > ''Average time in microseconds for user calls protected by Application' || > ' Continuity within requests (between begin request and end request)'''; > > > > > > > > EXECUTE IMMEDIATE > 'CREATE OR REPLACE VIEW DBA_ACCHK_EVENTS_SUMMARY AS > SELECT > events.inst_id, > events.con_id, > events.service_name, > nvl(stats.failover_type, ''MISING'') failover_type, > nvl(stats.failover_restore, ''MISSING'') failover_restore, > nvl(stats.reset_state, ''MISSING'') reset_state, > events.program, > events.module, > events.action, > events.sql_id, > events.call_name, > events.event_type, > events.error_code, > COUNT(*) frequency > FROM > DBA_ACCHK_EVENTS events > LEFT JOIN > DBA_ACCHK_STATISTICS stats > ON > events.serial# = stats.serial# > AND > events.session_id = stats.session_id > GROUP BY > events.inst_id, > events.con_id, > events.service_name, > stats.failover_type, > stats.failover_restore, > stats.reset_state, > events.program, > events.module, > events.action, > events.sql_id, > events.call_name, > events.event_type, > events.error_code > ORDER BY > events.inst_id, > events.con_id, > events.service_name, > stats.failover_type, > stats.failover_restore, > stats.reset_state, > events.program, > events.module, > events.action, > events.sql_id, > events.call_name, > events.event_type, > events.error_code'; > > > > > > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_EVENTS_SUMMARY.INST_ID IS > ''Instance number the session was using'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_EVENTS_SUMMARY.CON_ID is > ''Container ID the session was using'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_EVENTS_SUMMARY.SERVICE_NAME IS > ''Service name of the session'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_EVENTS_SUMMARY.FAILOVER_TYPE IS > ''FAILOVER_TYPE service setting'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN > DBA_ACCHK_EVENTS_SUMMARY.FAILOVER_RESTORE IS > ''FAILOVER_RESTORE service setting'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_EVENTS_SUMMARY.RESET_STATE IS > ''RESET_STATE service setting'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_EVENTS_SUMMARY.PROGRAM IS > ''Operating system program name'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_EVENTS_SUMMARY.MODULE IS > ''Name of the currently executing module'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_EVENTS_SUMMARY.ACTION IS > ''Name of the currently executing action'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_EVENTS_SUMMARY.SQL_ID IS > ''SQL identifier of the SQL statement that is currently being executed'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_EVENTS_SUMMARY.CALL_NAME IS > ''User call that is currently being executed'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_EVENTS_SUMMARY.EVENT_TYPE IS > ''Type of the event recorded'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_EVENTS_SUMMARY.ERROR_CODE IS > ''Oracle error message number'''; > EXECUTE IMMEDIATE 'COMMENT ON COLUMN DBA_ACCHK_EVENTS_SUMMARY.FREQUENCY IS > ''Number of times that event occurred during the workload run'''; > > > > > > EXECUTE IMMEDIATE 'CREATE OR REPLACE PUBLIC SYNONYM DBA_ACCHK_EVENTS FOR > SYS.DBA_ACCHK_EVENTS'; > EXECUTE IMMEDIATE 'CREATE OR REPLACE PUBLIC SYNONYM DBA_ACCHK_STATISTICS FOR > SYS.DBA_ACCHK_STATISTICS'; > EXECUTE IMMEDIATE 'CREATE OR REPLACE PUBLIC SYNONYM DBA_ACCHK_EVENTS_SUMMARY > FOR SYS.DBA_ACCHK_EVENTS_SUMMARY'; > EXECUTE IMMEDIATE 'CREATE OR REPLACE PUBLIC SYNONYM > DBA_ACCHK_STATISTICS_SUMMARY FOR SYS.DBA_ACCHK_STATISTICS_SUMMARY'; > > > > > EXECUTE IMMEDIATE 'GRANT SELECT ON DBA_ACCHK_EVENTS > TO SELECT_CATALOG_ROLE'; > EXECUTE IMMEDIATE 'GRANT SELECT ON DBA_ACCHK_STATISTICS > TO SELECT_CATALOG_ROLE'; > EXECUTE IMMEDIATE 'GRANT SELECT ON DBA_ACCHK_EVENTS_SUMMARY > TO SELECT_CATALOG_ROLE'; > EXECUTE IMMEDIATE 'GRANT SELECT ON DBA_ACCHK_STATISTICS_SUMMARY > TO SELECT_CATALOG_ROLE'; > > EXECUTE IMMEDIATE 'GRANT READ ON DBA_ACCHK_EVENTS > TO ACCHK_READ'; > EXECUTE IMMEDIATE 'GRANT READ ON DBA_ACCHK_STATISTICS > TO ACCHK_READ'; > EXECUTE IMMEDIATE 'GRANT READ ON DBA_ACCHK_EVENTS_SUMMARY > TO ACCHK_READ'; > EXECUTE IMMEDIATE 'GRANT READ ON DBA_ACCHK_STATISTICS_SUMMARY > TO ACCHK_READ'; > > > > > > EXECUTE IMMEDIATE 'GRANT ACCHK_READ TO DBA WITH ADMIN OPTION'; > > > > > > CDBVIEW.CREATE_CDBVIEW(FALSE, 'SYS', 'DBA_ACCHK_EVENTS', > 'CDB_ACCHK_EVENTS'); > CDBVIEW.CREATE_CDBVIEW(FALSE, 'SYS', 'DBA_ACCHK_STATISTICS', > 'CDB_ACCHK_STATISTICS'); > CDBVIEW.CREATE_CDBVIEW(FALSE, 'SYS', 'DBA_ACCHK_EVENTS_SUMMARY', > 'CDB_ACCHK_EVENTS_SUMMARY'); > CDBVIEW.CREATE_CDBVIEW(FALSE, 'SYS', 'DBA_ACCHK_STATISTICS_SUMMARY', > 'CDB_ACCHK_STATISTICS_SUMMARY'); > > EXECUTE IMMEDIATE 'CREATE OR REPLACE PUBLIC SYNONYM CDB_ACCHK_EVENTS FOR > SYS.CDB_ACCHK_EVENTS'; > EXECUTE IMMEDIATE 'CREATE OR REPLACE PUBLIC SYNONYM CDB_ACCHK_STATISTICS FOR > SYS.CDB_ACCHK_STATISTICS'; > EXECUTE IMMEDIATE 'CREATE OR REPLACE PUBLIC SYNONYM CDB_ACCHK_EVENTS_SUMMARY > FOR SYS.CDB_ACCHK_EVENTS_SUMMARY'; > EXECUTE IMMEDIATE 'CREATE OR REPLACE PUBLIC SYNONYM > CDB_ACCHK_STATISTICS_SUMMARY FOR SYS.CDB_ACCHK_STATISTICS_SUMMARY'; > > > > > > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_EVENTS.INST_ID IS > ''Instance number the session was using'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_EVENTS.CON_ID IS > ''Container ID the session was using'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_EVENTS.TIMESTAMP IS > ''Timestamp when the event occurred'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_EVENTS.SESSION_ID IS > ''User session ID which generated the trace record'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_EVENTS.SERIAL# IS > ''User session serial number which produced the trace record'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_EVENTS.SERVICE_NAME IS > ''Service name of the session'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_EVENTS.PROGRAM IS > ''Operating system program name'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_EVENTS.MODULE IS > ''Name of the currently executing module'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_EVENTS.ACTION IS > ''Name of the currently executing action'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_EVENTS.SQL_ID IS > ''SQL identifier of the SQL statement that is currently being executed'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_EVENTS.CALL_NAME IS > ''Identifies the User Call that is currently being executed'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_EVENTS.EVENT_TYPE IS > ''Type of the event recorded'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_EVENTS.ERROR_CODE IS > ''The oracle error message number'''; > > > > > > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_STATISTICS.INST_ID IS > ''Instance number the session was using'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_STATISTICS.CON_ID IS > ''Container ID the session was using'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_STATISTICS.TIMESTAMP IS > ''Timestamp when the event occurred'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_STATISTICS.SESSION_ID IS > ''User session ID which generated the trace record'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_STATISTICS.SERIAL# IS > ''User session serial number which produced the trace record'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_STATISTICS.SERVICE_NAME IS > ''Service name of the session'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_STATISTICS.FAILOVER_TYPE IS > ''FAILOVER_TYPE service setting'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_STATISTICS.FAILOVER_RESTORE > IS ''FAILOVER_RESTORE service setting'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_STATISTICS.RESET_STATE IS > ''RESET_STAE service setting'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_STATISTICS.PROGRAM IS > ''Operating system program name'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_STATISTICS.BEGIN_REQUESTS IS > ''Number of begin requests received for this session'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_STATISTICS.END_REQUESTS IS > ''Number of end requests received for this session'''; > EXECUTE IMMEDIATE 'comment on column > CDB_ACCHK_STATISTICS.USER_CALLS_IN_REQUESTS IS > ''Number of user calls received from the application within requests' || > ' (between begin request and end request)'''; > EXECUTE IMMEDIATE 'comment on column > CDB_ACCHK_STATISTICS.PROTECTED_CALLS_IN_REQUESTS IS > ''Number of user calls protected by Application Continuity' || > ' (between begin request and end request)'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_STATISTICS.TIME_IN_REQUESTS > IS ''Time in microseconds spent in user calls within requests' || > ' (between begin request and end request)'''; > EXECUTE IMMEDIATE 'comment on column > CDB_ACCHK_STATISTICS.TIME_PROTECTED_IN_REQUESTS IS > ''Time in microseconds for user calls protected by Application' || > ' Continuity within requests (between begin request and end request)'''; > > > > > > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_STATISTICS_SUMMARY.INST_ID IS > ''Instance number the session was using'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_STATISTICS_SUMMARY.CON_ID IS > ''Container ID the session was using'''; > EXECUTE IMMEDIATE 'comment on column > CDB_ACCHK_STATISTICS_SUMMARY.SERVICE_NAME IS > ''Service name of the session'''; > EXECUTE IMMEDIATE 'comment on column > CDB_ACCHK_STATISTICS_SUMMARY.FAILOVER_TYPE IS > ''FAILOVER_TYPE service setting'''; > EXECUTE IMMEDIATE 'comment on column > CDB_ACCHK_STATISTICS_SUMMARY.FAILOVER_RESTORE IS > ''FAILOVER_RESTORE service setting'''; > EXECUTE IMMEDIATE 'comment on column > CDB_ACCHK_STATISTICS_SUMMARY.RESET_STATE IS > ''RESET_STATE service setting'''; > EXECUTE IMMEDIATE 'comment on column > CDB_ACCHK_STATISTICS_SUMMARY.TOTAL_REQUESTS IS > ''Number of requests received for this session'''; > EXECUTE IMMEDIATE 'comment on column > CDB_ACCHK_STATISTICS_SUMMARY.PROTECTED_CALLS_PERCENT IS > ''Percentage of user calls within requests protected by' || > ' Application Continuity'''; > EXECUTE IMMEDIATE 'comment on column > CDB_ACCHK_STATISTICS_SUMMARY.PROTECTED_TIME_PERCENT IS > ''Percentage of time spent within requests protected by' || > ' Application Continuity for failover'''; > EXECUTE IMMEDIATE 'comment on column > CDB_ACCHK_STATISTICS_SUMMARY.AVG_USER_CALLS_IN_REQUESTS IS > ''Average number of user calls received from the appplication' || > ' within requests (between begin request and end request)'''; > EXECUTE IMMEDIATE 'comment on column > CDB_ACCHK_STATISTICS_SUMMARY.AVG_PROTECTED_CALLS_IN_REQUESTS IS > ''Average number of user calls protected by Application Continuity' || > ' within requests (between begin request and end request)'''; > EXECUTE IMMEDIATE 'comment on column > CDB_ACCHK_STATISTICS_SUMMARY.AVG_TIME_IN_REQUESTS IS > ''Average time in microseconds spent in user calls within requests' || > ' (between begin request and end request)'''; > EXECUTE IMMEDIATE 'comment on column > CDB_ACCHK_STATISTICS_SUMMARY.AVG_TIME_PROTECTED_IN_REQUESTS IS > ''Average time in microseconds for user calls protected by Application' || > ' Continuity within requests (between begin request and end request)'''; > > > > > > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_EVENTS_SUMMARY.INST_ID IS > ''Instance number the session was using'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_EVENTS_SUMMARY.CON_ID IS > ''Container ID the session was using'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_EVENTS_SUMMARY.SERVICE_NAME IS > ''Service name of the session'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_EVENTS_SUMMARY.FAILOVER_TYPE > IS ''FAILOVER_TYPE service setting'''; > EXECUTE IMMEDIATE 'comment on column > CDB_ACCHK_EVENTS_SUMMARY.FAILOVER_RESTORE IS > ''FAILOVER_RESTORE service setting'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_EVENTS_SUMMARY.RESET_STATE IS > ''RESET_STATE service setting'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_EVENTS_SUMMARY.PROGRAM IS > ''Operating system program name'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_EVENTS_SUMMARY.MODULE IS > ''Name of the currently executing module'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_EVENTS_SUMMARY.ACTION IS > ''Name of the currently executing action'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_EVENTS_SUMMARY.SQL_ID IS > ''SQL identifier of the SQL statement that is currently being executed'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_EVENTS_SUMMARY.CALL_NAME IS > ''User call that is currently being executed'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_EVENTS_SUMMARY.EVENT_TYPE IS > ''Type of the event recorded'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_EVENTS_SUMMARY.ERROR_CODE IS > ''Oracle error message number'''; > EXECUTE IMMEDIATE 'comment on column CDB_ACCHK_EVENTS_SUMMARY.FREQUENCY IS > ''Number of times that event occurred during the workload run'''; > > > > > > EXECUTE IMMEDIATE 'GRANT SELECT ON CDB_ACCHK_EVENTS TO > SELECT_CATALOG_ROLE'; > EXECUTE IMMEDIATE 'GRANT SELECT ON CDB_ACCHK_STATISTICS TO > SELECT_CATALOG_ROLE'; > EXECUTE IMMEDIATE 'GRANT SELECT ON CDB_ACCHK_EVENTS_SUMMARY TO > SELECT_CATALOG_ROLE'; > EXECUTE IMMEDIATE 'GRANT SELECT ON CDB_ACCHK_STATISTICS_SUMMARY TO > SELECT_CATALOG_ROLE'; > > > > > > EXECUTE IMMEDIATE 'GRANT READ ON CDB_ACCHK_EVENTS TO ACCHK_READ'; > EXECUTE IMMEDIATE 'GRANT READ ON CDB_ACCHK_STATISTICS TO ACCHK_READ'; > EXECUTE IMMEDIATE 'GRANT READ ON CDB_ACCHK_EVENTS_SUMMARY TO ACCHK_READ'; > EXECUTE IMMEDIATE 'GRANT READ ON CDB_ACCHK_STATISTICS_SUMMARY TO > ACCHK_READ'; > > > > > > EXECUTE IMMEDIATE 'GRANT EXECUTE ON dbms_app_cont_report TO DBA'; > EXECUTE IMMEDIATE 'GRANT EXECUTE ON dbms_app_cont_report TO ACCHK_READ'; > > EXECUTE IMMEDIATE 'alter session set "_ORACLE_SCRIPT" = false'; > > > EXCEPTION > WHEN ACCHK_EXCEPTION THEN > EXECUTE IMMEDIATE 'alter session set "_ORACLE_SCRIPT" = false'; > DBMS_OUTPUT.PUT_LINE(ERROR_MESSAGE); > WHEN OTHERS THEN > EXECUTE IMMEDIATE 'alter session set "_ORACLE_SCRIPT" = false'; > RAISE; > > > END ACCHK_VIEWS; > > > > > > > > > > > > > > > > > > > > > > PROCEDURE ACCHK_SET(ENABLED IN BOOLEAN, > DISABLE_TIME IN NUMBER DEFAULT 600) IS > BEGIN > IF ENABLED THEN > > IF (DISABLE_TIME < 60 OR DISABLE_TIME > 3600 OR DISABLE_TIME IS NULL) THEN > RAISE_APPLICATION_ERROR(-20000, > 'Auto disable time should be between 60 and 3600 seconds.'); > END IF; > EXECUTE IMMEDIATE 'ALTER SYSTEM SET EVENTS = > ''trace[progint_appcont_rdbms] function = "kpoxcdACCHKTraceWriter"'''; > DBMS_OUTPUT.PUT_LINE('ACCHK is enabled'); > > BEGIN > > DBMS_SCHEDULER.DROP_JOB( > JOB_NAME => 'auto_disable_acchk_tracing'); > EXCEPTION > WHEN OTHERS THEN > IF SQLCODE = -27475 THEN > NULL; > ELSE > RAISE; > END IF; > END; > > > DBMS_SCHEDULER.CREATE_JOB( > JOB_NAME => 'auto_disable_acchk_tracing', > JOB_TYPE => 'PLSQL_BLOCK', > JOB_ACTION => 'BEGIN dbms_app_cont_admin.acchk_set(FALSE); END;', > START_DATE => SYSTIMESTAMP + > ((INTERVAL '1' SECOND) * DISABLE_TIME), > REPEAT_INTERVAL => NULL, > AUTO_DROP => TRUE, > ENABLED => TRUE, > COMMENTS => 'Automatically disable ACCHK tracing job.'); > > ELSE > EXECUTE IMMEDIATE 'ALTER SYSTEM SET EVENTS = > ''trace[progint_appcont_rdbms] off'''; > DBMS_OUTPUT.PUT_LINE('ACCHK is disabled'); > > BEGIN > > DBMS_SCHEDULER.DROP_JOB( > JOB_NAME => 'auto_disable_acchk_tracing'); > EXCEPTION > WHEN OTHERS THEN > IF SQLCODE = -27475 THEN > NULL; > ELSE > RAISE; > END IF; > END; > END IF; > EXCEPTION > WHEN OTHERS THEN > RAISE; > END ACCHK_SET; >
40a41,42 > > AI_CTRL_DEFAULT CONSTANT NUMBER := 0; 51,52d52 < < AI_CTRL_DEFAULT CONSTANT NUMBER := 0; 255a256,259 > AI_PARAM_INVISIBLE_TIME CONSTANT VARCHAR2(128) := > '_AUTO_INDEX_INVISIBLE_TIME'; > AI_PARAM_MIN_EXECS_TO_VERIFY CONSTANT VARCHAR2(128) := > '_AUTO_INDEX_MIN_EXECS_TO_VERIFY'; 352c356,364 < AI_REVERIFY_TIME_MIN CONSTANT NUMBER := 1; --- > AI_REVERIFY_TIME_MIN CONSTANT NUMBER := 0; > > > AI_INVISIBLE_TIME_DEFAULT CONSTANT NUMBER := 1; > AI_INVISIBLE_TIME_MIN CONSTANT NUMBER := 0; > > > AI_MIN_EXECS_TO_VERIFY_DEFAULT CONSTANT NUMBER := 2; > AI_MIN_EXECS_TO_VERIFY_MIN CONSTANT NUMBER := 1; 855c867 < AI_SCHEMA_DEFAULT), --- > TO_CLOB(AI_SCHEMA_DEFAULT)), 858c870 < AI_DEFAULT_TABLESPACE_DEFAULT), --- > TO_CLOB(AI_DEFAULT_TABLESPACE_DEFAULT)), 873c885 < AI_MODE_DEFAULT), --- > TO_CLOB(AI_MODE_DEFAULT)), 894c906 < AI_STS_CAPTURE_TASK_DEFAULT), --- > TO_CLOB(AI_STS_CAPTURE_TASK_DEFAULT)), 900c912 < AI_DERIVE_STATS_DEFAULT), --- > TO_CLOB(AI_DERIVE_STATS_DEFAULT)), 918c930 < TO_CLOB(AI_COMPRESSION_DEFAULT)) --- > TO_CLOB(AI_COMPRESSION_DEFAULT)), 919a932,936 > PARAM_AI_TYPE(AI_PARAM_INVISIBLE_TIME, AI_PARAM_TYPE_NUM, > TO_CLOB(AI_INVISIBLE_TIME_DEFAULT)), > > PARAM_AI_TYPE(AI_PARAM_MIN_EXECS_TO_VERIFY, AI_PARAM_TYPE_NUM, > TO_CLOB(AI_MIN_EXECS_TO_VERIFY_DEFAULT)) 2239c2256,2258 < N_ARG2 NUMBER := NULL) --- > N_ARG2 NUMBER := NULL, > N_ARG3 NUMBER := NULL, > N_ARG4 NUMBER := NULL) 2252a2272,2273 > ' n_arg3: ' || N_ARG3 || > ' n_arg4: ' || N_ARG4 || 2265c2286,2288 < P_ATTR10 => AI_CTX.FIND_TAB(FINDING_CODE).FLAGS); --- > P_ATTR10 => AI_CTX.FIND_TAB(FINDING_CODE).FLAGS, > P_ATTR11 => N_ARG3, > P_ATTR12 => N_ARG4); 3394d3416 < REASON NUMBER, 3395a3418 > REASON NUMBER, 3400a3424,3427 > DUMP_TRACE('Skipping auto index creation for table ' || > DQ(OWN) || '.' || DQ(TAB) || > ' (reason ' || REASON || ', obj_id ' || OBJ_ID); > 3474,3475c3501,3507 < NVL(HT.BLKCNT, T.BLKCNT), < NVL(HT.ROWCNT, T.ROWCNT) --- > > > > > > GREATEST(NVL(HT.BLKCNT,0), NVL(T.BLKCNT, 0)), > GREATEST(NVL(HT.ROWCNT,0) + NVL(T.ROWCNT, 0), NVL(T.ROWCNT, 0)) 5941c5973,5974 < IMPROVEMENT_FACTOR NUMBER; --- > BG_IMPROVEMENT_FACTOR NUMBER; > CPU_IMPROVEMENT_FACTOR NUMBER; 5947c5980 < --- > STS_CPU NUMBER; 5952c5985 < SIMILAR_BGETS BOOLEAN; --- > SIMILAR_PERF BOOLEAN; 5974c6007,6009 < S.EXECUTIONS STS_EXECUTIONS --- > S.EXECUTIONS STS_EXECUTIONS, > S.CPU_TIME STS_CPU_TIME, > A.CPU_TIME SPA_CPU_TIME 5997c6032,6033 < '/*/*/stat[@name="bg"]') BUFFER_GETS_C --- > '/*/*/stat[@name="bg"]') BUFFER_GETS_C, > SSC.CPU_TIME 6067a6104,6106 > > > 6070a6110 > STS_CPU := CUR.STS_CPU_TIME / CUR.STS_EXECUTIONS; 6072a6113 > STS_CPU := NULL; 6076,6077c6117,6133 < IF (ABS(STS_BGETS - SPA_BGETS) < ABSDIFF_THRESHOLD) THEN < SIMILAR_BGETS := TRUE; --- > > > > > > > > > > > > > > > IF (ABS(STS_BGETS - SPA_BGETS) < ABSDIFF_THRESHOLD OR > CUR.SPA_BUFFER_GETS = 0 OR CUR.SPA_CPU_TIME = 0) THEN > SIMILAR_PERF := TRUE; 6079c6135 < SIMILAR_BGETS := FALSE; --- > SIMILAR_PERF := FALSE; 6084c6140,6147 < IMPROVEMENT_FACTOR := STS_BGETS / SPA_BGETS; --- > BG_IMPROVEMENT_FACTOR := STS_BGETS / SPA_BGETS; > ELSE > BG_IMPROVEMENT_FACTOR := 0; > END IF; > > > IF (CUR.SPA_CPU_TIME > 0 AND CUR.STS_EXECUTIONS > 0) THEN > CPU_IMPROVEMENT_FACTOR := STS_CPU / CUR.SPA_CPU_TIME; 6086c6149 < IMPROVEMENT_FACTOR := 0; --- > CPU_IMPROVEMENT_FACTOR := 0; 6116,6118c6179,6182 < ELSIF (SIMILAR_BGETS = FALSE AND < (CUR.SPA_BUFFER_GETS = 0 OR < IMPROVEMENT_FACTOR > (1 + IMPROVEMENT_THRESHOLD))) THEN --- > ELSIF (SIMILAR_PERF = FALSE AND > (BG_IMPROVEMENT_FACTOR > (1 + IMPROVEMENT_THRESHOLD)) AND > > (CPU_IMPROVEMENT_FACTOR > (1 + IMPROVEMENT_THRESHOLD))) THEN 6127a6192,6193 > ', spa_cpu_time: ' || CUR.SPA_CPU_TIME || > ', sts_spu_time: ' || CUR.STS_CPU_TIME || 6129c6195,6196 < ', improvement_factor: ' || IMPROVEMENT_FACTOR); --- > ', bg_improvement_factor: ' || BG_IMPROVEMENT_FACTOR || > ', cpu_improvement_factor: ' || CPU_IMPROVEMENT_FACTOR); 6137,6138c6204,6206 < IF (SIMILAR_BGETS = FALSE AND < (IMPROVEMENT_FACTOR < (1 - REGRESSION_THRESHOLD))) THEN --- > IF (SIMILAR_PERF = FALSE AND > (BG_IMPROVEMENT_FACTOR < (1 - REGRESSION_THRESHOLD) OR > CPU_IMPROVEMENT_FACTOR < (1 - REGRESSION_THRESHOLD))) THEN 6146c6214,6215 < DUMP_TRACE('sql_id ' || CUR.SQL_ID || ' regressed' || --- > DUMP_TRACE('sql_id ' || CUR.SQL_ID || ' regressed(' || > FINDING_NAME_ID || ')' || 6149a6219,6220 > ', spa_cpu_time: ' || CUR.SPA_CPU_TIME || > ', sts_cpu_time: ' || CUR.STS_CPU_TIME || 6151c6222,6223 < ', improvement_factor: ' || IMPROVEMENT_FACTOR); --- > ', bg_improvement_factor: ' || BG_IMPROVEMENT_FACTOR || > ', cpu_improvement_factor: ' || CPU_IMPROVEMENT_FACTOR); 6156c6228,6229 < N_ARG1 => STS_BGETS, N_ARG2 => SPA_BGETS); --- > N_ARG1 => STS_BGETS, N_ARG2 => SPA_BGETS, > N_ARG3 => STS_CPU, N_ARG4 => CUR.SPA_CPU_TIME); 6767c6840 < CURSOR AI_UNUSABLE_CUR IS --- > CURSOR AI_UNUSABLE_CUR(C_REBUILD_COUNT_LIMIT NUMBER) IS 6776a6850,6851 > AND (IO.REBUILD_COUNT IS NULL OR > IO.REBUILD_COUNT <= C_REBUILD_COUNT_LIMIT) 6784a6860,6861 > AND (IO.REBUILD_COUNT IS NULL OR > IO.REBUILD_COUNT <= C_REBUILD_COUNT_LIMIT) 6792c6869,6887 < AND I.STATUS = 'UNUSABLE'); --- > AND I.STATUS = 'UNUSABLE' > AND (IO.REBUILD_COUNT IS NULL OR > IO.REBUILD_COUNT <= C_REBUILD_COUNT_LIMIT)); > > > > CURSOR INVISIBLE_AI_CUR(C_INVISIBLE_TIME NUMBER) IS > SELECT > DISTINCT O.INDEX_OWNER, O.INDEX_NAME > FROM "_auto_index_ind_objects" O, DBA_AUTO_INDEX_IND_ACTIONS A > WHERE O.INDEX_OWNER = A.INDEX_OWNER > AND O.INDEX_NAME = A.INDEX_NAME > AND O.LAST_EXECUTION_NAME = A.EXECUTION_NAME > AND BITAND(O.FLAGS, AI_INDF_VALID) > 0 > AND BITAND(O.FLAGS, AI_INDF_VISIBLE) = 0 > AND COMMAND LIKE '%REBUILD%' > AND (A.END_TIME IS NULL OR > A.END_TIME < SYSDATE - C_INVISIBLE_TIME); > 6812c6907,6909 < FOR CUR IN AI_UNUSABLE_CUR LOOP --- > FOR CUR IN AI_UNUSABLE_CUR( > TO_NUMBER(AI_CTX.PARAMS(AI_PARAM_REBUILD_MAX_COUNT))) LOOP > 6824a6922,6942 > > > > > BEGIN > > FOR CUR IN INVISIBLE_AI_CUR( > TO_NUMBER(AI_CTX.PARAMS(AI_PARAM_INVISIBLE_TIME))) LOOP > > RET_CODE := INDEX_DDL(AI_CTX, AI_KEA_CMD_UNUSABLE_INDEX, > CUR.INDEX_OWNER, CUR.INDEX_NAME); > END LOOP; > COMMIT; > > EXCEPTION > WHEN OTHERS THEN > IF (IS_URGENT_ERROR) THEN > RAISE; > END IF; > END; > 7255c7373,7376 < CURSOR AI_VERIFY_SQL_CUR(C_REVERIFY_TIMESTAMP DATE) IS --- > > > CURSOR AI_VERIFY_SQL_CUR(C_REVERIFY_TIMESTAMP DATE, > MIN_EXEC_TO_VERIFY NUMBER) IS 7302c7423 < AND EXECUTIONS > 0 --- > AND EXECUTIONS >= MIN_EXEC_TO_VERIFY 7396c7517,7518 < FOR CUR IN AI_VERIFY_SQL_CUR(REVERIFY_TIMESTAMP) LOOP --- > FOR CUR IN AI_VERIFY_SQL_CUR(REVERIFY_TIMESTAMP, > TO_NUMBER(AI_CTX.PARAMS(AI_PARAM_MIN_EXECS_TO_VERIFY))) LOOP 8568c8690,8695 < AND EX.TASK_NAME IN (AI_VERIFY_TASK, AI_TASK_NAME) --- > AND (EX.TASK_NAME = AI_TASK_NAME OR > > > (EX.TASK_NAME = AI_VERIFY_TASK AND > BITAND(LEVEL_FLAGS, AI_REPORT_LEVEL_ALL + > AI_REPORT_LEVEL_TEST_V1) > 0)) 8982,8984c9109,9112 < IF (BITAND(P_VALUE, AI_CTRL_SPM_EVOLVE) != 0 AND < GET_AI_PARAM_VALUE_CLOB(AI_PARAM_MODE) <> AI_MODE_OFF) THEN < --- > > > > IF (BITAND(P_VALUE, AI_CTRL_SPM_EVOLVE) != 0) THEN 9032,9033c9160 < ELSIF (RUNNING_IN_QA = 0 AND < (P_VALUE <= AI_REVERIFY_TIME_MIN)) THEN --- > ELSIF (P_VALUE < AI_REVERIFY_TIME_MIN) THEN 9037a9165,9184 > WHEN PARAMETER_NAME = AI_PARAM_INVISIBLE_TIME THEN > > IF (P_VALUE IS NULL) THEN > P_VALUE := AI_INVISIBLE_TIME_DEFAULT; > > ELSIF (P_VALUE < AI_INVISIBLE_TIME_MIN) THEN > DBMS_SYS_ERROR.RAISE_SYSTEM_ERROR( ERR_INVALID_PARAM_VALUE, > P_VALUE ); > END IF; > > WHEN PARAMETER_NAME = AI_PARAM_MIN_EXECS_TO_VERIFY THEN > > IF (P_VALUE IS NULL) THEN > P_VALUE := AI_MIN_EXECS_TO_VERIFY_DEFAULT; > > ELSIF (P_VALUE < AI_MIN_EXECS_TO_VERIFY_MIN) THEN > DBMS_SYS_ERROR.RAISE_SYSTEM_ERROR( ERR_INVALID_PARAM_VALUE, > P_VALUE ); > END IF; > 9489a9637 > 9502,9503c9650,9660 < FUNCTION EXIST_SMB_PARAMETER(PARAMETER_NAME VARCHAR2) < RETURN BOOLEAN --- > > > > > > > > PROCEDURE INIT_SMB_PARAMETER( > P_NAME IN VARCHAR2, > P_VALUE IN NUMBER, > P_DATA IN CLOB) 9505c9662,9664 < EXIST_CNT NUMBER; --- > EXIST NUMBER; > UPDATED NUMBER; > SAME_VAL NUMBER; 9508,9510d9666 < SELECT COUNT(*) INTO EXIST_CNT < FROM SMB$CONFIG T < WHERE EXIST_SMB_PARAMETER.PARAMETER_NAME = T.PARAMETER_NAME; 9512,9515c9668,9686 < IF (EXIST_CNT > 0) THEN < RETURN TRUE; < ELSE < RETURN FALSE; --- > SELECT COUNT(*), > SUM(CASE WHEN C.LAST_UPDATED IS NOT NULL THEN 1 ELSE 0 END), > SUM(CASE WHEN (C.PARAMETER_VALUE IS NULL AND P_VALUE IS NULL OR > C.PARAMETER_VALUE = P_VALUE) AND > (C.PARAMETER_DATA IS NULL AND P_DATA IS NULL OR > DBMS_LOB.COMPARE(C.PARAMETER_DATA, P_DATA) = 0) > THEN 1 ELSE 0 END) > INTO EXIST, UPDATED, SAME_VAL > FROM SMB$CONFIG C > WHERE C.PARAMETER_NAME = P_NAME; > > > > > > > > IF (EXIST > 0 AND (UPDATED > 0 OR SAME_VAL > 0)) THEN > RETURN; 9518c9689,9701 < END EXIST_SMB_PARAMETER; --- > > > IF (EXIST > 0) THEN > DELETE FROM SMB$CONFIG C > WHERE C.PARAMETER_NAME = P_NAME; > END IF; > > > INSERT INTO SMB$CONFIG > (PARAMETER_NAME, PARAMETER_VALUE, PARAMETER_DATA) > VALUES (P_NAME, P_VALUE, P_DATA); > > END INIT_SMB_PARAMETER; 9521a9705,9708 > P_NAME SMB$CONFIG.PARAMETER_NAME%TYPE; > P_TYPE NUMBER; > P_CLOB CLOB; > P_NUM NUMBER; 9524,9534c9711,9727 < FOR CUR IN (SELECT * FROM TABLE(GLOB_PARAM_AI_TYPE_TAB)) LOOP < IF (EXIST_SMB_PARAMETER(CUR.PNAME) = FALSE) THEN < IF CUR.DATA_TYPE = AI_PARAM_TYPE_NUM THEN < INSERT INTO SMB$CONFIG (PARAMETER_NAME, PARAMETER_VALUE) < VALUES (CUR.PNAME, TO_NUMBER(CUR.DEFAULT_VALUE)); < ELSIF CUR.DATA_TYPE = AI_PARAM_TYPE_CHAR OR < CUR.DATA_TYPE = AI_PARAM_TYPE_XML THEN < INSERT INTO SMB$CONFIG (PARAMETER_NAME, PARAMETER_VALUE, < PARAMETER_DATA) < VALUES (CUR.PNAME, 0, CUR.DEFAULT_VALUE); < END IF; --- > > > FOR I IN 1..GLOB_PARAM_AI_TYPE_TAB.COUNT LOOP > > P_NAME := GLOB_PARAM_AI_TYPE_TAB(I).PNAME; > P_TYPE := GLOB_PARAM_AI_TYPE_TAB(I).DATA_TYPE; > > IF P_TYPE = AI_PARAM_TYPE_NUM THEN > P_NUM := TO_NUMBER(GLOB_PARAM_AI_TYPE_TAB(I).DEFAULT_VALUE); > P_CLOB := NULL; > ELSIF P_TYPE = AI_PARAM_TYPE_CHAR OR > P_TYPE = AI_PARAM_TYPE_XML THEN > P_NUM := 0; > P_CLOB := GLOB_PARAM_AI_TYPE_TAB(I).DEFAULT_VALUE; > ELSE > INT_ASSERT(FALSE, 'insert_auto_index_parameters', 'unknown type', > FALSE); 9537c9730,9734 < END LOOP; --- > > > > > INIT_SMB_PARAMETER(P_NAME, P_NUM, P_CLOB); 9539,9541c9736 < < CONFIGURE(AI_PARAM_STS_CAPTURE_TASK, AI_STS_CAPTURE_TASK_DEFAULT, < TRUE, TRUE); --- > END LOOP;
2782c2782,2783 < ,PDBID IN NUMBER DEFAULT NULL); --- > ,PDBID IN NUMBER DEFAULT NULL > ,ENCDEC_KEYID IN VARCHAR2 DEFAULT NULL); 2899a2901,2918 > ,SPARSE_RESTORE IN BINARY_INTEGER > ,ENCDEC_RESTORE IN BINARY_INTEGER > ,ENCDEC_KEYID IN VARCHAR2) IS > BEGIN > RESTORESETDATAFILE( CHECK_LOGICAL => CHECK_LOGICAL > ,CLEANUP => CLEANUP > ,SERVICE => SERVICE > ,CHUNKSIZE => 0 > ,RS_FLAGS => 0 > ,PREPLUGIN => FALSE > ,SPARSE_RESTORE => SPARSE_RESTORE > ,ENCDEC_RESTORE => ENCDEC_RESTORE > ,ENCDEC_KEYID => ENCDEC_KEYID); > END; > > PROCEDURE RESTORESETDATAFILE( CHECK_LOGICAL IN BOOLEAN > ,CLEANUP IN BOOLEAN > ,SERVICE IN VARCHAR2 2905a2925,2945 > RESTORESETDATAFILE( CHECK_LOGICAL => CHECK_LOGICAL > ,CLEANUP => CLEANUP > ,SERVICE => SERVICE > ,CHUNKSIZE => CHUNKSIZE > ,RS_FLAGS => RS_FLAGS > ,PREPLUGIN => PREPLUGIN > ,SPARSE_RESTORE => SPARSE_RESTORE > ,ENCDEC_RESTORE => ENCDEC_RESTORE > ,ENCDEC_KEYID => NULL); > END; > > PROCEDURE RESTORESETDATAFILE( CHECK_LOGICAL IN BOOLEAN > ,CLEANUP IN BOOLEAN > ,SERVICE IN VARCHAR2 > ,CHUNKSIZE IN BINARY_INTEGER > ,RS_FLAGS IN BINARY_INTEGER > ,PREPLUGIN IN BOOLEAN > ,SPARSE_RESTORE IN BINARY_INTEGER > ,ENCDEC_RESTORE IN BINARY_INTEGER > ,ENCDEC_KEYID IN VARCHAR2) IS > BEGIN 2917c2957,2958 < ,ENCDEC_RESTORE => ENCDEC_RESTORE); --- > ,ENCDEC_RESTORE => ENCDEC_RESTORE > ,ENCDEC_KEYID => ENCDEC_KEYID);
171c171,172 < NUMBER_OF_ROWS_DELETED OUT NUMBER) --- > NUMBER_OF_ROWS_DELETED OUT NUMBER, > IS_BCTABLE IN BOOLEAN) 181c182,183 < NUMBER_OF_ROWS_DELETED OCINUMBER); --- > NUMBER_OF_ROWS_DELETED OCINUMBER, > IS_BCTABLE UB1); 205c207 < NUMBER_OF_ROWS_DELETED); --- > NUMBER_OF_ROWS_DELETED, TRUE); 208c210 < NUMBER_OF_ROWS_DELETED); --- > NUMBER_OF_ROWS_DELETED, TRUE); 327a330,336 > COUNT_VAR NUMBER; > CERT_ID RAW(16); > SIGN_ALGO NUMBER; > SPARE_COL RAW(4); > SPARE_BINT BINARY_INTEGER; > SIGN_ALGO_POS BINARY_INTEGER; > CERT_ID_POS BINARY_INTEGER; 340a350,358 > SQL_STMT1 := 'select count(*) from SYS.ALL_BLOCKCHAIN_TABLES where ' || > 'SCHEMA_NAME=:schema_name and TABLE_NAME=:table_name'; > EXECUTE IMMEDIATE SQL_STMT1 INTO COUNT_VAR > USING SCHEMA_NAME_INT, TABLE_NAME_INT; > IF (COUNT_VAR <> 1) THEN > RAISE_ORA_ERROR(5720, TABLE_NAME_INT); > END IF; > > 356,357c374 < '''ORABCTAB_SIGNATURE$'',''ORABCTAB_SIGNATURE_ALG$'',' || < '''ORABCTAB_SIGNATURE_CERT$'',''ORABCTAB_SPARE$'') ' || --- > '''ORABCTAB_SIGNATURE$'') ' || 371a389,410 > IF COLUMN_NAME IN ('ORABCTAB_SIGNATURE_ALG$', 'ORABCTAB_SIGNATURE_CERT$', > 'ORABCTAB_SPARE$') THEN > SQL_STMT2 := 'select ' || COLUMN_QUOTED || ' from ' || SCHEMA_QUOTED || > '.' || TABLE_QUOTED || ' where ORABCTAB_INST_ID$=' || > ':instance_id and ORABCTAB_CHAIN_ID$=:chain_id and ' || > 'ORABCTAB_SEQ_NUM$=:sequence_id'; > IF COLUMN_NAME = 'ORABCTAB_SIGNATURE_ALG$' THEN > SIGN_ALGO_POS := COLUMN_POS; > EXECUTE IMMEDIATE SQL_STMT2 INTO SIGN_ALGO USING > INSTANCE_ID, CHAIN_ID, SEQUENCE_ID; > ELSIF COLUMN_NAME = 'ORABCTAB_SIGNATURE_CERT$' THEN > CERT_ID_POS := COLUMN_POS; > EXECUTE IMMEDIATE SQL_STMT2 INTO CERT_ID USING > INSTANCE_ID, CHAIN_ID, SEQUENCE_ID; > ELSE > EXECUTE IMMEDIATE SQL_STMT2 INTO SPARE_COL USING > INSTANCE_ID, CHAIN_ID, SEQUENCE_ID; > END IF; > > CONTINUE; > END IF; > 547a587 > 642a683,728 > IF SPARE_COL IS NOT NULL THEN > SPARE_BINT := UTL_RAW.CAST_TO_BINARY_INTEGER(SPARE_COL, > UTL_RAW.LITTLE_ENDIAN); > IF (BITAND(SPARE_BINT,1) = 1) THEN > > > COL_TYPE := UTL_RAW.SUBSTR(UTL_RAW.CAST_FROM_BINARY_INTEGER(2,2),1,2); > COL_POSITION := UTL_RAW.SUBSTR(UTL_RAW.CAST_FROM_BINARY_INTEGER( > SIGN_ALGO_POS,2),1,2); > COL_ISNULL := UTL_RAW.SUBSTR(UTL_RAW.CAST_FROM_BINARY_INTEGER(0,2),1,1); > COLUMN_LEN := UTL_RAW.LENGTH(UTL_RAW.CAST_FROM_NUMBER(SIGN_ALGO)); > COL_LEN := UTL_RAW.CAST_FROM_BINARY_INTEGER(COLUMN_LEN, 2); > PAD_LENGTH := 8 - UTL_RAW.LENGTH(COL_LEN); > FOR I IN 1 .. PAD_LENGTH LOOP > COL_LEN := UTL_RAW.CONCAT(COL_LEN, ZERO_BYTE); > END LOOP; > COL_METADATA := UTL_RAW.CONCAT(COL_VERSION, COL_POSITION, COL_TYPE, > COL_ISNULL, COL_RESERVED, COL_LEN, COL_SPARE); > TEMP_METADATA := TO_BLOB(COL_METADATA); > > DBMS_LOB.APPEND(ROW_DATA,TEMP_METADATA); > DBMS_LOB.APPEND(ROW_DATA,TO_BLOB(UTL_RAW.CAST_FROM_NUMBER(SIGN_ALGO))); > END IF; > > IF (BITAND(SPARE_BINT,2) = 2) THEN > > > COL_TYPE := UTL_RAW.SUBSTR(UTL_RAW.CAST_FROM_BINARY_INTEGER(23,2),1,2); > COL_POSITION := UTL_RAW.SUBSTR(UTL_RAW.CAST_FROM_BINARY_INTEGER( > CERT_ID_POS,2),1,2); > COL_ISNULL := UTL_RAW.SUBSTR(UTL_RAW.CAST_FROM_BINARY_INTEGER(0,2),1,1); > COLUMN_LEN := UTL_RAW.LENGTH(CERT_ID); > COL_LEN := UTL_RAW.CAST_FROM_BINARY_INTEGER(COLUMN_LEN, 2); > PAD_LENGTH := 8 - UTL_RAW.LENGTH(COL_LEN); > FOR I IN 1 .. PAD_LENGTH LOOP > COL_LEN := UTL_RAW.CONCAT(COL_LEN, ZERO_BYTE); > END LOOP; > COL_METADATA := UTL_RAW.CONCAT(COL_VERSION, COL_POSITION, COL_TYPE, > COL_ISNULL, COL_RESERVED, COL_LEN, COL_SPARE); > TEMP_METADATA := TO_BLOB(COL_METADATA); > > DBMS_LOB.APPEND(ROW_DATA, TEMP_METADATA); > DBMS_LOB.APPEND(ROW_DATA, TO_BLOB(CERT_ID)); > END IF; > END IF; > 719a806 > COUNT_VAR NUMBER; 731a819,827 > SQL_STMT := 'select count(*) from SYS.ALL_BLOCKCHAIN_TABLES where ' || > 'SCHEMA_NAME=:schema_name and TABLE_NAME=:table_name'; > EXECUTE IMMEDIATE SQL_STMT INTO COUNT_VAR > USING SCHEMA_NAME_INT, TABLE_NAME_INT; > IF (COUNT_VAR <> 1) THEN > RAISE_ORA_ERROR(5720, TABLE_NAME_INT); > END IF; > > 806,809c902,903 < IF ((SIGNATURE IS NULL) OR (CERTIFICATE_GUID IS NULL) OR < (SIGNATURE_ALGO IS NULL)) THEN < RAISE_ORA_ERROR(5757, TO_CHAR(INSTANCE_ID), TO_CHAR(CHAIN_ID), < TO_CHAR(SEQUENCE_ID)); --- > IF (SIGNATURE IS NULL) THEN > RAISE_ORA_ERROR(5773, 'NULL', 'signature'); 856a951 > COUNT_VAR NUMBER; 873a969,977 > > SQL_STMT := 'select count(*) from SYS.ALL_BLOCKCHAIN_TABLES where ' || > 'SCHEMA_NAME=:schema_name and TABLE_NAME=:table_name'; > EXECUTE IMMEDIATE SQL_STMT INTO COUNT_VAR > USING SCHEMA_NAME_INT, TABLE_NAME_INT; > IF (COUNT_VAR <> 1) THEN > RAISE_ORA_ERROR(5720, TABLE_NAME_INT); > END IF; > 1107a1212,1225 > > PROCEDURE IMPORT_DROPPED( > SCHEMA_NAME IN VARCHAR2, > TABLE_NAME IN VARCHAR2, > DROP_TIME IN TIMESTAMP WITH TIME ZONE) > IS > EXTERNAL > NAME "kbclgdrImportDropped" > LIBRARY SYS.DBMS_BLOCKCHAIN_TABLE_LIB WITH CONTEXT > PARAMETERS(CONTEXT, > SCHEMA_NAME OCISTRING, SCHEMA_NAME INDICATOR SB2, > TABLE_NAME OCISTRING, TABLE_NAME INDICATOR SB2, > DROP_TIME OCIDATETIME, DROP_TIME INDICATOR SB2) > LANGUAGE C;
842a843,847 > > DELETE FROM SYS.STREAMS$_RULES WHERE > STREAMS_NAME = CANON_CAPTURE_NAME AND > STREAMS_TYPE = DBMS_STREAMS_ADM_UTL.STREAMS_TYPE_CAPTURE; > 2066,2067c2071,2072 < SELECT SUPPLEMENTAL_LOG_DATA_MIN INTO MIN_SUP_LOG < FROM V$DATABASE; --- > SELECT MINIMAL INTO MIN_SUP_LOG > FROM DBA_SUPPLEMENTAL_LOGGING;
954a955,1088 > > > > FUNCTION GETCATALOGEP > RETURN VARCHAR2 > IS > LL_COUNT NUMBER; > CAT_LISTENER VARCHAR2(4000); > EP_START NUMBER; > EP_END NUMBER; > CAT_EP VARCHAR2(4000); > CATHOST VARCHAR2(512); > > BEGIN > > SELECT COUNT(*) INTO LL_COUNT FROM SYS.V_$PARAMETER2 > WHERE NAME='local_listener'; > SELECT UTL_INADDR.GET_HOST_NAME INTO CATHOST FROM DUAL; > > IF LL_COUNT > 0 THEN > SELECT VALUE INTO CAT_LISTENER FROM SYS.V_$PARAMETER2 > WHERE NAME='local_listener'; > EP_START := INSTR(CAT_LISTENER, 'ADDRESS', 1) - 1; > EP_END := INSTR(CAT_LISTENER, '))', EP_START) + 2; > IF EP_START = 0 OR EP_END = 0 OR EP_END-EP_START <= 0 THEN > > CAT_EP := '(ADDRESS=(PROTOCOL=tcp)(HOST=' || CATHOST || ')(PORT=1521))'; > ELSE > CAT_EP := SUBSTR(CAT_LISTENER, EP_START, EP_END-EP_START); > END IF; > ELSE > > CAT_EP := '(ADDRESS=(PROTOCOL=tcp)(HOST=' || CATHOST || ')(PORT=1521))'; > END IF; > > RETURN CAT_EP; > END GETCATALOGEP; > > > > > > PROCEDURE CHECKCATALOGSYSLINK > AS > DBL_NAME VARCHAR2(256):='GDS$CATALOG.SYSLINK'; > CLOUD_NAME GSMADMIN_INTERNAL.CLOUD.NAME%TYPE; > CURR_CLOUD_NAME GSMADMIN_INTERNAL.CLOUD.NAME%TYPE; > BEGIN > EXECUTE IMMEDIATE 'ALTER SESSION SET GLOBAL_NAMES=FALSE'; > SELECT VALUE INTO CURR_CLOUD_NAME > FROM SYS.V_$PARAMETER2 WHERE NAME='_cloud_name'; > EXECUTE IMMEDIATE 'select name from '|| > 'gsmadmin_internal.cloud@'||DBL_NAME > INTO CLOUD_NAME; > IF LOWER(CURR_CLOUD_NAME) != LOWER(CLOUD_NAME) THEN > SYS.DBMS_SYS_ERROR.RAISE_SYSTEM_ERROR( > GSMADMIN_INTERNAL.DBMS_GSM_UTILITY.ERR_DB_INCLOUD, > CURR_CLOUD_NAME); > END IF; > EXCEPTION > WHEN OTHERS THEN > GSMADMIN_INTERNAL.DBMS_GSM_COMMON.WRITETOGWMTRACING > ('checkCatalogSysLink error: '|| SQLERRM); > SYS.DBMS_SYS_ERROR.RAISE_SYSTEM_ERROR( > GSMADMIN_INTERNAL.DBMS_GSM_UTILITY.ERR_CATLINK); > END CHECKCATALOGSYSLINK; > > > > > PROCEDURE SETCATALOGSYSLINK(GSMUSRPWD IN VARCHAR2, GSM_ENDPOINT IN VARCHAR2) > AS > DBL_NAME VARCHAR2(256):='GDS$CATALOG.SYSLINK'; > LOC_DBL_NAME VARCHAR2(256) := 'GDS$CATALOG.SYSLOCLINK'; > DDL_TEXT VARCHAR2(4000); > CONN_STR VARCHAR2(4000); > EXEC_STR VARCHAR2(256); > L_COUNT NUMBER; > IN_CLOUD NUMBER; > CURR_CLOUD_NAME VARCHAR2(256); > CAT_EP VARCHAR2(4000); > BEGIN > SELECT COUNT(1) INTO L_COUNT FROM USER_DB_LINKS WHERE DB_LINK = DBL_NAME; > IF (L_COUNT > 0) THEN > RETURN; > END IF; > > GSMADMIN_INTERNAL.DBMS_GSM_COMMON.WRITETOGWMTRACING > ('setCatalogSysLink: Create SYS DB-link'); > > SELECT COUNT(*) INTO IN_CLOUD > FROM SYS.V_$PARAMETER2 WHERE NAME='_cloud_name'; > IF IN_CLOUD > 0 THEN > SELECT VALUE INTO CURR_CLOUD_NAME > FROM SYS.V_$PARAMETER2 WHERE NAME='_cloud_name'; > ELSE > CURR_CLOUD_NAME := 'oradbcloud'; > END IF; > CONN_STR :='(DESCRIPTION = '||GSM_ENDPOINT|| > '(CONNECT_DATA =(SERVICE_NAME = GDS$CATALOG.'|| > CURR_CLOUD_NAME||')))'; > DDL_TEXT := 'CREATE DATABASE LINK '|| DBL_NAME|| > ' CONNECT TO GSMCATUSER IDENTIFIED BY ' || > DBMS_ASSERT.ENQUOTE_NAME(GSMUSRPWD,FALSE) || > ' USING '||DBMS_ASSERT.ENQUOTE_LITERAL(CONN_STR); > > EXECUTE IMMEDIATE DDL_TEXT; > > > EXECUTE IMMEDIATE 'select sys.dbms_gsm_fixed.getCatalogEP > from dual@GDS$CATALOG.SYSLINK' INTO CAT_EP; > GSMADMIN_INTERNAL.DBMS_GSM_COMMON.WRITETOGWMTRACING ('setCatalogLink: Local link: ' || > CAT_EP); > > > CONN_STR :='(DESCRIPTION = '||CAT_EP|| > '(CONNECT_DATA =(SERVICE_NAME = GDS$CATALOG.'|| > CURR_CLOUD_NAME||')))'; > DDL_TEXT := 'CREATE DATABASE LINK '|| LOC_DBL_NAME|| > ' CONNECT TO GSMCATUSER IDENTIFIED BY ' || > DBMS_ASSERT.ENQUOTE_NAME(GSMUSRPWD,FALSE) || > ' USING '||DBMS_ASSERT.ENQUOTE_LITERAL(CONN_STR); > > EXECUTE IMMEDIATE DDL_TEXT; > CHECKCATALOGSYSLINK(); > > EXCEPTION > WHEN OTHERS THEN > GSMADMIN_INTERNAL.DBMS_GSM_COMMON.WRITETOGWMTRACING > ('setCatalogSysLink error: '|| SQLERRM); > RAISE; > > END SETCATALOGSYSLINK; >
954a955,1106 > > > > FUNCTION GETCATALOGEP > RETURN VARCHAR2 > IS > LL_COUNT NUMBER; > CAT_LISTENER VARCHAR2(4000); > EP_START NUMBER; > EP_END NUMBER; > CAT_EP VARCHAR2(4000); > CATHOST VARCHAR2(512); > > BEGIN > > SELECT COUNT(*) INTO LL_COUNT FROM SYS.V_$PARAMETER2 > WHERE NAME='local_listener'; > SELECT UTL_INADDR.GET_HOST_NAME INTO CATHOST FROM DUAL; > > IF LL_COUNT > 0 THEN > SELECT VALUE INTO CAT_LISTENER FROM SYS.V_$PARAMETER2 > WHERE NAME='local_listener'; > EP_START := INSTR(CAT_LISTENER, 'ADDRESS', 1) - 1; > EP_END := INSTR(CAT_LISTENER, '))', EP_START) + 2; > IF EP_START = 0 OR EP_END = 0 OR EP_END-EP_START <= 0 THEN > > CAT_EP := '(ADDRESS=(PROTOCOL=tcp)(HOST=' || CATHOST || ')(PORT=1521))'; > ELSE > CAT_EP := SUBSTR(CAT_LISTENER, EP_START, EP_END-EP_START); > END IF; > ELSE > > CAT_EP := '(ADDRESS=(PROTOCOL=tcp)(HOST=' || CATHOST || ')(PORT=1521))'; > END IF; > > RETURN CAT_EP; > END GETCATALOGEP; > > > > > > PROCEDURE CHECKCATALOGSYSLINK > AS > DBL_NAME VARCHAR2(256):='GDS$CATALOG.SYSLINK'; > CLOUD_NAME GSMADMIN_INTERNAL.CLOUD.NAME%TYPE; > CURR_CLOUD_NAME GSMADMIN_INTERNAL.CLOUD.NAME%TYPE; > BEGIN > EXECUTE IMMEDIATE 'ALTER SESSION SET GLOBAL_NAMES=FALSE'; > SELECT VALUE INTO CURR_CLOUD_NAME > FROM SYS.V_$PARAMETER2 WHERE NAME='_cloud_name'; > EXECUTE IMMEDIATE 'select name from '|| > 'gsmadmin_internal.cloud@'||DBL_NAME > INTO CLOUD_NAME; > IF LOWER(CURR_CLOUD_NAME) != LOWER(CLOUD_NAME) THEN > SYS.DBMS_SYS_ERROR.RAISE_SYSTEM_ERROR( > GSMADMIN_INTERNAL.DBMS_GSM_UTILITY.ERR_DB_INCLOUD, > CURR_CLOUD_NAME); > END IF; > EXCEPTION > WHEN OTHERS THEN > GSMADMIN_INTERNAL.DBMS_GSM_COMMON.WRITETOGWMTRACING > ('checkCatalogSysLink error: '|| SQLERRM); > SYS.DBMS_SYS_ERROR.RAISE_SYSTEM_ERROR( > GSMADMIN_INTERNAL.DBMS_GSM_UTILITY.ERR_CATLINK); > END CHECKCATALOGSYSLINK; > > > > > PROCEDURE SETCATALOGSYSLINK(GSMUSRPWD IN VARCHAR2, GSM_ENDPOINT IN VARCHAR2) > AS > DBL_NAME VARCHAR2(256):='GDS$CATALOG.SYSLINK'; > LOC_DBL_NAME VARCHAR2(256) := 'GDS$CATALOG.SYSLOCLINK'; > DDL_TEXT VARCHAR2(4000); > CONN_STR VARCHAR2(4000); > EXEC_STR VARCHAR2(256); > L_COUNT NUMBER; > IN_CLOUD NUMBER; > CURR_CLOUD_NAME VARCHAR2(256); > CAT_EP VARCHAR2(4000); > BEGIN > SELECT COUNT(1) INTO L_COUNT FROM USER_DB_LINKS WHERE DB_LINK = DBL_NAME; > IF (L_COUNT > 0) THEN > RETURN; > END IF; > > SELECT COUNT(*) INTO IN_CLOUD > FROM SYS.V_$PARAMETER2 WHERE NAME='_cloud_name'; > IF IN_CLOUD > 0 THEN > SELECT VALUE INTO CURR_CLOUD_NAME > FROM SYS.V_$PARAMETER2 WHERE NAME='_cloud_name'; > ELSE > CURR_CLOUD_NAME := 'oradbcloud'; > END IF; > CONN_STR :='(DESCRIPTION = '||GSM_ENDPOINT|| > '(CONNECT_DATA =(SERVICE_NAME = GDS$CATALOG.'|| > CURR_CLOUD_NAME||')))'; > DDL_TEXT := 'CREATE DATABASE LINK '|| DBL_NAME|| > ' CONNECT TO GSMCATUSER IDENTIFIED BY ' || > DBMS_ASSERT.ENQUOTE_NAME(GSMUSRPWD,FALSE) || > ' USING '||DBMS_ASSERT.ENQUOTE_LITERAL(CONN_STR); > > EXECUTE IMMEDIATE DDL_TEXT; > > > EXECUTE IMMEDIATE 'select sys.dbms_gsm_fixed.getCatalogEP > from dual@GDS$CATALOG.SYSLINK' INTO CAT_EP; > GSMADMIN_INTERNAL.DBMS_GSM_COMMON.WRITETOGWMTRACING ('setCatalogLink: Local link: ' || > CAT_EP); > > > CONN_STR :='(DESCRIPTION = '||CAT_EP|| > '(CONNECT_DATA =(SERVICE_NAME = GDS$CATALOG.'|| > CURR_CLOUD_NAME||')))'; > DDL_TEXT := 'CREATE DATABASE LINK '|| LOC_DBL_NAME|| > ' CONNECT TO GSMCATUSER IDENTIFIED BY ' || > DBMS_ASSERT.ENQUOTE_NAME(GSMUSRPWD,FALSE) || > ' USING '||DBMS_ASSERT.ENQUOTE_LITERAL(CONN_STR); > > EXECUTE IMMEDIATE DDL_TEXT; > CHECKCATALOGSYSLINK(); > > EXCEPTION > WHEN OTHERS THEN > GSMADMIN_INTERNAL.DBMS_GSM_COMMON.WRITETOGWMTRACING > ('setCatalogSysLink error: '|| SQLERRM); > RAISE; > > END SETCATALOGSYSLINK; > > > PROCEDURE TRIMDDL (DDL_ID IN NUMBER, > PWD_START OUT NUMBER, > TRIM_DDL OUT VARCHAR2) > IS > HAS_PWD NUMBER; > BEGIN > SELECT PWD_COUNT INTO HAS_PWD FROM SYS.DDL_REQUESTS WHERE DDL_NUM = DDL_ID; > IF HAS_PWD > 0 THEN > SELECT PWD_BEGIN INTO PWD_START FROM SYS.DDL_REQUESTS_PWD > WHERE DDL_NUM = DDL_ID AND ROWNUM = 1 ORDER BY PWD_BEGIN ASC; > ELSE > PWD_START := 4000; > END IF; > GSMADMIN_INTERNAL.DBMS_GSM_COMMON.WRITETOGWMTRACING('trimDDL: PW Start: ' || > TO_CHAR(PWD_START)); > SELECT TRIM(SUBSTRB(DBMS_LOB.SUBSTR(DDL_TEXT,4000,1), 1, PWD_START)) > INTO TRIM_DDL FROM SYS.DDL_REQUESTS WHERE DDL_NUM = DDL_ID; > > END TRIMDDL; >
181a182 > CT_NEXT_DATE TIMESTAMP WITH TIME ZONE; 195a197,203 > > > > > SELECT CAST(NEXT_DATE AS TIMESTAMP WITH TIME ZONE) AT TIME ZONE > (SELECT TO_CHAR(SYSTIMESTAMP,'tzr') FROM SYS.DUAL) > INTO CT_NEXT_DATE FROM SYS.DUAL; 201c209 < WHAT, NEXT_DATE, INTERVAL, NULL, BROKEN); --- > WHAT, CT_NEXT_DATE, INTERVAL, NULL, BROKEN);
2266,2268c2266,2267 < FROM SYS.V$DATABASE V < WHERE V.SUPPLEMENTAL_LOG_DATA_MIN = 'YES' OR < V.SUPPLEMENTAL_LOG_DATA_MIN = 'IMPLICIT'; --- > FROM DBA_SUPPLEMENTAL_LOGGING > WHERE MINIMAL = 'YES';
7c7,8 < LINK_TYPE IN NUMBER); --- > LINK_TYPE IN NUMBER, > FORCE IN BOOLEAN); 17c18,19 < EDITION_NAME IN VARCHAR2) IS --- > EDITION_NAME IN VARCHAR2, > FORCE IN BOOLEAN) IS 19c21 < KPDBFDSETSHARING(SCHEMA_NAME, OBJECT_NAME, NAMESPACE, EDITION_NAME, 1); --- > KPDBFDSETSHARING(SCHEMA_NAME, OBJECT_NAME, NAMESPACE, EDITION_NAME, 1, FORCE); 29c31,32 < EDITION_NAME IN VARCHAR2) IS --- > EDITION_NAME IN VARCHAR2, > FORCE IN BOOLEAN) IS 31c34 < KPDBFDSETSHARING(SCHEMA_NAME, OBJECT_NAME, NAMESPACE, EDITION_NAME, 2); --- > KPDBFDSETSHARING(SCHEMA_NAME, OBJECT_NAME, NAMESPACE, EDITION_NAME, 2, FORCE); 41c44,45 < EDITION_NAME IN VARCHAR2) IS --- > EDITION_NAME IN VARCHAR2, > FORCE IN BOOLEAN) IS 43c47 < KPDBFDSETSHARING(SCHEMA_NAME, OBJECT_NAME, NAMESPACE, EDITION_NAME, 3); --- > KPDBFDSETSHARING(SCHEMA_NAME, OBJECT_NAME, NAMESPACE, EDITION_NAME, 3, FORCE); 53c57,58 < EDITION_NAME IN VARCHAR2) IS --- > EDITION_NAME IN VARCHAR2, > FORCE IN BOOLEAN) IS 55c60 < KPDBFDSETSHARING(SCHEMA_NAME, OBJECT_NAME, NAMESPACE, EDITION_NAME, 0); --- > KPDBFDSETSHARING(SCHEMA_NAME, OBJECT_NAME, NAMESPACE, EDITION_NAME, 0, FORCE);
122c122 < CATALOGVERSION CONSTANT VARCHAR2(11) := '19.09.01.00'; --- > CATALOGVERSION CONSTANT VARCHAR2(11) := '19.09.02.00';
122c122 < CATALOGVERSION CONSTANT VARCHAR2(11) := '19.10.00.00'; --- > CATALOGVERSION CONSTANT VARCHAR2(11) := '19.11.00.00'; 15217,15220c15217,15250 < ELSIF (ACTION_OLD_INC_REDO = < ADDREDO(ISANCESTOR, DF_CKPSCN, DF_RLGSCN, < NULL, PARTIAL_RCV, DOINGRECOVERY)) THEN < DONE := TRUE; --- > ELSE > ADDREDO_RC := ADDREDO(ISANCESTOR, DF_CKPSCN, DF_RLGSCN, > NULL, PARTIAL_RCV, DOINGRECOVERY); > IF (ADDREDO_RC = ACTION_OLD_INC_REDO) THEN > DONE := TRUE; > > > > > > > ELSIF (ADDREDO_RC = ACTION_OLD_REDO AND DF_CKPSCN = CLEANSCN > AND CLEAN2SCN > CLEANSCN AND CLEAN2SCN < UB8MAXVAL) THEN > DEB(DEB_PRINT,'computeRecoveryActions2: fabricating clean ' || > 'range as the file is marked clean until ' || > 'controlfile checkpoint'); > > ACTION := NULL_ACTION; > ACTION.TYPE_CON := OFFLINERANGEREC_CON_T; > ACTION.TYPE_ACT := CLEANRANGE_ACT_T; > ACTION.DFNUMBER_OBJ := FNO; > ACTION.DFCREATIONSCN_OBJ := CRESCN; > ACTION.FROMSCN_ACT := CLEANSCN; > ACTION.TOSCN_ACT := CLEAN2SCN; > ACTION.TOTIME_ACT := CLEAN2TIME; > ACTION.PLUGGEDRONLY_OBJ := 0; > ACTION.PLUGINSCN_OBJ := 0; > ACTION.FOREIGNDBID_OBJ := 0; > ACTION.SECTION_SIZE_ACT := 0; > > RCVRECPUSH(ACTION); > > DONE := TRUE; > END IF; 16967c16997 < DEB(DEB_PRINT, 'doing resotre'); --- > DEB(DEB_PRINT, 'doing restore');
122c122 < CATALOGVERSION CONSTANT VARCHAR2(11) := '19.10.00.00'; --- > CATALOGVERSION CONSTANT VARCHAR2(11) := '19.10.01.00';
886a887,903 > > > > IF (ORIGINVAR = DBMS_SMB_INTERNAL.BASELINE_ORIGIN_ADDM_SQLTUNE) THEN > RETURN DBMS_SMB_INTERNAL.BASELINE_ORIGIN_ADDM_SQLTUNE#; > END IF; > > IF (ORIGINVAR = DBMS_SMB_INTERNAL.BASELINE_ORIGIN_AUTO_INDEX) THEN > RETURN DBMS_SMB_INTERNAL.BASELINE_ORIGIN_AUTO_INDEX#; > END IF; > > DBMS_SPM_INTERNAL.I_SPM_TRC(SYS.DBMS_SPM_INTERNAL.GET_SPM_TRACING_VALUE(), > 'map_origin_view_to_base: invalid origin'); > IF (DBMS_STATS_INTERNAL.QA_CONTROL <> 0) THEN > DBMS_SYS_ERROR.RAISE_SYSTEM_ERROR(-38173, ORIGINVAR, 'originVar'); > END IF; > 919a937 > OUTLINE CLOB := NULL; 922a941,957 > > > BEGIN > IF (XPL IS NOT NULL) THEN > SELECT XMLTYPE(P.OTHER_XML).EXTRACT('/*/outline_data').GETCLOBVAL() > INTO OUTLINE > FROM TABLE(XPL) P > WHERE OTHER_XML IS NOT NULL AND ROWNUM < 2; > ELSE > OUTLINE := REC.COMP_DATA; > END IF; > EXCEPTION > WHEN NO_DATA_FOUND THEN > OUTLINE := REC.COMP_DATA; > END; > > 949c984 < OTHER => REC.COMP_DATA, --- > OTHER => OUTLINE, 956c991 < --- >
442a443,448 > > DBMS_SPM_INTERNAL.I_SPM_TRC(SYS.DBMS_SPM_INTERNAL.GET_SPM_TRACING_VALUE(), > 'map_origin_base_to_view: invalid origin'); > IF (DBMS_STATS_INTERNAL.QA_CONTROL <> 0) THEN > DBMS_SYS_ERROR.RAISE_SYSTEM_ERROR(-38173, ORIGINNUM, 'originNum'); > END IF; 686a693,694 > > 695c703,704 < BASELINE_ORIGIN_AUTO_AWR, BASELINE_ORIGIN_AUTO_CC)) THEN --- > BASELINE_ORIGIN_AUTO_AWR, BASELINE_ORIGIN_AUTO_CC, > BASELINE_ORIGIN_ADDM_SQLTUNE, BASELINE_ORIGIN_AUTO_INDEX)) THEN
79a80,100 > FUNCTION GET_AS_OF_SCN > RETURN NUMBER > IS > EXTERNAL NAME "getSCN" > LANGUAGE C > LIBRARY DBMS_SODA_LIB > WITH CONTEXT > PARAMETERS (CONTEXT, > RETURN INDICATOR SB2, > RETURN); > > FUNCTION GET_AS_OF_TIMESTAMP > RETURN VARCHAR2 IS > LANGUAGE C > LIBRARY DBMS_SODA_LIB > NAME "getTimestamp" > WITH CONTEXT > PARAMETERS (CONTEXT, > RETURN INDICATOR SB2, > RETURN OCISTRING); >
218a219,298 > > > PROCEDURE LIST_USAGE_STATISTICS(P_OWNER IN VARCHAR2, > P_STATISTICS OUT VARCHAR2, > P_ACCESS_TYPE IN VARCHAR2 DEFAULT 'READ', > P_SORT IN NUMBER DEFAULT 1, > P_LIMIT IN NUMBER DEFAULT 100) > IS > V_SQLTEXT VARCHAR2(4000); > V_SORT VARCHAR2(10); > V_READ_LIST VARCHAR2(1000); > V_WRITE_LIST VARCHAR2(1000); > V_STAT_LIST VARCHAR2(1000); > BEGIN > IF P_SORT > 0 THEN > V_SORT := 'asc'; > ELSE > V_SORT := 'desc'; > END IF; > V_READ_LIST := '' > || '''logical reads'',' > || '''optimized physical reads'',' > || '''physical read requests'',' > || '''physical reads'',' > || '''physical reads direct'''; > V_WRITE_LIST := '' > || '''physical write requests'',' > || '''physical writes'',' > || '''physical writes direct'',' > || '''optimized physical writes'''; > > IF P_ACCESS_TYPE = 'READ' THEN > V_STAT_LIST := V_READ_LIST; > ELSIF P_ACCESS_TYPE = 'WRITE' THEN > V_STAT_LIST := V_WRITE_LIST; > ELSIF P_ACCESS_TYPE = 'ALL' THEN > V_STAT_LIST := V_READ_LIST || ',' || V_WRITE_LIST; > ELSE > RETURN; > END IF; > > V_SQLTEXT := '' > || 'with collections as ' > || '( ' > || ' select coll.uri_name "name", ' > || ' SUM(stat.value) "frequency", ' > || ' RANK() over ' > || ' ( ' > || ' order by SUM(stat.value) ' || V_SORT > || ' ) "rank" ' > || ' from v$segment_statistics stat, ' > || ' xdb.json$collection_metadata coll ' > || ' where coll.owner = :sch_name ' > || ' and stat.owner = coll.owner ' > || ' and stat.object_name = coll.object_name ' > || ' and stat.OBJECT_TYPE = :obj_type ' > || ' and stat.STATISTIC_NAME in ' > || ' ( ' > || V_STAT_LIST > || ' ) ' > || ' group by coll.uri_name ' > || ') ' > || 'select JSON_OBJECT ' > || ' (''collections'' value JSON_ARRAYAGG ' > || ' ( ' > || ' JSON_Object(* returning varchar2(32767)) ' > || ' ) ' > || ' ) ' > || ' from collections '; > IF P_LIMIT IS NOT NULL > THEN > V_SQLTEXT := V_SQLTEXT || > 'where "rank" <= ' || P_LIMIT; > END IF; > EXECUTE IMMEDIATE V_SQLTEXT > INTO P_STATISTICS > USING P_OWNER, > 'TABLE'; > END LIST_USAGE_STATISTICS; >
1699,1701c1699,1705 < PROCEDURE INIT_SPM_SMB_PARAMETERS( < PARAMETER_NAME IN VARCHAR2, < PARAMETER_VALUE IN NUMBER) --- > > > > PROCEDURE INIT_SMB_PARAMETER( > P_NAME IN VARCHAR2, > P_VALUE IN NUMBER, > P_DATA IN CLOB) 1703,1704c1707,1709 < EXIST_CNT NUMBER; < EMPTY_FILTER VARCHAR(25); --- > EXIST NUMBER; > UPDATED NUMBER; > SAME_VAL NUMBER; 1707,1738c1712,1722 < SELECT COUNT(*) INTO EXIST_CNT < FROM SMB$CONFIG < WHERE PARAMETER_NAME = INIT_SPM_SMB_PARAMETERS.PARAMETER_NAME; < < IF (EXIST_CNT = 0) THEN < < IF (PARAMETER_NAME IN (SPACE_BUDGET_PERCENT, PLAN_RETENTION_WEEKS, < SPM_TRACING, AUTO_SPM_EVOLVE_TASK_ITV, < AUTO_SPM_EVOLVE_TASK_MAX_RT )) THEN < < INSERT INTO SMB$CONFIG (PARAMETER_NAME, PARAMETER_VALUE) < VALUES (INIT_SPM_SMB_PARAMETERS.PARAMETER_NAME, < INIT_SPM_SMB_PARAMETERS.PARAMETER_VALUE); < < < ELSIF(PARAMETER_NAME IN (AUTOCAP_SQL_TEXT, AUTOCAP_MODULE, < AUTOCAP_ACTION, AUTOCAP_USER)) THEN < < EMPTY_FILTER := '<filters></filters>'; < INSERT INTO SMB$CONFIG < (PARAMETER_NAME, PARAMETER_VALUE, PARAMETER_DATA) < VALUES (INIT_SPM_SMB_PARAMETERS.PARAMETER_NAME, < INIT_SPM_SMB_PARAMETERS.PARAMETER_VALUE, EMPTY_FILTER); < < < ELSIF(PARAMETER_NAME = AUTO_SPM_EVOLVE_TASK) THEN < INSERT INTO SMB$CONFIG < (PARAMETER_NAME, PARAMETER_VALUE, PARAMETER_DATA) < VALUES (INIT_SPM_SMB_PARAMETERS.PARAMETER_NAME, < INIT_SPM_SMB_PARAMETERS.PARAMETER_VALUE, < AUTO_SPM_EVOLVE_TASK_DEFAULT); < END IF; --- > > SELECT COUNT(*), > SUM(CASE WHEN C.LAST_UPDATED IS NOT NULL THEN 1 ELSE 0 END), > SUM(CASE WHEN (C.PARAMETER_VALUE IS NULL AND P_VALUE IS NULL OR > C.PARAMETER_VALUE = P_VALUE) AND > (C.PARAMETER_DATA IS NULL AND P_DATA IS NULL OR > DBMS_LOB.COMPARE(C.PARAMETER_DATA, P_DATA) = 0) > THEN 1 ELSE 0 END) > INTO EXIST, UPDATED, SAME_VAL > FROM SMB$CONFIG C > WHERE C.PARAMETER_NAME = P_NAME; 1739a1724,1731 > > > > > > > IF (EXIST > 0 AND (UPDATED > 0 OR SAME_VAL > 0)) THEN > RETURN; 1742c1734,1746 < END INIT_SPM_SMB_PARAMETERS; --- > > > IF (EXIST > 0) THEN > DELETE FROM SMB$CONFIG C > WHERE C.PARAMETER_NAME = P_NAME; > END IF; > > > INSERT INTO SMB$CONFIG > (PARAMETER_NAME, PARAMETER_VALUE, PARAMETER_DATA) > VALUES (P_NAME, P_VALUE, P_DATA); > > END INIT_SMB_PARAMETER; 1761a1766 > 1763,1767c1768,1772 < INIT_SPM_SMB_PARAMETERS(SPACE_BUDGET_PERCENT, < SPACE_BUDGET_PERCENT_DEFAULT); < INIT_SPM_SMB_PARAMETERS(PLAN_RETENTION_WEEKS, < PLAN_RETENTION_WEEKS_DEFAULT); < INIT_SPM_SMB_PARAMETERS(SPM_TRACING, SPM_TRACING_DEFAULT); --- > INIT_SMB_PARAMETER(SPACE_BUDGET_PERCENT, SPACE_BUDGET_PERCENT_DEFAULT, > NULL); > INIT_SMB_PARAMETER(PLAN_RETENTION_WEEKS, PLAN_RETENTION_WEEKS_DEFAULT, > NULL); > INIT_SMB_PARAMETER(SPM_TRACING, SPM_TRACING_DEFAULT, NULL); 1770,1773c1775,1778 < INIT_SPM_SMB_PARAMETERS(AUTOCAP_SQL_TEXT, 0); < INIT_SPM_SMB_PARAMETERS(AUTOCAP_MODULE, 0); < INIT_SPM_SMB_PARAMETERS(AUTOCAP_ACTION, 0); < INIT_SPM_SMB_PARAMETERS(AUTOCAP_USER, 0); --- > INIT_SMB_PARAMETER(AUTOCAP_SQL_TEXT, 0, '<filters></filters>'); > INIT_SMB_PARAMETER(AUTOCAP_MODULE, 0, '<filters></filters>'); > INIT_SMB_PARAMETER(AUTOCAP_ACTION, 0, '<filters></filters>'); > INIT_SMB_PARAMETER(AUTOCAP_USER, 0, '<filters></filters>'); 1777,1781c1782,1786 < INIT_SPM_SMB_PARAMETERS(AUTO_SPM_EVOLVE_TASK, 0); < INIT_SPM_SMB_PARAMETERS(AUTO_SPM_EVOLVE_TASK_ITV, < AUTO_EVOLVE_TASK_ITV_DEFAULT); < INIT_SPM_SMB_PARAMETERS(AUTO_SPM_EVOLVE_TASK_MAX_RT, < AUTO_EVOLVE_TASK_MAX_RT_DEF); --- > INIT_SMB_PARAMETER(AUTO_SPM_EVOLVE_TASK, 0, AUTO_SPM_EVOLVE_TASK_DEFAULT); > INIT_SMB_PARAMETER(AUTO_SPM_EVOLVE_TASK_ITV,AUTO_EVOLVE_TASK_ITV_DEFAULT, > NULL); > INIT_SMB_PARAMETER(AUTO_SPM_EVOLVE_TASK_MAX_RT, > AUTO_EVOLVE_TASK_MAX_RT_DEF, NULL); 1783,1785d1787 < < DBMS_SPM.CONFIGURE(AUTO_SPM_EVOLVE_TASK, AUTO_SPM_EVOLVE_TASK_DEFAULT); <
465c465 < RETURN '$Header: rdbms/src/server/dict/plsicds/prvtsqlpatch.sql /main/34 2018/02/20 13:50:00 surman Exp $'; --- > RETURN '$Header: rdbms/src/server/dict/plsicds/prvtsqlpatch.sql /st_rdbms_19/1 2021/01/18 09:12:31 apfwkr Exp $';
25c25 < --- > 4518a4519,4523 > > > > > 4521c4526 < PA.VALUE || '_ora_' || PR.SPID || --- > I.INSTANCE_NAME || '_ora_' || PR.SPID || 4523c4528 < PA.VALUE || '_p%_' || SQL_DIAGNOSTIC --- > I.INSTANCE_NAME || '_p%_' || SQL_DIAGNOSTIC 4526c4531 < SYS.V_$PARAMETER PA, SYS.V_$PROCESS PR, SYS.V_$SESSION S --- > SYS.V_$INSTANCE I, SYS.V_$PROCESS PR, SYS.V_$SESSION S 4528d4532 < PA.NAME = 'db_name' AND 4533c4537 < PA.VALUE || '_ora_' || PR.SPID || --- > I.INSTANCE_NAME || '_ora_' || PR.SPID || 4535c4539 < PA.VALUE || '_p%_' || TRACE_IDENTIFIER || '%.trc' --- > I.INSTANCE_NAME || '_p%_' || TRACE_IDENTIFIER || '%.trc' 4538c4542 < SYS.V_$PARAMETER PA, SYS.V_$PROCESS PR, SYS.V_$SESSION S --- > SYS.V_$INSTANCE I, SYS.V_$PROCESS PR, SYS.V_$SESSION S 4540d4543 < PA.NAME = 'db_name' AND
1a2,8 > > > > > > TIMED_OUT EXCEPTION; > PRAGMA EXCEPTION_INIT(TIMED_OUT, -12751); 7463a7471 > 7464a7473,7476 > WHEN TIMED_OUT THEN > SYS.DBMS_SQLTUNE_INTERNAL.I_UNLOCK_SQLSET(LOCK_HANDLE); > RAISE; > 7992a8005 > 7993a8007,8010 > WHEN TIMED_OUT THEN > SYS.DBMS_SQLTUNE_INTERNAL.I_UNLOCK_SQLSET(LOCK_HANDLE); > RAISE; > 7997d8013 <
2a3,9 > > > > > TIMED_OUT EXCEPTION; > PRAGMA EXCEPTION_INIT(TIMED_OUT, -12751); > 14900a14908 > 14901a14910,14916 > WHEN TIMED_OUT THEN > IF (COMMIT_AFTER_DROP) THEN > ROLLBACK; > END IF; > I_UNLOCK_SQLSET(LOCK_HANDLE); > RAISE; > 14947c14962,14968 < EXCEPTION --- > > EXCEPTION > WHEN TIMED_OUT THEN > ROLLBACK; > I_UNLOCK_SQLSET(LOCK_HANDLE); > RAISE; > 14949,14954c14970,14975 < < ROLLBACK; < < I_UNLOCK_SQLSET(LOCK_HANDLE); < < RAISE; --- > > ROLLBACK; > > I_UNLOCK_SQLSET(LOCK_HANDLE); > > RAISE; 16851a16873 > 16852a16875,16879 > WHEN TIMED_OUT THEN > ROLLBACK; > I_UNLOCK_SQLSET(LOCK_HANDLE); > RAISE; > 16927a16955 > 16928a16957,16961 > WHEN TIMED_OUT THEN > ROLLBACK; > I_UNLOCK_SQLSET(LOCK_HANDLE); > RAISE; > 17006a17040 > 17007a17042,17049 > WHEN TIMED_OUT THEN > ROLLBACK; > > IF (NOT DBMS_SQLTUNE_UTIL1.IS_STANDBY) THEN > I_UNLOCK_SQLSET(LOCK_HANDLE); > END IF; > RAISE; > 17136a17179 > 17137a17181,17188 > WHEN TIMED_OUT THEN > ROLLBACK; > > IF (NOT DBMS_SQLTUNE_UTIL1.IS_STANDBY) THEN > I_UNLOCK_SQLSET(LOCK_HANDLE); > END IF; > RAISE; > 17617a17669 > 17618a17671,17675 > WHEN TIMED_OUT THEN > ROLLBACK; > I_UNLOCK_SQLSET(LOCK_HANDLE); > RAISE; >
2181c2181,2182 < NUM_DELETED OUT NUMBER) --- > NUM_DELETED OUT NUMBER, > CANON_SOURCE_DB IN VARCHAR2 DEFAULT NULL) 2186,2191c2187,2203 < DELETE FROM SYS.STREAMS$_RULES R < WHERE R.RULE_OWNER = NVL(CANON_RULE_OWNER, R.RULE_OWNER) < AND R.RULE_NAME = NVL(CANON_RULE_NAME, R.RULE_NAME) < AND R.STREAMS_NAME = NVL(CANON_STREAMS_NAME, R.STREAMS_NAME) < AND R.STREAMS_TYPE = NVL(REMOVE_STREAMS_RULE.STREAMS_TYPE, < R.STREAMS_TYPE); --- > > IF CANON_RULE_OWNER IS NULL AND CANON_RULE_NAME IS NULL THEN > DELETE FROM SYS.STREAMS$_RULES R > WHERE R.RULE_OWNER IS NULL > AND R.RULE_NAME IS NULL > AND R.STREAMS_NAME = NVL(CANON_STREAMS_NAME, R.STREAMS_NAME) > AND R.STREAMS_TYPE = NVL(REMOVE_STREAMS_RULE.STREAMS_TYPE, > R.STREAMS_TYPE) > AND R.SOURCE_DATABASE = NVL(CANON_SOURCE_DB, R.SOURCE_DATABASE); > ELSE > DELETE FROM SYS.STREAMS$_RULES R > WHERE R.RULE_OWNER = NVL(CANON_RULE_OWNER, R.RULE_OWNER) > AND R.RULE_NAME = NVL(CANON_RULE_NAME, R.RULE_NAME) > AND R.STREAMS_NAME = NVL(CANON_STREAMS_NAME, R.STREAMS_NAME) > AND R.STREAMS_TYPE = NVL(REMOVE_STREAMS_RULE.STREAMS_TYPE, > R.STREAMS_TYPE); > END IF; 2212c2224,2225 < CANON_STREAMS_NAME IN VARCHAR2 DEFAULT NULL) --- > CANON_STREAMS_NAME IN VARCHAR2 DEFAULT NULL, > CANON_SOURCE_DB IN VARCHAR2 DEFAULT NULL) 2217c2230 < CANON_STREAMS_NAME, DUMMY_COUNT); --- > CANON_STREAMS_NAME, DUMMY_COUNT, CANON_SOURCE_DB); 2954d2966 < 2956,2958d2967 < PROCEDURE PROCESS_DROP_USER_PRIVILEGE(CANON_DROPPED_USER IN VARCHAR2) IS < < 2961,2995c2970,2971 < USERID NUMBER; < CUR_PRIVILEGE_TYPE NUMBER; < CUR_PRIVILEGE_LEVEL NUMBER; < < BEGIN < < BEGIN < DELETE FROM SYS.GOLDENGATE$_PRIVILEGES < WHERE USERNAME = CANON_DROPPED_USER; < EXCEPTION WHEN OTHERS THEN < NULL; < END; < < < BEGIN < DELETE FROM SYS.XSTREAM$_PRIVILEGES < WHERE USERNAME = CANON_DROPPED_USER; < EXCEPTION WHEN OTHERS THEN < NULL; < END; < < < BEGIN < DELETE FROM SYS.STREAMS$_PRIVILEGED_USER < WHERE USER# = (SELECT USER# FROM USER$ U < WHERE U.NAME = CANON_DROPPED_USER); < EXCEPTION WHEN OTHERS THEN < NULL; < END; < < EXCEPTION WHEN OTHERS THEN < NULL; < END PROCESS_DROP_USER_PRIVILEGE; < < PROCEDURE PROCESS_DROP_USER_CASCADE(CANON_DROPPED_USER IN VARCHAR2) IS --- > PROCEDURE PROCESS_DROP_USER_CASCADE(CANON_DROPPED_USER IN VARCHAR2, > DUC_MODE IN NUMBER) IS 3029,3030c3005,3009 < DBMS_CAPTURE_ADM.STOP_CAPTURE(DQT||DUC_REC1.CAPTURE_NAME||DQT, < TRUE); --- > IF DUC_MODE = DUC_STOP_ONLY OR > DUC_MODE = DUC_STOP_DROP OR > DUC_MODE = DUC_ALL THEN > DBMS_CAPTURE_ADM.STOP_CAPTURE(DQT||DUC_REC1.CAPTURE_NAME||DQT,TRUE); > END IF; 3034c3013,3017 < DBMS_CAPTURE_ADM.DROP_CAPTURE(DQT||DUC_REC1.CAPTURE_NAME||DQT); --- > IF DUC_MODE = DUC_DROP_ONLY OR > DUC_MODE = DUC_STOP_DROP OR > DUC_MODE = DUC_ALL THEN > DBMS_CAPTURE_ADM.DROP_CAPTURE(DQT||DUC_REC1.CAPTURE_NAME||DQT); > END IF; 3055c3038,3042 < DBMS_APPLY_ADM.STOP_APPLY(DQT||DUC_REC2.APPLY_NAME||DQT, TRUE); --- > IF DUC_MODE = DUC_STOP_ONLY OR > DUC_MODE = DUC_STOP_DROP OR > DUC_MODE = DUC_ALL THEN > DBMS_APPLY_ADM.STOP_APPLY(DQT||DUC_REC2.APPLY_NAME||DQT, TRUE); > END IF; 3058,3063c3045,3053 < < < DBMS_APPLY_ADM.DELETE_ALL_ERRORS(DQT||DUC_REC2.APPLY_NAME||DQT); < < < DBMS_APPLY_ADM.DROP_APPLY(DQT||DUC_REC2.APPLY_NAME||DQT); --- > IF DUC_MODE = DUC_DROP_ONLY OR > DUC_MODE = DUC_STOP_DROP OR > DUC_MODE = DUC_ALL THEN > > > DBMS_APPLY_ADM.DELETE_ALL_ERRORS(DQT||DUC_REC2.APPLY_NAME||DQT); > > DBMS_APPLY_ADM.DROP_APPLY(DQT||DUC_REC2.APPLY_NAME||DQT); > END IF; 3076a3067,3073 > > IF DUC_MODE = DUC_STOP_ONLY OR > DUC_MODE = DUC_DROP_ONLY OR > DUC_MODE = DUC_STOP_DROP THEN > > RETURN; > END IF;
268c268,271 < DBMS_STREAMS_ADM_UTL.CREATE_DEFAULT_RULE(RULE_TYPE, --- > > IF (DBMS_XSTREAM_GG_ADM.IS_GOLDENGATE IS NULL OR > NOT DBMS_XSTREAM_GG_ADM.IS_GOLDENGATE) THEN > DBMS_STREAMS_ADM_UTL.CREATE_DEFAULT_RULE(RULE_TYPE, 286a290 > END IF; 626c630,655 < IF (STREAMS_TYPE = DBMS_STREAMS_ADM_UTL.STREAMS_TYPE_APPLY) THEN --- > > IF DBMS_XSTREAM_GG_ADM.IS_GOLDENGATE THEN > IF EXIST_RULESET IS NULL THEN > GEN_RULESET_NAME := DBMS_STREAMS_ADM_UTL.GENERATE_NAME(CANON_INVOKER, > 'RULESET$_', DBMS_STREAMS_ADM_UTL.TYPE_RULESET_NAME); > DBMS_RULE_ADM.CREATE_RULE_SET(RULE_SET_NAME=>GEN_RULESET_NAME, > EVALUATION_CONTEXT=>'sys.streams$_evaluation_context', > RULE_SET_COMMENT =>'streams name is '|| CANON_STREAMS_NAME); > END IF; > > IF NOT PROCESS_EXIST THEN > IF (STREAMS_TYPE = DBMS_STREAMS_ADM_UTL.STREAMS_TYPE_APPLY) THEN > DBMS_APPLY_ADM_IVK.CREATE_APPLY_IVK(CANCAT_QNAME, > DQT||CANON_GEN_STREAMS_NAME||DQT, > NEGATIVE_RULE_SET_NAME => GEN_RULESET_NAME, > APPLY_CAPTURED => APPLY_CAPTURED, > SOURCE_DATABASE => CANON_SRC_DB, > SOURCE_ROOT_NAME => CANON_SRC_ROOT); > ELSIF (STREAMS_TYPE = DBMS_STREAMS_ADM_UTL.STREAMS_TYPE_CAPTURE) THEN > DBMS_CAPTURE_ADM_IVK.CREATE_CAPTURE_IVK(CANCAT_QNAME, > DQT||CANON_GEN_STREAMS_NAME||DQT, > SOURCE_ROOT_NAME => CANON_SRC_ROOT, > NEGATIVE_RULE_SET_NAME => GEN_RULESET_NAME, > CAPTURE_CLASS => PROC_PURPOSE); > END IF; > 627a657,667 > ELSIF (EXIST_RULESET IS NULL) THEN > IF (STREAMS_TYPE = DBMS_STREAMS_ADM_UTL.STREAMS_TYPE_APPLY) THEN > DBMS_APPLY_ADM.ALTER_APPLY(DQT||CANON_GEN_STREAMS_NAME||DQT, > NEGATIVE_RULE_SET_NAME => GEN_RULESET_NAME); > ELSIF (STREAMS_TYPE = DBMS_STREAMS_ADM_UTL.STREAMS_TYPE_CAPTURE) THEN > DBMS_CAPTURE_ADM.ALTER_CAPTURE(DQT||CANON_GEN_STREAMS_NAME||DQT, > NEGATIVE_RULE_SET_NAME => GEN_RULESET_NAME); > END IF; > END IF; > > ELSIF (STREAMS_TYPE = DBMS_STREAMS_ADM_UTL.STREAMS_TYPE_APPLY) THEN 628a669 >
148,150c148,150 < SELECT SUPPLEMENTAL_LOG_DATA_MIN INTO SUPPLOG_DATA_MIN < FROM V$DATABASE; < RETURN (SUPPLOG_DATA_MIN = 'YES' OR SUPPLOG_DATA_MIN = 'IMPLICIT'); --- > SELECT MINIMAL INTO SUPPLOG_DATA_MIN > FROM DBA_SUPPLEMENTAL_LOGGING; > RETURN (SUPPLOG_DATA_MIN = 'YES');
2375a2376,2384 > BEGIN > DBMS_DATAPUMP.METADATA_FILTER(HL, 'EXCLUDE_NAME_EXPR', > 'LIKE ''WR_$\_%_BL'' ESCAPE ''\''', 'TABLE'); > EXCEPTION > WHEN OTHERS THEN > OUTPUT_STR('DBMS_DATAPUMP.METADATA_FILTER(EXCLUDE_NAME_EXPR-7)'); > RAISE; > END; > 3891a3901,3926 > > > > > PROCEDURE CLEANUP_ONE_TABLE_CO(DBID IN NUMBER, > BID IN NUMBER, > EID IN NUMBER, > TBNAME IN VARCHAR2, > SKIP_CHECK IN BOOLEAN) > IS > LANGUAGE C > NAME "kewccot_clean_one_table_co" > WITH CONTEXT > PARAMETERS(CONTEXT, > DBID OCINUMBER, > DBID INDICATOR SB4, > BID OCINUMBER, > BID INDICATOR SB4, > EID OCINUMBER, > EID INDICATOR SB4, > TBNAME OCISTRING, > TBNAME INDICATOR SB4, > SKIP_CHECK INT, > SKIP_CHECK INDICATOR SB4 > ) > LIBRARY DBMS_SWRF_LIB; 3902d3936 < BLTABLE IN BOOLEAN DEFAULT FALSE, 3958,3966c3992 < || ' FROM ' || Q_SCHNAME || '.'; < < IF (BLTABLE) THEN < < SELSTR := SELSTR || DBMS_ASSERT.ENQUOTE_NAME(L_TABNAME || BL_SUFFIX, FALSE); < ELSE < SELSTR := SELSTR || Q_TABNAME; < END IF; < --- > || ' FROM ' || Q_SCHNAME || '.' || Q_TABNAME; 3998,4003c4024 < IF (BLTABLE) THEN < OUTPUT_STR('Append Data for ' || FULL_TABNAME || BL_SUFFIX || '.', < FP); < ELSE < OUTPUT_STR('Append Data for ' || FULL_TABNAME || '.', FP); < END IF; --- > OUTPUT_STR('Append Data for ' || FULL_TABNAME || '.', FP); 4028c4049 < --- > 4039,4041d4059 < < L_CONSTR := IN_CONSTR; < S_CONSTR := REPLACE(IN_CONSTR, '"DBID"', TO_CHAR(D_DBID)); 4043a4062,4064 > IF (DEBUG_ON OR TIMING_ON) THEN > DUMP_TIMING(SQLSTR, FP); > END IF; 4044a4066 > 4047,4067d4068 < IF L_CONSTR IS NULL THEN < AWR_GET_CONSTR_COLUMNS(L_TABNAME, AWR_USER, TO_CHAR(D_DBID), < S_CONSTR, L_CONSTR, M_CONSTR, FP); < END IF; < < IF (L_CONSTR IS NOT NULL) THEN < FULL_TABNAME := AWR_USER || < '.' || DBMS_ASSERT.ENQUOTE_NAME(L_TABNAME, FALSE); < < < SQLSTR := SQLSTR || < ' AND (' || S_CONSTR || ') NOT IN ' || < '(SELECT ' || L_CONSTR || < ' FROM ' || FULL_TABNAME || ' SUB ' || < ' WHERE SUB.DBID = :d_dbid)'; < ELSE < < RAISE_APPLICATION_ERROR(-20223, < 'No unique constraint on table ' || < FULL_TABNAME); < END IF; 4069,4072c4070 < < IF (DEBUG_ON OR TIMING_ON) THEN < DUMP_TIMING(SQLSTR, FP); < END IF; --- > CLEANUP_ONE_TABLE_CO(D_DBID, B_SNAP_ID, E_SNAP_ID, L_TABNAME, TRUE); 4074c4072 < EXECUTE IMMEDIATE SQLSTR USING S_DBID, D_DBID; --- > EXECUTE IMMEDIATE SQLSTR USING S_DBID; 5007,5019d5004 < < < IF (CHECK_FLAG(HIST.TABLE_FLAG, KEWRTF_PARTN_BYSID) OR < CHECK_FLAG(HIST.TABLE_FLAG, KEWRTF_PARTN_BYTIME)) THEN < < < APPEND_DATA(Q_SCHNAME, L_SCHNAME, HIST.TABLE_NAME, < '"DBID", "SNAP_ID"', BLTABLE => TRUE); < < < COMMIT; < < END IF;
19021a19022,19037 > > > > > > > > > > > > > > > > 19279a19296,19307 > > > > > > > > > > > > 19281c19309,19326 < 'select nvl(min(snap_id),0) as snap_id, --- > 'WITH snaps AS ( > SELECT instance_number, snap_id, > CASE WHEN end_interval_time_tz IS NOT NULL > THEN CAST(end_interval_time_tz AS TIMESTAMP(3)) > ELSE end_interval_time END as end_interval_time, > CASE WHEN end_interval_time_tz IS NOT NULL > THEN ( > CAST((begin_interval_time_tz at time zone ''UTC'') AS TIMESTAMP(3)) + > (CAST(end_interval_time_tz as TIMESTAMP(3)) - CAST(( > end_interval_time_tz at time zone ''UTC'') AS TIMESTAMP(3))) > ) > ELSE begin_interval_time END as begin_interval_time > FROM ' || DBMS_UMF_PROTECTED.KEUQQPAT_AWR_VN_DFLT_PAT || 'snapshot > WHERE dbid = :dbid > AND ( :inst_num_list IS NULL OR > instance_number MEMBER OF :inst_num_list) > ) > select nvl(min(snap_id),0) as snap_id, 19292,19296c19337,19338 < from ' || DBMS_UMF_PROTECTED.KEUQQPAT_AWR_VN_DFLT_PAT < || 'ash_snapshot < where dbid = :dbid < and ( :inst_num_list is null < or instance_number member of :inst_num_list)) --- > from snaps > ) 19340a19383,19385 > > > 19342c19387,19404 < 'select nvl(max(snap_id),0) as snap_id, --- > 'WITH snaps AS ( > SELECT instance_number, snap_id, > CASE WHEN end_interval_time_tz IS NOT NULL > THEN CAST(end_interval_time_tz AS TIMESTAMP(3)) > ELSE end_interval_time END as end_interval_time, > CASE WHEN end_interval_time_tz IS NOT NULL > THEN ( > CAST((begin_interval_time_tz at time zone ''UTC'') AS TIMESTAMP(3)) + > (CAST(end_interval_time_tz as TIMESTAMP(3)) - CAST(( > end_interval_time_tz at time zone ''UTC'') AS TIMESTAMP(3))) > ) > ELSE begin_interval_time END as begin_interval_time > FROM ' || DBMS_UMF_PROTECTED.KEUQQPAT_AWR_VN_DFLT_PAT || 'snapshot > WHERE dbid = :dbid > AND ( :inst_num_list IS NULL OR > instance_number MEMBER OF :inst_num_list) > ) > select nvl(max(snap_id),0) as snap_id, 19352,19357c19414,19416 < as lag_end_time < from ' || DBMS_UMF_PROTECTED.KEUQQPAT_AWR_VN_DFLT_PAT < || 'ash_snapshot < where dbid = :dbid < and ( :inst_num_list is null or < instance_number member of :inst_num_list)) --- > as lag_end_time > from snaps > ) 19433,19434c19492,19496 < 'select nvl(max(snap_id),NULL), nvl(max(end_interval_time),NULL) < from ' || DBMS_UMF_PROTECTED.KEUQQPAT_AWR_VN_DFLT_PAT || 'ash_snapshot --- > 'select nvl(max(snap_id),NULL), nvl(max( > CASE WHEN end_interval_time_tz IS NULL THEN end_interval_time > ELSE CAST(end_interval_time_tz AS TIMESTAMP(3)) END > ),NULL) > from ' || DBMS_UMF_PROTECTED.KEUQQPAT_AWR_VN_DFLT_PAT || 'snapshot 19669a19732 > 19671c19734,19751 < 'select round(nvl(sum((nvl(lead_begin_intr_time,end_interval_time) --- > 'WITH snaps AS ( > SELECT instance_number, snap_id, > CASE WHEN end_interval_time_tz IS NOT NULL > THEN CAST(end_interval_time_tz AS TIMESTAMP(3)) > ELSE end_interval_time END as end_interval_time, > CASE WHEN end_interval_time_tz IS NOT NULL > THEN ( > CAST((begin_interval_time_tz at time zone ''UTC'') AS TIMESTAMP(3)) + > (CAST(end_interval_time_tz as TIMESTAMP(3)) - CAST(( > end_interval_time_tz at time zone ''UTC'') AS TIMESTAMP(3))) > ) > ELSE begin_interval_time END as begin_interval_time > FROM ' || DBMS_UMF_PROTECTED.KEUQQPAT_AWR_VN_DFLT_PAT || 'snapshot > WHERE dbid = :dbid > AND instance_number MEMBER OF :inst_num_list > AND snap_id between :bid and :eid > ) > select round(nvl(sum((nvl(lead_begin_intr_time,end_interval_time) 19689,19693c19769,19770 < from ' || DBMS_UMF_PROTECTED.KEUQQPAT_AWR_VN_DFLT_PAT < || 'ash_snapshot < where dbid = :dbid < and instance_number MEMBER OF :inst_num_list < and snap_id between :bid and :eid) --- > from snaps > ) 24634c24711 < FAIL_IF_UNSUPPORTED(REPORT_ID_DIFF_GLOBAL, FALSE, --- > FAIL_IF_UNSUPPORTED(REPORT_ID_DIFF_GLOBAL, TRUE,
5c5 < CERT_GUID OUT RAW) --- > CERT_ID OUT RAW) 12c12 < CERT_GUID OCIRAW, CERT_GUID INDICATOR SB2) --- > CERT_ID OCIRAW, CERT_ID INDICATOR SB2) 16c16 < CERT_GUID IN RAW) --- > CERT_ID IN RAW) 22c22 < CERT_GUID OCIRAW, CERT_GUID INDICATOR SB2) --- > CERT_ID OCIRAW, CERT_ID INDICATOR SB2)
63a64,69 > > IF (NOT DBMS_CAPTURE_ADM_INTERNAL.IS_NEW_INSTANCE_ALLOWED AND > DBMS_XSTREAM_GG_ADM.IS_GOLDENGATE) THEN > DBMS_LOGREP_UTIL.RAISE_SYSTEM_ERROR(-23604); > END IF; >
883a884,893 > > IF (DBMS_XSTREAM_GG_ADM.IS_GOLDENGATE AND > (TAB_CNT = 0 AND SCH_CNT = 0)) THEN > > DBMS_STREAMS_ADM_UTL.REMOVE_STREAMS_RULE(NULL, NULL, NULL, > CANON_CAPTURE, SOURCE_DB); > DBMS_STREAMS_ADM_UTL.REMOVE_STREAMS_RULE(NULL, NULL, NULL, > CANON_SVR_NAME, SOURCE_DB); > END IF; > 1137a1148 > PURPOSE DBA_CAPTURE.PURPOSE%TYPE; 1288a1300,1315 > > > JUNK_NUM := SYS.DBMS_LOGREP_UTIL.QUERY_DBA_CAPTURE2( > IN_CAPTURE_NAME => CANON_CAPTURE, > OUT_SOURCE_DATABASE => JUNK_CHAR, > OUT_ROOT_DATABASE => JUNK_CHAR, > OUT_RULE_SET_NAME => JUNK_CHAR, > OUT_RULE_SET_OWNER => JUNK_CHAR, > OUT_NEGATIVE_RULE_SET_NAME => JUNK_CHAR, > OUT_NEGATIVE_RULE_SET_OWNER => JUNK_CHAR, > OUT_CAPTURE_TYPE => JUNK_CHAR, > OUT_PURPOSE => PURPOSE); > > IF (PURPOSE = 'GoldenGate Capture') THEN > DBMS_XSTREAM_GG_ADM.IS_GOLDENGATE := TRUE; > END IF;
1888a1889,1892 > > > INDEX_NAME_ALPHANUM VARCHAR2(255); > 2150a2155,2163 > > > > > > > > INDEX_NAME_ALPHANUM := REGEXP_REPLACE(SAFE_INDEXNAME, '[^A-Za-z0-9]'); > TEMP_INDEX := COMP_TMP_OBJ_PREFIX || SUBSTR(INDEX_NAME_ALPHANUM, 1, 26); 2152d2164 < TEMP_INDEX := COMP_TMP_OBJ_PREFIX || TEMP_INDEX;
4118,4120c4118,4119 < 'select count(*), NULL, NULL ' || < 'from x$kpoxft where KPOXFTCLFLIST ' || < 'like ''%Application Continuity%'')'; --- > 'select p, null, null from (select count(*) p from x$kpoxft ' > || ' where KPOXFTCLFLIST like ''%Application Continuity%'')';
14a15,23 > INT_DDL VARCHAR2(10); > INT_DDL2 VARCHAR2(10); > HAS_PWD NUMBER; > PWSTART NUMBER; > CAT_CHECK VARCHAR2(4000); > LOC_CHECK VARCHAR2(4000); > CAT_LEN NUMBER; > LOC_LEN NUMBER; > USE_LINK VARCHAR2(50) := 'SYSLINK'; 15a25,64 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
273,275c273,275 < SELECT (CASE WHEN SUPPLEMENTAL_LOG_DATA_MIN != 'NO' THEN 1 ELSE 0 END), < (CASE WHEN SUPPLEMENTAL_LOG_DATA_PK = 'YES' THEN 1 ELSE 0 END), < (CASE WHEN SUPPLEMENTAL_LOG_DATA_ALL = 'YES' THEN 1 ELSE 0 END) --- > SELECT (CASE WHEN MINIMAL != 'NO' THEN 1 ELSE 0 END), > (CASE WHEN PRIMARY_KEY = 'YES' THEN 1 ELSE 0 END), > (CASE WHEN ALL_COLUMN = 'YES' THEN 1 ELSE 0 END) 277c277 < FROM V$DATABASE; --- > FROM DBA_SUPPLEMENTAL_LOGGING;
16,19c16,20 < MEMBER FUNCTION stringify return VARCHAR2, < MEMBER FUNCTION to_String return VARCHAR2, < MEMBER FUNCTION to_Clob(c CLOB) return CLOB, < MEMBER FUNCTION to_Blob(b BLOB) return BLOB, --- > MEMBER FUNCTION stringify return VARCHAR2, > MEMBER FUNCTION to_String return VARCHAR2, > MEMBER FUNCTION to_Clob(c CLOB) return CLOB, > MEMBER FUNCTION to_Blob(b BLOB) return BLOB, > MEMBER FUNCTION to_Blob(b BLOB, format VARCHAR2) return BLOB,
14a15,16 > MEMBER FUNCTION to_Blob(self IN JSON_ELEMENT_T, > format IN VARCHAR2) RETURN BLOB, 16a19,21 > MEMBER PROCEDURE to_Blob(self IN OUT NOCOPY JSON_ELEMENT_T, > b IN OUT NOCOPY BLOB, > format IN VARCHAR2),
1c1,2 < TYPE JSON_Object_T AUTHID CURRENT_USER UNDER JSON_Element_T( --- > TYPE JSON_Object_T FORCE AUTHID CURRENT_USER > UNDER JSON_Element_T(
1c1,2 < TYPE JSON_Scalar_T AUTHID CURRENT_USER UNDER JSON_Element_T( --- > TYPE JSON_Scalar_T FORCE AUTHID CURRENT_USER > UNDER JSON_Element_T(
40c40,41 < MEMBER FUNCTION insert_One_And_Get (document SODA_Document_T) --- > MEMBER FUNCTION insert_One_And_Get (document SODA_Document_T, > hint VARCHAR2 DEFAULT NULL) 57c58,59 < MEMBER FUNCTION save_And_Get (document SODA_Document_T) --- > MEMBER FUNCTION save_And_Get (document SODA_Document_T, > hint VARCHAR2 DEFAULT NULL)
7a8,16 > MEMBER FUNCTION acquire_Lock > RETURN SODA_Operation_T, > > MEMBER FUNCTION as_Of_SCN (scn NUMBER) > RETURN SODA_Operation_T, > > MEMBER FUNCTION as_Of_Timestamp (tstamp VARCHAR2) > RETURN SODA_Operation_T, > 19a29,32 > MEMBER FUNCTION get_Data_Guide (format PLS_INTEGER DEFAULT 1, > flag PLS_INTEGER DEFAULT 0) > RETURN CLOB, > 41c54,57 < MEMBER FUNCTION version (version VARCHAR2) --- > MEMBER FUNCTION version (version VARCHAR2) > RETURN SODA_Operation_T, > > MEMBER FUNCTION hint (hint VARCHAR2)
66a67,72 > MEMBER FUNCTION to_Blob(b BLOB, format VARCHAR2) return BLOB IS EXTERNAL > name "toBlobWFormat" library DBMS_JDOM_LIB WITH CONTEXT > parameters(context, self, self INDICATOR sb2, > b OCILobLocator, b INDICATOR sb2, format, > RETURN DURATION OCIDuration, RETURN INDICATOR sb4, return); >
93a94,99 > MEMBER FUNCTION to_Blob(self IN JSON_ELEMENT_T, > format IN VARCHAR2) RETURN BLOB AS > BEGIN > RETURN dom.to_Blob(null, format); > END; > 97a104,110 > END; > > MEMBER PROCEDURE to_Blob(self IN OUT NOCOPY JSON_ELEMENT_T, > b IN OUT NOCOPY BLOB, > format IN VARCHAR2) AS > BEGIN > b := dom.to_Blob(b, format);
39c39 < EXTERNAL LANGUAGE C --- > EXTERNAL 145c145,146 < MEMBER FUNCTION INSERT_ONE_AND_GET (DOCUMENT SODA_DOCUMENT_T) --- > MEMBER FUNCTION INSERT_ONE_AND_GET (DOCUMENT SODA_DOCUMENT_T, > HINT VARCHAR2 DEFAULT NULL) 147c148 < LANGUAGE C --- > EXTERNAL 155a157,158 > HINT OCISTRING, > HINT INDICATOR SB2, 223c226,227 < MEMBER FUNCTION SAVE_AND_GET (DOCUMENT SODA_DOCUMENT_T) --- > MEMBER FUNCTION SAVE_AND_GET (DOCUMENT SODA_DOCUMENT_T, > HINT VARCHAR2 DEFAULT NULL) 225,226c229 < EXTERNAL NAME "saveAndGet" < LANGUAGE C --- > EXTERNAL 227a231 > NAME "saveAndGet" 233a238,239 > HINT OCISTRING, > HINT INDICATOR SB2,
4a5,47 > MEMBER FUNCTION ACQUIRE_LOCK > RETURN SODA_OPERATION_T IS > EXTERNAL NAME "lock" > LANGUAGE C > LIBRARY DBMS_SODAOPR_LIB > WITH CONTEXT > PARAMETERS (CONTEXT, > SELF, > SELF INDICATOR SB2, > RETURN DURATION OCIDURATION, > RETURN INDICATOR SB2, > RETURN); > > MEMBER FUNCTION AS_OF_SCN (SCN NUMBER) > RETURN SODA_OPERATION_T IS > EXTERNAL NAME "asOfScn" > LANGUAGE C > LIBRARY DBMS_SODAOPR_LIB > WITH CONTEXT > PARAMETERS (CONTEXT, > SELF, > SELF INDICATOR SB2, > SCN OCINUMBER, > SCN INDICATOR SB2, > RETURN DURATION OCIDURATION, > RETURN INDICATOR SB2, > RETURN); > > MEMBER FUNCTION AS_OF_TIMESTAMP (TSTAMP VARCHAR2) > RETURN SODA_OPERATION_T IS > EXTERNAL NAME "asOfTimestamp" > LANGUAGE C > LIBRARY DBMS_SODAOPR_LIB > WITH CONTEXT > PARAMETERS (CONTEXT, > SELF, > SELF INDICATOR SB2, > TSTAMP OCISTRING, > TSTAMP INDICATOR SB2, > RETURN DURATION OCIDURATION, > RETURN INDICATOR SB2, > RETURN); > 44a88,105 > MEMBER FUNCTION GET_DATA_GUIDE(FORMAT PLS_INTEGER DEFAULT 1, > FLAG PLS_INTEGER DEFAULT 0) > RETURN CLOB IS > EXTERNAL > LIBRARY DBMS_SODAOPR_LIB > NAME "oprGetDataGuide" > WITH CONTEXT > PARAMETERS (CONTEXT, > SELF, > SELF INDICATOR SB2, > FORMAT UB4, > FORMAT INDICATOR SB2, > FLAG UB4, > FLAG INDICATOR SB2, > RETURN DURATION OCIDURATION, > RETURN INDICATOR SB2, > RETURN); > 172a234,249 > > MEMBER FUNCTION HINT (HINT VARCHAR2) > RETURN SODA_OPERATION_T IS > EXTERNAL NAME "hint" > LANGUAGE C > LIBRARY DBMS_SODAOPR_LIB > WITH CONTEXT > PARAMETERS (CONTEXT, > SELF, > SELF INDICATOR SB2, > HINT OCISTRING, > HINT INDICATOR SB2, > RETURN DURATION OCIDURATION, > RETURN INDICATOR SB2, > RETURN); >
12c12 < o.owner# = u.user# and --- > o.owner# = u.user# and bitand(t.spare7,power(2,7)) = power(2,7) and
1c1 < select s."OWNER",s."NAME",s."TABLE_NAME",s."MASTER_VIEW",s."MASTER_OWNER",s."MASTER",s."MASTER_LINK",s."CAN_USE_LOG",s."UPDATABLE",s."REFRESH_METHOD",s."LAST_REFRESH",s."ERROR",s."FR_OPERATIONS",s."CR_OPERATIONS",s."TYPE",s."NEXT",s."START_WITH",s."REFRESH_GROUP",s."UPDATE_TRIG",s."UPDATE_LOG",s."QUERY",s."MASTER_ROLLBACK_SEG",s."STATUS",s."REFRESH_MODE",s."PREBUILT" from dba_snapshots s, sys.obj$ o, sys.user$ u --- > select s."OWNER",s."NAME",s."TABLE_NAME",s."MASTER_VIEW",s."MASTER_OWNER",s."MASTER",s."MASTER_LINK",s."CAN_USE_LOG",s."UPDATABLE",s."REFRESH_METHOD",s."LAST_REFRESH",s."ERROR",s."FR_OPERATIONS",s."CR_OPERATIONS",s."TYPE",s."NEXT",s."START_WITH",s."REFRESH_GROUP",s."UPDATE_TRIG",s."UPDATE_LOG",s."QUERY",s."MASTER_ROLLBACK_SEG",s."STATUS",s."REFRESH_MODE",s."PREBUILT",s."SNAPID" from dba_snapshots s, sys.obj$ o, sys.user$ u
6c6 < 'NO', 'NO', NULL), AUDIT_ONLY_TOPLEVEL --- > 'NO', 'NO', NULL), AUDIT_ONLY_TOPLEVEL, ORACLE_SUPPLIED
1c1 < SELECT k."EXECUTION_NAME",k."SQL_ID",k."ORIGINAL_PLAN_HASH_VALUE",k."AUTO_INDEX_PLAN_HASH_VALUE",k."ORIGINAL_BUFFER_GETS",k."AUTO_INDEX_BUFFER_GETS",k."STATUS",k."CON_ID", k.CON$NAME, k.CDB$NAME, k.CON$ERRNUM, k.CON$ERRMSG FROM CONTAINERS("SYS"."DBA_AUTO_INDEX_VERIFICATIONS") k --- > SELECT k."EXECUTION_NAME",k."SQL_ID",k."ORIGINAL_PLAN_HASH_VALUE",k."AUTO_INDEX_PLAN_HASH_VALUE",k."ORIGINAL_BUFFER_GETS",k."AUTO_INDEX_BUFFER_GETS",k."ORIGINAL_CPU_TIME",k."AUTO_INDEX_CPU_TIME",k."STATUS",k."CON_ID", k.CON$NAME, k.CDB$NAME, k.CON$ERRNUM, k.CON$ERRMSG FROM CONTAINERS("SYS"."DBA_AUTO_INDEX_VERIFICATIONS") k
1c1 < SELECT k."CERTIFICATE_GUID",k."USER_NAME",k."DISTINGUISHED_NAME",k."CERTIFICATE",k."CON_ID", k.CON$NAME, k.CDB$NAME, k.CON$ERRNUM, k.CON$ERRMSG FROM CONTAINERS("SYS"."DBA_CERTIFICATES") k --- > SELECT k."CERTIFICATE_ID",k."USER_NAME",k."DISTINGUISHED_NAME",k."CERTIFICATE",k."CON_ID", k.CON$NAME, k.CDB$NAME, k.CON$ERRNUM, k.CON$ERRMSG FROM CONTAINERS("SYS"."DBA_CERTIFICATES") k
1c1 < SELECT k."OWNER",k."NAME",k."TABLE_NAME",k."MASTER_VIEW",k."MASTER_OWNER",k."MASTER",k."MASTER_LINK",k."CAN_USE_LOG",k."UPDATABLE",k."REFRESH_METHOD",k."LAST_REFRESH",k."ERROR",k."FR_OPERATIONS",k."CR_OPERATIONS",k."TYPE",k."NEXT",k."START_WITH",k."REFRESH_GROUP",k."UPDATE_TRIG",k."UPDATE_LOG",k."MASTER_ROLLBACK_SEG",k."STATUS",k."REFRESH_MODE",k."PREBUILT",k."CON_ID", k.CON$NAME, k.CDB$NAME, k.CON$ERRNUM, k.CON$ERRMSG FROM CONTAINERS("SYS"."DBA_SNAPSHOTS") k --- > SELECT k."OWNER",k."NAME",k."TABLE_NAME",k."MASTER_VIEW",k."MASTER_OWNER",k."MASTER",k."MASTER_LINK",k."CAN_USE_LOG",k."UPDATABLE",k."REFRESH_METHOD",k."LAST_REFRESH",k."ERROR",k."FR_OPERATIONS",k."CR_OPERATIONS",k."TYPE",k."NEXT",k."START_WITH",k."REFRESH_GROUP",k."UPDATE_TRIG",k."UPDATE_LOG",k."MASTER_ROLLBACK_SEG",k."STATUS",k."REFRESH_MODE",k."PREBUILT",k."SNAPID",k."CON_ID", k.CON$NAME, k.CDB$NAME, k.CON$ERRNUM, k.CON$ERRMSG FROM CONTAINERS("SYS"."DBA_SNAPSHOTS") k
5a6,7 > ai.n_arg3 original_cpu_time, > ai.n_arg4 auto_index_cpu_time, 16c18 < l.finding_code --- > l.n_arg3, l.n_arg4, l.finding_code
12c12 < o.obj# = t.obj# --- > o.obj# = t.obj# and bitand(t.spare7,power(2,7)) = power(2,7)
5c5,6 < r1.rule_owner, r1.rule_name, r1.rule_type, r1.rule_condition, --- > r1.rule_owner, r1.rule_name, r1.rule_type, > cast(null as varchar2(1)) rule_condition, 20a22,44 > union > select streams_name component_name, > decode(streams_type, 1, 'CAPTURE', > 3, 'APPLY') component_type, > decode(object_type, 1, 'TABLE', > 2, 'SCHEMA', > 3, 'GLOBAL', > 4, 'PROCEDURE') component_rule_type, > null rule_set_owner, null rule_set_name, null rule_set_type, > rule_owner, rule_name, > decode(rule_type, 1, 'DML', > 2, 'DDL', > 3, 'PROCEDURE') rule_type, > null rule_condition, schema_name, object_name, > decode(include_tagged_lcr, 0, 'NO', > 1, 'YES') include_tagged_lcr, > null subsetting_operation, dml_condition, source_database, > null original_rule_condition, null same_rule_condition, > r1.source_root_name, source_container_name > from sys.streams$_rules r1, repl$_dbname_mapping dm > where rule_owner is null and > r1.source_root_name = dm.source_root_name(+) and > r1.source_database = dm.source_database_name(+)
4c4 < j.last_start_date LAST_DATE, --- > CAST(j.last_start_date AS DATE) LAST_DATE, 6c6,8 < DECODE(BITAND(j.job_status,2), 2, j.last_start_date, NULL) THIS_DATE, --- > CAST( > DECODE(BITAND(j.job_status,2), 2, j.last_start_date, NULL) > AS DATE) THIS_DATE, 9c11 < j.next_run_date NEXT_DATE, --- > CAST(j.next_run_date AS DATE) NEXT_DATE,
3c3 < j.last_start_date LAST_DATE, --- > CAST(j.last_start_date AS DATE) LAST_DATE, 5c5,7 < DECODE(BITAND(j.job_status,2), 2, j.last_start_date, NULL) THIS_DATE, --- > CAST( > DECODE(BITAND(j.job_status,2), 2, j.last_start_date, NULL) > AS DATE) THIS_DATE,
38c38 < CAST(s.start_date AS DATE) AS NEXT_DATE, --- > CAST(s.next_run_date AS DATE) AS NEXT_DATE,
49c49 < CAST(s.start_date AS DATE) AS NEXT_DATE, --- > CAST(s.next_run_date AS DATE) AS NEXT_DATE,
30c30,31 < decode(bitand(s.flag,131072), 0, 'NO', 'YES') --- > decode(bitand(s.flag,131072), 0, 'NO', 'YES'), > s.snapid
9c9,10 < where SUPPLEMENTAL_LOG_DATA_MIN = 'NO' --- > where SUPPLEMENTAL_LOG_DATA_MIN = 'NO' and > sys_context( 'userenv', 'IS_PER_PDB_SUPPLEMENTAL_LOGGING') = 'FALSE' 11a13,14 > -- As MSL is set at ROOT, perPDB suplog will be disabled and no need to check > -- "IS_PER_PDB_SUPPLEMENTAL_LOGGING" 28a32,33 > -- As MSL is set at ROOT, perPDB suplog will be disabled and no need to check > -- "IS_PER_PDB_SUPPLEMENTAL_LOGGING" 50a56,117 > union > -- > -- Now get suplog data for the cases when per-PDB suplog is enabled. > -- > -- When per-PDB suplog is enabled, > -- suplog must be disabled at ROOT, and > -- '_enable_perpdb_suplog' must be TRUE > -- For ROOT, return suplog from v$database, must be NO. > select 'NO' MINIMAL, > 'NO' PRIMARY_KEY, > 'NO' UNIQUE_INDEX, > 'NO' FOREIGN_KEY, > 'NO' ALL_COLUMN, > 'NO' PROCEDURAL, > 'NO' SUBSET_REP > from v$database a where > a.SUPPLEMENTAL_LOG_DATA_MIN = 'NO' and > sys_context( 'userenv', 'IS_PER_PDB_SUPPLEMENTAL_LOGGING') = 'TRUE' and > sys_context( 'userenv', 'CON_ID') = 1 > union > -- Per-PD suplog is enabled, > -- for non-ROOT, if there is no prop$ entry, or the suplog value in props$ > -- entry is 0, NO suplog is enabled for this container. > select 'NO' MINIMAL, > 'NO' PRIMARY_KEY, > 'NO' UNIQUE_INDEX, > 'NO' FOREIGN_KEY, > 'NO' ALL_COLUMN, > 'NO' PROCEDURAL, > 'NO' SUBSET_REP > from v$database a where > a.SUPPLEMENTAL_LOG_DATA_MIN = 'NO' and > sys_context( 'userenv', 'IS_PER_PDB_SUPPLEMENTAL_LOGGING') = 'TRUE' and > (not exists (select 1 from sys.props$ > where name = 'SUPPLEMENTAL_LOG_DATA')) and > sys_context( 'userenv', 'CON_ID') <> 1 > union > -- Per-PDB suplog is enabled, for non-ROOT, if there is props$ entry, > -- return PDB-level suplog level from props$ > -- Note: MSL will be NO if none of the following bit is set for this PDB: > -- PK(0x1), UI(0x2), FK(0x4), MSL(0x8), ASL(0x20), PL(0x40), SR(0x400) > -- (0x46f is 1135) > select (case when bitand(to_number(b.value$), 1135) = 0 > then 'NO' else 'YES' end) MINIMAL, > (case when bitand(to_number(b.value$), 1) = 0 > then 'NO' else 'YES' end) PRIMARY_KEY, > (case when bitand(to_number(b.value$), 2) = 0 > then 'NO' else 'YES' end) UNIQUE_INDEX, > (case when bitand(to_number(b.value$), 4) = 0 > then 'NO' else 'YES' end) FOREIGN_KEY, > (case when bitand(to_number(b.value$), 32) = 0 > then 'NO' else 'YES' end) ALL_COLUMN, > (case when bitand(to_number(b.value$), 64) = 0 > then 'NO' else 'YES' end) PROCEDURAL, > (case when bitand(to_number(b.value$), 1024) = 0 > then 'NO' else 'YES' end) SUBSET_REP > from v$database a, (select value$ > from sys.props$ where name = 'SUPPLEMENTAL_LOG_DATA') b > where > a.SUPPLEMENTAL_LOG_DATA_MIN = 'NO' and > sys_context( 'userenv', 'IS_PER_PDB_SUPPLEMENTAL_LOGGING') = 'TRUE' and > sys_context( 'userenv', 'CON_ID') <> 1
19c19,21 < to_number(sys_context('USERENV', 'CON_ID')) --- > to_number(sys_context('USERENV', 'CON_ID')), > decode(bitand(pol.type, 512), > 512, 'YES', 'NO') 48c50,52 < to_number(sys_context('USERENV', 'CON_ID')) --- > to_number(sys_context('USERENV', 'CON_ID')), > decode(bitand(pol.type, 512), > 512, 'YES', 'NO') 117c121,123 < to_number(sys_context('USERENV', 'CON_ID')) --- > to_number(sys_context('USERENV', 'CON_ID')), > decode(bitand(pol.type, 512), > 512, 'YES', 'NO') 145c151,153 < to_number(sys_context('USERENV', 'CON_ID')) --- > to_number(sys_context('USERENV', 'CON_ID')), > decode(bitand(pol.type, 512), > 512, 'YES', 'NO') 171c179,181 < to_number(sys_context('USERENV', 'CON_ID')) --- > to_number(sys_context('USERENV', 'CON_ID')), > decode(bitand(pol.type, 512), > 512, 'YES', 'NO') 195c205,207 < to_number(sys_context('USERENV', 'CON_ID')) --- > to_number(sys_context('USERENV', 'CON_ID')), > decode(bitand(pol.type, 512), > 512, 'YES', 'NO')
10c10 < o.owner# = userenv('SCHEMAID') --- > o.owner# = userenv('SCHEMAID') and bitand(t.spare7,power(2,7)) = power(2,7)
16c16 < (t.FA# = (select FA# from SYS_FBA_USERS fp where fp.user# = u.USER#))) --- > (t.FA# IN (select FA# from SYS_FBA_USERS fp where fp.user# = u.USER#)))
1c1 < select s."OWNER",s."NAME",s."TABLE_NAME",s."MASTER_VIEW",s."MASTER_OWNER",s."MASTER",s."MASTER_LINK",s."CAN_USE_LOG",s."UPDATABLE",s."REFRESH_METHOD",s."LAST_REFRESH",s."ERROR",s."FR_OPERATIONS",s."CR_OPERATIONS",s."TYPE",s."NEXT",s."START_WITH",s."REFRESH_GROUP",s."UPDATE_TRIG",s."UPDATE_LOG",s."QUERY",s."MASTER_ROLLBACK_SEG",s."STATUS",s."REFRESH_MODE",s."PREBUILT" from dba_snapshots s, sys.user$ u --- > select s."OWNER",s."NAME",s."TABLE_NAME",s."MASTER_VIEW",s."MASTER_OWNER",s."MASTER",s."MASTER_LINK",s."CAN_USE_LOG",s."UPDATABLE",s."REFRESH_METHOD",s."LAST_REFRESH",s."ERROR",s."FR_OPERATIONS",s."CR_OPERATIONS",s."TYPE",s."NEXT",s."START_WITH",s."REFRESH_GROUP",s."UPDATE_TRIG",s."UPDATE_LOG",s."QUERY",s."MASTER_ROLLBACK_SEG",s."STATUS",s."REFRESH_MODE",s."PREBUILT",s."SNAPID" from dba_snapshots s, sys.user$ u
14c14,16 < o.attr9 n_arg2 --- > o.attr9 n_arg2, > o.attr11 n_arg3, > o.attr12 n_arg4
205,206c205,206 < -- Returns the statistics for a non-domain index on a collection as a JSON < -- text. Statistics contain information such as total size of the index, the --- > -- Returns the statistics for an index on a collection as a JSON text. > -- Statistics contain information such as type, total size of the index, the 212c212,213 < -- Gathering statistics is not supported for domain indexes. --- > -- 'numRows', 'sampleSize' and 'lastAnalyzed' are reported for functional > -- index only, not for domain (search, spatial) index. 217a219 > -- "type" : "FUNCTIONAL" --> Type of the index 235a238,289 > -- > -- Returns the usage statistics for the current schema as a JSON text. > -- Statistics contain collection names, number of times it was accessed > -- and its rank. P_ACCESS_TYPE can be set to 'READ', 'WRITE' or 'ALL' to > -- filter based on access type. If P_SORT value is greater than 0, the array > -- is ranked in ascending order, if not it is descending. > -- > -- A sample value returned by this API: > -- { > -- "collections": [ > -- { > -- "name": "coll0", > -- "frequency": 6882558, > -- "rank": 1 > -- }, > -- { > -- "name": "coll5", > > -- "frequency": 133634, > -- "rank": 2 > -- }, > -- { > -- "name": "coll2", > -- "frequency": 23898, > -- "rank": 3 > -- }, > -- { > > -- "name": "coll1", > -- "frequency": 2633, > -- "rank": 4 > -- }, > > -- { > -- "name": "coll4", > -- "frequency": 568, > -- "rank": 5 > > -- }, > -- { > -- "name": "coll3", > -- "frequency": 120, > -- "rank": 6 > -- } > -- ] > -- } > -- > procedure LIST_USAGE_STATISTICS(P_ACCESS_TYPE in varchar2 default 'READ', > P_SORT in number default 1, > P_LIMIT in number default 100, > P_STATISTICS out varchar2); > 249a304,305 > function IS_DEFAULT_ADB_COLLECTION(P_COLLECTION_NAME in nvarchar2) > return boolean;
4234c4234 < || ' where t.owner = :sch_name' --- > || ' where t.OWNER = :sch_name' 4302c4302,4303 < V_LOB_TOTAL_SIZE := (V_LOB_TOTAL_BLOCKS - V_LOB_UNUSED_BLOCKS) * V_BLOCK_SIZE; --- > V_LOB_TOTAL_SIZE := (V_LOB_TOTAL_BLOCKS - V_LOB_UNUSED_BLOCKS) > * V_BLOCK_SIZE; 4328a4330,4331 > V_IDX_TYPE VARCHAR2(128); > V_IDX_OWNER VARCHAR2(128); 4332c4335,4336 < V_IDX_SEGMENT_TYPE CONSTANT VARCHAR2(12) := 'INDEX'; --- > V_LOB_SEGMENT_NAME VARCHAR2(128); > V_IDX_SEGMENT_TYPE VARCHAR2(12) := 'INDEX'; 4339a4344 > V_IDX_USED_BLOCKS NUMBER; 4340a4346,4350 > V_LOB_TOTAL_BLOCKS NUMBER; > V_LOB_TOTAL_BYTES NUMBER; > V_LOB_UNUSED_BLOCKS NUMBER; > V_LOB_USED_BLOCKS NUMBER; > V_LOB_UNUSED_BYTES NUMBER; 4346a4357 > V_CTX_STAT XMLTYPE; 4385,4386c4396,4397 < || ' select i.owner, ts.BLOCK_SIZE, i.NUM_ROWS,' < || ' i.SAMPLE_SIZE,' --- > || ' select i.OWNER, ts.BLOCK_SIZE, i.NUM_ROWS,' > || ' i.SAMPLE_SIZE, i.ITYP_OWNER, ITYP_NAME,' 4400a4412,4413 > V_IDX_OWNER, > V_IDX_TYPE, 4412a4426,4437 > > IF V_IDX_OWNER = 'CTXSYS' AND V_IDX_TYPE = 'CONTEXT_V2' > THEN > V_IDX_TYPE := 'SEARCH'; > ELSIF V_IDX_OWNER = 'MDSYS' AND V_IDX_TYPE = 'SPATIAL_INDEX' > THEN > V_IDX_TYPE := 'SPATIAL'; > ELSIF V_IDX_OWNER IS NULL AND V_IDX_TYPE IS NULL > THEN > V_IDX_TYPE := 'FUNCTIONAL'; > END IF; > 4415a4441 > V_STATS_OBJ.PUT('type', V_IDX_TYPE); 4417,4432d4442 < V_STATS_OBJ.PUT('numRows', V_IDX_NUM_ROWS); < V_STATS_OBJ.PUT('sampleSize', V_IDX_SAMPLE_SIZE); < V_STATS_OBJ.PUT('lastAnalyzed', V_IDX_LAST_ANALYZED); < < < DBMS_SPACE.UNUSED_SPACE ( < SEGMENT_OWNER => V_IDX_SCHEMA_NAME, < SEGMENT_NAME => V_IDX_SEGMENT_NAME, < SEGMENT_TYPE => V_IDX_SEGMENT_TYPE, < TOTAL_BLOCKS => V_IDX_TOTAL_BLOCKS, < TOTAL_BYTES => V_IDX_TOTAL_BYTES, < UNUSED_BLOCKS => V_IDX_UNUSED_BLOCKS, < UNUSED_BYTES => V_IDX_UNUSED_BYTES, < LAST_USED_EXTENT_FILE_ID => V_IDX_LASTUSEDEXTFILEID, < LAST_USED_EXTENT_BLOCK_ID => V_IDX_LASTUSEDEXTBLOCKID, < LAST_USED_BLOCK => V_IDX_LAST_USED_BLOCK ); 4433a4444,4536 > > IF V_IDX_TYPE = 'FUNCTIONAL' > THEN > DBMS_SPACE.UNUSED_SPACE ( > SEGMENT_OWNER => V_IDX_SCHEMA_NAME, > SEGMENT_NAME => V_IDX_SEGMENT_NAME, > SEGMENT_TYPE => V_IDX_SEGMENT_TYPE, > TOTAL_BLOCKS => V_IDX_TOTAL_BLOCKS, > TOTAL_BYTES => V_IDX_TOTAL_BYTES, > UNUSED_BLOCKS => V_IDX_UNUSED_BLOCKS, > UNUSED_BYTES => V_IDX_UNUSED_BYTES, > LAST_USED_EXTENT_FILE_ID => V_IDX_LASTUSEDEXTFILEID, > LAST_USED_EXTENT_BLOCK_ID => V_IDX_LASTUSEDEXTBLOCKID, > LAST_USED_BLOCK => V_IDX_LAST_USED_BLOCK ); > > V_STATS_OBJ.PUT('numRows', V_IDX_NUM_ROWS); > V_STATS_OBJ.PUT('sampleSize', V_IDX_SAMPLE_SIZE); > V_STATS_OBJ.PUT('lastAnalyzed', V_IDX_LAST_ANALYZED); > > ELSIF V_IDX_TYPE = 'SEARCH' > THEN > > V_SQLTEXT := '' > || 'select XMLType(ctxsys.ctx_report.index_size(:idx, NULL, :fmt))' > || ' from sys.dual'; > EXECUTE IMMEDIATE V_SQLTEXT > INTO V_CTX_STAT > USING V_IDX_NAME, > 'XML'; > SELECT XMLCAST( > XMLQUERY('/CTXREPORT/INDEX_SIZE/SIZE_BLOCKS_ALLOCATED' > PASSING V_CTX_STAT RETURNING CONTENT) AS NUMBER), > XMLCAST( > XMLQUERY('/CTXREPORT/INDEX_SIZE/SIZE_BLOCKS_USED' > PASSING V_CTX_STAT RETURNING CONTENT) AS NUMBER), > XMLCAST( > XMLQUERY('/CTXREPORT/INDEX_SIZE/SIZE_BYTES_USED' > PASSING V_CTX_STAT RETURNING CONTENT) AS NUMBER) > INTO V_IDX_TOTAL_BLOCKS, > V_IDX_USED_BLOCKS, > V_IDX_TOTAL_SIZE > FROM SYS.DUAL; > V_IDX_UNUSED_BLOCKS := V_IDX_TOTAL_BLOCKS - V_IDX_USED_BLOCKS; > > ELSIF V_IDX_TYPE = 'SPATIAL' > THEN > > V_SQLTEXT := '' > || 'select sdo.SDO_INDEX_TABLE, l.SEGMENT_NAME' > || ' from USER_SDO_INDEX_METADATA sdo, USER_INDEXES i, USER_LOBS l' > || ' where i.TABLE_NAME = :obj_name' > || ' and l.TABLE_NAME = i.TABLE_NAME' > || ' and i.INDEX_NAME = sdo.SDO_INDEX_NAME' > || ' and sdo.SDO_INDEX_TYPE = ''RTREE'''; > EXECUTE IMMEDIATE V_SQLTEXT > INTO V_IDX_SEGMENT_NAME, > V_LOB_SEGMENT_NAME > USING V_TBL_SCHEMA_NAME; > > V_IDX_SEGMENT_TYPE := 'TABLE'; > DBMS_SPACE.UNUSED_SPACE ( > SEGMENT_OWNER => V_IDX_SCHEMA_NAME, > SEGMENT_NAME => V_IDX_SEGMENT_NAME, > SEGMENT_TYPE => V_IDX_SEGMENT_TYPE, > TOTAL_BLOCKS => V_IDX_TOTAL_BLOCKS, > TOTAL_BYTES => V_IDX_TOTAL_BYTES, > UNUSED_BLOCKS => V_IDX_UNUSED_BLOCKS, > UNUSED_BYTES => V_IDX_UNUSED_BYTES, > LAST_USED_EXTENT_FILE_ID => V_IDX_LASTUSEDEXTFILEID, > LAST_USED_EXTENT_BLOCK_ID => V_IDX_LASTUSEDEXTBLOCKID, > LAST_USED_BLOCK => V_IDX_LAST_USED_BLOCK ); > > V_IDX_SEGMENT_TYPE := 'LOB'; > DBMS_SPACE.UNUSED_SPACE ( > SEGMENT_OWNER => V_IDX_SCHEMA_NAME, > SEGMENT_NAME => V_LOB_SEGMENT_NAME, > SEGMENT_TYPE => V_IDX_SEGMENT_TYPE, > TOTAL_BLOCKS => V_LOB_TOTAL_BLOCKS, > TOTAL_BYTES => V_LOB_TOTAL_BYTES, > UNUSED_BLOCKS => V_LOB_UNUSED_BLOCKS, > UNUSED_BYTES => V_LOB_UNUSED_BYTES, > LAST_USED_EXTENT_FILE_ID => V_IDX_LASTUSEDEXTFILEID, > LAST_USED_EXTENT_BLOCK_ID => V_IDX_LASTUSEDEXTBLOCKID, > LAST_USED_BLOCK => V_IDX_LAST_USED_BLOCK ); > > V_IDX_TOTAL_BLOCKS := V_IDX_TOTAL_BLOCKS + V_LOB_TOTAL_BLOCKS; > V_IDX_UNUSED_BLOCKS := V_IDX_UNUSED_BLOCKS + V_LOB_UNUSED_BLOCKS; > END IF; > IF V_IDX_TOTAL_SIZE IS NULL > THEN > V_IDX_TOTAL_SIZE := (V_IDX_TOTAL_BLOCKS - V_IDX_UNUSED_BLOCKS) * > V_BLOCK_SIZE; > END IF; 4435d4537 < V_IDX_TOTAL_SIZE := (V_IDX_TOTAL_BLOCKS - V_IDX_UNUSED_BLOCKS) * V_BLOCK_SIZE; 4444a4547,4561 > PROCEDURE LIST_USAGE_STATISTICS(P_ACCESS_TYPE IN VARCHAR2 DEFAULT 'READ', > P_SORT IN NUMBER DEFAULT 1, > P_LIMIT IN NUMBER DEFAULT 100, > P_STATISTICS OUT VARCHAR2) > IS > V_OWNER VARCHAR2(128) := SYS_CONTEXT('USERENV', 'CURRENT_USER'); > BEGIN > > SYS.DBMS_SODA_UTIL.LIST_USAGE_STATISTICS(V_OWNER, P_STATISTICS, > P_ACCESS_TYPE, P_SORT, P_LIMIT); > > END LIST_USAGE_STATISTICS; > > > 4498a4616,4799 > > FUNCTION IS_DEFAULT_ADB_COLLECTION(P_COLLECTION_NAME IN NVARCHAR2) > RETURN BOOLEAN > IS > V_COLLECTION_NAME NVARCHAR2(2000) := P_COLLECTION_NAME; > V_METADATA VARCHAR2(4000); > V_METADATA_O JSON_OBJECT_T; > V_KEYS JSON_KEY_LIST; > V_KEY VARCHAR2(128); > V_VALUE JSON_ELEMENT_T; > V_SECOND_KEYS JSON_KEY_LIST; > V_SECOND_KEY VARCHAR2(128); > V_SECOND_VALUE JSON_ELEMENT_T; > BEGIN > DBMS_SODA_ADMIN.DESCRIBE_COLLECTION(V_COLLECTION_NAME, V_METADATA); > IF (V_METADATA IS NULL) THEN > RETURN FALSE; > END IF; > V_METADATA_O := JSON_OBJECT_T.PARSE(V_METADATA); > > IF (V_SERVICE IS NULL) THEN > V_SERVICE := SYS.DBMS_SODA_UTIL.GETSERVICENAME; > END IF; > IF (NOT V_SERVICE IN ('DWCS', 'OLTP', 'PAAS', 'JDCS')) THEN > RETURN FALSE; > END IF; > > > V_KEYS := JSON_KEY_LIST('tableName', 'schemaName', 'keyColumn', > 'contentColumn', 'versionColumn', > 'lastModifiedColumn', 'creationTimeColumn', > 'readOnly'); > FOR I IN 1 .. V_KEYS.COUNT > LOOP > V_KEY := V_KEYS(I); > V_VALUE := V_METADATA_O.GET(V_KEY); > IF (V_VALUE IS NULL) THEN > RETURN FALSE; > END IF; > END LOOP; > > > V_KEYS := V_METADATA_O.GET_KEYS; > FOR I IN 1 .. V_KEYS.COUNT > LOOP > V_KEY := V_KEYS(I); > V_VALUE := V_METADATA_O.GET(V_KEY); > IF (V_KEY = 'tableName') THEN > > NULL; > ELSIF (V_KEY = 'schemaName') THEN > > NULL; > ELSIF (V_KEY = 'keyColumn') THEN > V_SECOND_KEYS := JSON_OBJECT_T(V_VALUE).GET_KEYS(); > FOR J IN 1 .. V_SECOND_KEYS.COUNT > LOOP > V_SECOND_KEY := V_SECOND_KEYS(J); > V_SECOND_VALUE := JSON_OBJECT_T(V_VALUE).GET(V_SECOND_KEY); > > IF (V_SECOND_KEY = 'name') THEN > IF (UPPER(V_SECOND_VALUE.TO_STRING()) != '"ID"') THEN > RETURN FALSE; > END IF; > ELSIF (V_SECOND_KEY = 'sqlType') THEN > IF (UPPER(V_SECOND_VALUE.TO_STRING()) != '"VARCHAR2"') THEN > RETURN FALSE; > END IF; > ELSIF (V_SECOND_KEY = 'maxLength') THEN > IF (V_SECOND_VALUE.TO_NUMBER() != '255') THEN > RETURN FALSE; > END IF; > ELSIF (V_SECOND_KEY = 'assignmentMethod') THEN > IF (UPPER(V_SECOND_VALUE.TO_STRING()) != '"UUID"') THEN > RETURN FALSE; > END IF; > > ELSE > RETURN FALSE; > END IF; > END LOOP; > ELSIF (V_KEY = 'contentColumn') THEN > V_SECOND_KEYS := JSON_OBJECT_T(V_VALUE).GET_KEYS(); > FOR J IN 1 .. V_SECOND_KEYS.COUNT > LOOP > V_SECOND_KEY := V_SECOND_KEYS(J); > V_SECOND_VALUE := JSON_OBJECT_T(V_VALUE).GET(V_SECOND_KEY); > > IF (V_SECOND_KEY = 'name') THEN > IF (UPPER(V_SECOND_VALUE.TO_STRING()) != '"JSON_DOCUMENT"') THEN > RETURN FALSE; > END IF; > ELSIF (V_SECOND_KEY = 'sqlType') THEN > > IF (UPPER(V_SECOND_VALUE.TO_STRING()) = '"JSON"') THEN > NULL; > > ELSIF (UPPER(V_SECOND_VALUE.TO_STRING()) = '"BLOB"') THEN > IF (JSON_OBJECT_T(V_VALUE).GET('jsonFormat') IS NULL) THEN > RETURN FALSE; > ELSIF (UPPER(JSON_OBJECT_T(V_VALUE).GET('jsonFormat').TO_STRING()) > != '"OSON"') THEN > RETURN FALSE; > END IF; > > ELSE > RETURN FALSE; > END IF; > > ELSIF (V_SECOND_KEY = 'jsonFormat') THEN > IF (UPPER(V_SECOND_VALUE.TO_STRING()) != '"OSON"') THEN > RETURN FALSE; > ELSIF (UPPER(JSON_OBJECT_T(V_VALUE).GET('sqlType').TO_STRING()) > != '"BLOB"') THEN > RETURN FALSE; > END IF; > > ELSE > RETURN FALSE; > END IF; > END LOOP; > ELSIF (V_KEY = 'versionColumn') THEN > V_SECOND_KEYS := JSON_OBJECT_T(V_VALUE).GET_KEYS(); > FOR J IN 1 .. V_SECOND_KEYS.COUNT > LOOP > V_SECOND_KEY := V_SECOND_KEYS(J); > V_SECOND_VALUE := JSON_OBJECT_T(V_VALUE).GET(V_SECOND_KEY); > > IF (V_SECOND_KEY = 'name') THEN > IF (UPPER(V_SECOND_VALUE.TO_STRING()) != '"VERSION"') THEN > RETURN FALSE; > END IF; > ELSIF (V_SECOND_KEY = 'method') THEN > IF (UPPER(V_SECOND_VALUE.TO_STRING()) != '"UUID"') THEN > RETURN FALSE; > END IF; > > ELSE > RETURN FALSE; > END IF; > END LOOP; > ELSIF (V_KEY = 'lastModifiedColumn') THEN > V_SECOND_KEYS := JSON_OBJECT_T(V_VALUE).GET_KEYS(); > FOR J IN 1 .. V_SECOND_KEYS.COUNT > LOOP > V_SECOND_KEY := V_SECOND_KEYS(J); > V_SECOND_VALUE := JSON_OBJECT_T(V_VALUE).GET(V_SECOND_KEY); > > IF (V_SECOND_KEY = 'name') THEN > IF (UPPER(V_SECOND_VALUE.TO_STRING()) != '"LAST_MODIFIED"') THEN > RETURN FALSE; > END IF; > > ELSE > RETURN FALSE; > END IF; > END LOOP; > ELSIF (V_KEY = 'creationTimeColumn') THEN > V_SECOND_KEYS := JSON_OBJECT_T(V_VALUE).GET_KEYS(); > FOR J IN 1 .. V_SECOND_KEYS.COUNT > LOOP > V_SECOND_KEY := V_SECOND_KEYS(J); > V_SECOND_VALUE := JSON_OBJECT_T(V_VALUE).GET(V_SECOND_KEY); > > IF (V_SECOND_KEY = 'name') THEN > IF (UPPER(V_SECOND_VALUE.TO_STRING()) != '"CREATED_ON"') THEN > RETURN FALSE; > END IF; > > ELSE > RETURN FALSE; > END IF; > END LOOP; > ELSIF (V_KEY = 'readOnly') THEN > IF (V_VALUE.TO_BOOLEAN != FALSE) THEN > RETURN FALSE; > END IF; > > ELSE > RETURN FALSE; > END IF; > END LOOP METADATA_VALIDATE_LOOP; > RETURN TRUE; > END IS_DEFAULT_ADB_COLLECTION;