SQL> SQL> @schema.sql SQL> CREATE TABLE role ( 2 roleid number(20) NOT NULL, 3 name nvarchar2(255) DEFAULT '' , 4 type number(10) DEFAULT '0' NOT NULL, 5 readonly number(10) DEFAULT '0' NOT NULL, 6 PRIMARY KEY (roleid) 7 ); Table created. SQL> CREATE UNIQUE INDEX role_1 ON role (name); Index created. SQL> CREATE TABLE users ( 2 userid number(20) NOT NULL, 3 username nvarchar2(100) DEFAULT '' , 4 name nvarchar2(100) DEFAULT '' , 5 surname nvarchar2(100) DEFAULT '' , 6 passwd nvarchar2(60) DEFAULT '' , 7 url nvarchar2(255) DEFAULT '' , 8 autologin number(10) DEFAULT '0' NOT NULL, 9 autologout nvarchar2(32) DEFAULT '15m' , 10 lang nvarchar2(7) DEFAULT 'default' , 11 refresh nvarchar2(32) DEFAULT '30s' , 12 theme nvarchar2(128) DEFAULT 'default' , 13 attempt_failed number(10) DEFAULT 0 NOT NULL, 14 attempt_ip nvarchar2(39) DEFAULT '' , 15 attempt_clock number(10) DEFAULT 0 NOT NULL, 16 rows_per_page number(10) DEFAULT 50 NOT NULL, 17 timezone nvarchar2(50) DEFAULT 'default' , 18 roleid number(20) NOT NULL, 19 PRIMARY KEY (userid) 20 ); Table created. SQL> CREATE UNIQUE INDEX users_1 ON users (username); Index created. SQL> CREATE TABLE maintenances ( 2 maintenanceid number(20) NOT NULL, 3 name nvarchar2(128) DEFAULT '' , 4 maintenance_type number(10) DEFAULT '0' NOT NULL, 5 description nvarchar2(2048) DEFAULT '' , 6 active_since number(10) DEFAULT '0' NOT NULL, 7 active_till number(10) DEFAULT '0' NOT NULL, 8 tags_evaltype number(10) DEFAULT '0' NOT NULL, 9 PRIMARY KEY (maintenanceid) 10 ); Table created. SQL> CREATE INDEX maintenances_1 ON maintenances (active_since,active_till); Index created. SQL> CREATE UNIQUE INDEX maintenances_2 ON maintenances (name); Index created. SQL> CREATE TABLE hosts ( 2 hostid number(20) NOT NULL, 3 proxy_hostid number(20) NULL, 4 host nvarchar2(128) DEFAULT '' , 5 status number(10) DEFAULT '0' NOT NULL, 6 lastaccess number(10) DEFAULT '0' NOT NULL, 7 ipmi_authtype number(10) DEFAULT '-1' NOT NULL, 8 ipmi_privilege number(10) DEFAULT '2' NOT NULL, 9 ipmi_username nvarchar2(16) DEFAULT '' , 10 ipmi_password nvarchar2(20) DEFAULT '' , 11 maintenanceid number(20) NULL, 12 maintenance_status number(10) DEFAULT '0' NOT NULL, 13 maintenance_type number(10) DEFAULT '0' NOT NULL, 14 maintenance_from number(10) DEFAULT '0' NOT NULL, 15 name nvarchar2(128) DEFAULT '' , 16 flags number(10) DEFAULT '0' NOT NULL, 17 templateid number(20) NULL, 18 description nvarchar2(2048) DEFAULT '' , 19 tls_connect number(10) DEFAULT '1' NOT NULL, 20 tls_accept number(10) DEFAULT '1' NOT NULL, 21 tls_issuer nvarchar2(1024) DEFAULT '' , 22 tls_subject nvarchar2(1024) DEFAULT '' , 23 tls_psk_identity nvarchar2(128) DEFAULT '' , 24 tls_psk nvarchar2(512) DEFAULT '' , 25 proxy_address nvarchar2(255) DEFAULT '' , 26 auto_compress number(10) DEFAULT '1' NOT NULL, 27 discover number(10) DEFAULT '0' NOT NULL, 28 custom_interfaces number(10) DEFAULT '0' NOT NULL, 29 uuid nvarchar2(32) DEFAULT '' , 30 PRIMARY KEY (hostid) 31 ); Table created. SQL> CREATE INDEX hosts_1 ON hosts (host); Index created. SQL> CREATE INDEX hosts_2 ON hosts (status); Index created. SQL> CREATE INDEX hosts_3 ON hosts (proxy_hostid); Index created. SQL> CREATE INDEX hosts_4 ON hosts (name); Index created. SQL> CREATE INDEX hosts_5 ON hosts (maintenanceid); Index created. SQL> CREATE TABLE hstgrp ( 2 groupid number(20) NOT NULL, 3 name nvarchar2(255) DEFAULT '' , 4 internal number(10) DEFAULT '0' NOT NULL, 5 flags number(10) DEFAULT '0' NOT NULL, 6 uuid nvarchar2(32) DEFAULT '' , 7 PRIMARY KEY (groupid) 8 ); Table created. SQL> CREATE INDEX hstgrp_1 ON hstgrp (name); Index created. SQL> CREATE TABLE group_prototype ( 2 group_prototypeid number(20) NOT NULL, 3 hostid number(20) NOT NULL, 4 name nvarchar2(255) DEFAULT '' , 5 groupid number(20) NULL, 6 templateid number(20) NULL, 7 PRIMARY KEY (group_prototypeid) 8 ); Table created. SQL> CREATE INDEX group_prototype_1 ON group_prototype (hostid); Index created. SQL> CREATE TABLE group_discovery ( 2 groupid number(20) NOT NULL, 3 parent_group_prototypeid number(20) NOT NULL, 4 name nvarchar2(64) DEFAULT '' , 5 lastcheck number(10) DEFAULT '0' NOT NULL, 6 ts_delete number(10) DEFAULT '0' NOT NULL, 7 PRIMARY KEY (groupid) 8 ); Table created. SQL> CREATE TABLE drules ( 2 druleid number(20) NOT NULL, 3 proxy_hostid number(20) NULL, 4 name nvarchar2(255) DEFAULT '' , 5 iprange nvarchar2(2048) DEFAULT '' , 6 delay nvarchar2(255) DEFAULT '1h' , 7 nextcheck number(10) DEFAULT '0' NOT NULL, 8 status number(10) DEFAULT '0' NOT NULL, 9 PRIMARY KEY (druleid) 10 ); Table created. SQL> CREATE INDEX drules_1 ON drules (proxy_hostid); Index created. SQL> CREATE UNIQUE INDEX drules_2 ON drules (name); Index created. SQL> CREATE TABLE dchecks ( 2 dcheckid number(20) NOT NULL, 3 druleid number(20) NOT NULL, 4 type number(10) DEFAULT '0' NOT NULL, 5 key_ nvarchar2(2048) DEFAULT '' , 6 snmp_community nvarchar2(255) DEFAULT '' , 7 ports nvarchar2(255) DEFAULT '0' , 8 snmpv3_securityname nvarchar2(64) DEFAULT '' , 9 snmpv3_securitylevel number(10) DEFAULT '0' NOT NULL, 10 snmpv3_authpassphrase nvarchar2(64) DEFAULT '' , 11 snmpv3_privpassphrase nvarchar2(64) DEFAULT '' , 12 uniq number(10) DEFAULT '0' NOT NULL, 13 snmpv3_authprotocol number(10) DEFAULT '0' NOT NULL, 14 snmpv3_privprotocol number(10) DEFAULT '0' NOT NULL, 15 snmpv3_contextname nvarchar2(255) DEFAULT '' , 16 host_source number(10) DEFAULT '1' NOT NULL, 17 name_source number(10) DEFAULT '0' NOT NULL, 18 PRIMARY KEY (dcheckid) 19 ); Table created. SQL> CREATE INDEX dchecks_1 ON dchecks (druleid,host_source,name_source); Index created. SQL> CREATE TABLE httptest ( 2 httptestid number(20) NOT NULL, 3 name nvarchar2(64) DEFAULT '' , 4 nextcheck number(10) DEFAULT '0' NOT NULL, 5 delay nvarchar2(255) DEFAULT '1m' , 6 status number(10) DEFAULT '0' NOT NULL, 7 agent nvarchar2(255) DEFAULT 'Zabbix' , 8 authentication number(10) DEFAULT '0' NOT NULL, 9 http_user nvarchar2(64) DEFAULT '' , 10 http_password nvarchar2(64) DEFAULT '' , 11 hostid number(20) NOT NULL, 12 templateid number(20) NULL, 13 http_proxy nvarchar2(255) DEFAULT '' , 14 retries number(10) DEFAULT '1' NOT NULL, 15 ssl_cert_file nvarchar2(255) DEFAULT '' , 16 ssl_key_file nvarchar2(255) DEFAULT '' , 17 ssl_key_password nvarchar2(64) DEFAULT '' , 18 verify_peer number(10) DEFAULT '0' NOT NULL, 19 verify_host number(10) DEFAULT '0' NOT NULL, 20 uuid nvarchar2(32) DEFAULT '' , 21 PRIMARY KEY (httptestid) 22 ); Table created. SQL> CREATE UNIQUE INDEX httptest_2 ON httptest (hostid,name); Index created. SQL> CREATE INDEX httptest_3 ON httptest (status); Index created. SQL> CREATE INDEX httptest_4 ON httptest (templateid); Index created. SQL> CREATE TABLE httpstep ( 2 httpstepid number(20) NOT NULL, 3 httptestid number(20) NOT NULL, 4 name nvarchar2(64) DEFAULT '' , 5 no number(10) DEFAULT '0' NOT NULL, 6 url nvarchar2(2048) DEFAULT '' , 7 timeout nvarchar2(255) DEFAULT '15s' , 8 posts nvarchar2(2048) DEFAULT '' , 9 required nvarchar2(255) DEFAULT '' , 10 status_codes nvarchar2(255) DEFAULT '' , 11 follow_redirects number(10) DEFAULT '1' NOT NULL, 12 retrieve_mode number(10) DEFAULT '0' NOT NULL, 13 post_type number(10) DEFAULT '0' NOT NULL, 14 PRIMARY KEY (httpstepid) 15 ); Table created. SQL> CREATE INDEX httpstep_1 ON httpstep (httptestid); Index created. SQL> CREATE TABLE interface ( 2 interfaceid number(20) NOT NULL, 3 hostid number(20) NOT NULL, 4 main number(10) DEFAULT '0' NOT NULL, 5 type number(10) DEFAULT '1' NOT NULL, 6 useip number(10) DEFAULT '1' NOT NULL, 7 ip nvarchar2(64) DEFAULT '127.0.0.1' , 8 dns nvarchar2(255) DEFAULT '' , 9 port nvarchar2(64) DEFAULT '10050' , 10 available number(10) DEFAULT '0' NOT NULL, 11 error nvarchar2(2048) DEFAULT '' , 12 errors_from number(10) DEFAULT '0' NOT NULL, 13 disable_until number(10) DEFAULT '0' NOT NULL, 14 PRIMARY KEY (interfaceid) 15 ); Table created. SQL> CREATE INDEX interface_1 ON interface (hostid,type); Index created. SQL> CREATE INDEX interface_2 ON interface (ip,dns); Index created. SQL> CREATE INDEX interface_3 ON interface (available); Index created. SQL> CREATE TABLE valuemap ( 2 valuemapid number(20) NOT NULL, 3 hostid number(20) NOT NULL, 4 name nvarchar2(64) DEFAULT '' , 5 uuid nvarchar2(32) DEFAULT '' , 6 PRIMARY KEY (valuemapid) 7 ); Table created. SQL> CREATE UNIQUE INDEX valuemap_1 ON valuemap (hostid,name); Index created. SQL> CREATE TABLE items ( 2 itemid number(20) NOT NULL, 3 type number(10) DEFAULT '0' NOT NULL, 4 snmp_oid nvarchar2(512) DEFAULT '' , 5 hostid number(20) NOT NULL, 6 name nvarchar2(255) DEFAULT '' , 7 key_ nvarchar2(2048) DEFAULT '' , 8 delay nvarchar2(1024) DEFAULT '0' , 9 history nvarchar2(255) DEFAULT '90d' , 10 trends nvarchar2(255) DEFAULT '365d' , 11 status number(10) DEFAULT '0' NOT NULL, 12 value_type number(10) DEFAULT '0' NOT NULL, 13 trapper_hosts nvarchar2(255) DEFAULT '' , 14 units nvarchar2(255) DEFAULT '' , 15 formula nvarchar2(255) DEFAULT '' , 16 logtimefmt nvarchar2(64) DEFAULT '' , 17 templateid number(20) NULL, 18 valuemapid number(20) NULL, 19 params nclob DEFAULT '' , 20 ipmi_sensor nvarchar2(128) DEFAULT '' , 21 authtype number(10) DEFAULT '0' NOT NULL, 22 username nvarchar2(64) DEFAULT '' , 23 password nvarchar2(64) DEFAULT '' , 24 publickey nvarchar2(64) DEFAULT '' , 25 privatekey nvarchar2(64) DEFAULT '' , 26 flags number(10) DEFAULT '0' NOT NULL, 27 interfaceid number(20) NULL, 28 description nclob DEFAULT '' , 29 inventory_link number(10) DEFAULT '0' NOT NULL, 30 lifetime nvarchar2(255) DEFAULT '30d' , 31 evaltype number(10) DEFAULT '0' NOT NULL, 32 jmx_endpoint nvarchar2(255) DEFAULT '' , 33 master_itemid number(20) NULL, 34 timeout nvarchar2(255) DEFAULT '3s' , 35 url nvarchar2(2048) DEFAULT '' , 36 query_fields nvarchar2(2048) DEFAULT '' , 37 posts nclob DEFAULT '' , 38 status_codes nvarchar2(255) DEFAULT '200' , 39 follow_redirects number(10) DEFAULT '1' NOT NULL, 40 post_type number(10) DEFAULT '0' NOT NULL, 41 http_proxy nvarchar2(255) DEFAULT '' , 42 headers nclob DEFAULT '' , 43 retrieve_mode number(10) DEFAULT '0' NOT NULL, 44 request_method number(10) DEFAULT '0' NOT NULL, 45 output_format number(10) DEFAULT '0' NOT NULL, 46 ssl_cert_file nvarchar2(255) DEFAULT '' , 47 ssl_key_file nvarchar2(255) DEFAULT '' , 48 ssl_key_password nvarchar2(64) DEFAULT '' , 49 verify_peer number(10) DEFAULT '0' NOT NULL, 50 verify_host number(10) DEFAULT '0' NOT NULL, 51 allow_traps number(10) DEFAULT '0' NOT NULL, 52 discover number(10) DEFAULT '0' NOT NULL, 53 uuid nvarchar2(32) DEFAULT '' , 54 PRIMARY KEY (itemid) 55 ); Table created. SQL> CREATE INDEX items_1 ON items (hostid,key_); Index created. SQL> CREATE INDEX items_3 ON items (status); Index created. SQL> CREATE INDEX items_4 ON items (templateid); Index created. SQL> CREATE INDEX items_5 ON items (valuemapid); Index created. SQL> CREATE INDEX items_6 ON items (interfaceid); Index created. SQL> CREATE INDEX items_7 ON items (master_itemid); Index created. SQL> CREATE INDEX items_8 ON items (key_); Index created. SQL> CREATE TABLE httpstepitem ( 2 httpstepitemid number(20) NOT NULL, 3 httpstepid number(20) NOT NULL, 4 itemid number(20) NOT NULL, 5 type number(10) DEFAULT '0' NOT NULL, 6 PRIMARY KEY (httpstepitemid) 7 ); Table created. SQL> CREATE UNIQUE INDEX httpstepitem_1 ON httpstepitem (httpstepid,itemid); Index created. SQL> CREATE INDEX httpstepitem_2 ON httpstepitem (itemid); Index created. SQL> CREATE TABLE httptestitem ( 2 httptestitemid number(20) NOT NULL, 3 httptestid number(20) NOT NULL, 4 itemid number(20) NOT NULL, 5 type number(10) DEFAULT '0' NOT NULL, 6 PRIMARY KEY (httptestitemid) 7 ); Table created. SQL> CREATE UNIQUE INDEX httptestitem_1 ON httptestitem (httptestid,itemid); Index created. SQL> CREATE INDEX httptestitem_2 ON httptestitem (itemid); Index created. SQL> CREATE TABLE media_type ( 2 mediatypeid number(20) NOT NULL, 3 type number(10) DEFAULT '0' NOT NULL, 4 name nvarchar2(100) DEFAULT '' , 5 smtp_server nvarchar2(255) DEFAULT '' , 6 smtp_helo nvarchar2(255) DEFAULT '' , 7 smtp_email nvarchar2(255) DEFAULT '' , 8 exec_path nvarchar2(255) DEFAULT '' , 9 gsm_modem nvarchar2(255) DEFAULT '' , 10 username nvarchar2(255) DEFAULT '' , 11 passwd nvarchar2(255) DEFAULT '' , 12 status number(10) DEFAULT '0' NOT NULL, 13 smtp_port number(10) DEFAULT '25' NOT NULL, 14 smtp_security number(10) DEFAULT '0' NOT NULL, 15 smtp_verify_peer number(10) DEFAULT '0' NOT NULL, 16 smtp_verify_host number(10) DEFAULT '0' NOT NULL, 17 smtp_authentication number(10) DEFAULT '0' NOT NULL, 18 exec_params nvarchar2(255) DEFAULT '' , 19 maxsessions number(10) DEFAULT '1' NOT NULL, 20 maxattempts number(10) DEFAULT '3' NOT NULL, 21 attempt_interval nvarchar2(32) DEFAULT '10s' , 22 content_type number(10) DEFAULT '1' NOT NULL, 23 script nclob DEFAULT '' , 24 timeout nvarchar2(32) DEFAULT '30s' , 25 process_tags number(10) DEFAULT '0' NOT NULL, 26 show_event_menu number(10) DEFAULT '0' NOT NULL, 27 event_menu_url nvarchar2(2048) DEFAULT '' , 28 event_menu_name nvarchar2(255) DEFAULT '' , 29 description nvarchar2(2048) DEFAULT '' , 30 PRIMARY KEY (mediatypeid) 31 ); Table created. SQL> CREATE UNIQUE INDEX media_type_1 ON media_type (name); Index created. SQL> CREATE TABLE media_type_param ( 2 mediatype_paramid number(20) NOT NULL, 3 mediatypeid number(20) NOT NULL, 4 name nvarchar2(255) DEFAULT '' , 5 value nvarchar2(2048) DEFAULT '' , 6 PRIMARY KEY (mediatype_paramid) 7 ); Table created. SQL> CREATE INDEX media_type_param_1 ON media_type_param (mediatypeid); Index created. SQL> CREATE TABLE media_type_message ( 2 mediatype_messageid number(20) NOT NULL, 3 mediatypeid number(20) NOT NULL, 4 eventsource number(10) NOT NULL, 5 recovery number(10) NOT NULL, 6 subject nvarchar2(255) DEFAULT '' , 7 message nvarchar2(2048) DEFAULT '' , 8 PRIMARY KEY (mediatype_messageid) 9 ); Table created. SQL> CREATE UNIQUE INDEX media_type_message_1 ON media_type_message (mediatypeid,eventsource,recovery); Index created. SQL> CREATE TABLE usrgrp ( 2 usrgrpid number(20) NOT NULL, 3 name nvarchar2(64) DEFAULT '' , 4 gui_access number(10) DEFAULT '0' NOT NULL, 5 users_status number(10) DEFAULT '0' NOT NULL, 6 debug_mode number(10) DEFAULT '0' NOT NULL, 7 PRIMARY KEY (usrgrpid) 8 ); Table created. SQL> CREATE UNIQUE INDEX usrgrp_1 ON usrgrp (name); Index created. SQL> CREATE TABLE users_groups ( 2 id number(20) NOT NULL, 3 usrgrpid number(20) NOT NULL, 4 userid number(20) NOT NULL, 5 PRIMARY KEY (id) 6 ); Table created. SQL> CREATE UNIQUE INDEX users_groups_1 ON users_groups (usrgrpid,userid); Index created. SQL> CREATE INDEX users_groups_2 ON users_groups (userid); Index created. SQL> CREATE TABLE scripts ( 2 scriptid number(20) NOT NULL, 3 name nvarchar2(255) DEFAULT '' , 4 command nclob DEFAULT '' , 5 host_access number(10) DEFAULT '2' NOT NULL, 6 usrgrpid number(20) NULL, 7 groupid number(20) NULL, 8 description nvarchar2(2048) DEFAULT '' , 9 confirmation nvarchar2(255) DEFAULT '' , 10 type number(10) DEFAULT '5' NOT NULL, 11 execute_on number(10) DEFAULT '2' NOT NULL, 12 timeout nvarchar2(32) DEFAULT '30s' , 13 scope number(10) DEFAULT '1' NOT NULL, 14 port nvarchar2(64) DEFAULT '' , 15 authtype number(10) DEFAULT '0' NOT NULL, 16 username nvarchar2(64) DEFAULT '' , 17 password nvarchar2(64) DEFAULT '' , 18 publickey nvarchar2(64) DEFAULT '' , 19 privatekey nvarchar2(64) DEFAULT '' , 20 menu_path nvarchar2(255) DEFAULT '' , 21 PRIMARY KEY (scriptid) 22 ); Table created. SQL> CREATE INDEX scripts_1 ON scripts (usrgrpid); Index created. SQL> CREATE INDEX scripts_2 ON scripts (groupid); Index created. SQL> CREATE UNIQUE INDEX scripts_3 ON scripts (name); Index created. SQL> CREATE TABLE script_param ( 2 script_paramid number(20) NOT NULL, 3 scriptid number(20) NOT NULL, 4 name nvarchar2(255) DEFAULT '' , 5 value nvarchar2(2048) DEFAULT '' , 6 PRIMARY KEY (script_paramid) 7 ); Table created. SQL> CREATE UNIQUE INDEX script_param_1 ON script_param (scriptid,name); Index created. SQL> CREATE TABLE actions ( 2 actionid number(20) NOT NULL, 3 name nvarchar2(255) DEFAULT '' , 4 eventsource number(10) DEFAULT '0' NOT NULL, 5 evaltype number(10) DEFAULT '0' NOT NULL, 6 status number(10) DEFAULT '0' NOT NULL, 7 esc_period nvarchar2(255) DEFAULT '1h' , 8 formula nvarchar2(255) DEFAULT '' , 9 pause_suppressed number(10) DEFAULT '1' NOT NULL, 10 PRIMARY KEY (actionid) 11 ); Table created. SQL> CREATE INDEX actions_1 ON actions (eventsource,status); Index created. SQL> CREATE UNIQUE INDEX actions_2 ON actions (name); Index created. SQL> CREATE TABLE operations ( 2 operationid number(20) NOT NULL, 3 actionid number(20) NOT NULL, 4 operationtype number(10) DEFAULT '0' NOT NULL, 5 esc_period nvarchar2(255) DEFAULT '0' , 6 esc_step_from number(10) DEFAULT '1' NOT NULL, 7 esc_step_to number(10) DEFAULT '1' NOT NULL, 8 evaltype number(10) DEFAULT '0' NOT NULL, 9 recovery number(10) DEFAULT '0' NOT NULL, 10 PRIMARY KEY (operationid) 11 ); Table created. SQL> CREATE INDEX operations_1 ON operations (actionid); Index created. SQL> CREATE TABLE opmessage ( 2 operationid number(20) NOT NULL, 3 default_msg number(10) DEFAULT '1' NOT NULL, 4 subject nvarchar2(255) DEFAULT '' , 5 message nvarchar2(2048) DEFAULT '' , 6 mediatypeid number(20) NULL, 7 PRIMARY KEY (operationid) 8 ); Table created. SQL> CREATE INDEX opmessage_1 ON opmessage (mediatypeid); Index created. SQL> CREATE TABLE opmessage_grp ( 2 opmessage_grpid number(20) NOT NULL, 3 operationid number(20) NOT NULL, 4 usrgrpid number(20) NOT NULL, 5 PRIMARY KEY (opmessage_grpid) 6 ); Table created. SQL> CREATE UNIQUE INDEX opmessage_grp_1 ON opmessage_grp (operationid,usrgrpid); Index created. SQL> CREATE INDEX opmessage_grp_2 ON opmessage_grp (usrgrpid); Index created. SQL> CREATE TABLE opmessage_usr ( 2 opmessage_usrid number(20) NOT NULL, 3 operationid number(20) NOT NULL, 4 userid number(20) NOT NULL, 5 PRIMARY KEY (opmessage_usrid) 6 ); Table created. SQL> CREATE UNIQUE INDEX opmessage_usr_1 ON opmessage_usr (operationid,userid); Index created. SQL> CREATE INDEX opmessage_usr_2 ON opmessage_usr (userid); Index created. SQL> CREATE TABLE opcommand ( 2 operationid number(20) NOT NULL, 3 scriptid number(20) NOT NULL, 4 PRIMARY KEY (operationid) 5 ); Table created. SQL> CREATE INDEX opcommand_1 ON opcommand (scriptid); Index created. SQL> CREATE TABLE opcommand_hst ( 2 opcommand_hstid number(20) NOT NULL, 3 operationid number(20) NOT NULL, 4 hostid number(20) NULL, 5 PRIMARY KEY (opcommand_hstid) 6 ); Table created. SQL> CREATE INDEX opcommand_hst_1 ON opcommand_hst (operationid); Index created. SQL> CREATE INDEX opcommand_hst_2 ON opcommand_hst (hostid); Index created. SQL> CREATE TABLE opcommand_grp ( 2 opcommand_grpid number(20) NOT NULL, 3 operationid number(20) NOT NULL, 4 groupid number(20) NOT NULL, 5 PRIMARY KEY (opcommand_grpid) 6 ); Table created. SQL> CREATE INDEX opcommand_grp_1 ON opcommand_grp (operationid); Index created. SQL> CREATE INDEX opcommand_grp_2 ON opcommand_grp (groupid); Index created. SQL> CREATE TABLE opgroup ( 2 opgroupid number(20) NOT NULL, 3 operationid number(20) NOT NULL, 4 groupid number(20) NOT NULL, 5 PRIMARY KEY (opgroupid) 6 ); Table created. SQL> CREATE UNIQUE INDEX opgroup_1 ON opgroup (operationid,groupid); Index created. SQL> CREATE INDEX opgroup_2 ON opgroup (groupid); Index created. SQL> CREATE TABLE optemplate ( 2 optemplateid number(20) NOT NULL, 3 operationid number(20) NOT NULL, 4 templateid number(20) NOT NULL, 5 PRIMARY KEY (optemplateid) 6 ); Table created. SQL> CREATE UNIQUE INDEX optemplate_1 ON optemplate (operationid,templateid); Index created. SQL> CREATE INDEX optemplate_2 ON optemplate (templateid); Index created. SQL> CREATE TABLE opconditions ( 2 opconditionid number(20) NOT NULL, 3 operationid number(20) NOT NULL, 4 conditiontype number(10) DEFAULT '0' NOT NULL, 5 operator number(10) DEFAULT '0' NOT NULL, 6 value nvarchar2(255) DEFAULT '' , 7 PRIMARY KEY (opconditionid) 8 ); Table created. SQL> CREATE INDEX opconditions_1 ON opconditions (operationid); Index created. SQL> CREATE TABLE conditions ( 2 conditionid number(20) NOT NULL, 3 actionid number(20) NOT NULL, 4 conditiontype number(10) DEFAULT '0' NOT NULL, 5 operator number(10) DEFAULT '0' NOT NULL, 6 value nvarchar2(255) DEFAULT '' , 7 value2 nvarchar2(255) DEFAULT '' , 8 PRIMARY KEY (conditionid) 9 ); Table created. SQL> CREATE INDEX conditions_1 ON conditions (actionid); Index created. SQL> CREATE TABLE config ( 2 configid number(20) NOT NULL, 3 work_period nvarchar2(255) DEFAULT '1-5,09:00-18:00' , 4 alert_usrgrpid number(20) NULL, 5 default_theme nvarchar2(128) DEFAULT 'blue-theme' , 6 authentication_type number(10) DEFAULT '0' NOT NULL, 7 ldap_host nvarchar2(255) DEFAULT '' , 8 ldap_port number(10) DEFAULT 389 NOT NULL, 9 ldap_base_dn nvarchar2(255) DEFAULT '' , 10 ldap_bind_dn nvarchar2(255) DEFAULT '' , 11 ldap_bind_password nvarchar2(128) DEFAULT '' , 12 ldap_search_attribute nvarchar2(128) DEFAULT '' , 13 discovery_groupid number(20) NOT NULL, 14 max_in_table number(10) DEFAULT '50' NOT NULL, 15 search_limit number(10) DEFAULT '1000' NOT NULL, 16 severity_color_0 nvarchar2(6) DEFAULT '97AAB3' , 17 severity_color_1 nvarchar2(6) DEFAULT '7499FF' , 18 severity_color_2 nvarchar2(6) DEFAULT 'FFC859' , 19 severity_color_3 nvarchar2(6) DEFAULT 'FFA059' , 20 severity_color_4 nvarchar2(6) DEFAULT 'E97659' , 21 severity_color_5 nvarchar2(6) DEFAULT 'E45959' , 22 severity_name_0 nvarchar2(32) DEFAULT 'Not classified' , 23 severity_name_1 nvarchar2(32) DEFAULT 'Information' , 24 severity_name_2 nvarchar2(32) DEFAULT 'Warning' , 25 severity_name_3 nvarchar2(32) DEFAULT 'Average' , 26 severity_name_4 nvarchar2(32) DEFAULT 'High' , 27 severity_name_5 nvarchar2(32) DEFAULT 'Disaster' , 28 ok_period nvarchar2(32) DEFAULT '5m' , 29 blink_period nvarchar2(32) DEFAULT '2m' , 30 problem_unack_color nvarchar2(6) DEFAULT 'CC0000' , 31 problem_ack_color nvarchar2(6) DEFAULT 'CC0000' , 32 ok_unack_color nvarchar2(6) DEFAULT '009900' , 33 ok_ack_color nvarchar2(6) DEFAULT '009900' , 34 problem_unack_style number(10) DEFAULT '1' NOT NULL, 35 problem_ack_style number(10) DEFAULT '1' NOT NULL, 36 ok_unack_style number(10) DEFAULT '1' NOT NULL, 37 ok_ack_style number(10) DEFAULT '1' NOT NULL, 38 snmptrap_logging number(10) DEFAULT '1' NOT NULL, 39 server_check_interval number(10) DEFAULT '10' NOT NULL, 40 hk_events_mode number(10) DEFAULT '1' NOT NULL, 41 hk_events_trigger nvarchar2(32) DEFAULT '365d' , 42 hk_events_internal nvarchar2(32) DEFAULT '1d' , 43 hk_events_discovery nvarchar2(32) DEFAULT '1d' , 44 hk_events_autoreg nvarchar2(32) DEFAULT '1d' , 45 hk_services_mode number(10) DEFAULT '1' NOT NULL, 46 hk_services nvarchar2(32) DEFAULT '365d' , 47 hk_audit_mode number(10) DEFAULT '1' NOT NULL, 48 hk_audit nvarchar2(32) DEFAULT '365d' , 49 hk_sessions_mode number(10) DEFAULT '1' NOT NULL, 50 hk_sessions nvarchar2(32) DEFAULT '365d' , 51 hk_history_mode number(10) DEFAULT '1' NOT NULL, 52 hk_history_global number(10) DEFAULT '0' NOT NULL, 53 hk_history nvarchar2(32) DEFAULT '90d' , 54 hk_trends_mode number(10) DEFAULT '1' NOT NULL, 55 hk_trends_global number(10) DEFAULT '0' NOT NULL, 56 hk_trends nvarchar2(32) DEFAULT '365d' , 57 default_inventory_mode number(10) DEFAULT '-1' NOT NULL, 58 custom_color number(10) DEFAULT '0' NOT NULL, 59 http_auth_enabled number(10) DEFAULT '0' NOT NULL, 60 http_login_form number(10) DEFAULT '0' NOT NULL, 61 http_strip_domains nvarchar2(2048) DEFAULT '' , 62 http_case_sensitive number(10) DEFAULT '1' NOT NULL, 63 ldap_configured number(10) DEFAULT '0' NOT NULL, 64 ldap_case_sensitive number(10) DEFAULT '1' NOT NULL, 65 db_extension nvarchar2(32) DEFAULT '' , 66 autoreg_tls_accept number(10) DEFAULT '1' NOT NULL, 67 compression_status number(10) DEFAULT '0' NOT NULL, 68 compress_older nvarchar2(32) DEFAULT '7d' , 69 instanceid nvarchar2(32) DEFAULT '' , 70 saml_auth_enabled number(10) DEFAULT '0' NOT NULL, 71 saml_idp_entityid nvarchar2(1024) DEFAULT '' , 72 saml_sso_url nvarchar2(2048) DEFAULT '' , 73 saml_slo_url nvarchar2(2048) DEFAULT '' , 74 saml_username_attribute nvarchar2(128) DEFAULT '' , 75 saml_sp_entityid nvarchar2(1024) DEFAULT '' , 76 saml_nameid_format nvarchar2(2048) DEFAULT '' , 77 saml_sign_messages number(10) DEFAULT '0' NOT NULL, 78 saml_sign_assertions number(10) DEFAULT '0' NOT NULL, 79 saml_sign_authn_requests number(10) DEFAULT '0' NOT NULL, 80 saml_sign_logout_requests number(10) DEFAULT '0' NOT NULL, 81 saml_sign_logout_responses number(10) DEFAULT '0' NOT NULL, 82 saml_encrypt_nameid number(10) DEFAULT '0' NOT NULL, 83 saml_encrypt_assertions number(10) DEFAULT '0' NOT NULL, 84 saml_case_sensitive number(10) DEFAULT '0' NOT NULL, 85 default_lang nvarchar2(5) DEFAULT 'en_GB' , 86 default_timezone nvarchar2(50) DEFAULT 'system' , 87 login_attempts number(10) DEFAULT '5' NOT NULL, 88 login_block nvarchar2(32) DEFAULT '30s' , 89 show_technical_errors number(10) DEFAULT '0' NOT NULL, 90 validate_uri_schemes number(10) DEFAULT '1' NOT NULL, 91 uri_valid_schemes nvarchar2(255) DEFAULT 'http,https,ftp,file,mailto,tel,ssh' , 92 x_frame_options nvarchar2(255) DEFAULT 'SAMEORIGIN' , 93 iframe_sandboxing_enabled number(10) DEFAULT '1' NOT NULL, 94 iframe_sandboxing_exceptions nvarchar2(255) DEFAULT '' , 95 max_overview_table_size number(10) DEFAULT '50' NOT NULL, 96 history_period nvarchar2(32) DEFAULT '24h' , 97 period_default nvarchar2(32) DEFAULT '1h' , 98 max_period nvarchar2(32) DEFAULT '2y' , 99 socket_timeout nvarchar2(32) DEFAULT '3s' , 100 connect_timeout nvarchar2(32) DEFAULT '3s' , 101 media_type_test_timeout nvarchar2(32) DEFAULT '65s' , 102 script_timeout nvarchar2(32) DEFAULT '60s' , 103 item_test_timeout nvarchar2(32) DEFAULT '60s' , 104 session_key nvarchar2(32) DEFAULT '' , 105 url nvarchar2(255) DEFAULT '' , 106 report_test_timeout nvarchar2(32) DEFAULT '60s' , 107 dbversion_status nvarchar2(1024) DEFAULT '' , 108 PRIMARY KEY (configid) 109 ); Table created. SQL> CREATE INDEX config_1 ON config (alert_usrgrpid); Index created. SQL> CREATE INDEX config_2 ON config (discovery_groupid); Index created. SQL> CREATE TABLE triggers ( 2 triggerid number(20) NOT NULL, 3 expression nvarchar2(2048) DEFAULT '' , 4 description nvarchar2(255) DEFAULT '' , 5 url nvarchar2(255) DEFAULT '' , 6 status number(10) DEFAULT '0' NOT NULL, 7 value number(10) DEFAULT '0' NOT NULL, 8 priority number(10) DEFAULT '0' NOT NULL, 9 lastchange number(10) DEFAULT '0' NOT NULL, 10 comments nvarchar2(2048) DEFAULT '' , 11 error nvarchar2(2048) DEFAULT '' , 12 templateid number(20) NULL, 13 type number(10) DEFAULT '0' NOT NULL, 14 state number(10) DEFAULT '0' NOT NULL, 15 flags number(10) DEFAULT '0' NOT NULL, 16 recovery_mode number(10) DEFAULT '0' NOT NULL, 17 recovery_expression nvarchar2(2048) DEFAULT '' , 18 correlation_mode number(10) DEFAULT '0' NOT NULL, 19 correlation_tag nvarchar2(255) DEFAULT '' , 20 manual_close number(10) DEFAULT '0' NOT NULL, 21 opdata nvarchar2(255) DEFAULT '' , 22 discover number(10) DEFAULT '0' NOT NULL, 23 event_name nvarchar2(2048) DEFAULT '' , 24 uuid nvarchar2(32) DEFAULT '' , 25 PRIMARY KEY (triggerid) 26 ); Table created. SQL> CREATE INDEX triggers_1 ON triggers (status); Index created. SQL> CREATE INDEX triggers_2 ON triggers (value,lastchange); Index created. SQL> CREATE INDEX triggers_3 ON triggers (templateid); Index created. SQL> CREATE TABLE trigger_depends ( 2 triggerdepid number(20) NOT NULL, 3 triggerid_down number(20) NOT NULL, 4 triggerid_up number(20) NOT NULL, 5 PRIMARY KEY (triggerdepid) 6 ); Table created. SQL> CREATE UNIQUE INDEX trigger_depends_1 ON trigger_depends (triggerid_down,triggerid_up); Index created. SQL> CREATE INDEX trigger_depends_2 ON trigger_depends (triggerid_up); Index created. SQL> CREATE TABLE functions ( 2 functionid number(20) NOT NULL, 3 itemid number(20) NOT NULL, 4 triggerid number(20) NOT NULL, 5 name nvarchar2(12) DEFAULT '' , 6 parameter nvarchar2(255) DEFAULT '0' , 7 PRIMARY KEY (functionid) 8 ); Table created. SQL> CREATE INDEX functions_1 ON functions (triggerid); Index created. SQL> CREATE INDEX functions_2 ON functions (itemid,name,parameter); Index created. SQL> CREATE TABLE graphs ( 2 graphid number(20) NOT NULL, 3 name nvarchar2(128) DEFAULT '' , 4 width number(10) DEFAULT '900' NOT NULL, 5 height number(10) DEFAULT '200' NOT NULL, 6 yaxismin BINARY_DOUBLE DEFAULT '0' NOT NULL, 7 yaxismax BINARY_DOUBLE DEFAULT '100' NOT NULL, 8 templateid number(20) NULL, 9 show_work_period number(10) DEFAULT '1' NOT NULL, 10 show_triggers number(10) DEFAULT '1' NOT NULL, 11 graphtype number(10) DEFAULT '0' NOT NULL, 12 show_legend number(10) DEFAULT '1' NOT NULL, 13 show_3d number(10) DEFAULT '0' NOT NULL, 14 percent_left BINARY_DOUBLE DEFAULT '0' NOT NULL, 15 percent_right BINARY_DOUBLE DEFAULT '0' NOT NULL, 16 ymin_type number(10) DEFAULT '0' NOT NULL, 17 ymax_type number(10) DEFAULT '0' NOT NULL, 18 ymin_itemid number(20) NULL, 19 ymax_itemid number(20) NULL, 20 flags number(10) DEFAULT '0' NOT NULL, 21 discover number(10) DEFAULT '0' NOT NULL, 22 uuid nvarchar2(32) DEFAULT '' , 23 PRIMARY KEY (graphid) 24 ); Table created. SQL> CREATE INDEX graphs_1 ON graphs (name); Index created. SQL> CREATE INDEX graphs_2 ON graphs (templateid); Index created. SQL> CREATE INDEX graphs_3 ON graphs (ymin_itemid); Index created. SQL> CREATE INDEX graphs_4 ON graphs (ymax_itemid); Index created. SQL> CREATE TABLE graphs_items ( 2 gitemid number(20) NOT NULL, 3 graphid number(20) NOT NULL, 4 itemid number(20) NOT NULL, 5 drawtype number(10) DEFAULT '0' NOT NULL, 6 sortorder number(10) DEFAULT '0' NOT NULL, 7 color nvarchar2(6) DEFAULT '009600' , 8 yaxisside number(10) DEFAULT '0' NOT NULL, 9 calc_fnc number(10) DEFAULT '2' NOT NULL, 10 type number(10) DEFAULT '0' NOT NULL, 11 PRIMARY KEY (gitemid) 12 ); Table created. SQL> CREATE INDEX graphs_items_1 ON graphs_items (itemid); Index created. SQL> CREATE INDEX graphs_items_2 ON graphs_items (graphid); Index created. SQL> CREATE TABLE graph_theme ( 2 graphthemeid number(20) NOT NULL, 3 theme nvarchar2(64) DEFAULT '' , 4 backgroundcolor nvarchar2(6) DEFAULT '' , 5 graphcolor nvarchar2(6) DEFAULT '' , 6 gridcolor nvarchar2(6) DEFAULT '' , 7 maingridcolor nvarchar2(6) DEFAULT '' , 8 gridbordercolor nvarchar2(6) DEFAULT '' , 9 textcolor nvarchar2(6) DEFAULT '' , 10 highlightcolor nvarchar2(6) DEFAULT '' , 11 leftpercentilecolor nvarchar2(6) DEFAULT '' , 12 rightpercentilecolor nvarchar2(6) DEFAULT '' , 13 nonworktimecolor nvarchar2(6) DEFAULT '' , 14 colorpalette nvarchar2(255) DEFAULT '' , 15 PRIMARY KEY (graphthemeid) 16 ); Table created. SQL> CREATE UNIQUE INDEX graph_theme_1 ON graph_theme (theme); Index created. SQL> CREATE TABLE globalmacro ( 2 globalmacroid number(20) NOT NULL, 3 macro nvarchar2(255) DEFAULT '' , 4 value nvarchar2(2048) DEFAULT '' , 5 description nvarchar2(2048) DEFAULT '' , 6 type number(10) DEFAULT '0' NOT NULL, 7 PRIMARY KEY (globalmacroid) 8 ); Table created. SQL> CREATE UNIQUE INDEX globalmacro_1 ON globalmacro (macro); Index created. SQL> CREATE TABLE hostmacro ( 2 hostmacroid number(20) NOT NULL, 3 hostid number(20) NOT NULL, 4 macro nvarchar2(255) DEFAULT '' , 5 value nvarchar2(2048) DEFAULT '' , 6 description nvarchar2(2048) DEFAULT '' , 7 type number(10) DEFAULT '0' NOT NULL, 8 PRIMARY KEY (hostmacroid) 9 ); Table created. SQL> CREATE UNIQUE INDEX hostmacro_1 ON hostmacro (hostid,macro); Index created. SQL> CREATE TABLE hosts_groups ( 2 hostgroupid number(20) NOT NULL, 3 hostid number(20) NOT NULL, 4 groupid number(20) NOT NULL, 5 PRIMARY KEY (hostgroupid) 6 ); Table created. SQL> CREATE UNIQUE INDEX hosts_groups_1 ON hosts_groups (hostid,groupid); Index created. SQL> CREATE INDEX hosts_groups_2 ON hosts_groups (groupid); Index created. SQL> CREATE TABLE hosts_templates ( 2 hosttemplateid number(20) NOT NULL, 3 hostid number(20) NOT NULL, 4 templateid number(20) NOT NULL, 5 PRIMARY KEY (hosttemplateid) 6 ); Table created. SQL> CREATE UNIQUE INDEX hosts_templates_1 ON hosts_templates (hostid,templateid); Index created. SQL> CREATE INDEX hosts_templates_2 ON hosts_templates (templateid); Index created. SQL> CREATE TABLE valuemap_mapping ( 2 valuemap_mappingid number(20) NOT NULL, 3 valuemapid number(20) NOT NULL, 4 value nvarchar2(64) DEFAULT '' , 5 newvalue nvarchar2(64) DEFAULT '' , 6 type number(10) DEFAULT '0' NOT NULL, 7 sortorder number(10) DEFAULT '0' NOT NULL, 8 PRIMARY KEY (valuemap_mappingid) 9 ); Table created. SQL> CREATE UNIQUE INDEX valuemap_mapping_1 ON valuemap_mapping (valuemapid,value,type); Index created. SQL> CREATE TABLE media ( 2 mediaid number(20) NOT NULL, 3 userid number(20) NOT NULL, 4 mediatypeid number(20) NOT NULL, 5 sendto nvarchar2(1024) DEFAULT '' , 6 active number(10) DEFAULT '0' NOT NULL, 7 severity number(10) DEFAULT '63' NOT NULL, 8 period nvarchar2(1024) DEFAULT '1-7,00:00-24:00' , 9 PRIMARY KEY (mediaid) 10 ); Table created. SQL> CREATE INDEX media_1 ON media (userid); Index created. SQL> CREATE INDEX media_2 ON media (mediatypeid); Index created. SQL> CREATE TABLE rights ( 2 rightid number(20) NOT NULL, 3 groupid number(20) NOT NULL, 4 permission number(10) DEFAULT '0' NOT NULL, 5 id number(20) NOT NULL, 6 PRIMARY KEY (rightid) 7 ); Table created. SQL> CREATE INDEX rights_1 ON rights (groupid); Index created. SQL> CREATE INDEX rights_2 ON rights (id); Index created. SQL> CREATE TABLE services ( 2 serviceid number(20) NOT NULL, 3 name nvarchar2(128) DEFAULT '' , 4 status number(10) DEFAULT '0' NOT NULL, 5 algorithm number(10) DEFAULT '0' NOT NULL, 6 triggerid number(20) NULL, 7 showsla number(10) DEFAULT '0' NOT NULL, 8 goodsla BINARY_DOUBLE DEFAULT '99.9' NOT NULL, 9 sortorder number(10) DEFAULT '0' NOT NULL, 10 PRIMARY KEY (serviceid) 11 ); Table created. SQL> CREATE INDEX services_1 ON services (triggerid); Index created. SQL> CREATE TABLE services_links ( 2 linkid number(20) NOT NULL, 3 serviceupid number(20) NOT NULL, 4 servicedownid number(20) NOT NULL, 5 soft number(10) DEFAULT '0' NOT NULL, 6 PRIMARY KEY (linkid) 7 ); Table created. SQL> CREATE INDEX services_links_1 ON services_links (servicedownid); Index created. SQL> CREATE UNIQUE INDEX services_links_2 ON services_links (serviceupid,servicedownid); Index created. SQL> CREATE TABLE services_times ( 2 timeid number(20) NOT NULL, 3 serviceid number(20) NOT NULL, 4 type number(10) DEFAULT '0' NOT NULL, 5 ts_from number(10) DEFAULT '0' NOT NULL, 6 ts_to number(10) DEFAULT '0' NOT NULL, 7 note nvarchar2(255) DEFAULT '' , 8 PRIMARY KEY (timeid) 9 ); Table created. SQL> CREATE INDEX services_times_1 ON services_times (serviceid,type,ts_from,ts_to); Index created. SQL> CREATE TABLE icon_map ( 2 iconmapid number(20) NOT NULL, 3 name nvarchar2(64) DEFAULT '' , 4 default_iconid number(20) NOT NULL, 5 PRIMARY KEY (iconmapid) 6 ); Table created. SQL> CREATE UNIQUE INDEX icon_map_1 ON icon_map (name); Index created. SQL> CREATE INDEX icon_map_2 ON icon_map (default_iconid); Index created. SQL> CREATE TABLE icon_mapping ( 2 iconmappingid number(20) NOT NULL, 3 iconmapid number(20) NOT NULL, 4 iconid number(20) NOT NULL, 5 inventory_link number(10) DEFAULT '0' NOT NULL, 6 expression nvarchar2(64) DEFAULT '' , 7 sortorder number(10) DEFAULT '0' NOT NULL, 8 PRIMARY KEY (iconmappingid) 9 ); Table created. SQL> CREATE INDEX icon_mapping_1 ON icon_mapping (iconmapid); Index created. SQL> CREATE INDEX icon_mapping_2 ON icon_mapping (iconid); Index created. SQL> CREATE TABLE sysmaps ( 2 sysmapid number(20) NOT NULL, 3 name nvarchar2(128) DEFAULT '' , 4 width number(10) DEFAULT '600' NOT NULL, 5 height number(10) DEFAULT '400' NOT NULL, 6 backgroundid number(20) NULL, 7 label_type number(10) DEFAULT '2' NOT NULL, 8 label_location number(10) DEFAULT '0' NOT NULL, 9 highlight number(10) DEFAULT '1' NOT NULL, 10 expandproblem number(10) DEFAULT '1' NOT NULL, 11 markelements number(10) DEFAULT '0' NOT NULL, 12 show_unack number(10) DEFAULT '0' NOT NULL, 13 grid_size number(10) DEFAULT '50' NOT NULL, 14 grid_show number(10) DEFAULT '1' NOT NULL, 15 grid_align number(10) DEFAULT '1' NOT NULL, 16 label_format number(10) DEFAULT '0' NOT NULL, 17 label_type_host number(10) DEFAULT '2' NOT NULL, 18 label_type_hostgroup number(10) DEFAULT '2' NOT NULL, 19 label_type_trigger number(10) DEFAULT '2' NOT NULL, 20 label_type_map number(10) DEFAULT '2' NOT NULL, 21 label_type_image number(10) DEFAULT '2' NOT NULL, 22 label_string_host nvarchar2(255) DEFAULT '' , 23 label_string_hostgroup nvarchar2(255) DEFAULT '' , 24 label_string_trigger nvarchar2(255) DEFAULT '' , 25 label_string_map nvarchar2(255) DEFAULT '' , 26 label_string_image nvarchar2(255) DEFAULT '' , 27 iconmapid number(20) NULL, 28 expand_macros number(10) DEFAULT '0' NOT NULL, 29 severity_min number(10) DEFAULT '0' NOT NULL, 30 userid number(20) NOT NULL, 31 private number(10) DEFAULT '1' NOT NULL, 32 show_suppressed number(10) DEFAULT '0' NOT NULL, 33 PRIMARY KEY (sysmapid) 34 ); Table created. SQL> CREATE UNIQUE INDEX sysmaps_1 ON sysmaps (name); Index created. SQL> CREATE INDEX sysmaps_2 ON sysmaps (backgroundid); Index created. SQL> CREATE INDEX sysmaps_3 ON sysmaps (iconmapid); Index created. SQL> CREATE TABLE sysmaps_elements ( 2 selementid number(20) NOT NULL, 3 sysmapid number(20) NOT NULL, 4 elementid number(20) DEFAULT '0' NOT NULL, 5 elementtype number(10) DEFAULT '0' NOT NULL, 6 iconid_off number(20) NULL, 7 iconid_on number(20) NULL, 8 label nvarchar2(2048) DEFAULT '' , 9 label_location number(10) DEFAULT '-1' NOT NULL, 10 x number(10) DEFAULT '0' NOT NULL, 11 y number(10) DEFAULT '0' NOT NULL, 12 iconid_disabled number(20) NULL, 13 iconid_maintenance number(20) NULL, 14 elementsubtype number(10) DEFAULT '0' NOT NULL, 15 areatype number(10) DEFAULT '0' NOT NULL, 16 width number(10) DEFAULT '200' NOT NULL, 17 height number(10) DEFAULT '200' NOT NULL, 18 viewtype number(10) DEFAULT '0' NOT NULL, 19 use_iconmap number(10) DEFAULT '1' NOT NULL, 20 evaltype number(10) DEFAULT '0' NOT NULL, 21 PRIMARY KEY (selementid) 22 ); Table created. SQL> CREATE INDEX sysmaps_elements_1 ON sysmaps_elements (sysmapid); Index created. SQL> CREATE INDEX sysmaps_elements_2 ON sysmaps_elements (iconid_off); Index created. SQL> CREATE INDEX sysmaps_elements_3 ON sysmaps_elements (iconid_on); Index created. SQL> CREATE INDEX sysmaps_elements_4 ON sysmaps_elements (iconid_disabled); Index created. SQL> CREATE INDEX sysmaps_elements_5 ON sysmaps_elements (iconid_maintenance); Index created. SQL> CREATE TABLE sysmaps_links ( 2 linkid number(20) NOT NULL, 3 sysmapid number(20) NOT NULL, 4 selementid1 number(20) NOT NULL, 5 selementid2 number(20) NOT NULL, 6 drawtype number(10) DEFAULT '0' NOT NULL, 7 color nvarchar2(6) DEFAULT '000000' , 8 label nvarchar2(2048) DEFAULT '' , 9 PRIMARY KEY (linkid) 10 ); Table created. SQL> CREATE INDEX sysmaps_links_1 ON sysmaps_links (sysmapid); Index created. SQL> CREATE INDEX sysmaps_links_2 ON sysmaps_links (selementid1); Index created. SQL> CREATE INDEX sysmaps_links_3 ON sysmaps_links (selementid2); Index created. SQL> CREATE TABLE sysmaps_link_triggers ( 2 linktriggerid number(20) NOT NULL, 3 linkid number(20) NOT NULL, 4 triggerid number(20) NOT NULL, 5 drawtype number(10) DEFAULT '0' NOT NULL, 6 color nvarchar2(6) DEFAULT '000000' , 7 PRIMARY KEY (linktriggerid) 8 ); Table created. SQL> CREATE UNIQUE INDEX sysmaps_link_triggers_1 ON sysmaps_link_triggers (linkid,triggerid); Index created. SQL> CREATE INDEX sysmaps_link_triggers_2 ON sysmaps_link_triggers (triggerid); Index created. SQL> CREATE TABLE sysmap_element_url ( 2 sysmapelementurlid number(20) NOT NULL, 3 selementid number(20) NOT NULL, 4 name nvarchar2(255) , 5 url nvarchar2(255) DEFAULT '' , 6 PRIMARY KEY (sysmapelementurlid) 7 ); Table created. SQL> CREATE UNIQUE INDEX sysmap_element_url_1 ON sysmap_element_url (selementid,name); Index created. SQL> CREATE TABLE sysmap_url ( 2 sysmapurlid number(20) NOT NULL, 3 sysmapid number(20) NOT NULL, 4 name nvarchar2(255) , 5 url nvarchar2(255) DEFAULT '' , 6 elementtype number(10) DEFAULT '0' NOT NULL, 7 PRIMARY KEY (sysmapurlid) 8 ); Table created. SQL> CREATE UNIQUE INDEX sysmap_url_1 ON sysmap_url (sysmapid,name); Index created. SQL> CREATE TABLE sysmap_user ( 2 sysmapuserid number(20) NOT NULL, 3 sysmapid number(20) NOT NULL, 4 userid number(20) NOT NULL, 5 permission number(10) DEFAULT '2' NOT NULL, 6 PRIMARY KEY (sysmapuserid) 7 ); Table created. SQL> CREATE UNIQUE INDEX sysmap_user_1 ON sysmap_user (sysmapid,userid); Index created. SQL> CREATE TABLE sysmap_usrgrp ( 2 sysmapusrgrpid number(20) NOT NULL, 3 sysmapid number(20) NOT NULL, 4 usrgrpid number(20) NOT NULL, 5 permission number(10) DEFAULT '2' NOT NULL, 6 PRIMARY KEY (sysmapusrgrpid) 7 ); Table created. SQL> CREATE UNIQUE INDEX sysmap_usrgrp_1 ON sysmap_usrgrp (sysmapid,usrgrpid); Index created. SQL> CREATE TABLE maintenances_hosts ( 2 maintenance_hostid number(20) NOT NULL, 3 maintenanceid number(20) NOT NULL, 4 hostid number(20) NOT NULL, 5 PRIMARY KEY (maintenance_hostid) 6 ); Table created. SQL> CREATE UNIQUE INDEX maintenances_hosts_1 ON maintenances_hosts (maintenanceid,hostid); Index created. SQL> CREATE INDEX maintenances_hosts_2 ON maintenances_hosts (hostid); Index created. SQL> CREATE TABLE maintenances_groups ( 2 maintenance_groupid number(20) NOT NULL, 3 maintenanceid number(20) NOT NULL, 4 groupid number(20) NOT NULL, 5 PRIMARY KEY (maintenance_groupid) 6 ); Table created. SQL> CREATE UNIQUE INDEX maintenances_groups_1 ON maintenances_groups (maintenanceid,groupid); Index created. SQL> CREATE INDEX maintenances_groups_2 ON maintenances_groups (groupid); Index created. SQL> CREATE TABLE timeperiods ( 2 timeperiodid number(20) NOT NULL, 3 timeperiod_type number(10) DEFAULT '0' NOT NULL, 4 every number(10) DEFAULT '1' NOT NULL, 5 month number(10) DEFAULT '0' NOT NULL, 6 dayofweek number(10) DEFAULT '0' NOT NULL, 7 day number(10) DEFAULT '0' NOT NULL, 8 start_time number(10) DEFAULT '0' NOT NULL, 9 period number(10) DEFAULT '0' NOT NULL, 10 start_date number(10) DEFAULT '0' NOT NULL, 11 PRIMARY KEY (timeperiodid) 12 ); Table created. SQL> CREATE TABLE maintenances_windows ( 2 maintenance_timeperiodid number(20) NOT NULL, 3 maintenanceid number(20) NOT NULL, 4 timeperiodid number(20) NOT NULL, 5 PRIMARY KEY (maintenance_timeperiodid) 6 ); Table created. SQL> CREATE UNIQUE INDEX maintenances_windows_1 ON maintenances_windows (maintenanceid,timeperiodid); Index created. SQL> CREATE INDEX maintenances_windows_2 ON maintenances_windows (timeperiodid); Index created. SQL> CREATE TABLE regexps ( 2 regexpid number(20) NOT NULL, 3 name nvarchar2(128) DEFAULT '' , 4 test_string nvarchar2(2048) DEFAULT '' , 5 PRIMARY KEY (regexpid) 6 ); Table created. SQL> CREATE UNIQUE INDEX regexps_1 ON regexps (name); Index created. SQL> CREATE TABLE expressions ( 2 expressionid number(20) NOT NULL, 3 regexpid number(20) NOT NULL, 4 expression nvarchar2(255) DEFAULT '' , 5 expression_type number(10) DEFAULT '0' NOT NULL, 6 exp_delimiter nvarchar2(1) DEFAULT '' , 7 case_sensitive number(10) DEFAULT '0' NOT NULL, 8 PRIMARY KEY (expressionid) 9 ); Table created. SQL> CREATE INDEX expressions_1 ON expressions (regexpid); Index created. SQL> CREATE TABLE ids ( 2 table_name nvarchar2(64) DEFAULT '' , 3 field_name nvarchar2(64) DEFAULT '' , 4 nextid number(20) NOT NULL, 5 PRIMARY KEY (table_name,field_name) 6 ); Table created. SQL> CREATE TABLE alerts ( 2 alertid number(20) NOT NULL, 3 actionid number(20) NOT NULL, 4 eventid number(20) NOT NULL, 5 userid number(20) NULL, 6 clock number(10) DEFAULT '0' NOT NULL, 7 mediatypeid number(20) NULL, 8 sendto nvarchar2(1024) DEFAULT '' , 9 subject nvarchar2(255) DEFAULT '' , 10 message nclob DEFAULT '' , 11 status number(10) DEFAULT '0' NOT NULL, 12 retries number(10) DEFAULT '0' NOT NULL, 13 error nvarchar2(2048) DEFAULT '' , 14 esc_step number(10) DEFAULT '0' NOT NULL, 15 alerttype number(10) DEFAULT '0' NOT NULL, 16 p_eventid number(20) NULL, 17 acknowledgeid number(20) NULL, 18 parameters nvarchar2(2048) DEFAULT '{}' , 19 PRIMARY KEY (alertid) 20 ); Table created. SQL> CREATE INDEX alerts_1 ON alerts (actionid); Index created. SQL> CREATE INDEX alerts_2 ON alerts (clock); Index created. SQL> CREATE INDEX alerts_3 ON alerts (eventid); Index created. SQL> CREATE INDEX alerts_4 ON alerts (status); Index created. SQL> CREATE INDEX alerts_5 ON alerts (mediatypeid); Index created. SQL> CREATE INDEX alerts_6 ON alerts (userid); Index created. SQL> CREATE INDEX alerts_7 ON alerts (p_eventid); Index created. SQL> CREATE TABLE history ( 2 itemid number(20) NOT NULL, 3 clock number(10) DEFAULT '0' NOT NULL, 4 value BINARY_DOUBLE DEFAULT '0.0000' NOT NULL, 5 ns number(10) DEFAULT '0' NOT NULL 6 ); Table created. SQL> CREATE INDEX history_1 ON history (itemid,clock); Index created. SQL> CREATE TABLE history_uint ( 2 itemid number(20) NOT NULL, 3 clock number(10) DEFAULT '0' NOT NULL, 4 value number(20) DEFAULT '0' NOT NULL, 5 ns number(10) DEFAULT '0' NOT NULL 6 ); Table created. SQL> CREATE INDEX history_uint_1 ON history_uint (itemid,clock); Index created. SQL> CREATE TABLE history_str ( 2 itemid number(20) NOT NULL, 3 clock number(10) DEFAULT '0' NOT NULL, 4 value nvarchar2(255) DEFAULT '' , 5 ns number(10) DEFAULT '0' NOT NULL 6 ); Table created. SQL> CREATE INDEX history_str_1 ON history_str (itemid,clock); Index created. SQL> CREATE TABLE history_log ( 2 itemid number(20) NOT NULL, 3 clock number(10) DEFAULT '0' NOT NULL, 4 timestamp number(10) DEFAULT '0' NOT NULL, 5 source nvarchar2(64) DEFAULT '' , 6 severity number(10) DEFAULT '0' NOT NULL, 7 value nclob DEFAULT '' , 8 logeventid number(10) DEFAULT '0' NOT NULL, 9 ns number(10) DEFAULT '0' NOT NULL 10 ); Table created. SQL> CREATE INDEX history_log_1 ON history_log (itemid,clock); Index created. SQL> CREATE TABLE history_text ( 2 itemid number(20) NOT NULL, 3 clock number(10) DEFAULT '0' NOT NULL, 4 value nclob DEFAULT '' , 5 ns number(10) DEFAULT '0' NOT NULL 6 ); Table created. SQL> CREATE INDEX history_text_1 ON history_text (itemid,clock); Index created. SQL> CREATE TABLE proxy_history ( 2 id number(20) NOT NULL, 3 itemid number(20) NOT NULL, 4 clock number(10) DEFAULT '0' NOT NULL, 5 timestamp number(10) DEFAULT '0' NOT NULL, 6 source nvarchar2(64) DEFAULT '' , 7 severity number(10) DEFAULT '0' NOT NULL, 8 value nclob DEFAULT '' , 9 logeventid number(10) DEFAULT '0' NOT NULL, 10 ns number(10) DEFAULT '0' NOT NULL, 11 state number(10) DEFAULT '0' NOT NULL, 12 lastlogsize number(20) DEFAULT '0' NOT NULL, 13 mtime number(10) DEFAULT '0' NOT NULL, 14 flags number(10) DEFAULT '0' NOT NULL, 15 write_clock number(10) DEFAULT '0' NOT NULL, 16 PRIMARY KEY (id) 17 ); Table created. SQL> CREATE INDEX proxy_history_1 ON proxy_history (clock); Index created. SQL> CREATE TABLE proxy_dhistory ( 2 id number(20) NOT NULL, 3 clock number(10) DEFAULT '0' NOT NULL, 4 druleid number(20) NOT NULL, 5 ip nvarchar2(39) DEFAULT '' , 6 port number(10) DEFAULT '0' NOT NULL, 7 value nvarchar2(255) DEFAULT '' , 8 status number(10) DEFAULT '0' NOT NULL, 9 dcheckid number(20) NULL, 10 dns nvarchar2(255) DEFAULT '' , 11 PRIMARY KEY (id) 12 ); Table created. SQL> CREATE INDEX proxy_dhistory_1 ON proxy_dhistory (clock); Index created. SQL> CREATE INDEX proxy_dhistory_2 ON proxy_dhistory (druleid); Index created. SQL> CREATE TABLE events ( 2 eventid number(20) NOT NULL, 3 source number(10) DEFAULT '0' NOT NULL, 4 object number(10) DEFAULT '0' NOT NULL, 5 objectid number(20) DEFAULT '0' NOT NULL, 6 clock number(10) DEFAULT '0' NOT NULL, 7 value number(10) DEFAULT '0' NOT NULL, 8 acknowledged number(10) DEFAULT '0' NOT NULL, 9 ns number(10) DEFAULT '0' NOT NULL, 10 name nvarchar2(2048) DEFAULT '' , 11 severity number(10) DEFAULT '0' NOT NULL, 12 PRIMARY KEY (eventid) 13 ); Table created. SQL> CREATE INDEX events_1 ON events (source,object,objectid,clock); Index created. SQL> CREATE INDEX events_2 ON events (source,object,clock); Index created. SQL> CREATE TABLE trends ( 2 itemid number(20) NOT NULL, 3 clock number(10) DEFAULT '0' NOT NULL, 4 num number(10) DEFAULT '0' NOT NULL, 5 value_min BINARY_DOUBLE DEFAULT '0.0000' NOT NULL, 6 value_avg BINARY_DOUBLE DEFAULT '0.0000' NOT NULL, 7 value_max BINARY_DOUBLE DEFAULT '0.0000' NOT NULL, 8 PRIMARY KEY (itemid,clock) 9 ); Table created. SQL> CREATE TABLE trends_uint ( 2 itemid number(20) NOT NULL, 3 clock number(10) DEFAULT '0' NOT NULL, 4 num number(10) DEFAULT '0' NOT NULL, 5 value_min number(20) DEFAULT '0' NOT NULL, 6 value_avg number(20) DEFAULT '0' NOT NULL, 7 value_max number(20) DEFAULT '0' NOT NULL, 8 PRIMARY KEY (itemid,clock) 9 ); Table created. SQL> CREATE TABLE acknowledges ( 2 acknowledgeid number(20) NOT NULL, 3 userid number(20) NOT NULL, 4 eventid number(20) NOT NULL, 5 clock number(10) DEFAULT '0' NOT NULL, 6 message nvarchar2(2048) DEFAULT '' , 7 action number(10) DEFAULT '0' NOT NULL, 8 old_severity number(10) DEFAULT '0' NOT NULL, 9 new_severity number(10) DEFAULT '0' NOT NULL, 10 PRIMARY KEY (acknowledgeid) 11 ); Table created. SQL> CREATE INDEX acknowledges_1 ON acknowledges (userid); Index created. SQL> CREATE INDEX acknowledges_2 ON acknowledges (eventid); Index created. SQL> CREATE INDEX acknowledges_3 ON acknowledges (clock); Index created. SQL> CREATE TABLE auditlog ( 2 auditid number(20) NOT NULL, 3 userid number(20) NOT NULL, 4 clock number(10) DEFAULT '0' NOT NULL, 5 action number(10) DEFAULT '0' NOT NULL, 6 resourcetype number(10) DEFAULT '0' NOT NULL, 7 note nvarchar2(128) DEFAULT '' , 8 ip nvarchar2(39) DEFAULT '' , 9 resourceid number(20) NULL, 10 resourcename nvarchar2(255) DEFAULT '' , 11 PRIMARY KEY (auditid) 12 ); Table created. SQL> CREATE INDEX auditlog_1 ON auditlog (userid,clock); Index created. SQL> CREATE INDEX auditlog_2 ON auditlog (clock); Index created. SQL> CREATE INDEX auditlog_3 ON auditlog (resourcetype,resourceid); Index created. SQL> CREATE TABLE auditlog_details ( 2 auditdetailid number(20) NOT NULL, 3 auditid number(20) NOT NULL, 4 table_name nvarchar2(64) DEFAULT '' , 5 field_name nvarchar2(64) DEFAULT '' , 6 oldvalue nclob DEFAULT '' , 7 newvalue nclob DEFAULT '' , 8 PRIMARY KEY (auditdetailid) 9 ); Table created. SQL> CREATE INDEX auditlog_details_1 ON auditlog_details (auditid); Index created. SQL> CREATE TABLE service_alarms ( 2 servicealarmid number(20) NOT NULL, 3 serviceid number(20) NOT NULL, 4 clock number(10) DEFAULT '0' NOT NULL, 5 value number(10) DEFAULT '0' NOT NULL, 6 PRIMARY KEY (servicealarmid) 7 ); Table created. SQL> CREATE INDEX service_alarms_1 ON service_alarms (serviceid,clock); Index created. SQL> CREATE INDEX service_alarms_2 ON service_alarms (clock); Index created. SQL> CREATE TABLE autoreg_host ( 2 autoreg_hostid number(20) NOT NULL, 3 proxy_hostid number(20) NULL, 4 host nvarchar2(128) DEFAULT '' , 5 listen_ip nvarchar2(39) DEFAULT '' , 6 listen_port number(10) DEFAULT '0' NOT NULL, 7 listen_dns nvarchar2(255) DEFAULT '' , 8 host_metadata nvarchar2(255) DEFAULT '' , 9 flags number(10) DEFAULT '0' NOT NULL, 10 tls_accepted number(10) DEFAULT '1' NOT NULL, 11 PRIMARY KEY (autoreg_hostid) 12 ); Table created. SQL> CREATE INDEX autoreg_host_1 ON autoreg_host (host); Index created. SQL> CREATE INDEX autoreg_host_2 ON autoreg_host (proxy_hostid); Index created. SQL> CREATE TABLE proxy_autoreg_host ( 2 id number(20) NOT NULL, 3 clock number(10) DEFAULT '0' NOT NULL, 4 host nvarchar2(128) DEFAULT '' , 5 listen_ip nvarchar2(39) DEFAULT '' , 6 listen_port number(10) DEFAULT '0' NOT NULL, 7 listen_dns nvarchar2(255) DEFAULT '' , 8 host_metadata nvarchar2(255) DEFAULT '' , 9 flags number(10) DEFAULT '0' NOT NULL, 10 tls_accepted number(10) DEFAULT '1' NOT NULL, 11 PRIMARY KEY (id) 12 ); Table created. SQL> CREATE INDEX proxy_autoreg_host_1 ON proxy_autoreg_host (clock); Index created. SQL> CREATE TABLE dhosts ( 2 dhostid number(20) NOT NULL, 3 druleid number(20) NOT NULL, 4 status number(10) DEFAULT '0' NOT NULL, 5 lastup number(10) DEFAULT '0' NOT NULL, 6 lastdown number(10) DEFAULT '0' NOT NULL, 7 PRIMARY KEY (dhostid) 8 ); Table created. SQL> CREATE INDEX dhosts_1 ON dhosts (druleid); Index created. SQL> CREATE TABLE dservices ( 2 dserviceid number(20) NOT NULL, 3 dhostid number(20) NOT NULL, 4 value nvarchar2(255) DEFAULT '' , 5 port number(10) DEFAULT '0' NOT NULL, 6 status number(10) DEFAULT '0' NOT NULL, 7 lastup number(10) DEFAULT '0' NOT NULL, 8 lastdown number(10) DEFAULT '0' NOT NULL, 9 dcheckid number(20) NOT NULL, 10 ip nvarchar2(39) DEFAULT '' , 11 dns nvarchar2(255) DEFAULT '' , 12 PRIMARY KEY (dserviceid) 13 ); Table created. SQL> CREATE UNIQUE INDEX dservices_1 ON dservices (dcheckid,ip,port); Index created. SQL> CREATE INDEX dservices_2 ON dservices (dhostid); Index created. SQL> CREATE TABLE escalations ( 2 escalationid number(20) NOT NULL, 3 actionid number(20) NOT NULL, 4 triggerid number(20) NULL, 5 eventid number(20) NULL, 6 r_eventid number(20) NULL, 7 nextcheck number(10) DEFAULT '0' NOT NULL, 8 esc_step number(10) DEFAULT '0' NOT NULL, 9 status number(10) DEFAULT '0' NOT NULL, 10 itemid number(20) NULL, 11 acknowledgeid number(20) NULL, 12 PRIMARY KEY (escalationid) 13 ); Table created. SQL> CREATE UNIQUE INDEX escalations_1 ON escalations (triggerid,itemid,escalationid); Index created. SQL> CREATE INDEX escalations_2 ON escalations (eventid); Index created. SQL> CREATE INDEX escalations_3 ON escalations (nextcheck); Index created. SQL> CREATE TABLE globalvars ( 2 globalvarid number(20) NOT NULL, 3 snmp_lastsize number(20) DEFAULT '0' NOT NULL, 4 PRIMARY KEY (globalvarid) 5 ); Table created. SQL> CREATE TABLE graph_discovery ( 2 graphid number(20) NOT NULL, 3 parent_graphid number(20) NOT NULL, 4 lastcheck number(10) DEFAULT '0' NOT NULL, 5 ts_delete number(10) DEFAULT '0' NOT NULL, 6 PRIMARY KEY (graphid) 7 ); Table created. SQL> CREATE INDEX graph_discovery_1 ON graph_discovery (parent_graphid); Index created. SQL> CREATE TABLE host_inventory ( 2 hostid number(20) NOT NULL, 3 inventory_mode number(10) DEFAULT '0' NOT NULL, 4 type nvarchar2(64) DEFAULT '' , 5 type_full nvarchar2(64) DEFAULT '' , 6 name nvarchar2(128) DEFAULT '' , 7 alias nvarchar2(128) DEFAULT '' , 8 os nvarchar2(128) DEFAULT '' , 9 os_full nvarchar2(255) DEFAULT '' , 10 os_short nvarchar2(128) DEFAULT '' , 11 serialno_a nvarchar2(64) DEFAULT '' , 12 serialno_b nvarchar2(64) DEFAULT '' , 13 tag nvarchar2(64) DEFAULT '' , 14 asset_tag nvarchar2(64) DEFAULT '' , 15 macaddress_a nvarchar2(64) DEFAULT '' , 16 macaddress_b nvarchar2(64) DEFAULT '' , 17 hardware nvarchar2(255) DEFAULT '' , 18 hardware_full nvarchar2(2048) DEFAULT '' , 19 software nvarchar2(255) DEFAULT '' , 20 software_full nvarchar2(2048) DEFAULT '' , 21 software_app_a nvarchar2(64) DEFAULT '' , 22 software_app_b nvarchar2(64) DEFAULT '' , 23 software_app_c nvarchar2(64) DEFAULT '' , 24 software_app_d nvarchar2(64) DEFAULT '' , 25 software_app_e nvarchar2(64) DEFAULT '' , 26 contact nvarchar2(2048) DEFAULT '' , 27 location nvarchar2(2048) DEFAULT '' , 28 location_lat nvarchar2(16) DEFAULT '' , 29 location_lon nvarchar2(16) DEFAULT '' , 30 notes nvarchar2(2048) DEFAULT '' , 31 chassis nvarchar2(64) DEFAULT '' , 32 model nvarchar2(64) DEFAULT '' , 33 hw_arch nvarchar2(32) DEFAULT '' , 34 vendor nvarchar2(64) DEFAULT '' , 35 contract_number nvarchar2(64) DEFAULT '' , 36 installer_name nvarchar2(64) DEFAULT '' , 37 deployment_status nvarchar2(64) DEFAULT '' , 38 url_a nvarchar2(255) DEFAULT '' , 39 url_b nvarchar2(255) DEFAULT '' , 40 url_c nvarchar2(255) DEFAULT '' , 41 host_networks nvarchar2(2048) DEFAULT '' , 42 host_netmask nvarchar2(39) DEFAULT '' , 43 host_router nvarchar2(39) DEFAULT '' , 44 oob_ip nvarchar2(39) DEFAULT '' , 45 oob_netmask nvarchar2(39) DEFAULT '' , 46 oob_router nvarchar2(39) DEFAULT '' , 47 date_hw_purchase nvarchar2(64) DEFAULT '' , 48 date_hw_install nvarchar2(64) DEFAULT '' , 49 date_hw_expiry nvarchar2(64) DEFAULT '' , 50 date_hw_decomm nvarchar2(64) DEFAULT '' , 51 site_address_a nvarchar2(128) DEFAULT '' , 52 site_address_b nvarchar2(128) DEFAULT '' , 53 site_address_c nvarchar2(128) DEFAULT '' , 54 site_city nvarchar2(128) DEFAULT '' , 55 site_state nvarchar2(64) DEFAULT '' , 56 site_country nvarchar2(64) DEFAULT '' , 57 site_zip nvarchar2(64) DEFAULT '' , 58 site_rack nvarchar2(128) DEFAULT '' , 59 site_notes nvarchar2(2048) DEFAULT '' , 60 poc_1_name nvarchar2(128) DEFAULT '' , 61 poc_1_email nvarchar2(128) DEFAULT '' , 62 poc_1_phone_a nvarchar2(64) DEFAULT '' , 63 poc_1_phone_b nvarchar2(64) DEFAULT '' , 64 poc_1_cell nvarchar2(64) DEFAULT '' , 65 poc_1_screen nvarchar2(64) DEFAULT '' , 66 poc_1_notes nvarchar2(2048) DEFAULT '' , 67 poc_2_name nvarchar2(128) DEFAULT '' , 68 poc_2_email nvarchar2(128) DEFAULT '' , 69 poc_2_phone_a nvarchar2(64) DEFAULT '' , 70 poc_2_phone_b nvarchar2(64) DEFAULT '' , 71 poc_2_cell nvarchar2(64) DEFAULT '' , 72 poc_2_screen nvarchar2(64) DEFAULT '' , 73 poc_2_notes nvarchar2(2048) DEFAULT '' , 74 PRIMARY KEY (hostid) 75 ); Table created. SQL> CREATE TABLE housekeeper ( 2 housekeeperid number(20) NOT NULL, 3 tablename nvarchar2(64) DEFAULT '' , 4 field nvarchar2(64) DEFAULT '' , 5 value number(20) NOT NULL, 6 PRIMARY KEY (housekeeperid) 7 ); Table created. SQL> CREATE TABLE images ( 2 imageid number(20) NOT NULL, 3 imagetype number(10) DEFAULT '0' NOT NULL, 4 name nvarchar2(64) DEFAULT '0' , 5 image blob DEFAULT '' NOT NULL, 6 PRIMARY KEY (imageid) 7 ); Table created. SQL> CREATE UNIQUE INDEX images_1 ON images (name); Index created. SQL> CREATE TABLE item_discovery ( 2 itemdiscoveryid number(20) NOT NULL, 3 itemid number(20) NOT NULL, 4 parent_itemid number(20) NOT NULL, 5 key_ nvarchar2(2048) DEFAULT '' , 6 lastcheck number(10) DEFAULT '0' NOT NULL, 7 ts_delete number(10) DEFAULT '0' NOT NULL, 8 PRIMARY KEY (itemdiscoveryid) 9 ); Table created. SQL> CREATE UNIQUE INDEX item_discovery_1 ON item_discovery (itemid,parent_itemid); Index created. SQL> CREATE INDEX item_discovery_2 ON item_discovery (parent_itemid); Index created. SQL> CREATE TABLE host_discovery ( 2 hostid number(20) NOT NULL, 3 parent_hostid number(20) NULL, 4 parent_itemid number(20) NULL, 5 host nvarchar2(128) DEFAULT '' , 6 lastcheck number(10) DEFAULT '0' NOT NULL, 7 ts_delete number(10) DEFAULT '0' NOT NULL, 8 PRIMARY KEY (hostid) 9 ); Table created. SQL> CREATE TABLE interface_discovery ( 2 interfaceid number(20) NOT NULL, 3 parent_interfaceid number(20) NOT NULL, 4 PRIMARY KEY (interfaceid) 5 ); Table created. SQL> CREATE TABLE profiles ( 2 profileid number(20) NOT NULL, 3 userid number(20) NOT NULL, 4 idx nvarchar2(96) DEFAULT '' , 5 idx2 number(20) DEFAULT '0' NOT NULL, 6 value_id number(20) DEFAULT '0' NOT NULL, 7 value_int number(10) DEFAULT '0' NOT NULL, 8 value_str nclob DEFAULT '' , 9 source nvarchar2(96) DEFAULT '' , 10 type number(10) DEFAULT '0' NOT NULL, 11 PRIMARY KEY (profileid) 12 ); Table created. SQL> CREATE INDEX profiles_1 ON profiles (userid,idx,idx2); Index created. SQL> CREATE INDEX profiles_2 ON profiles (userid,profileid); Index created. SQL> CREATE TABLE sessions ( 2 sessionid nvarchar2(32) DEFAULT '' , 3 userid number(20) NOT NULL, 4 lastaccess number(10) DEFAULT '0' NOT NULL, 5 status number(10) DEFAULT '0' NOT NULL, 6 PRIMARY KEY (sessionid) 7 ); Table created. SQL> CREATE INDEX sessions_1 ON sessions (userid,status,lastaccess); Index created. SQL> CREATE TABLE trigger_discovery ( 2 triggerid number(20) NOT NULL, 3 parent_triggerid number(20) NOT NULL, 4 lastcheck number(10) DEFAULT '0' NOT NULL, 5 ts_delete number(10) DEFAULT '0' NOT NULL, 6 PRIMARY KEY (triggerid) 7 ); Table created. SQL> CREATE INDEX trigger_discovery_1 ON trigger_discovery (parent_triggerid); Index created. SQL> CREATE TABLE item_condition ( 2 item_conditionid number(20) NOT NULL, 3 itemid number(20) NOT NULL, 4 operator number(10) DEFAULT '8' NOT NULL, 5 macro nvarchar2(64) DEFAULT '' , 6 value nvarchar2(255) DEFAULT '' , 7 PRIMARY KEY (item_conditionid) 8 ); Table created. SQL> CREATE INDEX item_condition_1 ON item_condition (itemid); Index created. SQL> CREATE TABLE item_rtdata ( 2 itemid number(20) NOT NULL, 3 lastlogsize number(20) DEFAULT '0' NOT NULL, 4 state number(10) DEFAULT '0' NOT NULL, 5 mtime number(10) DEFAULT '0' NOT NULL, 6 error nvarchar2(2048) DEFAULT '' , 7 PRIMARY KEY (itemid) 8 ); Table created. SQL> CREATE TABLE opinventory ( 2 operationid number(20) NOT NULL, 3 inventory_mode number(10) DEFAULT '0' NOT NULL, 4 PRIMARY KEY (operationid) 5 ); Table created. SQL> CREATE TABLE trigger_tag ( 2 triggertagid number(20) NOT NULL, 3 triggerid number(20) NOT NULL, 4 tag nvarchar2(255) DEFAULT '' , 5 value nvarchar2(255) DEFAULT '' , 6 PRIMARY KEY (triggertagid) 7 ); Table created. SQL> CREATE INDEX trigger_tag_1 ON trigger_tag (triggerid); Index created. SQL> CREATE TABLE event_tag ( 2 eventtagid number(20) NOT NULL, 3 eventid number(20) NOT NULL, 4 tag nvarchar2(255) DEFAULT '' , 5 value nvarchar2(255) DEFAULT '' , 6 PRIMARY KEY (eventtagid) 7 ); Table created. SQL> CREATE INDEX event_tag_1 ON event_tag (eventid); Index created. SQL> CREATE TABLE problem ( 2 eventid number(20) NOT NULL, 3 source number(10) DEFAULT '0' NOT NULL, 4 object number(10) DEFAULT '0' NOT NULL, 5 objectid number(20) DEFAULT '0' NOT NULL, 6 clock number(10) DEFAULT '0' NOT NULL, 7 ns number(10) DEFAULT '0' NOT NULL, 8 r_eventid number(20) NULL, 9 r_clock number(10) DEFAULT '0' NOT NULL, 10 r_ns number(10) DEFAULT '0' NOT NULL, 11 correlationid number(20) NULL, 12 userid number(20) NULL, 13 name nvarchar2(2048) DEFAULT '' , 14 acknowledged number(10) DEFAULT '0' NOT NULL, 15 severity number(10) DEFAULT '0' NOT NULL, 16 PRIMARY KEY (eventid) 17 ); Table created. SQL> CREATE INDEX problem_1 ON problem (source,object,objectid); Index created. SQL> CREATE INDEX problem_2 ON problem (r_clock); Index created. SQL> CREATE INDEX problem_3 ON problem (r_eventid); Index created. SQL> CREATE TABLE problem_tag ( 2 problemtagid number(20) NOT NULL, 3 eventid number(20) NOT NULL, 4 tag nvarchar2(255) DEFAULT '' , 5 value nvarchar2(255) DEFAULT '' , 6 PRIMARY KEY (problemtagid) 7 ); Table created. SQL> CREATE INDEX problem_tag_1 ON problem_tag (eventid,tag,value); Index created. SQL> CREATE TABLE tag_filter ( 2 tag_filterid number(20) NOT NULL, 3 usrgrpid number(20) NOT NULL, 4 groupid number(20) NOT NULL, 5 tag nvarchar2(255) DEFAULT '' , 6 value nvarchar2(255) DEFAULT '' , 7 PRIMARY KEY (tag_filterid) 8 ); Table created. SQL> CREATE TABLE event_recovery ( 2 eventid number(20) NOT NULL, 3 r_eventid number(20) NOT NULL, 4 c_eventid number(20) NULL, 5 correlationid number(20) NULL, 6 userid number(20) NULL, 7 PRIMARY KEY (eventid) 8 ); Table created. SQL> CREATE INDEX event_recovery_1 ON event_recovery (r_eventid); Index created. SQL> CREATE INDEX event_recovery_2 ON event_recovery (c_eventid); Index created. SQL> CREATE TABLE correlation ( 2 correlationid number(20) NOT NULL, 3 name nvarchar2(255) DEFAULT '' , 4 description nvarchar2(2048) DEFAULT '' , 5 evaltype number(10) DEFAULT '0' NOT NULL, 6 status number(10) DEFAULT '0' NOT NULL, 7 formula nvarchar2(255) DEFAULT '' , 8 PRIMARY KEY (correlationid) 9 ); Table created. SQL> CREATE INDEX correlation_1 ON correlation (status); Index created. SQL> CREATE UNIQUE INDEX correlation_2 ON correlation (name); Index created. SQL> CREATE TABLE corr_condition ( 2 corr_conditionid number(20) NOT NULL, 3 correlationid number(20) NOT NULL, 4 type number(10) DEFAULT '0' NOT NULL, 5 PRIMARY KEY (corr_conditionid) 6 ); Table created. SQL> CREATE INDEX corr_condition_1 ON corr_condition (correlationid); Index created. SQL> CREATE TABLE corr_condition_tag ( 2 corr_conditionid number(20) NOT NULL, 3 tag nvarchar2(255) DEFAULT '' , 4 PRIMARY KEY (corr_conditionid) 5 ); Table created. SQL> CREATE TABLE corr_condition_group ( 2 corr_conditionid number(20) NOT NULL, 3 operator number(10) DEFAULT '0' NOT NULL, 4 groupid number(20) NOT NULL, 5 PRIMARY KEY (corr_conditionid) 6 ); Table created. SQL> CREATE INDEX corr_condition_group_1 ON corr_condition_group (groupid); Index created. SQL> CREATE TABLE corr_condition_tagpair ( 2 corr_conditionid number(20) NOT NULL, 3 oldtag nvarchar2(255) DEFAULT '' , 4 newtag nvarchar2(255) DEFAULT '' , 5 PRIMARY KEY (corr_conditionid) 6 ); Table created. SQL> CREATE TABLE corr_condition_tagvalue ( 2 corr_conditionid number(20) NOT NULL, 3 tag nvarchar2(255) DEFAULT '' , 4 operator number(10) DEFAULT '0' NOT NULL, 5 value nvarchar2(255) DEFAULT '' , 6 PRIMARY KEY (corr_conditionid) 7 ); Table created. SQL> CREATE TABLE corr_operation ( 2 corr_operationid number(20) NOT NULL, 3 correlationid number(20) NOT NULL, 4 type number(10) DEFAULT '0' NOT NULL, 5 PRIMARY KEY (corr_operationid) 6 ); Table created. SQL> CREATE INDEX corr_operation_1 ON corr_operation (correlationid); Index created. SQL> CREATE TABLE task ( 2 taskid number(20) NOT NULL, 3 type number(10) NOT NULL, 4 status number(10) DEFAULT '0' NOT NULL, 5 clock number(10) DEFAULT '0' NOT NULL, 6 ttl number(10) DEFAULT '0' NOT NULL, 7 proxy_hostid number(20) NULL, 8 PRIMARY KEY (taskid) 9 ); Table created. SQL> CREATE INDEX task_1 ON task (status,proxy_hostid); Index created. SQL> CREATE TABLE task_close_problem ( 2 taskid number(20) NOT NULL, 3 acknowledgeid number(20) NOT NULL, 4 PRIMARY KEY (taskid) 5 ); Table created. SQL> CREATE TABLE item_preproc ( 2 item_preprocid number(20) NOT NULL, 3 itemid number(20) NOT NULL, 4 step number(10) DEFAULT '0' NOT NULL, 5 type number(10) DEFAULT '0' NOT NULL, 6 params nvarchar2(2048) DEFAULT '' , 7 error_handler number(10) DEFAULT '0' NOT NULL, 8 error_handler_params nvarchar2(255) DEFAULT '' , 9 PRIMARY KEY (item_preprocid) 10 ); Table created. SQL> CREATE INDEX item_preproc_1 ON item_preproc (itemid,step); Index created. SQL> CREATE TABLE task_remote_command ( 2 taskid number(20) NOT NULL, 3 command_type number(10) DEFAULT '0' NOT NULL, 4 execute_on number(10) DEFAULT '0' NOT NULL, 5 port number(10) DEFAULT '0' NOT NULL, 6 authtype number(10) DEFAULT '0' NOT NULL, 7 username nvarchar2(64) DEFAULT '' , 8 password nvarchar2(64) DEFAULT '' , 9 publickey nvarchar2(64) DEFAULT '' , 10 privatekey nvarchar2(64) DEFAULT '' , 11 command nclob DEFAULT '' , 12 alertid number(20) NULL, 13 parent_taskid number(20) NOT NULL, 14 hostid number(20) NOT NULL, 15 PRIMARY KEY (taskid) 16 ); Table created. SQL> CREATE TABLE task_remote_command_result ( 2 taskid number(20) NOT NULL, 3 status number(10) DEFAULT '0' NOT NULL, 4 parent_taskid number(20) NOT NULL, 5 info nvarchar2(2048) DEFAULT '' , 6 PRIMARY KEY (taskid) 7 ); Table created. SQL> CREATE TABLE task_data ( 2 taskid number(20) NOT NULL, 3 type number(10) DEFAULT '0' NOT NULL, 4 data nclob DEFAULT '' , 5 parent_taskid number(20) NOT NULL, 6 PRIMARY KEY (taskid) 7 ); Table created. SQL> CREATE TABLE task_result ( 2 taskid number(20) NOT NULL, 3 status number(10) DEFAULT '0' NOT NULL, 4 parent_taskid number(20) NOT NULL, 5 info nclob DEFAULT '' , 6 PRIMARY KEY (taskid) 7 ); Table created. SQL> CREATE INDEX task_result_1 ON task_result (parent_taskid); Index created. SQL> CREATE TABLE task_acknowledge ( 2 taskid number(20) NOT NULL, 3 acknowledgeid number(20) NOT NULL, 4 PRIMARY KEY (taskid) 5 ); Table created. SQL> CREATE TABLE sysmap_shape ( 2 sysmap_shapeid number(20) NOT NULL, 3 sysmapid number(20) NOT NULL, 4 type number(10) DEFAULT '0' NOT NULL, 5 x number(10) DEFAULT '0' NOT NULL, 6 y number(10) DEFAULT '0' NOT NULL, 7 width number(10) DEFAULT '200' NOT NULL, 8 height number(10) DEFAULT '200' NOT NULL, 9 text nvarchar2(2048) DEFAULT '' , 10 font number(10) DEFAULT '9' NOT NULL, 11 font_size number(10) DEFAULT '11' NOT NULL, 12 font_color nvarchar2(6) DEFAULT '000000' , 13 text_halign number(10) DEFAULT '0' NOT NULL, 14 text_valign number(10) DEFAULT '0' NOT NULL, 15 border_type number(10) DEFAULT '0' NOT NULL, 16 border_width number(10) DEFAULT '1' NOT NULL, 17 border_color nvarchar2(6) DEFAULT '000000' , 18 background_color nvarchar2(6) DEFAULT '' , 19 zindex number(10) DEFAULT '0' NOT NULL, 20 PRIMARY KEY (sysmap_shapeid) 21 ); Table created. SQL> CREATE INDEX sysmap_shape_1 ON sysmap_shape (sysmapid); Index created. SQL> CREATE TABLE sysmap_element_trigger ( 2 selement_triggerid number(20) NOT NULL, 3 selementid number(20) NOT NULL, 4 triggerid number(20) NOT NULL, 5 PRIMARY KEY (selement_triggerid) 6 ); Table created. SQL> CREATE UNIQUE INDEX sysmap_element_trigger_1 ON sysmap_element_trigger (selementid,triggerid); Index created. SQL> CREATE TABLE httptest_field ( 2 httptest_fieldid number(20) NOT NULL, 3 httptestid number(20) NOT NULL, 4 type number(10) DEFAULT '0' NOT NULL, 5 name nvarchar2(255) DEFAULT '' , 6 value nvarchar2(2048) DEFAULT '' , 7 PRIMARY KEY (httptest_fieldid) 8 ); Table created. SQL> CREATE INDEX httptest_field_1 ON httptest_field (httptestid); Index created. SQL> CREATE TABLE httpstep_field ( 2 httpstep_fieldid number(20) NOT NULL, 3 httpstepid number(20) NOT NULL, 4 type number(10) DEFAULT '0' NOT NULL, 5 name nvarchar2(255) DEFAULT '' , 6 value nvarchar2(2048) DEFAULT '' , 7 PRIMARY KEY (httpstep_fieldid) 8 ); Table created. SQL> CREATE INDEX httpstep_field_1 ON httpstep_field (httpstepid); Index created. SQL> CREATE TABLE dashboard ( 2 dashboardid number(20) NOT NULL, 3 name nvarchar2(255) , 4 userid number(20) NULL, 5 private number(10) DEFAULT '1' NOT NULL, 6 templateid number(20) NULL, 7 display_period number(10) DEFAULT '30' NOT NULL, 8 auto_start number(10) DEFAULT '1' NOT NULL, 9 uuid nvarchar2(32) DEFAULT '' , 10 PRIMARY KEY (dashboardid) 11 ); Table created. SQL> CREATE INDEX dashboard_1 ON dashboard (userid); Index created. SQL> CREATE INDEX dashboard_2 ON dashboard (templateid); Index created. SQL> CREATE TABLE dashboard_user ( 2 dashboard_userid number(20) NOT NULL, 3 dashboardid number(20) NOT NULL, 4 userid number(20) NOT NULL, 5 permission number(10) DEFAULT '2' NOT NULL, 6 PRIMARY KEY (dashboard_userid) 7 ); Table created. SQL> CREATE UNIQUE INDEX dashboard_user_1 ON dashboard_user (dashboardid,userid); Index created. SQL> CREATE TABLE dashboard_usrgrp ( 2 dashboard_usrgrpid number(20) NOT NULL, 3 dashboardid number(20) NOT NULL, 4 usrgrpid number(20) NOT NULL, 5 permission number(10) DEFAULT '2' NOT NULL, 6 PRIMARY KEY (dashboard_usrgrpid) 7 ); Table created. SQL> CREATE UNIQUE INDEX dashboard_usrgrp_1 ON dashboard_usrgrp (dashboardid,usrgrpid); Index created. SQL> CREATE TABLE dashboard_page ( 2 dashboard_pageid number(20) NOT NULL, 3 dashboardid number(20) NOT NULL, 4 name nvarchar2(255) DEFAULT '' , 5 display_period number(10) DEFAULT '0' NOT NULL, 6 sortorder number(10) DEFAULT '0' NOT NULL, 7 PRIMARY KEY (dashboard_pageid) 8 ); Table created. SQL> CREATE INDEX dashboard_page_1 ON dashboard_page (dashboardid); Index created. SQL> CREATE TABLE widget ( 2 widgetid number(20) NOT NULL, 3 type nvarchar2(255) DEFAULT '' , 4 name nvarchar2(255) DEFAULT '' , 5 x number(10) DEFAULT '0' NOT NULL, 6 y number(10) DEFAULT '0' NOT NULL, 7 width number(10) DEFAULT '1' NOT NULL, 8 height number(10) DEFAULT '2' NOT NULL, 9 view_mode number(10) DEFAULT '0' NOT NULL, 10 dashboard_pageid number(20) NOT NULL, 11 PRIMARY KEY (widgetid) 12 ); Table created. SQL> CREATE INDEX widget_1 ON widget (dashboard_pageid); Index created. SQL> CREATE TABLE widget_field ( 2 widget_fieldid number(20) NOT NULL, 3 widgetid number(20) NOT NULL, 4 type number(10) DEFAULT '0' NOT NULL, 5 name nvarchar2(255) DEFAULT '' , 6 value_int number(10) DEFAULT '0' NOT NULL, 7 value_str nvarchar2(255) DEFAULT '' , 8 value_groupid number(20) NULL, 9 value_hostid number(20) NULL, 10 value_itemid number(20) NULL, 11 value_graphid number(20) NULL, 12 value_sysmapid number(20) NULL, 13 PRIMARY KEY (widget_fieldid) 14 ); Table created. SQL> CREATE INDEX widget_field_1 ON widget_field (widgetid); Index created. SQL> CREATE INDEX widget_field_2 ON widget_field (value_groupid); Index created. SQL> CREATE INDEX widget_field_3 ON widget_field (value_hostid); Index created. SQL> CREATE INDEX widget_field_4 ON widget_field (value_itemid); Index created. SQL> CREATE INDEX widget_field_5 ON widget_field (value_graphid); Index created. SQL> CREATE INDEX widget_field_6 ON widget_field (value_sysmapid); Index created. SQL> CREATE TABLE task_check_now ( 2 taskid number(20) NOT NULL, 3 itemid number(20) NOT NULL, 4 PRIMARY KEY (taskid) 5 ); Table created. SQL> CREATE TABLE event_suppress ( 2 event_suppressid number(20) NOT NULL, 3 eventid number(20) NOT NULL, 4 maintenanceid number(20) NULL, 5 suppress_until number(10) DEFAULT '0' NOT NULL, 6 PRIMARY KEY (event_suppressid) 7 ); Table created. SQL> CREATE UNIQUE INDEX event_suppress_1 ON event_suppress (eventid,maintenanceid); Index created. SQL> CREATE INDEX event_suppress_2 ON event_suppress (suppress_until); Index created. SQL> CREATE INDEX event_suppress_3 ON event_suppress (maintenanceid); Index created. SQL> CREATE TABLE maintenance_tag ( 2 maintenancetagid number(20) NOT NULL, 3 maintenanceid number(20) NOT NULL, 4 tag nvarchar2(255) DEFAULT '' , 5 operator number(10) DEFAULT '2' NOT NULL, 6 value nvarchar2(255) DEFAULT '' , 7 PRIMARY KEY (maintenancetagid) 8 ); Table created. SQL> CREATE INDEX maintenance_tag_1 ON maintenance_tag (maintenanceid); Index created. SQL> CREATE TABLE lld_macro_path ( 2 lld_macro_pathid number(20) NOT NULL, 3 itemid number(20) NOT NULL, 4 lld_macro nvarchar2(255) DEFAULT '' , 5 path nvarchar2(255) DEFAULT '' , 6 PRIMARY KEY (lld_macro_pathid) 7 ); Table created. SQL> CREATE UNIQUE INDEX lld_macro_path_1 ON lld_macro_path (itemid,lld_macro); Index created. SQL> CREATE TABLE host_tag ( 2 hosttagid number(20) NOT NULL, 3 hostid number(20) NOT NULL, 4 tag nvarchar2(255) DEFAULT '' , 5 value nvarchar2(255) DEFAULT '' , 6 PRIMARY KEY (hosttagid) 7 ); Table created. SQL> CREATE INDEX host_tag_1 ON host_tag (hostid); Index created. SQL> CREATE TABLE config_autoreg_tls ( 2 autoreg_tlsid number(20) NOT NULL, 3 tls_psk_identity nvarchar2(128) DEFAULT '' , 4 tls_psk nvarchar2(512) DEFAULT '' , 5 PRIMARY KEY (autoreg_tlsid) 6 ); Table created. SQL> CREATE UNIQUE INDEX config_autoreg_tls_1 ON config_autoreg_tls (tls_psk_identity); Index created. SQL> CREATE TABLE module ( 2 moduleid number(20) NOT NULL, 3 id nvarchar2(255) DEFAULT '' , 4 relative_path nvarchar2(255) DEFAULT '' , 5 status number(10) DEFAULT '0' NOT NULL, 6 config nvarchar2(2048) DEFAULT '' , 7 PRIMARY KEY (moduleid) 8 ); Table created. SQL> CREATE TABLE interface_snmp ( 2 interfaceid number(20) NOT NULL, 3 version number(10) DEFAULT '2' NOT NULL, 4 bulk number(10) DEFAULT '1' NOT NULL, 5 community nvarchar2(64) DEFAULT '' , 6 securityname nvarchar2(64) DEFAULT '' , 7 securitylevel number(10) DEFAULT '0' NOT NULL, 8 authpassphrase nvarchar2(64) DEFAULT '' , 9 privpassphrase nvarchar2(64) DEFAULT '' , 10 authprotocol number(10) DEFAULT '0' NOT NULL, 11 privprotocol number(10) DEFAULT '0' NOT NULL, 12 contextname nvarchar2(255) DEFAULT '' , 13 PRIMARY KEY (interfaceid) 14 ); Table created. SQL> CREATE TABLE lld_override ( 2 lld_overrideid number(20) NOT NULL, 3 itemid number(20) NOT NULL, 4 name nvarchar2(255) DEFAULT '' , 5 step number(10) DEFAULT '0' NOT NULL, 6 evaltype number(10) DEFAULT '0' NOT NULL, 7 formula nvarchar2(255) DEFAULT '' , 8 stop number(10) DEFAULT '0' NOT NULL, 9 PRIMARY KEY (lld_overrideid) 10 ); Table created. SQL> CREATE UNIQUE INDEX lld_override_1 ON lld_override (itemid,name); Index created. SQL> CREATE TABLE lld_override_condition ( 2 lld_override_conditionid number(20) NOT NULL, 3 lld_overrideid number(20) NOT NULL, 4 operator number(10) DEFAULT '8' NOT NULL, 5 macro nvarchar2(64) DEFAULT '' , 6 value nvarchar2(255) DEFAULT '' , 7 PRIMARY KEY (lld_override_conditionid) 8 ); Table created. SQL> CREATE INDEX lld_override_condition_1 ON lld_override_condition (lld_overrideid); Index created. SQL> CREATE TABLE lld_override_operation ( 2 lld_override_operationid number(20) NOT NULL, 3 lld_overrideid number(20) NOT NULL, 4 operationobject number(10) DEFAULT '0' NOT NULL, 5 operator number(10) DEFAULT '0' NOT NULL, 6 value nvarchar2(255) DEFAULT '' , 7 PRIMARY KEY (lld_override_operationid) 8 ); Table created. SQL> CREATE INDEX lld_override_operation_1 ON lld_override_operation (lld_overrideid); Index created. SQL> CREATE TABLE lld_override_opstatus ( 2 lld_override_operationid number(20) NOT NULL, 3 status number(10) DEFAULT '0' NOT NULL, 4 PRIMARY KEY (lld_override_operationid) 5 ); Table created. SQL> CREATE TABLE lld_override_opdiscover ( 2 lld_override_operationid number(20) NOT NULL, 3 discover number(10) DEFAULT '0' NOT NULL, 4 PRIMARY KEY (lld_override_operationid) 5 ); Table created. SQL> CREATE TABLE lld_override_opperiod ( 2 lld_override_operationid number(20) NOT NULL, 3 delay nvarchar2(1024) DEFAULT '0' , 4 PRIMARY KEY (lld_override_operationid) 5 ); Table created. SQL> CREATE TABLE lld_override_ophistory ( 2 lld_override_operationid number(20) NOT NULL, 3 history nvarchar2(255) DEFAULT '90d' , 4 PRIMARY KEY (lld_override_operationid) 5 ); Table created. SQL> CREATE TABLE lld_override_optrends ( 2 lld_override_operationid number(20) NOT NULL, 3 trends nvarchar2(255) DEFAULT '365d' , 4 PRIMARY KEY (lld_override_operationid) 5 ); Table created. SQL> CREATE TABLE lld_override_opseverity ( 2 lld_override_operationid number(20) NOT NULL, 3 severity number(10) DEFAULT '0' NOT NULL, 4 PRIMARY KEY (lld_override_operationid) 5 ); Table created. SQL> CREATE TABLE lld_override_optag ( 2 lld_override_optagid number(20) NOT NULL, 3 lld_override_operationid number(20) NOT NULL, 4 tag nvarchar2(255) DEFAULT '' , 5 value nvarchar2(255) DEFAULT '' , 6 PRIMARY KEY (lld_override_optagid) 7 ); Table created. SQL> CREATE INDEX lld_override_optag_1 ON lld_override_optag (lld_override_operationid); Index created. SQL> CREATE TABLE lld_override_optemplate ( 2 lld_override_optemplateid number(20) NOT NULL, 3 lld_override_operationid number(20) NOT NULL, 4 templateid number(20) NOT NULL, 5 PRIMARY KEY (lld_override_optemplateid) 6 ); Table created. SQL> CREATE UNIQUE INDEX lld_override_optemplate_1 ON lld_override_optemplate (lld_override_operationid,templateid); Index created. SQL> CREATE INDEX lld_override_optemplate_2 ON lld_override_optemplate (templateid); Index created. SQL> CREATE TABLE lld_override_opinventory ( 2 lld_override_operationid number(20) NOT NULL, 3 inventory_mode number(10) DEFAULT '0' NOT NULL, 4 PRIMARY KEY (lld_override_operationid) 5 ); Table created. SQL> CREATE TABLE trigger_queue ( 2 trigger_queueid number(20) NOT NULL, 3 objectid number(20) NOT NULL, 4 type number(10) DEFAULT '0' NOT NULL, 5 clock number(10) DEFAULT '0' NOT NULL, 6 ns number(10) DEFAULT '0' NOT NULL, 7 PRIMARY KEY (trigger_queueid) 8 ); Table created. SQL> CREATE TABLE item_parameter ( 2 item_parameterid number(20) NOT NULL, 3 itemid number(20) NOT NULL, 4 name nvarchar2(255) DEFAULT '' , 5 value nvarchar2(2048) DEFAULT '' , 6 PRIMARY KEY (item_parameterid) 7 ); Table created. SQL> CREATE INDEX item_parameter_1 ON item_parameter (itemid); Index created. SQL> CREATE TABLE role_rule ( 2 role_ruleid number(20) NOT NULL, 3 roleid number(20) NOT NULL, 4 type number(10) DEFAULT '0' NOT NULL, 5 name nvarchar2(255) DEFAULT '' , 6 value_int number(10) DEFAULT '0' NOT NULL, 7 value_str nvarchar2(255) DEFAULT '' , 8 value_moduleid number(20) NULL, 9 PRIMARY KEY (role_ruleid) 10 ); Table created. SQL> CREATE INDEX role_rule_1 ON role_rule (roleid); Index created. SQL> CREATE INDEX role_rule_2 ON role_rule (value_moduleid); Index created. SQL> CREATE TABLE token ( 2 tokenid number(20) NOT NULL, 3 name nvarchar2(64) DEFAULT '' , 4 description nvarchar2(2048) DEFAULT '' , 5 userid number(20) NOT NULL, 6 token nvarchar2(128) , 7 lastaccess number(10) DEFAULT '0' NOT NULL, 8 status number(10) DEFAULT '0' NOT NULL, 9 expires_at number(10) DEFAULT '0' NOT NULL, 10 created_at number(10) DEFAULT '0' NOT NULL, 11 creator_userid number(20) NULL, 12 PRIMARY KEY (tokenid) 13 ); Table created. SQL> CREATE INDEX token_1 ON token (name); Index created. SQL> CREATE UNIQUE INDEX token_2 ON token (userid,name); Index created. SQL> CREATE UNIQUE INDEX token_3 ON token (token); Index created. SQL> CREATE INDEX token_4 ON token (creator_userid); Index created. SQL> CREATE TABLE item_tag ( 2 itemtagid number(20) NOT NULL, 3 itemid number(20) NOT NULL, 4 tag nvarchar2(255) DEFAULT '' , 5 value nvarchar2(255) DEFAULT '' , 6 PRIMARY KEY (itemtagid) 7 ); Table created. SQL> CREATE INDEX item_tag_1 ON item_tag (itemid); Index created. SQL> CREATE TABLE httptest_tag ( 2 httptesttagid number(20) NOT NULL, 3 httptestid number(20) NOT NULL, 4 tag nvarchar2(255) DEFAULT '' , 5 value nvarchar2(255) DEFAULT '' , 6 PRIMARY KEY (httptesttagid) 7 ); Table created. SQL> CREATE INDEX httptest_tag_1 ON httptest_tag (httptestid); Index created. SQL> CREATE TABLE sysmaps_element_tag ( 2 selementtagid number(20) NOT NULL, 3 selementid number(20) NOT NULL, 4 tag nvarchar2(255) DEFAULT '' , 5 value nvarchar2(255) DEFAULT '' , 6 operator number(10) DEFAULT '0' NOT NULL, 7 PRIMARY KEY (selementtagid) 8 ); Table created. SQL> CREATE INDEX sysmaps_element_tag_1 ON sysmaps_element_tag (selementid); Index created. SQL> CREATE TABLE report ( 2 reportid number(20) NOT NULL, 3 userid number(20) NOT NULL, 4 name nvarchar2(255) DEFAULT '' , 5 description nvarchar2(2048) DEFAULT '' , 6 status number(10) DEFAULT '0' NOT NULL, 7 dashboardid number(20) NOT NULL, 8 period number(10) DEFAULT '0' NOT NULL, 9 cycle number(10) DEFAULT '0' NOT NULL, 10 weekdays number(10) DEFAULT '0' NOT NULL, 11 start_time number(10) DEFAULT '0' NOT NULL, 12 active_since number(10) DEFAULT '0' NOT NULL, 13 active_till number(10) DEFAULT '0' NOT NULL, 14 state number(10) DEFAULT '0' NOT NULL, 15 lastsent number(10) DEFAULT '0' NOT NULL, 16 info nvarchar2(2048) DEFAULT '' , 17 PRIMARY KEY (reportid) 18 ); Table created. SQL> CREATE UNIQUE INDEX report_1 ON report (name); Index created. SQL> CREATE TABLE report_param ( 2 reportparamid number(20) NOT NULL, 3 reportid number(20) NOT NULL, 4 name nvarchar2(255) DEFAULT '' , 5 value nvarchar2(2048) DEFAULT '' , 6 PRIMARY KEY (reportparamid) 7 ); Table created. SQL> CREATE INDEX report_param_1 ON report_param (reportid); Index created. SQL> CREATE TABLE report_user ( 2 reportuserid number(20) NOT NULL, 3 reportid number(20) NOT NULL, 4 userid number(20) NOT NULL, 5 exclude number(10) DEFAULT '0' NOT NULL, 6 access_userid number(20) NULL, 7 PRIMARY KEY (reportuserid) 8 ); Table created. SQL> CREATE INDEX report_user_1 ON report_user (reportid); Index created. SQL> CREATE TABLE report_usrgrp ( 2 reportusrgrpid number(20) NOT NULL, 3 reportid number(20) NOT NULL, 4 usrgrpid number(20) NOT NULL, 5 access_userid number(20) NULL, 6 PRIMARY KEY (reportusrgrpid) 7 ); Table created. SQL> CREATE INDEX report_usrgrp_1 ON report_usrgrp (reportid); Index created. SQL> CREATE TABLE dbversion ( 2 mandatory number(10) DEFAULT '0' NOT NULL, 3 optional number(10) DEFAULT '0' NOT NULL 4 ); Table created. SQL> INSERT INTO dbversion VALUES ('5040000','5040000'); 1 row created. SQL> CREATE SEQUENCE proxy_history_seq 2 START WITH 1 3 INCREMENT BY 1 4 NOMAXVALUE 5 / Sequence created. SQL> CREATE TRIGGER proxy_history_tr 2 BEFORE INSERT ON proxy_history 3 FOR EACH ROW 4 BEGIN 5 SELECT proxy_history_seq.nextval INTO :new.id FROM dual; 6 END; 7 / Trigger created. SQL> CREATE SEQUENCE proxy_dhistory_seq 2 START WITH 1 3 INCREMENT BY 1 4 NOMAXVALUE 5 / Sequence created. SQL> CREATE TRIGGER proxy_dhistory_tr 2 BEFORE INSERT ON proxy_dhistory 3 FOR EACH ROW 4 BEGIN 5 SELECT proxy_dhistory_seq.nextval INTO :new.id FROM dual; 6 END; 7 / Trigger created. SQL> CREATE SEQUENCE proxy_autoreg_host_seq 2 START WITH 1 3 INCREMENT BY 1 4 NOMAXVALUE 5 / Sequence created. SQL> CREATE TRIGGER proxy_autoreg_host_tr 2 BEFORE INSERT ON proxy_autoreg_host 3 FOR EACH ROW 4 BEGIN 5 SELECT proxy_autoreg_host_seq.nextval INTO :new.id FROM dual; 6 END; 7 / Trigger created. SQL> ALTER TABLE users ADD CONSTRAINT c_users_1 FOREIGN KEY (roleid) REFERENCES role (roleid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE hosts ADD CONSTRAINT c_hosts_1 FOREIGN KEY (proxy_hostid) REFERENCES hosts (hostid); Table altered. SQL> ALTER TABLE hosts ADD CONSTRAINT c_hosts_2 FOREIGN KEY (maintenanceid) REFERENCES maintenances (maintenanceid); Table altered. SQL> ALTER TABLE hosts ADD CONSTRAINT c_hosts_3 FOREIGN KEY (templateid) REFERENCES hosts (hostid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE group_prototype ADD CONSTRAINT c_group_prototype_1 FOREIGN KEY (hostid) REFERENCES hosts (hostid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE group_prototype ADD CONSTRAINT c_group_prototype_2 FOREIGN KEY (groupid) REFERENCES hstgrp (groupid); Table altered. SQL> ALTER TABLE group_prototype ADD CONSTRAINT c_group_prototype_3 FOREIGN KEY (templateid) REFERENCES group_prototype (group_prototypeid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE group_discovery ADD CONSTRAINT c_group_discovery_1 FOREIGN KEY (groupid) REFERENCES hstgrp (groupid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE group_discovery ADD CONSTRAINT c_group_discovery_2 FOREIGN KEY (parent_group_prototypeid) REFERENCES group_prototype (group_prototypeid); Table altered. SQL> ALTER TABLE drules ADD CONSTRAINT c_drules_1 FOREIGN KEY (proxy_hostid) REFERENCES hosts (hostid); Table altered. SQL> ALTER TABLE dchecks ADD CONSTRAINT c_dchecks_1 FOREIGN KEY (druleid) REFERENCES drules (druleid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE httptest ADD CONSTRAINT c_httptest_2 FOREIGN KEY (hostid) REFERENCES hosts (hostid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE httptest ADD CONSTRAINT c_httptest_3 FOREIGN KEY (templateid) REFERENCES httptest (httptestid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE httpstep ADD CONSTRAINT c_httpstep_1 FOREIGN KEY (httptestid) REFERENCES httptest (httptestid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE interface ADD CONSTRAINT c_interface_1 FOREIGN KEY (hostid) REFERENCES hosts (hostid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE valuemap ADD CONSTRAINT c_valuemap_1 FOREIGN KEY (hostid) REFERENCES hosts (hostid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE items ADD CONSTRAINT c_items_1 FOREIGN KEY (hostid) REFERENCES hosts (hostid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE items ADD CONSTRAINT c_items_2 FOREIGN KEY (templateid) REFERENCES items (itemid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE items ADD CONSTRAINT c_items_3 FOREIGN KEY (valuemapid) REFERENCES valuemap (valuemapid); Table altered. SQL> ALTER TABLE items ADD CONSTRAINT c_items_4 FOREIGN KEY (interfaceid) REFERENCES interface (interfaceid); Table altered. SQL> ALTER TABLE items ADD CONSTRAINT c_items_5 FOREIGN KEY (master_itemid) REFERENCES items (itemid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE httpstepitem ADD CONSTRAINT c_httpstepitem_1 FOREIGN KEY (httpstepid) REFERENCES httpstep (httpstepid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE httpstepitem ADD CONSTRAINT c_httpstepitem_2 FOREIGN KEY (itemid) REFERENCES items (itemid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE httptestitem ADD CONSTRAINT c_httptestitem_1 FOREIGN KEY (httptestid) REFERENCES httptest (httptestid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE httptestitem ADD CONSTRAINT c_httptestitem_2 FOREIGN KEY (itemid) REFERENCES items (itemid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE media_type_param ADD CONSTRAINT c_media_type_param_1 FOREIGN KEY (mediatypeid) REFERENCES media_type (mediatypeid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE media_type_message ADD CONSTRAINT c_media_type_message_1 FOREIGN KEY (mediatypeid) REFERENCES media_type (mediatypeid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE users_groups ADD CONSTRAINT c_users_groups_1 FOREIGN KEY (usrgrpid) REFERENCES usrgrp (usrgrpid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE users_groups ADD CONSTRAINT c_users_groups_2 FOREIGN KEY (userid) REFERENCES users (userid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE scripts ADD CONSTRAINT c_scripts_1 FOREIGN KEY (usrgrpid) REFERENCES usrgrp (usrgrpid); Table altered. SQL> ALTER TABLE scripts ADD CONSTRAINT c_scripts_2 FOREIGN KEY (groupid) REFERENCES hstgrp (groupid); Table altered. SQL> ALTER TABLE script_param ADD CONSTRAINT c_script_param_1 FOREIGN KEY (scriptid) REFERENCES scripts (scriptid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE operations ADD CONSTRAINT c_operations_1 FOREIGN KEY (actionid) REFERENCES actions (actionid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE opmessage ADD CONSTRAINT c_opmessage_1 FOREIGN KEY (operationid) REFERENCES operations (operationid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE opmessage ADD CONSTRAINT c_opmessage_2 FOREIGN KEY (mediatypeid) REFERENCES media_type (mediatypeid); Table altered. SQL> ALTER TABLE opmessage_grp ADD CONSTRAINT c_opmessage_grp_1 FOREIGN KEY (operationid) REFERENCES operations (operationid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE opmessage_grp ADD CONSTRAINT c_opmessage_grp_2 FOREIGN KEY (usrgrpid) REFERENCES usrgrp (usrgrpid); Table altered. SQL> ALTER TABLE opmessage_usr ADD CONSTRAINT c_opmessage_usr_1 FOREIGN KEY (operationid) REFERENCES operations (operationid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE opmessage_usr ADD CONSTRAINT c_opmessage_usr_2 FOREIGN KEY (userid) REFERENCES users (userid); Table altered. SQL> ALTER TABLE opcommand ADD CONSTRAINT c_opcommand_1 FOREIGN KEY (operationid) REFERENCES operations (operationid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE opcommand ADD CONSTRAINT c_opcommand_2 FOREIGN KEY (scriptid) REFERENCES scripts (scriptid); Table altered. SQL> ALTER TABLE opcommand_hst ADD CONSTRAINT c_opcommand_hst_1 FOREIGN KEY (operationid) REFERENCES operations (operationid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE opcommand_hst ADD CONSTRAINT c_opcommand_hst_2 FOREIGN KEY (hostid) REFERENCES hosts (hostid); Table altered. SQL> ALTER TABLE opcommand_grp ADD CONSTRAINT c_opcommand_grp_1 FOREIGN KEY (operationid) REFERENCES operations (operationid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE opcommand_grp ADD CONSTRAINT c_opcommand_grp_2 FOREIGN KEY (groupid) REFERENCES hstgrp (groupid); Table altered. SQL> ALTER TABLE opgroup ADD CONSTRAINT c_opgroup_1 FOREIGN KEY (operationid) REFERENCES operations (operationid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE opgroup ADD CONSTRAINT c_opgroup_2 FOREIGN KEY (groupid) REFERENCES hstgrp (groupid); Table altered. SQL> ALTER TABLE optemplate ADD CONSTRAINT c_optemplate_1 FOREIGN KEY (operationid) REFERENCES operations (operationid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE optemplate ADD CONSTRAINT c_optemplate_2 FOREIGN KEY (templateid) REFERENCES hosts (hostid); Table altered. SQL> ALTER TABLE opconditions ADD CONSTRAINT c_opconditions_1 FOREIGN KEY (operationid) REFERENCES operations (operationid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE conditions ADD CONSTRAINT c_conditions_1 FOREIGN KEY (actionid) REFERENCES actions (actionid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE config ADD CONSTRAINT c_config_1 FOREIGN KEY (alert_usrgrpid) REFERENCES usrgrp (usrgrpid); Table altered. SQL> ALTER TABLE config ADD CONSTRAINT c_config_2 FOREIGN KEY (discovery_groupid) REFERENCES hstgrp (groupid); Table altered. SQL> ALTER TABLE triggers ADD CONSTRAINT c_triggers_1 FOREIGN KEY (templateid) REFERENCES triggers (triggerid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE trigger_depends ADD CONSTRAINT c_trigger_depends_1 FOREIGN KEY (triggerid_down) REFERENCES triggers (triggerid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE trigger_depends ADD CONSTRAINT c_trigger_depends_2 FOREIGN KEY (triggerid_up) REFERENCES triggers (triggerid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE functions ADD CONSTRAINT c_functions_1 FOREIGN KEY (itemid) REFERENCES items (itemid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE functions ADD CONSTRAINT c_functions_2 FOREIGN KEY (triggerid) REFERENCES triggers (triggerid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE graphs ADD CONSTRAINT c_graphs_1 FOREIGN KEY (templateid) REFERENCES graphs (graphid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE graphs ADD CONSTRAINT c_graphs_2 FOREIGN KEY (ymin_itemid) REFERENCES items (itemid); Table altered. SQL> ALTER TABLE graphs ADD CONSTRAINT c_graphs_3 FOREIGN KEY (ymax_itemid) REFERENCES items (itemid); Table altered. SQL> ALTER TABLE graphs_items ADD CONSTRAINT c_graphs_items_1 FOREIGN KEY (graphid) REFERENCES graphs (graphid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE graphs_items ADD CONSTRAINT c_graphs_items_2 FOREIGN KEY (itemid) REFERENCES items (itemid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE hostmacro ADD CONSTRAINT c_hostmacro_1 FOREIGN KEY (hostid) REFERENCES hosts (hostid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE hosts_groups ADD CONSTRAINT c_hosts_groups_1 FOREIGN KEY (hostid) REFERENCES hosts (hostid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE hosts_groups ADD CONSTRAINT c_hosts_groups_2 FOREIGN KEY (groupid) REFERENCES hstgrp (groupid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE hosts_templates ADD CONSTRAINT c_hosts_templates_1 FOREIGN KEY (hostid) REFERENCES hosts (hostid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE hosts_templates ADD CONSTRAINT c_hosts_templates_2 FOREIGN KEY (templateid) REFERENCES hosts (hostid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE valuemap_mapping ADD CONSTRAINT c_valuemap_mapping_1 FOREIGN KEY (valuemapid) REFERENCES valuemap (valuemapid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE media ADD CONSTRAINT c_media_1 FOREIGN KEY (userid) REFERENCES users (userid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE media ADD CONSTRAINT c_media_2 FOREIGN KEY (mediatypeid) REFERENCES media_type (mediatypeid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE rights ADD CONSTRAINT c_rights_1 FOREIGN KEY (groupid) REFERENCES usrgrp (usrgrpid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE rights ADD CONSTRAINT c_rights_2 FOREIGN KEY (id) REFERENCES hstgrp (groupid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE services ADD CONSTRAINT c_services_1 FOREIGN KEY (triggerid) REFERENCES triggers (triggerid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE services_links ADD CONSTRAINT c_services_links_1 FOREIGN KEY (serviceupid) REFERENCES services (serviceid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE services_links ADD CONSTRAINT c_services_links_2 FOREIGN KEY (servicedownid) REFERENCES services (serviceid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE services_times ADD CONSTRAINT c_services_times_1 FOREIGN KEY (serviceid) REFERENCES services (serviceid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE icon_map ADD CONSTRAINT c_icon_map_1 FOREIGN KEY (default_iconid) REFERENCES images (imageid); Table altered. SQL> ALTER TABLE icon_mapping ADD CONSTRAINT c_icon_mapping_1 FOREIGN KEY (iconmapid) REFERENCES icon_map (iconmapid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE icon_mapping ADD CONSTRAINT c_icon_mapping_2 FOREIGN KEY (iconid) REFERENCES images (imageid); Table altered. SQL> ALTER TABLE sysmaps ADD CONSTRAINT c_sysmaps_1 FOREIGN KEY (backgroundid) REFERENCES images (imageid); Table altered. SQL> ALTER TABLE sysmaps ADD CONSTRAINT c_sysmaps_2 FOREIGN KEY (iconmapid) REFERENCES icon_map (iconmapid); Table altered. SQL> ALTER TABLE sysmaps ADD CONSTRAINT c_sysmaps_3 FOREIGN KEY (userid) REFERENCES users (userid); Table altered. SQL> ALTER TABLE sysmaps_elements ADD CONSTRAINT c_sysmaps_elements_1 FOREIGN KEY (sysmapid) REFERENCES sysmaps (sysmapid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE sysmaps_elements ADD CONSTRAINT c_sysmaps_elements_2 FOREIGN KEY (iconid_off) REFERENCES images (imageid); Table altered. SQL> ALTER TABLE sysmaps_elements ADD CONSTRAINT c_sysmaps_elements_3 FOREIGN KEY (iconid_on) REFERENCES images (imageid); Table altered. SQL> ALTER TABLE sysmaps_elements ADD CONSTRAINT c_sysmaps_elements_4 FOREIGN KEY (iconid_disabled) REFERENCES images (imageid); Table altered. SQL> ALTER TABLE sysmaps_elements ADD CONSTRAINT c_sysmaps_elements_5 FOREIGN KEY (iconid_maintenance) REFERENCES images (imageid); Table altered. SQL> ALTER TABLE sysmaps_links ADD CONSTRAINT c_sysmaps_links_1 FOREIGN KEY (sysmapid) REFERENCES sysmaps (sysmapid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE sysmaps_links ADD CONSTRAINT c_sysmaps_links_2 FOREIGN KEY (selementid1) REFERENCES sysmaps_elements (selementid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE sysmaps_links ADD CONSTRAINT c_sysmaps_links_3 FOREIGN KEY (selementid2) REFERENCES sysmaps_elements (selementid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE sysmaps_link_triggers ADD CONSTRAINT c_sysmaps_link_triggers_1 FOREIGN KEY (linkid) REFERENCES sysmaps_links (linkid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE sysmaps_link_triggers ADD CONSTRAINT c_sysmaps_link_triggers_2 FOREIGN KEY (triggerid) REFERENCES triggers (triggerid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE sysmap_element_url ADD CONSTRAINT c_sysmap_element_url_1 FOREIGN KEY (selementid) REFERENCES sysmaps_elements (selementid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE sysmap_url ADD CONSTRAINT c_sysmap_url_1 FOREIGN KEY (sysmapid) REFERENCES sysmaps (sysmapid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE sysmap_user ADD CONSTRAINT c_sysmap_user_1 FOREIGN KEY (sysmapid) REFERENCES sysmaps (sysmapid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE sysmap_user ADD CONSTRAINT c_sysmap_user_2 FOREIGN KEY (userid) REFERENCES users (userid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE sysmap_usrgrp ADD CONSTRAINT c_sysmap_usrgrp_1 FOREIGN KEY (sysmapid) REFERENCES sysmaps (sysmapid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE sysmap_usrgrp ADD CONSTRAINT c_sysmap_usrgrp_2 FOREIGN KEY (usrgrpid) REFERENCES usrgrp (usrgrpid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE maintenances_hosts ADD CONSTRAINT c_maintenances_hosts_1 FOREIGN KEY (maintenanceid) REFERENCES maintenances (maintenanceid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE maintenances_hosts ADD CONSTRAINT c_maintenances_hosts_2 FOREIGN KEY (hostid) REFERENCES hosts (hostid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE maintenances_groups ADD CONSTRAINT c_maintenances_groups_1 FOREIGN KEY (maintenanceid) REFERENCES maintenances (maintenanceid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE maintenances_groups ADD CONSTRAINT c_maintenances_groups_2 FOREIGN KEY (groupid) REFERENCES hstgrp (groupid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE maintenances_windows ADD CONSTRAINT c_maintenances_windows_1 FOREIGN KEY (maintenanceid) REFERENCES maintenances (maintenanceid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE maintenances_windows ADD CONSTRAINT c_maintenances_windows_2 FOREIGN KEY (timeperiodid) REFERENCES timeperiods (timeperiodid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE expressions ADD CONSTRAINT c_expressions_1 FOREIGN KEY (regexpid) REFERENCES regexps (regexpid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE alerts ADD CONSTRAINT c_alerts_1 FOREIGN KEY (actionid) REFERENCES actions (actionid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE alerts ADD CONSTRAINT c_alerts_2 FOREIGN KEY (eventid) REFERENCES events (eventid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE alerts ADD CONSTRAINT c_alerts_3 FOREIGN KEY (userid) REFERENCES users (userid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE alerts ADD CONSTRAINT c_alerts_4 FOREIGN KEY (mediatypeid) REFERENCES media_type (mediatypeid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE alerts ADD CONSTRAINT c_alerts_5 FOREIGN KEY (p_eventid) REFERENCES events (eventid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE alerts ADD CONSTRAINT c_alerts_6 FOREIGN KEY (acknowledgeid) REFERENCES acknowledges (acknowledgeid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE acknowledges ADD CONSTRAINT c_acknowledges_1 FOREIGN KEY (userid) REFERENCES users (userid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE acknowledges ADD CONSTRAINT c_acknowledges_2 FOREIGN KEY (eventid) REFERENCES events (eventid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE auditlog ADD CONSTRAINT c_auditlog_1 FOREIGN KEY (userid) REFERENCES users (userid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE auditlog_details ADD CONSTRAINT c_auditlog_details_1 FOREIGN KEY (auditid) REFERENCES auditlog (auditid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE service_alarms ADD CONSTRAINT c_service_alarms_1 FOREIGN KEY (serviceid) REFERENCES services (serviceid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE autoreg_host ADD CONSTRAINT c_autoreg_host_1 FOREIGN KEY (proxy_hostid) REFERENCES hosts (hostid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE dhosts ADD CONSTRAINT c_dhosts_1 FOREIGN KEY (druleid) REFERENCES drules (druleid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE dservices ADD CONSTRAINT c_dservices_1 FOREIGN KEY (dhostid) REFERENCES dhosts (dhostid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE dservices ADD CONSTRAINT c_dservices_2 FOREIGN KEY (dcheckid) REFERENCES dchecks (dcheckid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE graph_discovery ADD CONSTRAINT c_graph_discovery_1 FOREIGN KEY (graphid) REFERENCES graphs (graphid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE graph_discovery ADD CONSTRAINT c_graph_discovery_2 FOREIGN KEY (parent_graphid) REFERENCES graphs (graphid); Table altered. SQL> ALTER TABLE host_inventory ADD CONSTRAINT c_host_inventory_1 FOREIGN KEY (hostid) REFERENCES hosts (hostid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE item_discovery ADD CONSTRAINT c_item_discovery_1 FOREIGN KEY (itemid) REFERENCES items (itemid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE item_discovery ADD CONSTRAINT c_item_discovery_2 FOREIGN KEY (parent_itemid) REFERENCES items (itemid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE host_discovery ADD CONSTRAINT c_host_discovery_1 FOREIGN KEY (hostid) REFERENCES hosts (hostid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE host_discovery ADD CONSTRAINT c_host_discovery_2 FOREIGN KEY (parent_hostid) REFERENCES hosts (hostid); Table altered. SQL> ALTER TABLE host_discovery ADD CONSTRAINT c_host_discovery_3 FOREIGN KEY (parent_itemid) REFERENCES items (itemid); Table altered. SQL> ALTER TABLE interface_discovery ADD CONSTRAINT c_interface_discovery_1 FOREIGN KEY (interfaceid) REFERENCES interface (interfaceid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE interface_discovery ADD CONSTRAINT c_interface_discovery_2 FOREIGN KEY (parent_interfaceid) REFERENCES interface (interfaceid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE profiles ADD CONSTRAINT c_profiles_1 FOREIGN KEY (userid) REFERENCES users (userid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE sessions ADD CONSTRAINT c_sessions_1 FOREIGN KEY (userid) REFERENCES users (userid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE trigger_discovery ADD CONSTRAINT c_trigger_discovery_1 FOREIGN KEY (triggerid) REFERENCES triggers (triggerid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE trigger_discovery ADD CONSTRAINT c_trigger_discovery_2 FOREIGN KEY (parent_triggerid) REFERENCES triggers (triggerid); Table altered. SQL> ALTER TABLE item_condition ADD CONSTRAINT c_item_condition_1 FOREIGN KEY (itemid) REFERENCES items (itemid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE item_rtdata ADD CONSTRAINT c_item_rtdata_1 FOREIGN KEY (itemid) REFERENCES items (itemid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE opinventory ADD CONSTRAINT c_opinventory_1 FOREIGN KEY (operationid) REFERENCES operations (operationid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE trigger_tag ADD CONSTRAINT c_trigger_tag_1 FOREIGN KEY (triggerid) REFERENCES triggers (triggerid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE event_tag ADD CONSTRAINT c_event_tag_1 FOREIGN KEY (eventid) REFERENCES events (eventid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE problem ADD CONSTRAINT c_problem_1 FOREIGN KEY (eventid) REFERENCES events (eventid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE problem ADD CONSTRAINT c_problem_2 FOREIGN KEY (r_eventid) REFERENCES events (eventid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE problem_tag ADD CONSTRAINT c_problem_tag_1 FOREIGN KEY (eventid) REFERENCES problem (eventid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE tag_filter ADD CONSTRAINT c_tag_filter_1 FOREIGN KEY (usrgrpid) REFERENCES usrgrp (usrgrpid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE tag_filter ADD CONSTRAINT c_tag_filter_2 FOREIGN KEY (groupid) REFERENCES hstgrp (groupid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE event_recovery ADD CONSTRAINT c_event_recovery_1 FOREIGN KEY (eventid) REFERENCES events (eventid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE event_recovery ADD CONSTRAINT c_event_recovery_2 FOREIGN KEY (r_eventid) REFERENCES events (eventid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE event_recovery ADD CONSTRAINT c_event_recovery_3 FOREIGN KEY (c_eventid) REFERENCES events (eventid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE corr_condition ADD CONSTRAINT c_corr_condition_1 FOREIGN KEY (correlationid) REFERENCES correlation (correlationid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE corr_condition_tag ADD CONSTRAINT c_corr_condition_tag_1 FOREIGN KEY (corr_conditionid) REFERENCES corr_condition (corr_conditionid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE corr_condition_group ADD CONSTRAINT c_corr_condition_group_1 FOREIGN KEY (corr_conditionid) REFERENCES corr_condition (corr_conditionid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE corr_condition_group ADD CONSTRAINT c_corr_condition_group_2 FOREIGN KEY (groupid) REFERENCES hstgrp (groupid); Table altered. SQL> ALTER TABLE corr_condition_tagpair ADD CONSTRAINT c_corr_condition_tagpair_1 FOREIGN KEY (corr_conditionid) REFERENCES corr_condition (corr_conditionid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE corr_condition_tagvalue ADD CONSTRAINT c_corr_condition_tagvalue_1 FOREIGN KEY (corr_conditionid) REFERENCES corr_condition (corr_conditionid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE corr_operation ADD CONSTRAINT c_corr_operation_1 FOREIGN KEY (correlationid) REFERENCES correlation (correlationid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE task ADD CONSTRAINT c_task_1 FOREIGN KEY (proxy_hostid) REFERENCES hosts (hostid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE task_close_problem ADD CONSTRAINT c_task_close_problem_1 FOREIGN KEY (taskid) REFERENCES task (taskid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE item_preproc ADD CONSTRAINT c_item_preproc_1 FOREIGN KEY (itemid) REFERENCES items (itemid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE task_remote_command ADD CONSTRAINT c_task_remote_command_1 FOREIGN KEY (taskid) REFERENCES task (taskid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE task_remote_command_result ADD CONSTRAINT c_task_remote_command_result_1 FOREIGN KEY (taskid) REFERENCES task (taskid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE task_data ADD CONSTRAINT c_task_data_1 FOREIGN KEY (taskid) REFERENCES task (taskid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE task_result ADD CONSTRAINT c_task_result_1 FOREIGN KEY (taskid) REFERENCES task (taskid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE task_acknowledge ADD CONSTRAINT c_task_acknowledge_1 FOREIGN KEY (taskid) REFERENCES task (taskid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE sysmap_shape ADD CONSTRAINT c_sysmap_shape_1 FOREIGN KEY (sysmapid) REFERENCES sysmaps (sysmapid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE sysmap_element_trigger ADD CONSTRAINT c_sysmap_element_trigger_1 FOREIGN KEY (selementid) REFERENCES sysmaps_elements (selementid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE sysmap_element_trigger ADD CONSTRAINT c_sysmap_element_trigger_2 FOREIGN KEY (triggerid) REFERENCES triggers (triggerid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE httptest_field ADD CONSTRAINT c_httptest_field_1 FOREIGN KEY (httptestid) REFERENCES httptest (httptestid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE httpstep_field ADD CONSTRAINT c_httpstep_field_1 FOREIGN KEY (httpstepid) REFERENCES httpstep (httpstepid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE dashboard ADD CONSTRAINT c_dashboard_1 FOREIGN KEY (userid) REFERENCES users (userid); Table altered. SQL> ALTER TABLE dashboard ADD CONSTRAINT c_dashboard_2 FOREIGN KEY (templateid) REFERENCES hosts (hostid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE dashboard_user ADD CONSTRAINT c_dashboard_user_1 FOREIGN KEY (dashboardid) REFERENCES dashboard (dashboardid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE dashboard_user ADD CONSTRAINT c_dashboard_user_2 FOREIGN KEY (userid) REFERENCES users (userid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE dashboard_usrgrp ADD CONSTRAINT c_dashboard_usrgrp_1 FOREIGN KEY (dashboardid) REFERENCES dashboard (dashboardid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE dashboard_usrgrp ADD CONSTRAINT c_dashboard_usrgrp_2 FOREIGN KEY (usrgrpid) REFERENCES usrgrp (usrgrpid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE dashboard_page ADD CONSTRAINT c_dashboard_page_1 FOREIGN KEY (dashboardid) REFERENCES dashboard (dashboardid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE widget ADD CONSTRAINT c_widget_1 FOREIGN KEY (dashboard_pageid) REFERENCES dashboard_page (dashboard_pageid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE widget_field ADD CONSTRAINT c_widget_field_1 FOREIGN KEY (widgetid) REFERENCES widget (widgetid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE widget_field ADD CONSTRAINT c_widget_field_2 FOREIGN KEY (value_groupid) REFERENCES hstgrp (groupid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE widget_field ADD CONSTRAINT c_widget_field_3 FOREIGN KEY (value_hostid) REFERENCES hosts (hostid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE widget_field ADD CONSTRAINT c_widget_field_4 FOREIGN KEY (value_itemid) REFERENCES items (itemid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE widget_field ADD CONSTRAINT c_widget_field_5 FOREIGN KEY (value_graphid) REFERENCES graphs (graphid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE widget_field ADD CONSTRAINT c_widget_field_6 FOREIGN KEY (value_sysmapid) REFERENCES sysmaps (sysmapid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE task_check_now ADD CONSTRAINT c_task_check_now_1 FOREIGN KEY (taskid) REFERENCES task (taskid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE event_suppress ADD CONSTRAINT c_event_suppress_1 FOREIGN KEY (eventid) REFERENCES events (eventid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE event_suppress ADD CONSTRAINT c_event_suppress_2 FOREIGN KEY (maintenanceid) REFERENCES maintenances (maintenanceid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE maintenance_tag ADD CONSTRAINT c_maintenance_tag_1 FOREIGN KEY (maintenanceid) REFERENCES maintenances (maintenanceid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE lld_macro_path ADD CONSTRAINT c_lld_macro_path_1 FOREIGN KEY (itemid) REFERENCES items (itemid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE host_tag ADD CONSTRAINT c_host_tag_1 FOREIGN KEY (hostid) REFERENCES hosts (hostid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE interface_snmp ADD CONSTRAINT c_interface_snmp_1 FOREIGN KEY (interfaceid) REFERENCES interface (interfaceid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE lld_override ADD CONSTRAINT c_lld_override_1 FOREIGN KEY (itemid) REFERENCES items (itemid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE lld_override_condition ADD CONSTRAINT c_lld_override_condition_1 FOREIGN KEY (lld_overrideid) REFERENCES lld_override (lld_overrideid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE lld_override_operation ADD CONSTRAINT c_lld_override_operation_1 FOREIGN KEY (lld_overrideid) REFERENCES lld_override (lld_overrideid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE lld_override_opstatus ADD CONSTRAINT c_lld_override_opstatus_1 FOREIGN KEY (lld_override_operationid) REFERENCES lld_override_operation (lld_override_operationid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE lld_override_opdiscover ADD CONSTRAINT c_lld_override_opdiscover_1 FOREIGN KEY (lld_override_operationid) REFERENCES lld_override_operation (lld_override_operationid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE lld_override_opperiod ADD CONSTRAINT c_lld_override_opperiod_1 FOREIGN KEY (lld_override_operationid) REFERENCES lld_override_operation (lld_override_operationid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE lld_override_ophistory ADD CONSTRAINT c_lld_override_ophistory_1 FOREIGN KEY (lld_override_operationid) REFERENCES lld_override_operation (lld_override_operationid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE lld_override_optrends ADD CONSTRAINT c_lld_override_optrends_1 FOREIGN KEY (lld_override_operationid) REFERENCES lld_override_operation (lld_override_operationid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE lld_override_opseverity ADD CONSTRAINT c_lld_override_opseverity_1 FOREIGN KEY (lld_override_operationid) REFERENCES lld_override_operation (lld_override_operationid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE lld_override_optag ADD CONSTRAINT c_lld_override_optag_1 FOREIGN KEY (lld_override_operationid) REFERENCES lld_override_operation (lld_override_operationid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE lld_override_optemplate ADD CONSTRAINT c_lld_override_optemplate_1 FOREIGN KEY (lld_override_operationid) REFERENCES lld_override_operation (lld_override_operationid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE lld_override_optemplate ADD CONSTRAINT c_lld_override_optemplate_2 FOREIGN KEY (templateid) REFERENCES hosts (hostid); Table altered. SQL> ALTER TABLE lld_override_opinventory ADD CONSTRAINT c_lld_override_opinventory_1 FOREIGN KEY (lld_override_operationid) REFERENCES lld_override_operation (lld_override_operationid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE item_parameter ADD CONSTRAINT c_item_parameter_1 FOREIGN KEY (itemid) REFERENCES items (itemid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE role_rule ADD CONSTRAINT c_role_rule_1 FOREIGN KEY (roleid) REFERENCES role (roleid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE role_rule ADD CONSTRAINT c_role_rule_2 FOREIGN KEY (value_moduleid) REFERENCES module (moduleid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE token ADD CONSTRAINT c_token_1 FOREIGN KEY (userid) REFERENCES users (userid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE token ADD CONSTRAINT c_token_2 FOREIGN KEY (creator_userid) REFERENCES users (userid); Table altered. SQL> ALTER TABLE item_tag ADD CONSTRAINT c_item_tag_1 FOREIGN KEY (itemid) REFERENCES items (itemid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE httptest_tag ADD CONSTRAINT c_httptest_tag_1 FOREIGN KEY (httptestid) REFERENCES httptest (httptestid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE sysmaps_element_tag ADD CONSTRAINT c_sysmaps_element_tag_1 FOREIGN KEY (selementid) REFERENCES sysmaps_elements (selementid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE report ADD CONSTRAINT c_report_1 FOREIGN KEY (userid) REFERENCES users (userid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE report ADD CONSTRAINT c_report_2 FOREIGN KEY (dashboardid) REFERENCES dashboard (dashboardid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE report_param ADD CONSTRAINT c_report_param_1 FOREIGN KEY (reportid) REFERENCES report (reportid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE report_user ADD CONSTRAINT c_report_user_1 FOREIGN KEY (reportid) REFERENCES report (reportid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE report_user ADD CONSTRAINT c_report_user_2 FOREIGN KEY (userid) REFERENCES users (userid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE report_user ADD CONSTRAINT c_report_user_3 FOREIGN KEY (access_userid) REFERENCES users (userid); Table altered. SQL> ALTER TABLE report_usrgrp ADD CONSTRAINT c_report_usrgrp_1 FOREIGN KEY (reportid) REFERENCES report (reportid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE report_usrgrp ADD CONSTRAINT c_report_usrgrp_2 FOREIGN KEY (usrgrpid) REFERENCES usrgrp (usrgrpid) ON DELETE CASCADE; Table altered. SQL> ALTER TABLE report_usrgrp ADD CONSTRAINT c_report_usrgrp_3 FOREIGN KEY (access_userid) REFERENCES users (userid); Table altered. SQL> @double.sql SQL> ALTER TABLE trends RENAME COLUMN value_min TO zbx_old_tmp1; Table altered. SQL> ALTER TABLE trends RENAME COLUMN value_avg TO zbx_old_tmp2; Table altered. SQL> ALTER TABLE trends RENAME COLUMN value_max TO zbx_old_tmp3; Table altered. SQL> ALTER TABLE trends 2 ADD (value_min BINARY_DOUBLE DEFAULT '0.0000' NOT NULL, 3 value_avg BINARY_DOUBLE DEFAULT '0.0000' NOT NULL, 4 value_max BINARY_DOUBLE DEFAULT '0.0000' NOT NULL); Table altered. SQL> UPDATE trends 2 SET value_min=zbx_old_tmp1, 3 value_avg=zbx_old_tmp2, 4 value_max=zbx_old_tmp3; 0 rows updated. SQL> ALTER TABLE trends DROP COLUMN zbx_old_tmp1; Table altered. SQL> ALTER TABLE trends DROP COLUMN zbx_old_tmp2; Table altered. SQL> ALTER TABLE trends DROP COLUMN zbx_old_tmp3; Table altered. SQL> ALTER TABLE history RENAME COLUMN value TO zbx_old_tmp1; Table altered. SQL> ALTER TABLE history ADD value BINARY_DOUBLE DEFAULT '0.0000' NOT NULL; Table altered. SQL> UPDATE history SET value=zbx_old_tmp1; 0 rows updated. SQL> ALTER TABLE history DROP COLUMN zbx_old_tmp1; Table altered. SQL> spool images.log