SQL> SQL> set echo on SQL> ALTER SESSION SET nls_length_semantics='CHAR'; Session altered. SQL> SQL> @@remove_obsolete.sql SQL> rem obsolete tables would go here SQL> SQL> @@drop_all_objects_in_schema.sql SQL> SQL> SELECT object_type, COUNT(*) 2 FROM user_objects 3 GROUP BY object_type; OBJECT_TYPE COUNT(*) ------------------- ---------- SEQUENCE 239 PROCEDURE 4 PACKAGE 12 PACKAGE BODY 12 LOB 51 TABLE 413 INDEX 1239 VIEW 17 FUNCTION 1 TYPE 52 10 rows selected. SQL> SQL> col what for a45 SQL> SQL> SELECT what, COUNT(*) 2 FROM user_jobs 3 GROUP BY what; no rows selected SQL> SQL> purge recyclebin; Recyclebin purged. SQL> SQL> SQL> BEGIN 2 FOR x IN (SELECT object_name 3 FROM user_objects 4 WHERE object_type = 'MATERIALIZED VIEW') 5 LOOP 6 EXECUTE IMMEDIATE 'DROP MATERIALIZED VIEW ' || x.object_name || ' PRESERVE TABLE'; 7 END LOOP; 8 9 FOR x IN (SELECT table_name FROM user_tables) LOOP 10 EXECUTE IMMEDIATE 'DROP TABLE ' || x.table_name || ' CASCADE CONSTRAINTS'; 11 END LOOP; 12 13 FOR x IN (SELECT object_type, object_name 14 FROM user_objects 15 WHERE object_type IN ('DIMENSION','CLUSTER','SEQUENCE', 16 'VIEW','FUNCTION','PROCEDURE', 17 'PACKAGE', 'SYNONYM','DATABASE LINK', 18 'INDEXTYPE')) 19 LOOP 20 EXECUTE IMMEDIATE 'DROP ' || x.object_type || ' ' || x.object_name; 21 END LOOP; 22 23 FOR x IN (SELECT object_type, object_name 24 FROM user_objects 25 WHERE object_type = 'JAVA SOURCE') 26 LOOP 27 EXECUTE IMMEDIATE 'DROP ' || x.object_type || ' ' || x.object_name; 28 END LOOP; 29 30 FOR x IN (SELECT object_type, object_name 31 FROM user_objects 32 WHERE object_type = 'JAVA RESOURCE') 33 LOOP 34 EXECUTE IMMEDIATE 'DROP ' || x.object_type || ' ' || x.object_name; 35 END LOOP; 36 37 FOR x IN (SELECT object_type, object_name 38 FROM user_objects 39 WHERE object_type = 'JAVA CLASS') 40 LOOP 41 EXECUTE IMMEDIATE 'DROP ' || x.object_type || ' ' || x.object_name; 42 END LOOP; 43 44 FOR x IN (SELECT object_type, object_name 45 FROM user_objects 46 WHERE object_type = 'OPERATOR') 47 LOOP 48 EXECUTE IMMEDIATE 'DROP ' || x.object_type || ' ' || x.object_name; 49 END LOOP; 50 END; 51 / PL/SQL procedure successfully completed. SQL> SQL> -- --------------------------------------------------------------------------------- SQL> -- Drop jobs SQL> -- --------------------------------------------------------------------------------- SQL> BEGIN 2 FOR x IN (SELECT job FROM user_jobs) LOOP 3 dbms_job.remove(x.job); 4 END LOOP; 5 END; 6 / PL/SQL procedure successfully completed. SQL> SQL> -- --------------------------------------------------------------------------------- SQL> -- Drop type SQL> -- --------------------------------------------------------------------------------- SQL> BEGIN 2 FOR x IN (SELECT type_name FROM user_types) LOOP 3 EXECUTE IMMEDIATE 'DROP TYPE ' || x.type_name || ' FORCE'; 4 END LOOP; 5 END; 6 / PL/SQL procedure successfully completed. SQL> SQL> purge recyclebin; Recyclebin purged. SQL> SQL> SELECT object_type, COUNT(*) 2 FROM user_objects 3 GROUP BY object_type; no rows selected SQL> SQL> SELECT what, COUNT(*) 2 FROM user_jobs 3 GROUP BY what; no rows selected SQL> SQL> @@CreateTypes.sql SQL> -- =================================================================================== SQL> -- Object types used for Matrix Data Populator SQL> -- =================================================================================== SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- Drop all user-defined types SQL> -- ----------------------------------------------------------------------------------- SQL> BEGIN 2 FOR x IN (SELECT type_name FROM user_types) LOOP 3 EXECUTE IMMEDIATE 'DROP TYPE ' || x.type_name || ' FORCE'; 4 END LOOP; 5 END; 6 / PL/SQL procedure successfully completed. SQL> SQL> -- =================================================================================== SQL> -- Object types used for Data Insight SQL Generator SQL> -- =================================================================================== SQL> -- ----------------------------------------------------------------------- SQL> -- Object type for passing in input parameters. SQL> -- ----------------------------------------------------------------------- SQL> CREATE OR REPLACE TYPE DI_OperandTbl AS TABLE OF VARCHAR2(4000) 2 / Type created. SQL> SQL> CREATE OR REPLACE TYPE DI_FilterParameterType AS OBJECT 2 ( 3 FilterName VARCHAR(128 CHAR), 4 operator VARCHAR(40 CHAR), 5 operand DI_OperandTbl 6 ) 7 / Type created. SQL> SQL> CREATE OR REPLACE TYPE DI_FilterParameterTbl AS TABLE OF DI_FilterParameterType 2 / Type created. SQL> SQL> -- ----------------------------------------------------------------------- SQL> -- Object type for returning top N policies in the folder list SQL. SQL> -- ----------------------------------------------------------------------- SQL> CREATE OR REPLACE TYPE DI_TopNPoliciesType AS OBJECT 2 ( 3 PolicyID INTEGER, 4 PolicyName VARCHAR(60 CHAR), 5 SensitiveFileCount INTEGER 6 ) 7 / Type created. SQL> SQL> CREATE OR REPLACE TYPE DI_TopNPoliciesTbl AS TABLE OF DI_TopNPoliciesType 2 / Type created. SQL> SQL> -- ----------------------------------------------------------------------- SQL> -- Object type for returning a set of NUMBER/VARCHAR2. This is used to SQL> -- handle varying in lists. SQL> -- ----------------------------------------------------------------------- SQL> CREATE OR REPLACE TYPE DI_NumberListType AS TABLE OF NUMBER 2 / Type created. SQL> SQL> CREATE OR REPLACE TYPE DI_VARCHARListType AS TABLE OF VARCHAR2(4000) 2 / Type created. SQL> SQL> -- =================================================================================== SQL> -- Object types used for Data Insight Data Populator SQL> -- =================================================================================== SQL> SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- MonitoredShare SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE OR REPLACE TYPE DI_MonitoredShareType AS OBJECT 2 ( 3 SharePath VARCHAR2(512), 4 ShareType INTEGER, 5 FirstAddedOn DATE, 6 FirstActivityTime DATE, 7 LastActivityTime DATE 8 ) 9 / Type created. SQL> SQL> CREATE OR REPLACE TYPE DI_MonitoredShareTbl AS TABLE OF DI_MonitoredShareType 2 / Type created. SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- FolderPermissions SQL> -- SQL> -- Do we need an entity type to distinguish users from groups. SQL> -- It's more efficient if we don't mix users and groups in a batch. SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE OR REPLACE TYPE DI_FolderPermissionType AS OBJECT 2 ( 3 FolderPath VARCHAR2(512), 4 EntityName VARCHAR2(50), 5 NumUsers INTEGER, 6 PermissionFlag VARCHAR2(1) 7 ) 8 / Type created. SQL> SQL> CREATE OR REPLACE TYPE DI_FolderPermissionTbl AS TABLE OF DI_FolderPermissionType 2 / Type created. SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- FolderAccessibility SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE OR REPLACE TYPE DI_FolderAccessibilityType AS OBJECT 2 ( 3 FolderPath VARCHAR2(512), 4 Accessibility INTEGER 5 ) 6 / Type created. SQL> SQL> CREATE OR REPLACE TYPE DI_FolderAccessibilityTbl AS TABLE OF DI_FolderAccessibilityType 2 / Type created. SQL> SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- FolderUserGroup SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE OR REPLACE TYPE DI_FolderUserGroupType AS OBJECT 2 ( 3 FolderPath VARCHAR2(512), 4 UserName VARCHAR2(100), 5 EntityType VARCHAR2(1), 6 EntityName VARCHAR2(100) 7 ) 8 / Type created. SQL> SQL> CREATE OR REPLACE TYPE DI_FolderUserGroupTbl AS TABLE OF DI_FolderUserGroupType 2 / Type created. SQL> SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- FileDayUser - File Access/Usage SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE OR REPLACE TYPE DI_FileDayUserType AS OBJECT 2 ( 3 FolderPath VARCHAR2(512), 4 FileName VARCHAR2(512), 5 UserName VARCHAR2(100), 6 NumReads INTEGER, 7 NumWrites INTEGER 8 ) 9 / Type created. SQL> SQL> CREATE OR REPLACE TYPE DI_FileDayUserTbl AS TABLE OF DI_FileDayUserType 2 / Type created. SQL> SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- Incident Deletor types SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE OR REPLACE TYPE ID_Delete_Stmt_Type AS OBJECT ( 2 ExecutionOrder INTEGER, 3 TableName VARCHAR2(30), 4 DeleteStatement VARCHAR2(4000), 5 BulkDeleteStatement VARCHAR2(4000), 6 RecordsDeleted INTEGER, 7 RecordsUpdated INTEGER, 8 ElapsedTimeHsec INTEGER 9 ) 10 / Type created. SQL> SQL> SQL> CREATE OR REPLACE TYPE ID_Delete_Stmt_Tbl_Type AS TABLE OF ID_Delete_Stmt_Type 2 / Type created. SQL> SQL> -- ================================================================================================== SQL> -- Object types used for Agent Attributes, Events, State Population and Agent Group state population SQL> -- ================================================================================================== SQL> SQL> -- -------------------------------------------------------------------------------------------------- SQL> -- Types used to return agent error codes SQL> -- -------------------------------------------------------------------------------------------------- SQL> SQL> CREATE OR REPLACE TYPE Agent_NameErrorCodeType AS OBJECT 2 ( 3 AgentName VARCHAR2(256), 4 ErrorCode NUMBER, 5 ErrorString VARCHAR2(512) 6 ) 7 / Type created. SQL> SQL> CREATE OR REPLACE TYPE Agent_NameErrorCodeTbl AS TABLE OF Agent_NameErrorCodeType 2 / Type created. SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- Types used to pass a collection of agent events SQL> -- ----------------------------------------------------------------------------------- SQL> SQL> CREATE OR REPLACE TYPE Agent_EventType AS OBJECT 2 ( 3 AgentName VARCHAR2(256), 4 ConnectionTime TIMESTAMP, 5 CategoryCodeId NUMBER, 6 SubCategoryCodeId NUMBER, 7 EventDate TIMESTAMP, 8 ExtendedValue VARCHAR2(4000) 9 ) 10 / Type created. SQL> SQL> CREATE OR REPLACE TYPE Agent_EventTbl IS TABLE OF Agent_EventType 2 / Type created. SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- Types used to represent AgentStateRecord table SQL> -- ----------------------------------------------------------------------------------- SQL> SQL> CREATE OR REPLACE TYPE Agent_StateRecordType AS OBJECT 2 ( 3 AgentId NUMBER, 4 CategoryId NUMBER, 5 CategoryStatusId NUMBER, 6 RecordDate TIMESTAMP, 7 ExtendedValue VARCHAR2(4000), 8 IsDefault NUMBER, 9 RecordVersion NUMBER 10 ) 11 / Type created. SQL> SQL> CREATE OR REPLACE TYPE Agent_StateRecordTbl IS TABLE OF Agent_StateRecordType 2 / Type created. SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- Types used to pass status attribute records SQL> -- ----------------------------------------------------------------------------------- SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- Types used to pass a collection of state records SQL> -- ----------------------------------------------------------------------------------- SQL> SQL> CREATE OR REPLACE TYPE Agent_StateRecordParamType AS OBJECT 2 ( 3 CategoryCodeId NUMBER, 4 SubCategoryCodeId NUMBER, 5 RecordDate TIMESTAMP, 6 ExtendedValue VARCHAR2(4000), 7 IsDefault NUMBER, 8 RecordVersion NUMBER 9 ) 10 / Type created. SQL> SQL> CREATE OR REPLACE TYPE Agent_StateRecordParamTbl AS TABLE OF Agent_StateRecordParamType 2 / Type created. SQL> SQL> CREATE OR REPLACE TYPE Agent_StateStatusType AS OBJECT 2 ( 3 AgentState Agent_StateRecordParamTbl, 4 AgentStateTime TIMESTAMP 5 ) 6 / Type created. SQL> SQL> CREATE OR REPLACE TYPE Agent_IPAddressStatusType AS OBJECT 2 ( 3 AgentIPAddress VARCHAR2(32 CHAR), 4 AgentIPAddressTime TIMESTAMP 5 ) 6 / Type created. SQL> SQL> CREATE OR REPLACE TYPE Agent_OSInfoStatusType AS OBJECT 2 ( 3 OSName VARCHAR2(256 CHAR), 4 Architecture VARCHAR2(32 CHAR), 5 OSInfoTime TIMESTAMP 6 ) 7 / Type created. SQL> SQL> CREATE OR REPLACE TYPE Agent_ConfigurationStatusType AS OBJECT 2 ( 3 ConfigurationId NUMBER, 4 ConfigurationVersion NUMBER, 5 ConfigurationVersionTime TIMESTAMP 6 ) 7 / Type created. SQL> SQL> CREATE OR REPLACE TYPE Agent_LoggerStatusType AS OBJECT 2 ( 3 LogLevelChanged NUMBER, 4 LogLevelChangedTime TIMESTAMP 5 ) 6 / Type created. SQL> SQL> CREATE OR REPLACE TYPE Agent_VersionStatusType AS OBJECT 2 ( 3 Version VARCHAR2(20 CHAR), 4 VersionTime TIMESTAMP 5 ) 6 / Type created. SQL> SQL> CREATE OR REPLACE TYPE Agent_ConnectionStatusType AS OBJECT 2 ( 3 ConnectStatus NUMBER, 4 ConnectStatusTime TIMESTAMP, 5 InactiveTime TIMESTAMP, 6 DisconnectionTime TIMESTAMP 7 ) 8 / Type created. SQL> SQL> -- -------------------------------------------------------------------------------------------------- SQL> -- Types used to pass collection of agent group attribute results SQL> -- -------------------------------------------------------------------------------------------------- SQL> SQL> create or replace TYPE Agent_GroupAttributeResultType AS OBJECT 2 ( 3 AttributeId NUMBER, 4 AttributeValue VARCHAR2(2048 CHAR), 5 Errorcode NUMBER, 6 ErrorDescription VARCHAR2(2048 CHAR), 7 InternalErrorCode NUMBER 8 ) 9 / Type created. SQL> SQL> create or replace TYPE Agent_GroupAttributeResultsTbl IS TABLE OF Agent_GroupAttributeResultType 2 / Type created. SQL> SQL> -- -------------------------------------------------------------------------------------------------- SQL> -- Types used to pass collection of agent group conflicts SQL> -- -------------------------------------------------------------------------------------------------- SQL> SQL> create or replace TYPE Agent_GroupConflictType AS OBJECT 2 ( 3 AgentGroupId NUMBER, 4 AgentGroupVersion NUMBER 5 ) 6 / Type created. SQL> SQL> create or replace TYPE Agent_GroupConflictsTbl IS TABLE OF Agent_GroupConflictType 2 / Type created. SQL> SQL> -- -------------------------------------------------------------------------------------------------- SQL> -- Types used to pass current agent group SQL> -- -------------------------------------------------------------------------------------------------- SQL> SQL> create or replace TYPE Agent_CurrentGroupStatusType AS OBJECT 2 ( 3 AgentGroupId NUMBER, 4 AgentGroupVersion NUMBER, 5 ConfigurationVersionId NUMBER 6 ) 7 / Type created. SQL> SQL> -- -------------------------------------------------------------------------------------------------- SQL> -- Types used to pass current agent group conflict rule SQL> -- -------------------------------------------------------------------------------------------------- SQL> SQL> create or replace TYPE Agent_GroupConflictRuleType AS OBJECT 2 ( 3 AgentGroupConflictRuleId NUMBER, 4 AgentGroupConflictRuleVersion NUMBER 5 ) 6 / Type created. SQL> SQL> -- -------------------------------------------------------------------------------------------------- SQL> -- Types used to pass agent group status information SQL> -- -------------------------------------------------------------------------------------------------- SQL> SQL> create or replace TYPE Agent_GroupInfoStatusType AS OBJECT 2 ( 3 AgentOsName VARCHAR2(256 CHAR), 4 AgentOsArchitecture VARCHAR2(32 CHAR), 5 AgentCurrentGroupStatus Agent_CurrentGroupStatusType, 6 AgentGroupConflicts Agent_GroupConflictsTbl, 7 AgentGroupAttributeResults Agent_GroupAttributeResultsTbl, 8 AgentGroupconflictRule Agent_GroupConflictRuleType, 9 AgentStateStatus Agent_StateStatusType, 10 AgentGroupStatusTime TIMESTAMP 11 ) 12 / Type created. SQL> SQL> CREATE OR REPLACE TYPE Agent_StatusAttributeType AS OBJECT 2 ( 3 AgentName VARCHAR2(256 CHAR), 4 LatestConnectionTime TIMESTAMP, 5 ConnectionStatus Agent_ConnectionStatusType, 6 VersionStatus Agent_VersionStatusType, 7 StateStatus Agent_StateStatusType, 8 IPAddressStatus Agent_IPAddressStatusType, 9 OSInfoStatus Agent_OSInfoStatusType, 10 ConfigurationStatus Agent_ConfigurationStatusType, 11 LoggerStatus Agent_LoggerStatusType, 12 AgentGroupInfoStatus Agent_GroupInfoStatusType 13 ) 14 / Type created. SQL> SQL> CREATE OR REPLACE TYPE Agent_StatusAttributeTbl AS TABLE OF Agent_StatusAttributeType 2 / Type created. SQL> SQL> SQL> -- --------------------------------------------------- SQL> -- EDAR related types SQL> -- --------------------------------------------------- SQL> SQL> CREATE OR REPLACE TYPE EDAR_WalkStateType AS OBJECT 2 ( 3 WalkID NUMBER, 4 State NUMBER, 5 LastStateChangeDate TIMESTAMP, 6 ElapsedTime NUMBER 7 ) 8 / Type created. SQL> SQL> CREATE OR REPLACE TYPE EDAR_AgentWalkStateType AS OBJECT 2 ( 3 AgentName VARCHAR2(256 CHAR), 4 CurrentState NUMBER, 5 ItemsTotal NUMBER, 6 ItemsScanned NUMBER, 7 ItemsFiltered NUMBER, 8 ItemsUnprocessable NUMBER, 9 BytesScanned NUMBER, 10 BytesFiltered NUMBER, 11 ScanStartDate TIMESTAMP, 12 StatusTime TIMESTAMP 13 ) 14 / Type created. SQL> SQL> CREATE OR REPLACE TYPE EDAR_AgentWalkTbl AS TABLE OF EDAR_AgentWalkStateType; 2 / Type created. SQL> -- ----------------------------------------------------------------------- SQL> -- Types moved from DI_DataRefresh_s.pls SQL> -- ----------------------------------------------------------------------- SQL> SQL> /* SQL> CREATE OR REPLACE TYPE Datauser_MERGE_Tbl IS TABLE OF VARCHAR2(30) SQL> / SQL> SQL> */ SQL> SQL> SQL> -- -------------------------------------------------------------------------------------------------- SQL> -- BLOB Externalization deletion status reporting. SQL> -- SQL> -- deleteAction corresponds to ID_externalized_BLOB.deleteAction SQL> -- SQL> -- deleteStatus SQL> -- 0 - failed SQL> -- 1 - successful SQL> -- -------------------------------------------------------------------------------------------------- SQL> CREATE OR REPLACE TYPE ID_ExtBLOBDeleteStatus AS OBJECT 2 ( 3 messageID NUMBER(38), 4 deleteAction NUMBER(1), 5 deleteStatus NUMBER(1) 6 ) 7 / Type created. SQL> SQL> CREATE OR REPLACE TYPE ID_ExtCVLOBDeleteStatus AS OBJECT 2 ( 3 ConditionViolationID NUMBER(38), 4 deleteStatus NUMBER(1) 5 ) 6 / Type created. SQL> SQL> CREATE OR REPLACE TYPE ID_ExtBLOBDeleteStatusArray AS TABLE OF ID_ExtBLOBDeleteStatus 2 / Type created. SQL> SQL> CREATE OR REPLACE TYPE ID_ExtCVLOBDeleteStatusArray AS TABLE OF ID_ExtCVLOBDeleteStatus 2 / Type created. SQL> SQL> SQL> -- -------------------------------------------------------------------------------------------------- SQL> -- BLOB Externalization: Java-DB Integration SQL> -- -------------------------------------------------------------------------------------------------- SQL> CREATE OR REPLACE TYPE BE_MessageIDArray AS TABLE OF NUMBER(38) 2 / Type created. SQL> SQL> SQL> SQL> SQL> @@CreateTables.sql SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- CustomAttributeDefinition SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'CUSTOMATTRIBUTEDEFINITION') LOOP EXECUTE IMMEDIATE 'drop table CustomAttributeDefinition cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table CustomAttributeDefinition 2 ( 3 customAttributeDefinitionID integer not null, 4 name varchar(60 CHAR) not null, 5 columnIndex integer not null unique, 6 displayOrder integer not null, 7 isEmailAddress integer not null 8 ) 9 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_CUSTOMATTRIBUTEDEFINITION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_CustomAttributeDefinition'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_CustomAttributeDefinition start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE CustomAttributeDefinition ADD CONSTRAINT CustomAttributeDefinition_pk PRIMARY KEY (customAttributeDefinitionID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- CustomAttributeGroup SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'CUSTOMATTRIBUTEGROUP') LOOP EXECUTE IMMEDIATE 'drop table CustomAttributeGroup cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table CustomAttributeGroup 2 ( 3 customAttributeGroupID integer not null, 4 name varchar(60 CHAR) not null, 5 isInternationalized integer default 0 not null CHECK (isInternationalized IN (0,1)) 6 ) 7 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_CUSTOMATTRIBUTEGROUP') LOOP EXECUTE IMMEDIATE 'drop sequence seq_CustomAttributeGroup'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_CustomAttributeGroup start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE CustomAttributeGroup ADD CONSTRAINT CustomAttributeGroup_pk PRIMARY KEY (customAttributeGroupID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- CustomAttributeGroupMap - Intermediary SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'CUSTOMATTRIBUTEGROUPMAP') LOOP EXECUTE IMMEDIATE 'drop table CustomAttributeGroupMap cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table CustomAttributeGroupMap 2 ( 3 customAttributeGroupID integer not null, 4 customAttributeDefinitionID integer not null 5 ) 6 ; Table created. SQL> SQL> ALTER TABLE CustomAttributeGroupMap ADD CONSTRAINT CustomAttributeGroupMap_PK primary key(customAttributeGroupID, customAttributeDefinitionID); Table altered. SQL> SQL> SQL> SQL> ALTER TABLE CustomAttributeGroupMap ADD CONSTRAINT CustomAttributeGroupMap_fk1 FOREIGN KEY (customAttributeGroupID) references CustomAttributeGroup(customAttributeGroupID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE CustomAttributeGroupMap ADD CONSTRAINT CustomAttributeGroupMap_fk2 FOREIGN KEY (customAttributeDefinitionID) references CustomAttributeDefinition(customAttributeDefinitionID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX CustomAttributeGroupMap_fk1 ON CustomAttributeGroupMap(customAttributeGroupID); Index created. SQL> CREATE INDEX CustomAttributeGroupMap_fk2 ON CustomAttributeGroupMap(customAttributeDefinitionID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- CustomAttributesRecord SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'CUSTOMATTRIBUTESRECORD') LOOP EXECUTE IMMEDIATE 'drop table CustomAttributesRecord cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table CustomAttributesRecord 2 ( 3 customAttributesRecordID numeric(38) not null, 4 value1 varchar(2000 CHAR), 5 value2 varchar(2000 CHAR), 6 value3 varchar(2000 CHAR), 7 value4 varchar(2000 CHAR), 8 value5 varchar(2000 CHAR), 9 value6 varchar(2000 CHAR), 10 value7 varchar(2000 CHAR), 11 value8 varchar(2000 CHAR), 12 value9 varchar(2000 CHAR), 13 value10 varchar(2000 CHAR), 14 value11 varchar(2000 CHAR), 15 value12 varchar(2000 CHAR), 16 value13 varchar(2000 CHAR), 17 value14 varchar(2000 CHAR), 18 value15 varchar(2000 CHAR), 19 value16 varchar(2000 CHAR), 20 value17 varchar(2000 CHAR), 21 value18 varchar(2000 CHAR), 22 value19 varchar(2000 CHAR), 23 value20 varchar(2000 CHAR), 24 value21 varchar(2000 CHAR), 25 value22 varchar(2000 CHAR), 26 value23 varchar(2000 CHAR), 27 value24 varchar(2000 CHAR), 28 value25 varchar(2000 CHAR), 29 value26 varchar(2000 CHAR), 30 value27 varchar(2000 CHAR), 31 value28 varchar(2000 CHAR), 32 value29 varchar(2000 CHAR), 33 value30 varchar(2000 CHAR), 34 value31 varchar(2000 CHAR), 35 value32 varchar(2000 CHAR), 36 value33 varchar(2000 CHAR), 37 value34 varchar(2000 CHAR), 38 value35 varchar(2000 CHAR), 39 value36 varchar(2000 CHAR), 40 value37 varchar(2000 CHAR), 41 value38 varchar(2000 CHAR), 42 value39 varchar(2000 CHAR), 43 value40 varchar(2000 CHAR), 44 value41 varchar(2000 CHAR), 45 value42 varchar(2000 CHAR), 46 value43 varchar(2000 CHAR), 47 value44 varchar(2000 CHAR), 48 value45 varchar(2000 CHAR), 49 value46 varchar(2000 CHAR), 50 value47 varchar(2000 CHAR), 51 value48 varchar(2000 CHAR), 52 value49 varchar(2000 CHAR), 53 value50 varchar(2000 CHAR) 54 ) 55 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_CUSTOMATTRIBUTESRECORD') LOOP EXECUTE IMMEDIATE 'drop sequence seq_CustomAttributesRecord'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_CustomAttributesRecord start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE CustomAttributesRecord ADD CONSTRAINT CustomAttributesRecord_pk PRIMARY KEY (customAttributesRecordID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- Role SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'ROLE') LOOP EXECUTE IMMEDIATE 'drop table Role cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table Role 2 ( 3 roleID integer not null, 4 name varchar(60 CHAR) not null, 5 description varchar(2048 CHAR), 6 isDeleted integer not null, 7 version numeric(10) default 0 not null 8 ) 9 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_ROLE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_Role'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_Role start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE Role ADD CONSTRAINT Role_pk PRIMARY KEY (roleID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- RoleEntity SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'ROLEENTITY') LOOP EXECUTE IMMEDIATE 'drop table RoleEntity cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table RoleEntity 2 ( 3 roleEntityID integer not null, 4 name varchar(128 CHAR) not null, 5 value varchar(2048 CHAR) not null, 6 roleID integer not null 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_ROLEENTITY') LOOP EXECUTE IMMEDIATE 'drop sequence seq_RoleEntity'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_RoleEntity start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE RoleEntity ADD CONSTRAINT RoleEntity_pk PRIMARY KEY (roleEntityID); Table altered. SQL> SQL> SQL> ALTER TABLE RoleEntity ADD CONSTRAINT RoleEntity_fk1 FOREIGN KEY (roleID) references Role(roleID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX RoleEntity_fk1 ON RoleEntity(roleID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- RoleRoleMapping - Intermediary SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'ROLEROLEMAPPING') LOOP EXECUTE IMMEDIATE 'drop table RoleRoleMapping cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table RoleRoleMapping 2 ( 3 roleID integer not null, 4 roleID2 integer not null 5 ) 6 ; Table created. SQL> SQL> ALTER TABLE RoleRoleMapping ADD CONSTRAINT RoleRoleMapping_PK primary key (roleID, roleID2); Table altered. SQL> SQL> SQL> SQL> ALTER TABLE RoleRoleMapping ADD CONSTRAINT RoleRoleMapping_fk1 FOREIGN KEY (roleID) references Role(roleID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE RoleRoleMapping ADD CONSTRAINT RoleRoleMapping_fk2 FOREIGN KEY (roleID2) references Role(roleID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX RoleRoleMapping_fk1 ON RoleRoleMapping(roleID); Index created. SQL> CREATE INDEX RoleRoleMapping_fk2 ON RoleRoleMapping(roleID2); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- Permission SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'PERMISSION') LOOP EXECUTE IMMEDIATE 'drop table Permission cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table Permission 2 ( 3 permissionID integer not null, 4 roleID integer not null, 5 permission integer not null 6 ) 7 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_PERMISSION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_Permission'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_Permission start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE Permission ADD CONSTRAINT Permission_pk PRIMARY KEY (permissionID); Table altered. SQL> SQL> SQL> ALTER TABLE Permission ADD CONSTRAINT Permission_fk1 FOREIGN KEY (roleID) references Role(roleID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX Permission_fk1 ON Permission(roleID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- ProtectUser SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'PROTECTUSER') LOOP EXECUTE IMMEDIATE 'drop table ProtectUser cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table ProtectUser 2 ( 3 userID integer not null, 4 name varchar(30 CHAR) not null, 5 password varchar(44 CHAR), 6 passwordSalt varchar(44 CHAR), 7 emailAddress varchar(60 CHAR), 8 lastActiveDate timestamp, 9 createDate timestamp not null, 10 editDate timestamp not null, 11 lastPasswordChangeDate timestamp, 12 dateLockedOut timestamp, 13 passwordHistory blob, 14 consecutiveFailedAttempts integer, 15 isPasswordCompliant integer, 16 isNewUser integer, 17 isDeleted integer not null, 18 defaultLocale varchar(60 CHAR), 19 textFileEncoding varchar(60 CHAR) default 'UTF-8' not null, 20 csvDelimiter varchar(1 CHAR) default ',' not null, 21 includeHistoryInXMLExport integer default 0 not null CHECK (includeHistoryInXMLExport IN (0,1)), 22 includeViolationsInXMLExport integer default 0 not null CHECK (includeViolationsInXMLExport IN (0,1)), 23 commonNameMapping varchar(1000 CHAR), 24 defaultRoleID integer, 25 isPasswordAuthEnabled integer default 1 not null CHECK (isPasswordAuthEnabled in (0,1)), 26 isCertificateAuthEnabled integer default 0 not null CHECK (isCertificateAuthEnabled in (0,1)), 27 version numeric(10) default 0 not null 28 ) 29 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_PROTECTUSER') LOOP EXECUTE IMMEDIATE 'drop sequence seq_ProtectUser'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_ProtectUser start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE ProtectUser ADD CONSTRAINT ProtectUser_pk PRIMARY KEY (userID); Table altered. SQL> SQL> SQL> ALTER TABLE ProtectUser ADD CONSTRAINT ProtectUser_fk1 FOREIGN KEY (defaultRoleID) references Role(roleID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX ProtectUser_fk1 ON ProtectUser(defaultRoleID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- UserRoleMapping - Intermediary SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'USERROLEMAPPING') LOOP EXECUTE IMMEDIATE 'drop table UserRoleMapping cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table UserRoleMapping 2 ( 3 roleID integer not null, 4 userID integer not null 5 ) 6 ; Table created. SQL> SQL> ALTER TABLE UserRoleMapping ADD CONSTRAINT UserRoleMapping_PK primary key (roleID, userID); Table altered. SQL> SQL> SQL> SQL> ALTER TABLE UserRoleMapping ADD CONSTRAINT UserRoleMapping_fk1 FOREIGN KEY (roleID) references Role(roleID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE UserRoleMapping ADD CONSTRAINT UserRoleMapping_fk2 FOREIGN KEY (userID) references ProtectUser(userID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX UserRoleMapping_fk1 ON UserRoleMapping(roleID); Index created. SQL> CREATE INDEX UserRoleMapping_fk2 ON UserRoleMapping(userID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- PolicyGroup SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'POLICYGROUP') LOOP EXECUTE IMMEDIATE 'drop table PolicyGroup cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table PolicyGroup 2 ( 3 policyGroupID integer not null, 4 name varchar(60 CHAR) not null, 5 description varchar(2048 CHAR), 6 editUserID integer not null, 7 editDate timestamp not null, 8 isDeleted integer not null, 9 isInternationalized integer default 0 not null CHECK (isInternationalized IN (0,1)), 10 allMonitorsFlag integer default 0 not null CHECK (allMonitorsFlag IN (0,1)), 11 version numeric(10) default 0 not null 12 ) 13 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_POLICYGROUP') LOOP EXECUTE IMMEDIATE 'drop sequence seq_PolicyGroup'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_PolicyGroup start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE PolicyGroup ADD CONSTRAINT PolicyGroup_pk PRIMARY KEY (policyGroupID); Table altered. SQL> SQL> SQL> ALTER TABLE PolicyGroup ADD CONSTRAINT PolicyGroup_fk1 FOREIGN KEY (editUserID) references ProtectUser(userID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX PolicyGroup_fk1 ON PolicyGroup(editUserID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- Policy SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'POLICY') LOOP EXECUTE IMMEDIATE 'drop table Policy cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table Policy 2 ( 3 policyID integer not null, 4 version integer not null, 5 name varchar(60 CHAR) not null, 6 description varchar(2048 CHAR), 7 label varchar(60 CHAR), 8 createUserID integer not null, 9 editUserID integer not null, 10 activeStatus integer not null, 11 createDate timestamp not null, 12 editDate timestamp not null, 13 isDeleted integer not null, 14 rootConditionID integer not null, 15 policyGroupID integer not null, 16 uuid varchar(36 CHAR) not null unique, 17 versionuuid varchar(36 CHAR) not null unique 18 ) 19 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_POLICY') LOOP EXECUTE IMMEDIATE 'drop sequence seq_Policy'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_Policy start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE Policy ADD CONSTRAINT Policy_pk PRIMARY KEY (policyID); Table altered. SQL> SQL> SQL> ALTER TABLE Policy ADD CONSTRAINT Policy_fk1 FOREIGN KEY (createUserID) references ProtectUser(userID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE Policy ADD CONSTRAINT Policy_fk2 FOREIGN KEY (editUserID) references ProtectUser(userID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE Policy ADD CONSTRAINT Policy_fk3 FOREIGN KEY (policyGroupID) references PolicyGroup(PolicyGroupID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX Policy_fk1 ON Policy(createUserID); Index created. SQL> CREATE INDEX Policy_fk2 ON Policy(editUserID); Index created. SQL> CREATE INDEX Policy_fk3 ON Policy(policyGroupID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- CompoundCondition SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'COMPOUNDCONDITION') LOOP EXECUTE IMMEDIATE 'drop table CompoundCondition cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table CompoundCondition 2 ( 3 conditionID integer not null, 4 type integer not null, 5 createDate timestamp not null, 6 editDate timestamp not null, 7 name varchar(60 CHAR) not null, 8 processingOrder integer, 9 minimumMatches integer not null, 10 matchType integer not null, 11 metaInformation varchar(4000 CHAR), 12 conditionPredicate integer not null 13 ) 14 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_COMPOUNDCONDITION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_CompoundCondition'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_CompoundCondition start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE CompoundCondition ADD CONSTRAINT CompoundCondition_pk PRIMARY KEY (conditionID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- CompoundConditionCondition - Intermediary SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'COMPOUNDCONDITIONCONDITION') LOOP EXECUTE IMMEDIATE 'drop table CompoundConditionCondition cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table CompoundConditionCondition 2 ( 3 compoundConditionID integer not null, 4 conditionID integer not null 5 ) 6 ; Table created. SQL> SQL> ALTER TABLE CompoundConditionCondition ADD CONSTRAINT CompoundConditionCondition_PK primary key(compoundConditionID, conditionID); Table altered. SQL> SQL> SQL> SQL> ALTER TABLE CompoundConditionCondition ADD CONSTRAINT CompoundConditionCondition_fk1 FOREIGN KEY (compoundConditionID) references CompoundCondition(conditionID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX CompoundConditionCondition_fk1 ON CompoundConditionCondition(compoundConditionID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DocumentMetaInfoCondition SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DOCUMENTMETAINFOCONDITION') LOOP EXECUTE IMMEDIATE 'drop table DocumentMetaInfoCondition cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DocumentMetaInfoCondition 2 ( 3 conditionID integer not null, 4 type integer not null, 5 createDate timestamp not null, 6 editDate timestamp not null, 7 name varchar(60 CHAR) not null, 8 processingOrder integer, 9 minimumMatches integer not null, 10 matchType integer not null, 11 metaInformation varchar(4000 CHAR), 12 MIMEType varchar(2048 CHAR) 13 ) 14 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DOCUMENTMETAINFOCONDITION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DocumentMetaInfoCondition'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DocumentMetaInfoCondition start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DocumentMetaInfoCondition ADD CONSTRAINT DocumentMetaInfoCondition_pk PRIMARY KEY (conditionID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DocumentNameCondition SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DOCUMENTNAMECONDITION') LOOP EXECUTE IMMEDIATE 'drop table DocumentNameCondition cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DocumentNameCondition 2 ( 3 conditionID integer not null, 4 type integer not null, 5 createDate timestamp not null, 6 editDate timestamp not null, 7 name varchar(60 CHAR) not null, 8 processingOrder integer, 9 minimumMatches integer not null, 10 matchType integer not null, 11 metaInformation varchar(4000 CHAR), 12 fileNames varchar(4000 CHAR) not null 13 ) 14 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DOCUMENTNAMECONDITION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DocumentNameCondition'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DocumentNameCondition start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DocumentNameCondition ADD CONSTRAINT DocumentNameCondition_pk PRIMARY KEY (conditionID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DocumentSizeCondition SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DOCUMENTSIZECONDITION') LOOP EXECUTE IMMEDIATE 'drop table DocumentSizeCondition cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DocumentSizeCondition 2 ( 3 conditionID integer not null, 4 type integer not null, 5 createDate timestamp not null, 6 editDate timestamp not null, 7 name varchar(60 CHAR) not null, 8 processingOrder integer, 9 minimumMatches integer not null, 10 matchType integer not null, 11 metaInformation varchar(4000 CHAR), 12 documentSize numeric(38) not null, 13 sizeComparator integer not null, 14 sizeMagnitude integer not null 15 ) 16 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DOCUMENTSIZECONDITION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DocumentSizeCondition'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DocumentSizeCondition start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DocumentSizeCondition ADD CONSTRAINT DocumentSizeCondition_pk PRIMARY KEY (conditionID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- KeywordCondition SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'KEYWORDCONDITION') LOOP EXECUTE IMMEDIATE 'drop table KeywordCondition cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table KeywordCondition 2 ( 3 conditionID integer not null, 4 type integer not null, 5 createDate timestamp not null, 6 editDate timestamp not null, 7 name varchar(60 CHAR) not null, 8 processingOrder integer, 9 minimumMatches integer not null, 10 matchType integer not null, 11 metaInformation varchar(4000 CHAR), 12 caseSensitive integer not null, 13 keywordList clob, 14 delimiter integer not null, 15 isTokenizedSearch integer not null, 16 checkKeywords integer default 0 not null CHECK (checkKeywords IN (0,1)), 17 checkProximityKeywords integer default 0 not null CHECK (checkProximityKeywords IN (0,1)) 18 ) 19 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_KEYWORDCONDITION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_KeywordCondition'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_KeywordCondition start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE KeywordCondition ADD CONSTRAINT KeywordCondition_pk PRIMARY KEY (conditionID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- KeywordPair SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'KEYWORDPAIR') LOOP EXECUTE IMMEDIATE 'drop table KeywordPair cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table KeywordPair 2 ( 3 keywordPairID integer not null, 4 conditionID integer not null, 5 firstKeywordList clob not null, 6 secondKeywordList clob not null, 7 proximity integer not null 8 ) 9 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_KEYWORDPAIR') LOOP EXECUTE IMMEDIATE 'drop sequence seq_KeywordPair'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_KeywordPair start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE KeywordPair ADD CONSTRAINT KeywordPair_pk PRIMARY KEY (keywordPairID); Table altered. SQL> SQL> SQL> ALTER TABLE KeywordPair ADD CONSTRAINT KeywordPair_fk1 FOREIGN KEY (conditionID) references KeywordCondition(conditionID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX KeywordPair_fk1 ON KeywordPair(conditionID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- ProtocolCondition SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'PROTOCOLCONDITION') LOOP EXECUTE IMMEDIATE 'drop table ProtocolCondition cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table ProtocolCondition 2 ( 3 conditionID integer not null, 4 type integer not null, 5 createDate timestamp not null, 6 editDate timestamp not null, 7 name varchar(60 CHAR) not null, 8 processingOrder integer, 9 minimumMatches integer not null, 10 matchType integer not null, 11 metaInformation varchar(4000 CHAR), 12 protocols varchar(4000 CHAR) not null 13 ) 14 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_PROTOCOLCONDITION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_ProtocolCondition'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_ProtocolCondition start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE ProtocolCondition ADD CONSTRAINT ProtocolCondition_pk PRIMARY KEY (conditionID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- PatternCondition SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'PATTERNCONDITION') LOOP EXECUTE IMMEDIATE 'drop table PatternCondition cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table PatternCondition 2 ( 3 conditionID integer not null, 4 type integer not null, 5 createDate timestamp not null, 6 editDate timestamp not null, 7 name varchar(60 CHAR) not null, 8 processingOrder integer, 9 minimumMatches integer not null, 10 matchType integer not null, 11 metaInformation varchar(4000 CHAR), 12 pattern varchar(4000 CHAR) 13 ) 14 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_PATTERNCONDITION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_PatternCondition'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_PatternCondition start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE PatternCondition ADD CONSTRAINT PatternCondition_pk PRIMARY KEY (conditionID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- UniversalMetadataCondition SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'UNIVERSALMETADATACONDITION') LOOP EXECUTE IMMEDIATE 'drop table UniversalMetadataCondition cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table UniversalMetadataCondition 2 ( 3 conditionID integer not null, 4 type integer not null, 5 createDate timestamp not null, 6 editDate timestamp not null, 7 name varchar(60 CHAR) not null, 8 processingOrder integer, 9 minimumMatches integer not null, 10 matchType integer not null, 11 metaInformation varchar(4000 CHAR), 12 key varchar(128) not null check (key in ('NetworkLocation')), 13 value clob not null, 14 valueOperand varchar(128) not null check (valueOperand in ('CSVSTRING', 'REGEX')), 15 metadataSource integer not null 16 ) 17 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_UNIVERSALMETADATACONDITION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_UniversalMetadataCondition'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_UniversalMetadataCondition start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE UniversalMetadataCondition ADD CONSTRAINT UniversalMetadataCondition_pk PRIMARY KEY (conditionID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DirectoryGroupCondition SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DIRECTORYGROUPCONDITION') LOOP EXECUTE IMMEDIATE 'drop table DirectoryGroupCondition cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DirectoryGroupCondition 2 ( 3 conditionID integer not null, 4 type integer not null, 5 createDate timestamp not null, 6 editDate timestamp not null, 7 name varchar(60 CHAR) not null, 8 processingOrder integer, 9 minimumMatches integer not null, 10 matchType integer not null, 11 metaInformation varchar(4000 CHAR), 12 identityMatcherType integer not null 13 ) 14 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DIRECTORYGROUPCONDITION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DirectoryGroupCondition'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DirectoryGroupCondition start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DirectoryGroupCondition ADD CONSTRAINT DirectoryGroupCondition_pk PRIMARY KEY (conditionID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DirectoryGroup SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DIRECTORYGROUP') LOOP EXECUTE IMMEDIATE 'drop table DirectoryGroup cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DirectoryGroup 2 ( 3 directoryGroupID integer not null, 4 name varchar(255 CHAR) not null unique, 5 description varchar(500 CHAR) null, 6 version integer not null, 7 uuid varchar(36 CHAR) not null unique, 8 versionuuid varchar(36 CHAR) not null unique 9 ) 10 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DIRECTORYGROUP') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DirectoryGroup'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DirectoryGroup start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DirectoryGroup ADD CONSTRAINT DirectoryGroup_pk PRIMARY KEY (directoryGroupID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DirectoryGroupConditionMap - Intermediary SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DIRECTORYGROUPCONDITIONMAP') LOOP EXECUTE IMMEDIATE 'drop table DirectoryGroupConditionMap cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DirectoryGroupConditionMap 2 ( 3 directoryGroupConditionID integer not null, 4 directoryGroupID integer not null 5 ) 6 ; Table created. SQL> SQL> ALTER TABLE DirectoryGroupConditionMap ADD CONSTRAINT DirectoryGroupConditionMap_PK primary key(directoryGroupConditionID, directoryGroupID); Table altered. SQL> SQL> SQL> SQL> ALTER TABLE DirectoryGroupConditionMap ADD CONSTRAINT DirectoryGroupConditionMap_fk1 FOREIGN KEY (directoryGroupConditionID) references DirectoryGroupCondition(conditionID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE DirectoryGroupConditionMap ADD CONSTRAINT DirectoryGroupConditionMap_fk2 FOREIGN KEY (directoryGroupID) references DirectoryGroup(directoryGroupID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX DirectoryGroupConditionMap_fk1 ON DirectoryGroupConditionMap(directoryGroupConditionID); Index created. SQL> CREATE INDEX DirectoryGroupConditionMap_fk2 ON DirectoryGroupConditionMap(directoryGroupID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DeviceDefinition SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DEVICEDEFINITION') LOOP EXECUTE IMMEDIATE 'drop table DeviceDefinition cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DeviceDefinition 2 ( 3 deviceDefinitionID integer not null, 4 name varchar(60 CHAR) not null, 5 description varchar(2048 CHAR), 6 deviceIdentifierPattern varchar(2048 CHAR) not null, 7 isDeleted integer default 0 not null CHECK (isDeleted in (0,1)) 8 ) 9 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DEVICEDEFINITION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DeviceDefinition'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DeviceDefinition start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DeviceDefinition ADD CONSTRAINT DeviceDefinition_pk PRIMARY KEY (deviceDefinitionID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DeviceCondition SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DEVICECONDITION') LOOP EXECUTE IMMEDIATE 'drop table DeviceCondition cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DeviceCondition 2 ( 3 conditionID integer not null, 4 type integer not null, 5 createDate timestamp not null, 6 editDate timestamp not null, 7 name varchar(60 CHAR) not null, 8 processingOrder integer, 9 minimumMatches integer not null, 10 matchType integer not null, 11 metaInformation varchar(4000 CHAR) 12 ) 13 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DEVICECONDITION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DeviceCondition'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DeviceCondition start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DeviceCondition ADD CONSTRAINT DeviceCondition_pk PRIMARY KEY (conditionID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DeviceConditionMap - Intermediary SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DEVICECONDITIONMAP') LOOP EXECUTE IMMEDIATE 'drop table DeviceConditionMap cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DeviceConditionMap 2 ( 3 conditionID integer not null, 4 deviceDefinitionID integer not null 5 ) 6 ; Table created. SQL> SQL> ALTER TABLE DeviceConditionMap ADD CONSTRAINT DeviceConditionMap_PK primary key(conditionID, deviceDefinitionID); Table altered. SQL> SQL> SQL> SQL> ALTER TABLE DeviceConditionMap ADD CONSTRAINT DeviceConditionMap_fk1 FOREIGN KEY (conditionID) references DeviceCondition(conditionID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE DeviceConditionMap ADD CONSTRAINT DeviceConditionMap_fk2 FOREIGN KEY (deviceDefinitionID) references DeviceDefinition(deviceDefinitionID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX DeviceConditionMap_fk1 ON DeviceConditionMap(conditionID); Index created. SQL> CREATE INDEX DeviceConditionMap_fk2 ON DeviceConditionMap(deviceDefinitionID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- MapiAttributeCondition SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'MAPIATTRIBUTECONDITION') LOOP EXECUTE IMMEDIATE 'drop table MapiAttributeCondition cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table MapiAttributeCondition 2 ( 3 conditionID integer not null, 4 type integer not null, 5 createDate timestamp not null, 6 editDate timestamp not null, 7 name varchar(60 CHAR) not null, 8 processingOrder integer, 9 minimumMatches integer not null, 10 matchType integer not null, 11 metaInformation varchar(4000 CHAR), 12 noSensitivityFlag integer default 0 not null CHECK (noSensitivityFlag in (0,1)), 13 personalSensitivityFlag integer default 0 not null CHECK (personalSensitivityFlag in (0,1)), 14 privateSensitivityFlag integer default 0 not null CHECK (privateSensitivityFlag in (0,1)), 15 confidentialSensitivityFlag integer default 0 not null CHECK (confidentialSensitivityFlag in (0,1)), 16 messageClasses clob 17 ) 18 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_MAPIATTRIBUTECONDITION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_MapiAttributeCondition'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_MapiAttributeCondition start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE MapiAttributeCondition ADD CONSTRAINT MapiAttributeCondition_pk PRIMARY KEY (conditionID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- ConditionGroup SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'CONDITIONGROUP') LOOP EXECUTE IMMEDIATE 'drop table ConditionGroup cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table ConditionGroup 2 ( 3 conditionID integer not null, 4 type integer not null, 5 createDate timestamp not null, 6 editDate timestamp not null, 7 name varchar(60 CHAR) not null, 8 processingOrder integer, 9 minimumMatches integer not null, 10 matchType integer not null, 11 metaInformation varchar(4000 CHAR), 12 conditionGroupType varchar(15) not null CHECK (conditionGroupType IN ('DETECTION', 'IDENTITY')) 13 ) 14 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_CONDITIONGROUP') LOOP EXECUTE IMMEDIATE 'drop sequence seq_ConditionGroup'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_ConditionGroup start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE ConditionGroup ADD CONSTRAINT ConditionGroup_pk PRIMARY KEY (conditionID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- OrCondition - Intermediary SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'ORCONDITION') LOOP EXECUTE IMMEDIATE 'drop table OrCondition cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table OrCondition 2 ( 3 conditionGroupID integer not null, 4 orConditionID integer not null 5 ) 6 ; Table created. SQL> SQL> ALTER TABLE OrCondition ADD CONSTRAINT OrCondition_PK primary key (conditionGroupID, orConditionID); Table altered. SQL> SQL> SQL> SQL> ALTER TABLE OrCondition ADD CONSTRAINT OrCondition_fk1 FOREIGN KEY (conditionGroupID) references ConditionGroup(conditionID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX OrCondition_fk1 ON OrCondition(conditionGroupID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- NotOrCondition - Intermediary SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'NOTORCONDITION') LOOP EXECUTE IMMEDIATE 'drop table NotOrCondition cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table NotOrCondition 2 ( 3 conditionGroupID integer not null, 4 notOrConditionID integer not null 5 ) 6 ; Table created. SQL> SQL> ALTER TABLE NotOrCondition ADD CONSTRAINT NotOrCondition_PK primary key (conditionGroupID, notOrConditionID); Table altered. SQL> SQL> SQL> SQL> ALTER TABLE NotOrCondition ADD CONSTRAINT NotOrCondition_fk1 FOREIGN KEY (conditionGroupID) references ConditionGroup(conditionID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX NotOrCondition_fk1 ON NotOrCondition(conditionGroupID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- UserSession SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'USERSESSION') LOOP EXECUTE IMMEDIATE 'drop table UserSession cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table UserSession 2 ( 3 userSessionID numeric(38) not null, 4 userID integer not null, 5 assumedRoleName varchar(128 CHAR), 6 ipAddress varchar(32 CHAR), 7 logonTime timestamp not null, 8 logoffTime timestamp, 9 logoffReason integer 10 ) 11 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_USERSESSION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_UserSession'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_UserSession start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE UserSession ADD CONSTRAINT UserSession_pk PRIMARY KEY (userSessionID); Table altered. SQL> SQL> SQL> ALTER TABLE UserSession ADD CONSTRAINT UserSession_fk1 FOREIGN KEY (userID) references ProtectUser(userID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX UserSession_fk1 ON UserSession(userID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- UserAction SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'USERACTION') LOOP EXECUTE IMMEDIATE 'drop table UserAction cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table UserAction 2 ( 3 userActionID integer not null, 4 userSessionID numeric(38), 5 actionType integer not null, 6 actionParameters varchar(1000 CHAR), 7 actionDate timestamp not null 8 ) 9 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_USERACTION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_UserAction'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_UserAction start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE UserAction ADD CONSTRAINT UserAction_pk PRIMARY KEY (userActionID); Table altered. SQL> SQL> SQL> ALTER TABLE UserAction ADD CONSTRAINT UserAction_fk1 FOREIGN KEY (userSessionID) references UserSession(userSessionID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX UserAction_fk1 ON UserAction(userSessionID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- UnsuccessfulLogin SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'UNSUCCESSFULLOGIN') LOOP EXECUTE IMMEDIATE 'drop table UnsuccessfulLogin cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table UnsuccessfulLogin 2 ( 3 unsuccessfulLoginID integer not null, 4 attemptTime timestamp not null, 5 requestedUserName varchar(128 CHAR) not null, 6 ipAddress varchar(32 CHAR) not null 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_UNSUCCESSFULLOGIN') LOOP EXECUTE IMMEDIATE 'drop sequence seq_UnsuccessfulLogin'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_UnsuccessfulLogin start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE UnsuccessfulLogin ADD CONSTRAINT UnsuccessfulLogin_pk PRIMARY KEY (unsuccessfulLoginID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- Password SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'PASSWORD') LOOP EXECUTE IMMEDIATE 'drop table Password cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table Password 2 ( 3 passwordID integer not null, 4 value varchar(1024 CHAR) not null, 5 keyAlias varchar(50 CHAR) not null 6 ) 7 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_PASSWORD') LOOP EXECUTE IMMEDIATE 'drop sequence seq_Password'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_Password start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE Password ADD CONSTRAINT Password_pk PRIMARY KEY (passwordID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- Credential SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'CREDENTIAL') LOOP EXECUTE IMMEDIATE 'drop table Credential cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table Credential 2 ( 3 credentialID integer not null, 4 name varchar(256 CHAR) not null unique, 5 username varchar(256 CHAR) not null, 6 passwordID integer, 7 usagePermission integer default 0 not null CHECK (usagePermission in (0,1)), 8 version numeric(10) default 0 not null 9 ) 10 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_CREDENTIAL') LOOP EXECUTE IMMEDIATE 'drop sequence seq_Credential'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_Credential start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE Credential ADD CONSTRAINT Credential_pk PRIMARY KEY (credentialID); Table altered. SQL> SQL> SQL> ALTER TABLE Credential ADD CONSTRAINT Credential_fk1 FOREIGN KEY (passwordID) references Password(passwordID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX Credential_fk1 ON Credential(passwordID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- PGPUniversalServer SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'PGPUNIVERSALSERVER') LOOP EXECUTE IMMEDIATE 'drop table PGPUniversalServer cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table PGPUniversalServer 2 ( 3 pgpUniversalServerID integer not null, 4 pgpUniversalServerHost varchar(255 CHAR) not null, 5 pgpUniversalServerPort integer not null, 6 credentialID integer not null 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_PGPUNIVERSALSERVER') LOOP EXECUTE IMMEDIATE 'drop sequence seq_PGPUniversalServer'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_PGPUniversalServer start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE PGPUniversalServer ADD CONSTRAINT PGPUniversalServer_pk PRIMARY KEY (pgpUniversalServerID); Table altered. SQL> SQL> SQL> ALTER TABLE PGPUniversalServer ADD CONSTRAINT PGPUniversalServer_fk1 FOREIGN KEY (credentialID) references Credential(credentialID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX PGPUniversalServer_fk1 ON PGPUniversalServer(credentialID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- InformationMonitor SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'INFORMATIONMONITOR') LOOP EXECUTE IMMEDIATE 'drop table InformationMonitor cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table InformationMonitor 2 ( 3 informationMonitorID integer not null, 4 monitorName varchar(255 CHAR) not null, 5 uniqueName varchar(255 CHAR) not null, 6 host varchar(255 CHAR) not null, 7 port integer not null, 8 isDeleted integer not null, 9 pgpUniversalServerID integer, 10 detectorUUID varchar(255 CHAR), 11 version numeric(10) default 0 not null 12 ) 13 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_INFORMATIONMONITOR') LOOP EXECUTE IMMEDIATE 'drop sequence seq_InformationMonitor'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_InformationMonitor start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE InformationMonitor ADD CONSTRAINT InformationMonitor_pk PRIMARY KEY (informationMonitorID); Table altered. SQL> SQL> SQL> ALTER TABLE InformationMonitor ADD CONSTRAINT InformationMonitor_fk1 FOREIGN KEY (pgpUniversalServerID) references PGPUniversalServer(pgpUniversalServerID) ON DELETE SET NULL DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX InformationMonitor_fk1 ON InformationMonitor(pgpUniversalServerID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- MonitorPolicyGroupMapping - Intermediary SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'MONITORPOLICYGROUPMAPPING') LOOP EXECUTE IMMEDIATE 'drop table MonitorPolicyGroupMapping cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table MonitorPolicyGroupMapping 2 ( 3 informationMonitorID integer not null, 4 policyGroupID integer not null 5 ) 6 ; Table created. SQL> SQL> ALTER TABLE MonitorPolicyGroupMapping ADD CONSTRAINT MonitorPolicyGroupMapping_PK primary key (informationMonitorID, policyGroupID); Table altered. SQL> SQL> SQL> SQL> ALTER TABLE MonitorPolicyGroupMapping ADD CONSTRAINT MonitorPolicyGroupMapping_fk1 FOREIGN KEY (informationMonitorID) references InformationMonitor(InformationMonitorID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE MonitorPolicyGroupMapping ADD CONSTRAINT MonitorPolicyGroupMapping_fk2 FOREIGN KEY (policyGroupID) references PolicyGroup(PolicyGroupID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX MonitorPolicyGroupMapping_fk1 ON MonitorPolicyGroupMapping(informationMonitorID); Index created. SQL> CREATE INDEX MonitorPolicyGroupMapping_fk2 ON MonitorPolicyGroupMapping(policyGroupID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- MessageOriginator SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'MESSAGEORIGINATOR') LOOP EXECUTE IMMEDIATE 'drop table MessageOriginator cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table MessageOriginator 2 ( 3 messageOriginatorID integer not null, 4 IPAddress varchar(60 CHAR), 5 networkPort integer, 6 networkSenderIdentifier varchar(1024 CHAR), 7 domainUserName varchar(256 CHAR), 8 endpointMachineName varchar(256 CHAR), 9 lastActivityTime timestamp 10 ) 11 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_MESSAGEORIGINATOR') LOOP EXECUTE IMMEDIATE 'drop sequence seq_MessageOriginator'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_MessageOriginator start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE MessageOriginator ADD CONSTRAINT MessageOriginator_pk PRIMARY KEY (messageOriginatorID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- FileSystemChannel SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'FILESYSTEMCHANNEL') LOOP EXECUTE IMMEDIATE 'drop table FileSystemChannel cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table FileSystemChannel 2 ( 3 monitorChannelID integer not null, 4 informationMonitorID integer not null , 5 state integer not null, 6 maxParallelScans integer default 1 not null CHECK (maxParallelScans > 0) 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_FILESYSTEMCHANNEL') LOOP EXECUTE IMMEDIATE 'drop sequence seq_FileSystemChannel'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_FileSystemChannel start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE FileSystemChannel ADD CONSTRAINT FileSystemChannel_pk PRIMARY KEY (monitorChannelID); Table altered. SQL> SQL> SQL> ALTER TABLE FileSystemChannel ADD CONSTRAINT FileSystemChannel_fk1 FOREIGN KEY (informationMonitorID) references InformationMonitor(informationMonitorID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX FileSystemChannel_fk1 ON FileSystemChannel(informationMonitorID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- IcapChannel SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'ICAPCHANNEL') LOOP EXECUTE IMMEDIATE 'drop table IcapChannel cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table IcapChannel 2 ( 3 monitorChannelID integer not null, 4 informationMonitorID integer not null , 5 state integer not null, 6 backlog integer, 7 maxConnections integer not null, 8 port integer, 9 minSizeFilter integer, 10 multipartOnlyFilter integer not null, 11 urlExcludeFilter varchar(2048 CHAR), 12 userAgentExcludeFilter varchar(1024 CHAR), 13 isPrevent integer not null, 14 isPreventTrial integer not null, 15 respMaxConnections integer not null, 16 respMinSizeFilter integer, 17 respUrlExcludeFilter varchar(2048 CHAR), 18 respUserAgentExcludeFilter varchar(1024 CHAR), 19 respContentTypeList varchar(4000 CHAR), 20 icapChannelSubType integer default 1001 not null CHECK(icapChannelSubType IN (1001,1002,1003)) 21 ) 22 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_ICAPCHANNEL') LOOP EXECUTE IMMEDIATE 'drop sequence seq_IcapChannel'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_IcapChannel start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE IcapChannel ADD CONSTRAINT IcapChannel_pk PRIMARY KEY (monitorChannelID); Table altered. SQL> SQL> SQL> ALTER TABLE IcapChannel ADD CONSTRAINT IcapChannel_fk1 FOREIGN KEY (informationMonitorID) references InformationMonitor(informationMonitorID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX IcapChannel_fk1 ON IcapChannel(informationMonitorID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- InlineSmtpChannel SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'INLINESMTPCHANNEL') LOOP EXECUTE IMMEDIATE 'drop table InlineSmtpChannel cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table InlineSmtpChannel 2 ( 3 monitorChannelID integer not null, 4 informationMonitorID integer not null , 5 state integer not null, 6 isPreventTrial integer default 0 not null CHECK (isPreventTrial IN (0,1)), 7 maxConnections integer not null, 8 keyStorePasswordID integer, 9 isReflectMode integer default 0 not null CHECK (isReflectMode IN (0,1)), 10 inlineSmtpChannelSubType integer default 2001 not null CHECK(inlineSmtpChannelSubType IN (2001,2002)) 11 ) 12 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_INLINESMTPCHANNEL') LOOP EXECUTE IMMEDIATE 'drop sequence seq_InlineSmtpChannel'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_InlineSmtpChannel start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE InlineSmtpChannel ADD CONSTRAINT InlineSmtpChannel_pk PRIMARY KEY (monitorChannelID); Table altered. SQL> SQL> SQL> ALTER TABLE InlineSmtpChannel ADD CONSTRAINT InlineSmtpChannel_fk1 FOREIGN KEY (informationMonitorID) references InformationMonitor(informationMonitorID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE InlineSmtpChannel ADD CONSTRAINT InlineSmtpChannel_fk2 FOREIGN KEY (keyStorePasswordID) references Password(passwordID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX InlineSmtpChannel_fk1 ON InlineSmtpChannel(informationMonitorID); Index created. SQL> CREATE INDEX InlineSmtpChannel_fk2 ON InlineSmtpChannel(keyStorePasswordID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- SmtpForwardHop SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'SMTPFORWARDHOP') LOOP EXECUTE IMMEDIATE 'drop table SmtpForwardHop cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table SmtpForwardHop 2 ( 3 smtpForwardHopID integer not null, 4 hostName varchar(256 CHAR), 5 port integer, 6 useMxLookup integer default 0 not null CHECK (useMxLookup IN (0,1)), 7 priority integer, 8 inlineSmtpChannelID integer 9 ) 10 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_SMTPFORWARDHOP') LOOP EXECUTE IMMEDIATE 'drop sequence seq_SmtpForwardHop'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_SmtpForwardHop start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE SmtpForwardHop ADD CONSTRAINT SmtpForwardHop_pk PRIMARY KEY (smtpForwardHopID); Table altered. SQL> SQL> SQL> ALTER TABLE SmtpForwardHop ADD CONSTRAINT SmtpForwardHop_fk1 FOREIGN KEY (inlineSmtpChannelID) references InlineSmtpChannel(monitorChannelID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX SmtpForwardHop_fk1 ON SmtpForwardHop(inlineSmtpChannelID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- PacketCaptureChannel SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'PACKETCAPTURECHANNEL') LOOP EXECUTE IMMEDIATE 'drop table PacketCaptureChannel cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table PacketCaptureChannel 2 ( 3 monitorChannelID integer not null, 4 informationMonitorID integer not null , 5 state integer not null, 6 transferDirectory varchar(256 CHAR) 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_PACKETCAPTURECHANNEL') LOOP EXECUTE IMMEDIATE 'drop sequence seq_PacketCaptureChannel'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_PacketCaptureChannel start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE PacketCaptureChannel ADD CONSTRAINT PacketCaptureChannel_pk PRIMARY KEY (monitorChannelID); Table altered. SQL> SQL> SQL> ALTER TABLE PacketCaptureChannel ADD CONSTRAINT PacketCaptureChannel_fk1 FOREIGN KEY (informationMonitorID) references InformationMonitor(informationMonitorID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX PacketCaptureChannel_fk1 ON PacketCaptureChannel(informationMonitorID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- SMTPCopyChannel SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'SMTPCOPYCHANNEL') LOOP EXECUTE IMMEDIATE 'drop table SMTPCopyChannel cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table SMTPCopyChannel 2 ( 3 monitorChannelID integer not null, 4 informationMonitorID integer not null , 5 state integer not null, 6 transferDirectory varchar(256 CHAR) 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_SMTPCOPYCHANNEL') LOOP EXECUTE IMMEDIATE 'drop sequence seq_SMTPCopyChannel'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_SMTPCopyChannel start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE SMTPCopyChannel ADD CONSTRAINT SMTPCopyChannel_pk PRIMARY KEY (monitorChannelID); Table altered. SQL> SQL> SQL> ALTER TABLE SMTPCopyChannel ADD CONSTRAINT SMTPCopyChannel_fk1 FOREIGN KEY (informationMonitorID) references InformationMonitor(informationMonitorID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX SMTPCopyChannel_fk1 ON SMTPCopyChannel(informationMonitorID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- EndpointProtocolFilter SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'ENDPOINTPROTOCOLFILTER') LOOP EXECUTE IMMEDIATE 'drop table EndpointProtocolFilter cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table EndpointProtocolFilter 2 ( 3 protocolFilterID integer not null, 4 ipFilter varchar(2048 CHAR), 5 httpDomainFilter varchar(1024 CHAR), 6 httpsDomainFilter varchar(1024 CHAR) 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_ENDPOINTPROTOCOLFILTER') LOOP EXECUTE IMMEDIATE 'drop sequence seq_EndpointProtocolFilter'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_EndpointProtocolFilter start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE EndpointProtocolFilter ADD CONSTRAINT EndpointProtocolFilter_pk PRIMARY KEY (protocolFilterID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- AgentConfiguration SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'AGENTCONFIGURATION') LOOP EXECUTE IMMEDIATE 'drop table AgentConfiguration cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table AgentConfiguration 2 ( 3 agentConfigurationID integer not null, 4 name varchar(60 CHAR) not null, 5 description varchar(2048 CHAR), 6 createDate timestamp not null, 7 createUserID integer not null, 8 isDefault integer default 0 not null CHECK (isDefault in (0,1)), 9 isDeleted integer default 0 not null CHECK (isDeleted in (0,1)) 10 ) 11 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_AGENTCONFIGURATION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_AgentConfiguration'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_AgentConfiguration start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE AgentConfiguration ADD CONSTRAINT AgentConfiguration_pk PRIMARY KEY (agentConfigurationID); Table altered. SQL> SQL> SQL> ALTER TABLE AgentConfiguration ADD CONSTRAINT AgentConfiguration_fk1 FOREIGN KEY (createUserID) references ProtectUser(userID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX AgentConfiguration_fk1 ON AgentConfiguration(createUserID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- AgentConfigurationVersion SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'AGENTCONFIGURATIONVERSION') LOOP EXECUTE IMMEDIATE 'drop table AgentConfigurationVersion cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table AgentConfigurationVersion 2 ( 3 agentConfigurationVersionID integer not null, 4 agentConfigurationID integer not null, 5 version integer not null, 6 protocolFilterID integer unique, 7 modifyDate timestamp not null, 8 modifyUserID integer not null, 9 isLatest integer default 0 not null CHECK (isLatest in (0,1)) 10 ) 11 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_AGENTCONFIGURATIONVERSION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_AgentConfigurationVersion'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_AgentConfigurationVersion start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE AgentConfigurationVersion ADD CONSTRAINT AgentConfigurationVersion_pk PRIMARY KEY (agentConfigurationVersionID); Table altered. SQL> SQL> ALTER TABLE AgentConfigurationVersion ADD CONSTRAINT AgentConfigurationVersion_U unique(agentConfigurationID,version); Table altered. SQL> SQL> SQL> SQL> ALTER TABLE AgentConfigurationVersion ADD CONSTRAINT AgentConfigurationVersion_fk1 FOREIGN KEY (agentConfigurationID) references AgentConfiguration(agentConfigurationID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE AgentConfigurationVersion ADD CONSTRAINT AgentConfigurationVersion_fk2 FOREIGN KEY (protocolFilterID) references EndpointProtocolFilter(protocolFilterID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE AgentConfigurationVersion ADD CONSTRAINT AgentConfigurationVersion_fk3 FOREIGN KEY (modifyUserID) references ProtectUser(userID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX AgentConfigurationVersion_fk1 ON AgentConfigurationVersion(agentConfigurationID); Index created. SQL> CREATE INDEX AgentConfigurationVersion_fk3 ON AgentConfigurationVersion(modifyUserID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- EndpointChannel SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'ENDPOINTCHANNEL') LOOP EXECUTE IMMEDIATE 'drop table EndpointChannel cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table EndpointChannel 2 ( 3 monitorChannelID integer not null, 4 informationMonitorID integer not null , 5 state integer not null, 6 aggregatorPort integer not null, 7 aggregatorHost varchar(255 CHAR), 8 agentConfigurationVersionID integer not null, 9 doNotApplyAgentConfiguration integer default 0 not null CHECK (doNotApplyAgentConfiguration in (0,1)), 10 replicatorCommLayerPort integer default 10443 not null, 11 replicatorCommLayerHost varchar(255 CHAR) default '0.0.0.0' not null, 12 keystoreFilename varchar(256 CHAR), 13 keystorePasswordID integer, 14 truststoreFilename varchar(256 CHAR), 15 truststorePasswordID integer 16 ) 17 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_ENDPOINTCHANNEL') LOOP EXECUTE IMMEDIATE 'drop sequence seq_EndpointChannel'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_EndpointChannel start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE EndpointChannel ADD CONSTRAINT EndpointChannel_pk PRIMARY KEY (monitorChannelID); Table altered. SQL> SQL> SQL> ALTER TABLE EndpointChannel ADD CONSTRAINT EndpointChannel_fk1 FOREIGN KEY (informationMonitorID) references InformationMonitor(informationMonitorID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE EndpointChannel ADD CONSTRAINT EndpointChannel_fk2 FOREIGN KEY (agentConfigurationVersionID) references AgentConfigurationVersion(agentConfigurationVersionID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE EndpointChannel ADD CONSTRAINT EndpointChannel_fk3 FOREIGN KEY (keystorePasswordID) references Password(passwordID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE EndpointChannel ADD CONSTRAINT EndpointChannel_fk4 FOREIGN KEY (truststorePasswordID) references Password(passwordID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX EndpointChannel_fk1 ON EndpointChannel(informationMonitorID); Index created. SQL> CREATE INDEX EndpointChannel_fk2 ON EndpointChannel(agentConfigurationVersionID); Index created. SQL> CREATE INDEX EndpointChannel_fk3 ON EndpointChannel(keystorePasswordID); Index created. SQL> CREATE INDEX EndpointChannel_fk4 ON EndpointChannel(truststorePasswordID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- ClassificationChannel SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'CLASSIFICATIONCHANNEL') LOOP EXECUTE IMMEDIATE 'drop table ClassificationChannel cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table ClassificationChannel 2 ( 3 monitorChannelID integer not null, 4 informationMonitorID integer not null , 5 state integer not null, 6 numSessions integer not null, 7 port integer not null check (port >= 0), 8 sessionTimeout integer default 30000 not null check (sessionTimeout >= 0) 9 ) 10 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_CLASSIFICATIONCHANNEL') LOOP EXECUTE IMMEDIATE 'drop sequence seq_ClassificationChannel'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_ClassificationChannel start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE ClassificationChannel ADD CONSTRAINT ClassificationChannel_pk PRIMARY KEY (monitorChannelID); Table altered. SQL> SQL> SQL> ALTER TABLE ClassificationChannel ADD CONSTRAINT ClassificationChannel_fk1 FOREIGN KEY (informationMonitorID) references InformationMonitor(informationMonitorID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX ClassificationChannel_fk1 ON ClassificationChannel(informationMonitorID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- RestInductionChannel SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'RESTINDUCTIONCHANNEL') LOOP EXECUTE IMMEDIATE 'drop table RestInductionChannel cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table RestInductionChannel 2 ( 3 monitorChannelID integer not null, 4 informationMonitorID integer not null , 5 state integer not null, 6 port integer default 8080 not null 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_RESTINDUCTIONCHANNEL') LOOP EXECUTE IMMEDIATE 'drop sequence seq_RestInductionChannel'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_RestInductionChannel start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE RestInductionChannel ADD CONSTRAINT RestInductionChannel_pk PRIMARY KEY (monitorChannelID); Table altered. SQL> SQL> SQL> ALTER TABLE RestInductionChannel ADD CONSTRAINT RestInductionChannel_fk1 FOREIGN KEY (informationMonitorID) references InformationMonitor(informationMonitorID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX RestInductionChannel_fk1 ON RestInductionChannel(informationMonitorID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- Course SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'COURSE') LOOP EXECUTE IMMEDIATE 'drop table Course cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table Course 2 ( 3 courseID integer not null, 4 filenamePatternFilter varchar(2048 CHAR), 5 filenamePatternExcludeFilter varchar(2048 CHAR), 6 minFileSizeFilter integer, 7 maxFileSizeFilter integer, 8 minFileModificationDateFilter timestamp, 9 maxFileModificationDateFilter timestamp, 10 minFileLastAccessedDateFilter timestamp, 11 maxFileLastAccessedDateFilter timestamp, 12 defaultUsername varchar(256 CHAR), 13 defaultPasswordID integer, 14 isDeleted integer not null, 15 isDifferential integer, 16 markNextScanFull integer, 17 defaultCredentialID integer 18 ) 19 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_COURSE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_Course'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_Course start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE Course ADD CONSTRAINT Course_pk PRIMARY KEY (courseID); Table altered. SQL> SQL> SQL> ALTER TABLE Course ADD CONSTRAINT Course_fk1 FOREIGN KEY (defaultPasswordID) references Password(passwordID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE Course ADD CONSTRAINT Course_fk2 FOREIGN KEY (defaultCredentialID) references Credential(credentialID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX Course_fk1 ON Course(defaultPasswordID); Index created. SQL> CREATE INDEX Course_fk2 ON Course(defaultCredentialID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- CourseAttribute SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'COURSEATTRIBUTE') LOOP EXECUTE IMMEDIATE 'drop table CourseAttribute cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table CourseAttribute 2 ( 3 courseAttributeID integer not null, 4 courseID integer not null, 5 name varchar(60 CHAR) not null, 6 value varchar(2048 CHAR) not null 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_COURSEATTRIBUTE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_CourseAttribute'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_CourseAttribute start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE CourseAttribute ADD CONSTRAINT CourseAttribute_pk PRIMARY KEY (courseAttributeID); Table altered. SQL> SQL> SQL> ALTER TABLE CourseAttribute ADD CONSTRAINT CourseAttribute_fk1 FOREIGN KEY (courseID) references Course(courseID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX CourseAttribute_fk1 ON CourseAttribute(courseID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- Walk SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'WALK') LOOP EXECUTE IMMEDIATE 'drop table Walk cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table Walk 2 ( 3 walkID numeric(38) not null, 4 courseID integer not null, 5 state integer not null , 6 startDate timestamp not null, 7 lastStateChangeDate timestamp, 8 currentRoot integer not null, 9 currentFile varchar(1024 CHAR), 10 numberRetrievedFiles numeric(38) not null, 11 fileThrottleLimit integer, 12 byteThrottleLimit integer, 13 isDeleted integer not null, 14 errorCount numeric(38) not null, 15 isDifferential integer, 16 bytesScanned numeric(38) not null, 17 itemsFiltered numeric(38) not null, 18 bytesFiltered numeric(38) not null, 19 elapsedTime numeric(38) not null, 20 progressItemIndex numeric(38) not null, 21 progressItemCount numeric(38) not null, 22 progressItemName varchar(256 CHAR), 23 version integer not null, 24 baseScanStartDate timestamp, 25 scanType integer default 0 not null CHECK (scanType in (0,1,3)), 26 incidentCount numeric(38) default 0 not null 27 ) 28 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_WALK') LOOP EXECUTE IMMEDIATE 'drop sequence seq_Walk'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_Walk start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE Walk ADD CONSTRAINT Walk_pk PRIMARY KEY (walkID); Table altered. SQL> SQL> SQL> ALTER TABLE Walk ADD CONSTRAINT Walk_fk1 FOREIGN KEY (courseID) references Course(courseID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX Walk_fk1 ON Walk(courseID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- WalkReport SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'WALKREPORT') LOOP EXECUTE IMMEDIATE 'drop table WalkReport cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table WalkReport 2 ( 3 walkReportID integer not null, 4 walkID numeric(38) not null, 5 type integer not null, 6 report clob, 7 lastModified timestamp not null 8 ) 9 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_WALKREPORT') LOOP EXECUTE IMMEDIATE 'drop sequence seq_WalkReport'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_WalkReport start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE WalkReport ADD CONSTRAINT WalkReport_pk PRIMARY KEY (walkReportID); Table altered. SQL> SQL> SQL> ALTER TABLE WalkReport ADD CONSTRAINT WalkReport_fk1 FOREIGN KEY (walkID) references Walk(walkID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX WalkReport_fk1 ON WalkReport(walkID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- AgentWalk SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'AGENTWALK') LOOP EXECUTE IMMEDIATE 'drop table AgentWalk cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table AgentWalk 2 ( 3 agentWalkID numeric(38) not null, 4 walkID numeric(38) not null, 5 agentName varchar(256 CHAR), 6 currentState integer, 7 itemsTotal numeric(38), 8 itemsScanned numeric(38), 9 itemsFiltered numeric(38), 10 itemsUnprocessable numeric(38), 11 bytesScanned numeric(38), 12 bytesFiltered numeric(38), 13 scanStartDate timestamp, 14 statusTime timestamp 15 ) 16 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_AGENTWALK') LOOP EXECUTE IMMEDIATE 'drop sequence seq_AgentWalk'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_AgentWalk start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE AgentWalk ADD CONSTRAINT AgentWalk_pk PRIMARY KEY (agentWalkID); Table altered. SQL> SQL> SQL> ALTER TABLE AgentWalk ADD CONSTRAINT AgentWalk_fk1 FOREIGN KEY (walkID) references Walk(walkID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX AgentWalk_fk1 ON AgentWalk(walkID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- ContentRootIncidentCount SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'CONTENTROOTINCIDENTCOUNT') LOOP EXECUTE IMMEDIATE 'drop table ContentRootIncidentCount cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table ContentRootIncidentCount 2 ( 3 walkID numeric(38) not null, 4 contentRootID integer not null, 5 incidentCount integer default 0 not null 6 ) 7 ; Table created. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- ContentRoot SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'CONTENTROOT') LOOP EXECUTE IMMEDIATE 'drop table ContentRoot cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table ContentRoot 2 ( 3 contentRootID integer not null, 4 courseID integer not null, 5 uri varchar(1024 CHAR) not null, 6 maxDepth integer, 7 username varchar(256 CHAR), 8 passwordID integer, 9 remediationUsername varchar(256 CHAR), 10 remediationPasswordID integer, 11 isDeleted integer not null, 12 credentialID integer, 13 remediationCredentialID integer, 14 contentRootDataID integer 15 ) 16 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_CONTENTROOT') LOOP EXECUTE IMMEDIATE 'drop sequence seq_ContentRoot'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_ContentRoot start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE ContentRoot ADD CONSTRAINT ContentRoot_pk PRIMARY KEY (contentRootID); Table altered. SQL> SQL> SQL> ALTER TABLE ContentRoot ADD CONSTRAINT ContentRoot_fk1 FOREIGN KEY (courseID) references Course(courseID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE ContentRoot ADD CONSTRAINT ContentRoot_fk2 FOREIGN KEY (passwordID) references Password(passwordID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE ContentRoot ADD CONSTRAINT ContentRoot_fk3 FOREIGN KEY (remediationPasswordID) references Password(passwordID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE ContentRoot ADD CONSTRAINT ContentRoot_fk4 FOREIGN KEY (credentialID) references Credential(credentialID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE ContentRoot ADD CONSTRAINT ContentRoot_fk5 FOREIGN KEY (remediationCredentialID) references Credential(credentialID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX ContentRoot_fk1 ON ContentRoot(courseID); Index created. SQL> CREATE INDEX ContentRoot_fk2 ON ContentRoot(passwordID); Index created. SQL> CREATE INDEX ContentRoot_fk3 ON ContentRoot(remediationPasswordID); Index created. SQL> CREATE INDEX ContentRoot_fk4 ON ContentRoot(credentialID); Index created. SQL> CREATE INDEX ContentRoot_fk5 ON ContentRoot(remediationCredentialID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- ExchangeContentRootData SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'EXCHANGECONTENTROOTDATA') LOOP EXECUTE IMMEDIATE 'drop table ExchangeContentRootData cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table ExchangeContentRootData 2 ( 3 contentRootDataID integer not null, 4 allUsers integer default 0 not null CHECK (allUsers in (0,1)), 5 userGroups integer default 0 not null CHECK (userGroups in (0,1)), 6 publicFolders integer default 1 not null CHECK (publicFolders IN (0,1)), 7 mailNicknames varchar(1024 CHAR), 8 archiveMailboxes integer default 0 not null CHECK (archiveMailboxes in (0,1)), 9 connectorType varchar(20 CHAR) default 'WebStoreConnector' not null CHECK (connectorType IN ('WebStoreConnector', 'WebServicesConnector')) 10 ) 11 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_EXCHANGECONTENTROOTDATA') LOOP EXECUTE IMMEDIATE 'drop sequence seq_ExchangeContentRootData'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_ExchangeContentRootData start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE ExchangeContentRootData ADD CONSTRAINT ExchangeContentRootData_pk PRIMARY KEY (contentRootDataID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- ContentRootAttribute SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'CONTENTROOTATTRIBUTE') LOOP EXECUTE IMMEDIATE 'drop table ContentRootAttribute cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table ContentRootAttribute 2 ( 3 contentRootAttributeID integer not null, 4 contentRootID integer not null, 5 name varchar(60 CHAR) not null, 6 value varchar(2048 CHAR) not null 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_CONTENTROOTATTRIBUTE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_ContentRootAttribute'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_ContentRootAttribute start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE ContentRootAttribute ADD CONSTRAINT ContentRootAttribute_pk PRIMARY KEY (contentRootAttributeID); Table altered. SQL> SQL> SQL> ALTER TABLE ContentRootAttribute ADD CONSTRAINT ContentRootAttribute_fk1 FOREIGN KEY (contentRootID) references ContentRoot(contentRootID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX ContentRootAttribute_fk1 ON ContentRootAttribute(contentRootID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- ContentRootAttributeItem SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'CONTENTROOTATTRIBUTEITEM') LOOP EXECUTE IMMEDIATE 'drop table ContentRootAttributeItem cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table ContentRootAttributeItem 2 ( 3 contentRootAttributeItemID integer not null, 4 contentRootAttributeID integer not null, 5 value varchar(1024 CHAR) not null 6 ) 7 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_CONTENTROOTATTRIBUTEITEM') LOOP EXECUTE IMMEDIATE 'drop sequence seq_ContentRootAttributeItem'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_ContentRootAttributeItem start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE ContentRootAttributeItem ADD CONSTRAINT ContentRootAttributeItem_pk PRIMARY KEY (contentRootAttributeItemID); Table altered. SQL> SQL> SQL> ALTER TABLE ContentRootAttributeItem ADD CONSTRAINT ContentRootAttributeItem_fk1 FOREIGN KEY (contentRootAttributeID) references ContentRootAttribute(contentRootAttributeID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX ContentRootAttributeItem_fk1 ON ContentRootAttributeItem(contentRootAttributeID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DirectoryConnection SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DIRECTORYCONNECTION') LOOP EXECUTE IMMEDIATE 'drop table DirectoryConnection cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DirectoryConnection 2 ( 3 directoryConnectionID integer not null, 4 version numeric(10) default 0 not null, 5 uuid varchar(36 CHAR) not null unique, 6 versionuuid varchar(36 CHAR) not null unique, 7 name varchar(255 CHAR) not null unique, 8 host varchar(255 CHAR) not null, 9 port integer not null, 10 useSSL integer not null CHECK (useSSL IN (0,1)), 11 baseDn varchar(2048 CHAR) not null, 12 username varchar(2048 CHAR) null, 13 passwordID integer null, 14 anonymousBind integer default 0 not null CHECK (anonymousBind IN (0,1)) 15 ) 16 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DIRECTORYCONNECTION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DirectoryConnection'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DirectoryConnection start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DirectoryConnection ADD CONSTRAINT DirectoryConnection_pk PRIMARY KEY (directoryConnectionID); Table altered. SQL> SQL> SQL> ALTER TABLE DirectoryConnection ADD CONSTRAINT DirectoryConnection_fk1 FOREIGN KEY (passwordID) references Password(passwordID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX DirectoryConnection_fk1 ON DirectoryConnection(passwordID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- ExchangeConnectionMapping - Intermediary SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'EXCHANGECONNECTIONMAPPING') LOOP EXECUTE IMMEDIATE 'drop table ExchangeConnectionMapping cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table ExchangeConnectionMapping 2 ( 3 contentRootDataID integer not null, 4 directoryConnectionID integer not null 5 ) 6 ; Table created. SQL> SQL> ALTER TABLE ExchangeConnectionMapping ADD CONSTRAINT ExchangeConnectionMapping_PK primary key (contentRootDataID, directoryConnectionID); Table altered. SQL> SQL> SQL> SQL> ALTER TABLE ExchangeConnectionMapping ADD CONSTRAINT ExchangeConnectionMapping_fk1 FOREIGN KEY (contentRootDataID) references ExchangeContentRootData(contentRootDataID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE ExchangeConnectionMapping ADD CONSTRAINT ExchangeConnectionMapping_fk2 FOREIGN KEY (directoryConnectionID) references DirectoryConnection(directoryConnectionID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX ExchangeConnectionMapping_fk1 ON ExchangeConnectionMapping(contentRootDataID); Index created. SQL> CREATE INDEX ExchangeConnectionMapping_fk2 ON ExchangeConnectionMapping(directoryConnectionID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- ExchangeGroupMapping - Intermediary SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'EXCHANGEGROUPMAPPING') LOOP EXECUTE IMMEDIATE 'drop table ExchangeGroupMapping cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table ExchangeGroupMapping 2 ( 3 contentRootDataID integer not null, 4 directoryGroupID integer not null 5 ) 6 ; Table created. SQL> SQL> ALTER TABLE ExchangeGroupMapping ADD CONSTRAINT ExchangeGroupMapping_PK primary key (contentRootDataID, directoryGroupID); Table altered. SQL> SQL> SQL> SQL> ALTER TABLE ExchangeGroupMapping ADD CONSTRAINT ExchangeGroupMapping_fk1 FOREIGN KEY (contentRootDataID) references ExchangeContentRootData(contentRootDataID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE ExchangeGroupMapping ADD CONSTRAINT ExchangeGroupMapping_fk2 FOREIGN KEY (directoryGroupID) references DirectoryGroup(directoryGroupID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX ExchangeGroupMapping_fk1 ON ExchangeGroupMapping(contentRootDataID); Index created. SQL> CREATE INDEX ExchangeGroupMapping_fk2 ON ExchangeGroupMapping(directoryGroupID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- OAuthTokenType SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'OAUTHTOKENTYPE') LOOP EXECUTE IMMEDIATE 'drop table OAuthTokenType cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table OAuthTokenType 2 ( 3 oauthTokenTypeID integer not null, 4 tokenType varchar(30 CHAR) not null 5 ) 6 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_OAUTHTOKENTYPE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_OAuthTokenType'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_OAuthTokenType start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE OAuthTokenType ADD CONSTRAINT OAuthTokenType_pk PRIMARY KEY (oauthTokenTypeID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- OAuthClientData SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'OAUTHCLIENTDATA') LOOP EXECUTE IMMEDIATE 'drop table OAuthClientData cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table OAuthClientData 2 ( 3 oauthClientDataID numeric(38) not null, 4 tokenTypeID integer not null, 5 clientIdentifierID integer not null, 6 clientSecretID integer not null 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_OAUTHCLIENTDATA') LOOP EXECUTE IMMEDIATE 'drop sequence seq_OAuthClientData'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_OAuthClientData start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE OAuthClientData ADD CONSTRAINT OAuthClientData_pk PRIMARY KEY (oauthClientDataID); Table altered. SQL> SQL> SQL> ALTER TABLE OAuthClientData ADD CONSTRAINT OAuthClientData_fk1 FOREIGN KEY (tokenTypeID) references OAuthTokenType(oAuthTokenTypeID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE OAuthClientData ADD CONSTRAINT OAuthClientData_fk2 FOREIGN KEY (clientIdentifierID) references Password(passwordID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE OAuthClientData ADD CONSTRAINT OAuthClientData_fk3 FOREIGN KEY (clientSecretID) references Password(passwordID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX OAuthClientData_fk1 ON OAuthClientData(tokenTypeID); Index created. SQL> CREATE INDEX OAuthClientData_fk2 ON OAuthClientData(clientIdentifierID); Index created. SQL> CREATE INDEX OAuthClientData_fk3 ON OAuthClientData(clientSecretID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- OAuthToken SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'OAUTHTOKEN') LOOP EXECUTE IMMEDIATE 'drop table OAuthToken cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table OAuthToken 2 ( 3 oauthTokenID numeric(38) not null, 4 oauthTokenTypeID integer not null, 5 accessTokenID integer, 6 refreshTokenID integer, 7 userName varchar(2048 CHAR), 8 userEmail varchar(2048 CHAR), 9 expiresIn varchar(2048 CHAR), 10 tokenType varchar(2048 CHAR), 11 invalid integer default 0 not null CHECK (invalid IN (0,1)), 12 lastRefreshDateTime timestamp not null 13 ) 14 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_OAUTHTOKEN') LOOP EXECUTE IMMEDIATE 'drop sequence seq_OAuthToken'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_OAuthToken start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE OAuthToken ADD CONSTRAINT OAuthToken_pk PRIMARY KEY (oauthTokenID); Table altered. SQL> SQL> SQL> ALTER TABLE OAuthToken ADD CONSTRAINT OAuthToken_fk1 FOREIGN KEY (oauthTokenTypeID) references OAuthTokenType(oAuthTokenTypeID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE OAuthToken ADD CONSTRAINT OAuthToken_fk2 FOREIGN KEY (accessTokenID) references Password(passwordID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE OAuthToken ADD CONSTRAINT OAuthToken_fk3 FOREIGN KEY (refreshTokenID) references Password(passwordID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX OAuthToken_fk1 ON OAuthToken(oauthTokenTypeID); Index created. SQL> CREATE INDEX OAuthToken_fk2 ON OAuthToken(accessTokenID); Index created. SQL> CREATE INDEX OAuthToken_fk3 ON OAuthToken(refreshTokenID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- ScanAssignment SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'SCANASSIGNMENT') LOOP EXECUTE IMMEDIATE 'drop table ScanAssignment cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table ScanAssignment 2 ( 3 scanAssignmentID integer not null, 4 name varchar(256 CHAR) not null, 5 courseID integer not null, 6 initialWalkID numeric(38), 7 currentWalkID numeric(38), 8 lastCompletedWalkID numeric(38), 9 fileThrottleLimit integer, 10 byteThrottleLimit integer, 11 courseFileName varchar(1024 CHAR), 12 state integer not null, 13 startTriggerName varchar(50 CHAR), 14 saveIncidentFileInDB integer, 15 allowFileRemediation integer, 16 remediationShareUri varchar(1024 CHAR), 17 remediationShareUsername varchar(256 CHAR), 18 remediationSharePasswordID integer, 19 remediationUsername varchar(256 CHAR), 20 remediationPasswordID integer, 21 isDeleted integer not null, 22 targetType integer not null, 23 includeEndpointDrives integer, 24 endpointDrives varchar(128 CHAR), 25 scannerPort integer, 26 incidentThreshold integer, 27 incidentThresholdItem varchar(20 CHAR) default 'ContentRoot' not null CHECK (incidentThresholdItem IN ('ContentRoot', 'Machine')), 28 remediationShareCredentialID integer, 29 remediationCredentialID integer, 30 openPstStore integer, 31 scanType integer default 0 not null CHECK (scanType in (0,1,2)), 32 maxScanDuration integer, 33 endpointScanIdleTimeout integer, 34 lastModifiedDate timestamp, 35 scanAdministrativeShares integer default 0 not null, 36 detectItemModRemediation integer default 0 not null, 37 detectPolicyModRemediation integer default 0 not null, 38 detectItemGoneRemediation integer default 1 not null, 39 oauthTokenID numeric(38) 40 ) 41 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_SCANASSIGNMENT') LOOP EXECUTE IMMEDIATE 'drop sequence seq_ScanAssignment'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_ScanAssignment start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE ScanAssignment ADD CONSTRAINT ScanAssignment_pk PRIMARY KEY (scanAssignmentID); Table altered. SQL> SQL> SQL> ALTER TABLE ScanAssignment ADD CONSTRAINT ScanAssignment_fk1 FOREIGN KEY (courseID) references Course(courseID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE ScanAssignment ADD CONSTRAINT ScanAssignment_fk2 FOREIGN KEY (initialWalkID) references Walk(walkID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE ScanAssignment ADD CONSTRAINT ScanAssignment_fk3 FOREIGN KEY (currentWalkID) references Walk(walkID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE ScanAssignment ADD CONSTRAINT ScanAssignment_fk4 FOREIGN KEY (lastCompletedWalkID) references Walk(walkID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE ScanAssignment ADD CONSTRAINT ScanAssignment_fk5 FOREIGN KEY (remediationSharePasswordID) references Password(passwordID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE ScanAssignment ADD CONSTRAINT ScanAssignment_fk6 FOREIGN KEY (remediationPasswordID) references Password(passwordID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE ScanAssignment ADD CONSTRAINT ScanAssignment_fk7 FOREIGN KEY (remediationShareCredentialID) references Credential(credentialID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE ScanAssignment ADD CONSTRAINT ScanAssignment_fk8 FOREIGN KEY (remediationCredentialID) references Credential(credentialID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE ScanAssignment ADD CONSTRAINT ScanAssignment_fk9 FOREIGN KEY (oauthTokenID) references OAuthToken(oauthTokenID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX ScanAssignment_fk1 ON ScanAssignment(courseID); Index created. SQL> CREATE INDEX ScanAssignment_fk2 ON ScanAssignment(initialWalkID); Index created. SQL> CREATE INDEX ScanAssignment_fk3 ON ScanAssignment(currentWalkID); Index created. SQL> CREATE INDEX ScanAssignment_fk4 ON ScanAssignment(lastCompletedWalkID); Index created. SQL> CREATE INDEX ScanAssignment_fk5 ON ScanAssignment(remediationSharePasswordID); Index created. SQL> CREATE INDEX ScanAssignment_fk6 ON ScanAssignment(remediationPasswordID); Index created. SQL> CREATE INDEX ScanAssignment_fk7 ON ScanAssignment(remediationShareCredentialID); Index created. SQL> CREATE INDEX ScanAssignment_fk8 ON ScanAssignment(remediationCredentialID); Index created. SQL> CREATE INDEX ScanAssignment_fk9 ON ScanAssignment(oauthTokenID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- TargetPolicyGroupMapping - Intermediary SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'TARGETPOLICYGROUPMAPPING') LOOP EXECUTE IMMEDIATE 'drop table TargetPolicyGroupMapping cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table TargetPolicyGroupMapping 2 ( 3 scanAssignmentID integer not null, 4 policyGroupID integer not null 5 ) 6 ; Table created. SQL> SQL> ALTER TABLE TargetPolicyGroupMapping ADD CONSTRAINT TargetPolicyGroupMapping_PK primary key (scanAssignmentID, policyGroupID); Table altered. SQL> SQL> SQL> SQL> ALTER TABLE TargetPolicyGroupMapping ADD CONSTRAINT TargetPolicyGroupMapping_fk1 FOREIGN KEY (scanAssignmentID) references ScanAssignment(ScanAssignmentID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE TargetPolicyGroupMapping ADD CONSTRAINT TargetPolicyGroupMapping_fk2 FOREIGN KEY (policyGroupID) references PolicyGroup(PolicyGroupID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX TargetPolicyGroupMapping_fk1 ON TargetPolicyGroupMapping(scanAssignmentID); Index created. SQL> CREATE INDEX TargetPolicyGroupMapping_fk2 ON TargetPolicyGroupMapping(policyGroupID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- ScanAssignmentServer - Intermediary SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'SCANASSIGNMENTSERVER') LOOP EXECUTE IMMEDIATE 'drop table ScanAssignmentServer cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table ScanAssignmentServer 2 ( 3 scanAssignmentID integer not null, 4 informationMonitorID integer not null 5 ) 6 ; Table created. SQL> SQL> ALTER TABLE ScanAssignmentServer ADD CONSTRAINT ScanAssignmentServer_PK primary key (scanAssignmentID, informationMonitorID); Table altered. SQL> SQL> SQL> SQL> ALTER TABLE ScanAssignmentServer ADD CONSTRAINT ScanAssignmentServer_fk1 FOREIGN KEY (scanAssignmentID) references ScanAssignment(scanAssignmentID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE ScanAssignmentServer ADD CONSTRAINT ScanAssignmentServer_fk2 FOREIGN KEY (informationMonitorID) references InformationMonitor(informationMonitorID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX ScanAssignmentServer_fk1 ON ScanAssignmentServer(scanAssignmentID); Index created. SQL> CREATE INDEX ScanAssignmentServer_fk2 ON ScanAssignmentServer(informationMonitorID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- ScanControlServer SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'SCANCONTROLSERVER') LOOP EXECUTE IMMEDIATE 'drop table ScanControlServer cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table ScanControlServer 2 ( 3 scanControlServerID integer not null, 4 scanAssignmentID integer not null, 5 informationMonitorID integer not null, 6 scanControlID varchar(50 CHAR) not null 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_SCANCONTROLSERVER') LOOP EXECUTE IMMEDIATE 'drop sequence seq_ScanControlServer'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_ScanControlServer start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE ScanControlServer ADD CONSTRAINT ScanControlServer_pk PRIMARY KEY (scanControlServerID); Table altered. SQL> SQL> SQL> ALTER TABLE ScanControlServer ADD CONSTRAINT ScanControlServer_fk1 FOREIGN KEY (scanAssignmentID) references ScanAssignment(ScanAssignmentID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE ScanControlServer ADD CONSTRAINT ScanControlServer_fk2 FOREIGN KEY (informationMonitorID) references InformationMonitor(informationMonitorID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX ScanControlServer_fk1 ON ScanControlServer(scanAssignmentID); Index created. SQL> CREATE INDEX ScanControlServer_fk2 ON ScanControlServer(informationMonitorID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- Protocol SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'PROTOCOL') LOOP EXECUTE IMMEDIATE 'drop table Protocol cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table Protocol 2 ( 3 protocolID integer not null, 4 name varchar(256 CHAR) not null unique, 5 type integer not null unique, 6 isDeleted integer not null , 7 isSystem integer not null, 8 protocolOrder integer not null, 9 ports varchar(256 CHAR), 10 signature varchar(256 CHAR), 11 isProtocolChained integer not null, 12 subprotocolIPs varchar(256 CHAR), 13 contentProcessing integer not null, 14 incidentRepresentation integer not null, 15 isTerminatedOnFIN integer not null, 16 isHidden integer not null , 17 isInternationalized integer default 0 not null CHECK (isInternationalized IN (0,1)), 18 isCustomSignatureBased integer default 0 not null CHECK (isCustomSignatureBased IN (0,1)), 19 uuid varchar(36 CHAR) unique not null, 20 version integer default 0 not null, 21 ndcProtocolId integer, 22 incidentSchemaID integer not null, 23 versionuuid varchar(36 CHAR) not null unique 24 ) 25 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_PROTOCOL') LOOP EXECUTE IMMEDIATE 'drop sequence seq_Protocol'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_Protocol start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE Protocol ADD CONSTRAINT Protocol_pk PRIMARY KEY (protocolID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DiscoverTargetType SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DISCOVERTARGETTYPE') LOOP EXECUTE IMMEDIATE 'drop table DiscoverTargetType cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DiscoverTargetType 2 ( 3 discoverTargetTypeID integer not null, 4 messageType integer not null unique 5 ) 6 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DISCOVERTARGETTYPE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DiscoverTargetType'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DiscoverTargetType start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DiscoverTargetType ADD CONSTRAINT DiscoverTargetType_pk PRIMARY KEY (discoverTargetTypeID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- EndpointDeviceType SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'ENDPOINTDEVICETYPE') LOOP EXECUTE IMMEDIATE 'drop table EndpointDeviceType cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table EndpointDeviceType 2 ( 3 endpointDeviceTypeID integer not null, 4 messageType integer not null unique, 5 label varchar(50 CHAR) not null, 6 isInternationalized integer default 0 not null CHECK (isInternationalized IN (0,1)) 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_ENDPOINTDEVICETYPE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_EndpointDeviceType'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_EndpointDeviceType start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE EndpointDeviceType ADD CONSTRAINT EndpointDeviceType_pk PRIMARY KEY (endpointDeviceTypeID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- Folder SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'FOLDER') LOOP EXECUTE IMMEDIATE 'drop table Folder cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table Folder 2 ( 3 folderID integer not null, 4 path varchar(512 CHAR) not null unique, 5 folderType integer not null CHECK (folderType IN (0,1)) 6 ) 7 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_FOLDER') LOOP EXECUTE IMMEDIATE 'drop sequence seq_Folder'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_Folder start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE Folder ADD CONSTRAINT Folder_pk PRIMARY KEY (folderID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- Message SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'MESSAGE') LOOP EXECUTE IMMEDIATE 'drop table Message cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table Message 2 ( 3 messageID numeric(38) not null, 4 messageOriginatorID integer, 5 messageSource varchar(15) not null CHECK (messageSource IN ('NETWORK', 'DISCOVER', 'ENDPOINT', 'CLASSIFICATION','MOBILE')), 6 monitorID integer, 7 monitorChannelType integer not null CHECK (monitorChannelType >= 1 AND monitorChannelType <=8), 8 messageDate timestamp not null, 9 messageSubject varchar(255 CHAR), 10 fileCreateDate timestamp, 11 fileAccessDate timestamp, 12 fileCreatedBy varchar(255 CHAR), 13 fileModifiedBy varchar(255 CHAR), 14 fileOwner varchar(255 CHAR), 15 discoverContentRootID integer, 16 discoverContentRootPath varchar(512 CHAR), 17 discoverFolderID integer, 18 discoverScanAssignmentID integer, 19 discoverWalkID numeric(38), 20 discoverURL varchar(512 CHAR), 21 discoverRemediationAction varchar(2048 CHAR), 22 discoverName varchar(255 CHAR), 23 discoverExtractionDate timestamp, 24 discoverServer varchar(255 CHAR), 25 discoverRepositoryLocation varchar(512 CHAR), 26 endpointVolumeName varchar(255 CHAR), 27 endpointDosVolumeName varchar(2 CHAR), 28 endpointSourceApplicationName varchar(255 CHAR), 29 endpointApplicationName varchar(255 CHAR), 30 endpointApplicationPath varchar(255 CHAR), 31 endpointFileName varchar(255 CHAR), 32 endpointFilePath varchar(512 CHAR), 33 endpointConnectionStatus varchar(50) CHECK (endpointConnectionStatus IN ('CONNECTED', 'DISCONNECTED')), 34 endpointPrintJobTitle varchar(255 CHAR), 35 endpointSourceAppWindowTitle varchar(255 CHAR), 36 endpointAppWindowTitle varchar(255 CHAR), 37 endpointPrinterName varchar(255 CHAR), 38 endpointPrinterType varchar(255 CHAR), 39 hasAttachment varchar(1 BYTE) default 'N' not null CHECK(hasAttachment IN ('Y', 'N')), 40 quarantineStatus integer CHECK (quarantineStatus IN (1,2,3,4,5,6)), 41 endpointSourceFileName varchar(255 CHAR), 42 endpointSourceFilePath varchar(255 CHAR), 43 endpointDeviceInstanceID varchar(1000 CHAR), 44 channelSubtype integer CHECK(channelSubType IN (1002,1003,2002)) 45 ) 46 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_MESSAGE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_Message'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_Message start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE Message ADD CONSTRAINT Message_pk PRIMARY KEY (messageID); Table altered. SQL> SQL> SQL> ALTER TABLE Message ADD CONSTRAINT Message_fk1 FOREIGN KEY (messageOriginatorID) references MessageOriginator(messageOriginatorID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE Message ADD CONSTRAINT Message_fk2 FOREIGN KEY (discoverContentRootID) references ContentRoot(contentRootID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE Message ADD CONSTRAINT Message_fk3 FOREIGN KEY (discoverFolderID) references Folder(folderID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE Message ADD CONSTRAINT Message_fk4 FOREIGN KEY (discoverScanAssignmentID) references ScanAssignment(scanAssignmentID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE Message ADD CONSTRAINT Message_fk5 FOREIGN KEY (discoverWalkID) references Walk(walkID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX Message_fk1 ON Message(messageOriginatorID); Index created. SQL> CREATE INDEX Message_fk2 ON Message(discoverContentRootID); Index created. SQL> CREATE INDEX Message_fk3 ON Message(discoverFolderID); Index created. SQL> CREATE INDEX Message_fk4 ON Message(discoverScanAssignmentID); Index created. SQL> CREATE INDEX Message_fk5 ON Message(discoverWalkID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- MessageItemMetadata SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'MESSAGEITEMMETADATA') LOOP EXECUTE IMMEDIATE 'drop table MessageItemMetadata cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table MessageItemMetadata 2 ( 3 messageItemMetadataID numeric(38) not null, 4 messageID numeric(38) not null unique, 5 itemId varchar(255 CHAR) null, 6 hasLink numeric(10) default 0 not null CHECK(hasLink IN (0, 1)), 7 passwordProtectedLink numeric(10) default 0 not null CHECK(passwordProtectedLink IN (0, 1)), 8 linkExpirationDate timestamp null, 9 downloadAllowedLink numeric(10) default 0 not null CHECK(downloadAllowedLink IN (0, 1)) 10 ) 11 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_MESSAGEITEMMETADATA') LOOP EXECUTE IMMEDIATE 'drop sequence seq_MessageItemMetadata'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_MessageItemMetadata start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE MessageItemMetadata ADD CONSTRAINT MessageItemMetadata_pk PRIMARY KEY (messageItemMetadataID); Table altered. SQL> SQL> SQL> ALTER TABLE MessageItemMetadata ADD CONSTRAINT MessageItemMetadata_fk1 FOREIGN KEY (messageID) references Message(messageID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- MessageExt SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'MESSAGEEXT') LOOP EXECUTE IMMEDIATE 'drop table MessageExt cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table MessageExt 2 ( 3 messageExtID numeric(38) not null, 4 messageID numeric(38) not null unique, 5 eventContentID varchar(36 CHAR) null, 6 messageProcessingState numeric(10) default 0 not null CHECK(messageProcessingState IN (0, 1, 2)), 7 isDetectedOnEndpoint integer null, 8 contentSequenceId integer null, 9 isBlobExternalized numeric(10) default 0 not null CHECK(isBlobExternalized IN (0, 1)) 10 ) 11 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_MESSAGEEXT') LOOP EXECUTE IMMEDIATE 'drop sequence seq_MessageExt'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_MessageExt start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE MessageExt ADD CONSTRAINT MessageExt_pk PRIMARY KEY (messageExtID); Table altered. SQL> SQL> SQL> ALTER TABLE MessageExt ADD CONSTRAINT MessageExt_fk1 FOREIGN KEY (messageID) references Message(messageID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- MessageLob SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'MESSAGELOB') LOOP EXECUTE IMMEDIATE 'drop table MessageLob cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table MessageLob 2 ( 3 messageLobID integer not null, 4 messageID numeric(38) not null unique, 5 networkOriginalMessage blob, 6 keyAlias varchar(50 CHAR) 7 ) 8 LOB (networkOriginalMessage) STORE AS (TABLESPACE lob_tablespace ENABLE STORAGE IN ROW) 9 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_MESSAGELOB') LOOP EXECUTE IMMEDIATE 'drop sequence seq_MessageLob'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_MessageLob start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE MessageLob ADD CONSTRAINT MessageLob_pk PRIMARY KEY (messageLobID); Table altered. SQL> SQL> SQL> ALTER TABLE MessageLob ADD CONSTRAINT MessageLob_fk1 FOREIGN KEY (messageID) references Message(messageID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- MessageAclEntry SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'MESSAGEACLENTRY') LOOP EXECUTE IMMEDIATE 'drop table MessageAclEntry cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table MessageAclEntry 2 ( 3 messageAclEntryID numeric(38) not null, 4 messageID numeric(38) not null, 5 principal varchar(255 CHAR), 6 aclType varchar(5) not null CHECK (aclType IN ('FILE', 'SHARE', 'SP', 'BOX')), 7 grantDeny varchar(5) not null CHECK (grantDeny IN ('GRANT', 'DENY')), 8 permission varchar(100 CHAR) not null 9 ) 10 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_MESSAGEACLENTRY') LOOP EXECUTE IMMEDIATE 'drop sequence seq_MessageAclEntry'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_MessageAclEntry start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE MessageAclEntry ADD CONSTRAINT MessageAclEntry_pk PRIMARY KEY (messageAclEntryID); Table altered. SQL> SQL> SQL> ALTER TABLE MessageAclEntry ADD CONSTRAINT MessageAclEntry_fk1 FOREIGN KEY (messageID) references Message(messageID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX MessageAclEntry_fk1 ON MessageAclEntry(messageID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- MessageComponent SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'MESSAGECOMPONENT') LOOP EXECUTE IMMEDIATE 'drop table MessageComponent cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table MessageComponent 2 ( 3 messageComponentID numeric(38) not null, 4 messageID numeric(38) not null, 5 name varchar(255 CHAR), 6 MIMEType varchar(60 CHAR), 7 componentType integer not null CHECK (componentType IN (1,2,3,4,5,6,7)), 8 originalSize integer, 9 wasCracked integer not null, 10 documentFormat varchar(20 CHAR) 11 ) 12 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_MESSAGECOMPONENT') LOOP EXECUTE IMMEDIATE 'drop sequence seq_MessageComponent'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_MessageComponent start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE MessageComponent ADD CONSTRAINT MessageComponent_pk PRIMARY KEY (messageComponentID); Table altered. SQL> SQL> SQL> ALTER TABLE MessageComponent ADD CONSTRAINT MessageComponent_fk1 FOREIGN KEY (messageID) references Message(messageID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX MessageComponent_fk1 ON MessageComponent(messageID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- MessageComponentLob SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'MESSAGECOMPONENTLOB') LOOP EXECUTE IMMEDIATE 'drop table MessageComponentLob cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table MessageComponentLob 2 ( 3 messageComponentLobID numeric(38) not null, 4 messageComponentID numeric(38) not null unique, 5 uncrackedComponent blob, 6 crackedComponent blob, 7 crackedEncoding varchar(20 CHAR), 8 keyAlias varchar(50 CHAR) 9 ) 10 LOB (uncrackedComponent) STORE AS (TABLESPACE lob_tablespace ENABLE STORAGE IN ROW) 11 LOB (crackedComponent) STORE AS (TABLESPACE lob_tablespace ENABLE STORAGE IN ROW) 12 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_MESSAGECOMPONENTLOB') LOOP EXECUTE IMMEDIATE 'drop sequence seq_MessageComponentLob'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_MessageComponentLob start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE MessageComponentLob ADD CONSTRAINT MessageComponentLob_pk PRIMARY KEY (messageComponentLobID); Table altered. SQL> SQL> SQL> ALTER TABLE MessageComponentLob ADD CONSTRAINT MessageComponentLob_fk1 FOREIGN KEY (messageComponentID) references MessageComponent(messageComponentID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- MessageComponentExt SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'MESSAGECOMPONENTEXT') LOOP EXECUTE IMMEDIATE 'drop table MessageComponentExt cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table MessageComponentExt 2 ( 3 messageComponentExtID numeric(38) not null, 4 messageComponentID numeric(38) not null unique, 5 componentMetaInfo varchar(1500 CHAR) 6 ) 7 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_MESSAGECOMPONENTEXT') LOOP EXECUTE IMMEDIATE 'drop sequence seq_MessageComponentExt'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_MessageComponentExt start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE MessageComponentExt ADD CONSTRAINT MessageComponentExt_pk PRIMARY KEY (messageComponentExtID); Table altered. SQL> SQL> SQL> ALTER TABLE MessageComponentExt ADD CONSTRAINT MessageComponentExt_fk1 FOREIGN KEY (messageComponentID) references MessageComponent(messageComponentID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- MessageRecipient SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'MESSAGERECIPIENT') LOOP EXECUTE IMMEDIATE 'drop table MessageRecipient cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table MessageRecipient 2 ( 3 messageRecipientID integer not null, 4 IPAddress varchar(60 CHAR), 5 port integer, 6 recipientIdentifier varchar(1024 CHAR), 7 URL varchar(512 CHAR), 8 domain varchar(512 CHAR), 9 messageID numeric(38) not null, 10 recipientType integer not null CHECK (recipientType IN (1,2,3)) 11 ) 12 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_MESSAGERECIPIENT') LOOP EXECUTE IMMEDIATE 'drop sequence seq_MessageRecipient'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_MessageRecipient start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE MessageRecipient ADD CONSTRAINT MessageRecipient_pk PRIMARY KEY (messageRecipientID); Table altered. SQL> SQL> SQL> ALTER TABLE MessageRecipient ADD CONSTRAINT MessageRecipient_fk1 FOREIGN KEY (messageID) references Message(messageID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX MessageRecipient_fk1 ON MessageRecipient(messageID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- IncidentStatusGroup SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'INCIDENTSTATUSGROUP') LOOP EXECUTE IMMEDIATE 'drop table IncidentStatusGroup cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table IncidentStatusGroup 2 ( 3 incidentStatusGroupID integer not null, 4 name varchar(1024 CHAR) not null, 5 menuOrder integer not null 6 ) 7 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_INCIDENTSTATUSGROUP') LOOP EXECUTE IMMEDIATE 'drop sequence seq_IncidentStatusGroup'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_IncidentStatusGroup start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE IncidentStatusGroup ADD CONSTRAINT IncidentStatusGroup_pk PRIMARY KEY (incidentStatusGroupID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- IncidentStatus SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'INCIDENTSTATUS') LOOP EXECUTE IMMEDIATE 'drop table IncidentStatus cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table IncidentStatus 2 ( 3 incidentStatusID integer not null, 4 name varchar(100 CHAR) not null, 5 menuOrder integer not null, 6 isDefault integer not null, 7 isDeleted integer not null, 8 isInternationalized integer default 0 not null CHECK (isInternationalized IN (0,1)) 9 ) 10 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_INCIDENTSTATUS') LOOP EXECUTE IMMEDIATE 'drop sequence seq_IncidentStatus'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_IncidentStatus start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE IncidentStatus ADD CONSTRAINT IncidentStatus_pk PRIMARY KEY (incidentStatusID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- IncidentStatusGroupStatus - Intermediary SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'INCIDENTSTATUSGROUPSTATUS') LOOP EXECUTE IMMEDIATE 'drop table IncidentStatusGroupStatus cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table IncidentStatusGroupStatus 2 ( 3 incidentStatusGroupID integer not null, 4 incidentStatusID integer not null 5 ) 6 ; Table created. SQL> SQL> ALTER TABLE IncidentStatusGroupStatus ADD CONSTRAINT IncidentStatusGroupStatus_PK primary key(incidentStatusGroupID, incidentStatusID); Table altered. SQL> SQL> SQL> SQL> ALTER TABLE IncidentStatusGroupStatus ADD CONSTRAINT IncidentStatusGroupStatus_fk1 FOREIGN KEY (incidentStatusGroupID) references IncidentStatusGroup(incidentStatusGroupID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE IncidentStatusGroupStatus ADD CONSTRAINT IncidentStatusGroupStatus_fk2 FOREIGN KEY (incidentStatusID) references IncidentStatus(incidentStatusID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX IncidentStatusGroupStatus_fk1 ON IncidentStatusGroupStatus(incidentStatusGroupID); Index created. SQL> CREATE INDEX IncidentStatusGroupStatus_fk2 ON IncidentStatusGroupStatus(incidentStatusID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DiscoverItem SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DISCOVERITEM') LOOP EXECUTE IMMEDIATE 'drop table DiscoverItem cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DiscoverItem 2 ( 3 discoverItemID integer not null, 4 discoverURL varchar(512 CHAR) not null, 5 policyID integer not null, 6 scanAssignmentID integer not null, 7 firstDetectionDate timestamp not null, 8 lastDetectionDate timestamp not null 9 ) 10 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DISCOVERITEM') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DiscoverItem'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DiscoverItem start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DiscoverItem ADD CONSTRAINT DiscoverItem_pk PRIMARY KEY (discoverItemID); Table altered. SQL> SQL> SQL> ALTER TABLE DiscoverItem ADD CONSTRAINT DiscoverItem_fk1 FOREIGN KEY (policyID) references Policy(policyID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE DiscoverItem ADD CONSTRAINT DiscoverItem_fk2 FOREIGN KEY (scanAssignmentID) references ScanAssignment(scanAssignmentID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX DiscoverItem_fk1 ON DiscoverItem(policyID); Index created. SQL> CREATE INDEX DiscoverItem_fk2 ON DiscoverItem(scanAssignmentID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DataOwner SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DATAOWNER') LOOP EXECUTE IMMEDIATE 'drop table DataOwner cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DataOwner 2 ( 3 dataOwnerID integer not null, 4 name varchar(256 CHAR) unique 5 ) 6 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DATAOWNER') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DataOwner'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DataOwner start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DataOwner ADD CONSTRAINT DataOwner_pk PRIMARY KEY (dataOwnerID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DataOwnerEmail SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DATAOWNEREMAIL') LOOP EXECUTE IMMEDIATE 'drop table DataOwnerEmail cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DataOwnerEmail 2 ( 3 dataOwnerEmailID integer not null, 4 email varchar(256 CHAR) unique 5 ) 6 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DATAOWNEREMAIL') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DataOwnerEmail'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DataOwnerEmail start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DataOwnerEmail ADD CONSTRAINT DataOwnerEmail_pk PRIMARY KEY (dataOwnerEmailID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- Incident SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'INCIDENT') LOOP EXECUTE IMMEDIATE 'drop table Incident cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table Incident 2 ( 3 incidentID numeric(38) not null, 4 messageID numeric(38) not null, 5 policyID integer not null, 6 policyVersion integer not null, 7 incidentStatusID integer, 8 violationCount integer not null, 9 detectionDate timestamp not null, 10 policyGroupID integer, 11 customAttributesRecordID numeric(38), 12 isDeleted integer not null, 13 blockedStatus integer not null CHECK ((blockedStatus >=0 AND blockedStatus <= 6) OR (blockedStatus >=8 AND blockedStatus <= 27)), 14 incidentSeverityID integer not null CHECK (incidentSeverityID IN (1, 2, 3, 4)), 15 messageType integer not null CHECK ((messageType >=1 AND messageType <=44) OR messageType >=1000), 16 discoverItemID integer, 17 discoverMillisSinceFirstSeen numeric(38), 18 creationDate timestamp, 19 dataOwnerID integer, 20 dataOwnerEmailID integer, 21 isBlockedStatusSuperseded integer default 0 not null CHECK (isBlockedStatusSuperseded IN (0,1)), 22 shouldHideFromReports numeric(10) default 0 not null CHECK (shouldHideFromReports IN (0,1)), 23 shouldOverrideHideFromReports numeric(10) default 0 not null CHECK (shouldOverrideHideFromReports IN (0,1)), 24 messageSource varchar(15) not null CHECK (messageSource IN ('NETWORK', 'DISCOVER', 'ENDPOINT', 'CLASSIFICATION','MOBILE')), 25 messageDate timestamp not null, 26 discoverViolationID numeric(38) 27 ) 28 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_INCIDENT') LOOP EXECUTE IMMEDIATE 'drop sequence seq_Incident'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_Incident; Sequence created. SQL> SQL> ALTER TABLE Incident ADD CONSTRAINT Incident_pk PRIMARY KEY (incidentID); Table altered. SQL> SQL> SQL> ALTER TABLE Incident ADD CONSTRAINT Incident_fk1 FOREIGN KEY (policyID) references Policy(policyID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE Incident ADD CONSTRAINT Incident_fk2 FOREIGN KEY (incidentStatusID) references IncidentStatus(incidentStatusID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE Incident ADD CONSTRAINT Incident_fk3 FOREIGN KEY (policyGroupID) references PolicyGroup(policyGroupID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE Incident ADD CONSTRAINT Incident_fk4 FOREIGN KEY (customAttributesRecordID) references CustomAttributesRecord(customAttributesRecordID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE Incident ADD CONSTRAINT Incident_fk5 FOREIGN KEY (discoverItemID) references DiscoverItem(discoverItemID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE Incident ADD CONSTRAINT Incident_fk6 FOREIGN KEY (dataOwnerID) references DataOwner(dataOwnerID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE Incident ADD CONSTRAINT Incident_fk7 FOREIGN KEY (dataOwnerEmailID) references DataOwnerEmail(dataOwnerEmailID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX Incident_fk1 ON Incident(policyID); Index created. SQL> CREATE INDEX Incident_fk2 ON Incident(incidentStatusID); Index created. SQL> CREATE INDEX Incident_fk3 ON Incident(policyGroupID); Index created. SQL> CREATE INDEX Incident_fk4 ON Incident(customAttributesRecordID); Index created. SQL> CREATE INDEX Incident_fk5 ON Incident(discoverItemID); Index created. SQL> CREATE INDEX Incident_fk6 ON Incident(dataOwnerID); Index created. SQL> CREATE INDEX Incident_fk7 ON Incident(dataOwnerEmailID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- ConditionViolation SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'CONDITIONVIOLATION') LOOP EXECUTE IMMEDIATE 'drop table ConditionViolation cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table ConditionViolation 2 ( 3 conditionViolationID numeric(38) not null, 4 conditionID integer not null, 5 conditionViolationType integer default 0 not null CHECK(conditionViolationType IN(0,1)), 6 violationCount integer not null, 7 messageComponentID numeric(38) not null, 8 incidentID numeric(38) not null, 9 confidence double precision 10 ) 11 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_CONDITIONVIOLATION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_ConditionViolation'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_ConditionViolation start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE ConditionViolation ADD CONSTRAINT ConditionViolation_pk PRIMARY KEY (conditionViolationID); Table altered. SQL> SQL> SQL> ALTER TABLE ConditionViolation ADD CONSTRAINT ConditionViolation_fk1 FOREIGN KEY (messageComponentID) references MessageComponent(messageComponentID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE ConditionViolation ADD CONSTRAINT ConditionViolation_fk2 FOREIGN KEY (incidentID) references Incident(IncidentID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX ConditionViolation_fk1 ON ConditionViolation(messageComponentID); Index created. SQL> CREATE INDEX ConditionViolation_fk2 ON ConditionViolation(incidentID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- ConditionViolationLob SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'CONDITIONVIOLATIONLOB') LOOP EXECUTE IMMEDIATE 'drop table ConditionViolationLob cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table ConditionViolationLob 2 ( 3 conditionViolationLobID numeric(38) not null, 4 conditionViolationID numeric(38) not null, 5 crackedComponentMarkers clob 6 ) 7 LOB (crackedComponentMarkers) STORE AS (TABLESPACE lob_tablespace ENABLE STORAGE IN ROW) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_CONDITIONVIOLATIONLOB') LOOP EXECUTE IMMEDIATE 'drop sequence seq_ConditionViolationLob'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_ConditionViolationLob start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE ConditionViolationLob ADD CONSTRAINT ConditionViolationLob_pk PRIMARY KEY (conditionViolationLobID); Table altered. SQL> SQL> SQL> ALTER TABLE ConditionViolationLob ADD CONSTRAINT ConditionViolationLob_fk1 FOREIGN KEY (conditionViolationID) references ConditionViolation(conditionViolationId) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX ConditionViolationLob_fk1 ON ConditionViolationLob(conditionViolationID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- IncidentAction SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'INCIDENTACTION') LOOP EXECUTE IMMEDIATE 'drop table IncidentAction cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table IncidentAction 2 ( 3 incidentActionID numeric(38) not null, 4 incidentID numeric(38) not null, 5 actionType integer, 6 actionDate timestamp not null, 7 actionUserID integer, 8 actionDetail varchar(1024 CHAR), 9 isInternationalized integer default 0 not null CHECK (isInternationalized IN (0,1)) 10 ) 11 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_INCIDENTACTION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_IncidentAction'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_IncidentAction start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE IncidentAction ADD CONSTRAINT IncidentAction_pk PRIMARY KEY (incidentActionID); Table altered. SQL> SQL> SQL> ALTER TABLE IncidentAction ADD CONSTRAINT IncidentAction_fk1 FOREIGN KEY (actionUserID) references ProtectUser(userID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX IncidentAction_fk1 ON IncidentAction(actionUserID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- IncidentActionParameter SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'INCIDENTACTIONPARAMETER') LOOP EXECUTE IMMEDIATE 'drop table IncidentActionParameter cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table IncidentActionParameter 2 ( 3 incidentActionParameterID integer not null, 4 incidentActionID numeric(38) not null, 5 paramIndex integer not null, 6 isInternationalized integer default 0 not null CHECK (isInternationalized IN (0,1)), 7 parameter varchar(4000 BYTE) 8 ) 9 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_INCIDENTACTIONPARAMETER') LOOP EXECUTE IMMEDIATE 'drop sequence seq_IncidentActionParameter'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_IncidentActionParameter start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE IncidentActionParameter ADD CONSTRAINT IncidentActionParameter_pk PRIMARY KEY (incidentActionParameterID); Table altered. SQL> SQL> SQL> ALTER TABLE IncidentActionParameter ADD CONSTRAINT IncidentActionParameter_fk1 FOREIGN KEY (incidentActionID) references IncidentAction(incidentActionID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX IncidentActionParameter_fk1 ON IncidentActionParameter(incidentActionID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DirectoryConnectionSource SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DIRECTORYCONNECTIONSOURCE') LOOP EXECUTE IMMEDIATE 'drop table DirectoryConnectionSource cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DirectoryConnectionSource 2 ( 3 infoSourceID integer not null, 4 type integer not null, 5 name varchar(256 CHAR) not null, 6 version integer not null, 7 isDeleted integer not null, 8 importPath varchar(1024 CHAR) not null, 9 fileName varchar(256 CHAR) not null, 10 uuid varchar(36 CHAR) not null unique, 11 versionuuid varchar(36 CHAR) not null unique, 12 directoryConnectionID integer not null unique, 13 requiresReindexing integer not null CHECK (requiresReindexing in (0,1)) 14 ) 15 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DIRECTORYCONNECTIONSOURCE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DirectoryConnectionSource'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DirectoryConnectionSource start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DirectoryConnectionSource ADD CONSTRAINT DirectoryConnectionSource_pk PRIMARY KEY (infoSourceID); Table altered. SQL> SQL> SQL> ALTER TABLE DirectoryConnectionSource ADD CONSTRAINT DirectoryConnectionSource_fk1 FOREIGN KEY (directoryConnectionID) references DirectoryConnection(directoryConnectionID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DirectoryGroupIndexSource - Intermediary SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DIRECTORYGROUPINDEXSOURCE') LOOP EXECUTE IMMEDIATE 'drop table DirectoryGroupIndexSource cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DirectoryGroupIndexSource 2 ( 3 directoryGroupConditionID integer not null, 4 directoryConnectionSourceID integer not null 5 ) 6 ; Table created. SQL> SQL> ALTER TABLE DirectoryGroupIndexSource ADD CONSTRAINT DirectoryGroupIndexSource_PK primary key(directoryGroupConditionID, directoryConnectionSourceID); Table altered. SQL> SQL> SQL> SQL> ALTER TABLE DirectoryGroupIndexSource ADD CONSTRAINT DirectoryGroupIndexSource_fk1 FOREIGN KEY (directoryGroupConditionID) references DirectoryGroupCondition(conditionID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE DirectoryGroupIndexSource ADD CONSTRAINT DirectoryGroupIndexSource_fk2 FOREIGN KEY (directoryConnectionSourceID) references DirectoryConnectionSource(infoSourceID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX DirectoryGroupIndexSource_fk1 ON DirectoryGroupIndexSource(directoryGroupConditionID); Index created. SQL> CREATE INDEX DirectoryGroupIndexSource_fk2 ON DirectoryGroupIndexSource(directoryConnectionSourceID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DataSource SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DATASOURCE') LOOP EXECUTE IMMEDIATE 'drop table DataSource cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DataSource 2 ( 3 infoSourceID integer not null, 4 type integer not null, 5 name varchar(256 CHAR) not null, 6 version integer not null, 7 isDeleted integer not null, 8 importPath varchar(1024 CHAR) not null, 9 fileName varchar(256 CHAR) not null, 10 uuid varchar(36 CHAR) not null unique, 11 versionuuid varchar(36 CHAR) not null unique, 12 isFirstRowColumnHeadings integer not null, 13 columnSeparator varchar(5 CHAR) not null, 14 errorThreshold integer not null, 15 characterEncoding varchar(30 CHAR) not null, 16 fileFormat varchar(10) not null CHECK (fileFormat IN ('PDX', 'TEXT')), 17 requiresReindexing integer not null CHECK (requiresReindexing in (0,1)) 18 ) 19 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DATASOURCE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DataSource'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DataSource start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DataSource ADD CONSTRAINT DataSource_pk PRIMARY KEY (infoSourceID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DocSource SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DOCSOURCE') LOOP EXECUTE IMMEDIATE 'drop table DocSource cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DocSource 2 ( 3 infoSourceID integer not null, 4 type integer not null, 5 name varchar(256 CHAR) not null, 6 version integer not null, 7 isDeleted integer not null, 8 importPath varchar(1024 CHAR) not null, 9 fileName varchar(256 CHAR) not null, 10 uuid varchar(36 CHAR) not null unique, 11 versionuuid varchar(36 CHAR) not null unique, 12 courseID integer, 13 sha1ForCurrentIndexVersion varchar(256 CHAR) 14 ) 15 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DOCSOURCE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DocSource'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DocSource start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DocSource ADD CONSTRAINT DocSource_pk PRIMARY KEY (infoSourceID); Table altered. SQL> SQL> SQL> ALTER TABLE DocSource ADD CONSTRAINT DocSource_fk1 FOREIGN KEY (courseID) references Course(courseID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX DocSource_fk1 ON DocSource(courseID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DocSourceDoc SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DOCSOURCEDOC') LOOP EXECUTE IMMEDIATE 'drop table DocSourceDoc cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DocSourceDoc 2 ( 3 docSourceDocID integer not null, 4 infoSourceID integer not null, 5 name varchar(1024 CHAR) not null, 6 fileSize integer not null, 7 fileType varchar(256 CHAR) not null, 8 lastModified timestamp not null, 9 isCrackable integer not null, 10 normalizedSize integer, 11 activeInDetection integer not null 12 ) 13 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DOCSOURCEDOC') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DocSourceDoc'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DocSourceDoc start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DocSourceDoc ADD CONSTRAINT DocSourceDoc_pk PRIMARY KEY (docSourceDocID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DataSourceColumn SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DATASOURCECOLUMN') LOOP EXECUTE IMMEDIATE 'drop table DataSourceColumn cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DataSourceColumn 2 ( 3 dataSourceColumnID integer not null, 4 dataSourceID integer, 5 dataDumpColumnName varchar(64 CHAR), 6 name varchar(64 CHAR), 7 mappingType integer not null, 8 columnNumber integer not null, 9 patternType integer not null 10 ) 11 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DATASOURCECOLUMN') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DataSourceColumn'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DataSourceColumn start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DataSourceColumn ADD CONSTRAINT DataSourceColumn_pk PRIMARY KEY (dataSourceColumnID); Table altered. SQL> SQL> SQL> ALTER TABLE DataSourceColumn ADD CONSTRAINT DataSourceColumn_fk1 FOREIGN KEY (dataSourceID) references DataSource(infoSourceID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX DataSourceColumn_fk1 ON DataSourceColumn(dataSourceID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- IndexedInfoSource SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'INDEXEDINFOSOURCE') LOOP EXECUTE IMMEDIATE 'drop table IndexedInfoSource cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table IndexedInfoSource 2 ( 3 indexedInfoSourceID integer not null, 4 infoSourceID integer not null , 5 version integer not null, 6 infoSourceVersion integer not null, 7 isActive integer not null, 8 keyAlias varchar(50 CHAR), 9 fileSize integer not null, 10 numberOfSubIndexes integer, 11 numOfDocuments integer, 12 triggerName varchar(50 CHAR) not null 13 ) 14 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_INDEXEDINFOSOURCE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_IndexedInfoSource'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_IndexedInfoSource start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE IndexedInfoSource ADD CONSTRAINT IndexedInfoSource_pk PRIMARY KEY (indexedInfoSourceID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- IndexedInfoSourceStatus SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'INDEXEDINFOSOURCESTATUS') LOOP EXECUTE IMMEDIATE 'drop table IndexedInfoSourceStatus cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table IndexedInfoSourceStatus 2 ( 3 indexedInfoSourceStatusID integer not null, 4 indexedInfoSourceID integer not null, 5 informationMonitorID integer not null , 6 version integer default 0 not null, 7 status integer not null , 8 startDate timestamp not null, 9 updatedDate timestamp not null, 10 endDate timestamp null 11 ) 12 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_INDEXEDINFOSOURCESTATUS') LOOP EXECUTE IMMEDIATE 'drop sequence seq_IndexedInfoSourceStatus'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_IndexedInfoSourceStatus start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE IndexedInfoSourceStatus ADD CONSTRAINT IndexedInfoSourceStatus_pk PRIMARY KEY (indexedInfoSourceStatusID); Table altered. SQL> SQL> ALTER TABLE IndexedInfoSourceStatus ADD CONSTRAINT IndexedInfoSourceStatus_U unique(indexedInfoSourceID, informationMonitorID); Table altered. SQL> SQL> SQL> SQL> ALTER TABLE IndexedInfoSourceStatus ADD CONSTRAINT IndexedInfoSourceStatus_fk1 FOREIGN KEY (indexedInfoSourceID) references IndexedInfoSource(indexedInfoSourceID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX IndexedInfoSourceStatus_fk1 ON IndexedInfoSourceStatus(indexedInfoSourceID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- ProfileClause SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'PROFILECLAUSE') LOOP EXECUTE IMMEDIATE 'drop table ProfileClause cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table ProfileClause 2 ( 3 clauseID integer not null, 4 dataSourceColumnID integer not null, 5 operator integer, 6 operands varchar(500 CHAR) 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_PROFILECLAUSE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_ProfileClause'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_ProfileClause start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE ProfileClause ADD CONSTRAINT ProfileClause_pk PRIMARY KEY (clauseID); Table altered. SQL> SQL> SQL> ALTER TABLE ProfileClause ADD CONSTRAINT ProfileClause_fk1 FOREIGN KEY (dataSourceColumnID) references DataSourceColumn(dataSourceColumnID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX ProfileClause_fk1 ON ProfileClause(dataSourceColumnID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DataOwnerPredicate SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DATAOWNERPREDICATE') LOOP EXECUTE IMMEDIATE 'drop table DataOwnerPredicate cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DataOwnerPredicate 2 ( 3 predicateID integer not null, 4 operator varchar(3) CHECK (operator IN ('ALL', 'ANY')) 5 ) 6 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DATAOWNERPREDICATE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DataOwnerPredicate'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DataOwnerPredicate start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DataOwnerPredicate ADD CONSTRAINT DataOwnerPredicate_pk PRIMARY KEY (predicateID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DatabaseInfoCondition SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DATABASEINFOCONDITION') LOOP EXECUTE IMMEDIATE 'drop table DatabaseInfoCondition cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DatabaseInfoCondition 2 ( 3 conditionID integer not null, 4 type integer not null, 5 createDate timestamp not null, 6 editDate timestamp not null, 7 name varchar(60 CHAR) not null, 8 processingOrder integer, 9 minimumMatches integer not null, 10 matchType integer not null, 11 metaInformation varchar(4000 CHAR), 12 dataSourceID integer, 13 threshold integer not null, 14 clauseID integer, 15 senderDataOwnerExceptionID integer, 16 recipientDataOwnerExceptionID integer 17 ) 18 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DATABASEINFOCONDITION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DatabaseInfoCondition'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DatabaseInfoCondition start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DatabaseInfoCondition ADD CONSTRAINT DatabaseInfoCondition_pk PRIMARY KEY (conditionID); Table altered. SQL> SQL> SQL> ALTER TABLE DatabaseInfoCondition ADD CONSTRAINT DatabaseInfoCondition_fk1 FOREIGN KEY (dataSourceID) references DataSource(infoSourceID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE DatabaseInfoCondition ADD CONSTRAINT DatabaseInfoCondition_fk2 FOREIGN KEY (clauseID) references ProfileClause(clauseID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE DatabaseInfoCondition ADD CONSTRAINT DatabaseInfoCondition_fk3 FOREIGN KEY (senderDataOwnerExceptionID) references DataOwnerPredicate(predicateID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE DatabaseInfoCondition ADD CONSTRAINT DatabaseInfoCondition_fk4 FOREIGN KEY (recipientDataOwnerExceptionID) references DataOwnerPredicate(predicateID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX DatabaseInfoCondition_fk1 ON DatabaseInfoCondition(dataSourceID); Index created. SQL> CREATE INDEX DatabaseInfoCondition_fk2 ON DatabaseInfoCondition(clauseID); Index created. SQL> CREATE INDEX DatabaseInfoCondition_fk3 ON DatabaseInfoCondition(senderDataOwnerExceptionID); Index created. SQL> CREATE INDEX DatabaseInfoCondition_fk4 ON DatabaseInfoCondition(recipientDataOwnerExceptionID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DataOwnerColumn - Intermediary SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DATAOWNERCOLUMN') LOOP EXECUTE IMMEDIATE 'drop table DataOwnerColumn cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DataOwnerColumn 2 ( 3 predicateID integer not null, 4 dataOwnerColumnID integer not null 5 ) 6 ; Table created. SQL> SQL> ALTER TABLE DataOwnerColumn ADD CONSTRAINT DataOwnerColumn_PK primary key(predicateID, dataOwnerColumnID); Table altered. SQL> SQL> SQL> SQL> ALTER TABLE DataOwnerColumn ADD CONSTRAINT DataOwnerColumn_fk1 FOREIGN KEY (predicateID) references DataOwnerPredicate(predicateID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE DataOwnerColumn ADD CONSTRAINT DataOwnerColumn_fk2 FOREIGN KEY (dataOwnerColumnID) references DataSourceColumn(dataSourceColumnID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX DataOwnerColumn_fk1 ON DataOwnerColumn(predicateID); Index created. SQL> CREATE INDEX DataOwnerColumn_fk2 ON DataOwnerColumn(dataOwnerColumnID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DatabaseInfoConditionColumns - Intermediary SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DATABASEINFOCONDITIONCOLUMNS') LOOP EXECUTE IMMEDIATE 'drop table DatabaseInfoConditionColumns cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DatabaseInfoConditionColumns 2 ( 3 dbInfoConditionID integer not null, 4 dataSourceColumnID integer not null 5 ) 6 ; Table created. SQL> SQL> ALTER TABLE DatabaseInfoConditionColumns ADD CONSTRAINT DatabaseInfoConditionColum_PK primary key(dbInfoConditionID, dataSourceColumnID); Table altered. SQL> SQL> SQL> SQL> ALTER TABLE DatabaseInfoConditionColumns ADD CONSTRAINT DatabaseInfoConditionColum_fk1 FOREIGN KEY (dbInfoConditionID) references DatabaseInfoCondition(conditionID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE DatabaseInfoConditionColumns ADD CONSTRAINT DatabaseInfoConditionColum_fk2 FOREIGN KEY (dataSourceColumnID) references DataSourceColumn(dataSourceColumnID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX DatabaseInfoConditionColum_fk1 ON DatabaseInfoConditionColumns(dbInfoConditionID); Index created. SQL> CREATE INDEX DatabaseInfoConditionColum_fk2 ON DatabaseInfoConditionColumns(dataSourceColumnID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DocumentProfileCondition SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DOCUMENTPROFILECONDITION') LOOP EXECUTE IMMEDIATE 'drop table DocumentProfileCondition cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DocumentProfileCondition 2 ( 3 conditionID integer not null, 4 type integer not null, 5 createDate timestamp not null, 6 editDate timestamp not null, 7 name varchar(60 CHAR) not null, 8 processingOrder integer, 9 minimumMatches integer not null, 10 matchType integer not null, 11 metaInformation varchar(4000 CHAR), 12 docSourceID integer not null, 13 similarity integer not null 14 ) 15 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DOCUMENTPROFILECONDITION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DocumentProfileCondition'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DocumentProfileCondition start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DocumentProfileCondition ADD CONSTRAINT DocumentProfileCondition_pk PRIMARY KEY (conditionID); Table altered. SQL> SQL> SQL> ALTER TABLE DocumentProfileCondition ADD CONSTRAINT DocumentProfileCondition_fk1 FOREIGN KEY (docSourceID) references DocSource(infoSourceID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX DocumentProfileCondition_fk1 ON DocumentProfileCondition(docSourceID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DatabaseExceptionTuple SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DATABASEEXCEPTIONTUPLE') LOOP EXECUTE IMMEDIATE 'drop table DatabaseExceptionTuple cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DatabaseExceptionTuple 2 ( 3 dbExceptionTupleID integer not null, 4 dbInfoConditionID integer not null 5 ) 6 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DATABASEEXCEPTIONTUPLE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DatabaseExceptionTuple'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DatabaseExceptionTuple start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DatabaseExceptionTuple ADD CONSTRAINT DatabaseExceptionTuple_pk PRIMARY KEY (dbExceptionTupleID); Table altered. SQL> SQL> SQL> ALTER TABLE DatabaseExceptionTuple ADD CONSTRAINT DatabaseExceptionTuple_fk1 FOREIGN KEY (dbInfoConditionID) references DatabaseInfoCondition(conditionID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX DatabaseExceptionTuple_fk1 ON DatabaseExceptionTuple(dbInfoConditionID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DatabaseExceptionTupleMember - Intermediary SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DATABASEEXCEPTIONTUPLEMEMBER') LOOP EXECUTE IMMEDIATE 'drop table DatabaseExceptionTupleMember cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DatabaseExceptionTupleMember 2 ( 3 dbInfoExceptionListID integer not null, 4 dataSourceColumnID integer not null 5 ) 6 ; Table created. SQL> SQL> ALTER TABLE DatabaseExceptionTupleMember ADD CONSTRAINT DatabaseExceptionTupleMemb_PK primary key(dbInfoExceptionListID, dataSourceColumnID); Table altered. SQL> SQL> SQL> SQL> ALTER TABLE DatabaseExceptionTupleMember ADD CONSTRAINT DatabaseExceptionTupleMemb_fk1 FOREIGN KEY (dbInfoExceptionListID) references DatabaseExceptionTuple(dbExceptionTupleID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE DatabaseExceptionTupleMember ADD CONSTRAINT DatabaseExceptionTupleMemb_fk2 FOREIGN KEY (dataSourceColumnID) references DataSourceColumn(dataSourceColumnID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX DatabaseExceptionTupleMemb_fk1 ON DatabaseExceptionTupleMember(dbInfoExceptionListID); Index created. SQL> CREATE INDEX DatabaseExceptionTupleMemb_fk2 ON DatabaseExceptionTupleMember(dataSourceColumnID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- CryptographicKey SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'CRYPTOGRAPHICKEY') LOOP EXECUTE IMMEDIATE 'drop table CryptographicKey cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table CryptographicKey 2 ( 3 cryptographicKeyID integer not null, 4 keyValue varchar(174 CHAR) not null , 5 keyAlias varchar(50 CHAR) not null, 6 createdDate timestamp not null, 7 keyType varchar(32 CHAR) not null 8 ) 9 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_CRYPTOGRAPHICKEY') LOOP EXECUTE IMMEDIATE 'drop sequence seq_CryptographicKey'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_CryptographicKey start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE CryptographicKey ADD CONSTRAINT CryptographicKey_pk PRIMARY KEY (cryptographicKeyID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- SenderRecipientPattern SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'SENDERRECIPIENTPATTERN') LOOP EXECUTE IMMEDIATE 'drop table SenderRecipientPattern cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table SenderRecipientPattern 2 ( 3 senderRecipientPatternID integer not null, 4 version integer default 0 not null, 5 name varchar(60 CHAR), 6 description varchar(2048 CHAR), 7 modifiedByID integer, 8 modifiedDate timestamp, 9 ipAddresses clob, 10 userPatterns clob, 11 urlDomains clob, 12 isDeleted integer not null CHECK (isDeleted IN (0,1)), 13 ruleType integer not null CHECK (ruleType IN (1,2,3,4)), 14 uuid varchar(36 CHAR) not null unique, 15 versionuuid varchar(36 CHAR) not null unique 16 ) 17 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_SENDERRECIPIENTPATTERN') LOOP EXECUTE IMMEDIATE 'drop sequence seq_SenderRecipientPattern'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_SenderRecipientPattern start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE SenderRecipientPattern ADD CONSTRAINT SenderRecipientPattern_pk PRIMARY KEY (senderRecipientPatternID); Table altered. SQL> SQL> SQL> ALTER TABLE SenderRecipientPattern ADD CONSTRAINT SenderRecipientPattern_fk1 FOREIGN KEY (modifiedByID) references ProtectUser(userID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX SenderRecipientPattern_fk1 ON SenderRecipientPattern(modifiedByID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- RecipientCondition SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'RECIPIENTCONDITION') LOOP EXECUTE IMMEDIATE 'drop table RecipientCondition cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table RecipientCondition 2 ( 3 conditionID integer not null, 4 type integer not null, 5 createDate timestamp not null, 6 editDate timestamp not null, 7 name varchar(60 CHAR) not null, 8 processingOrder integer, 9 minimumMatches integer not null, 10 matchType integer not null, 11 metaInformation varchar(4000 CHAR), 12 recipientPatternID integer not null 13 ) 14 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_RECIPIENTCONDITION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_RecipientCondition'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_RecipientCondition start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE RecipientCondition ADD CONSTRAINT RecipientCondition_pk PRIMARY KEY (conditionID); Table altered. SQL> SQL> SQL> ALTER TABLE RecipientCondition ADD CONSTRAINT RecipientCondition_fk1 FOREIGN KEY (recipientPatternID) references SenderRecipientPattern(senderRecipientPatternID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX RecipientCondition_fk1 ON RecipientCondition(recipientPatternID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- SenderCondition SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'SENDERCONDITION') LOOP EXECUTE IMMEDIATE 'drop table SenderCondition cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table SenderCondition 2 ( 3 conditionID integer not null, 4 type integer not null, 5 createDate timestamp not null, 6 editDate timestamp not null, 7 name varchar(60 CHAR) not null, 8 processingOrder integer, 9 minimumMatches integer not null, 10 matchType integer not null, 11 metaInformation varchar(4000 CHAR), 12 senderPatternID integer not null 13 ) 14 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_SENDERCONDITION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_SenderCondition'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_SenderCondition start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE SenderCondition ADD CONSTRAINT SenderCondition_pk PRIMARY KEY (conditionID); Table altered. SQL> SQL> SQL> ALTER TABLE SenderCondition ADD CONSTRAINT SenderCondition_fk1 FOREIGN KEY (senderPatternID) references SenderRecipientPattern(senderRecipientPatternID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX SenderCondition_fk1 ON SenderCondition(senderPatternID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- RecipientProfileCondition SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'RECIPIENTPROFILECONDITION') LOOP EXECUTE IMMEDIATE 'drop table RecipientProfileCondition cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table RecipientProfileCondition 2 ( 3 conditionID integer not null, 4 type integer not null, 5 createDate timestamp not null, 6 editDate timestamp not null, 7 name varchar(60 CHAR) not null, 8 processingOrder integer, 9 minimumMatches integer not null, 10 matchType integer not null, 11 metaInformation varchar(4000 CHAR), 12 dataSourceID integer not null, 13 clauseID integer 14 ) 15 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_RECIPIENTPROFILECONDITION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_RecipientProfileCondition'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_RecipientProfileCondition start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE RecipientProfileCondition ADD CONSTRAINT RecipientProfileCondition_pk PRIMARY KEY (conditionID); Table altered. SQL> SQL> SQL> ALTER TABLE RecipientProfileCondition ADD CONSTRAINT RecipientProfileCondition_fk1 FOREIGN KEY (dataSourceID) references DataSource(infoSourceID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE RecipientProfileCondition ADD CONSTRAINT RecipientProfileCondition_fk2 FOREIGN KEY (clauseID) references ProfileClause(clauseID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX RecipientProfileCondition_fk1 ON RecipientProfileCondition(dataSourceID); Index created. SQL> CREATE INDEX RecipientProfileCondition_fk2 ON RecipientProfileCondition(clauseID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- SenderProfileCondition SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'SENDERPROFILECONDITION') LOOP EXECUTE IMMEDIATE 'drop table SenderProfileCondition cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table SenderProfileCondition 2 ( 3 conditionID integer not null, 4 type integer not null, 5 createDate timestamp not null, 6 editDate timestamp not null, 7 name varchar(60 CHAR) not null, 8 processingOrder integer, 9 minimumMatches integer not null, 10 matchType integer not null, 11 metaInformation varchar(4000 CHAR), 12 dataSourceID integer not null, 13 clauseID integer 14 ) 15 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_SENDERPROFILECONDITION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_SenderProfileCondition'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_SenderProfileCondition start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE SenderProfileCondition ADD CONSTRAINT SenderProfileCondition_pk PRIMARY KEY (conditionID); Table altered. SQL> SQL> SQL> ALTER TABLE SenderProfileCondition ADD CONSTRAINT SenderProfileCondition_fk1 FOREIGN KEY (dataSourceID) references DataSource(infoSourceID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE SenderProfileCondition ADD CONSTRAINT SenderProfileCondition_fk2 FOREIGN KEY (clauseID) references ProfileClause(clauseID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX SenderProfileCondition_fk1 ON SenderProfileCondition(dataSourceID); Index created. SQL> CREATE INDEX SenderProfileCondition_fk2 ON SenderProfileCondition(clauseID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- SenderProfileColumns - Intermediary SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'SENDERPROFILECOLUMNS') LOOP EXECUTE IMMEDIATE 'drop table SenderProfileColumns cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table SenderProfileColumns 2 ( 3 senderConditionID integer not null, 4 dataSourceColumnID integer not null 5 ) 6 ; Table created. SQL> SQL> ALTER TABLE SenderProfileColumns ADD CONSTRAINT SenderProfileColumns_PK primary key(senderConditionID, dataSourceColumnID); Table altered. SQL> SQL> SQL> SQL> ALTER TABLE SenderProfileColumns ADD CONSTRAINT SenderProfileColumns_fk1 FOREIGN KEY (senderConditionID) references SenderProfileCondition(conditionID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE SenderProfileColumns ADD CONSTRAINT SenderProfileColumns_fk2 FOREIGN KEY (dataSourceColumnID) references DataSourceColumn(dataSourceColumnID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX SenderProfileColumns_fk1 ON SenderProfileColumns(senderConditionID); Index created. SQL> CREATE INDEX SenderProfileColumns_fk2 ON SenderProfileColumns(dataSourceColumnID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- RecipientProfileColumns - Intermediary SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'RECIPIENTPROFILECOLUMNS') LOOP EXECUTE IMMEDIATE 'drop table RecipientProfileColumns cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table RecipientProfileColumns 2 ( 3 recipientConditionID integer not null, 4 dataSourceColumnID integer not null 5 ) 6 ; Table created. SQL> SQL> ALTER TABLE RecipientProfileColumns ADD CONSTRAINT RecipientProfileColumns_PK primary key(recipientConditionID, dataSourceColumnID); Table altered. SQL> SQL> SQL> SQL> ALTER TABLE RecipientProfileColumns ADD CONSTRAINT RecipientProfileColumns_fk1 FOREIGN KEY (recipientConditionID) references RecipientProfileCondition(conditionID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE RecipientProfileColumns ADD CONSTRAINT RecipientProfileColumns_fk2 FOREIGN KEY (dataSourceColumnID) references DataSourceColumn(dataSourceColumnID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX RecipientProfileColumns_fk1 ON RecipientProfileColumns(recipientConditionID); Index created. SQL> CREATE INDEX RecipientProfileColumns_fk2 ON RecipientProfileColumns(dataSourceColumnID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DataIdentifierCategory SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DATAIDENTIFIERCATEGORY') LOOP EXECUTE IMMEDIATE 'drop table DataIdentifierCategory cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DataIdentifierCategory 2 ( 3 categoryID integer not null, 4 name varchar(150 CHAR) not null, 5 isInternationalized integer not null CHECK (isInternationalized IN (0,1)) 6 ) 7 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DATAIDENTIFIERCATEGORY') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DataIdentifierCategory'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DataIdentifierCategory start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DataIdentifierCategory ADD CONSTRAINT DataIdentifierCategory_pk PRIMARY KEY (categoryID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DataIdentifier SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DATAIDENTIFIER') LOOP EXECUTE IMMEDIATE 'drop table DataIdentifier cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DataIdentifier 2 ( 3 dataIdentifierID integer not null, 4 uuid varchar(36 CHAR) not null unique, 5 version integer not null, 6 name varchar(150 CHAR) not null unique, 7 description varchar(255 CHAR), 8 identifierType varchar(16 CHAR) not null check(identifierType in ('SYSTEM','CUSTOM', 'MODIFIED')), 9 categoryID integer not null, 10 isInternationalized integer not null CHECK (isInternationalized IN (0,1)), 11 versionuuid varchar(36 CHAR) not null unique 12 ) 13 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DATAIDENTIFIER') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DataIdentifier'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DataIdentifier start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DataIdentifier ADD CONSTRAINT DataIdentifier_pk PRIMARY KEY (dataIdentifierID); Table altered. SQL> SQL> SQL> ALTER TABLE DataIdentifier ADD CONSTRAINT DataIdentifier_fk1 FOREIGN KEY (categoryID) references DataIdentifierCategory(categoryID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX DataIdentifier_fk1 ON DataIdentifier(categoryID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DataIdentifierNormalizer SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DATAIDENTIFIERNORMALIZER') LOOP EXECUTE IMMEDIATE 'drop table DataIdentifierNormalizer cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DataIdentifierNormalizer 2 ( 3 normalizerID integer not null, 4 factoryIdentifier varchar(500 CHAR) not null unique, 5 name varchar(150 CHAR) not null, 6 description varchar(150 CHAR) not null, 7 isInternationalized integer not null CHECK (isInternationalized IN (0,1)) 8 ) 9 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DATAIDENTIFIERNORMALIZER') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DataIdentifierNormalizer'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DataIdentifierNormalizer start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DataIdentifierNormalizer ADD CONSTRAINT DataIdentifierNormalizer_pk PRIMARY KEY (normalizerID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DataIdentifierBreadth SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DATAIDENTIFIERBREADTH') LOOP EXECUTE IMMEDIATE 'drop table DataIdentifierBreadth cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DataIdentifierBreadth 2 ( 3 breadthID integer not null, 4 name varchar(150 CHAR) not null, 5 description varchar(150 CHAR) not null, 6 normalizerID integer not null, 7 dataIdentifierID integer not null, 8 preValidCharacters varchar(50 CHAR), 9 postValidCharacters varchar(50 CHAR), 10 preInvalidCharacters varchar(50 CHAR), 11 postInvalidCharacters varchar(50 CHAR), 12 isInternationalized integer not null CHECK (isInternationalized IN (0,1)) 13 ) 14 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DATAIDENTIFIERBREADTH') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DataIdentifierBreadth'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DataIdentifierBreadth start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DataIdentifierBreadth ADD CONSTRAINT DataIdentifierBreadth_pk PRIMARY KEY (breadthID); Table altered. SQL> SQL> SQL> ALTER TABLE DataIdentifierBreadth ADD CONSTRAINT DataIdentifierBreadth_fk1 FOREIGN KEY (normalizerID) references DataIdentifierNormalizer(normalizerID) on delete cascade DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE DataIdentifierBreadth ADD CONSTRAINT DataIdentifierBreadth_fk2 FOREIGN KEY (dataIdentifierID) references DataIdentifier(dataIdentifierID) on delete cascade DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX DataIdentifierBreadth_fk1 ON DataIdentifierBreadth(normalizerID); Index created. SQL> CREATE INDEX DataIdentifierBreadth_fk2 ON DataIdentifierBreadth(dataIdentifierID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- MLDProfile SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'MLDPROFILE') LOOP EXECUTE IMMEDIATE 'drop table MLDProfile cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table MLDProfile 2 ( 3 mldProfileID integer not null, 4 name varchar(60 CHAR) not null unique, 5 description varchar(512 CHAR), 6 state varchar(9) default 'NEW' not null CHECK (state IN ('NEW','EDITING','TRAINING','CANCELING','TRAINED','APPROVED')), 7 confidenceLevel double precision not null, 8 featuresToRetain integer, 9 maxModelSize integer, 10 stopWordFileOverride varchar(256 CHAR), 11 uuid varchar(36 CHAR) not null unique, 12 version integer, 13 versionuuid varchar(36 CHAR) not null unique 14 ) 15 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_MLDPROFILE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_MLDProfile'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_MLDProfile start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE MLDProfile ADD CONSTRAINT MLDProfile_pk PRIMARY KEY (mldProfileID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DataIdentifierCondition SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DATAIDENTIFIERCONDITION') LOOP EXECUTE IMMEDIATE 'drop table DataIdentifierCondition cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DataIdentifierCondition 2 ( 3 conditionID integer not null, 4 type integer not null, 5 createDate timestamp not null, 6 editDate timestamp not null, 7 name varchar(60 CHAR) not null, 8 processingOrder integer, 9 minimumMatches integer not null, 10 matchType integer not null, 11 metaInformation varchar(4000 CHAR), 12 dataIdentifierID integer not null, 13 breadthID integer not null 14 ) 15 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DATAIDENTIFIERCONDITION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DataIdentifierCondition'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DataIdentifierCondition start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DataIdentifierCondition ADD CONSTRAINT DataIdentifierCondition_pk PRIMARY KEY (conditionID); Table altered. SQL> SQL> SQL> ALTER TABLE DataIdentifierCondition ADD CONSTRAINT DataIdentifierCondition_fk1 FOREIGN KEY (dataIdentifierID) references DataIdentifier(dataIdentifierID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE DataIdentifierCondition ADD CONSTRAINT DataIdentifierCondition_fk2 FOREIGN KEY (breadthID) references DataIdentifierBreadth(breadthID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX DataIdentifierCondition_fk1 ON DataIdentifierCondition(dataIdentifierID); Index created. SQL> CREATE INDEX DataIdentifierCondition_fk2 ON DataIdentifierCondition(breadthID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DiConditionValidator SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DICONDITIONVALIDATOR') LOOP EXECUTE IMMEDIATE 'drop table DiConditionValidator cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DiConditionValidator 2 ( 3 optionalValidatorID integer not null, 4 conditionID integer not null, 5 validatorID integer not null, 6 validatorInput clob 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DICONDITIONVALIDATOR') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DiConditionValidator'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DiConditionValidator start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DiConditionValidator ADD CONSTRAINT DiConditionValidator_pk PRIMARY KEY (optionalValidatorID); Table altered. SQL> SQL> SQL> ALTER TABLE DiConditionValidator ADD CONSTRAINT DiConditionValidator_fk1 FOREIGN KEY (conditionID) references DataIdentifierCondition(conditionID) on delete cascade DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX DiConditionValidator_fk1 ON DiConditionValidator(conditionID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- MachineLearningCondition SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'MACHINELEARNINGCONDITION') LOOP EXECUTE IMMEDIATE 'drop table MachineLearningCondition cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table MachineLearningCondition 2 ( 3 conditionID integer not null, 4 type integer not null, 5 createDate timestamp not null, 6 editDate timestamp not null, 7 name varchar(60 CHAR) not null, 8 processingOrder integer, 9 minimumMatches integer not null, 10 matchType integer not null, 11 metaInformation varchar(4000 CHAR), 12 mldProfileID integer not null 13 ) 14 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_MACHINELEARNINGCONDITION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_MachineLearningCondition'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_MachineLearningCondition start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE MachineLearningCondition ADD CONSTRAINT MachineLearningCondition_pk PRIMARY KEY (conditionID); Table altered. SQL> SQL> SQL> ALTER TABLE MachineLearningCondition ADD CONSTRAINT MachineLearningCondition_fk1 FOREIGN KEY (mldProfileID) references MLDProfile(mldProfileID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX MachineLearningCondition_fk1 ON MachineLearningCondition(mldProfileID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- SystemReportCategory SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'SYSTEMREPORTCATEGORY') LOOP EXECUTE IMMEDIATE 'drop table SystemReportCategory cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table SystemReportCategory 2 ( 3 categoryID integer not null, 4 name varchar(100 CHAR) not null, 5 description varchar(500 CHAR), 6 categoryOrder integer not null, 7 isInternationalized integer default 0 not null CHECK (isInternationalized IN (0,1)) 8 ) 9 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_SYSTEMREPORTCATEGORY') LOOP EXECUTE IMMEDIATE 'drop sequence seq_SystemReportCategory'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_SystemReportCategory start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE SystemReportCategory ADD CONSTRAINT SystemReportCategory_pk PRIMARY KEY (categoryID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- ReportEmailSchedule SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'REPORTEMAILSCHEDULE') LOOP EXECUTE IMMEDIATE 'drop table ReportEmailSchedule cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table ReportEmailSchedule 2 ( 3 reportEmailScheduleID integer not null, 4 reportFormat integer default 1 not null CHECK (reportFormat IN (1, 2, 3)), 5 distributionMode integer default 1 not null CHECK (distributionMode IN (1,2)), 6 jobName varchar(50 CHAR) not null, 7 triggerName varchar(50 CHAR) not null, 8 toDistributionList varchar(600 CHAR), 9 ccDistributionList varchar(300 CHAR), 10 bccDistributionList varchar(300 CHAR), 11 subject varchar(200 CHAR), 12 message varchar(1000 CHAR) 13 ) 14 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_REPORTEMAILSCHEDULE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_ReportEmailSchedule'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_ReportEmailSchedule start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE ReportEmailSchedule ADD CONSTRAINT ReportEmailSchedule_pk PRIMARY KEY (reportEmailScheduleID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- SetStatusCommand SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'SETSTATUSCOMMAND') LOOP EXECUTE IMMEDIATE 'drop table SetStatusCommand cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table SetStatusCommand 2 ( 3 postDistributionCommandID integer not null, 4 reportEmailScheduleID integer not null, 5 incidentStatusID integer not null 6 ) 7 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_SETSTATUSCOMMAND') LOOP EXECUTE IMMEDIATE 'drop sequence seq_SetStatusCommand'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_SetStatusCommand start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE SetStatusCommand ADD CONSTRAINT SetStatusCommand_pk PRIMARY KEY (postDistributionCommandID); Table altered. SQL> SQL> SQL> ALTER TABLE SetStatusCommand ADD CONSTRAINT SetStatusCommand_fk1 FOREIGN KEY (reportEmailScheduleID) references ReportEmailSchedule(reportEmailScheduleID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE SetStatusCommand ADD CONSTRAINT SetStatusCommand_fk2 FOREIGN KEY (incidentStatusID) references IncidentStatus(incidentStatusID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX SetStatusCommand_fk1 ON SetStatusCommand(reportEmailScheduleID); Index created. SQL> CREATE INDEX SetStatusCommand_fk2 ON SetStatusCommand(incidentStatusID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- SetCustomAttributeCommand SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'SETCUSTOMATTRIBUTECOMMAND') LOOP EXECUTE IMMEDIATE 'drop table SetCustomAttributeCommand cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table SetCustomAttributeCommand 2 ( 3 postDistributionCommandID integer not null, 4 reportEmailScheduleID integer not null, 5 customAttributeDefinitionID integer not null, 6 customAttributeValue varchar(2000 CHAR) 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_SETCUSTOMATTRIBUTECOMMAND') LOOP EXECUTE IMMEDIATE 'drop sequence seq_SetCustomAttributeCommand'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_SetCustomAttributeCommand start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE SetCustomAttributeCommand ADD CONSTRAINT SetCustomAttributeCommand_pk PRIMARY KEY (postDistributionCommandID); Table altered. SQL> SQL> SQL> ALTER TABLE SetCustomAttributeCommand ADD CONSTRAINT SetCustomAttributeCommand_fk1 FOREIGN KEY (reportEmailScheduleID) references ReportEmailSchedule(reportEmailScheduleID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE SetCustomAttributeCommand ADD CONSTRAINT SetCustomAttributeCommand_fk2 FOREIGN KEY (customAttributeDefinitionID) references CustomAttributeDefinition(customAttributeDefinitionID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX SetCustomAttributeCommand_fk1 ON SetCustomAttributeCommand(reportEmailScheduleID); Index created. SQL> CREATE INDEX SetCustomAttributeCommand_fk2 ON SetCustomAttributeCommand(customAttributeDefinitionID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- Report SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'REPORT') LOOP EXECUTE IMMEDIATE 'drop table Report cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table Report 2 ( 3 reportID integer not null, 4 name varchar(50 CHAR) not null, 5 description varchar(500 CHAR), 6 menuID varchar(30) not null, 7 permission varchar(10) not null CHECK (permission IN ('PRIVATE', 'SHARED', 'SYSTEM')), 8 userID integer, 9 roleID integer, 10 action varchar(100 CHAR) not null, 11 createDate timestamp not null, 12 modifyDate timestamp, 13 reportOrder integer default 1 not null, 14 categoryID integer, 15 type varchar(30) not null CHECK (type IN ('NETWORK', 'DISCOVER', 'ENDPOINT','CLASSIFICATION','MOBILE','SYSTEM_EVENT','AGENT_MANAGEMENT','DASHBOARD')), 16 defaultDisplayInNav integer default 1 not null CHECK (defaultDisplayInNav IN (0, 1)), 17 isInternationalized integer default 0 not null CHECK (isInternationalized IN (0,1)), 18 reportEmailScheduleID integer 19 ) 20 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_REPORT') LOOP EXECUTE IMMEDIATE 'drop sequence seq_Report'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_Report start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE Report ADD CONSTRAINT Report_pk PRIMARY KEY (reportID); Table altered. SQL> SQL> SQL> ALTER TABLE Report ADD CONSTRAINT Report_fk1 FOREIGN KEY (userID) references ProtectUser(userID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE Report ADD CONSTRAINT Report_fk2 FOREIGN KEY (roleID) references Role(roleID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE Report ADD CONSTRAINT Report_fk3 FOREIGN KEY (categoryID) references SystemReportCategory(categoryID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE Report ADD CONSTRAINT Report_fk4 FOREIGN KEY (reportEmailScheduleID) references ReportEmailSchedule(reportEmailScheduleID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX Report_fk1 ON Report(userID); Index created. SQL> CREATE INDEX Report_fk2 ON Report(roleID); Index created. SQL> CREATE INDEX Report_fk3 ON Report(categoryID); Index created. SQL> CREATE INDEX Report_fk4 ON Report(reportEmailScheduleID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- ReportFilter SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'REPORTFILTER') LOOP EXECUTE IMMEDIATE 'drop table ReportFilter cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table ReportFilter 2 ( 3 filterID integer not null, 4 reportID integer not null, 5 variable varchar(100 CHAR) not null, 6 operator varchar(100 CHAR) not null, 7 operandUnit varchar(50 CHAR) 8 ) 9 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_REPORTFILTER') LOOP EXECUTE IMMEDIATE 'drop sequence seq_ReportFilter'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_ReportFilter start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE ReportFilter ADD CONSTRAINT ReportFilter_pk PRIMARY KEY (filterID); Table altered. SQL> SQL> SQL> ALTER TABLE ReportFilter ADD CONSTRAINT ReportFilter_fk1 FOREIGN KEY (reportID) references Report(reportID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX ReportFilter_fk1 ON ReportFilter(reportID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- ReportFilterOperand SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'REPORTFILTEROPERAND') LOOP EXECUTE IMMEDIATE 'drop table ReportFilterOperand cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table ReportFilterOperand 2 ( 3 reportFilterOperandID integer not null, 4 filterID integer not null, 5 operand varchar(2048 CHAR) not null 6 ) 7 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_REPORTFILTEROPERAND') LOOP EXECUTE IMMEDIATE 'drop sequence seq_ReportFilterOperand'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_ReportFilterOperand start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE ReportFilterOperand ADD CONSTRAINT ReportFilterOperand_pk PRIMARY KEY (reportFilterOperandID); Table altered. SQL> SQL> SQL> ALTER TABLE ReportFilterOperand ADD CONSTRAINT ReportFilterOperand_fk1 FOREIGN KEY (filterID) references ReportFilter(filterID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX ReportFilterOperand_fk1 ON ReportFilterOperand(filterID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- ReportStateVariable SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'REPORTSTATEVARIABLE') LOOP EXECUTE IMMEDIATE 'drop table ReportStateVariable cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table ReportStateVariable 2 ( 3 stateVariableID integer not null, 4 reportID integer not null, 5 name varchar(100 CHAR) not null, 6 value varchar(255 CHAR) 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_REPORTSTATEVARIABLE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_ReportStateVariable'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_ReportStateVariable start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE ReportStateVariable ADD CONSTRAINT ReportStateVariable_pk PRIMARY KEY (stateVariableID); Table altered. SQL> SQL> SQL> ALTER TABLE ReportStateVariable ADD CONSTRAINT ReportStateVariable_fk1 FOREIGN KEY (reportID) references Report(reportID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX ReportStateVariable_fk1 ON ReportStateVariable(reportID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DashboardReportItem SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DASHBOARDREPORTITEM') LOOP EXECUTE IMMEDIATE 'drop table DashboardReportItem cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DashboardReportItem 2 ( 3 dashboardReportItemID integer not null, 4 dashboardID integer not null, 5 reportID integer not null, 6 position integer not null 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DASHBOARDREPORTITEM') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DashboardReportItem'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DashboardReportItem start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DashboardReportItem ADD CONSTRAINT DashboardReportItem_pk PRIMARY KEY (dashboardReportItemID); Table altered. SQL> SQL> SQL> ALTER TABLE DashboardReportItem ADD CONSTRAINT DashboardReportItem_fk1 FOREIGN KEY (dashboardID) references Report(reportID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE DashboardReportItem ADD CONSTRAINT DashboardReportItem_fk2 FOREIGN KEY (reportID) references Report(reportID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX DashboardReportItem_fk1 ON DashboardReportItem(dashboardID); Index created. SQL> CREATE INDEX DashboardReportItem_fk2 ON DashboardReportItem(reportID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DIReport SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DIREPORT') LOOP EXECUTE IMMEDIATE 'drop table DIReport cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DIReport 2 ( 3 diReportID integer not null, 4 name varchar(50 CHAR) not null, 5 description varchar(500 CHAR), 6 sortColumn integer not null CHECK (sortColumn IN (0, 1, 2)), 7 sortOrder integer not null CHECK (sortOrder IN (0, 1)), 8 isShared integer not null CHECK (isShared IN (0, 1)), 9 userID integer, 10 roleID integer 11 ) 12 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DIREPORT') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DIReport'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DIReport start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DIReport ADD CONSTRAINT DIReport_pk PRIMARY KEY (diReportID); Table altered. SQL> SQL> SQL> ALTER TABLE DIReport ADD CONSTRAINT DIReport_fk1 FOREIGN KEY (userID) references ProtectUser(userID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE DIReport ADD CONSTRAINT DIReport_fk2 FOREIGN KEY (roleID) references Role(roleID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX DIReport_fk1 ON DIReport(userID); Index created. SQL> CREATE INDEX DIReport_fk2 ON DIReport(roleID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DIReportFilter SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DIREPORTFILTER') LOOP EXECUTE IMMEDIATE 'drop table DIReportFilter cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DIReportFilter 2 ( 3 diReportFilterID integer not null, 4 diReportID integer not null, 5 filterType integer not null CHECK (filterType IN (0, 1, 2, 3, 4)), 6 operatorType integer not null CHECK (operatorType IN (0, 1, 2, 3)), 7 isExclude integer not null CHECK (isExclude IN (0, 1)) 8 ) 9 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DIREPORTFILTER') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DIReportFilter'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DIReportFilter start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DIReportFilter ADD CONSTRAINT DIReportFilter_pk PRIMARY KEY (diReportFilterID); Table altered. SQL> SQL> SQL> ALTER TABLE DIReportFilter ADD CONSTRAINT DIReportFilter_fk1 FOREIGN KEY (diReportID) references DIReport(diReportID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX DIReportFilter_fk1 ON DIReportFilter(diReportID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DIStringFilterValue SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DISTRINGFILTERVALUE') LOOP EXECUTE IMMEDIATE 'drop table DIStringFilterValue cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DIStringFilterValue 2 ( 3 diStringFilterValueID integer not null, 4 diReportFilterID integer not null, 5 value varchar(255 CHAR) not null 6 ) 7 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DISTRINGFILTERVALUE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DIStringFilterValue'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DIStringFilterValue start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DIStringFilterValue ADD CONSTRAINT DIStringFilterValue_pk PRIMARY KEY (diStringFilterValueID); Table altered. SQL> SQL> SQL> ALTER TABLE DIStringFilterValue ADD CONSTRAINT DIStringFilterValue_fk1 FOREIGN KEY (diReportFilterID) references DIReportFilter(diReportFilterID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX DIStringFilterValue_fk1 ON DIStringFilterValue(diReportFilterID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DIIntegerFilterValue SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DIINTEGERFILTERVALUE') LOOP EXECUTE IMMEDIATE 'drop table DIIntegerFilterValue cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DIIntegerFilterValue 2 ( 3 diIntegerFilterValueID integer not null, 4 diReportFilterID integer not null, 5 value integer not null 6 ) 7 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DIINTEGERFILTERVALUE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DIIntegerFilterValue'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DIIntegerFilterValue start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DIIntegerFilterValue ADD CONSTRAINT DIIntegerFilterValue_pk PRIMARY KEY (diIntegerFilterValueID); Table altered. SQL> SQL> SQL> ALTER TABLE DIIntegerFilterValue ADD CONSTRAINT DIIntegerFilterValue_fk1 FOREIGN KEY (diReportFilterID) references DIReportFilter(diReportFilterID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX DIIntegerFilterValue_fk1 ON DIIntegerFilterValue(diReportFilterID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- UserPreference SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'USERPREFERENCE') LOOP EXECUTE IMMEDIATE 'drop table UserPreference cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table UserPreference 2 ( 3 userPreferenceID integer not null, 4 userID integer not null unique 5 ) 6 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_USERPREFERENCE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_UserPreference'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_UserPreference start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE UserPreference ADD CONSTRAINT UserPreference_pk PRIMARY KEY (userPreferenceID); Table altered. SQL> SQL> SQL> ALTER TABLE UserPreference ADD CONSTRAINT UserPreference_fk1 FOREIGN KEY (userID) references ProtectUser(userID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- UserReportPreference SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'USERREPORTPREFERENCE') LOOP EXECUTE IMMEDIATE 'drop table UserReportPreference cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table UserReportPreference 2 ( 3 userReportPreferenceID integer not null, 4 userPreferenceID integer not null, 5 reportID integer not null, 6 displayInNav integer default 1 not null 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_USERREPORTPREFERENCE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_UserReportPreference'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_UserReportPreference start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE UserReportPreference ADD CONSTRAINT UserReportPreference_pk PRIMARY KEY (userReportPreferenceID); Table altered. SQL> SQL> SQL> ALTER TABLE UserReportPreference ADD CONSTRAINT UserReportPreference_fk1 FOREIGN KEY (userPreferenceID) references UserPreference(userPreferenceID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE UserReportPreference ADD CONSTRAINT UserReportPreference_fk2 FOREIGN KEY (reportID) references Report(reportID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX UserReportPreference_fk1 ON UserReportPreference(userPreferenceID); Index created. SQL> CREATE INDEX UserReportPreference_fk2 ON UserReportPreference(reportID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- UserRolePreference SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'USERROLEPREFERENCE') LOOP EXECUTE IMMEDIATE 'drop table UserRolePreference cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table UserRolePreference 2 ( 3 userRolePreferenceID integer not null, 4 userPreferenceID integer not null, 5 roleID integer, 6 defaultReportID integer not null 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_USERROLEPREFERENCE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_UserRolePreference'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_UserRolePreference start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE UserRolePreference ADD CONSTRAINT UserRolePreference_pk PRIMARY KEY (userRolePreferenceID); Table altered. SQL> SQL> SQL> ALTER TABLE UserRolePreference ADD CONSTRAINT UserRolePreference_fk1 FOREIGN KEY (userPreferenceID) references UserPreference(userPreferenceID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE UserRolePreference ADD CONSTRAINT UserRolePreference_fk2 FOREIGN KEY (roleID) references Role(roleID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE UserRolePreference ADD CONSTRAINT UserRolePreference_fk3 FOREIGN KEY (defaultReportID) references Report(reportID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX UserRolePreference_fk1 ON UserRolePreference(userPreferenceID); Index created. SQL> CREATE INDEX UserRolePreference_fk2 ON UserRolePreference(roleID); Index created. SQL> CREATE INDEX UserRolePreference_fk3 ON UserRolePreference(defaultReportID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- Heartbeat SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'HEARTBEAT') LOOP EXECUTE IMMEDIATE 'drop table Heartbeat cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table Heartbeat 2 ( 3 heartbeatID integer not null, 4 informationMonitorID integer not null, 5 lastHeartbeat timestamp 6 ) 7 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_HEARTBEAT') LOOP EXECUTE IMMEDIATE 'drop sequence seq_Heartbeat'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_Heartbeat start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE Heartbeat ADD CONSTRAINT Heartbeat_pk PRIMARY KEY (heartbeatID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- PolicyArchive SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'POLICYARCHIVE') LOOP EXECUTE IMMEDIATE 'drop table PolicyArchive cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table PolicyArchive 2 ( 3 policyArchiveID integer not null, 4 policyID integer not null, 5 policyVersion integer not null, 6 policyContent clob not null, 7 archivedDate timestamp not null 8 ) 9 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_POLICYARCHIVE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_PolicyArchive'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_PolicyArchive start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE PolicyArchive ADD CONSTRAINT PolicyArchive_pk PRIMARY KEY (policyArchiveID); Table altered. SQL> SQL> SQL> ALTER TABLE PolicyArchive ADD CONSTRAINT PolicyArchive_fk1 FOREIGN KEY (policyID) references Policy(policyID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX PolicyArchive_fk1 ON PolicyArchive(policyID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- SystemEvent SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'SYSTEMEVENT') LOOP EXECUTE IMMEDIATE 'drop table SystemEvent cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table SystemEvent 2 ( 3 systemEventID integer not null, 4 eventCode integer default 0 not null, 5 severity integer not null CHECK (severity IN (3,4,5)), 6 eventDate timestamp not null, 7 informationMonitorID integer not null, 8 summary varchar(256 CHAR) not null, 9 description varchar(1024 CHAR), 10 isInternationalized integer default 0 not null CHECK (isInternationalized IN (0,1)) 11 ) 12 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_SYSTEMEVENT') LOOP EXECUTE IMMEDIATE 'drop sequence seq_SystemEvent'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_SystemEvent start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE SystemEvent ADD CONSTRAINT SystemEvent_pk PRIMARY KEY (systemEventID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- SystemEventParameter SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'SYSTEMEVENTPARAMETER') LOOP EXECUTE IMMEDIATE 'drop table SystemEventParameter cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table SystemEventParameter 2 ( 3 systemEventParameterID integer not null, 4 systemEventID integer not null, 5 paramIndex integer not null, 6 parameter varchar(1024 CHAR) 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_SYSTEMEVENTPARAMETER') LOOP EXECUTE IMMEDIATE 'drop sequence seq_SystemEventParameter'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_SystemEventParameter start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE SystemEventParameter ADD CONSTRAINT SystemEventParameter_pk PRIMARY KEY (systemEventParameterID); Table altered. SQL> SQL> SQL> ALTER TABLE SystemEventParameter ADD CONSTRAINT SystemEventParameter_fk1 FOREIGN KEY (systemEventID) references SystemEvent(systemEventID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX SystemEventParameter_fk1 ON SystemEventParameter(systemEventID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- UserLockoutSystemEvent SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'USERLOCKOUTSYSTEMEVENT') LOOP EXECUTE IMMEDIATE 'drop table UserLockoutSystemEvent cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table UserLockoutSystemEvent 2 ( 3 userLockoutSystemEventID integer not null, 4 severity integer not null CHECK (severity IN (3,4,5)), 5 eventDate timestamp not null, 6 summary varchar(64) not null, 7 description varchar(1024), 8 hasUserName integer default 0 not null CHECK (hasUserName IN (0,1)), 9 userName varchar(30 CHAR) default '' not null, 10 passwordAttempts integer 11 ) 12 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_USERLOCKOUTSYSTEMEVENT') LOOP EXECUTE IMMEDIATE 'drop sequence seq_UserLockoutSystemEvent'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_UserLockoutSystemEvent start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE UserLockoutSystemEvent ADD CONSTRAINT UserLockoutSystemEvent_pk PRIMARY KEY (userLockoutSystemEventID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- MonitorNIC SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'MONITORNIC') LOOP EXECUTE IMMEDIATE 'drop table MonitorNIC cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table MonitorNIC 2 ( 3 monitorNICID integer not null, 4 packetCaptureChannelID integer not null , 5 name varchar(128 CHAR) not null, 6 state integer not null 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_MONITORNIC') LOOP EXECUTE IMMEDIATE 'drop sequence seq_MonitorNIC'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_MonitorNIC start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE MonitorNIC ADD CONSTRAINT MonitorNIC_pk PRIMARY KEY (monitorNICID); Table altered. SQL> SQL> SQL> ALTER TABLE MonitorNIC ADD CONSTRAINT MonitorNIC_fk1 FOREIGN KEY (packetCaptureChannelID) references PacketCaptureChannel(monitorChannelID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX MonitorNIC_fk1 ON MonitorNIC(packetCaptureChannelID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- Event SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'EVENT') LOOP EXECUTE IMMEDIATE 'drop table Event cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table Event 2 ( 3 eventID integer not null, 4 type integer not null, 5 info varchar(2048 CHAR) 6 ) 7 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_EVENT') LOOP EXECUTE IMMEDIATE 'drop sequence seq_Event'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_Event start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE Event ADD CONSTRAINT Event_pk PRIMARY KEY (eventID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- Setting SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'SETTING') LOOP EXECUTE IMMEDIATE 'drop table Setting cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table Setting 2 ( 3 settingID integer not null, 4 name varchar(30 CHAR) not null unique, 5 version numeric(10) default 0 not null 6 ) 7 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_SETTING') LOOP EXECUTE IMMEDIATE 'drop sequence seq_Setting'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_Setting start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE Setting ADD CONSTRAINT Setting_pk PRIMARY KEY (settingID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- Attribute SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'ATTRIBUTE') LOOP EXECUTE IMMEDIATE 'drop table Attribute cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table Attribute 2 ( 3 attributeID integer not null, 4 name varchar(60 CHAR) not null, 5 value varchar(2048 CHAR), 6 settingID integer not null 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_ATTRIBUTE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_Attribute'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_Attribute start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE Attribute ADD CONSTRAINT Attribute_pk PRIMARY KEY (attributeID); Table altered. SQL> SQL> SQL> ALTER TABLE Attribute ADD CONSTRAINT Attribute_fk1 FOREIGN KEY (settingID) references Setting(settingID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX Attribute_fk1 ON Attribute(settingID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- Patch SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'PATCH') LOOP EXECUTE IMMEDIATE 'drop table Patch cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table Patch 2 ( 3 patchID integer not null, 4 version varchar(128 CHAR) not null, 5 scriptName varchar(128 CHAR) not null, 6 scriptArguments varchar(512 CHAR), 7 patch blob, 8 component integer not null, 9 type integer, 10 exec integer, 11 status integer 12 ) 13 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_PATCH') LOOP EXECUTE IMMEDIATE 'drop sequence seq_Patch'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_Patch start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE Patch ADD CONSTRAINT Patch_pk PRIMARY KEY (patchID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- Statuses SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'STATUSES') LOOP EXECUTE IMMEDIATE 'drop table Statuses cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table Statuses 2 ( 3 statisticID integer not null, 4 observedEntityID integer not null, 5 observedEntityType integer not null, 6 type integer not null, 7 numericValue numeric(38), 8 stringValue varchar(2048 CHAR) 9 ) 10 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_STATUSES') LOOP EXECUTE IMMEDIATE 'drop sequence seq_Statuses'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_Statuses start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE Statuses ADD CONSTRAINT Statuses_pk PRIMARY KEY (statisticID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- Statistics SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'STATISTICS') LOOP EXECUTE IMMEDIATE 'drop table Statistics cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table Statistics 2 ( 3 statisticID integer not null, 4 observedEntityID integer not null, 5 observedEntityType integer not null, 6 type integer not null, 7 numericValue numeric(38), 8 stringValue varchar(2048 CHAR), 9 captureDate timestamp not null 10 ) 11 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_STATISTICS') LOOP EXECUTE IMMEDIATE 'drop sequence seq_Statistics'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_Statistics start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE Statistics ADD CONSTRAINT Statistics_pk PRIMARY KEY (statisticID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- PacketStatistics SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'PACKETSTATISTICS') LOOP EXECUTE IMMEDIATE 'drop table PacketStatistics cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table PacketStatistics 2 ( 3 statisticID integer not null, 4 observedEntityID integer not null, 5 observedEntityType integer not null, 6 type integer not null, 7 numericValue numeric(38), 8 stringValue varchar(2048 CHAR), 9 captureDate timestamp not null, 10 protocolType integer not null, 11 srcIP varchar(39 CHAR), 12 srcPort integer, 13 dstIP varchar(39 CHAR), 14 dstPort integer 15 ) 16 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_PACKETSTATISTICS') LOOP EXECUTE IMMEDIATE 'drop sequence seq_PacketStatistics'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_PacketStatistics start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE PacketStatistics ADD CONSTRAINT PacketStatistics_pk PRIMARY KEY (statisticID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- L7Statistics SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'L7STATISTICS') LOOP EXECUTE IMMEDIATE 'drop table L7Statistics cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table L7Statistics 2 ( 3 statisticID integer not null, 4 observedEntityID integer not null, 5 observedEntityType integer not null, 6 type integer not null, 7 numericValue numeric(38), 8 stringValue varchar(2048 CHAR), 9 captureDate timestamp not null, 10 protocolType integer not null, 11 originator varchar(1024 CHAR) not null, 12 recipient varchar(1024 CHAR) not null 13 ) 14 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_L7STATISTICS') LOOP EXECUTE IMMEDIATE 'drop sequence seq_L7Statistics'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_L7Statistics start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE L7Statistics ADD CONSTRAINT L7Statistics_pk PRIMARY KEY (statisticID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- ProtocolFilter SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'PROTOCOLFILTER') LOOP EXECUTE IMMEDIATE 'drop table ProtocolFilter cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table ProtocolFilter 2 ( 3 protocolFilterID integer not null, 4 protocolID integer not null, 5 activationStatus integer not null, 6 sourceFilter varchar(2048 CHAR), 7 destinationFilter varchar(2048 CHAR), 8 l7SenderFilter varchar(2048 CHAR), 9 l7RecipientFilter varchar(2048 CHAR), 10 content varchar(256 CHAR), 11 samplingPercentage integer not null, 12 contentDepthOfSearch integer not null, 13 maxTimeoutTillWritten integer not null, 14 maxTimeoutTillDropped integer not null, 15 maxStreamPackets integer not null, 16 minStreamSize integer not null, 17 maxStreamSize integer not null, 18 segmentInterval integer not null, 19 noTrafficTimeout integer not null, 20 packetCaptureChannelID integer 21 ) 22 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_PROTOCOLFILTER') LOOP EXECUTE IMMEDIATE 'drop sequence seq_ProtocolFilter'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_ProtocolFilter start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE ProtocolFilter ADD CONSTRAINT ProtocolFilter_pk PRIMARY KEY (protocolFilterID); Table altered. SQL> SQL> SQL> ALTER TABLE ProtocolFilter ADD CONSTRAINT ProtocolFilter_fk1 FOREIGN KEY (protocolID) references Protocol(protocolID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE ProtocolFilter ADD CONSTRAINT ProtocolFilter_fk2 FOREIGN KEY (packetCaptureChannelID) references PacketCaptureChannel(monitorChannelID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX ProtocolFilter_fk1 ON ProtocolFilter(protocolID); Index created. SQL> CREATE INDEX ProtocolFilter_fk2 ON ProtocolFilter(packetCaptureChannelID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- CommandInfo SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'COMMANDINFO') LOOP EXECUTE IMMEDIATE 'drop table CommandInfo cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table CommandInfo 2 ( 3 commandInfoID integer not null, 4 configName varchar(64 CHAR) not null, 5 commandName varchar(64 CHAR) not null, 6 data blob not null, 7 isEnabled integer not null, 8 isPrototype integer not null, 9 prototypeID integer, 10 metaData varchar(2048 CHAR), 11 uuid varchar(36 CHAR) not null unique, 12 versionuuid varchar(36 CHAR) not null unique 13 ) 14 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_COMMANDINFO') LOOP EXECUTE IMMEDIATE 'drop sequence seq_CommandInfo'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_CommandInfo start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE CommandInfo ADD CONSTRAINT CommandInfo_pk PRIMARY KEY (commandInfoID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- CommandInfoCredentialMapping - Intermediary SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'COMMANDINFOCREDENTIALMAPPING') LOOP EXECUTE IMMEDIATE 'drop table CommandInfoCredentialMapping cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table CommandInfoCredentialMapping 2 ( 3 commandInfoID integer not null, 4 credentialID integer not null 5 ) 6 ; Table created. SQL> SQL> ALTER TABLE CommandInfoCredentialMapping ADD CONSTRAINT CommandInfoCredentialMappi_PK primary key(commandInfoID,credentialID); Table altered. SQL> SQL> SQL> SQL> ALTER TABLE CommandInfoCredentialMapping ADD CONSTRAINT CommandInfoCredentialMappi_fk1 FOREIGN KEY (commandInfoID) references CommandInfo(commandInfoID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE CommandInfoCredentialMapping ADD CONSTRAINT CommandInfoCredentialMappi_fk2 FOREIGN KEY (credentialID) references Credential(credentialID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX CommandInfoCredentialMappi_fk1 ON CommandInfoCredentialMapping(commandInfoID); Index created. SQL> CREATE INDEX CommandInfoCredentialMappi_fk2 ON CommandInfoCredentialMapping(credentialID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- ResponseRule SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'RESPONSERULE') LOOP EXECUTE IMMEDIATE 'drop table ResponseRule cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table ResponseRule 2 ( 3 responseRuleID integer not null, 4 name varchar(64 CHAR) not null, 5 description varchar(500 CHAR), 6 isManual integer not null, 7 conditions clob, 8 isVisible integer default 1 not null CHECK (isVisible IN (0,1)), 9 responseRuleOrder integer default 0 not null check (responseRuleOrder >= 0), 10 uuid varchar(36 CHAR) not null unique, 11 version integer default 1 not null, 12 versionuuid varchar(36 CHAR) not null unique 13 ) 14 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_RESPONSERULE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_ResponseRule'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_ResponseRule start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE ResponseRule ADD CONSTRAINT ResponseRule_pk PRIMARY KEY (responseRuleID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- RoleSmartResponseMapping - Intermediary SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'ROLESMARTRESPONSEMAPPING') LOOP EXECUTE IMMEDIATE 'drop table RoleSmartResponseMapping cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table RoleSmartResponseMapping 2 ( 3 roleID integer not null, 4 executableSmartResponseRuleID integer not null 5 ) 6 ; Table created. SQL> SQL> ALTER TABLE RoleSmartResponseMapping ADD CONSTRAINT RoleSmartResponseMapping_PK primary key (roleID, executableSmartResponseRuleID); Table altered. SQL> SQL> SQL> SQL> ALTER TABLE RoleSmartResponseMapping ADD CONSTRAINT RoleSmartResponseMapping_fk1 FOREIGN KEY (roleID) references Role(roleID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE RoleSmartResponseMapping ADD CONSTRAINT RoleSmartResponseMapping_fk2 FOREIGN KEY (executableSmartResponseRuleID) references ResponseRule(responseRuleID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX RoleSmartResponseMapping_fk1 ON RoleSmartResponseMapping(roleID); Index created. SQL> CREATE INDEX RoleSmartResponseMapping_fk2 ON RoleSmartResponseMapping(executableSmartResponseRuleID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DeviceResponseRuleMap - Intermediary SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DEVICERESPONSERULEMAP') LOOP EXECUTE IMMEDIATE 'drop table DeviceResponseRuleMap cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DeviceResponseRuleMap 2 ( 3 responseRuleID integer not null, 4 deviceDefinitionID integer not null 5 ) 6 ; Table created. SQL> SQL> ALTER TABLE DeviceResponseRuleMap ADD CONSTRAINT DeviceResponseRuleMap_PK primary key(responseRuleID, deviceDefinitionID); Table altered. SQL> SQL> SQL> SQL> ALTER TABLE DeviceResponseRuleMap ADD CONSTRAINT DeviceResponseRuleMap_fk1 FOREIGN KEY (responseRuleID) references ResponseRule(responseRuleID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE DeviceResponseRuleMap ADD CONSTRAINT DeviceResponseRuleMap_fk2 FOREIGN KEY (deviceDefinitionID) references DeviceDefinition(deviceDefinitionID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX DeviceResponseRuleMap_fk1 ON DeviceResponseRuleMap(responseRuleID); Index created. SQL> CREATE INDEX DeviceResponseRuleMap_fk2 ON DeviceResponseRuleMap(deviceDefinitionID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- ResponseRuleCommandInfo - Intermediary SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'RESPONSERULECOMMANDINFO') LOOP EXECUTE IMMEDIATE 'drop table ResponseRuleCommandInfo cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table ResponseRuleCommandInfo 2 ( 3 responseRuleID integer not null, 4 commandInfoID integer not null 5 ) 6 ; Table created. SQL> SQL> ALTER TABLE ResponseRuleCommandInfo ADD CONSTRAINT ResponseRuleCommandInfo_PK primary key(responseRuleID, commandInfoID); Table altered. SQL> SQL> SQL> SQL> ALTER TABLE ResponseRuleCommandInfo ADD CONSTRAINT ResponseRuleCommandInfo_fk1 FOREIGN KEY (responseRuleID) references ResponseRule(responseRuleID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE ResponseRuleCommandInfo ADD CONSTRAINT ResponseRuleCommandInfo_fk2 FOREIGN KEY (commandInfoID) references CommandInfo(commandInfoID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX ResponseRuleCommandInfo_fk1 ON ResponseRuleCommandInfo(responseRuleID); Index created. SQL> CREATE INDEX ResponseRuleCommandInfo_fk2 ON ResponseRuleCommandInfo(commandInfoID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- PolicyResponseRule SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'POLICYRESPONSERULE') LOOP EXECUTE IMMEDIATE 'drop table PolicyResponseRule cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table PolicyResponseRule 2 ( 3 policyResponseRuleID integer not null, 4 policyID integer not null, 5 responseRuleID integer not null 6 ) 7 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_POLICYRESPONSERULE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_PolicyResponseRule'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_PolicyResponseRule start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE PolicyResponseRule ADD CONSTRAINT PolicyResponseRule_pk PRIMARY KEY (policyResponseRuleID); Table altered. SQL> SQL> SQL> ALTER TABLE PolicyResponseRule ADD CONSTRAINT PolicyResponseRule_fk1 FOREIGN KEY (policyID) references Policy(policyID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE PolicyResponseRule ADD CONSTRAINT PolicyResponseRule_fk2 FOREIGN KEY (responseRuleID) references ResponseRule(responseRuleID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX PolicyResponseRule_fk1 ON PolicyResponseRule(policyID); Index created. SQL> CREATE INDEX PolicyResponseRule_fk2 ON PolicyResponseRule(responseRuleID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- IncidentMessageMapping SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'INCIDENTMESSAGEMAPPING') LOOP EXECUTE IMMEDIATE 'drop table IncidentMessageMapping cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table IncidentMessageMapping 2 ( 3 incidentID numeric(38) not null, 4 messageID numeric(38) not null, 5 blobRetention integer not null, 6 processed integer not null 7 ) 8 ; Table created. SQL> SQL> SQL> ALTER TABLE IncidentMessageMapping ADD CONSTRAINT IncidentMessageMapping_fk1 FOREIGN KEY (incidentID) references Incident(incidentID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE IncidentMessageMapping ADD CONSTRAINT IncidentMessageMapping_fk2 FOREIGN KEY (messageID) references Message(messageID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX IncidentMessageMapping_fk1 ON IncidentMessageMapping(incidentID); Index created. SQL> CREATE INDEX IncidentMessageMapping_fk2 ON IncidentMessageMapping(messageID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- AgentEventCategory SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'AGENTEVENTCATEGORY') LOOP EXECUTE IMMEDIATE 'drop table AgentEventCategory cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table AgentEventCategory 2 ( 3 categoryID integer not null, 4 categoryCode varchar(30 CHAR) not null, 5 categoryName varchar(100 CHAR) not null, 6 isInternationalized integer default 0 not null CHECK (isInternationalized IN (0,1)), 7 categoryCodeID integer default 0 not null, 8 categoryType integer default 0 not null 9 ) 10 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_AGENTEVENTCATEGORY') LOOP EXECUTE IMMEDIATE 'drop sequence seq_AgentEventCategory'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_AgentEventCategory start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE AgentEventCategory ADD CONSTRAINT AgentEventCategory_pk PRIMARY KEY (categoryID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- AgentEventCategoryStatus SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'AGENTEVENTCATEGORYSTATUS') LOOP EXECUTE IMMEDIATE 'drop table AgentEventCategoryStatus cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table AgentEventCategoryStatus 2 ( 3 categoryStatusID integer not null, 4 categoryID integer not null, 5 categoryStatusName varchar(100 CHAR) not null, 6 categoryStatusSummary varchar(100 CHAR) not null, 7 categoryStatusDescription varchar(1024 CHAR) not null, 8 severity integer not null, 9 agentStatus varchar(15 CHAR), 10 isInternationalized integer default 0 not null CHECK (isInternationalized IN (0,1)), 11 subCategoryCodeID integer default 0 not null 12 ) 13 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_AGENTEVENTCATEGORYSTATUS') LOOP EXECUTE IMMEDIATE 'drop sequence seq_AgentEventCategoryStatus'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_AgentEventCategoryStatus start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE AgentEventCategoryStatus ADD CONSTRAINT AgentEventCategoryStatus_pk PRIMARY KEY (categoryStatusID); Table altered. SQL> SQL> SQL> ALTER TABLE AgentEventCategoryStatus ADD CONSTRAINT AgentEventCategoryStatus_fk1 FOREIGN KEY (categoryID) references AgentEventCategory(categoryID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX AgentEventCategoryStatus_fk1 ON AgentEventCategoryStatus(categoryID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- Agent SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'AGENT') LOOP EXECUTE IMMEDIATE 'drop table Agent cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table Agent 2 ( 3 agentID integer not null, 4 agentName varchar(256 CHAR) not null, 5 aggregatorID integer not null, 6 version varchar(20 CHAR), 7 status integer default 0 not null CHECK (status IN (0, 1, 2, 3, 4, 5)), 8 isDeleted integer default 0 not null CHECK (isDeleted IN (0,1)), 9 osName varchar(256 CHAR), 10 architecture varchar(32 CHAR), 11 agentIPAddress varchar(32 CHAR), 12 connectStatus integer default 0 not null CHECK (connectStatus IN (0, 1, 2)), 13 agentConfigurationVersionID integer, 14 investigating integer default 0 not null CHECK (investigating IN (0,1)), 15 lastConnectionTime timestamp, 16 loglevelchanged integer default 0 not null CHECK (loglevelchanged IN (0,1)), 17 alertsCount integer default 0 not null, 18 connectStatusChangeTime timestamp, 19 lastAgentGroupID numeric(19), 20 lastAgentGroupVersion numeric(10), 21 family integer default 0 not null, 22 lastGroupStatusChangeTime timestamp, 23 osInfoTime timestamp, 24 agentStateTime timestamp, 25 versionTime timestamp, 26 agentIPAddressTime timestamp, 27 connectStatusTime timestamp, 28 agentConfigurationVersionTime timestamp, 29 loglevelchangedTime timestamp 30 ) 31 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_AGENT') LOOP EXECUTE IMMEDIATE 'drop sequence seq_Agent'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_Agent start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE Agent ADD CONSTRAINT Agent_pk PRIMARY KEY (agentID); Table altered. SQL> SQL> SQL> ALTER TABLE Agent ADD CONSTRAINT Agent_fk1 FOREIGN KEY (aggregatorID) references InformationMonitor(informationMonitorID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE Agent ADD CONSTRAINT Agent_fk2 FOREIGN KEY (agentConfigurationVersionID) references AgentConfigurationVersion(agentConfigurationVersionID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX Agent_fk1 ON Agent(aggregatorID); Index created. SQL> CREATE INDEX Agent_fk2 ON Agent(agentConfigurationVersionID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- AgentStatus SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'AGENTSTATUS') LOOP EXECUTE IMMEDIATE 'drop table AgentStatus cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table AgentStatus 2 ( 3 agentStatusID integer not null, 4 agentID integer not null, 5 categoryID integer not null, 6 status varchar(15 CHAR), 7 categoryStatusID integer 8 ) 9 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_AGENTSTATUS') LOOP EXECUTE IMMEDIATE 'drop sequence seq_AgentStatus'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_AgentStatus start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE AgentStatus ADD CONSTRAINT AgentStatus_pk PRIMARY KEY (agentStatusID); Table altered. SQL> SQL> SQL> ALTER TABLE AgentStatus ADD CONSTRAINT AgentStatus_fk1 FOREIGN KEY (agentID) references Agent(agentID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE AgentStatus ADD CONSTRAINT AgentStatus_fk2 FOREIGN KEY (categoryID) references AgentEventCategory(categoryID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE AgentStatus ADD CONSTRAINT AgentStatus_fk3 FOREIGN KEY (categoryStatusID) references AgentEventCategoryStatus(categoryStatusID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX AgentStatus_fk1 ON AgentStatus(agentID); Index created. SQL> CREATE INDEX AgentStatus_fk2 ON AgentStatus(categoryID); Index created. SQL> CREATE INDEX AgentStatus_fk3 ON AgentStatus(categoryStatusID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- AgentEvent SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'AGENTEVENT') LOOP EXECUTE IMMEDIATE 'drop table AgentEvent cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table AgentEvent 2 ( 3 agentEventID numeric(38) not null, 4 agentID integer not null, 5 eventDate timestamp not null, 6 categoryStatusID integer not null, 7 extendedValue varchar(4000 CHAR), 8 isDeleted integer, 9 isLatest varchar(1) 10 ) 11 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_AGENTEVENT') LOOP EXECUTE IMMEDIATE 'drop sequence seq_AgentEvent'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_AgentEvent start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE AgentEvent ADD CONSTRAINT AgentEvent_pk PRIMARY KEY (agentEventID); Table altered. SQL> SQL> SQL> ALTER TABLE AgentEvent ADD CONSTRAINT AgentEvent_fk1 FOREIGN KEY (agentID) references Agent(agentID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE AgentEvent ADD CONSTRAINT AgentEvent_fk2 FOREIGN KEY (categoryStatusID) references AgentEventCategoryStatus(categoryStatusID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX AgentEvent_fk1 ON AgentEvent(agentID); Index created. SQL> CREATE INDEX AgentEvent_fk2 ON AgentEvent(categoryStatusID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- AuditLog SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'AUDITLOG') LOOP EXECUTE IMMEDIATE 'drop table AuditLog cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table AuditLog 2 ( 3 auditLogID numeric(38) not null, 4 time timestamp not null, 5 ipAddress varchar(2048 CHAR), 6 username varchar(2048 CHAR) not null, 7 role varchar(2048 CHAR), 8 entity varchar(2048 CHAR) not null, 9 action varchar(2048 CHAR) not null, 10 detail clob 11 ) 12 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_AUDITLOG') LOOP EXECUTE IMMEDIATE 'drop sequence seq_AuditLog'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_AuditLog start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE AuditLog ADD CONSTRAINT AuditLog_pk PRIMARY KEY (auditLogID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- EnforceVersion SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'ENFORCEVERSION') LOOP EXECUTE IMMEDIATE 'drop table EnforceVersion cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table EnforceVersion 2 ( 3 version varchar(20) not null, 4 DateInstalled timestamp not null, 5 isCurrentVersion varchar(1) DEFAULT 'Y' NOT NULL CHECK (IsCurrentVersion IN ('Y', 'N')) 6 ) 7 ; Table created. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- EndpointJustificationLabel SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'ENDPOINTJUSTIFICATIONLABEL') LOOP EXECUTE IMMEDIATE 'drop table EndpointJustificationLabel cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table EndpointJustificationLabel 2 ( 3 endpointJustificationLabelID integer not null, 4 text varchar(30 CHAR) not null, 5 isDeleted integer not null CHECK (isDeleted in (0, 1)), 6 type varchar(30 CHAR) not null CHECK (type in ('TIMEOUT', 'USER_SUPPLIED', 'MODIFIABLE', 7 'NA')), 8 isInternationalized integer default 0 not null CHECK (isInternationalized IN (0,1)) 9 ) 10 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_ENDPOINTJUSTIFICATIONLABEL') LOOP EXECUTE IMMEDIATE 'drop sequence seq_EndpointJustificationLabel'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_EndpointJustificationLabel start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE EndpointJustificationLabel ADD CONSTRAINT EndpointJustificationLabel_pk PRIMARY KEY (endpointJustificationLabelID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- IncidentJustification SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'INCIDENTJUSTIFICATION') LOOP EXECUTE IMMEDIATE 'drop table IncidentJustification cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table IncidentJustification 2 ( 3 incidentJustificationID integer not null, 4 incidentID numeric(38) not null unique, 5 endpointJustificationLabelID integer not null, 6 endpointJustificationText varchar(100 CHAR) 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_INCIDENTJUSTIFICATION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_IncidentJustification'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_IncidentJustification start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE IncidentJustification ADD CONSTRAINT IncidentJustification_pk PRIMARY KEY (incidentJustificationID); Table altered. SQL> SQL> SQL> ALTER TABLE IncidentJustification ADD CONSTRAINT IncidentJustification_fk1 FOREIGN KEY (incidentID) references Incident(incidentID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE IncidentJustification ADD CONSTRAINT IncidentJustification_fk2 FOREIGN KEY (endpointJustificationLabelID) references EndpointJustificationLabel(endpointJustificationLabelID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX IncidentJustification_fk2 ON IncidentJustification(endpointJustificationLabelID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- AppFileAccessConfig SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'APPFILEACCESSCONFIG') LOOP EXECUTE IMMEDIATE 'drop table AppFileAccessConfig cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table AppFileAccessConfig 2 ( 3 applicationFileAccessID integer not null, 4 blockType varchar(4) default 'READ' not null CHECK (blockType in ('READ', 'OPEN')), 5 immutable integer default 1 not null CHECK (immutable IN (0,1)) 6 ) 7 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_APPFILEACCESSCONFIG') LOOP EXECUTE IMMEDIATE 'drop sequence seq_AppFileAccessConfig'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_AppFileAccessConfig start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE AppFileAccessConfig ADD CONSTRAINT AppFileAccessConfig_pk PRIMARY KEY (applicationFileAccessID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- Application SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'APPLICATION') LOOP EXECUTE IMMEDIATE 'drop table Application cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table Application 2 ( 3 applicationID integer not null, 4 applicationFileAccessID integer unique, 5 productAlias varchar(255 CHAR) not null, 6 binaryName varchar(255 CHAR) unique, 7 internalName varchar(255 CHAR) unique, 8 originalFilename varchar(255 CHAR) unique, 9 publisherName varchar(255 CHAR), 10 verifySignature integer default 0 not null CHECK (verifySignature IN (0,1)), 11 immutable integer default 1 not null CHECK (immutable IN (0,1)), 12 internal integer default 0 not null CHECK (internal IN (0,1)), 13 identifier integer not null unique, 14 applicationType varchar(24) default 'GENERIC' not null CHECK (applicationType in ('GENERIC','CD_DVD','CLOUD_SYNC')), 15 supportCopyPaste integer default 0 not null CHECK (supportCopyPaste IN (0,1)) 16 ) 17 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_APPLICATION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_Application'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_Application start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE Application ADD CONSTRAINT Application_pk PRIMARY KEY (applicationID); Table altered. SQL> SQL> SQL> ALTER TABLE Application ADD CONSTRAINT Application_fk1 FOREIGN KEY (applicationFileAccessID) references AppFileAccessConfig(applicationFileAccessID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- ApplicationFilter SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'APPLICATIONFILTER') LOOP EXECUTE IMMEDIATE 'drop table ApplicationFilter cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table ApplicationFilter 2 ( 3 applicationFilterID integer not null, 4 applicationID integer not null, 5 applicationFilterAction varchar(7) check (applicationFilterAction in ('Monitor', 'Ignore')), 6 applicationFilterType varchar(15) NOT NULL CHECK (applicationFilterType IN ('NETWORK', 'PRINT_FAX', 'CLIPBOARD', 'WININET', 'FILESYSTEM','FILEOP','NSPR','CLIPBOARD_PASTE','BROWSER_SHELL')), 7 immutable integer default 1 not null CHECK (immutable IN (0,1)) 8 ) 9 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_APPLICATIONFILTER') LOOP EXECUTE IMMEDIATE 'drop sequence seq_ApplicationFilter'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_ApplicationFilter start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE ApplicationFilter ADD CONSTRAINT ApplicationFilter_pk PRIMARY KEY (applicationFilterID); Table altered. SQL> SQL> SQL> ALTER TABLE ApplicationFilter ADD CONSTRAINT ApplicationFilter_fk1 FOREIGN KEY (applicationID) references Application(applicationID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX ApplicationFilter_fk1 ON ApplicationFilter(applicationID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- AgentConfigurationSetting SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'AGENTCONFIGURATIONSETTING') LOOP EXECUTE IMMEDIATE 'drop table AgentConfigurationSetting cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table AgentConfigurationSetting 2 ( 3 agentConfigurationSettingID integer not null, 4 agentConfigurationVersionID integer not null , 5 name varchar(255) not null, 6 setting varchar(255) not null, 7 type varchar(31) not null, 8 value varchar(2048), 9 advanced integer default 0 not null CHECK (advanced IN (0,1)) 10 ) 11 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_AGENTCONFIGURATIONSETTING') LOOP EXECUTE IMMEDIATE 'drop sequence seq_AgentConfigurationSetting'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_AgentConfigurationSetting start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE AgentConfigurationSetting ADD CONSTRAINT AgentConfigurationSetting_pk PRIMARY KEY (agentConfigurationSettingID); Table altered. SQL> SQL> SQL> ALTER TABLE AgentConfigurationSetting ADD CONSTRAINT AgentConfigurationSetting_fk1 FOREIGN KEY (agentConfigurationVersionID) references AgentConfigurationVersion(agentConfigurationVersionID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX AgentConfigurationSetting_fk1 ON AgentConfigurationSetting(agentConfigurationVersionID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- FileFilter SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'FILEFILTER') LOOP EXECUTE IMMEDIATE 'drop table FileFilter cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table FileFilter 2 ( 3 fileFilterID integer not null, 4 agentConfigurationVersionID integer not null , 5 filterAction varchar(7) check (filterAction in ('Monitor', 'Ignore')), 6 filterOrder integer not null check (filterOrder >= 1), 7 checkFileSize integer default 0 not null check (checkFileSize in (0, 1)), 8 fileSizeBytes integer check (fileSizeBytes >= 0), 9 fileSizeOperator varchar(4) check (fileSizeOperator in ('GT', 'LT', 'EQ', 'GTEQ', 'LTEQ')), 10 checkFilePath integer default 0 not null check (checkFilePath in (0, 1)), 11 checkFileType integer default 0 not null check (checkFileType in (0, 1)) 12 ) 13 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_FILEFILTER') LOOP EXECUTE IMMEDIATE 'drop sequence seq_FileFilter'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_FileFilter start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE FileFilter ADD CONSTRAINT FileFilter_pk PRIMARY KEY (fileFilterID); Table altered. SQL> SQL> SQL> ALTER TABLE FileFilter ADD CONSTRAINT FileFilter_fk1 FOREIGN KEY (agentConfigurationVersionID) references AgentConfigurationVersion(agentConfigurationVersionID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX FileFilter_fk1 ON FileFilter(agentConfigurationVersionID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- FileFilterTarget SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'FILEFILTERTARGET') LOOP EXECUTE IMMEDIATE 'drop table FileFilterTarget cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table FileFilterTarget 2 ( 3 fileFilterTargetID integer not null, 4 fileFilterID integer not null, 5 fileFilterTarget varchar(32) not null check (fileFilterTarget in ('REMOVABLE_MEDIA', 'CD_DVD', 'LOCAL_DRIVE', 'NETWORK_SHARE', 'EMAIL_ATTACHMENT', 'HTTP_ATTACHMENT', 'IM_FILE_TRANSFER', 'FTP_TRANSFER','APPLICATION_FILE_ACCESS','CLOUD_SYNC')) 6 ) 7 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_FILEFILTERTARGET') LOOP EXECUTE IMMEDIATE 'drop sequence seq_FileFilterTarget'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_FileFilterTarget start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE FileFilterTarget ADD CONSTRAINT FileFilterTarget_pk PRIMARY KEY (fileFilterTargetID); Table altered. SQL> SQL> SQL> ALTER TABLE FileFilterTarget ADD CONSTRAINT FileFilterTarget_fk1 FOREIGN KEY (fileFilterID) references FileFilter(fileFilterID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX FileFilterTarget_fk1 ON FileFilterTarget(fileFilterID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- FileFilterFileType SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'FILEFILTERFILETYPE') LOOP EXECUTE IMMEDIATE 'drop table FileFilterFileType cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table FileFilterFileType 2 ( 3 fileFilterFileTypeID integer not null, 4 fileFilterID integer not null, 5 fileType varchar(256) not null 6 ) 7 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_FILEFILTERFILETYPE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_FileFilterFileType'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_FileFilterFileType start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE FileFilterFileType ADD CONSTRAINT FileFilterFileType_pk PRIMARY KEY (fileFilterFileTypeID); Table altered. SQL> SQL> SQL> ALTER TABLE FileFilterFileType ADD CONSTRAINT FileFilterFileType_fk1 FOREIGN KEY (fileFilterID) references FileFilter(fileFilterID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX FileFilterFileType_fk1 ON FileFilterFileType(fileFilterID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- FileFilterFilePath SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'FILEFILTERFILEPATH') LOOP EXECUTE IMMEDIATE 'drop table FileFilterFilePath cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table FileFilterFilePath 2 ( 3 fileFilterFilePathID integer not null, 4 fileFilterID integer not null, 5 filePath varchar(1024) not null 6 ) 7 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_FILEFILTERFILEPATH') LOOP EXECUTE IMMEDIATE 'drop sequence seq_FileFilterFilePath'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_FileFilterFilePath start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE FileFilterFilePath ADD CONSTRAINT FileFilterFilePath_pk PRIMARY KEY (fileFilterFilePathID); Table altered. SQL> SQL> SQL> ALTER TABLE FileFilterFilePath ADD CONSTRAINT FileFilterFilePath_fk1 FOREIGN KEY (fileFilterID) references FileFilter(fileFilterID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX FileFilterFilePath_fk1 ON FileFilterFilePath(fileFilterID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DirectoryGroupEntry SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DIRECTORYGROUPENTRY') LOOP EXECUTE IMMEDIATE 'drop table DirectoryGroupEntry cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DirectoryGroupEntry 2 ( 3 directoryGroupID integer not null, 4 directoryConnectionID integer not null, 5 directoryGroupEntryID integer not null, 6 distinguishedName varchar(2048 CHAR) not null 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DIRECTORYGROUPENTRY') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DirectoryGroupEntry'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DirectoryGroupEntry start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DirectoryGroupEntry ADD CONSTRAINT DirectoryGroupEntry_pk PRIMARY KEY (directoryGroupEntryID); Table altered. SQL> SQL> SQL> ALTER TABLE DirectoryGroupEntry ADD CONSTRAINT DirectoryGroupEntry_fk1 FOREIGN KEY (directoryGroupID) references DirectoryGroup(directoryGroupID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE DirectoryGroupEntry ADD CONSTRAINT DirectoryGroupEntry_fk2 FOREIGN KEY (directoryConnectionID) references DirectoryConnection(directoryConnectionID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX DirectoryGroupEntry_fk1 ON DirectoryGroupEntry(directoryGroupID); Index created. SQL> CREATE INDEX DirectoryGroupEntry_fk2 ON DirectoryGroupEntry(directoryConnectionID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- Vontu_Stats_Collection_Profile SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'VONTU_STATS_COLLECTION_PROFILE') LOOP EXECUTE IMMEDIATE 'drop table Vontu_Stats_Collection_Profile cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table Vontu_Stats_Collection_Profile 2 ( 3 incident_cnt_threshold integer default 5000 not null, 4 always_invalidate_cursor varchar(1) default 'N' not null check(always_invalidate_cursor IN ('Y', 'N', 'y', 'n')), 5 gather_all varchar(1) default 'N' not null check(gather_all IN ('Y', 'N', 'y', 'n')) 6 ) 7 ; Table created. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- Vontu_Stats_Collection_Log SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'VONTU_STATS_COLLECTION_LOG') LOOP EXECUTE IMMEDIATE 'drop table Vontu_Stats_Collection_Log cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table Vontu_Stats_Collection_Log 2 ( 3 collection_log_id numeric(38) not null, 4 job_start_time date, 5 job_end_time date, 6 no_invalidate varchar(4) CHECK(no_invalidate IN ('T', 'F', 'AUTO')), 7 incident_rowcount integer, 8 exception varchar(4000), 9 incident_cnt_threshold integer, 10 always_invalidate_cursor varchar(1), 11 gather_all varchar(1) 12 ) 13 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_VONTU_STATS_COLLECTION_LOG') LOOP EXECUTE IMMEDIATE 'drop sequence seq_Vontu_Stats_Collection_Log'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_Vontu_Stats_Collection_Log start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE Vontu_Stats_Collection_Log ADD CONSTRAINT Vontu_Stats_Collection_Log_pk PRIMARY KEY (collection_log_id); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- ConfigFileDelivery SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'CONFIGFILEDELIVERY') LOOP EXECUTE IMMEDIATE 'drop table ConfigFileDelivery cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table ConfigFileDelivery 2 ( 3 configFileDeliveryID integer not null, 4 filePayload blob not null, 5 informationMonitorID integer not null 6 ) 7 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_CONFIGFILEDELIVERY') LOOP EXECUTE IMMEDIATE 'drop sequence seq_ConfigFileDelivery'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_ConfigFileDelivery start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE ConfigFileDelivery ADD CONSTRAINT ConfigFileDelivery_pk PRIMARY KEY (configFileDeliveryID); Table altered. SQL> SQL> SQL> ALTER TABLE ConfigFileDelivery ADD CONSTRAINT ConfigFileDelivery_fk1 FOREIGN KEY (informationMonitorID) references InformationMonitor(informationMonitorID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX ConfigFileDelivery_fk1 ON ConfigFileDelivery(informationMonitorID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- LogCollection SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'LOGCOLLECTION') LOOP EXECUTE IMMEDIATE 'drop table LogCollection cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table LogCollection 2 ( 3 logCollectionID integer not null, 4 timeStarted timestamp not null 5 ) 6 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_LOGCOLLECTION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_LogCollection'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_LogCollection start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE LogCollection ADD CONSTRAINT LogCollection_pk PRIMARY KEY (logCollectionID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- ManagerLogCollectEvent SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'MANAGERLOGCOLLECTEVENT') LOOP EXECUTE IMMEDIATE 'drop table ManagerLogCollectEvent cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table ManagerLogCollectEvent 2 ( 3 logCollectEventID integer not null, 4 maxAgeMillis numeric(38) not null, 5 uploadTraceLogs integer default 0 not null CHECK (uploadTraceLogs in (0, 1)), 6 uploadOperationalLogs integer default 0 not null CHECK (uploadOperationalLogs in (0, 1)), 7 uploadConfigFiles integer default 0 not null CHECK (uploadConfigFiles in (0, 1)), 8 logCollectionID integer not null, 9 isCancelled integer default 0 not null CHECK (isCancelled in (0, 1)), 10 uploadSystemInfo integer default 0 not null CHECK (uploadSystemInfo in (0, 1)) 11 ) 12 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_MANAGERLOGCOLLECTEVENT') LOOP EXECUTE IMMEDIATE 'drop sequence seq_ManagerLogCollectEvent'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_ManagerLogCollectEvent start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE ManagerLogCollectEvent ADD CONSTRAINT ManagerLogCollectEvent_pk PRIMARY KEY (logCollectEventID); Table altered. SQL> SQL> SQL> ALTER TABLE ManagerLogCollectEvent ADD CONSTRAINT ManagerLogCollectEvent_fk1 FOREIGN KEY (logCollectionID) references LogCollection(logCollectionID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX ManagerLogCollectEvent_fk1 ON ManagerLogCollectEvent(logCollectionID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- MonitorLogCollectEvent SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'MONITORLOGCOLLECTEVENT') LOOP EXECUTE IMMEDIATE 'drop table MonitorLogCollectEvent cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table MonitorLogCollectEvent 2 ( 3 logCollectEventID integer not null, 4 maxAgeMillis numeric(38) not null, 5 uploadTraceLogs integer default 0 not null CHECK (uploadTraceLogs in (0, 1)), 6 uploadOperationalLogs integer default 0 not null CHECK (uploadOperationalLogs in (0, 1)), 7 uploadConfigFiles integer default 0 not null CHECK (uploadConfigFiles in (0, 1)), 8 logCollectionID integer not null, 9 isCancelled integer default 0 not null CHECK (isCancelled in (0, 1)), 10 informationMonitorID integer not null, 11 uploadAgentLogs integer default 0 not null CHECK (uploadAgentLogs in (0, 1)) 12 ) 13 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_MONITORLOGCOLLECTEVENT') LOOP EXECUTE IMMEDIATE 'drop sequence seq_MonitorLogCollectEvent'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_MonitorLogCollectEvent start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE MonitorLogCollectEvent ADD CONSTRAINT MonitorLogCollectEvent_pk PRIMARY KEY (logCollectEventID); Table altered. SQL> SQL> SQL> ALTER TABLE MonitorLogCollectEvent ADD CONSTRAINT MonitorLogCollectEvent_fk1 FOREIGN KEY (logCollectionID) references LogCollection(logCollectionID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE MonitorLogCollectEvent ADD CONSTRAINT MonitorLogCollectEvent_fk2 FOREIGN KEY (informationMonitorID) references InformationMonitor(informationMonitorID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX MonitorLogCollectEvent_fk1 ON MonitorLogCollectEvent(logCollectionID); Index created. SQL> CREATE INDEX MonitorLogCollectEvent_fk2 ON MonitorLogCollectEvent(informationMonitorID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- UserSnapshotConfig SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'USERSNAPSHOTCONFIG') LOOP EXECUTE IMMEDIATE 'drop table UserSnapshotConfig cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table UserSnapshotConfig 2 ( 3 userSnapshotConfigID integer not null, 4 userID integer not null unique, 5 tabOne varchar(30) default 'KEY_INFO' not null CHECK (tabOne IN ('KEY_INFO')), 6 tabTwo varchar(30) default 'HISTORY' not null CHECK (tabTwo IN ('HISTORY','NOTES','CORRELATIONS','MESSAGE_BODY','MATCHES','ATTRIBUTES','NONE')), 7 tabThree varchar(30) default 'NOTES' not null CHECK (tabThree IN ('HISTORY','NOTES','CORRELATIONS','MESSAGE_BODY','MATCHES','ATTRIBUTES','NONE')), 8 tabFour varchar(30) default 'CORRELATIONS' not null CHECK (tabFour in ('HISTORY','NOTES','CORRELATIONS','MESSAGE_BODY','MATCHES','ATTRIBUTES','NONE')), 9 leftSection varchar(30) default 'MESSAGE_BODY' not null CHECK (leftSection IN ('HISTORY','NOTES','CORRELATIONS','MESSAGE_BODY','MATCHES','ATTRIBUTES','NONE')), 10 topMiddleSection varchar(30) default 'MATCHES' not null CHECK (topMiddleSection IN ('HISTORY','NOTES','CORRELATIONS','MESSAGE_BODY','MATCHES','ATTRIBUTES','NONE')), 11 bottomMiddleSection varchar(30) default 'NONE' not null CHECK (bottomMiddleSection IN ('HISTORY','NOTES','CORRELATIONS','MESSAGE_BODY','MATCHES','ATTRIBUTES','NONE')), 12 topRightSection varchar(30) default 'ATTRIBUTES' not null CHECK (topRightSection IN ('HISTORY','NOTES','CORRELATIONS','MESSAGE_BODY','MATCHES','ATTRIBUTES','NONE')), 13 bottomRightSection varchar(30) default 'NONE' not null CHECK (bottomRightSection IN ('HISTORY','NOTES','CORRELATIONS','MESSAGE_BODY','MATCHES','ATTRIBUTES','NONE')), 14 smartResponseDisplayCount integer default 4 not null CHECK (smartResponseDisplayCount >= 4) 15 ) 16 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_USERSNAPSHOTCONFIG') LOOP EXECUTE IMMEDIATE 'drop sequence seq_UserSnapshotConfig'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_UserSnapshotConfig start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE UserSnapshotConfig ADD CONSTRAINT UserSnapshotConfig_pk PRIMARY KEY (userSnapshotConfigID); Table altered. SQL> SQL> SQL> ALTER TABLE UserSnapshotConfig ADD CONSTRAINT UserSnapshotConfig_fk1 FOREIGN KEY (userID) references ProtectUser(userID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- SmartResponseDisplayOrder SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'SMARTRESPONSEDISPLAYORDER') LOOP EXECUTE IMMEDIATE 'drop table SmartResponseDisplayOrder cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table SmartResponseDisplayOrder 2 ( 3 smartResponseDisplayOrderID integer not null, 4 userSnapshotConfigID integer not null, 5 responseRuleID integer not null, 6 displayOrder numeric(10) not null 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_SMARTRESPONSEDISPLAYORDER') LOOP EXECUTE IMMEDIATE 'drop sequence seq_SmartResponseDisplayOrder'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_SmartResponseDisplayOrder start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE SmartResponseDisplayOrder ADD CONSTRAINT SmartResponseDisplayOrder_pk PRIMARY KEY (smartResponseDisplayOrderID); Table altered. SQL> SQL> SQL> ALTER TABLE SmartResponseDisplayOrder ADD CONSTRAINT SmartResponseDisplayOrder_fk1 FOREIGN KEY (userSnapshotConfigID) references UserSnapshotConfig(userSnapshotConfigID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE SmartResponseDisplayOrder ADD CONSTRAINT SmartResponseDisplayOrder_fk2 FOREIGN KEY (responseRuleID) references ResponseRule(responseRuleID) on delete cascade DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX SmartResponseDisplayOrder_fk1 ON SmartResponseDisplayOrder(userSnapshotConfigID); Index created. SQL> CREATE INDEX SmartResponseDisplayOrder_fk2 ON SmartResponseDisplayOrder(responseRuleID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- ConditionPluginScript SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'CONDITIONPLUGINSCRIPT') LOOP EXECUTE IMMEDIATE 'drop table ConditionPluginScript cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table ConditionPluginScript 2 ( 3 scriptID integer not null, 4 name varchar(60 CHAR) not null, 5 description varchar(120 CHAR) null, 6 script clob not null 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_CONDITIONPLUGINSCRIPT') LOOP EXECUTE IMMEDIATE 'drop sequence seq_ConditionPluginScript'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_ConditionPluginScript start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE ConditionPluginScript ADD CONSTRAINT ConditionPluginScript_pk PRIMARY KEY (scriptID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- BinaryScriptMatchCondition SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'BINARYSCRIPTMATCHCONDITION') LOOP EXECUTE IMMEDIATE 'drop table BinaryScriptMatchCondition cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table BinaryScriptMatchCondition 2 ( 3 conditionID integer not null, 4 type integer not null, 5 createDate timestamp not null, 6 editDate timestamp not null, 7 name varchar(60 CHAR) not null, 8 processingOrder integer, 9 minimumMatches integer not null, 10 matchType integer not null, 11 metaInformation varchar(4000 CHAR), 12 scriptID integer not null 13 ) 14 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_BINARYSCRIPTMATCHCONDITION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_BinaryScriptMatchCondition'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_BinaryScriptMatchCondition start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE BinaryScriptMatchCondition ADD CONSTRAINT BinaryScriptMatchCondition_pk PRIMARY KEY (conditionID); Table altered. SQL> SQL> SQL> ALTER TABLE BinaryScriptMatchCondition ADD CONSTRAINT BinaryScriptMatchCondition_fk1 FOREIGN KEY (scriptID) references ConditionPluginScript(ScriptID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX BinaryScriptMatchCondition_fk1 ON BinaryScriptMatchCondition(scriptID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- MLDTrainingContent SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'MLDTRAININGCONTENT') LOOP EXECUTE IMMEDIATE 'drop table MLDTrainingContent cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table MLDTrainingContent 2 ( 3 mldTrainingContentID integer not null, 4 mldProfileID integer not null, 5 fileName varchar(256 CHAR) not null, 6 fileSize integer, 7 isPositive integer default 1 not null CHECK (isPositive in (0, 1)), 8 modifiedByUserID integer not null, 9 lastModified timestamp not null, 10 lastModificationType varchar(6) CHECK (lastModificationType IN ('ADD','REMOVE')) 11 ) 12 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_MLDTRAININGCONTENT') LOOP EXECUTE IMMEDIATE 'drop sequence seq_MLDTrainingContent'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_MLDTrainingContent start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE MLDTrainingContent ADD CONSTRAINT MLDTrainingContent_pk PRIMARY KEY (mldTrainingContentID); Table altered. SQL> SQL> SQL> ALTER TABLE MLDTrainingContent ADD CONSTRAINT MLDTrainingContent_fk1 FOREIGN KEY (mldProfileID) references MLDProfile(mldProfileID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE MLDTrainingContent ADD CONSTRAINT MLDTrainingContent_fk2 FOREIGN KEY (modifiedByUserID) references ProtectUser(userID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX MLDTrainingContent_fk1 ON MLDTrainingContent(mldProfileID); Index created. SQL> CREATE INDEX MLDTrainingContent_fk2 ON MLDTrainingContent(modifiedByUserID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- MLDTrainingContentBlob SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'MLDTRAININGCONTENTBLOB') LOOP EXECUTE IMMEDIATE 'drop table MLDTrainingContentBlob cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table MLDTrainingContentBlob 2 ( 3 mldTrainingContentBlobID integer not null, 4 mldTrainingContentID integer not null, 5 keyAlias varchar(50 CHAR), 6 contents blob, 7 contentType varchar(256 CHAR) 8 ) 9 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_MLDTRAININGCONTENTBLOB') LOOP EXECUTE IMMEDIATE 'drop sequence seq_MLDTrainingContentBlob'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_MLDTrainingContentBlob start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE MLDTrainingContentBlob ADD CONSTRAINT MLDTrainingContentBlob_pk PRIMARY KEY (mldTrainingContentBlobID); Table altered. SQL> SQL> SQL> ALTER TABLE MLDTrainingContentBlob ADD CONSTRAINT MLDTrainingContentBlob_fk1 FOREIGN KEY (mldTrainingContentID) references MLDTrainingContent(mldTrainingContentID) on delete cascade DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX MLDTrainingContentBlob_fk1 ON MLDTrainingContentBlob(mldTrainingContentID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- MLDTrainedProfile SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'MLDTRAINEDPROFILE') LOOP EXECUTE IMMEDIATE 'drop table MLDTrainedProfile cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table MLDTrainedProfile 2 ( 3 mldTrainedProfileID integer not null, 4 mldProfileID integer not null, 5 state varchar(9) default 'WORKING' not null CHECK (state in ('WORKING','CANCELING','COMPLETE','APPROVED')), 6 started timestamp, 7 trainingStage varchar(20) CHECK (trainingStage in ('STARTING','CONTENT_EXTRACTION','ACCURACY_CALCULATION','MODEL_GENERATION','FINISHING')), 8 stageProgress integer, 9 finished timestamp, 10 approvedOn timestamp, 11 approvedByUserID integer, 12 exitCode integer, 13 falsePositiveRate double precision, 14 falseNegativeRate double precision, 15 keyAlias varchar(50 CHAR), 16 features blob, 17 featuresLength numeric(38), 18 binaryFeatures blob, 19 binaryFeaturesLength numeric(38), 20 model blob, 21 modelLength numeric(38), 22 binaryModel blob, 23 binaryModelLength numeric(38), 24 featuresAndModel blob, 25 ramSize integer, 26 positiveDocuments integer, 27 negativeDocuments integer, 28 totalFeatures integer, 29 positiveFailedExtraction integer, 30 negativeFailedExtraction integer 31 ) 32 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_MLDTRAINEDPROFILE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_MLDTrainedProfile'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_MLDTrainedProfile start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE MLDTrainedProfile ADD CONSTRAINT MLDTrainedProfile_pk PRIMARY KEY (mldTrainedProfileID); Table altered. SQL> SQL> SQL> ALTER TABLE MLDTrainedProfile ADD CONSTRAINT MLDTrainedProfile_fk1 FOREIGN KEY (mldProfileID) references MLDProfile(mldProfileID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE MLDTrainedProfile ADD CONSTRAINT MLDTrainedProfile_fk2 FOREIGN KEY (approvedByUserID) references ProtectUser(userID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX MLDTrainedProfile_fk1 ON MLDTrainedProfile(mldProfileID); Index created. SQL> CREATE INDEX MLDTrainedProfile_fk2 ON MLDTrainedProfile(approvedByUserID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- MLDFailedExtractionDoc SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'MLDFAILEDEXTRACTIONDOC') LOOP EXECUTE IMMEDIATE 'drop table MLDFailedExtractionDoc cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table MLDFailedExtractionDoc 2 ( 3 mldFailedExtractionDocID integer not null, 4 mldTrainedProfileID integer not null, 5 fileName varchar(256 CHAR) not null, 6 isPositive integer default 1 not null CHECK (isPositive in (0, 1)) 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_MLDFAILEDEXTRACTIONDOC') LOOP EXECUTE IMMEDIATE 'drop sequence seq_MLDFailedExtractionDoc'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_MLDFailedExtractionDoc start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE MLDFailedExtractionDoc ADD CONSTRAINT MLDFailedExtractionDoc_pk PRIMARY KEY (mldFailedExtractionDocID); Table altered. SQL> SQL> SQL> ALTER TABLE MLDFailedExtractionDoc ADD CONSTRAINT MLDFailedExtractionDoc_fk1 FOREIGN KEY (mldTrainedProfileID) references MLDTrainedProfile(mldTrainedProfileID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX MLDFailedExtractionDoc_fk1 ON MLDFailedExtractionDoc(mldTrainedProfileID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- SslCertificate SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'SSLCERTIFICATE') LOOP EXECUTE IMMEDIATE 'drop table SslCertificate cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table SslCertificate 2 ( 3 sslCertificateID integer not null, 4 certificate blob not null 5 ) 6 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_SSLCERTIFICATE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_SslCertificate'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_SslCertificate start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE SslCertificate ADD CONSTRAINT SslCertificate_pk PRIMARY KEY (sslCertificateID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- PolicyStatistics SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'POLICYSTATISTICS') LOOP EXECUTE IMMEDIATE 'drop table PolicyStatistics cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table PolicyStatistics 2 ( 3 policyStatisticsID integer not null, 4 policyID integer not null, 5 incidentCount integer default 0 not null CHECK (incidentCount >= 0) 6 ) 7 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_POLICYSTATISTICS') LOOP EXECUTE IMMEDIATE 'drop sequence seq_PolicyStatistics'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_PolicyStatistics start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE PolicyStatistics ADD CONSTRAINT PolicyStatistics_pk PRIMARY KEY (policyStatisticsID); Table altered. SQL> SQL> SQL> ALTER TABLE PolicyStatistics ADD CONSTRAINT PolicyStatistics_fk1 FOREIGN KEY (policyID) references Policy(policyID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX PolicyStatistics_fk1 ON PolicyStatistics(policyID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- CustomScriptDIValidator SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'CUSTOMSCRIPTDIVALIDATOR') LOOP EXECUTE IMMEDIATE 'drop table CustomScriptDIValidator cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table CustomScriptDIValidator 2 ( 3 validatorID integer not null, 4 uuid varchar(36 CHAR) not null unique, 5 name varchar(150 CHAR) not null, 6 version integer not null, 7 description varchar(250 CHAR), 8 isInternationalized integer not null CHECK (isInternationalized IN (0,1)), 9 isGlobal integer not null CHECK (isGlobal IN (0,1)), 10 versionuuid varchar(36 CHAR) not null unique, 11 script clob not null 12 ) 13 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_CUSTOMSCRIPTDIVALIDATOR') LOOP EXECUTE IMMEDIATE 'drop sequence seq_CustomScriptDIValidator'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_CustomScriptDIValidator start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE CustomScriptDIValidator ADD CONSTRAINT CustomScriptDIValidator_pk PRIMARY KEY (validatorID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- SystemDIValidator SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'SYSTEMDIVALIDATOR') LOOP EXECUTE IMMEDIATE 'drop table SystemDIValidator cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table SystemDIValidator 2 ( 3 validatorID integer not null, 4 uuid varchar(36 CHAR) not null unique, 5 name varchar(150 CHAR) not null, 6 version integer not null, 7 description varchar(250 CHAR), 8 isInternationalized integer not null CHECK (isInternationalized IN (0,1)), 9 isGlobal integer not null CHECK (isGlobal IN (0,1)), 10 versionuuid varchar(36 CHAR) not null unique, 11 factoryIdentifier varchar(150 CHAR) not null 12 ) 13 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_SYSTEMDIVALIDATOR') LOOP EXECUTE IMMEDIATE 'drop sequence seq_SystemDIValidator'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_SystemDIValidator start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE SystemDIValidator ADD CONSTRAINT SystemDIValidator_pk PRIMARY KEY (validatorID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- ParameterizedDIValidator SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'PARAMETERIZEDDIVALIDATOR') LOOP EXECUTE IMMEDIATE 'drop table ParameterizedDIValidator cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table ParameterizedDIValidator 2 ( 3 validatorID integer not null, 4 uuid varchar(36 CHAR) not null unique, 5 name varchar(150 CHAR) not null, 6 version integer not null, 7 description varchar(250 CHAR), 8 isInternationalized integer not null CHECK (isInternationalized IN (0,1)), 9 isGlobal integer not null CHECK (isGlobal IN (0,1)), 10 versionuuid varchar(36 CHAR) not null unique, 11 factoryIdentifier varchar(150 CHAR) not null, 12 parameterDescription varchar(250 CHAR) not null 13 ) 14 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_PARAMETERIZEDDIVALIDATOR') LOOP EXECUTE IMMEDIATE 'drop sequence seq_ParameterizedDIValidator'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_ParameterizedDIValidator start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE ParameterizedDIValidator ADD CONSTRAINT ParameterizedDIValidator_pk PRIMARY KEY (validatorID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DataIdentifierPattern SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DATAIDENTIFIERPATTERN') LOOP EXECUTE IMMEDIATE 'drop table DataIdentifierPattern cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DataIdentifierPattern 2 ( 3 patternID integer not null, 4 breadthID integer not null, 5 pattern varchar(100 CHAR) not null 6 ) 7 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DATAIDENTIFIERPATTERN') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DataIdentifierPattern'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DataIdentifierPattern start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DataIdentifierPattern ADD CONSTRAINT DataIdentifierPattern_pk PRIMARY KEY (patternID); Table altered. SQL> SQL> SQL> ALTER TABLE DataIdentifierPattern ADD CONSTRAINT DataIdentifierPattern_fk1 FOREIGN KEY (breadthID) references DataIdentifierBreadth(breadthID) on delete cascade DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX DataIdentifierPattern_fk1 ON DataIdentifierPattern(breadthID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DiRequiredValidator SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DIREQUIREDVALIDATOR') LOOP EXECUTE IMMEDIATE 'drop table DiRequiredValidator cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DiRequiredValidator 2 ( 3 diRequiredValidatorID integer not null, 4 breadthID integer not null, 5 validatorID integer not null, 6 validatorInput clob 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DIREQUIREDVALIDATOR') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DiRequiredValidator'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DiRequiredValidator start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DiRequiredValidator ADD CONSTRAINT DiRequiredValidator_pk PRIMARY KEY (diRequiredValidatorID); Table altered. SQL> SQL> SQL> ALTER TABLE DiRequiredValidator ADD CONSTRAINT DiRequiredValidator_fk1 FOREIGN KEY (breadthID) references DataIdentifierBreadth(breadthID) on delete cascade DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX DiRequiredValidator_fk1 ON DiRequiredValidator(breadthID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DiUserInputValidator SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'DIUSERINPUTVALIDATOR') LOOP EXECUTE IMMEDIATE 'drop table DiUserInputValidator cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table DiUserInputValidator 2 ( 3 userInputValidatorID integer not null, 4 dataIdentifierID integer not null, 5 validatorID integer not null, 6 className varchar(256 CHAR) not null 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_DIUSERINPUTVALIDATOR') LOOP EXECUTE IMMEDIATE 'drop sequence seq_DiUserInputValidator'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_DiUserInputValidator start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE DiUserInputValidator ADD CONSTRAINT DiUserInputValidator_pk PRIMARY KEY (userInputValidatorID); Table altered. SQL> SQL> SQL> ALTER TABLE DiUserInputValidator ADD CONSTRAINT DiUserInputValidator_fk1 FOREIGN KEY (dataIdentifierID) references DataIdentifier(dataIdentifierID) on delete cascade DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX DiUserInputValidator_fk1 ON DiUserInputValidator(dataIdentifierID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- AgentTask SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'AGENTTASK') LOOP EXECUTE IMMEDIATE 'drop table AgentTask cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table AgentTask 2 ( 3 agentTaskID integer not null, 4 taskType varchar(30) not null CHECK (taskType IN ('DISABLE', 'ENABLE', 'PULL_LOGS', 'RESTART', 'STOP', 'CHANGE_SERVER_LIST','SET_LOG_LEVEL','RESET_LOG_LEVEL')), 5 createUserID integer not null, 6 createDate timestamp not null, 7 expiryDate timestamp not null 8 ) 9 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_AGENTTASK') LOOP EXECUTE IMMEDIATE 'drop sequence seq_AgentTask'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_AgentTask start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE AgentTask ADD CONSTRAINT AgentTask_pk PRIMARY KEY (agentTaskID); Table altered. SQL> SQL> SQL> ALTER TABLE AgentTask ADD CONSTRAINT AgentTask_fk1 FOREIGN KEY (createUserID) references ProtectUser(userID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX AgentTask_fk1 ON AgentTask(createUserID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- AgentTaskAssignment SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'AGENTTASKASSIGNMENT') LOOP EXECUTE IMMEDIATE 'drop table AgentTaskAssignment cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table AgentTaskAssignment 2 ( 3 agentTaskAssignmentID integer not null, 4 agentID integer not null, 5 agentTaskID integer not null, 6 taskStatus varchar(30) not null CHECK (taskStatus IN ('CREATED', 'SUCCEEDED', 'FAILED', 'REJECTED_MAX_TASKS')), 7 lastAgentStatusMessage varchar(4000 CHAR) 8 ) 9 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_AGENTTASKASSIGNMENT') LOOP EXECUTE IMMEDIATE 'drop sequence seq_AgentTaskAssignment'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_AgentTaskAssignment start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE AgentTaskAssignment ADD CONSTRAINT AgentTaskAssignment_pk PRIMARY KEY (agentTaskAssignmentID); Table altered. SQL> SQL> ALTER TABLE AgentTaskAssignment ADD CONSTRAINT AgentTaskAssignment_U unique(agentID,agentTaskID); Table altered. SQL> SQL> SQL> SQL> ALTER TABLE AgentTaskAssignment ADD CONSTRAINT AgentTaskAssignment_fk1 FOREIGN KEY (agentID) references Agent(agentID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE AgentTaskAssignment ADD CONSTRAINT AgentTaskAssignment_fk2 FOREIGN KEY (agentTaskID) references AgentTask(agentTaskID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX AgentTaskAssignment_fk1 ON AgentTaskAssignment(agentID); Index created. SQL> CREATE INDEX AgentTaskAssignment_fk2 ON AgentTaskAssignment(agentTaskID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- AgentTaskParameter SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'AGENTTASKPARAMETER') LOOP EXECUTE IMMEDIATE 'drop table AgentTaskParameter cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table AgentTaskParameter 2 ( 3 agentTaskParameterID integer not null, 4 agentTaskID integer not null, 5 parameterName varchar(255) not null, 6 parameterValue varchar(2048 CHAR) 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_AGENTTASKPARAMETER') LOOP EXECUTE IMMEDIATE 'drop sequence seq_AgentTaskParameter'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_AgentTaskParameter start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE AgentTaskParameter ADD CONSTRAINT AgentTaskParameter_pk PRIMARY KEY (agentTaskParameterID); Table altered. SQL> SQL> ALTER TABLE AgentTaskParameter ADD CONSTRAINT AgentTaskParameter_U unique(agentTaskID,parameterName); Table altered. SQL> SQL> SQL> SQL> ALTER TABLE AgentTaskParameter ADD CONSTRAINT AgentTaskParameter_fk1 FOREIGN KEY (agentTaskID) references AgentTask(agentTaskID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX AgentTaskParameter_fk1 ON AgentTaskParameter(agentTaskID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- SpcServerVersionInfo SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'SPCSERVERVERSIONINFO') LOOP EXECUTE IMMEDIATE 'drop table SpcServerVersionInfo cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table SpcServerVersionInfo 2 ( 3 spcServerVersionInfoID integer not null, 4 description varchar(400 CHAR), 5 majorVersionNumber integer, 6 minorVersionNumber integer, 7 maintenanceVersionNumber integer, 8 buildVersionNumber integer, 9 productFriendlyName varchar(400 CHAR), 10 productIdentifier varchar(36 CHAR) unique 11 ) 12 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_SPCSERVERVERSIONINFO') LOOP EXECUTE IMMEDIATE 'drop sequence seq_SpcServerVersionInfo'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_SpcServerVersionInfo start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE SpcServerVersionInfo ADD CONSTRAINT SpcServerVersionInfo_pk PRIMARY KEY (spcServerVersionInfoID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- RegisteredSpcServer SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'REGISTEREDSPCSERVER') LOOP EXECUTE IMMEDIATE 'drop table RegisteredSpcServer cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table RegisteredSpcServer 2 ( 3 registeredSpcServerID integer not null, 4 productInstanceId varchar(36 CHAR) not null unique, 5 tennantName varchar(400 CHAR), 6 spcVersionID integer not null, 7 spcServiceBaseUrl varchar(2000 CHAR), 8 registeredOn timestamp not null 9 ) 10 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_REGISTEREDSPCSERVER') LOOP EXECUTE IMMEDIATE 'drop sequence seq_RegisteredSpcServer'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_RegisteredSpcServer start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE RegisteredSpcServer ADD CONSTRAINT RegisteredSpcServer_pk PRIMARY KEY (registeredSpcServerID); Table altered. SQL> SQL> SQL> ALTER TABLE RegisteredSpcServer ADD CONSTRAINT RegisteredSpcServer_fk1 FOREIGN KEY (spcVersionID) references SpcServerVersionInfo(spcServerVersionInfoID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX RegisteredSpcServer_fk1 ON RegisteredSpcServer(spcVersionID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- MasterKeyInfo SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'MASTERKEYINFO') LOOP EXECUTE IMMEDIATE 'drop table MasterKeyInfo cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table MasterKeyInfo 2 ( 3 masterKeyInfoID integer not null, 4 validationHash varchar(50 CHAR) not null, 5 recoveryValue varchar(350 CHAR) not null 6 ) 7 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_MASTERKEYINFO') LOOP EXECUTE IMMEDIATE 'drop sequence seq_MasterKeyInfo'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_MasterKeyInfo start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE MasterKeyInfo ADD CONSTRAINT MasterKeyInfo_pk PRIMARY KEY (masterKeyInfoID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- TabletIpRange SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'TABLETIPRANGE') LOOP EXECUTE IMMEDIATE 'drop table TabletIpRange cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table TabletIpRange 2 ( 3 tabletIpRangeID integer not null, 4 icapChannelID integer not null, 5 startAddress varchar(40 CHAR) not null, 6 endAddress varchar(40 CHAR) not null 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_TABLETIPRANGE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_TabletIpRange'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_TabletIpRange start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE TabletIpRange ADD CONSTRAINT TabletIpRange_pk PRIMARY KEY (tabletIpRangeID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- VpnUserSession SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'VPNUSERSESSION') LOOP EXECUTE IMMEDIATE 'drop table VpnUserSession cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table VpnUserSession 2 ( 3 vpnUserSessionID integer not null, 4 ipAddress varchar(40 CHAR) not null, 5 connectTime timestamp, 6 disconnectTime timestamp, 7 commonName varchar(1024 CHAR) not null, 8 connectLogEntry varchar(1024 CHAR), 9 disconnectLogEntry varchar(1024 CHAR) 10 ) 11 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_VPNUSERSESSION') LOOP EXECUTE IMMEDIATE 'drop sequence seq_VpnUserSession'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_VpnUserSession start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE VpnUserSession ADD CONSTRAINT VpnUserSession_pk PRIMARY KEY (vpnUserSessionID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- VpnLogLastEvent SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'VPNLOGLASTEVENT') LOOP EXECUTE IMMEDIATE 'drop table VpnLogLastEvent cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table VpnLogLastEvent 2 ( 3 vpnLogLastEventID integer not null, 4 lastEventTime timestamp, 5 lastEventSyslogTime timestamp, 6 lastLogEntry varchar(1024 CHAR) 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_VPNLOGLASTEVENT') LOOP EXECUTE IMMEDIATE 'drop sequence seq_VpnLogLastEvent'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_VpnLogLastEvent start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE VpnLogLastEvent ADD CONSTRAINT VpnLogLastEvent_pk PRIMARY KEY (vpnLogLastEventID); Table altered. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- AgentStateRecord SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'AGENTSTATERECORD') LOOP EXECUTE IMMEDIATE 'drop table AgentStateRecord cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table AgentStateRecord 2 ( 3 agentStateRecordID integer not null, 4 agentID integer not null, 5 categoryID integer not null, 6 categoryStatusID integer not null, 7 recordDate timestamp not null, 8 extendedValue varchar(4000 CHAR), 9 isDefault integer not null CHECK (isDefault in (0, 1)), 10 recordVersion integer 11 ) 12 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_AGENTSTATERECORD') LOOP EXECUTE IMMEDIATE 'drop sequence seq_AgentStateRecord'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_AgentStateRecord start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE AgentStateRecord ADD CONSTRAINT AgentStateRecord_pk PRIMARY KEY (agentStateRecordID); Table altered. SQL> SQL> SQL> ALTER TABLE AgentStateRecord ADD CONSTRAINT AgentStateRecord_fk1 FOREIGN KEY (agentID) references Agent(agentID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE AgentStateRecord ADD CONSTRAINT AgentStateRecord_fk2 FOREIGN KEY (categoryID) references AgentEventCategory(categoryID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> ALTER TABLE AgentStateRecord ADD CONSTRAINT AgentStateRecord_fk3 FOREIGN KEY (categoryStatusID) references AgentEventCategoryStatus(categoryStatusID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX AgentStateRecord_fk1 ON AgentStateRecord(agentID); Index created. SQL> CREATE INDEX AgentStateRecord_fk2 ON AgentStateRecord(categoryID); Index created. SQL> CREATE INDEX AgentStateRecord_fk3 ON AgentStateRecord(categoryStatusID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- IncAccessFilterGroup SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'INCACCESSFILTERGROUP') LOOP EXECUTE IMMEDIATE 'drop table IncAccessFilterGroup cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table IncAccessFilterGroup 2 ( 3 groupID integer not null, 4 roleID integer not null 5 ) 6 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_INCACCESSFILTERGROUP') LOOP EXECUTE IMMEDIATE 'drop sequence seq_IncAccessFilterGroup'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_IncAccessFilterGroup start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE IncAccessFilterGroup ADD CONSTRAINT IncAccessFilterGroup_pk PRIMARY KEY (groupID); Table altered. SQL> SQL> SQL> ALTER TABLE IncAccessFilterGroup ADD CONSTRAINT IncAccessFilterGroup_fk1 FOREIGN KEY (roleID) references Role(roleID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX IncAccessFilterGroup_fk1 ON IncAccessFilterGroup(roleID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- IncAccessFilter SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'INCACCESSFILTER') LOOP EXECUTE IMMEDIATE 'drop table IncAccessFilter cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table IncAccessFilter 2 ( 3 filterID integer not null, 4 groupID integer not null, 5 variable varchar(100 CHAR) not null, 6 operator varchar(100 CHAR) not null, 7 operandUnit varchar(50 CHAR) 8 ) 9 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_INCACCESSFILTER') LOOP EXECUTE IMMEDIATE 'drop sequence seq_IncAccessFilter'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_IncAccessFilter start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE IncAccessFilter ADD CONSTRAINT IncAccessFilter_pk PRIMARY KEY (filterID); Table altered. SQL> SQL> SQL> ALTER TABLE IncAccessFilter ADD CONSTRAINT IncAccessFilter_fk1 FOREIGN KEY (groupID) references IncAccessFilterGroup(groupID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX IncAccessFilter_fk1 ON IncAccessFilter(groupID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- IncAccessFilterOperand SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'INCACCESSFILTEROPERAND') LOOP EXECUTE IMMEDIATE 'drop table IncAccessFilterOperand cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table IncAccessFilterOperand 2 ( 3 filterOperandID integer not null, 4 filterID integer not null, 5 operand varchar(2048 CHAR) not null 6 ) 7 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_INCACCESSFILTEROPERAND') LOOP EXECUTE IMMEDIATE 'drop sequence seq_IncAccessFilterOperand'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_IncAccessFilterOperand start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE IncAccessFilterOperand ADD CONSTRAINT IncAccessFilterOperand_pk PRIMARY KEY (filterOperandID); Table altered. SQL> SQL> SQL> ALTER TABLE IncAccessFilterOperand ADD CONSTRAINT IncAccessFilterOperand_fk1 FOREIGN KEY (filterID) references IncAccessFilter(filterID) ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX IncAccessFilterOperand_fk1 ON IncAccessFilterOperand(filterID); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- Certificate SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'CERTIFICATE') LOOP EXECUTE IMMEDIATE 'drop table Certificate cascade constraints'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create table Certificate 2 ( 3 certificateID integer not null, 4 certificateType integer not null CHECK (certificateType in (0)), 5 certificateFilename varchar(256 CHAR) not null, 6 certificatePasswordID integer not null 7 ) 8 ; Table created. SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_CERTIFICATE') LOOP EXECUTE IMMEDIATE 'drop sequence seq_Certificate'; END LOOP PL/SQL procedure successfully completed. SQL> SQL> create sequence seq_Certificate start with 1 increment by 50; Sequence created. SQL> SQL> ALTER TABLE Certificate ADD CONSTRAINT Certificate_pk PRIMARY KEY (certificateID); Table altered. SQL> SQL> SQL> ALTER TABLE Certificate ADD CONSTRAINT Certificate_fk1 FOREIGN KEY (certificatePasswordID) references Password(passwordID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> SQL> SQL> CREATE INDEX Certificate_fk1 ON Certificate(certificatePasswordID); Index created. SQL> SQL> @@CreateConstraints.sql SQL> ALTER TABLE MessageAclEntry ADD CONSTRAINT MessageAClEntry_chk1 CHECK ( 2 DECODE(ACLType, 'FILE', 1, 'SHARE', 1) = 3 DECODE(Permission, 'READ', 1, 'WRITE', 1, 0) 4 ); Table altered. SQL> SQL> ALTER TABLE MessageAclEntry ADD CONSTRAINT MessageAClEntry_chk2 CHECK ( 2 DECODE(ACLType, 'SP', 1) = 3 DECODE(GrantDeny, 'GRANT', 1, 0) 4 ); Table altered. SQL> SQL> ALTER TABLE MessageAclEntry ADD CONSTRAINT MessageAClEntry_chk3 CHECK ( 2 DECODE(ACLType, 'BOX', 1) = 3 DECODE(GrantDeny, 'GRANT', 1, 0) 4 ); Table altered. SQL> SQL> ALTER TABLE keywordcondition ADD CONSTRAINT Keywords_Keywordlist_chk1 CHECK( 2 NVL(length(keywordlist),0) >= checkKeywords 3 ); Table altered. SQL> -- This index is to enforce unique constrain on RESPONSERULEORDER field except for value zero SQL> -- *********************** commenting this part of code due to ETRACK : 2130279 ************************************** SQL> -- *********************** should get fix in v12********************************************************************** SQL> -- CREATE UNIQUE INDEX RESPONSERULEORDER_UNIQUE ON RESPONSERULE(decode(RESPONSERULEORDER,0,NULL,RESPONSERULEORDER)); SQL> SQL> ALTER TABLE ProtectUser ADD CONSTRAINT ProtectUser_chk1 CHECK ( 2 isPasswordAuthEnabled = 0 OR password IS NOT NULL 3 ); Table altered. SQL> SQL> @@CreateIndex.sql SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- Incident SQL> -- --------------------------------------------------------------------------- SQL> create index Incident_n1 on Incident (violationcount); Index created. SQL> create index Incident_n2 on Incident(messageID); Index created. SQL> create index Incident_n3 on Incident(policyVersion); Index created. SQL> create index Incident_n4 on Incident(MessageType); Index created. SQL> create index Incident_n5 on Incident(isDeleted); Index created. SQL> create index Incident_n6 on Incident(incidentSeverityID); Index created. SQL> CREATE INDEX Incident_n7 ON Incident(BlockedStatus); Index created. SQL> CREATE INDEX Incident_n8 ON Incident(DetectionDate); Index created. SQL> create index Incident_n9 ON Incident(discoverMillisSinceFirstSeen); Index created. SQL> CREATE INDEX Incident_n10 ON Incident(creationDate); Index created. SQL> CREATE INDEX Incident_n11 ON Incident(shouldHideFromReports); Index created. SQL> SQL> CREATE INDEX Incident_n12 ON Incident(messageSource, shouldHideFromReports, incidentSeverityId); Index created. SQL> CREATE INDEX Incident_n13 ON Incident(messageDate); Index created. SQL> CREATE INDEX Incident_n14 ON Incident(messageSource, shouldHideFromReports, messageDate); Index created. SQL> CREATE INDEX Incident_n15 ON Incident(messageSource, shouldHideFromReports, IncidentID); Index created. SQL> CREATE INDEX Incident_n16 ON Incident(messageSource, shouldHideFromReports, messageType); Index created. SQL> CREATE INDEX Incident_n17 ON Incident(messageSource, shouldHideFromReports, violationCount); Index created. SQL> SQL> CREATE INDEX Incident_c1 ON Incident( 2 PolicyId, 3 IncidentStatusID, 4 IncidentSeverityID, 5 IsDeleted, 6 shouldHideFromReports, 7 MessageDate, 8 MessageType, 9 MessageID); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- MessageComponent SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX MessageComponent_N1 ON MessageComponent(componenttype); Index created. SQL> CREATE INDEX MessageComponent_N2 ON MessageComponent(OriginalSize); Index created. SQL> SQL> CREATE INDEX MessageComponent_N3 ON MessageComponent(name); Index created. SQL> CREATE INDEX MessageComponent_FB3a ON MessageComponent(LOWER(name)); Index created. SQL> CREATE INDEX MessageComponent_FB3b ON MessageComponent(REVERSE(LOWER(name))); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- Folder SQL> -- --------------------------------------------------------------------------- SQL> CREATE UNIQUE INDEX Folder_u1 ON Folder(LOWER(path)); Index created. SQL> CREATE INDEX Folder_FB1a ON Folder(REVERSE(LOWER(path))); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- Message SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX Message_n1 ON Message(endpointFileName); Index created. SQL> CREATE INDEX Message_FB1a ON Message(LOWER(endpointFileName)); Index created. SQL> CREATE INDEX Message_FB1b ON Message(REVERSE(LOWER(endpointFileName))); Index created. SQL> SQL> CREATE INDEX Message_n2 ON Message(DiscoverName); Index created. SQL> CREATE INDEX Message_FB2a ON Message(LOWER(DiscoverName)); Index created. SQL> SQL> CREATE INDEX Message_n3 ON Message(FileOwner); Index created. SQL> CREATE INDEX Message_FB3a ON Message(LOWER(FileOwner)); Index created. SQL> CREATE INDEX Message_FB3b ON Message(REVERSE(LOWER(fileOwner))); Index created. SQL> SQL> CREATE INDEX Message_n4 ON Message(MessageSubject); Index created. SQL> CREATE INDEX Message_FB4a ON Message(LOWER(MessageSubject)); Index created. SQL> CREATE INDEX Message_FB4b ON Message(REVERSE(LOWER(MessageSubject))); Index created. SQL> SQL> CREATE INDEX Message_n5 ON Message(discoverServer); Index created. SQL> CREATE INDEX Message_FB5a ON Message(LOWER(discoverServer)); Index created. SQL> CREATE INDEX Message_FB5b ON Message(REVERSE(LOWER(discoverServer))); Index created. SQL> SQL> CREATE INDEX Message_n6 ON Message(discoverRepositoryLocation); Index created. SQL> CREATE INDEX Message_FB6a ON Message(LOWER(discoverRepositoryLocation)); Index created. SQL> CREATE INDEX Message_FB6b ON Message(REVERSE(LOWER(discoverRepositoryLocation))); Index created. SQL> SQL> CREATE INDEX Message_n7 ON Message(discoverContentRootPath); Index created. SQL> CREATE INDEX Message_FB7a ON Message(LOWER(discoverContentRootPath)); Index created. SQL> CREATE INDEX Message_FB7b ON Message(REVERSE(LOWER(discoverContentRootPath))); Index created. SQL> SQL> CREATE INDEX Message_n8 ON Message(discoverURL); Index created. SQL> CREATE INDEX Message_FB8a ON Message(LOWER(discoverURL)); Index created. SQL> CREATE INDEX Message_FB8b ON Message(REVERSE(LOWER(discoverURL))); Index created. SQL> SQL> CREATE INDEX Message_n9 ON Message(endpointApplicationName); Index created. SQL> CREATE INDEX Message_FB9a ON Message(LOWER(endpointApplicationName)); Index created. SQL> CREATE INDEX Message_FB9b ON Message(REVERSE(LOWER(endpointApplicationName))); Index created. SQL> SQL> CREATE INDEX Message_n10 ON Message(endpointFilePath); Index created. SQL> CREATE INDEX Message_FB10a ON Message(LOWER(endpointFilePath)); Index created. SQL> CREATE INDEX Message_FB10b ON Message(REVERSE(LOWER(endpointFilePath))); Index created. SQL> SQL> create index Message_n11 on Message(MessageDate); Index created. SQL> create index Message_n12 on Message(MessageSource); Index created. SQL> CREATE INDEX Message_n13 ON Message (MonitorID); Index created. SQL> SQL> CREATE INDEX Message_n14 ON Message(discoverExtractionDate); Index created. SQL> CREATE INDEX Message_n15 ON Message(fileAccessDate); Index created. SQL> CREATE INDEX Message_n16 ON Message(fileCreateDate); Index created. SQL> SQL> CREATE INDEX Message_n17 ON Message(FileCreatedBy); Index created. SQL> CREATE INDEX Message_FB17a ON Message(LOWER(FileCreatedBy)); Index created. SQL> CREATE INDEX Message_FB17b ON Message(REVERSE(LOWER(FileCreatedBy))); Index created. SQL> SQL> CREATE INDEX Message_n18 ON Message(endpointSourceFileName); Index created. SQL> CREATE INDEX Message_FB18a ON Message(LOWER(endpointSourceFileName)); Index created. SQL> CREATE INDEX Message_FB18b ON Message(REVERSE(LOWER(endpointSourceFileName))); Index created. SQL> SQL> CREATE INDEX Message_n19 ON Message(endpointSourceFilePath); Index created. SQL> CREATE INDEX Message_FB19a ON Message(LOWER(endpointSourceFilePath)); Index created. SQL> CREATE INDEX Message_FB19b ON Message(REVERSE(LOWER(endpointSourceFilePath))); Index created. SQL> SQL> CREATE INDEX Message_n20 ON Message(endpointDeviceInstanceID); Index created. SQL> CREATE INDEX Message_FB20a ON Message(LOWER(endpointDeviceInstanceID)); Index created. SQL> CREATE INDEX Message_FB20b ON Message(REVERSE(LOWER(endpointDeviceInstanceID))); Index created. SQL> SQL> CREATE INDEX Message_n21 ON Message(channelSubtype); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- MessageExt SQL> -- --------------------------------------------------------------------------- SQL> CREATE UNIQUE INDEX MessageExt_u1 ON MessageExt(eventContentId, isDetectedOnEndpoint, contentSequenceId); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- MessageOriginator SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX MessageOriginator_n1 ON MessageOriginator(IPAddress); Index created. SQL> CREATE INDEX MessageOriginator_FB1a ON MessageOriginator(REVERSE(IPAddress)); Index created. SQL> SQL> CREATE INDEX MessageOriginator_n2 ON MessageOriginator(domainUserName); Index created. SQL> CREATE INDEX MessageOriginator_FB2a ON MessageOriginator(LOWER(domainUserName)); Index created. SQL> CREATE INDEX MessageOriginator_FB2b ON MessageOriginator(REVERSE(LOWER(domainUserName))); Index created. SQL> SQL> CREATE INDEX MessageOriginator_n3 ON MessageOriginator(endpointMachineName); Index created. SQL> CREATE INDEX MessageOriginator_FB3a ON MessageOriginator(LOWER(endpointMachineName)); Index created. SQL> CREATE INDEX MessageOriginator_FB3b ON MessageOriginator(REVERSE(LOWER(endpointMachineName))); Index created. SQL> SQL> CREATE INDEX MessageOriginator_n4 ON MessageOriginator(networkSenderIdentifier); Index created. SQL> CREATE INDEX MessageOriginator_FB4a ON MessageOriginator(LOWER(networkSenderIdentifier)); Index created. SQL> CREATE INDEX MessageOriginator_FB4b ON MessageOriginator(REVERSE(LOWER(networkSenderIdentifier))); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- MessageRecipient SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX MessageRecipient_n1 ON MessageRecipient(IPAddress); Index created. SQL> CREATE INDEX MessageRecipient_FB1a ON MessageRecipient(REVERSE(IPAddress )); Index created. SQL> SQL> CREATE INDEX MessageRecipient_n2 ON MessageRecipient(RecipientIdentifier); Index created. SQL> CREATE INDEX MessageRecipient_FB2a ON MessageRecipient(LOWER(RecipientIdentifier)); Index created. SQL> CREATE INDEX MessageRecipient_FB2b ON MessageRecipient(REVERSE(LOWER(RecipientIdentifier))); Index created. SQL> SQL> CREATE INDEX MessageRecipient_n3 ON MessageRecipient(domain); Index created. SQL> CREATE INDEX MessageRecipient_FB3a ON MessageRecipient(LOWER(domain)); Index created. SQL> CREATE INDEX MessageRecipient_FB3b ON MessageRecipient(REVERSE(LOWER(domain))); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- MessageAclEntry SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX MessageAclEntry_n1 ON MessageAclEntry (principal); Index created. SQL> CREATE INDEX MessageAclEntry_FB1a ON MessageAclEntry (LOWER(principal)); Index created. SQL> CREATE INDEX MessageAclEntry_FB1b ON MessageAclEntry (REVERSE(LOWER(principal))); Index created. SQL> SQL> CREATE INDEX MessageAclEntry_n2 ON MessageAclEntry (GrantDeny, Permission, ACLType); Index created. SQL> SQL> CREATE INDEX MessageAclEntry_n3 ON MessageAclEntry (permission); Index created. SQL> CREATE INDEX MessageAclEntry_FB3a ON MessageAclEntry (LOWER(permission)); Index created. SQL> CREATE INDEX MessageAclEntry_FB3b ON MessageAclEntry (REVERSE(LOWER(permission))); Index created. SQL> SQL> CREATE INDEX MessageAclEntry_n4 ON MessageAclEntry (GrantDeny, ACLType); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- EndpointJustificationLabel SQL> -- --------------------------------------------------------------------------- SQL> CREATE UNIQUE INDEX EndpointJustificationLabel_u1 ON EndpointJustificationLabel (LOWER(text)); Index created. SQL> CREATE INDEX EndpointJustificationLabel_n2 ON EndpointJustificationLabel(IsDeleted); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- IncidentAction SQL> -- --------------------------------------------------------------------------- SQL> create index IncidentAction_n1 on IncidentAction(actionDetail); Index created. SQL> CREATE INDEX IncidentAction_N2 ON IncidentAction(IncidentID); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- Walk SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX walk_n1 ON walk(startdate) ; Index created. SQL> CREATE INDEX walk_n2 ON walk(IsDeleted) ; Index created. SQL> CREATE INDEX walk_n3 ON walk(incidentCount); Index created. SQL> -- --------------------------------------------------------------------------- SQL> -- SystemEvent SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX SystemEvent_n1 ON SystemEvent(EventDate); Index created. SQL> CREATE INDEX SystemEvent_n2 ON SystemEvent(severity); Index created. SQL> CREATE INDEX SystemEvent_n3 ON SystemEvent(InformationMonitorId); Index created. SQL> CREATE INDEX SystemEvent_n4 ON SystemEvent(Summary); Index created. SQL> CREATE INDEX SystemEvent_FB4a ON SystemEvent(LOWER(Summary)); Index created. SQL> CREATE INDEX SystemEvent_FB4b ON SystemEvent(REVERSE(LOWER(Summary))); Index created. SQL> CREATE INDEX SystemEvent_n5 ON SystemEvent(eventCode); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- PacketStatistics SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX PacketStatistics_n1 ON PacketStatistics(captureDate); Index created. SQL> CREATE INDEX PacketStatistics_n2 ON PacketStatistics(protocolType); Index created. SQL> CREATE INDEX PacketStatistics_n3 ON PacketStatistics(NumericValue); Index created. SQL> CREATE INDEX PacketStatistics_n4 ON PacketStatistics(ObservedEntityType); Index created. SQL> CREATE INDEX PacketStatistics_n5 ON PacketStatistics(Type); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- L7Statistics SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX L7Statistics_n1 ON L7Statistics(captureDate); Index created. SQL> CREATE INDEX L7Statistics_n2 ON L7Statistics(protocolType); Index created. SQL> CREATE INDEX L7Statistics_n3 ON L7Statistics(NumericValue); Index created. SQL> CREATE INDEX L7Statistics_n4 ON L7Statistics(ObservedEntityType); Index created. SQL> CREATE INDEX L7Statistics_n5 ON L7Statistics(Type); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- Statistics SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX Statistics_n1 ON Statistics(NumericValue); Index created. SQL> CREATE INDEX Statistics_n2 ON Statistics(ObservedEntityType); Index created. SQL> CREATE INDEX Statistics_n3 ON Statistics(Type); Index created. SQL> CREATE INDEX Statistics_n4 ON Statistics(CaptureDate); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- Statuses SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX Statuses_n1 ON Statuses(NumericValue); Index created. SQL> CREATE INDEX Statuses_n2 ON Statuses(ObservedEntityType); Index created. SQL> CREATE INDEX Statuses_n3 ON Statuses(Type); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- ConditionViolation SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX ConditionViolation_n1 ON ConditionViolation(ConditionID); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- CustomAttributesRecord SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX CustomAttributesRecord_n1 ON CustomAttributesRecord(VALUE1); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB1a ON CustomAttributesRecord(LOWER(VALUE1)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB1b ON CustomAttributesRecord(REVERSE(LOWER(VALUE1))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n2 ON CustomAttributesRecord(VALUE2); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB2a ON CustomAttributesRecord(LOWER(VALUE2)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB2b ON CustomAttributesRecord(REVERSE(LOWER(VALUE2))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n3 ON CustomAttributesRecord(VALUE3); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB3a ON CustomAttributesRecord(LOWER(VALUE3)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB3b ON CustomAttributesRecord(REVERSE(LOWER(VALUE3))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n4 ON CustomAttributesRecord(VALUE4); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB4a ON CustomAttributesRecord(LOWER(VALUE4)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB4b ON CustomAttributesRecord(REVERSE(LOWER(VALUE4))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n5 ON CustomAttributesRecord(VALUE5); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB5a ON CustomAttributesRecord(LOWER(VALUE5)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB5b ON CustomAttributesRecord(REVERSE(LOWER(VALUE5))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n6 ON CustomAttributesRecord(VALUE6); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB6a ON CustomAttributesRecord(LOWER(VALUE6)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB6b ON CustomAttributesRecord(REVERSE(LOWER(VALUE6))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n7 ON CustomAttributesRecord(VALUE7); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB7a ON CustomAttributesRecord(LOWER(VALUE7)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB7b ON CustomAttributesRecord(REVERSE(LOWER(VALUE7))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n8 ON CustomAttributesRecord(VALUE8); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB8a ON CustomAttributesRecord(LOWER(VALUE8)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB8b ON CustomAttributesRecord(REVERSE(LOWER(VALUE8))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n9 ON CustomAttributesRecord(VALUE9); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB9a ON CustomAttributesRecord(LOWER(VALUE9)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB9b ON CustomAttributesRecord(REVERSE(LOWER(VALUE9))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n10 ON CustomAttributesRecord(VALUE10); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB10a ON CustomAttributesRecord(LOWER(VALUE10)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB10b ON CustomAttributesRecord(REVERSE(LOWER(VALUE10))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n11 ON CustomAttributesRecord(VALUE11); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB11a ON CustomAttributesRecord(LOWER(VALUE11)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB11b ON CustomAttributesRecord(REVERSE(LOWER(VALUE11))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n12 ON CustomAttributesRecord(VALUE12); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB12a ON CustomAttributesRecord(LOWER(VALUE12)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB12b ON CustomAttributesRecord(REVERSE(LOWER(VALUE12))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n13 ON CustomAttributesRecord(VALUE13); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB13a ON CustomAttributesRecord(LOWER(VALUE13)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB13b ON CustomAttributesRecord(REVERSE(LOWER(VALUE13))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n14 ON CustomAttributesRecord(VALUE14); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB14a ON CustomAttributesRecord(LOWER(VALUE14)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB14b ON CustomAttributesRecord(REVERSE(LOWER(VALUE14))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n15 ON CustomAttributesRecord(VALUE15); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB15a ON CustomAttributesRecord(LOWER(VALUE15)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB15b ON CustomAttributesRecord(REVERSE(LOWER(VALUE15))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n16 ON CustomAttributesRecord(VALUE16); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB16a ON CustomAttributesRecord(LOWER(VALUE16)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB16b ON CustomAttributesRecord(REVERSE(LOWER(VALUE16))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n17 ON CustomAttributesRecord(VALUE17); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB17a ON CustomAttributesRecord(LOWER(VALUE17)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB17b ON CustomAttributesRecord(REVERSE(LOWER(VALUE17))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n18 ON CustomAttributesRecord(VALUE18); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB18a ON CustomAttributesRecord(LOWER(VALUE18)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB18b ON CustomAttributesRecord(REVERSE(LOWER(VALUE18))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n19 ON CustomAttributesRecord(VALUE19); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB19a ON CustomAttributesRecord(LOWER(VALUE19)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB19b ON CustomAttributesRecord(REVERSE(LOWER(VALUE19))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n20 ON CustomAttributesRecord(VALUE20); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB20a ON CustomAttributesRecord(LOWER(VALUE20)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB20b ON CustomAttributesRecord(REVERSE(LOWER(VALUE20))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n21 ON CustomAttributesRecord(VALUE21); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB21a ON CustomAttributesRecord(LOWER(VALUE21)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB21b ON CustomAttributesRecord(REVERSE(LOWER(VALUE21))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n22 ON CustomAttributesRecord(VALUE22); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB22a ON CustomAttributesRecord(LOWER(VALUE22)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB22b ON CustomAttributesRecord(REVERSE(LOWER(VALUE22))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n23 ON CustomAttributesRecord(VALUE23); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB23a ON CustomAttributesRecord(LOWER(VALUE23)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB23b ON CustomAttributesRecord(REVERSE(LOWER(VALUE23))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n24 ON CustomAttributesRecord(VALUE24); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB24a ON CustomAttributesRecord(LOWER(VALUE24)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB24b ON CustomAttributesRecord(REVERSE(LOWER(VALUE24))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n25 ON CustomAttributesRecord(VALUE25); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB25a ON CustomAttributesRecord(LOWER(VALUE25)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB25b ON CustomAttributesRecord(REVERSE(LOWER(VALUE25))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n26 ON CustomAttributesRecord(VALUE26); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB26a ON CustomAttributesRecord(LOWER(VALUE26)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB26b ON CustomAttributesRecord(REVERSE(LOWER(VALUE26))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n27 ON CustomAttributesRecord(VALUE27); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB27a ON CustomAttributesRecord(LOWER(VALUE27)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB27b ON CustomAttributesRecord(REVERSE(LOWER(VALUE27))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n28 ON CustomAttributesRecord(VALUE28); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB28a ON CustomAttributesRecord(LOWER(VALUE28)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB28b ON CustomAttributesRecord(REVERSE(LOWER(VALUE28))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n29 ON CustomAttributesRecord(VALUE29); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB29a ON CustomAttributesRecord(LOWER(VALUE29)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB29b ON CustomAttributesRecord(REVERSE(LOWER(VALUE29))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n30 ON CustomAttributesRecord(VALUE30); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB30a ON CustomAttributesRecord(LOWER(VALUE30)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB30b ON CustomAttributesRecord(REVERSE(LOWER(VALUE30))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n31 ON CustomAttributesRecord(VALUE31); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB31a ON CustomAttributesRecord(LOWER(VALUE31)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB31b ON CustomAttributesRecord(REVERSE(LOWER(VALUE31))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n32 ON CustomAttributesRecord(VALUE32); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB32a ON CustomAttributesRecord(LOWER(VALUE32)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB32b ON CustomAttributesRecord(REVERSE(LOWER(VALUE32))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n33 ON CustomAttributesRecord(VALUE33); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB33a ON CustomAttributesRecord(LOWER(VALUE33)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB33b ON CustomAttributesRecord(REVERSE(LOWER(VALUE33))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n34 ON CustomAttributesRecord(VALUE34); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB34a ON CustomAttributesRecord(LOWER(VALUE34)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB34b ON CustomAttributesRecord(REVERSE(LOWER(VALUE34))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n35 ON CustomAttributesRecord(VALUE35); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB35a ON CustomAttributesRecord(LOWER(VALUE35)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB35b ON CustomAttributesRecord(REVERSE(LOWER(VALUE35))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n36 ON CustomAttributesRecord(VALUE36); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB36a ON CustomAttributesRecord(LOWER(VALUE36)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB36b ON CustomAttributesRecord(REVERSE(LOWER(VALUE36))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n37 ON CustomAttributesRecord(VALUE37); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB37a ON CustomAttributesRecord(LOWER(VALUE37)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB37b ON CustomAttributesRecord(REVERSE(LOWER(VALUE37))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n38 ON CustomAttributesRecord(VALUE38); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB38a ON CustomAttributesRecord(LOWER(VALUE38)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB38b ON CustomAttributesRecord(REVERSE(LOWER(VALUE38))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n39 ON CustomAttributesRecord(VALUE39); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB39a ON CustomAttributesRecord(LOWER(VALUE39)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB39b ON CustomAttributesRecord(REVERSE(LOWER(VALUE39))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n40 ON CustomAttributesRecord(VALUE40); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB40a ON CustomAttributesRecord(LOWER(VALUE40)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB40b ON CustomAttributesRecord(REVERSE(LOWER(VALUE40))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n41 ON CustomAttributesRecord(VALUE41); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB41a ON CustomAttributesRecord(LOWER(VALUE41)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB41b ON CustomAttributesRecord(REVERSE(LOWER(VALUE41))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n42 ON CustomAttributesRecord(VALUE42); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB42a ON CustomAttributesRecord(LOWER(VALUE42)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB42b ON CustomAttributesRecord(REVERSE(LOWER(VALUE42))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n43 ON CustomAttributesRecord(VALUE43); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB43a ON CustomAttributesRecord(LOWER(VALUE43)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB43b ON CustomAttributesRecord(REVERSE(LOWER(VALUE43))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n44 ON CustomAttributesRecord(VALUE44); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB44a ON CustomAttributesRecord(LOWER(VALUE44)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB44b ON CustomAttributesRecord(REVERSE(LOWER(VALUE44))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n45 ON CustomAttributesRecord(VALUE45); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB45a ON CustomAttributesRecord(LOWER(VALUE45)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB45b ON CustomAttributesRecord(REVERSE(LOWER(VALUE45))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n46 ON CustomAttributesRecord(VALUE46); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB46a ON CustomAttributesRecord(LOWER(VALUE46)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB46b ON CustomAttributesRecord(REVERSE(LOWER(VALUE46))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n47 ON CustomAttributesRecord(VALUE47); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB47a ON CustomAttributesRecord(LOWER(VALUE47)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB47b ON CustomAttributesRecord(REVERSE(LOWER(VALUE47))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n48 ON CustomAttributesRecord(VALUE48); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB48a ON CustomAttributesRecord(LOWER(VALUE48)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB48b ON CustomAttributesRecord(REVERSE(LOWER(VALUE48))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n49 ON CustomAttributesRecord(VALUE49); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB49a ON CustomAttributesRecord(LOWER(VALUE49)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB49b ON CustomAttributesRecord(REVERSE(LOWER(VALUE49))); Index created. SQL> SQL> CREATE INDEX CustomAttributesRecord_n50 ON CustomAttributesRecord(VALUE50); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB50a ON CustomAttributesRecord(LOWER(VALUE50)); Index created. SQL> CREATE INDEX CustomAttributesRecord_FB50b ON CustomAttributesRecord(REVERSE(LOWER(VALUE50))); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- Agent SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX Agent_n1 ON Agent(AgentIPAddress); Index created. SQL> CREATE INDEX Agent_FB1a ON Agent(REVERSE(AgentIPAddress)); Index created. SQL> CREATE INDEX Agent_FB1b ON Agent(LOWER(AgentIPAddress)); Index created. SQL> CREATE INDEX Agent_FB1c ON Agent(REVERSE(LOWER(AgentIPAddress))); Index created. SQL> SQL> CREATE INDEX Agent_n2 ON Agent(AgentName); Index created. SQL> CREATE INDEX Agent_FB2a ON Agent(LOWER(AgentName)); Index created. SQL> CREATE INDEX Agent_FB2b ON Agent(REVERSE(LOWER(AgentName))); Index created. SQL> SQL> CREATE INDEX Agent_n3 ON Agent(ConnectStatus); Index created. SQL> CREATE INDEX Agent_n4 ON Agent(IsDeleted); Index created. SQL> CREATE INDEX Agent_n5 ON Agent(Status); Index created. SQL> CREATE INDEX Agent_n6 ON Agent(Version); Index created. SQL> CREATE INDEX Agent_FB6a ON Agent(LOWER(Version)); Index created. SQL> CREATE INDEX Agent_FB6b ON Agent(REVERSE(LOWER(Version))); Index created. SQL> SQL> CREATE UNIQUE INDEX Agent_u1 ON Agent(CASE Family WHEN 1 THEN AgentName ELSE NULL END); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- AgentEvent SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX AgentEvent_n1 ON AgentEvent(EventDate); Index created. SQL> CREATE INDEX AgentEvent_n2 ON AgentEvent(IsDeleted); Index created. SQL> CREATE INDEX AgentEvent_n3 ON AgentEvent(IsLatest); Index created. SQL> CREATE INDEX AgentEvent_n4 ON AgentEvent(AgentId, IsLatest); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- ContentRoot SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX ContentRoot_n1 ON ContentRoot(IsDeleted); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- Course SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX Course_n1 ON Course(IsDeleted); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- DataSource SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX DataSource_n1 ON DataSource(IsDeleted); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- DocSource SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX DocSource_n1 ON DocSource(IsDeleted); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- Domain SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX PolicyGroup_n1 ON PolicyGroup(IsDeleted); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- IncidentStatus SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX IncidentStatus_n1 ON IncidentStatus(IsDeleted); Index created. SQL> CREATE INDEX IncidentStatus_FB2a ON IncidentStatus(LOWER(Name)); Index created. SQL> SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- InformationMonitor SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX InformationMonitor_n1 ON InformationMonitor(IsDeleted); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- DiscoverItem SQL> -- --------------------------------------------------------------------------- SQL> CREATE UNIQUE INDEX DiscoverItem_u1 ON DiscoverItem(DISCOVERURL, policyID, scanAssignmentID); Index created. SQL> CREATE INDEX DiscoverItem_n1 ON DiscoverItem(firstDetectionDate); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- Content Root Incident Count SQL> -- --------------------------------------------------------------------------- SQL> CREATE UNIQUE INDEX ContentRootIncidentCount_u1 ON ContentRootIncidentCount(walkID, contentRootID); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- Policy SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX Policy_n1 ON Policy(IsDeleted); Index created. SQL> CREATE INDEX Policy_FB2a ON Policy(LOWER(Name)); Index created. SQL> SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- ProtectUser SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX ProtectUser_n1 ON ProtectUser(IsDeleted); Index created. SQL> CREATE INDEX ProtectUser_n2 ON ProtectUser(Name); Index created. SQL> CREATE INDEX ProtectUser_FB2a ON ProtectUser(LOWER(Name)); Index created. SQL> CREATE INDEX ProtectUser_u1 ON ProtectUser(CASE WHEN IsDeleted = 0 THEN CommonNameMapping END); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- Protocol SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX Protocol_n1 ON Protocol(IsDeleted); Index created. SQL> CREATE INDEX Protocol_n2 ON Protocol(IsSystem); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- Report SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX Report_n1 ON Report(Permission); Index created. SQL> CREATE INDEX Report_n2 ON Report(Type); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- Role SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX Role_n1 ON Role(IsDeleted); Index created. SQL> CREATE INDEX Role_n2 ON Role(Name); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- ScanAssignment SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX ScanAssignment_n1 ON ScanAssignment(IsDeleted); Index created. SQL> CREATE INDEX ScanAssignment_FB2a ON ScanAssignment(LOWER(Name)); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- LogCollection SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX LogCollection_n1 ON LogCollection(timeStarted); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- DataOwner SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX DataOwner_FB1a ON DataOwner(LOWER(name)); Index created. SQL> CREATE INDEX DataOwner_FB1b ON DataOwner(REVERSE(LOWER(name))); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- DataOwnerEmail SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX DataOwnerEmail_FB1a ON DataOwnerEmail(LOWER(email)); Index created. SQL> CREATE INDEX DataOwnerEmail_FB1b ON DataOwnerEmail(REVERSE(LOWER(email))); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- VpnUserSession SQL> -- --------------------------------------------------------------------------- SQL> CREATE INDEX VpnUserSession_n1 ON VpnUserSession(ipAddress, connectTime, disconnectTime); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- SmartResponseDisplayOrder SQL> -- --------------------------------------------------------------------------- SQL> -- *********************** commenting this part of code due to ETRACK : 2350790 ************************************** SQL> -- CREATE UNIQUE INDEX SmartResponseDisplayOrder_U1 ON SmartResponseDisplayOrder (userSnapshotConfigID, displayOrder); SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- AgentStateRecord SQL> -- --------------------------------------------------------------------------- SQL> CREATE UNIQUE INDEX AgentStateRecord_u1 ON AgentStateRecord(AgentID, CategoryID); Index created. SQL> SQL> @@EnforceEntities-ddl.sql SQL> SQL> create table AdAgentAttributeDetail ( 2 adAttributeName varchar2(500 char) not null, 3 searchDomain varchar2(255 char) not null, 4 searchFilter varchar2(1000 char) not null, 5 id number(19,0) not null, 6 primary key (id) 7 ); Table created. SQL> SQL> create table AgentAttribute ( 2 id number(19,0) not null, 3 deploymentVersion number(10,0) not null, 4 editState varchar2(255 char) not null, 5 isDeleted number(1,0) not null, 6 isPredefined number(1,0) not null, 7 version number(10,0) not null, 8 deployedAttributeDetailId number(19,0), 9 undeployedAttributeDetailId number(19,0), 10 primary key (id) 11 ); Table created. SQL> SQL> create table AgentAttributeDependencies ( 2 attributeDetailId number(19,0) not null, 3 dependencyId number(19,0) not null 4 ); Table created. SQL> SQL> create table AgentAttributeDetail ( 2 id number(19,0) not null, 3 description varchar2(500 char), 4 isDeleted number(1,0) not null, 5 isDeployed number(1,0) not null, 6 lastModificationDate timestamp, 7 name varchar2(100 char) not null, 8 version number(10,0) not null, 9 lastEditUserId number(19,0), 10 primary key (id) 11 ); Table created. SQL> SQL> create table AgentGroup ( 2 id number(19,0) not null, 3 description varchar2(1000 char), 4 isDefault number(1,0) not null, 5 isDeleted number(1,0) not null, 6 isEnabled number(1,0) not null, 7 lastConfigDeployDate timestamp, 8 lastModifiedDate timestamp not null, 9 name varchar2(100 char) not null, 10 version number(10,0) not null, 11 agentConfigurationVersionId number(10,0), 12 informationMonitorId number(19,0) unique, 13 lastEditUserId number(19,0) not null, 14 primary key (id) 15 ); Table created. SQL> SQL> create table AgentGroupAttributeResult ( 2 id number(19,0) not null, 3 errorCode number(10,0), 4 errorDescription varchar2(2048 char), 5 internalErrorCode number(10,0), 6 value varchar2(2048 char), 7 agentId number(19,0) not null, 8 agentAttributeId number(19,0) not null, 9 primary key (id), 10 unique (agentId, agentAttributeId) 11 ); Table created. SQL> SQL> create table AgentGroupCondition ( 2 id number(19,0) not null, 3 agentGroupId number(19,0) not null, 4 agentAttributeId number(19,0) not null, 5 primary key (id), 6 unique (agentGroupId, agentAttributeId) 7 ); Table created. SQL> SQL> create table AgentGroupConditionValue ( 2 agentGroupConditionId number(19,0) not null, 3 value varchar2(500 char) not null, 4 primary key (agentGroupConditionId, value) 5 ); Table created. SQL> SQL> create table AgentGroupConflictRule ( 2 agentGroupConflictRuleId number(19,0) not null, 3 isDeleted number(1,0) not null, 4 isDeployed number(1,0) not null, 5 isEnabled number(1,0) not null, 6 lastModifiedDate timestamp not null, 7 resolvedAgentGroupVersion number(10,0), 8 status varchar2(255 char) not null, 9 version number(10,0) not null, 10 lastEditUserId number(19,0) not null, 11 resolvedAgentGroupId number(19,0), 12 primary key (agentGroupConflictRuleId) 13 ); Table created. SQL> SQL> create table AgentGroupHostName ( 2 id number(19,0) not null, 3 agentHostName varchar2(256 char) not null, 4 version number(10,0), 5 agentGroupId number(19,0) not null, 6 primary key (id) 7 ); Table created. SQL> SQL> create table ConflictRuleAgent ( 2 conflictRuleVersion number(10,0) not null, 3 isInConflict number(1,0) not null, 4 agentGroupConflictRuleId number(19,0) not null, 5 agentId number(19,0), 6 primary key (agentId, agentGroupConflictRuleId) 7 ); Table created. SQL> SQL> create table ConflictRuleDetail ( 2 agentGroupVersion number(10,0) not null, 3 agentGroupId number(19,0), 4 agentGroupConflictRuleId number(19,0), 5 primary key (agentGroupId, agentGroupConflictRuleId) 6 ); Table created. SQL> SQL> create table ContentRootDiscoveryMessage ( 2 contentRootDiscoveryMsgId number(19,0) not null, 3 messageKey varchar2(1024 char) not null, 4 messageType varchar2(20 char) not null, 5 uri varchar2(1024 char), 6 contentRootDiscoveryScanId number(19,0) not null, 7 primary key (contentRootDiscoveryMsgId) 8 ); Table created. SQL> SQL> create table ContentRootDiscoveryScan ( 2 contentRootDiscoveryId number(19,0) not null, 3 contentRootCount number(10,0), 4 contentRootType varchar2(20 char) not null, 5 endAddress varchar2(40 char), 6 errorCount number(10,0), 7 lastCompletionTime timestamp, 8 lastStartTime timestamp, 9 name varchar2(100 char) not null unique, 10 resultType varchar2(20 char), 11 startAddress varchar2(40 char), 12 status varchar2(20 char) not null, 13 version number(10,0) not null, 14 warningCount number(10,0), 15 directoryConnectionId number(19,0) not null, 16 primary key (contentRootDiscoveryId) 17 ); Table created. SQL> SQL> create table ContentRootServerFilter ( 2 contentRootServerFilterId number(19,0) not null, 3 filterType varchar2(20 char) not null, 4 filterValue varchar2(100 char) not null, 5 contentRootDiscoveryScanId number(19,0) not null, 6 primary key (contentRootServerFilterId) 7 ); Table created. SQL> SQL> create table CsvLookupPlugin ( 2 csvDelimiter char(1 char) not null, 3 csvFileEncoding varchar2(60 char) not null, 4 csvFilePath varchar2(2000 char) not null, 5 id number(19,0) not null, 6 primary key (id) 7 ); Table created. SQL> SQL> create table CustomLookupPlugin ( 2 pluginClass varchar2(200 char) not null, 3 id number(19,0) not null, 4 primary key (id) 5 ); Table created. SQL> SQL> create table CustomLookupPluginJar ( 2 customLookupPluginId number(19,0) not null, 3 jar varchar2(256 char) 4 ); Table created. SQL> SQL> create table DataInsightLookupPlugin ( 2 accessHistoryFromDate timestamp not null, 3 activeReaderCount number(10,0) not null, 4 activeUserCount number(10,0) not null, 5 activeWriterCount number(10,0) not null, 6 id number(19,0) not null, 7 primary key (id) 8 ); Table created. SQL> SQL> create table DataUser ( 2 dataUserId number(19,0) not null, 3 city varchar2(128 char), 4 country varchar2(128 char), 5 createDate timestamp not null, 6 department varchar2(64 char), 7 employeeId varchar2(16 char), 8 firstName varchar2(64 char), 9 lastName varchar2(64 char), 10 modifyDate timestamp, 11 postalCode varchar2(40 char), 12 stateOrProvince varchar2(128 char), 13 streetAddress varchar2(1024 char), 14 telephoneNumber varchar2(64 char), 15 title varchar2(64 char), 16 version number(10,0) not null, 17 primary key (dataUserId) 18 ); Table created. SQL> SQL> create table DataUserAttribute ( 2 dataUserAttributeId number(19,0) not null, 3 name varchar2(60 char) not null, 4 primary key (dataUserAttributeId) 5 ); Table created. SQL> SQL> create table DataUserAttributeVal ( 2 dataUserAttributeId number(19,0) not null, 3 dataUserId number(19,0) not null, 4 value varchar2(2000 char) not null, 5 primary key (dataUserAttributeId, dataUserId) 6 ); Table created. SQL> SQL> create table DataUserAttributeVal_STG ( 2 dataUserAttributeId number(19,0) not null, 3 dataUserId number(19,0) not null, 4 value varchar2(2000 char) not null, 5 primary key (dataUserAttributeId, dataUserId) 6 ); Table created. SQL> SQL> create table DataUserLinkingInfo ( 2 id number(19,0) not null, 3 latestUpdateLinked timestamp, 4 primary key (id), 5 check (id = 1) 6 ); Table created. SQL> SQL> create table DataUserSource ( 2 dataUserSourceId number(19,0) not null, 3 endedAt timestamp, 4 errorCode number(10,0), 5 name varchar2(256 char) not null, 6 recordsAdded number(10,0), 7 recordsUpdated number(10,0), 8 requestedAt timestamp, 9 skippedDuplicateRecords number(10,0), 10 skippedErroredRecords number(10,0), 11 startedAt timestamp, 12 status number(10,0) not null, 13 succeededAt timestamp, 14 version number(10,0), 15 primary key (dataUserSourceId), 16 unique (name) 17 ); Table created. SQL> SQL> create table DataUser_Emails_STG ( 2 dataUserId number(19,0) not null, 3 email varchar2(1024 char) not null, 4 primary key (dataUserId, email) 5 ); Table created. SQL> SQL> create table DataUser_STG ( 2 dataUserId number(19,0) not null, 3 city varchar2(128 char), 4 country varchar2(128 char), 5 department varchar2(64 char), 6 employeeId varchar2(16 char), 7 firstName varchar2(64 char), 8 lastName varchar2(64 char), 9 postalCode varchar2(40 char), 10 stateOrProvince varchar2(128 char), 11 streetAddress varchar2(1024 char), 12 telephoneNumber varchar2(64 char), 13 title varchar2(64 char), 14 primary key (dataUserId) 15 ); Table created. SQL> SQL> create table DataUser_STG_PROD_Match ( 2 dataUser_STG_ID number(19,0) not null, 3 dataUserId number(19,0) not null 4 ); Table created. SQL> SQL> create table DataUser_UniqueLogins_STG ( 2 dataUserId number(19,0) not null, 3 domain varchar2(256 char) not null, 4 domainType number(10,0) not null, 5 login varchar2(256 char) not null, 6 loginType number(10,0) not null, 7 primary key (dataUserId, domain, domainType, login, loginType) 8 ); Table created. SQL> SQL> create table DataUser_emails ( 2 dataUserId number(19,0) not null, 3 createDate timestamp not null, 4 email varchar2(1024 char) not null, 5 primary key (dataUserId, createDate, email) 6 ); Table created. SQL> SQL> create table DataUser_uniqueLogins ( 2 dataUserId number(19,0) not null, 3 createDate timestamp not null, 4 domain varchar2(256 char) not null, 5 domainType number(10,0) not null, 6 login varchar2(256 char) not null, 7 loginType number(10,0) not null, 8 primary key (dataUserId, createDate, domain, domainType, login, loginType) 9 ); Table created. SQL> SQL> create table DiscoverResource ( 2 discoverResourceID number(19,0) not null, 3 resourceStatus varchar2(100 char), 4 resourceUrl varchar2(512 char) not null unique, 5 primary key (discoverResourceID) 6 ); Table created. SQL> SQL> create table DiscoverViolation ( 2 discoverViolationID number(19,0) not null, 3 detectedRemediationType number(10,0), 4 remediationDetectionDate timestamp, 5 discoverResourceID number(19,0) not null, 6 policyID number(19,0) not null, 7 scanAssignmentID number(19,0) not null, 8 primary key (discoverViolationID), 9 unique (policyID, discoverResourceID, scanAssignmentID) 10 ); Table created. SQL> SQL> create table DiscoveredContentRoot ( 2 discoveredContentRootId number(19,0) not null, 3 uri varchar2(1024 char) not null, 4 contentRootDiscoveryScanId number(19,0) not null, 5 primary key (discoveredContentRootId) 6 ); Table created. SQL> SQL> create table EnforceInstance ( 2 enforceUUID varchar2(36 char) not null, 3 primary key (enforceUUID) 4 ); Table created. SQL> SQL> create table ExternalKeyStore ( 2 externalKeyStoreId number(19,0) not null, 3 keyStoreLocation number(10,0) not null unique, 4 passwordId number(19,0), 5 primary key (externalKeyStoreId) 6 ); Table created. SQL> SQL> create table FileDataUserSource ( 2 csvDelimiter char(1 char) not null, 3 csvFileEncoding varchar2(60 char) not null, 4 errorThresholdPercentage number(10,0) not null, 5 filePath varchar2(2048 char) not null, 6 dataUserSourceId number(19,0) not null, 7 primary key (dataUserSourceId) 8 ); Table created. SQL> SQL> create table IncidentInformation ( 2 incidentInformationId number(19,0) not null, 3 incidentId number(19,0) not null, 4 requestedByUserId varchar2(256 char) not null, 5 responseRuleExecutionId number(19,0) not null, 6 primary key (incidentInformationId) 7 ); Table created. SQL> SQL> create table LdapDataUserSource ( 2 filter varchar2(2000 char), 3 dataUserSourceId number(19,0) not null, 4 directoryConnectionId number(19,0) not null, 5 primary key (dataUserSourceId) 6 ); Table created. SQL> SQL> create table LdapLookupPlugin ( 2 id number(19,0) not null, 3 directoryConnectionId number(19,0) not null, 4 primary key (id) 5 ); Table created. SQL> SQL> create table LookupPlugin ( 2 id number(19,0) not null, 3 description varchar2(500 char), 4 isEnabled number(1,0) not null, 5 name varchar2(100 char) not null unique, 6 properties clob, 7 version number(10,0), 8 primary key (id) 9 ); Table created. SQL> SQL> create table LookupPluginChain ( 2 configId number(19,0) not null, 3 lookupPluginId number(19,0) not null, 4 executionOrder number(10,0) not null, 5 primary key (configId, executionOrder) 6 ); Table created. SQL> SQL> create table LookupPluginConfig ( 2 id number(19,0) not null, 3 enableAclParameters number(1,0) not null, 4 enableAttachmentParameters number(1,0) not null, 5 enableIncidentParameters number(1,0) not null, 6 enableMessageParameters number(1,0) not null, 7 enableMonitorParameters number(1,0) not null, 8 enablePolicyParameters number(1,0) not null, 9 enableRecipientParameters number(1,0) not null, 10 enableSenderParameters number(1,0) not null, 11 enableServerParameters number(1,0) not null, 12 enableStatusParameters number(1,0) not null, 13 version number(10,0), 14 primary key (id) 15 ); Table created. SQL> SQL> create table MessageOriginatorDataUser ( 2 originatorUserId number(19,0) not null, 3 msgId number(19,0) not null, 4 primary key (msgId) 5 ); Table created. SQL> SQL> create table RemediationInformation ( 2 remediationInformationID number(19,0) not null, 3 detectionDate timestamp not null, 4 remediationType number(10,0) not null, 5 remediatedDiscoverViolationID number(19,0) not null, 6 walkID number(19,0) not null, 7 primary key (remediationInformationID) 8 ); Table created. SQL> SQL> create table ResponseRuleExecRequest ( 2 responseRuleExecRequestId number(19,0) not null, 3 creationDate timestamp not null, 4 uuid varchar2(36 char) not null unique, 5 userId number(19,0) not null, 6 primary key (responseRuleExecRequestId) 7 ); Table created. SQL> SQL> create table ResponseRuleExecution ( 2 responseRuleExecutionId number(19,0) not null, 3 responseRuleId number(19,0) not null, 4 responseRuleExecRequestId number(19,0) not null, 5 primary key (responseRuleExecutionId) 6 ); Table created. SQL> SQL> create table SavedUserData ( 2 id number(19,0) not null, 3 bundle varchar2(255 char) not null, 4 data clob not null, 5 pageUrl varchar2(255 char) not null, 6 ROLEID number(19,0), 7 USERID number(19,0) not null, 8 primary key (id), 9 unique (USERID, ROLEID, pageUrl, bundle) 10 ); Table created. SQL> SQL> create table ScriptLookupPlugin ( 2 arguments clob, 3 command varchar2(2000 char) not null, 4 credentialsEnabled number(1,0) not null, 5 credentialsFile varchar2(2000 char), 6 inputFiltered number(1,0) not null, 7 outputFiltered number(1,0) not null, 8 protocolFilteringEnabled number(1,0) not null, 9 id number(19,0) not null, 10 primary key (id) 11 ); Table created. SQL> SQL> create table ScriptLookupProtocols ( 2 scriptLookupPluginId number(19,0) not null, 3 protocol varchar2(256 char) 4 ); Table created. SQL> SQL> create table StaticEnvironmentInfo ( 2 STATICENVIRONMENTINFOID number(19,0) not null, 3 name varchar2(256 char) not null unique, 4 updateDate timestamp, 5 value varchar2(1024 char), 6 version number(10,0) not null, 7 primary key (STATICENVIRONMENTINFOID) 8 ); Table created. SQL> SQL> create table SysInfoJob ( 2 SYSINFOJOBID number(19,0) not null, 3 collectionEndTime timestamp, 4 collectionStartTime timestamp not null, 5 collectionStatus varchar2(60 char) not null, 6 transmissionEndTime timestamp, 7 transmissionStartTime timestamp, 8 transmissionStatus varchar2(60 char), 9 transmissionType varchar2(60 char), 10 primary key (SYSINFOJOBID) 11 ); Table created. SQL> SQL> create table SysInfoTask ( 2 sysInfoTaskId number(19,0) not null, 3 taskEndTime timestamp, 4 taskStartTime timestamp not null, 5 taskStatus varchar2(60 char) not null, 6 taskType varchar2(255 char) not null, 7 sysInfoJobId number(19,0), 8 primary key (sysInfoTaskId) 9 ); Table created. SQL> SQL> alter table AdAgentAttributeDetail 2 add constraint ADAGENTATTRIBUTEDETAIL_FK1 3 foreign key (id) 4 references AgentAttributeDetail; Table altered. SQL> SQL> alter table AgentAttribute 2 add constraint AGENTATTRIBUTE_FK1 3 foreign key (deployedAttributeDetailId) 4 references AgentAttributeDetail; Table altered. SQL> SQL> alter table AgentAttribute 2 add constraint AGENTATTRIBUTE_FK2 3 foreign key (undeployedAttributeDetailId) 4 references AgentAttributeDetail; Table altered. SQL> SQL> alter table AgentAttributeDependencies 2 add constraint AGENTATTRIBUTEDEPENDENCIES_FK2 3 foreign key (dependencyId) 4 references AgentAttribute; Table altered. SQL> SQL> alter table AgentAttributeDependencies 2 add constraint AGENTATTRIBUTEDEPENDENCIES_FK1 3 foreign key (attributeDetailId) 4 references AgentAttributeDetail; Table altered. SQL> SQL> alter table AgentAttributeDetail 2 add constraint AGENTATTRIBUTEDETAIL_FK1 3 foreign key (lastEditUserId) 4 references ProtectUser; Table altered. SQL> SQL> alter table AgentGroup 2 add constraint AGENTGROUP_FK3 3 foreign key (lastEditUserId) 4 references ProtectUser; Table altered. SQL> SQL> alter table AgentGroup 2 add constraint AGENTGROUP_FK2 3 foreign key (informationMonitorId) 4 references InformationMonitor; Table altered. SQL> SQL> alter table AgentGroup 2 add constraint AGENTGROUP_FK1 3 foreign key (agentConfigurationVersionId) 4 references AgentConfigurationVersion; Table altered. SQL> SQL> alter table AgentGroupAttributeResult 2 add constraint AGENTGROUPATTRIBUTERESULT_FK1 3 foreign key (agentId) 4 references Agent 5 on delete cascade; Table altered. SQL> SQL> alter table AgentGroupAttributeResult 2 add constraint AGENTGROUPATTRIBUTERESULT_FK2 3 foreign key (agentAttributeId) 4 references AgentAttribute; Table altered. SQL> SQL> alter table AgentGroupCondition 2 add constraint AGENTGROUPCONDITION_FK2 3 foreign key (agentAttributeId) 4 references AgentAttribute; Table altered. SQL> SQL> alter table AgentGroupCondition 2 add constraint AGENTGROUPCONDITION_FK1 3 foreign key (agentGroupId) 4 references AgentGroup 5 on delete cascade; Table altered. SQL> SQL> alter table AgentGroupConditionValue 2 add constraint AGENTGROUPCONDITIONVALUE_FK1 3 foreign key (agentGroupConditionId) 4 references AgentGroupCondition; Table altered. SQL> SQL> alter table AgentGroupConflictRule 2 add constraint AGENTGROUPCONFLICTRULE_FK2 3 foreign key (lastEditUserId) 4 references ProtectUser; Table altered. SQL> SQL> alter table AgentGroupConflictRule 2 add constraint AGENTGROUPCONFLICTRULE_FK1 3 foreign key (resolvedAgentGroupId) 4 references AgentGroup; Table altered. SQL> SQL> alter table AgentGroupHostName 2 add constraint AGENTGROUPHOSTNAME_FK1 3 foreign key (agentGroupId) 4 references AgentGroup 5 on delete cascade; Table altered. SQL> SQL> alter table ConflictRuleAgent 2 add constraint CONFLICTRULEAGENT_FK2 3 foreign key (agentId) 4 references Agent; Table altered. SQL> SQL> alter table ConflictRuleAgent 2 add constraint CONFLICTRULEAGENT_FK1 3 foreign key (agentGroupConflictRuleId) 4 references AgentGroupConflictRule 5 on delete cascade; Table altered. SQL> SQL> alter table ConflictRuleDetail 2 add constraint CONFLICTRULEDETAIL_FK1 3 foreign key (agentGroupConflictRuleId) 4 references AgentGroupConflictRule 5 on delete cascade; Table altered. SQL> SQL> alter table ConflictRuleDetail 2 add constraint CONFLICTRULEDETAIL_FK2 3 foreign key (agentGroupId) 4 references AgentGroup; Table altered. SQL> SQL> alter table ContentRootDiscoveryMessage 2 add constraint CONTENTROOTDISCOVERYMSG_FK1 3 foreign key (contentRootDiscoveryScanId) 4 references ContentRootDiscoveryScan 5 on delete cascade; Table altered. SQL> SQL> alter table ContentRootDiscoveryScan 2 add constraint CONTENTROOTDISCOVERY_FK1 3 foreign key (directoryConnectionId) 4 references DirectoryConnection; Table altered. SQL> SQL> alter table ContentRootServerFilter 2 add constraint CONTENTROOTSERVERFILTER_FK1 3 foreign key (contentRootDiscoveryScanId) 4 references ContentRootDiscoveryScan; Table altered. SQL> SQL> alter table CsvLookupPlugin 2 add constraint CSVLOOKUPPLUGIN_FK1 3 foreign key (id) 4 references LookupPlugin; Table altered. SQL> SQL> alter table CustomLookupPlugin 2 add constraint CUSTOMLOOKUPPLUGIN_FK1 3 foreign key (id) 4 references LookupPlugin; Table altered. SQL> SQL> alter table CustomLookupPluginJar 2 add constraint CUSTOMLOOKUPPLUGINJAR_FK1 3 foreign key (customLookupPluginId) 4 references CustomLookupPlugin; Table altered. SQL> SQL> alter table DataInsightLookupPlugin 2 add constraint DATAINSIGHTLOOKUPPLUGIN_FK1 3 foreign key (id) 4 references LookupPlugin; Table altered. SQL> SQL> alter table DataUserAttributeVal 2 add constraint DATAUSERATTRIBUTEVAL_FK1 3 foreign key (dataUserAttributeId) 4 references DataUserAttribute 5 on delete cascade; Table altered. SQL> SQL> alter table DataUserAttributeVal 2 add constraint DATAUSERATTRIBUTEVAL_FK2 3 foreign key (dataUserId) 4 references DataUser 5 on delete cascade; Table altered. SQL> SQL> alter table DataUserAttributeVal_STG 2 add constraint DATAUSERATTRIBUTEVAL_STG_FK1 3 foreign key (dataUserAttributeId) 4 references DataUserAttribute 5 on delete cascade; Table altered. SQL> SQL> alter table DataUserAttributeVal_STG 2 add constraint DATAUSERATTRIBUTEVAL_STG_FK2 3 foreign key (dataUserId) 4 references DataUser_STG 5 on delete cascade; Table altered. SQL> SQL> alter table DataUser_Emails_STG 2 add constraint DATAUSER_EMAILS_STG_FK1 3 foreign key (dataUserId) 4 references DataUser_STG; Table altered. SQL> SQL> alter table DataUser_STG_PROD_Match 2 add constraint DATAUSER_STG_PROD_MATCH_FK1 3 foreign key (dataUser_STG_ID) 4 references DataUser_STG; Table altered. SQL> SQL> alter table DataUser_STG_PROD_Match 2 add constraint DATAUSER_STG_PROD_MATCH_FK2 3 foreign key (dataUserId) 4 references DataUser; Table altered. SQL> SQL> alter table DataUser_UniqueLogins_STG 2 add constraint DATAUSER_UNIQUELOGINS_STG_FK1 3 foreign key (dataUserId) 4 references DataUser_STG; Table altered. SQL> SQL> alter table DataUser_emails 2 add constraint DATAUSER_EMAILS_FK1 3 foreign key (dataUserId) 4 references DataUser; Table altered. SQL> SQL> alter table DataUser_uniqueLogins 2 add constraint DATAUSER_UNIQUELOGINS_FK1 3 foreign key (dataUserId) 4 references DataUser; Table altered. SQL> SQL> alter table DiscoverViolation 2 add constraint DISCOVERRESOURCE_FK2 3 foreign key (discoverResourceID) 4 references DiscoverResource; Table altered. SQL> SQL> alter table DiscoverViolation 2 add constraint DISCOVERVIOLATION_FK2 3 foreign key (policyID) 4 references Policy; Table altered. SQL> SQL> alter table DiscoverViolation 2 add constraint DISCOVERVIOLATION_FK1 3 foreign key (scanAssignmentID) 4 references ScanAssignment; Table altered. SQL> SQL> alter table DiscoveredContentRoot 2 add constraint DISCOVEREDCONTENTROOT_FK1 3 foreign key (contentRootDiscoveryScanId) 4 references ContentRootDiscoveryScan 5 on delete cascade; Table altered. SQL> SQL> alter table ExternalKeyStore 2 add constraint EXTERNAL_KEYSTORE_FK1 3 foreign key (passwordId) 4 references Password; Table altered. SQL> SQL> alter table FileDataUserSource 2 add constraint FK8DD2EFCC92EC3EE4 3 foreign key (dataUserSourceId) 4 references DataUserSource; Table altered. SQL> SQL> alter table IncidentInformation 2 add constraint INCIDENT_INFORMATION_FK1 3 foreign key (responseRuleExecutionId) 4 references ResponseRuleExecution; Table altered. SQL> SQL> alter table LdapDataUserSource 2 add constraint FKC115EEB792EC3EE4 3 foreign key (dataUserSourceId) 4 references DataUserSource; Table altered. SQL> SQL> alter table LdapDataUserSource 2 add constraint FKC115EEB7741AD67A 3 foreign key (directoryConnectionId) 4 references DirectoryConnection; Table altered. SQL> SQL> alter table LdapLookupPlugin 2 add constraint LDAPLOOKUPPLUGIN_FK2 3 foreign key (directoryConnectionId) 4 references DirectoryConnection; Table altered. SQL> SQL> alter table LdapLookupPlugin 2 add constraint LDAPLOOKUPPLUGIN_FK1 3 foreign key (id) 4 references LookupPlugin; Table altered. SQL> SQL> alter table LookupPluginChain 2 add constraint LOOKUPPLUGINCHAIN_FK2 3 foreign key (lookupPluginId) 4 references LookupPlugin; Table altered. SQL> SQL> alter table LookupPluginChain 2 add constraint LOOKUPPLUGINCHAIN_FK1 3 foreign key (configId) 4 references LookupPluginConfig; Table altered. SQL> SQL> alter table MessageOriginatorDataUser 2 add constraint FK3193E078D36EEC66 3 foreign key (msgId) 4 references Message; Table altered. SQL> SQL> alter table MessageOriginatorDataUser 2 add constraint FK3193E078B2526FE0 3 foreign key (originatorUserId) 4 references DataUser; Table altered. SQL> SQL> alter table RemediationInformation 2 add constraint REMEDIATIONINFORMATION_FK2 3 foreign key (remediatedDiscoverViolationID) 4 references DiscoverViolation; Table altered. SQL> SQL> alter table RemediationInformation 2 add constraint REMEDIATIONINFORMATION_FK1 3 foreign key (walkID) 4 references Walk; Table altered. SQL> SQL> alter table ResponseRuleExecRequest 2 add constraint RESPONSERULEEXECREQUEST_FK1 3 foreign key (userId) 4 references ProtectUser; Table altered. SQL> SQL> alter table ResponseRuleExecution 2 add constraint RESPONSE_RULE_EXECUTION_FK1 3 foreign key (responseRuleId) 4 references ResponseRule; Table altered. SQL> SQL> alter table ResponseRuleExecution 2 add constraint RESPONSE_RULE_EXECUTION_FK2 3 foreign key (responseRuleExecRequestId) 4 references ResponseRuleExecRequest; Table altered. SQL> SQL> alter table SavedUserData 2 add constraint savedUserData_FK2 3 foreign key (ROLEID) 4 references Role; Table altered. SQL> SQL> alter table SavedUserData 2 add constraint savedUserData_FK1 3 foreign key (USERID) 4 references ProtectUser; Table altered. SQL> SQL> alter table ScriptLookupPlugin 2 add constraint SCRIPTLOOKUPPLUGIN_FK1 3 foreign key (id) 4 references LookupPlugin; Table altered. SQL> SQL> alter table ScriptLookupProtocols 2 add constraint SCRIPTLOOKUPPROTOCOLS_FK1 3 foreign key (scriptLookupPluginId) 4 references ScriptLookupPlugin; Table altered. SQL> SQL> alter table SysInfoTask 2 add constraint SYSINFOTASK_FK1 3 foreign key (sysInfoJobId) 4 references SysInfoJob; Table altered. SQL> SQL> create sequence SEQ_AGENTATTRIBUTE start with 1 increment by 50; Sequence created. SQL> SQL> create sequence SEQ_AGENTATTRIBUTEDETAIL start with 1 increment by 50; Sequence created. SQL> SQL> create sequence SEQ_AGENTGROUP start with 1 increment by 50; Sequence created. SQL> SQL> create sequence SEQ_AGENTGROUPATTRIBUTERESULT start with 1 increment by 50; Sequence created. SQL> SQL> create sequence SEQ_AGENTGROUPCONDITION start with 1 increment by 50; Sequence created. SQL> SQL> create sequence SEQ_AGENTGROUPCONFLICTRULE start with 1 increment by 50; Sequence created. SQL> SQL> create sequence SEQ_AGENTGROUPHOSTNAME start with 1 increment by 50; Sequence created. SQL> SQL> create sequence SEQ_CONTENTROOTDISCOVERYMSG start with 1 increment by 50; Sequence created. SQL> SQL> create sequence SEQ_CONTENTROOTDISCOVERYSCAN start with 1 increment by 50; Sequence created. SQL> SQL> create sequence SEQ_CONTENTROOTSERVERFILTER start with 1 increment by 50; Sequence created. SQL> SQL> create sequence SEQ_DATAUSER start with 1 increment by 50; Sequence created. SQL> SQL> create sequence SEQ_DATAUSERATTRIBUTE; Sequence created. SQL> SQL> create sequence SEQ_DATAUSERSOURCE start with 1 increment by 50; Sequence created. SQL> SQL> create sequence SEQ_DATAUSER_STG start with 1000000000 increment by 50; Sequence created. SQL> SQL> create sequence SEQ_DISCOVEREDCONTENTROOT start with 1 increment by 50; Sequence created. SQL> SQL> create sequence SEQ_DISCOVERRESOURCE start with 1 increment by 50; Sequence created. SQL> SQL> create sequence SEQ_DISCOVERVIOLATION start with 1 increment by 50; Sequence created. SQL> SQL> create sequence SEQ_EXTERNAL_KEYSTORE start with 1 increment by 50; Sequence created. SQL> SQL> create sequence SEQ_INCIDENT_INFORMAIION start with 1 increment by 50; Sequence created. SQL> SQL> create sequence SEQ_LOOKUPPLUGIN start with 1 increment by 50; Sequence created. SQL> SQL> create sequence SEQ_LOOKUPPLUGINCONFIG start with 1 increment by 50; Sequence created. SQL> SQL> create sequence SEQ_REMEDIATIONINFORMATION start with 1 increment by 50; Sequence created. SQL> SQL> create sequence SEQ_RESPONSE_RULE_EXECUTION start with 1 increment by 50; Sequence created. SQL> SQL> create sequence SEQ_RESPONSE_RULE_EXEC_REQUEST start with 1 increment by 50; Sequence created. SQL> SQL> create sequence SEQ_SAVEDUSERDATA start with 1 increment by 50; Sequence created. SQL> SQL> create sequence SEQ_STATICENVIRONMENTINFO start with 1 increment by 50; Sequence created. SQL> SQL> create sequence SEQ_SYSINFOJOB start with 1 increment by 50; Sequence created. SQL> SQL> create sequence SEQ_SYSINFOTASK start with 1 increment by 50; Sequence created. SQL> SQL> create index AGENTATTRIBUTE_FK1 on AgentAttribute (deployedAttributeDetailId); Index created. SQL> SQL> create index AGENTATTRIBUTE_FK2 on AgentAttribute (undeployedAttributeDetailId); Index created. SQL> SQL> create index AGENTATTRIBUTEDEPENDENCIES_FK2 on AgentAttributeDependencies (dependencyId); Index created. SQL> SQL> create index AGENTATTRIBUTEDEPENDENCIES_FK1 on AgentAttributeDependencies (attributeDetailId); Index created. SQL> SQL> create index AGENTATTRIBUTEDETAIL_FK1 on AgentAttributeDetail (lastEditUserId); Index created. SQL> SQL> create index AGENTGROUP_FK3 on AgentGroup (lastEditUserId); Index created. SQL> SQL> create index AGENTGROUP_FK1 on AgentGroup (agentConfigurationVersionId); Index created. SQL> SQL> create index AGENTGROUPATTRIBUTERESULT_FK1 on AgentGroupAttributeResult (agentId); Index created. SQL> SQL> create index AGENTGROUPATTRIBUTERESULT_FK2 on AgentGroupAttributeResult (agentAttributeId); Index created. SQL> SQL> create index AGENTGROUPCONDITION_FK2 on AgentGroupCondition (agentAttributeId); Index created. SQL> SQL> create index AGENTGROUPCONDITION_FK1 on AgentGroupCondition (agentGroupId); Index created. SQL> SQL> create index AGENTGROUPCONDITIONVALUE_FK1 on AgentGroupConditionValue (agentGroupConditionId); Index created. SQL> SQL> create index AGENTGROUPCONFLICTRULE_FK2 on AgentGroupConflictRule (lastEditUserId); Index created. SQL> SQL> create index AGENTGROUPCONFLICTRULE_FK1 on AgentGroupConflictRule (resolvedAgentGroupId); Index created. SQL> SQL> create index AGENTGROUPHOSTNAME_FK1 on AgentGroupHostName (agentGroupId); Index created. SQL> SQL> create index CONFLICTRULEAGENT_FK2 on ConflictRuleAgent (agentId); Index created. SQL> SQL> create index CONFLICTRULEAGENT_FK1 on ConflictRuleAgent (agentGroupConflictRuleId); Index created. SQL> SQL> create index CONFLICTRULEDETAIL_FK1 on ConflictRuleDetail (agentGroupConflictRuleId); Index created. SQL> SQL> create index CONFLICTRULEDETAIL_FK2 on ConflictRuleDetail (agentGroupId); Index created. SQL> SQL> create index CONTENTROOTDISCOVERYMSG_FK1 on ContentRootDiscoveryMessage (contentRootDiscoveryScanId); Index created. SQL> SQL> create index CONTENTROOTDISCOVERY_FK1 on ContentRootDiscoveryScan (directoryConnectionId); Index created. SQL> SQL> create index CONTENTROOTSERVERFILTER_FK1 on ContentRootServerFilter (contentRootDiscoveryScanId); Index created. SQL> SQL> create index CUSTOMLOOKUPPLUGINJAR_FK1 on CustomLookupPluginJar (customLookupPluginId); Index created. SQL> SQL> create index DATAUSERATTRIBUTEVAL_FK1 on DataUserAttributeVal (dataUserAttributeId); Index created. SQL> SQL> create index DATAUSERATTRIBUTEVAL_FK2 on DataUserAttributeVal (dataUserId); Index created. SQL> SQL> create index DATAUSERATTRIBUTEVAL_STG_FK1 on DataUserAttributeVal_STG (dataUserAttributeId); Index created. SQL> SQL> create index DATAUSERATTRIBUTEVAL_STG_FK2 on DataUserAttributeVal_STG (dataUserId); Index created. SQL> SQL> create index DATAUSER_EMAILS_STG_FK1 on DataUser_Emails_STG (dataUserId); Index created. SQL> SQL> create index DATAUSER_STG_PROD_MATCH_FK1 on DataUser_STG_PROD_Match (dataUser_STG_ID); Index created. SQL> SQL> create index DATAUSER_STG_PROD_MATCH_FK2 on DataUser_STG_PROD_Match (dataUserId); Index created. SQL> SQL> create index DATAUSER_UNIQUELOGINS_STG_FK1 on DataUser_UniqueLogins_STG (dataUserId); Index created. SQL> SQL> create index DATAUSER_EMAILS_FK1 on DataUser_emails (dataUserId); Index created. SQL> SQL> create index DATAUSER_UNIQUELOGINS_FK1 on DataUser_uniqueLogins (dataUserId); Index created. SQL> SQL> create index DISCOVERRESOURCE_FK2 on DiscoverViolation (discoverResourceID); Index created. SQL> SQL> create index DISCOVERVIOLATION_FK2 on DiscoverViolation (policyID); Index created. SQL> SQL> create index DISCOVERVIOLATION_FK1 on DiscoverViolation (scanAssignmentID); Index created. SQL> SQL> create index DISCOVEREDCONTENTROOT_FK1 on DiscoveredContentRoot (contentRootDiscoveryScanId); Index created. SQL> SQL> create index EXTERNAL_KEYSTORE_FK1 on ExternalKeyStore (passwordId); Index created. SQL> SQL> create index INCIDENT_INFORMATION_FK1 on IncidentInformation (responseRuleExecutionId); Index created. SQL> SQL> create index FKC115EEB7741AD67A on LdapDataUserSource (directoryConnectionId); Index created. SQL> SQL> create index LDAPLOOKUPPLUGIN_FK2 on LdapLookupPlugin (directoryConnectionId); Index created. SQL> SQL> create index LOOKUPPLUGINCHAIN_FK2 on LookupPluginChain (lookupPluginId); Index created. SQL> SQL> create index LOOKUPPLUGINCHAIN_FK1 on LookupPluginChain (configId); Index created. SQL> SQL> create index FK3193E078B2526FE0 on MessageOriginatorDataUser (originatorUserId); Index created. SQL> SQL> create index REMEDIATIONINFORMATION_FK2 on RemediationInformation (remediatedDiscoverViolationID); Index created. SQL> SQL> create index REMEDIATIONINFORMATION_FK1 on RemediationInformation (walkID); Index created. SQL> SQL> create index RESPONSERULEEXECREQUEST_FK1 on ResponseRuleExecRequest (userId); Index created. SQL> SQL> create index RESPONSE_RULE_EXECUTION_FK1 on ResponseRuleExecution (responseRuleId); Index created. SQL> SQL> create index RESPONSE_RULE_EXECUTION_FK2 on ResponseRuleExecution (responseRuleExecRequestId); Index created. SQL> SQL> create index savedUserData_FK2 on SavedUserData (ROLEID); Index created. SQL> SQL> create index savedUserData_FK1 on SavedUserData (USERID); Index created. SQL> SQL> create index SCRIPTLOOKUPPROTOCOLS_FK1 on ScriptLookupProtocols (scriptLookupPluginId); Index created. SQL> SQL> create index SYSINFOTASK_FK1 on SysInfoTask (sysInfoJobId); Index created. SQL> SQL> SQL> SQL> @@EnforceEntities-indexes-constraints.sql SQL> -- SQL> -- DataUser SQL> -- SQL> -- Indexes for search and sorting SQL> CREATE INDEX DataUser_n1 ON DataUser(LOWER(firstName)); Index created. SQL> CREATE INDEX DataUser_n2 ON DataUser(LOWER(lastName)); Index created. SQL> CREATE INDEX DataUser_n3 ON DataUser(firstName); Index created. SQL> CREATE INDEX DataUser_n4 ON DataUser(lastName); Index created. SQL> CREATE INDEX DataUser_n5 ON DataUser(createDate); Index created. SQL> CREATE INDEX DataUser_n6 ON DataUser(modifyDate); Index created. SQL> -- Add cascade delete which cannot be specified from JPA for ElementCollection SQL> ALTER TABLE DataUser_emails DROP CONSTRAINT DATAUSER_EMAILS_FK1; Table altered. SQL> ALTER TABLE DataUser_emails ADD CONSTRAINT DATAUSER_EMAILS_FK1 2 FOREIGN KEY (dataUserId) REFERENCES DataUser ON DELETE CASCADE; Table altered. SQL> ALTER TABLE DataUser_emails DROP PRIMARY KEY; Table altered. SQL> ALTER TABLE DataUser_uniqueLogins DROP CONSTRAINT DATAUSER_UNIQUELOGINS_FK1; Table altered. SQL> ALTER TABLE DataUser_uniqueLogins ADD CONSTRAINT DATAUSER_UNIQUELOGINS_FK1 2 FOREIGN KEY (dataUserId) REFERENCES DataUser ON DELETE CASCADE; Table altered. SQL> ALTER TABLE DataUser_uniqueLogins DROP PRIMARY KEY; Table altered. SQL> SQL> -- Enforce global uniqueness of emails and uniqueLogins for DataUsers SQL> CREATE UNIQUE INDEX DataUser_emails_u1 ON DataUser_emails(LOWER(email)); Index created. SQL> CREATE UNIQUE INDEX DataUser_UniqueLogins_U1 ON DataUser_UniqueLogins(LOWER(Login), LOWER(Domain), LoginType, DomainType); Index created. SQL> -- Ensure DataUser and Message deletes cascade the join table SQL> ALTER TABLE MessageOriginatorDataUser DROP CONSTRAINT FK3193E078D36EEC66; Table altered. SQL> ALTER TABLE MessageOriginatorDataUser DROP CONSTRAINT FK3193E078B2526FE0; Table altered. SQL> ALTER TABLE MessageOriginatorDataUser ADD CONSTRAINT MessageOriginatorDataUser_FK1 2 FOREIGN KEY (msgId) REFERENCES Message ON DELETE CASCADE; Table altered. SQL> ALTER TABLE MessageOriginatorDataUser ADD CONSTRAINT MessageOriginatorDataUser_FK2 2 FOREIGN KEY (originatorUserId) REFERENCES DataUser ON DELETE CASCADE; Table altered. SQL> SQL> -- SQL> -- DataUser_STG SQL> -- SQL> ALTER TABLE DataUser_STG_PROD_Match DROP CONSTRAINT DATAUSER_STG_PROD_MATCH_FK2; Table altered. SQL> ALTER TABLE DataUser_STG_PROD_Match DROP CONSTRAINT DATAUSER_STG_PROD_MATCH_FK1; Table altered. SQL> SQL> -- --------------------------------------------------------------------------------------- SQL> -- Remove the index automatically created for the foreign key on DatauserID. SQL> -- The index on DataUser_STG_PROD_Match.DataUserID should be UNIQUE. SQL> -- --------------------------------------------------------------------------------------- SQL> DROP INDEX DATAUSER_STG_PROD_MATCH_FK2; Index dropped. SQL> CREATE UNIQUE INDEX DATAUSER_STG_PROD_MATCH_U1 ON DataUser_STG_PROD_Match (dataUserId); Index created. SQL> SQL> SQL> ALTER TABLE DataUser_STG_PROD_Match ADD CONSTRAINT DATAUSER_STG_PROD_MATCH_PK PRIMARY KEY (DataUserID, dataUser_STG_ID); Table altered. SQL> SQL> ALTER TABLE DataUser_Emails_STG DROP PRIMARY KEY; Table altered. SQL> ALTER TABLE DataUser_UniqueLogins_STG DROP PRIMARY KEY; Table altered. SQL> SQL> CREATE UNIQUE INDEX DATAUSER_STG_U1 ON DataUser_STG(LOWER(employeeId)); Index created. SQL> CREATE UNIQUE INDEX DATAUSER_EMAILS_STG_U1 ON DataUser_Emails_STG(LOWER(email)); Index created. SQL> CREATE UNIQUE INDEX DATAUSER_UNIQUELOGINS_STG_U1 ON DataUser_UniqueLogins_STG(LOWER(Login), LOWER(Domain), LoginType, DomainType); Index created. SQL> SQL> CREATE UNIQUE INDEX DATAUSERATTRIBUTE_U1 ON DataUserAttribute(LOWER(name)); Index created. SQL> SQL> -- Query index for DataUser attribute filtering SQL> CREATE INDEX DataUserAttributeVal_n1 ON DataUserAttributeVal (dataUserAttributeId, LOWER(Value), dataUserId); Index created. SQL> SQL> -- Add deferred unique constraint to Hibernate-generated join table (workaround for Hibernate issue HHH-1268) SQL> ALTER TABLE LookupPluginChain ADD CONSTRAINT LookupPluginChain_unique UNIQUE (lookupPluginId) DEFERRABLE INITIALLY DEFERRED; Table altered. SQL> SQL> -- SQL> -- AgentAttribute SQL> -- SQL> SQL> -- Add cascade that can't be specified in Hibernate SQL> ALTER TABLE AgentAttribute DROP CONSTRAINT AGENTATTRIBUTE_FK1; Table altered. SQL> ALTER TABLE AgentAttribute ADD CONSTRAINT AGENTATTRIBUTE_FK1 2 FOREIGN KEY (deployedAttributeDetailId) REFERENCES AgentAttributeDetail ON DELETE SET NULL; Table altered. SQL> SQL> ALTER TABLE AgentAttribute DROP CONSTRAINT AGENTATTRIBUTE_FK2; Table altered. SQL> ALTER TABLE AgentAttribute ADD CONSTRAINT AGENTATTRIBUTE_FK2 2 FOREIGN KEY (undeployedAttributeDetailId) REFERENCES AgentAttributeDetail ON DELETE SET NULL; Table altered. SQL> SQL> SQL> -- SQL> -- AgentGroup SQL> -- SQL> SQL> -- Change unique constraints to use specific names SQL> SQL> ALTER TABLE AgentGroup DROP UNIQUE (informationMonitorId); Table altered. SQL> CREATE UNIQUE INDEX AgentGroup_u1 ON AgentGroup(informationMonitorId); Index created. SQL> SQL> ALTER TABLE AgentGroupCondition DROP UNIQUE (agentGroupId, agentAttributeId); Table altered. SQL> CREATE UNIQUE INDEX AgentGroupCondition_u1 ON AgentGroupCondition(agentGroupId, agentAttributeId); Index created. SQL> SQL> CREATE UNIQUE INDEX AgentGroupHostName_u1 ON AgentGroupHostName(LOWER(agentHostName)); Index created. SQL> SQL> -- SQL> -- Agent SQL> -- SQL> SQL> -- Add foreign key from Agent to AgentGroup (Model -> JPA) SQL> SQL> ALTER TABLE Agent ADD CONSTRAINT Agent_fk99 FOREIGN KEY (lastAgentGroupID) references AgentGroup(id) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> CREATE INDEX Agent_fk99 ON Agent(lastAgentGroupID); Index created. SQL> SQL> -- SQL> -- Remediation (CRL) related tables. These tables are created using JPA SQL> -- Establishing the FK link from Incident table to DiscoverPolicyViolation SQL> -- SQL> ALTER TABLE INCIDENT ADD CONSTRAINT Incident_fk99 FOREIGN KEY (discoverViolationID) references DiscoverViolation(discoverViolationID) DEFERRABLE INITIALLY IMMEDIATE; Table altered. SQL> CREATE INDEX Incident_fk99 ON INCIDENT(discoverViolationID); Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- EnforceInstance SQL> -- --------------------------------------------------------------------------- SQL> CREATE UNIQUE INDEX EnforceInstance_U1 ON EnforceInstance(1); Index created. SQL> SQL> @@DiscoverCatalog-ddl.sql SQL> SQL> create table CATALOGENTRY_VIOLATEDPOLICY ( 2 catalogEntryId number(19,0) not null, 3 ViolatedPolicyId number(19,0) not null, 4 primary key (catalogEntryId, ViolatedPolicyId) 5 ); Table created. SQL> SQL> create table CatalogEntry ( 2 catalogEntryId number(19,0) not null, 3 itemLastModifiedDate timestamp not null, 4 itemName varchar2(512 char) not null, 5 itemParentUri varchar2(512 char) not null, 6 latestScanId number(19,0) not null, 7 scanId number(19,0) not null, 8 targetId number(19,0), 9 primary key (catalogEntryId), 10 unique (itemParentUri, itemName, targetId) 11 ); Table created. SQL> SQL> create table DiscoverTargetCatalogInfo ( 2 DiscoverTargetCatalogInfoId number(19,0) not null, 3 entryCount number(19,0), 4 latestScan number(1,0), 5 scanId number(19,0), 6 serverId number(19,0) not null, 7 status varchar2(255 char), 8 targetId number(19,0) not null, 9 primary key (DiscoverTargetCatalogInfoId), 10 unique (serverId, targetId) 11 ); Table created. SQL> SQL> create table ViolatedPolicy ( 2 ViolatedPolicyId number(19,0) not null, 3 policyid number(19,0), 4 policyVersion number(19,0), 5 primary key (ViolatedPolicyId), 6 unique (policyid, policyVersion) 7 ); Table created. SQL> SQL> alter table CATALOGENTRY_VIOLATEDPOLICY 2 add constraint VIOLATEDPOLICY_CAT_ENTRY_FK 3 foreign key (ViolatedPolicyId) 4 references ViolatedPolicy; Table altered. SQL> SQL> alter table CATALOGENTRY_VIOLATEDPOLICY 2 add constraint CATALOGENTRY_VIOL_POL_FK 3 foreign key (catalogEntryId) 4 references CatalogEntry; Table altered. SQL> SQL> create index catalogEntryIndex on CatalogEntry (itemName, itemParentUri, targetId); Index created. SQL> SQL> create index violatedPolicyIndex on ViolatedPolicy (policyid, policyVersion); create index violatedPolicyIndex on ViolatedPolicy (policyid, policyVersion) * ERROR at line 1: ORA-01408: such column list already indexed SQL> SQL> create table CATALOGENTRY_ID_SEQ_TABLE ( 2 SEQNAME varchar2(255 char) not null , 3 SEQCOUNT number(19,0), 4 primary key ( SEQNAME ) 5 ) ; Table created. SQL> SQL> create table DISCATALOGINFO_ID_SEQ_TABLE ( 2 SEQNAME varchar2(255 char) not null , 3 SEQCOUNT number(19,0), 4 primary key ( SEQNAME ) 5 ) ; Table created. SQL> SQL> create table VIOLATEDPOLICY_ID_SEQ_TABLE ( 2 SEQNAME varchar2(255 char) not null , 3 SEQCOUNT number(19,0), 4 primary key ( SEQNAME ) 5 ) ; Table created. SQL> create index VIOLATEDPOLICY_CAT_ENTRY_FK on CATALOGENTRY_VIOLATEDPOLICY (ViolatedPolicyId); Index created. SQL> SQL> create index CATALOGENTRY_VIOL_POL_FK on CATALOGENTRY_VIOLATEDPOLICY (catalogEntryId); Index created. SQL> SQL> SQL> SQL> @@DiscoverFilter-ddl.sql SQL> SQL> create table DedupFilter ( 2 dedupFilterId number(19,0) not null, 3 dedupBeginPending number(5,0) not null, 4 filterDataCount number(19,0) not null, 5 filterState varchar2(255 char) not null, 6 isLatestScan number(5,0) not null, 7 serverId number(19,0) not null, 8 targetId number(19,0) not null, 9 version number(19,0) not null, 10 walkId number(19,0) not null, 11 primary key (dedupFilterId), 12 unique (serverId, walkId) 13 ); Table created. SQL> SQL> create table DedupFilterData ( 2 dedupFilterDataId number(19,0) not null, 3 dataId varchar2(25 char) not null, 4 dedupFilterGroupId number(19,0) not null, 5 primary key (dedupFilterDataId) 6 ); Table created. SQL> SQL> create table DedupFilterGroup ( 2 dedupFilterGroupId number(19,0) not null, 3 groupId varchar2(25 char) not null, 4 walkId number(19,0) not null, 5 primary key (dedupFilterGroupId) 6 ); Table created. SQL> SQL> alter table DedupFilterData 2 add constraint DEDUPFILTERDATA_FK1 3 foreign key (dedupFilterGroupId) 4 references DedupFilterGroup 5 on delete cascade; Table altered. SQL> SQL> create table DEDUPFILTERDATA_ID_SEQ_TABLE ( 2 SEQNAME varchar2(255 char) not null , 3 SEQCOUNT number(19,0), 4 primary key ( SEQNAME ) 5 ) ; Table created. SQL> SQL> create table DEDUPFILTERGROUP_ID_SEQ_TABLE ( 2 SEQNAME varchar2(255 char) not null , 3 SEQCOUNT number(19,0), 4 primary key ( SEQNAME ) 5 ) ; Table created. SQL> SQL> create table DEDUPFILTER_ID_SEQ_TABLE ( 2 SEQNAME varchar2(255 char) not null , 3 SEQCOUNT number(19,0), 4 primary key ( SEQNAME ) 5 ) ; Table created. SQL> create index DEDUPFILTERDATA_FK1 on DedupFilterData (dedupFilterGroupId); Index created. SQL> SQL> SQL> SQL> @@quartz_tables_oracle.sql SQL> -- SQL> -- A hint submitted by a user: Oracle DB MUST be created as "shared" and the SQL> -- job_queue_processes parameter must be greater than 2, otherwise a DB lock SQL> -- will happen. However, these settings are pretty much standard after any SQL> -- Oracle install, so most users need not worry about this. SQL> -- SQL> SQL> SQL> -- Tables for Incident Persister Scheduler SQL> SQL> CREATE TABLE IP_QRTZ_job_details 2 ( 3 SCHED_NAME VARCHAR(120) NOT NULL, 4 JOB_NAME VARCHAR2(200) NOT NULL, 5 JOB_GROUP VARCHAR2(200) NOT NULL, 6 DESCRIPTION VARCHAR2(250) NULL, 7 JOB_CLASS_NAME VARCHAR2(250) NOT NULL, 8 IS_DURABLE VARCHAR2(1) NOT NULL, 9 IS_NONCONCURRENT VARCHAR2(1) NOT NULL, 10 IS_UPDATE_DATA VARCHAR2(1) NOT NULL, 11 REQUESTS_RECOVERY VARCHAR2(1) NOT NULL, 12 JOB_DATA BLOB NULL, 13 PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP) 14 ); Table created. SQL> CREATE TABLE IP_QRTZ_triggers 2 ( 3 SCHED_NAME VARCHAR(120) NOT NULL, 4 TRIGGER_NAME VARCHAR2(200) NOT NULL, 5 TRIGGER_GROUP VARCHAR2(200) NOT NULL, 6 JOB_NAME VARCHAR2(200) NOT NULL, 7 JOB_GROUP VARCHAR2(200) NOT NULL, 8 DESCRIPTION VARCHAR2(250) NULL, 9 NEXT_FIRE_TIME NUMBER(13) NULL, 10 PREV_FIRE_TIME NUMBER(13) NULL, 11 PRIORITY NUMBER(13) NULL, 12 TRIGGER_STATE VARCHAR2(16) NOT NULL, 13 TRIGGER_TYPE VARCHAR2(8) NOT NULL, 14 START_TIME NUMBER(13) NOT NULL, 15 END_TIME NUMBER(13) NULL, 16 CALENDAR_NAME VARCHAR2(200) NULL, 17 MISFIRE_INSTR NUMBER(2) NULL, 18 JOB_DATA BLOB NULL, 19 PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), 20 FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP) 21 REFERENCES IP_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP) 22 ); Table created. SQL> CREATE TABLE IP_QRTZ_simple_triggers 2 ( 3 SCHED_NAME VARCHAR(120) NOT NULL, 4 TRIGGER_NAME VARCHAR2(200) NOT NULL, 5 TRIGGER_GROUP VARCHAR2(200) NOT NULL, 6 REPEAT_COUNT NUMBER(7) NOT NULL, 7 REPEAT_INTERVAL NUMBER(12) NOT NULL, 8 TIMES_TRIGGERED NUMBER(10) NOT NULL, 9 PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), 10 FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) 11 REFERENCES IP_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) 12 ); Table created. SQL> CREATE TABLE IP_QRTZ_cron_triggers 2 ( 3 SCHED_NAME VARCHAR(120) NOT NULL, 4 TRIGGER_NAME VARCHAR2(200) NOT NULL, 5 TRIGGER_GROUP VARCHAR2(200) NOT NULL, 6 CRON_EXPRESSION VARCHAR2(120) NOT NULL, 7 TIME_ZONE_ID VARCHAR2(80), 8 PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), 9 FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) 10 REFERENCES IP_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) 11 ); Table created. SQL> CREATE TABLE IP_QRTZ_simprop_triggers 2 ( 3 SCHED_NAME VARCHAR(120) NOT NULL, 4 TRIGGER_NAME VARCHAR(200) NOT NULL, 5 TRIGGER_GROUP VARCHAR(200) NOT NULL, 6 STR_PROP_1 VARCHAR(512) NULL, 7 STR_PROP_2 VARCHAR(512) NULL, 8 STR_PROP_3 VARCHAR(512) NULL, 9 INT_PROP_1 NUMBER(10) NULL, 10 INT_PROP_2 NUMBER(10) NULL, 11 LONG_PROP_1 NUMBER(13) NULL, 12 LONG_PROP_2 NUMBER(13) NULL, 13 DEC_PROP_1 NUMERIC(13,4) NULL, 14 DEC_PROP_2 NUMERIC(13,4) NULL, 15 BOOL_PROP_1 VARCHAR(1) NULL, 16 BOOL_PROP_2 VARCHAR(1) NULL, 17 PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), 18 FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) 19 REFERENCES IP_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) 20 ); Table created. SQL> CREATE TABLE IP_QRTZ_blob_triggers 2 ( 3 SCHED_NAME VARCHAR(120) NOT NULL, 4 TRIGGER_NAME VARCHAR2(200) NOT NULL, 5 TRIGGER_GROUP VARCHAR2(200) NOT NULL, 6 BLOB_DATA BLOB NULL, 7 PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), 8 FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) 9 REFERENCES IP_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) 10 ); Table created. SQL> CREATE TABLE IP_QRTZ_calendars 2 ( 3 SCHED_NAME VARCHAR(120) NOT NULL, 4 CALENDAR_NAME VARCHAR2(200) NOT NULL, 5 CALENDAR BLOB NOT NULL, 6 PRIMARY KEY (SCHED_NAME,CALENDAR_NAME) 7 ); Table created. SQL> CREATE TABLE IP_QRTZ_paused_trigger_grps 2 ( 3 SCHED_NAME VARCHAR(120) NOT NULL, 4 TRIGGER_GROUP VARCHAR2(200) NOT NULL, 5 PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP) 6 ); Table created. SQL> CREATE TABLE IP_QRTZ_fired_triggers 2 ( 3 SCHED_NAME VARCHAR(120) NOT NULL, 4 ENTRY_ID VARCHAR2(95) NOT NULL, 5 TRIGGER_NAME VARCHAR2(200) NOT NULL, 6 TRIGGER_GROUP VARCHAR2(200) NOT NULL, 7 INSTANCE_NAME VARCHAR2(200) NOT NULL, 8 FIRED_TIME NUMBER(13) NOT NULL, 9 PRIORITY NUMBER(13) NOT NULL, 10 STATE VARCHAR2(16) NOT NULL, 11 JOB_NAME VARCHAR2(200) NULL, 12 JOB_GROUP VARCHAR2(200) NULL, 13 IS_NONCONCURRENT VARCHAR2(1) NULL, 14 REQUESTS_RECOVERY VARCHAR2(1) NULL, 15 PRIMARY KEY (SCHED_NAME,ENTRY_ID) 16 ); Table created. SQL> CREATE TABLE IP_QRTZ_scheduler_state 2 ( 3 SCHED_NAME VARCHAR(120) NOT NULL, 4 INSTANCE_NAME VARCHAR2(200) NOT NULL, 5 LAST_CHECKIN_TIME NUMBER(13) NOT NULL, 6 CHECKIN_INTERVAL NUMBER(13) NOT NULL, 7 PRIMARY KEY (SCHED_NAME,INSTANCE_NAME) 8 ); Table created. SQL> CREATE TABLE IP_QRTZ_locks 2 ( 3 SCHED_NAME VARCHAR(120) NOT NULL, 4 LOCK_NAME VARCHAR2(40) NOT NULL, 5 PRIMARY KEY (SCHED_NAME,LOCK_NAME) 6 ); Table created. SQL> SQL> -- Since Oracle has a limitation of 30 char in Index name SQL> -- change from idx_IP_qrtz to x_IP_qz SQL> create index x_IP_QZ_j_req_recovery on IP_QRTZ_job_details(SCHED_NAME,REQUESTS_RECOVERY); Index created. SQL> create index x_IP_QZ_j_grp on IP_QRTZ_job_details(SCHED_NAME,JOB_GROUP); Index created. SQL> SQL> create index x_IP_QZ_t_j on IP_QRTZ_triggers(SCHED_NAME,JOB_NAME,JOB_GROUP); Index created. SQL> create index x_IP_QZ_t_jg on IP_QRTZ_triggers(SCHED_NAME,JOB_GROUP); Index created. SQL> create index x_IP_QZ_t_c on IP_QRTZ_triggers(SCHED_NAME,CALENDAR_NAME); Index created. SQL> create index x_IP_QZ_t_g on IP_QRTZ_triggers(SCHED_NAME,TRIGGER_GROUP); Index created. SQL> create index x_IP_QZ_t_state on IP_QRTZ_triggers(SCHED_NAME,TRIGGER_STATE); Index created. SQL> create index x_IP_QZ_t_n_state on IP_QRTZ_triggers(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_STATE); Index created. SQL> create index x_IP_QZ_t_n_g_state on IP_QRTZ_triggers(SCHED_NAME,TRIGGER_GROUP,TRIGGER_STATE); Index created. SQL> create index x_IP_QZ_t_next_fire_time on IP_QRTZ_triggers(SCHED_NAME,NEXT_FIRE_TIME); Index created. SQL> create index x_IP_QZ_t_nft_st on IP_QRTZ_triggers(SCHED_NAME,TRIGGER_STATE,NEXT_FIRE_TIME); Index created. SQL> create index x_IP_QZ_t_nft_misfire on IP_QRTZ_triggers(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME); Index created. SQL> create index x_IP_QZ_t_nft_st_misfire on IP_QRTZ_triggers(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_STATE); Index created. SQL> create index x_IP_QZ_t_nft_st_misfire_grp on IP_QRTZ_triggers(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_GROUP,TRIGGER_STATE); Index created. SQL> SQL> create index x_IP_QZ_ft_trig_inst_name on IP_QRTZ_fired_triggers(SCHED_NAME,INSTANCE_NAME); Index created. SQL> create index x_IP_QZ_ft_inst_job_req_rcvry on IP_QRTZ_fired_triggers(SCHED_NAME,INSTANCE_NAME,REQUESTS_RECOVERY); Index created. SQL> create index x_IP_QZ_ft_j_g on IP_QRTZ_fired_triggers(SCHED_NAME,JOB_NAME,JOB_GROUP); Index created. SQL> create index x_IP_QZ_ft_jg on IP_QRTZ_fired_triggers(SCHED_NAME,JOB_GROUP); Index created. SQL> create index x_IP_QZ_ft_t_g on IP_QRTZ_fired_triggers(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP); Index created. SQL> create index x_IP_QZ_ft_tg on IP_QRTZ_fired_triggers(SCHED_NAME,TRIGGER_GROUP); Index created. SQL> SQL> SQL> SQL> -- Tables for the Manager Scheduler SQL> SQL> SQL> CREATE TABLE MGR_QRTZ_job_details 2 ( 3 SCHED_NAME VARCHAR(120) NOT NULL, 4 JOB_NAME VARCHAR2(200) NOT NULL, 5 JOB_GROUP VARCHAR2(200) NOT NULL, 6 DESCRIPTION VARCHAR2(250) NULL, 7 JOB_CLASS_NAME VARCHAR2(250) NOT NULL, 8 IS_DURABLE VARCHAR2(1) NOT NULL, 9 IS_NONCONCURRENT VARCHAR2(1) NOT NULL, 10 IS_UPDATE_DATA VARCHAR2(1) NOT NULL, 11 REQUESTS_RECOVERY VARCHAR2(1) NOT NULL, 12 JOB_DATA BLOB NULL, 13 PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP) 14 ); Table created. SQL> CREATE TABLE MGR_QRTZ_triggers 2 ( 3 SCHED_NAME VARCHAR(120) NOT NULL, 4 TRIGGER_NAME VARCHAR2(200) NOT NULL, 5 TRIGGER_GROUP VARCHAR2(200) NOT NULL, 6 JOB_NAME VARCHAR2(200) NOT NULL, 7 JOB_GROUP VARCHAR2(200) NOT NULL, 8 DESCRIPTION VARCHAR2(250) NULL, 9 NEXT_FIRE_TIME NUMBER(13) NULL, 10 PREV_FIRE_TIME NUMBER(13) NULL, 11 PRIORITY NUMBER(13) NULL, 12 TRIGGER_STATE VARCHAR2(16) NOT NULL, 13 TRIGGER_TYPE VARCHAR2(8) NOT NULL, 14 START_TIME NUMBER(13) NOT NULL, 15 END_TIME NUMBER(13) NULL, 16 CALENDAR_NAME VARCHAR2(200) NULL, 17 MISFIRE_INSTR NUMBER(2) NULL, 18 JOB_DATA BLOB NULL, 19 PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), 20 FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP) 21 REFERENCES MGR_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP) 22 ); Table created. SQL> CREATE TABLE MGR_QRTZ_simple_triggers 2 ( 3 SCHED_NAME VARCHAR(120) NOT NULL, 4 TRIGGER_NAME VARCHAR2(200) NOT NULL, 5 TRIGGER_GROUP VARCHAR2(200) NOT NULL, 6 REPEAT_COUNT NUMBER(7) NOT NULL, 7 REPEAT_INTERVAL NUMBER(12) NOT NULL, 8 TIMES_TRIGGERED NUMBER(10) NOT NULL, 9 PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), 10 FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) 11 REFERENCES MGR_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) 12 ); Table created. SQL> CREATE TABLE MGR_QRTZ_cron_triggers 2 ( 3 SCHED_NAME VARCHAR(120) NOT NULL, 4 TRIGGER_NAME VARCHAR2(200) NOT NULL, 5 TRIGGER_GROUP VARCHAR2(200) NOT NULL, 6 CRON_EXPRESSION VARCHAR2(120) NOT NULL, 7 TIME_ZONE_ID VARCHAR2(80), 8 PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), 9 FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) 10 REFERENCES MGR_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) 11 ); Table created. SQL> CREATE TABLE MGR_QRTZ_simprop_triggers 2 ( 3 SCHED_NAME VARCHAR(120) NOT NULL, 4 TRIGGER_NAME VARCHAR(200) NOT NULL, 5 TRIGGER_GROUP VARCHAR(200) NOT NULL, 6 STR_PROP_1 VARCHAR(512) NULL, 7 STR_PROP_2 VARCHAR(512) NULL, 8 STR_PROP_3 VARCHAR(512) NULL, 9 INT_PROP_1 NUMBER(10) NULL, 10 INT_PROP_2 NUMBER(10) NULL, 11 LONG_PROP_1 NUMBER(13) NULL, 12 LONG_PROP_2 NUMBER(13) NULL, 13 DEC_PROP_1 NUMERIC(13,4) NULL, 14 DEC_PROP_2 NUMERIC(13,4) NULL, 15 BOOL_PROP_1 VARCHAR(1) NULL, 16 BOOL_PROP_2 VARCHAR(1) NULL, 17 PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), 18 FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) 19 REFERENCES MGR_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) 20 ); Table created. SQL> CREATE TABLE MGR_QRTZ_blob_triggers 2 ( 3 SCHED_NAME VARCHAR(120) NOT NULL, 4 TRIGGER_NAME VARCHAR2(200) NOT NULL, 5 TRIGGER_GROUP VARCHAR2(200) NOT NULL, 6 BLOB_DATA BLOB NULL, 7 PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), 8 FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) 9 REFERENCES MGR_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) 10 ); Table created. SQL> CREATE TABLE MGR_QRTZ_calendars 2 ( 3 SCHED_NAME VARCHAR(120) NOT NULL, 4 CALENDAR_NAME VARCHAR2(200) NOT NULL, 5 CALENDAR BLOB NOT NULL, 6 PRIMARY KEY (SCHED_NAME,CALENDAR_NAME) 7 ); Table created. SQL> CREATE TABLE MGR_QRTZ_paused_trigger_grps 2 ( 3 SCHED_NAME VARCHAR(120) NOT NULL, 4 TRIGGER_GROUP VARCHAR2(200) NOT NULL, 5 PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP) 6 ); Table created. SQL> CREATE TABLE MGR_QRTZ_fired_triggers 2 ( 3 SCHED_NAME VARCHAR(120) NOT NULL, 4 ENTRY_ID VARCHAR2(95) NOT NULL, 5 TRIGGER_NAME VARCHAR2(200) NOT NULL, 6 TRIGGER_GROUP VARCHAR2(200) NOT NULL, 7 INSTANCE_NAME VARCHAR2(200) NOT NULL, 8 FIRED_TIME NUMBER(13) NOT NULL, 9 PRIORITY NUMBER(13) NOT NULL, 10 STATE VARCHAR2(16) NOT NULL, 11 JOB_NAME VARCHAR2(200) NULL, 12 JOB_GROUP VARCHAR2(200) NULL, 13 IS_NONCONCURRENT VARCHAR2(1) NULL, 14 REQUESTS_RECOVERY VARCHAR2(1) NULL, 15 PRIMARY KEY (SCHED_NAME,ENTRY_ID) 16 ); Table created. SQL> CREATE TABLE MGR_QRTZ_scheduler_state 2 ( 3 SCHED_NAME VARCHAR(120) NOT NULL, 4 INSTANCE_NAME VARCHAR2(200) NOT NULL, 5 LAST_CHECKIN_TIME NUMBER(13) NOT NULL, 6 CHECKIN_INTERVAL NUMBER(13) NOT NULL, 7 PRIMARY KEY (SCHED_NAME,INSTANCE_NAME) 8 ); Table created. SQL> CREATE TABLE MGR_QRTZ_locks 2 ( 3 SCHED_NAME VARCHAR(120) NOT NULL, 4 LOCK_NAME VARCHAR2(40) NOT NULL, 5 PRIMARY KEY (SCHED_NAME,LOCK_NAME) 6 ); Table created. SQL> SQL> -- Since Oracle has a limitation of 30 char in Index name SQL> -- change from idx_MGR_qrtz to x_MG_QZ SQL> create index x_MG_QZ_j_req_recovery on MGR_QRTZ_job_details(SCHED_NAME,REQUESTS_RECOVERY); Index created. SQL> create index x_MG_QZ_j_grp on MGR_QRTZ_job_details(SCHED_NAME,JOB_GROUP); Index created. SQL> SQL> create index x_MG_QZ_t_j on MGR_QRTZ_triggers(SCHED_NAME,JOB_NAME,JOB_GROUP); Index created. SQL> create index x_MG_QZ_t_jg on MGR_QRTZ_triggers(SCHED_NAME,JOB_GROUP); Index created. SQL> create index x_MG_QZ_t_c on MGR_QRTZ_triggers(SCHED_NAME,CALENDAR_NAME); Index created. SQL> create index x_MG_QZ_t_g on MGR_QRTZ_triggers(SCHED_NAME,TRIGGER_GROUP); Index created. SQL> create index x_MG_QZ_t_state on MGR_QRTZ_triggers(SCHED_NAME,TRIGGER_STATE); Index created. SQL> create index x_MG_QZ_t_n_state on MGR_QRTZ_triggers(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_STATE); Index created. SQL> create index x_MG_QZ_t_n_g_state on MGR_QRTZ_triggers(SCHED_NAME,TRIGGER_GROUP,TRIGGER_STATE); Index created. SQL> create index x_MG_QZ_t_next_fire_time on MGR_QRTZ_triggers(SCHED_NAME,NEXT_FIRE_TIME); Index created. SQL> create index x_MG_QZ_t_nft_st on MGR_QRTZ_triggers(SCHED_NAME,TRIGGER_STATE,NEXT_FIRE_TIME); Index created. SQL> create index x_MG_QZ_t_nft_misfire on MGR_QRTZ_triggers(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME); Index created. SQL> create index x_MG_QZ_t_nft_st_misfire on MGR_QRTZ_triggers(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_STATE); Index created. SQL> create index x_MG_QZ_t_nft_st_misfire_grp on MGR_QRTZ_triggers(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_GROUP,TRIGGER_STATE); Index created. SQL> SQL> create index x_MG_QZ_ft_trig_inst_name on MGR_QRTZ_fired_triggers(SCHED_NAME,INSTANCE_NAME); Index created. SQL> create index x_MG_QZ_ft_inst_job_req_rcvry on MGR_QRTZ_fired_triggers(SCHED_NAME,INSTANCE_NAME,REQUESTS_RECOVERY); Index created. SQL> create index x_MG_QZ_ft_j_g on MGR_QRTZ_fired_triggers(SCHED_NAME,JOB_NAME,JOB_GROUP); Index created. SQL> create index x_MG_QZ_ft_jg on MGR_QRTZ_fired_triggers(SCHED_NAME,JOB_GROUP); Index created. SQL> create index x_MG_QZ_ft_t_g on MGR_QRTZ_fired_triggers(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP); Index created. SQL> create index x_MG_QZ_ft_tg on MGR_QRTZ_fired_triggers(SCHED_NAME,TRIGGER_GROUP); Index created. SQL> SQL> commit; Commit complete. SQL> SQL> @@Data_Insight_DDL.sql SQL> SQL> /* *********************************************************************************** SQL> SELECT ' ''' || table_name || ''',' SQL> FROM user_tables SQL> WHERE table_name LIKE 'DI\_%' ESCAPE '\' AND SQL> table_name NOT LIKE 'DI%QRTZ%' SQL> ORDER BY 1; SQL> SQL> SELECT ' ''' || sequence_name || ''',' SQL> FROM user_sequences SQL> WHERE sequence_name LIKE 'SEQ\_DI\_%' ESCAPE '\' AND SQL> sequence_name NOT LIKE 'SEQ%DI%QRTZ%' SQL> ORDER BY 1; SQL> * *********************************************************************************** */ SQL> SQL> set echo on SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- Clean up Data Insight Schema SQL> -- ----------------------------------------------------------------------------------- SQL> DECLARE 2 l_table_list sys.odcivarchar2list := 3 sys.odcivarchar2list( 4 'DI_ACLGROUP', 5 'DI_BINDSTRING_TMP', 6 'DI_DATAREFRESH_STATE', 7 'DI_DATAREFRESH_TASK_TRK', 8 'DI_DATAREFRESH_TRK', 9 'DI_DATA_REFRESH_CONFIG', 10 'DI_DELETEDSHARE', 11 'DI_ERRORLOG', 12 'DI_FILE', 13 'DI_FILEDAYUSER', 14 'DI_FILEDAYUSER_REFRESH', 15 'DI_FILEDAYUSER_STG', 16 'DI_FILEHAZARD', 17 'DI_FILEHAZARD_STG', 18 'DI_FILEREFRESH_TRK', 19 'DI_FILEREFRESH_TRK_STG', 20 'DI_FILEUSAGESCORE', 21 'DI_FILEUSAGESCORE_STG', 22 'DI_FILTER', 23 'DI_FOLDERACCESSIBILITY', 24 'DI_FOLDERACCESSIBILITY_STG', 25 'DI_FOLDERACCESS_REFRESH', 26 'DI_FOLDERDATAOWNER', 27 'DI_FOLDERFACT', 28 'DI_FOLDERFACT_STG', 29 'DI_FOLDERPERMISSION', 30 'DI_FOLDERPERMISSION_REFRESH', 31 'DI_FOLDERPERMISSION_STG', 32 'DI_FOLDERPOLICYFACT', 33 'DI_FOLDERPOLICYFACT_STG', 34 'DI_FOLDERUG', 35 'DI_FOLDERUG_ROLLBACK', 36 'DI_FOLDERUSERGROUP', 37 'DI_FOLDERUSERGROUP_REFRESH', 38 'DI_FOLDERUSERGROUP_STG', 39 'DI_FOLDER_SNAPSHOT', 40 'DI_HAZARD_SNAPSHOT', 41 'DI_MONITOREDSHARE', 42 'DI_MONITOREDSHARE_STG', 43 'DI_NEW_FILE', 44 'DI_NEW_FOLDER', 45 'DI_OBSOLETE_FILE', 46 'DI_OBSOLETE_FOLDER', 47 'DI_POST_PROCESSING_TRK', 48 'DI_PREDICATE_TMP', 49 'DI_REPORTING_STATUS', 50 'DI_SHAREFOLDER', 51 'DI_TIMEDIM', 52 'DI_USER' 53 ); 54 55 -- --------------------------------------------------------------------------- 56 -- Sequences to be dropped. 57 -- --------------------------------------------------------------------------- 58 CURSOR c_seq_to_be_dropped IS 59 SELECT 'DROP SEQUENCE ' || sequence_name stmt 60 FROM user_sequences 61 WHERE sequence_name LIKE 'SEQ\_DI\_%' ESCAPE '\' AND 62 sequence_name NOT LIKE 'SEQ%DI%QRTZ%'; 63 64 -- --------------------------------------------------------------------------- 65 -- Foreign keys to be dropped. 66 -- --------------------------------------------------------------------------- 67 CURSOR c_FK_to_be_dropped IS 68 SELECT 'ALTER TABLE ' || child_table || ' DROP CONSTRAINT ' || ref_constraint 69 drop_constraint_ddl 70 FROM 71 ( 72 SELECT p.table_name parent_table, c.table_name child_table, 73 c.constraint_name ref_constraint 74 FROM user_constraints p, user_constraints c 75 WHERE p.constraint_name = c.R_Constraint_name AND 76 p.table_name IN (SELECT column_value FROM TABLE(l_table_list)) 77 ) 78 UNION 79 SELECT 'ALTER TABLE ' || table_name || ' DROP CONSTRAINT ' || constraint_name 80 drop_constraint_ddl 81 FROM user_constraints 82 WHERE constraint_type = 'R' AND 83 table_name IN (SELECT column_value FROM TABLE(l_table_list)); 84 85 -- --------------------------------------------------------------------------- 86 -- Tables to be dropped. 87 -- --------------------------------------------------------------------------- 88 CURSOR c IS 89 SELECT 'DROP TABLE ' || table_name stmt 90 FROM user_tables 91 WHERE table_name IN (SELECT column_value FROM TABLE(l_table_list)); 92 93 BEGIN 94 -- --------------------------------------------------------------------------- 95 -- Drop sequences 96 -- --------------------------------------------------------------------------- 97 FOR x IN c_seq_to_be_dropped LOOP 98 EXECUTE IMMEDIATE x.stmt; 99 END LOOP; 100 101 -- --------------------------------------------------------------------------- 102 -- Drop foreign keys 103 -- --------------------------------------------------------------------------- 104 FOR x IN c_FK_to_be_dropped LOOP 105 EXECUTE IMMEDIATE x.drop_constraint_ddl; 106 END LOOP; 107 108 -- --------------------------------------------------------------------------- 109 -- Drop tables 110 -- --------------------------------------------------------------------------- 111 FOR x IN c LOOP 112 EXECUTE IMMEDIATE x.stmt; 113 END LOOP; 114 END; 115 / PL/SQL procedure successfully completed. SQL> SQL> SQL> SQL> SQL> /* ============================================= SQL> -- -------------------------------------------------------------------------- SQL> -- Folder SQL> -- -------------------------------------------------------------------------- SQL> exec FOR x IN (SELECT 1 FROM user_tables WHERE table_name = 'FOLDER') LOOP EXECUTE IMMEDIATE 'drop table Folder cascade constraints'; END LOOP SQL> SQL> create table Folder SQL> ( SQL> folderID integer not null, SQL> path varchar(512 CHAR) not null unique, SQL> folderType integer not null CHECK (folderType IN (0,1)) SQL> ) SQL> ; SQL> SQL> exec FOR x IN (SELECT 1 FROM user_sequences WHERE sequence_name = 'SEQ_FOLDER') LOOP EXECUTE IMMEDIATE 'drop sequence seq_Folder'; END LOOP SQL> SQL> create sequence seq_Folder; SQL> SQL> ALTER TABLE Folder ADD CONSTRAINT Folder_pk PRIMARY KEY (folderID); SQL> SQL> SQL> -- RENAME Folders TO Folder; SQL> -- ALTER TABLE Folder RENAME COLUMN FullPath to Path; SQL> -- ALTER TABLE Folder ADD FolderType INTEGER DEFAULT 0 NOT NULL CHECK (folderType IN (0,1)); SQL> SQL> * ============================================= */ SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_MonitoredShare SQL> -- SQL> -- ShareType: 1 - CIFS SQL> -- 2 - DFS SQL> -- SQL> -- FirstAddedOn : time of first monitoring SQL> -- FirstActivityTime : time of first access information SQL> -- LastActivityTime : time of most recent access information SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE TABLE DI_MonitoredShare ( 2 ShareID INTEGER NOT NULL, 3 SharePath VARCHAR2(512) NOT NULL, 4 ShareType INTEGER NOT NULL CHECK (ShareType IN (1, 2)), 5 FirstAddedOn DATE, 6 FirstActivityTime DATE, 7 LastActivityTime DATE 8 ); Table created. SQL> SQL> CREATE SEQUENCE seq_DI_MonitoredShare; Sequence created. SQL> SQL> CREATE TABLE DI_MonitoredShare_STG ( 2 ShareID INTEGER NOT NULL, 3 SharePath VARCHAR2(512) NOT NULL, 4 ShareType INTEGER NOT NULL CHECK (ShareType IN (1, 2)), 5 FirstAddedOn DATE, 6 FirstActivityTime DATE, 7 LastActivityTime DATE 8 ); Table created. SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_DeletedShare SQL> -- SQL> -- ShareType: 1 - CIFS SQL> -- 2 - DFS SQL> -- SQL> -- DateObserved : The date that the share was observed by the Data Insight SQL> -- data refresh process to be deleted. SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE TABLE DI_DeletedShare ( 2 ShareID INTEGER NOT NULL, 3 SharePath VARCHAR2(512) NOT NULL, 4 ShareType INTEGER NOT NULL CHECK (ShareType IN (1, 2)), 5 DateObserved DATE NOT NULL 6 ); Table created. SQL> SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_ShareFolder - intersection table between DI_MonitoredShare and Folder tables. SQL> -- Although the relationship between a share and folder is 1-M, this intersection SQL> -- table, which is usually used for a M-to-M relationship, is used to track the SQL> -- relationship because Folder is not a Data Insight table and should be left alone. SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE TABLE DI_ShareFolder ( 2 ShareID INTEGER NOT NULL, 3 FolderID INTEGER NOT NULL 4 ); Table created. SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- Files SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE TABLE DI_File ( 2 FileId INTEGER NOT NULL, 3 FolderId INTEGER NOT NULL, 4 FileName VARCHAR2(512) NOT NULL, -- FileName Only 5 DataOwnerID INTEGER 6 ); Table created. SQL> SQL> CREATE SEQUENCE seq_DI_File; Sequence created. SQL> SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DataOwner SQL> -- ----------------------------------------------------------------------------------- SQL> /* ============================================= SQL> CREATE TABLE DataOwner ( SQL> DataOwnerID INTEGER NOT NULL, SQL> Name VARCHAR2(256 CHAR) SQL> ); SQL> SQL> CREATE SEQUENCE seq_DataOwner; SQL> * ============================================= */ SQL> SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_Hazard_Snapshot SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE TABLE DI_Hazard_Snapshot ( 2 IncidentID INTEGER NOT NULL, 3 PolicyID INTEGER NOT NULL, 4 StatusID INTEGER, 5 SeverityID INTEGER NOT NULL, 6 FolderID INTEGER NOT NULL, 7 FileName VARCHAR2(512) NOT NULL, 8 DataOwnerID INTEGER 9 ) NOLOGGING; Table created. SQL> SQL> SQL> -- CREATE UNIQUE INDEX DI_hazard_snapshot_U1 ON DI_hazard_snapshot(IncidentID) NOLOGGING; SQL> -- CREATE UNIQUE INDEX DI_hazard_snapshot_U2 ON DI_hazard_snapshot(FolderID, FileName, PolicyID) NOLOGGING; SQL> SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_New_File SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE TABLE DI_New_File ( 2 FileID INTEGER NOT NULL 3 ) NOLOGGING; Table created. SQL> SQL> -- CREATE UNIQUE INDEX DI_New_File_U1 ON DI_New_File(FileID) NOLOGGING; SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_Folder_Snapshot SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE TABLE DI_Folder_Snapshot ( 2 FolderID INTEGER NOT NULL, 3 Path VARCHAR2(512) NOT NULL 4 ) NOLOGGING; Table created. SQL> SQL> -- CREATE UNIQUE INDEX DI_Folder_Snapshot_U1 ON DI_Folder_Snapshot(FolderID) NOLOGGING; SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_OBSOLETE_FOLDER SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE TABLE DI_OBSOLETE_FOLDER ( 2 FolderID INTEGER NOT NULL 3 ) NOLOGGING; Table created. SQL> SQL> -- CREATE UNIQUE INDEX DI_OBSOLETE_FOLDER_u1 ON DI_OBSOLETE_FOLDER(FolderID) NOLOGGING; SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_NEW_FOLDER SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE TABLE DI_NEW_FOLDER ( 2 FolderID INTEGER NOT NULL 3 ) NOLOGGING; Table created. SQL> SQL> -- CREATE UNIQUE INDEX DI_NEW_FOLDER_u1 ON DI_NEW_FOLDER(FolderID) NOLOGGING; SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_OBSOLETE_FILE SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE TABLE DI_OBSOLETE_FILE ( 2 FileID INTEGER NOT NULL 3 ) NOLOGGING; Table created. SQL> SQL> -- CREATE UNIQUE INDEX DI_OBSOLETE_FILE_u1 ON DI_OBSOLETE_FILE(FileID) NOLOGGING; SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_FOLDERACCESSIBILITY SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE TABLE DI_FOLDERACCESSIBILITY ( 2 folderID INTEGER NOT NULL, 3 Accessibility INTEGER, 4 RefreshDate DATE 5 ); Table created. SQL> SQL> CREATE TABLE DI_FOLDERACCESSIBILITY_STG ( 2 folderID INTEGER NOT NULL, 3 Accessibility INTEGER, 4 RefreshDate DATE 5 ); Table created. SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_FILEHAZARD SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE TABLE DI_FILEHAZARD ( 2 fileID INTEGER NOT NULL, 3 PolicyID INTEGER NOT NULL, 4 StatusID INTEGER NOT NULL, 5 PartialRiskScore INTEGER NOT NULL 6 ); Table created. SQL> SQL> CREATE TABLE DI_FILEHAZARD_STG ( 2 fileID INTEGER NOT NULL, 3 PolicyID INTEGER NOT NULL, 4 StatusID INTEGER NOT NULL, 5 PartialRiskScore INTEGER NOT NULL 6 ); Table created. SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_AclGroup SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE TABLE DI_AclGroup ( 2 ACLGroupID INTEGER NOT NULL, 3 GroupName VARCHAR2(320) NOT NULL 4 ); Table created. SQL> SQL> CREATE SEQUENCE seq_DI_AclGroup; Sequence created. SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_USER SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE TABLE DI_USER ( 2 UserID INTEGER NOT NULL, 3 UserName VARCHAR2(320) NOT NULL 4 ); Table created. SQL> SQL> CREATE SEQUENCE seq_DI_USER; Sequence created. SQL> SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- ACLGroupUserMapping - Tracks only users that have file usage in the time period? SQL> -- Probably more efficient to just track all users in the group. SQL> -- SQL> -- SQL> -- On the ACL Group Section of the folder details report, the "Users" column can actually SQL> -- be 0 (meaning the user does not have any file usages in the time period). SQL> -- ----------------------------------------------------------------------------------- SQL> /* =================================================================================== SQL> CREATE TABLE ACLGroupUserMapping ( SQL> ACLGroupID INTEGER NOT NULL, SQL> UserID INTEGER NOT NULL SQL> ); SQL> * =================================================================================== */ SQL> SQL> /* *********************************************************************************** SQL> SQL> User Access Tables - FolderUserGroup-related tables SQL> SQL> * *********************************************************************************** */ SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_FOLDERUG SQL> -- SQL> -- DI_FOLDERUG --< DI_FOLDERUSERGROUP SQL> -- SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE TABLE DI_FolderUG ( 2 FolderID INTEGER NOT NULL, 3 RefreshDate DATE 4 ); Table created. SQL> SQL> CREATE TABLE DI_FolderUG_Rollback ( 2 FolderID INTEGER NOT NULL, 3 RefreshDate DATE 4 ); Table created. SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_FOLDERUSERGROUP SQL> -- SQL> -- EntityType: U - user SQL> -- G - Group SQL> -- NULL - neither, EntityID has to be NULL as well. NULL value in both SQL> -- both columns indicates that the user no longer has access SQL> -- to the folder. SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE TABLE DI_FOLDERUSERGROUP ( 2 FolderID INTEGER NOT NULL, 3 UserID INTEGER NOT NULL, 4 EntityID INTEGER, 5 EntityType VARCHAR2(1) CHECK (EntityType IN ('U', 'G')) 6 ); Table created. SQL> SQL> CREATE TABLE DI_FOLDERUSERGROUP_STG ( 2 FolderID INTEGER NOT NULL, 3 UserID INTEGER NOT NULL, 4 EntityID INTEGER, 5 EntityType VARCHAR2(1) CHECK (EntityType IN ('U', 'G')) 6 ); Table created. SQL> SQL> -- *********************************************************************************** SQL> -- *********************************************************************************** SQL> SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_FOLDERPERMISSION SQL> -- SQL> -- Entity: U - User, G - Group SQL> -- SQL> -- ReadWriteFlag: R - Read Access SQL> -- W - Write Access SQL> -- B - Both read and write accesses SQL> -- N - None SQL> -- SQL> -- For users (entity), we will only track users that have read access (or both), but SQL> -- not users who have only write access! SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE TABLE DI_FOLDERPERMISSION ( 2 FolderID INTEGER NOT NULL, 3 EntityID INTEGER NOT NULL, -- Either User or Group based on Entity. 4 Entity VARCHAR2(1) NOT NULL CHECK (Entity IN ('U', 'G')), 5 NumUsers INTEGER, -- "ACL Openness" 6 PermissionFlag VARCHAR2(1) NOT NULL CHECK (PermissionFlag IN ('R', 'W', 'B', 'N')), 7 RefreshDate DATE 8 ); Table created. SQL> SQL> CREATE TABLE DI_FOLDERPERMISSION_STG ( 2 FolderID INTEGER NOT NULL, 3 EntityID INTEGER NOT NULL, -- Either User or Group based on Entity. 4 Entity VARCHAR2(1) NOT NULL CHECK (Entity IN ('U', 'G')), 5 NumUsers INTEGER, -- "ACL Openness" 6 PermissionFlag VARCHAR2(1) NOT NULL CHECK (PermissionFlag IN ('R', 'W', 'B', 'N')), 7 RefreshDate DATE 8 ); Table created. SQL> SQL> SQL> -- =================================================================================== SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_TIMEDIM SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE TABLE DI_TIMEDIM ( 2 TimeKey INTEGER NOT NULL, 3 theDate DATE NOT NULL, 4 dayOfWeek NUMBER(1) NOT NULL, 5 dayNumberInMonth NUMBER(2) NOT NULL, 6 month NUMBER(2) NOT NULL, 7 quarter NUMBER(1) NOT NULL, 8 year NUMBER(4) NOT NULL, 9 quarterSeqNum NUMBER(4) NOT NULL, 10 monthSeqNum NUMBER(4) NOT NULL, 11 weekSeqNum NUMBER(5) NOT NULL, 12 FirstDayOfMonth DATE NOT NULL, 13 LastDayOfMonth DATE NOT NULL 14 ); Table created. SQL> SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- Populate DI_TIMEDIM SQL> -- SQL> -- MonthSeqNum gets incremented every month. SQL> -- SQL> -- ----------------------------------------------------------------------------------- SQL> DECLARE 2 i INTEGER := 10000; 3 l_QuarterSeqNum INTEGER := 1000; 4 l_MonthSeqNum INTEGER := 1000; 5 l_WeekSeqNum INTEGER := 1000; 6 l_currentQuarter INTEGER; 7 l_currentMonth INTEGER; 8 l_DayOfWeek INTEGER; 9 l_theDate DATE := TO_DATE('2000-01-01', 'YYYY-MM-DD'); 10 l_FirstDayOfMonth DATE; 11 l_LastDayOfMonth DATE; 12 13 BEGIN 14 l_currentQuarter := TO_NUMBER(TO_CHAR(l_theDate, 'Q')); 15 l_currentMonth := TO_NUMBER(RTRIM(TO_CHAR(l_theDate, 'mm'))); 16 17 WHILE l_theDate <= TO_DATE('2020-12-31', 'YYYY-MM-DD') LOOP 18 l_DayOfWeek := TO_NUMBER(TO_CHAR(l_theDate, 'D')); 19 20 IF (i > 1 AND l_DayOfWeek = 1) THEN 21 l_WeekSeqNum := l_WeekSeqNum + 1; 22 END IF; 23 24 IF (l_currentMonth <> TO_NUMBER(RTRIM(TO_CHAR(l_theDate, 'mm')))) THEN 25 l_monthSeqNum := l_MonthSeqNum + 1; 26 l_currentMonth := TO_NUMBER(RTRIM(TO_CHAR(l_theDate, 'mm'))); 27 END IF; 28 29 IF (l_currentQuarter <> TO_NUMBER(TO_CHAR(l_theDate, 'Q'))) THEN 30 l_QuarterSeqNum := l_QuarterSeqNum + 1; 31 l_currentQuarter := TO_NUMBER(TO_CHAR(l_theDate, 'Q')); 32 END IF; 33 34 l_FirstDayOfMonth := TO_DATE(TO_CHAR(l_theDate, 'yyyy') || '-' || 35 TO_CHAR(l_theDate, 'mm') || '-01', 36 'YYYY-MM-DD'); 37 38 l_LastDayOfMonth := Last_Day(l_theDate); 39 40 INSERT INTO DI_TIMEDIM (TimeKey, theDate, dayOfWeek, DayNumberInMonth, 41 Month, Quarter, Year, QuarterSeqNum, MonthSeqNum, 42 WeekSeqNum, FirstDayOfMonth, LastDayOfMonth) 43 VALUES 44 ( i, 45 l_theDate, 46 TO_NUMBER(TO_CHAR(l_theDate, 'D')), 47 TO_NUMBER(TO_CHAR(l_theDate, 'dd')), 48 TO_NUMBER(RTRIM(TO_CHAR(l_theDate, 'mm'))), 49 TO_NUMBER(TO_CHAR(l_theDate, 'Q')), 50 TO_NUMBER(TO_CHAR(l_theDate, 'yyyy')), 51 l_QuarterSeqNum, 52 l_MonthSeqNum, 53 l_WeekSeqNum, 54 l_FirstDayOfMonth, 55 l_LastDayOfMonth 56 ); 57 58 l_theDate := l_theDate + 1; 59 i := i + 1; 60 END LOOP; 61 END; 62 / PL/SQL procedure successfully completed. SQL> SQL> COMMIT; Commit complete. SQL> SQL> SQL> ALTER TABLE DI_TIMEDIM ADD CONSTRAINT DI_TIMEDIM_pk PRIMARY KEY (TimeKey) NOLOGGING; Table altered. SQL> SQL> CREATE UNIQUE INDEX DI_TIMEDIM_u1 ON DI_TIMEDIM(theDate); Index created. SQL> CREATE INDEX DI_TIMEDIM_N1 ON DI_TIMEDIM(MonthSeqNum); Index created. SQL> SQL> BEGIN 2 DBMS_STATS.GATHER_TABLE_STATS( 3 ownname => user, 4 tabname => 'DI_TIMEDIM', 5 estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE, 6 method_opt => 'FOR ALL COLUMNS SIZE SKEWONLY', 7 cascade => TRUE 8 ); 9 END; 10 / PL/SQL procedure successfully completed. SQL> SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_FILEDAYUSER SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE TABLE DI_FILEDAYUSER ( 2 FileID INTEGER NOT NULL, 3 TimeKey INTEGER NOT NULL, 4 UserID INTEGER NOT NULL, 5 NumReads INTEGER, 6 NumWrites INTEGER 7 ); Table created. SQL> SQL> CREATE TABLE DI_FILEDAYUSER_STG ( 2 FileID INTEGER NOT NULL, 3 TimeKey INTEGER NOT NULL, 4 UserID INTEGER NOT NULL, 5 NumReads INTEGER, 6 NumWrites INTEGER 7 ); Table created. SQL> SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_FILEREFRESH_TRK SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE TABLE DI_FILEREFRESH_TRK ( 2 FileID INTEGER NOT NULL, 3 TimeKey INTEGER NOT NULL 4 ); Table created. SQL> SQL> CREATE TABLE DI_FILEREFRESH_TRK_STG ( 2 FileID INTEGER NOT NULL, 3 TimeKey INTEGER NOT NULL 4 ); Table created. SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_FILEUSAGESCORE SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE TABLE DI_FILEUSAGESCORE ( 2 FileID INTEGER NOT NULL, 3 UsageScore INTEGER 4 ) NOLOGGING; Table created. SQL> SQL> CREATE TABLE DI_FILEUSAGESCORE_STG ( 2 FileID INTEGER NOT NULL, 3 UsageScore INTEGER 4 ) NOLOGGING; Table created. SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_FOLDERDATAOWNER SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE TABLE DI_FOLDERDATAOWNER ( 2 FolderID INTEGER NOT NULL, 3 DataOwnerID INTEGER NOT NULL 4 ); Table created. SQL> SQL> -- =================================================================================== SQL> -- =================================================================================== SQL> -- Rollup Tables SQL> -- =================================================================================== SQL> -- =================================================================================== SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_FOLDERPOLICYFACT SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE TABLE DI_FOLDERPOLICYFACT ( 2 folderID INTEGER NOT NULL, 3 PolicyID INTEGER NOT NULL, 4 StatusID INTEGER NOT NULL, 5 SensitiveFileCount INTEGER, 6 PartialRiskScore INTEGER NOT NULL 7 ); Table created. SQL> SQL> CREATE TABLE DI_FOLDERPOLICYFACT_STG ( 2 folderID INTEGER NOT NULL, 3 PolicyID INTEGER NOT NULL, 4 StatusID INTEGER NOT NULL, 5 SensitiveFileCount INTEGER, 6 PartialRiskScore INTEGER NOT NULL 7 ); Table created. SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_FOLDERFACT SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE TABLE DI_FOLDERFACT ( 2 folderID INTEGER NOT NULL, 3 RiskScore INTEGER NOT NULL, 4 Accessibility INTEGER, 5 FullPath VARCHAR2(4000) NOT NULL 6 ); Table created. SQL> SQL> CREATE TABLE DI_FOLDERFACT_STG ( 2 folderID INTEGER NOT NULL, 3 RiskScore INTEGER NOT NULL, 4 Accessibility INTEGER, 5 FullPath VARCHAR2(4000) NOT NULL 6 ); Table created. SQL> SQL> SQL> -- ***************************************************************************** SQL> -- ***************************************************************************** SQL> -- Refresh Query "Materiazlied" Tables SQL> -- ***************************************************************************** SQL> -- ***************************************************************************** SQL> CREATE TABLE DI_FileDayUser_Refresh ( 2 theDate DATE NOT NULL, 3 RecordNum INTEGER NOT NULL, 4 ShareID INTEGER NOT NULL, 5 FileID INTEGER NOT NULL 6 ); Table created. SQL> SQL> CREATE TABLE DI_FolderPermission_Refresh ( 2 lastRefreshDate DATE, 3 RecordNum INTEGER NOT NULL, 4 ShareID INTEGER NOT NULL, 5 FolderID INTEGER NOT NULL 6 ); Table created. SQL> SQL> CREATE TABLE DI_FolderAccess_Refresh ( 2 lastRefreshDate DATE, 3 RecordNum INTEGER NOT NULL, 4 ShareID INTEGER NOT NULL, 5 FolderID INTEGER NOT NULL 6 ); Table created. SQL> SQL> CREATE TABLE DI_FolderUserGroup_Refresh ( 2 lastRefreshDate DATE, 3 lastRefreshDateFixed DATE, 4 RecordNum INTEGER NOT NULL, 5 ShareID INTEGER NOT NULL, 6 FolderID INTEGER NOT NULL, 7 UserID INTEGER NOT NULL 8 ); Table created. SQL> SQL> SQL> -- ***************************************************************************** SQL> -- ***************************************************************************** SQL> -- Metadata Tables SQL> -- ***************************************************************************** SQL> -- ***************************************************************************** SQL> CREATE TABLE DI_Filter ( 2 ReportName VARCHAR2(30) NOT NULL, 3 FilterName VARCHAR2(30) NOT NULL, 4 ColumnName VARCHAR2(30) NOT NULL, 5 DataType VARCHAR2(4) NOT NULL CHECK(DataType IN ('INT', 'CHAR')), 6 Seq NUMBER(2, 0) NOT NULL, 7 UseBindFlag VARCHAR2(1) DEFAULT 'Y' NOT NULL CHECK(UseBindFlag IN ('Y', 'N')) 8 ); Table created. SQL> SQL> INSERT INTO DI_Filter VALUES ('Folder List', 'Policy', 'PolicyID', 'INT', 1, 'Y'); 1 row created. SQL> INSERT INTO DI_Filter VALUES ('Folder List', 'Status', 'StatusID', 'INT', 2, 'Y'); 1 row created. SQL> INSERT INTO DI_Filter VALUES ('Folder List', 'Location', 'FullPath', 'CHAR', 3, 'Y'); 1 row created. SQL> INSERT INTO DI_Filter VALUES ('Folder List', 'Data Owner', 'Name', 'CHAR', 4, 'Y'); 1 row created. SQL> SQL> COMMIT; Commit complete. SQL> SQL> -- ------------------------------------------------------------------------------- SQL> -- Transaction-specific temporary table for storing bind strings (used for in or SQL> -- not in operators). SQL> -- ------------------------------------------------------------------------------- SQL> CREATE GLOBAL TEMPORARY TABLE DI_BindString_TMP ( 2 FilterName VARCHAR2(30) NOT NULL, 3 BindString VARCHAR2(4000) 4 ) 5 ON COMMIT DELETE ROWS; Table created. SQL> SQL> -- ------------------------------------------------------------------------------- SQL> -- Transaction-specific temporary table for storing pre-filter predicates. SQL> -- ------------------------------------------------------------------------------- SQL> CREATE GLOBAL TEMPORARY TABLE DI_PREDICATE_TMP ( 2 Predicates CLOB 3 ) 4 ON COMMIT DELETE ROWS; Table created. SQL> SQL> SQL> -- ------------------------------------------------------------------------------- SQL> -- DI_POST_PROCESSING_TRK SQL> -- ------------------------------------------------------------------------------- SQL> CREATE TABLE DI_POST_PROCESSING_TRK ( 2 TableName VARCHAR2(30), 3 Operation VARCHAR2(30), 4 TableSeq INTEGER, 5 OperationSeq INTEGER, 6 LastOperationTime DATE 7 ); Table created. SQL> SQL> INSERT INTO DI_POST_PROCESSING_TRK VALUES ('DI_FILEUSAGESCORE', 'Production to Temp', 1, 1, NULL); 1 row created. SQL> INSERT INTO DI_POST_PROCESSING_TRK VALUES ('DI_FILEUSAGESCORE', 'Staging to Production', 1, 2, NULL); 1 row created. SQL> INSERT INTO DI_POST_PROCESSING_TRK VALUES ('DI_FILEUSAGESCORE', 'Temp to Staging', 1, 3, NULL); 1 row created. SQL> SQL> INSERT INTO DI_POST_PROCESSING_TRK VALUES ('DI_FILEHAZARD', 'Production to Temp', 2, 1, NULL); 1 row created. SQL> INSERT INTO DI_POST_PROCESSING_TRK VALUES ('DI_FILEHAZARD', 'Staging to Production', 2, 2, NULL); 1 row created. SQL> INSERT INTO DI_POST_PROCESSING_TRK VALUES ('DI_FILEHAZARD', 'Temp to Staging', 2, 3, NULL); 1 row created. SQL> SQL> INSERT INTO DI_POST_PROCESSING_TRK VALUES ('DI_FOLDERPOLICYFACT', 'Production to Temp', 3, 1, NULL); 1 row created. SQL> INSERT INTO DI_POST_PROCESSING_TRK VALUES ('DI_FOLDERPOLICYFACT', 'Staging to Production', 3, 2, NULL); 1 row created. SQL> INSERT INTO DI_POST_PROCESSING_TRK VALUES ('DI_FOLDERPOLICYFACT', 'Temp to Staging', 3, 3, NULL); 1 row created. SQL> SQL> INSERT INTO DI_POST_PROCESSING_TRK VALUES ('DI_FOLDERFACT', 'Production to Temp', 4, 1, NULL); 1 row created. SQL> INSERT INTO DI_POST_PROCESSING_TRK VALUES ('DI_FOLDERFACT', 'Staging to Production', 4, 2, NULL); 1 row created. SQL> INSERT INTO DI_POST_PROCESSING_TRK VALUES ('DI_FOLDERFACT', 'Temp to Staging', 4, 3, NULL); 1 row created. SQL> SQL> INSERT INTO DI_POST_PROCESSING_TRK VALUES ('DI_FOLDERUSERGROUP', 'Production to Temp', 5, 1, NULL); 1 row created. SQL> INSERT INTO DI_POST_PROCESSING_TRK VALUES ('DI_FOLDERUSERGROUP', 'Staging to Production', 5, 2, NULL); 1 row created. SQL> INSERT INTO DI_POST_PROCESSING_TRK VALUES ('DI_FOLDERUSERGROUP', 'Temp to Staging', 5, 3, NULL); 1 row created. SQL> SQL> INSERT INTO DI_POST_PROCESSING_TRK VALUES ('DI_FOLDERPERMISSION', 'Production to Temp', 6, 1, NULL); 1 row created. SQL> INSERT INTO DI_POST_PROCESSING_TRK VALUES ('DI_FOLDERPERMISSION', 'Staging to Production', 6, 2, NULL); 1 row created. SQL> INSERT INTO DI_POST_PROCESSING_TRK VALUES ('DI_FOLDERPERMISSION', 'Temp to Staging', 6, 3, NULL); 1 row created. SQL> SQL> INSERT INTO DI_POST_PROCESSING_TRK VALUES ('DI_FOLDERACCESSIBILITY', 'Production to Temp', 7, 1, NULL); 1 row created. SQL> INSERT INTO DI_POST_PROCESSING_TRK VALUES ('DI_FOLDERACCESSIBILITY', 'Staging to Production', 7, 2, NULL); 1 row created. SQL> INSERT INTO DI_POST_PROCESSING_TRK VALUES ('DI_FOLDERACCESSIBILITY', 'Temp to Staging', 7, 3, NULL); 1 row created. SQL> SQL> COMMIT; Commit complete. SQL> SQL> -- ------------------------------------------------------------------------------- SQL> -- DI_DataRefresh_TRK SQL> -- ------------------------------------------------------------------------------- SQL> CREATE TABLE DI_DataRefresh_TRK ( 2 StateID INTEGER NOT NULL, 3 State VARCHAR2(30) NOT NULL, 4 StartTime DATE, 5 EndTime DATE, 6 PercentageCompleted NUMBER(3, 0), 7 ReservedErrorID INTEGER 8 ); Table created. SQL> SQL> CREATE TABLE DI_DataRefresh_Task_TRK ( 2 StateID INTEGER NOT NULL, 3 Task VARCHAR2(30) NOT NULL, 4 TaskSeq INTEGER NOT NULL, 5 StartTime DATE, 6 EndTime DATE, 7 PercentageCompleted NUMBER(3, 0), 8 ErrorID INTEGER 9 ); Table created. SQL> SQL> INSERT INTO DI_DataRefresh_TRK(StateID, State) VALUES (1, 'InitShares'); 1 row created. SQL> INSERT INTO DI_DataRefresh_TRK(StateID, State) VALUES (2, 'PreProcessing'); 1 row created. SQL> INSERT INTO DI_DataRefresh_TRK(StateID, State) VALUES (3, 'DataFetch'); 1 row created. SQL> INSERT INTO DI_DataRefresh_TRK(StateID, State) VALUES (4, 'PostProcessing'); 1 row created. SQL> SQL> COMMIT; Commit complete. SQL> SQL> SQL> INSERT INTO DI_DataRefresh_Task_TRK(StateID, Task, TaskSeq) VALUES (1, 'Populate_Share', 1); 1 row created. SQL> SQL> INSERT INTO DI_DataRefresh_Task_TRK(StateID, Task, TaskSeq) VALUES (2, 'Freeze_Hazard_Snapshot', 1); 1 row created. SQL> INSERT INTO DI_DataRefresh_Task_TRK(StateID, Task, TaskSeq) VALUES (2, 'Create_New_Files', 2); 1 row created. SQL> INSERT INTO DI_DataRefresh_Task_TRK(StateID, Task, TaskSeq) VALUES (2, 'Materialize_FileDayUser', 3); 1 row created. SQL> INSERT INTO DI_DataRefresh_Task_TRK(StateID, Task, TaskSeq) VALUES (2, 'Materialize_FolderPermission', 4); 1 row created. SQL> INSERT INTO DI_DataRefresh_Task_TRK(StateID, Task, TaskSeq) VALUES (2, 'Materialize_FolderUserGroup', 5); 1 row created. SQL> SQL> -- Not used in v11 SQL> -- INSERT INTO DI_DataRefresh_Task_TRK(StateID, Task, TaskSeq) VALUES (2, 'Materialize_FolderAccess', 6); SQL> SQL> INSERT INTO DI_DataRefresh_Task_TRK(StateID, Task, TaskSeq) VALUES (3, 'Populate_FileDayUser', 1); 1 row created. SQL> INSERT INTO DI_DataRefresh_Task_TRK(StateID, Task, TaskSeq) VALUES (3, 'Populate_FolderPermission', 1); 1 row created. SQL> INSERT INTO DI_DataRefresh_Task_TRK(StateID, Task, TaskSeq) VALUES (3, 'Populate_FolderAccessibility', 1); 1 row created. SQL> INSERT INTO DI_DataRefresh_Task_TRK(StateID, Task, TaskSeq) VALUES (3, 'Populate_FolderUserGroup', 1); 1 row created. SQL> SQL> INSERT INTO DI_DataRefresh_Task_TRK(StateID, Task, TaskSeq) VALUES (4,'FileUsageScore_Staging', 1); 1 row created. SQL> INSERT INTO DI_DataRefresh_Task_TRK(StateID, Task, TaskSeq) VALUES (4,'FileHazard_Staging', 2); 1 row created. SQL> INSERT INTO DI_DataRefresh_Task_TRK(StateID, Task, TaskSeq) VALUES (4,'FolderPolicyFact_Staging', 3); 1 row created. SQL> INSERT INTO DI_DataRefresh_Task_TRK(StateID, Task, TaskSeq) VALUES (4,'FolderFact_Staging', 4); 1 row created. SQL> INSERT INTO DI_DataRefresh_Task_TRK(StateID, Task, TaskSeq) VALUES (4,'Post_STAG_FolderUserGroup', 5); 1 row created. SQL> INSERT INTO DI_DataRefresh_Task_TRK(StateID, Task, TaskSeq) VALUES (4,'Post_STAG_FolderPermission', 6); 1 row created. SQL> INSERT INTO DI_DataRefresh_Task_TRK(StateID, Task, TaskSeq) VALUES (4,'FilesDataOwner', 7); 1 row created. SQL> INSERT INTO DI_DataRefresh_Task_TRK(StateID, Task, TaskSeq) VALUES (4,'FolderDataOwner', 8); 1 row created. SQL> INSERT INTO DI_DataRefresh_Task_TRK(StateID, Task, TaskSeq) VALUES (4,'Prod_Post_Processing_Stage1', 9); 1 row created. SQL> INSERT INTO DI_DataRefresh_Task_TRK(StateID, Task, TaskSeq) VALUES (4,'Prod_Post_Processing_Stage2', 10); 1 row created. SQL> SQL> COMMIT; Commit complete. SQL> SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DI_Data_Refresh_Config - Stores the configuration values for computing SQL> -- risk score. At most one record is allowed in the table. SQL> -- SQL> -- Weightings have to be floats. SQL> -- -------------------------------------------------------------------------- SQL> CREATE TABLE DI_Data_Refresh_Config ( 2 Refresh_Last_n_Days INTEGER, 3 UniqueUsers_Last_n_Days INTEGER, 4 RiskScore_Formula VARCHAR2(30), 5 HighSev_Weighting NUMBER, 6 MedSev_Weighting NUMBER, 7 LowSev_Weighting NUMBER, 8 InfoSev_Weighting NUMBER 9 ); Table created. SQL> SQL> SQL> INSERT INTO DI_Data_Refresh_Config ( 2 Refresh_Last_n_Days, 3 UniqueUsers_Last_n_Days, 4 RiskScore_Formula, 5 HighSev_Weighting, 6 MedSev_Weighting, 7 LowSev_Weighting, 8 InfoSev_Weighting 9 ) VALUES ( 10 365, 11 7, 12 'severity_openness', 13 100.0, 14 10.0, 15 2.0, 16 1.0 17 ); 1 row created. SQL> SQL> COMMIT; Commit complete. SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DI_ErrorLog SQL> -- -------------------------------------------------------------------------- SQL> CREATE TABLE DI_ErrorLog ( 2 ErrorID INTEGER, 3 ProcedureName VARCHAR2(30), 4 TimeStamp DATE, 5 Statement CLOB, 6 ErrorMessage CLOB 7 ); Table created. SQL> SQL> CREATE SEQUENCE seq_DI_Errorlog; Sequence created. SQL> SQL> -- ------------------------------------------------------------------------------- SQL> -- ------------------------------------------------------------------------------- SQL> -- DI_Data_Refresh_Tracking ==> See DI_Data_Refresh_Tracking.sql SQL> -- ------------------------------------------------------------------------------- SQL> -- ------------------------------------------------------------------------------- SQL> -- ------------------------------------------------------------------------------- SQL> CREATE TABLE DI_DataRefresh_State ( 2 CurrentState VARCHAR2(30) 3 ); Table created. SQL> SQL> INSERT INTO DI_DataRefresh_State VALUES ('Waiting'); 1 row created. SQL> SQL> COMMIT; Commit complete. SQL> SQL> -- ***************************************************************************** SQL> -- ***************************************************************************** SQL> -- Reporting Status SQL> -- ***************************************************************************** SQL> -- ***************************************************************************** SQL> CREATE TABLE DI_Reporting_Status ( 2 Status VARCHAR2(8) 3 ); Table created. SQL> SQL> INSERT INTO DI_Reporting_Status VALUES ('Enabled'); 1 row created. SQL> SQL> COMMIT; Commit complete. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- Exclude all DI tables from getting sequence maxvalue capped. SQL> -- -------------------------------------------------------------------------- SQL> DECLARE 2 CURSOR c IS 3 SELECT 'COMMENT ON TABLE ' || table_name || ' IS ''to be excluded from sequence maxvalue capping''' cmd 4 FROM user_tables 5 WHERE table_name LIKE 'DI\_%' ESCAPE '\'; 6 7 BEGIN 8 FOR x IN c LOOP 9 EXECUTE IMMEDIATE x.cmd; 10 END LOOP; 11 END; 12 / PL/SQL procedure successfully completed. SQL> SQL> SQL> SQL> SQL> @@Data_Insight_Indexes_Constraints.sql SQL> -- *********************************************************************************** SQL> -- Note: Except for the files table, we won't create foreign keys in any of the tables. SQL> -- *********************************************************************************** SQL> SQL> set echo on SQL> SQL> SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_MonitoredShare SQL> -- ----------------------------------------------------------------------------------- SQL> ALTER TABLE DI_MonitoredShare ADD CONSTRAINT DI_MonitoredShare_pk PRIMARY KEY (ShareID) NOLOGGING; Table altered. SQL> SQL> CREATE UNIQUE INDEX DI_MonitoredShare_U1 ON DI_MonitoredShare (SharePath) NOLOGGING; Index created. SQL> SQL> CREATE INDEX DI_MonitoredShare_N3 ON DI_MonitoredShare(ShareType) NOLOGGING; Index created. SQL> CREATE INDEX DI_MonitoredShare_N4 ON DI_MonitoredShare(FirstAddedOn) NOLOGGING; Index created. SQL> CREATE INDEX DI_MonitoredShare_N5 ON DI_MonitoredShare(FirstActivityTime) NOLOGGING; Index created. SQL> CREATE INDEX DI_MonitoredShare_N6 ON DI_MonitoredShare(LastActivityTime) NOLOGGING; Index created. SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_MonitoredShare_STG SQL> -- ----------------------------------------------------------------------------------- SQL> ALTER TABLE DI_MonitoredShare_STG ADD CONSTRAINT DI_MonitoredShare_STG_pk PRIMARY KEY (ShareID) NOLOGGING; Table altered. SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_DeletedShare SQL> -- ----------------------------------------------------------------------------------- SQL> ALTER TABLE DI_DeletedShare ADD CONSTRAINT DI_DeletedShare_pk PRIMARY KEY (ShareID) NOLOGGING; Table altered. SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_ShareFolder SQL> -- ----------------------------------------------------------------------------------- SQL> ALTER TABLE DI_ShareFolder ADD CONSTRAINT DI_ShareFolder_pk PRIMARY KEY (ShareID, FolderID) NOLOGGING; Table altered. SQL> SQL> ALTER TABLE DI_ShareFolder ADD CONSTRAINT DI_ShareFolder_fk1 FOREIGN KEY (ShareID) 2 REFERENCES DI_MonitoredShare(ShareID) 3 DEFERRABLE INITIALLY IMMEDIATE NOLOGGING; Table altered. SQL> SQL> /* =================================================================================== SQL> We should not have any foreign keys pointing to the folder table. Otherwise, incident SQL> deletor would not be able to complete successfully. Incident deletor should be SQL> de-coupled from the data insight schema. SQL> =================================================================================== SQL> SQL> ALTER TABLE DI_ShareFolder ADD CONSTRAINT DI_ShareFolder_fk2 FOREIGN KEY (FolderID) SQL> REFERENCES Folder(FolderID) SQL> DEFERRABLE INITIALLY IMMEDIATE NOLOGGING; SQL> * =================================================================================== */ SQL> SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_File SQL> -- ----------------------------------------------------------------------------------- SQL> ALTER TABLE DI_File ADD CONSTRAINT DI_File_pk PRIMARY KEY (FileID) NOLOGGING; Table altered. SQL> SQL> /* =================================================================================== SQL> We should not have any foreign keys pointing to the folder table. Otherwise, incident SQL> deletor would not be able to complete successfully. Incident deletor should be SQL> de-coupled from the data insight schema. SQL> =================================================================================== SQL> SQL> ALTER TABLE DI_File ADD CONSTRAINT DI_File_fk1 FOREIGN KEY (FolderID) SQL> REFERENCES Folder(FolderID) SQL> DEFERRABLE INITIALLY IMMEDIATE NOLOGGING; SQL> SQL> ALTER TABLE DI_File ADD CONSTRAINT DI_File_fk2 FOREIGN KEY (DataOwnerID) SQL> REFERENCES DataOwner(DataOwnerID) SQL> DEFERRABLE INITIALLY IMMEDIATE NOLOGGING; SQL> SQL> * =================================================================================== */ SQL> SQL> CREATE UNIQUE INDEX DI_File_U1 ON DI_File(FolderID, FileName, FileID) NOLOGGING; Index created. SQL> SQL> CREATE INDEX DI_File_fk1 ON DI_File(DataOwnerID) NOLOGGING; Index created. SQL> SQL> CREATE INDEX DI_File_n1 ON DI_File(FileName) NOLOGGING; Index created. SQL> SQL> -- CREATE UNIQUE INDEX DI_File_uFB1 ON DI_File(LOWER(FileName)); SQL> -- CREATE UNIQUE INDEX DI_File_uFB2 ON DI_File(REVERSE(LOWER(FileName))); SQL> SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_FileRefresh_TRK SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE UNIQUE INDEX DI_FileRefresh_TRK_u1 ON DI_FileRefresh_TRK (FileID, TimeKey) NOLOGGING; Index created. SQL> SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_FILEUSAGESCORE SQL> -- ----------------------------------------------------------------------------------- SQL> ALTER TABLE DI_FILEUSAGESCORE ADD CONSTRAINT DI_FILEUSAGESCORE_pk PRIMARY KEY (FileID) NOLOGGING; Table altered. SQL> SQL> /* ============================================= SQL> ALTER TABLE DI_FILEUSAGESCORE ADD CONSTRAINT DI_FILEUSAGESCORE_fk1 FOREIGN KEY (FileID) SQL> REFERENCES FileNode(FileID) SQL> DEFERRABLE INITIALLY IMMEDIATE NOLOGGING; SQL> * ============================================= */ SQL> SQL> CREATE INDEX DI_FILEUSAGESCORE_n1 ON DI_FILEUSAGESCORE(UsageScore); Index created. SQL> SQL> ALTER TABLE DI_FILEUSAGESCORE_STG ADD CONSTRAINT DI_FILEUSAGESCORE_pk_S PRIMARY KEY (FileID) NOLOGGING; Table altered. SQL> SQL> CREATE INDEX DI_FILEUSAGESCORE_n1_S ON DI_FILEUSAGESCORE_STG(UsageScore); Index created. SQL> SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_USER SQL> -- ----------------------------------------------------------------------------------- SQL> ALTER TABLE DI_USER ADD CONSTRAINT DI_USER_pk PRIMARY KEY (UserID) NOLOGGING; Table altered. SQL> SQL> CREATE UNIQUE INDEX DI_User_U1 ON DI_User(UserName) NOLOGGING; Index created. SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DataOwner SQL> -- ----------------------------------------------------------------------------------- SQL> /* ============================================= SQL> ALTER TABLE DataOwner ADD CONSTRAINT DataOwner_pk PRIMARY KEY (DataOwnerID) NOLOGGING; SQL> SQL> CREATE UNIQUE INDEX DataOwner_u1 ON DataOwner(Name); SQL> CREATE UNIQUE INDEX DataOwner_uFB1 ON DataOwner(LOWER(Name)); SQL> CREATE UNIQUE INDEX DataOwner_uFB2 ON DataOwner(REVERSE(LOWER(Name))); SQL> * ============================================= */ SQL> SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- DI_FOLDERACCESSIBILITY SQL> -- --------------------------------------------------------------------------- SQL> ALTER TABLE DI_FOLDERACCESSIBILITY ADD CONSTRAINT DI_FOLDERACCESSIBILITY_pk PRIMARY KEY (FolderID) NOLOGGING; Table altered. SQL> SQL> /* ============================================= SQL> ALTER TABLE DI_FOLDERACCESSIBILITY ADD CONSTRAINT DI_FOLDERACCESSIBILITY_fk1 SQL> FOREIGN KEY (folderID) SQL> REFERENCES PathNode(PathNodeID) SQL> DEFERRABLE INITIALLY IMMEDIATE NOLOGGING; SQL> * ============================================= */ SQL> SQL> CREATE INDEX DI_FOLDERACCESSIBILITY_n1 ON DI_FOLDERACCESSIBILITY(Accessibility) NOLOGGING; Index created. SQL> CREATE INDEX DI_FOLDERACCESSIBILITY_n2 ON DI_FOLDERACCESSIBILITY(RefreshDate) NOLOGGING; Index created. SQL> SQL> ALTER TABLE DI_FOLDERACCESSIBILITY_STG ADD CONSTRAINT DI_FOLDERACCESSIBILITY_pk_S PRIMARY KEY (FolderID) NOLOGGING; Table altered. SQL> SQL> CREATE INDEX DI_FOLDERACCESSIBILITY_n1_S ON DI_FOLDERACCESSIBILITY_STG(Accessibility) NOLOGGING; Index created. SQL> CREATE INDEX DI_FOLDERACCESSIBILITY_n2_S ON DI_FOLDERACCESSIBILITY_STG(RefreshDate) NOLOGGING; Index created. SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_ACLGROUP SQL> -- ----------------------------------------------------------------------------------- SQL> ALTER TABLE DI_ACLGROUP ADD CONSTRAINT DI_ACLGROUP_pk PRIMARY KEY (ACLGroupID) NOLOGGING; Table altered. SQL> SQL> CREATE UNIQUE INDEX DI_ACLGroup_U1 ON DI_ACLGroup(GroupName) NOLOGGING; Index created. SQL> SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_FolderUG SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE UNIQUE INDEX DI_FolderUG_U1 ON DI_FolderUG(FolderID) NOLOGGING; Index created. SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_FOLDERUSERGROUP SQL> -- SQL> -- When all 3 columns have values, they should be unique. SQL> -- SQL> -- When GroupID is NULL, FolderID-UserID should be unique. SQL> -- ----------------------------------------------------------------------------------- SQL> /* Cannot use the primary key here to enforce data integrity since creating the SQL> primary key would automatically convert ACLGroupID into NOT NULL. SQL> SQL> ALTER TABLE DI_FOLDERUSERGROUP ADD CONSTRAINT DI_FOLDERUSERGROUP_pk SQL> PRIMARY KEY (FolderID, ACLGroupID, UserID) NOLOGGING; SQL> SQL> */ SQL> SQL> CREATE UNIQUE INDEX DI_FOLDERUSERGROUP_u1 ON DI_FOLDERUSERGROUP(FolderID, UserID, EntityID, EntityType); Index created. SQL> --CREATE INDEX DI_FOLDERUSERGROUP_N1 ON DI_FOLDERUSERGROUP(RefreshDate); SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_FolderUserGroup_STG SQL> -- ----------------------------------------------------------------------------------- SQL> CREATE UNIQUE INDEX DI_FOLDERUSERGROUP_STG_u1 ON DI_FOLDERUSERGROUP_STG(FolderID, UserID, EntityID, EntityType); Index created. SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- EntityType and EntityID have to be either SQL> -- * NOT NULL for both columns or SQL> -- * NULL for both columns. SQL> -- ----------------------------------------------------------------------------------- SQL> ALTER TABLE DI_FolderUserGroup ADD CONSTRAINT DI_FolderUserGroup_CK1 CHECK ( 2 DECODE(EntityType, NULL, 0, 1) + DECODE(EntityID, NULL, 0, 1) <> 1 3 ); Table altered. SQL> SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_FOLDERUSERGROUP SQL> -- ----------------------------------------------------------------------------------- SQL> /* =================================================================================== SQL> If instead of UserID, we store the number of unique users for a folder-group combo. SQL> SQL> ALTER TABLE DI_FOLDERUSERGROUP ADD CONSTRAINT DI_FOLDERUSERGROUP_pk SQL> PRIMARY KEY (FolderID, ACLGroupID) NOLOGGING; SQL> * =================================================================================== */ SQL> SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_FOLDERPERMISSION SQL> -- ----------------------------------------------------------------------------------- SQL> ALTER TABLE DI_FOLDERPERMISSION ADD CONSTRAINT DI_FOLDERPERMISSION_pk 2 PRIMARY KEY (FolderID, EntityID, Entity) NOLOGGING; Table altered. SQL> SQL> CREATE INDEX DI_FOLDERPERMISSION_N1 ON DI_FOLDERPERMISSION(RefreshDate) NOLOGGING; Index created. SQL> SQL> ALTER TABLE DI_FOLDERPERMISSION_STG ADD CONSTRAINT DI_FOLDERPERMISSION_pk_S 2 PRIMARY KEY (FolderID, EntityID, Entity) NOLOGGING; Table altered. SQL> SQL> CREATE INDEX DI_FOLDERPERMISSION_N1_S ON DI_FOLDERPERMISSION_STG(RefreshDate) NOLOGGING; Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- DI_FILEDAYUSER SQL> -- --------------------------------------------------------------------------- SQL> --ALTER TABLE DI_FILEDAYUSER ADD CONSTRAINT DI_FILEDAYUSER_pk PRIMARY KEY (FileID, TimeKey, UserID) NOLOGGING; SQL> SQL> CREATE INDEX DI_FILEDAYUSER_FK1 ON DI_FILEDAYUSER(FileID, UserID) NOLOGGING; Index created. SQL> CREATE INDEX DI_FILEDAYUSER_FK2 ON DI_FILEDAYUSER(TimeKey) NOLOGGING; Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- DI_FILEHAZARD SQL> -- --------------------------------------------------------------------------- SQL> SQL> /* ========================================================== SQL> ALTER TABLE DI_FILEHAZARD ADD CONSTRAINT DI_FILEHAZARD_fk1 SQL> FOREIGN KEY (PolicyID) SQL> REFERENCES Policy(PolicyID) SQL> DEFERRABLE INITIALLY IMMEDIATE NOLOGGING; SQL> SQL> ALTER TABLE DI_FILEHAZARD ADD CONSTRAINT DI_FILEHAZARD_fk2 SQL> FOREIGN KEY (StatusID) SQL> REFERENCES IncidentStatus(IncidentStatusID) SQL> DEFERRABLE INITIALLY IMMEDIATE NOLOGGING; SQL> * ========================================================== */ SQL> SQL> CREATE UNIQUE INDEX DI_FILEHAZARD_u1 ON DI_FILEHAZARD(FileID, PolicyID, StatusID) NOLOGGING; Index created. SQL> SQL> CREATE INDEX DI_FILEHAZARD_fk1 ON DI_FILEHAZARD(PolicyID) NOLOGGING; Index created. SQL> CREATE INDEX DI_FILEHAZARD_fk2 ON DI_FILEHAZARD(StatusID) NOLOGGING; Index created. SQL> SQL> CREATE UNIQUE INDEX DI_FILEHAZARD_u1_S ON DI_FILEHAZARD_STG(FileID, PolicyID, StatusID) NOLOGGING; Index created. SQL> SQL> CREATE INDEX DI_FILEHAZARD_fk1_S ON DI_FILEHAZARD_STG(PolicyID) NOLOGGING; Index created. SQL> CREATE INDEX DI_FILEHAZARD_fk2_S ON DI_FILEHAZARD_STG(StatusID) NOLOGGING; Index created. SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- DI_FOLDERDATAOWNER SQL> -- SQL> -- We may not need to primay key here, just the indexes. SQL> -- ----------------------------------------------------------------------------------- SQL> SQL> ALTER TABLE DI_FOLDERDATAOWNER ADD CONSTRAINT DI_FOLDERDATAOWNER_pk PRIMARY KEY 2 (FolderID, DataOwnerID) NOLOGGING; Table altered. SQL> SQL> CREATE INDEX DI_FOLDERDATAOWNER_N2 ON DI_FOLDERDATAOWNER(FolderID); Index created. SQL> CREATE INDEX DI_FOLDERDATAOWNER_N1 ON DI_FOLDERDATAOWNER(DataOwnerID); Index created. SQL> SQL> SQL> /* SQL> ALTER TABLE DI_FOLDERDATAOWNER ADD CONSTRAINT DI_FOLDERDATAOWNER_fk1 SQL> FOREIGN KEY (FolderID) SQL> REFERENCES PathNode(PathNodeID) SQL> DEFERRABLE INITIALLY IMMEDIATE NOLOGGING; SQL> SQL> ALTER TABLE DI_FOLDERDATAOWNER ADD CONSTRAINT DI_FOLDERDATAOWNER_fk2 SQL> FOREIGN KEY (DataOwnerID) SQL> REFERENCES DataOwner(DataOwnerID) SQL> DEFERRABLE INITIALLY IMMEDIATE NOLOGGING; SQL> */ SQL> SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- DI_FOLDERPOLICYFACT SQL> -- --------------------------------------------------------------------------- SQL> SQL> ALTER TABLE DI_FOLDERPOLICYFACT ADD CONSTRAINT DI_FOLDERPOLICYFACT_pk PRIMARY KEY 2 (FolderID, PolicyID, StatusID) NOLOGGING; Table altered. SQL> SQL> /* ========================================================== SQL> ALTER TABLE DI_FOLDERPOLICYFACT ADD CONSTRAINT DI_FOLDERPOLICYFACT_fk1 SQL> FOREIGN KEY (FolderID) SQL> REFERENCES Folders(FolderID) SQL> DEFERRABLE INITIALLY IMMEDIATE NOLOGGING; SQL> SQL> ALTER TABLE DI_FOLDERPOLICYFACT ADD CONSTRAINT DI_FOLDERPOLICYFACT_fk2 SQL> FOREIGN KEY (PolicyID) SQL> REFERENCES Policy(PolicyID) SQL> DEFERRABLE INITIALLY IMMEDIATE NOLOGGING; SQL> SQL> ALTER TABLE DI_FOLDERPOLICYFACT ADD CONSTRAINT DI_FOLDERPOLICYFACT_fk3 SQL> FOREIGN KEY (StatusID) SQL> REFERENCES IncidentStatus(IncidentStatusID) SQL> DEFERRABLE INITIALLY IMMEDIATE NOLOGGING; SQL> * ========================================================== */ SQL> SQL> CREATE INDEX DI_FOLDERPOLICYFACT_n1 ON DI_FOLDERPOLICYFACT(PolicyID) NOLOGGING; Index created. SQL> CREATE INDEX DI_FOLDERPOLICYFACT_n2 ON DI_FOLDERPOLICYFACT(StatusID) NOLOGGING; Index created. SQL> SQL> ALTER TABLE DI_FOLDERPOLICYFACT_STG ADD CONSTRAINT DI_FOLDERPOLICYFACT_pk_S PRIMARY KEY 2 (FolderID, PolicyID, StatusID) NOLOGGING; Table altered. SQL> SQL> CREATE INDEX DI_FOLDERPOLICYFACT_n1_S ON DI_FOLDERPOLICYFACT_STG(PolicyID) NOLOGGING; Index created. SQL> CREATE INDEX DI_FOLDERPOLICYFACT_n2_S ON DI_FOLDERPOLICYFACT_STG(StatusID) NOLOGGING; Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- DI_FOLDERFACT SQL> -- --------------------------------------------------------------------------- SQL> ALTER TABLE DI_FOLDERFACT ADD CONSTRAINT DI_FOLDERFACT_pk PRIMARY KEY (FolderID) NOLOGGING; Table altered. SQL> SQL> --CREATE UNIQUE INDEX DI_FOLDERFACT_u1 ON DI_FOLDERFACT(RiskScore, Accessibility, FolderID); SQL> --CREATE UNIQUE INDEX DI_FOLDERFACT_ud1 ON DI_FOLDERFACT(RiskScore DESC, Accessibility DESC, FolderID); SQL> SQL> --CREATE UNIQUE INDEX DI_FOLDERFACT_u2 ON DI_FOLDERFACT(Accessibility, RiskScore, FolderID); SQL> --CREATE INDEX DI_FOLDERFACT_ud2 ON DI_FOLDERFACT(Accessibility DESC, RiskScore DESC, FolderID); SQL> SQL> CREATE UNIQUE INDEX DI_FOLDERFACT_u3 ON DI_FOLDERFACT(FullPath); Index created. SQL> CREATE UNIQUE INDEX DI_FOLDERFACT_uFB1 ON DI_FOLDERFACT(LOWER(FullPath)); Index created. SQL> CREATE UNIQUE INDEX DI_FOLDERFACT_uFB2 ON DI_FOLDERFACT(REVERSE(LOWER(FullPath))); Index created. SQL> SQL> ALTER TABLE DI_FOLDERFACT_STG ADD CONSTRAINT DI_FOLDERFACT_pk_S PRIMARY KEY (FolderID) NOLOGGING; Table altered. SQL> SQL> CREATE UNIQUE INDEX DI_FOLDERFACT_u3_S ON DI_FOLDERFACT_STG(FullPath); Index created. SQL> CREATE UNIQUE INDEX DI_FOLDERFACT_uFB1_S ON DI_FOLDERFACT_STG(LOWER(FullPath)); Index created. SQL> CREATE UNIQUE INDEX DI_FOLDERFACT_uFB2_S ON DI_FOLDERFACT_STG(REVERSE(LOWER(FullPath))); Index created. SQL> SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- DI_POST_PROCESSING_TRK SQL> -- --------------------------------------------------------------------------- SQL> CREATE UNIQUE INDEX DI_POST_PROCESSING_TRK_U1 ON DI_POST_PROCESSING_TRK(tableName, Operation); Index created. SQL> SQL> SQL> SQL> -- ***************************************************************************** SQL> -- ***************************************************************************** SQL> -- Indexes for Refresh Query "Materiazlied" Tables SQL> -- ***************************************************************************** SQL> -- ***************************************************************************** SQL> -- --------------------------------------------------------------------------- SQL> -- DI_FileDayUser_Refresh SQL> -- --------------------------------------------------------------------------- SQL> CREATE UNIQUE INDEX DI_FileDayUser_Refresh_U1 2 ON DI_FileDayUser_Refresh(theDate, RecordNum) NOLOGGING; Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- DI_FolderPermission_Refresh SQL> -- --------------------------------------------------------------------------- SQL> CREATE UNIQUE INDEX DI_FolderPermission_Refresh_U1 2 ON DI_FolderPermission_Refresh(RecordNum) NOLOGGING; Index created. SQL> SQL> -- --------------------------------------------------------------------------- SQL> -- DI_FolderAccess_Refresh SQL> -- --------------------------------------------------------------------------- SQL> CREATE UNIQUE INDEX DI_FolderAccess_Refresh_U1 2 ON DI_FolderAccess_Refresh(RecordNum) NOLOGGING; Index created. SQL> SQL> -- ***************************************************************************** SQL> -- ***************************************************************************** SQL> -- Metadata Tables SQL> -- ***************************************************************************** SQL> -- ***************************************************************************** SQL> -- -------------------------------------------------------------------------- SQL> -- DI_DataRefresh_TRK SQL> -- -------------------------------------------------------------------------- SQL> ALTER TABLE DI_DataRefresh_TRK ADD CONSTRAINT DI_DataRefresh_TRK_PK PRIMARY KEY (StateID); Table altered. SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DI_DataRefresh_Task_TRK SQL> -- -------------------------------------------------------------------------- SQL> ALTER TABLE DI_DataRefresh_Task_TRK ADD CONSTRAINT DI_DataRefresh_Task_TRK_fk1 2 FOREIGN KEY (StateID) 3 REFERENCES DI_DataRefresh_TRK(StateID) 4 DEFERRABLE INITIALLY IMMEDIATE NOLOGGING; Table altered. SQL> SQL> CREATE INDEX DI_DataRefresh_Task_TRK_N1 ON DI_DataRefresh_Task_TRK(StateID); Index created. SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DI_Data_Refresh_Config SQL> -- -------------------------------------------------------------------------- SQL> ALTER TABLE DI_Data_Refresh_Config ADD CONSTRAINT DI_Data_Refresh_Config_CHK1 2 CHECK(RiskScore_Formula IN ('severity', 'severity_openness', 'severity_openness_useraccess')); Table altered. SQL> SQL> -- ********************************************************************** SQL> -- This index limits the table to at most one record. SQL> -- ********************************************************************** SQL> CREATE UNIQUE INDEX DI_Data_Refresh_Config_U1 ON DI_Data_Refresh_Config 2 (NVL2(RiskScore_Formula, 1, 1)); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DI_ErrorLog SQL> -- -------------------------------------------------------------------------- SQL> CREATE INDEX DI_ErrorLog_N1 ON DI_ErrorLog(ErrorID, ProcedureName) NOLOGGING; Index created. SQL> SQL> -- ***************************************************************************** SQL> -- ***************************************************************************** SQL> -- Reporting Status SQL> -- ***************************************************************************** SQL> -- ***************************************************************************** SQL> ALTER TABLE DI_Reporting_Status ADD CONSTRAINT DI_Reporting_Status_CHK1 2 CHECK(Status IN ('Enabled', 'Disabled')); Table altered. SQL> SQL> -- ********************************************************************** SQL> -- This index limits the table to at most one record. SQL> -- ********************************************************************** SQL> CREATE UNIQUE INDEX DI_Reporting_Status_U1 ON DI_Reporting_Status 2 (NVL2(Status, 1, 1)); Index created. SQL> SQL> SQL> -- -------------------------------------------------------------------------- SQL> -- DI_DataRefresh_State SQL> -- -------------------------------------------------------------------------- SQL> ALTER TABLE DI_DataRefresh_State ADD CONSTRAINT DI_DataRefresh_State_CHK1 2 CHECK(CurrentState IN ( 3 'Waiting', 4 'InitShares', 5 'InitSharesFailed', 6 'InitSharesComplete', 7 'PreProcessing', 8 'PreProcessingFailed', 9 'PreProcessingComplete', 10 'DataFetch', 11 'DataFetchFailed', 12 'DataFetchComplete', 13 'PostProcessing', 14 'PostProcessingFailed' 15 ) 16 ); Table altered. SQL> SQL> CREATE UNIQUE INDEX DI_DataRefresh_State_U1 ON DI_DataRefresh_State 2 (NVL2(CurrentState, 1, 1)); Index created. SQL> SQL> -- ----------------------------------------------------------------------------------- SQL> -- Gather Statistics SQL> -- ----------------------------------------------------------------------------------- SQL> /* =========================================================================== SQL> SQL> BEGIN SQL> DBMS_STATS.GATHER_TABLE_STATS( SQL> ownname => user, SQL> tabname => 'FOLDERS', SQL> estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE, SQL> method_opt => 'FOR ALL COLUMNS SIZE SKEWONLY', SQL> cascade => TRUE SQL> ); SQL> END; SQL> / SQL> SQL> BEGIN SQL> DBMS_STATS.GATHER_TABLE_STATS( SQL> ownname => user, SQL> tabname => 'DI_File', SQL> estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE, SQL> method_opt => 'FOR ALL COLUMNS SIZE SKEWONLY', SQL> cascade => TRUE SQL> ); SQL> END; SQL> / SQL> SQL> BEGIN SQL> DBMS_STATS.GATHER_TABLE_STATS( SQL> ownname => user, SQL> tabname => 'DATAOWNER', SQL> estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE, SQL> method_opt => 'FOR ALL COLUMNS SIZE SKEWONLY', SQL> cascade => TRUE SQL> ); SQL> END; SQL> / SQL> SQL> BEGIN SQL> DBMS_STATS.GATHER_TABLE_STATS( SQL> ownname => user, SQL> tabname => 'DI_TIMEDIM', SQL> estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE, SQL> method_opt => 'FOR ALL COLUMNS SIZE SKEWONLY', SQL> cascade => TRUE SQL> ); SQL> END; SQL> / SQL> SQL> BEGIN SQL> DBMS_STATS.GATHER_TABLE_STATS( SQL> ownname => user, SQL> tabname => 'DI_FOLDERACCESSIBILITY', SQL> estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE, SQL> method_opt => 'FOR ALL COLUMNS SIZE SKEWONLY', SQL> cascade => TRUE SQL> ); SQL> END; SQL> / SQL> SQL> BEGIN SQL> DBMS_STATS.GATHER_TABLE_STATS( SQL> ownname => user, SQL> tabname => 'DI_FILEHAZARD', SQL> estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE, SQL> method_opt => 'FOR ALL COLUMNS SIZE SKEWONLY', SQL> cascade => TRUE SQL> ); SQL> END; SQL> / SQL> SQL> BEGIN SQL> DBMS_STATS.GATHER_TABLE_STATS( SQL> ownname => user, SQL> tabname => 'DI_FILEDAYUSER', SQL> estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE, SQL> method_opt => 'FOR ALL COLUMNS SIZE SKEWONLY', SQL> cascade => TRUE SQL> ); SQL> END; SQL> / SQL> SQL> BEGIN SQL> DBMS_STATS.GATHER_TABLE_STATS( SQL> ownname => user, SQL> tabname => 'HAZARDINCIDENT', SQL> estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE, SQL> method_opt => 'FOR ALL COLUMNS SIZE SKEWONLY', SQL> cascade => TRUE SQL> ); SQL> END; SQL> / SQL> SQL> BEGIN SQL> DBMS_STATS.GATHER_TABLE_STATS( SQL> ownname => user, SQL> tabname => 'DI_FILEUSAGESCORE', SQL> estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE, SQL> method_opt => 'FOR ALL COLUMNS SIZE SKEWONLY', SQL> cascade => TRUE SQL> ); SQL> END; SQL> / SQL> SQL> SQL> BEGIN SQL> DBMS_STATS.GATHER_TABLE_STATS( SQL> ownname => user, SQL> tabname => 'DI_FOLDERDATAOWNER', SQL> estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE, SQL> method_opt => 'FOR ALL COLUMNS SIZE SKEWONLY', SQL> cascade => TRUE SQL> ); SQL> END; SQL> / SQL> SQL> BEGIN SQL> DBMS_STATS.GATHER_TABLE_STATS( SQL> ownname => user, SQL> tabname => 'DI_FOLDERPOLICYFACT', SQL> estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE, SQL> method_opt => 'FOR ALL COLUMNS SIZE SKEWONLY', SQL> cascade => TRUE SQL> ); SQL> END; SQL> / SQL> SQL> BEGIN SQL> DBMS_STATS.GATHER_TABLE_STATS( SQL> ownname => user, SQL> tabname => 'DI_FOLDERFACT', SQL> estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE, SQL> method_opt => 'FOR ALL COLUMNS SIZE SKEWONLY', SQL> cascade => TRUE SQL> ); SQL> END; SQL> / SQL> SQL> BEGIN SQL> DBMS_STATS.GATHER_TABLE_STATS( SQL> ownname => user, SQL> tabname => 'DI_POST_PROCESSING_TRK', SQL> estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE, SQL> method_opt => 'FOR ALL COLUMNS SIZE SKEWONLY', SQL> cascade => TRUE SQL> ); SQL> END; SQL> / SQL> SQL> * =========================================================================== */ SQL> SQL> SQL> SQL> set echo off Table created. PL/SQL procedure successfully completed. Table created. Table altered. PL/SQL procedure successfully completed. Sequence created. Table created. Table altered. Table altered. Table created. Table altered. Index created. Table created. Table altered. Index created. Table created. Table created. Index created. Index created. Table created. Table created. Table created. Index created. Table created. Index created. Table created. Table altered. Index created. PL/SQL procedure successfully completed. Sequence created. Table created. Index created. Index created. Table created. Index created. Index created. Table created. Index created. Index created. Table created. Index created. Index created. Table created. Index created. Table created. Index created. Table created. Index created. Table created. Table created. Table created. Table created. Table created. 1 row created. Commit complete. Table created. Table altered. Table created. Index created. Table created. Index created. PL/SQL procedure successfully completed. Procedure created. PL/SQL procedure successfully completed. Procedure dropped. Function created. 1 row created. Commit complete. Function dropped. SQL> set feedback on SQL> set trimspool on SQL> SQL> spool Fix_KeywordCondition.txt