CREATE DATABASE /*!32312 IF NOT EXISTS*/ `backups` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `backups`; CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysql` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `mysql`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `columns_priv` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `db` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', PRIMARY KEY (`Host`,`Db`,`User`), KEY `User` (`User`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `event` ( `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `name` char(64) NOT NULL DEFAULT '', `body` longblob NOT NULL, `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `execute_at` datetime DEFAULT NULL, `interval_value` int(11) DEFAULT NULL, `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `last_executed` datetime DEFAULT NULL, `starts` datetime DEFAULT NULL, `ends` datetime DEFAULT NULL, `status` enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL DEFAULT 'ENABLED', `on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP', `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '', `comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `originator` int(10) unsigned NOT NULL, `time_zone` char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM', `character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `body_utf8` longblob, PRIMARY KEY (`db`,`name`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `func` ( `name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `ret` tinyint(1) NOT NULL DEFAULT '0', `dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', `type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL, PRIMARY KEY (`name`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `help_category` ( `help_category_id` smallint(5) unsigned NOT NULL, `name` char(64) NOT NULL, `parent_category_id` smallint(5) unsigned DEFAULT NULL, `url` char(128) NOT NULL, PRIMARY KEY (`help_category_id`), UNIQUE KEY `name` (`name`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `help_keyword` ( `help_keyword_id` int(10) unsigned NOT NULL, `name` char(64) NOT NULL, PRIMARY KEY (`help_keyword_id`), UNIQUE KEY `name` (`name`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `help_relation` ( `help_topic_id` int(10) unsigned NOT NULL, `help_keyword_id` int(10) unsigned NOT NULL, PRIMARY KEY (`help_keyword_id`,`help_topic_id`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `help_topic` ( `help_topic_id` int(10) unsigned NOT NULL, `name` char(64) NOT NULL, `help_category_id` smallint(5) unsigned NOT NULL, `description` text NOT NULL, `example` text NOT NULL, `url` char(128) NOT NULL, PRIMARY KEY (`help_topic_id`), UNIQUE KEY `name` (`name`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `host` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', PRIMARY KEY (`Host`,`Db`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `ndb_binlog_index` ( `Position` bigint(20) unsigned NOT NULL, `File` varchar(255) NOT NULL, `epoch` bigint(20) unsigned NOT NULL, `inserts` bigint(20) unsigned NOT NULL, `updates` bigint(20) unsigned NOT NULL, `deletes` bigint(20) unsigned NOT NULL, `schemaops` bigint(20) unsigned NOT NULL, PRIMARY KEY (`epoch`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `plugin` ( `name` varchar(64) NOT NULL DEFAULT '', `dl` varchar(128) NOT NULL DEFAULT '', PRIMARY KEY (`name`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `proc` ( `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `name` char(64) NOT NULL DEFAULT '', `type` enum('FUNCTION','PROCEDURE') NOT NULL, `specific_name` char(64) NOT NULL DEFAULT '', `language` enum('SQL') NOT NULL DEFAULT 'SQL', `sql_data_access` enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NOT NULL DEFAULT 'CONTAINS_SQL', `is_deterministic` enum('YES','NO') NOT NULL DEFAULT 'NO', `security_type` enum('INVOKER','DEFINER') NOT NULL DEFAULT 'DEFINER', `param_list` blob NOT NULL, `returns` longblob NOT NULL, `body` longblob NOT NULL, `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '', `comment` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `body_utf8` longblob, PRIMARY KEY (`db`,`name`,`type`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `procs_priv` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', `Routine_name` char(64) CHARACTER SET utf8 NOT NULL DEFAULT '', `Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL, `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`), KEY `Grantor` (`Grantor`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `proxies_priv` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', `Proxied_host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `Proxied_user` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', `With_grant` tinyint(1) NOT NULL DEFAULT '0', `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`Host`,`User`,`Proxied_host`,`Proxied_user`), KEY `Grantor` (`Grantor`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `servers` ( `Server_name` char(64) NOT NULL DEFAULT '', `Host` char(64) NOT NULL DEFAULT '', `Db` char(64) NOT NULL DEFAULT '', `Username` char(64) NOT NULL DEFAULT '', `Password` char(64) NOT NULL DEFAULT '', `Port` int(4) NOT NULL DEFAULT '0', `Socket` char(64) NOT NULL DEFAULT '', `Wrapper` char(64) NOT NULL DEFAULT '', `Owner` char(64) NOT NULL DEFAULT '', PRIMARY KEY (`Server_name`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tables_priv` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '', `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`), KEY `Grantor` (`Grantor`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `time_zone` ( `Time_zone_id` int(10) unsigned NOT NULL, `Use_leap_seconds` enum('Y','N') NOT NULL DEFAULT 'N', PRIMARY KEY (`Time_zone_id`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `time_zone_leap_second` ( `Transition_time` bigint(20) NOT NULL, `Correction` int(11) NOT NULL, PRIMARY KEY (`Transition_time`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `time_zone_name` ( `Name` char(64) NOT NULL, `Time_zone_id` int(10) unsigned NOT NULL, PRIMARY KEY (`Name`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `time_zone_transition` ( `Time_zone_id` int(10) unsigned NOT NULL, `Transition_time` bigint(20) NOT NULL, `Transition_type_id` int(10) unsigned NOT NULL, PRIMARY KEY (`Time_zone_id`,`Transition_time`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `time_zone_transition_type` ( `Time_zone_id` int(10) unsigned NOT NULL, `Transition_type_id` int(10) unsigned NOT NULL, `Offset` int(11) NOT NULL DEFAULT '0', `Is_DST` tinyint(3) unsigned NOT NULL DEFAULT '0', `Abbreviation` char(8) NOT NULL DEFAULT '', PRIMARY KEY (`Time_zone_id`,`Transition_type_id`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `user` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', `Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '', `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '', `ssl_cipher` blob NOT NULL, `x509_issuer` blob NOT NULL, `x509_subject` blob NOT NULL, `max_questions` int(11) unsigned NOT NULL DEFAULT '0', `max_updates` int(11) unsigned NOT NULL DEFAULT '0', `max_connections` int(11) unsigned NOT NULL DEFAULT '0', `max_user_connections` int(11) unsigned NOT NULL DEFAULT '0', `plugin` char(64) COLLATE utf8_bin DEFAULT '', `authentication_string` text COLLATE utf8_bin, PRIMARY KEY (`Host`,`User`) ); /*!40101 SET character_set_client = @saved_cs_client */; CREATE DATABASE /*!32312 IF NOT EXISTS*/ `stadb` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `stadb`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `agg_cap_summaries` ( `agg_cap_summaries_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `caps_fk` bigint(20) unsigned DEFAULT NULL, `num_media_enters` int(10) unsigned DEFAULT '0', `num_media_ejects` int(10) unsigned DEFAULT '0', `num_cap_rotation_totals` int(10) unsigned DEFAULT '0', `num_cap_rotation_retries` int(10) unsigned DEFAULT '0', `num_rotation_fails` int(10) unsigned DEFAULT '0', `num_cap_ipls` int(10) unsigned DEFAULT '0', `lib_cap_health_enum` varchar(20) DEFAULT NULL, `begin_date` datetime DEFAULT NULL, `end_date` datetime DEFAULT NULL, `num_snmp_traps` int(10) unsigned DEFAULT '0', `agg_type` tinyint(3) unsigned DEFAULT '0', `agg_period` smallint(5) unsigned DEFAULT '0', `agg_year` year(4) DEFAULT '0000', PRIMARY KEY (`agg_cap_summaries_pk`), UNIQUE KEY `agg_cap_summaries_pk_UNIQUE` (`agg_cap_summaries_pk`), UNIQUE KEY `agg_caps_4xcompkey1_UNIQUE` (`caps_fk`,`agg_type`,`agg_period`,`agg_year`), KEY `fk_agg_cap_summaries_lkup_top_level_condition_enum1_idx` (`lib_cap_health_enum`), KEY `fk_agg_cap_summaries_caps1_idx` (`caps_fk`), CONSTRAINT `fk_agg_cap_summaries_caps1` FOREIGN KEY (`caps_fk`) REFERENCES `caps` (`caps_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_agg_cap_summaries_lkup_top_level_condition_enum1` FOREIGN KEY (`lib_cap_health_enum`) REFERENCES `lkup_top_level_condition_enum` (`top_level_condition`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `agg_collection_summaries` ( `agg_collection_summaries_pk` bigint(20) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `collection_fk` bigint(20) unsigned NOT NULL, `collection_type` tinyint(3) unsigned NOT NULL DEFAULT '0', `num_drive_bays` int(10) unsigned DEFAULT '0', `num_drive_bays_allocated` int(10) unsigned DEFAULT '0', `num_drive_bays_unallocated` int(10) unsigned DEFAULT '0', `num_media_cells` int(10) unsigned DEFAULT '0', `num_media_cells_allocated` int(10) unsigned DEFAULT '0', `num_media_cells_unallocated` int(10) unsigned DEFAULT '0', `mb_rw` double unsigned DEFAULT '0', `mb_read` double unsigned DEFAULT '0', `mb_written` double unsigned DEFAULT '0', `num_enters` int(10) unsigned DEFAULT '0', `num_ejects` int(10) unsigned DEFAULT '0', `num_cleans` int(10) unsigned DEFAULT '0', `num_mounts` bigint(20) unsigned DEFAULT '0', `num_dismounts` bigint(20) unsigned DEFAULT '0', `mb_sent` double unsigned DEFAULT '0', `mb_received` double unsigned DEFAULT '0', `drive_utilization` float unsigned DEFAULT '0', `total_cartridge_capacity` int(10) unsigned DEFAULT '0', `average_free_cells` int(10) unsigned DEFAULT '0', `max_free_cells` int(10) unsigned DEFAULT '0', `min_free_cells` int(10) unsigned DEFAULT '0', `average_used_cells` int(10) unsigned DEFAULT '0', `cartridge_movements` int(10) unsigned DEFAULT '0', `oldest_last_access_date` datetime DEFAULT NULL, `cartridge_utilization` float unsigned DEFAULT '0', `last_exchange_processed` datetime DEFAULT NULL, `begin_date` datetime DEFAULT NULL, `end_date` datetime DEFAULT NULL, `agg_type` tinyint(3) unsigned DEFAULT '0', `agg_period` smallint(5) unsigned DEFAULT '0', `agg_year` year(4) DEFAULT NULL, `cart_util_band_unknown` int(10) unsigned DEFAULT '0', `cart_util_band_0` int(10) unsigned DEFAULT '0', `cart_util_band_1` int(10) unsigned DEFAULT '0', `cart_util_band_2` int(10) unsigned DEFAULT '0', `cart_util_band_3` int(10) unsigned DEFAULT '0', `cart_util_band_4` int(10) unsigned DEFAULT '0', `cart_util_band_5` int(10) unsigned DEFAULT '0', PRIMARY KEY (`agg_collection_summaries_pk`), UNIQUE KEY `agg_collection_summaries_pk_UNIQUE` (`agg_collection_summaries_pk`), UNIQUE KEY `collection_fk_summary_date_UNIQUE` (`collection_fk`), UNIQUE KEY `agg_collections_4xcompkey1_UNIQUE` (`collection_fk`,`agg_type`,`agg_period`,`agg_year`), KEY `idx_last_exchange_processed` (`last_exchange_processed`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `agg_drive_summaries` ( `agg_drive_summaries_pk` bigint(20) unsigned NOT NULL, `utilization` float DEFAULT '0', `dismounts` int(11) DEFAULT '0', `errors` int(11) DEFAULT '0', `cleans` int(11) DEFAULT '0', `mb_read` double DEFAULT '0', `mb_written` double DEFAULT '0', `mb_rw` double DEFAULT '0', `mb_sent` double DEFAULT '0', `mb_received` double DEFAULT '0', `mount_read_throughput` float DEFAULT '0', `mount_write_throughput` float DEFAULT '0', `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `drives_fk` bigint(20) unsigned NOT NULL, `mount_io_throughput` float DEFAULT '0', `avg_read_mb_per_mount` float DEFAULT '0', `avg_write_mb_per_mount` float DEFAULT '0', `avg_rw_mb_per_mount` float DEFAULT '0', `begin_date` datetime DEFAULT NULL, `end_date` datetime DEFAULT NULL, `drive_snmp_trap_count` bigint(20) unsigned DEFAULT '0', `agg_type` tinyint(3) unsigned DEFAULT '0', `agg_period` smallint(5) unsigned DEFAULT '0', `agg_year` year(4) DEFAULT '0000', PRIMARY KEY (`agg_drive_summaries_pk`), UNIQUE KEY `agg_drive_summaries_pk_UNIQUE` (`agg_drive_summaries_pk`), UNIQUE KEY `agg_drives_4xcompkey1_UNIQUE` (`drives_fk`,`agg_type`,`agg_period`,`agg_year`), KEY `fk_agg_drive_summaries_drives1` (`drives_fk`), CONSTRAINT `fk_agg_drive_summaries_drives1` FOREIGN KEY (`drives_fk`) REFERENCES `drives` (`drives_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `agg_elevator_summaries` ( `agg_elevator_summaries_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `elevators_fk` bigint(20) unsigned DEFAULT NULL, `num_elevator_get_retries` int(10) unsigned DEFAULT '0', `num_elevator_put_retries` int(10) unsigned DEFAULT '0', `num_elevator_get_fails` int(10) unsigned DEFAULT '0', `num_elevator_put_fails` int(10) unsigned DEFAULT '0', `num_elevator_get_totals` int(10) unsigned DEFAULT '0', `num_elevator_put_totals` int(10) unsigned DEFAULT '0', `lib_elevator_health_enum` varchar(20) DEFAULT NULL, `begin_date` datetime DEFAULT NULL, `end_date` datetime DEFAULT NULL, `num_snmp_traps` int(10) unsigned DEFAULT '0', `agg_type` tinyint(3) unsigned DEFAULT '0', `agg_period` smallint(5) unsigned DEFAULT '0', `agg_year` year(4) DEFAULT '0000', PRIMARY KEY (`agg_elevator_summaries_pk`), UNIQUE KEY `agg_elevator_summaries_pk_UNIQUE` (`agg_elevator_summaries_pk`), UNIQUE KEY `agg_elevators_4xcompkey1_UNIQUE` (`elevators_fk`,`agg_type`,`agg_period`,`agg_year`), KEY `fk_aes_lkup_top_level_condition_enum1_idx` (`lib_elevator_health_enum`), KEY `fk_aes_elevators1_idx` (`elevators_fk`), CONSTRAINT `fk_aes_elevators1` FOREIGN KEY (`elevators_fk`) REFERENCES `elevators` (`elevators_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_aes_lkup_top_level_condition_enum1` FOREIGN KEY (`lib_elevator_health_enum`) REFERENCES `lkup_top_level_condition_enum` (`top_level_condition`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `agg_library_summaries` ( `agg_library_summaries_pk` bigint(20) unsigned NOT NULL, `libraries_fk` bigint(20) unsigned NOT NULL, `num_dismounts` bigint(20) unsigned DEFAULT '0', `num_enters` int(10) unsigned DEFAULT '0', `num_cleans` int(10) unsigned DEFAULT '0', `mb_read` double DEFAULT '0', `mb_written` double DEFAULT '0', `mb_rw` double DEFAULT '0', `mb_sent` double DEFAULT '0', `mb_received` double DEFAULT '0', `drive_utilization` float DEFAULT '0', `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `num_ejects` int(10) unsigned DEFAULT '0', `num_library_snmp_traps` bigint(20) unsigned DEFAULT '0', `begin_date` datetime DEFAULT NULL, `end_date` datetime DEFAULT NULL, `num_ptp_enters` int(10) unsigned DEFAULT '0', `num_ptp_ejects` int(10) unsigned DEFAULT '0', `total_host_db_sync_requests` smallint(5) unsigned DEFAULT '0', `total_host_request_timeouts` smallint(5) unsigned DEFAULT '0', `total_host_requests` smallint(5) unsigned DEFAULT '0', `num_caps` smallint(5) unsigned DEFAULT '0', `num_elevators` smallint(5) unsigned DEFAULT '0', `num_ptps` smallint(5) unsigned DEFAULT '0', `num_robots` smallint(5) unsigned DEFAULT '0', `clean_enabled` tinyint(3) unsigned DEFAULT '0', `accum_library_uptime` bigint(20) unsigned DEFAULT '0', `num_boots` int(10) unsigned DEFAULT '0', `num_cleaning_cartridges` int(10) unsigned DEFAULT '0', `num_cleaning_exp_cartridges` int(10) unsigned DEFAULT '0', `num_free_sys_storage_cells` int(10) unsigned DEFAULT '0', `num_get_totals` int(10) unsigned DEFAULT '0', `num_mdv_drives` int(10) unsigned DEFAULT '0', `num_mdv_media` int(10) unsigned DEFAULT '0', `num_moves` int(10) unsigned DEFAULT '0', `num_put_totals` int(10) unsigned DEFAULT '0', `num_sys_storage_cells` int(10) unsigned DEFAULT '0', `average_free_cells` int(10) unsigned DEFAULT '0', `average_used_cells` int(10) unsigned DEFAULT '0', `cartridge_movements` int(10) unsigned DEFAULT '0', `cartridge_utilization` float unsigned DEFAULT '0', `maximum_free_cells` int(10) unsigned DEFAULT '0', `minimum_free_cells` int(10) unsigned DEFAULT '0', `oldest_last_access_date` datetime DEFAULT NULL, `total_cartridge_capacity` int(10) unsigned DEFAULT '0', `agg_type` tinyint(3) unsigned DEFAULT '0', `agg_period` smallint(5) unsigned DEFAULT '0', `agg_year` year(4) DEFAULT '0000', `cart_util_band_unknown` int(10) unsigned DEFAULT '0', `cart_util_band_0` int(10) unsigned DEFAULT '0', `cart_util_band_1` int(10) unsigned DEFAULT '0', `cart_util_band_2` int(10) unsigned DEFAULT '0', `cart_util_band_3` int(10) unsigned DEFAULT '0', `cart_util_band_4` int(10) unsigned DEFAULT '0', `cart_util_band_5` int(10) unsigned DEFAULT '0', PRIMARY KEY (`agg_library_summaries_pk`), UNIQUE KEY `agg_library_summaries_pk_UNIQUE` (`agg_library_summaries_pk`), UNIQUE KEY `agg_libraries_4xcompkey1_UNIQUE` (`libraries_fk`,`agg_type`,`agg_period`,`agg_year`), KEY `fk_agg_library_summaries_libraries1` (`libraries_fk`), CONSTRAINT `fk_agg_library_summaries_libraries1` FOREIGN KEY (`libraries_fk`) REFERENCES `libraries` (`libraries_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `agg_media_summaries` ( `agg_media_summaries_pk` bigint(20) unsigned NOT NULL, `dismounts` int(10) unsigned DEFAULT '0', `errors` int(10) unsigned DEFAULT '0', `mb_read` double DEFAULT '0', `mb_written` double DEFAULT '0', `mb_rw` double DEFAULT '0', `mb_sent` double DEFAULT '0', `mb_received` double DEFAULT '0', `mount_read_throughput` float DEFAULT '0', `mount_write_throughput` float DEFAULT '0', `mount_io_throughput` float DEFAULT '0', `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `media_fk` bigint(20) unsigned NOT NULL, `begin_date` datetime DEFAULT NULL, `end_date` datetime DEFAULT NULL, `num_snmp_traps` int(10) unsigned DEFAULT '0', `capacity_utilization` float unsigned DEFAULT '0', `agg_type` tinyint(3) unsigned DEFAULT '0', `agg_period` smallint(5) unsigned DEFAULT '0', `agg_year` year(4) DEFAULT '0000', `ejected_date` datetime DEFAULT NULL, `entered_date` datetime DEFAULT NULL, PRIMARY KEY (`agg_media_summaries_pk`), UNIQUE KEY `agg_media_summaries_pk_UNIQUE` (`agg_media_summaries_pk`), UNIQUE KEY `media_fk1_UNIQUE` (`media_fk`), UNIQUE KEY `agg_media_4xcompkey1_UNIQUE` (`media_fk`,`agg_type`,`agg_period`,`agg_year`), KEY `fk_agg_media_summaries_media1` (`media_fk`), CONSTRAINT `fk_agg_media_summaries_media1` FOREIGN KEY (`media_fk`) REFERENCES `media` (`media_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `agg_ptp_summaries` ( `agg_ptp_summaries_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `ptps_fk` bigint(20) unsigned DEFAULT NULL, `num_ptp_move_retries` int(10) unsigned DEFAULT '0', `num_ptp_move_fails` int(10) unsigned DEFAULT '0', `num_ptp_move_totals` int(10) unsigned DEFAULT '0', `lib_ptp_health_enum` varchar(20) DEFAULT NULL, `begin_date` datetime DEFAULT NULL, `end_date` datetime DEFAULT NULL, `num_snmp_traps` int(10) unsigned DEFAULT '0', `agg_type` tinyint(3) unsigned DEFAULT '0', `agg_period` smallint(5) unsigned DEFAULT '0', `agg_year` year(4) DEFAULT '0000', PRIMARY KEY (`agg_ptp_summaries_pk`), UNIQUE KEY `agg_ptp_summaries_pk_UNIQUE` (`agg_ptp_summaries_pk`), UNIQUE KEY `agg_ptps_4xcompkey1_UNIQUE` (`ptps_fk`,`agg_type`,`agg_period`,`agg_year`), KEY `fk_aps_lkup_top_level_condition_enum1_idx` (`lib_ptp_health_enum`), KEY `fk_agg_ptp_summaries_ptps1_idx` (`ptps_fk`), CONSTRAINT `fk_agg_ptp_summaries_ptps1` FOREIGN KEY (`ptps_fk`) REFERENCES `ptps` (`ptps_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_aps_lkup_top_level_condition_enum1` FOREIGN KEY (`lib_ptp_health_enum`) REFERENCES `lkup_top_level_condition_enum` (`top_level_condition`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `agg_robot_summaries` ( `agg_robot_summaries_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `robots_fk` bigint(20) unsigned DEFAULT NULL, `num_robot_get_retries` int(10) unsigned DEFAULT '0', `num_robot_put_retries` int(10) unsigned DEFAULT '0', `num_robot_get_fails` int(10) unsigned DEFAULT '0', `num_robot_put_fails` int(10) unsigned DEFAULT '0', `num_robot_get_totals` int(10) unsigned DEFAULT '0', `num_robot_put_totals` int(10) unsigned DEFAULT '0', `num_robot_reboots` smallint(5) unsigned DEFAULT '0', `num_robot_commanded_reboots` smallint(5) unsigned DEFAULT '0', `lib_robot_health_enum` varchar(20) DEFAULT NULL, `robot_health_enum` varchar(20) DEFAULT NULL, `begin_date` datetime DEFAULT NULL, `end_date` datetime DEFAULT NULL, `num_snmp_traps` int(10) unsigned DEFAULT '0', `agg_type` tinyint(3) unsigned DEFAULT '0', `agg_period` smallint(5) unsigned DEFAULT '0', `agg_year` year(4) DEFAULT '0000', PRIMARY KEY (`agg_robot_summaries_pk`), UNIQUE KEY `agg_robot_summaries_pk_UNIQUE` (`agg_robot_summaries_pk`), UNIQUE KEY `agg_robots_4xcompkey1_UNIQUE` (`robots_fk`,`agg_type`,`agg_period`,`agg_year`), KEY `fk_ars_lkup_top_level_condition_enum1_idx` (`lib_robot_health_enum`), KEY `fk_agg_robot_summaries_robots1_idx` (`robots_fk`), KEY `agg_robot_summaries_agg_type1_idx` (`agg_type`), KEY `fk_ars_lkup_health_enum1_idx` (`robot_health_enum`), CONSTRAINT `fk_agg_robot_summaries_robots1` FOREIGN KEY (`robots_fk`) REFERENCES `robots` (`robots_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_ars_lkup_health_enum1` FOREIGN KEY (`robot_health_enum`) REFERENCES `lkup_health_enum` (`health_enum`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_ars_lkup_top_level_condition_enum1` FOREIGN KEY (`lib_robot_health_enum`) REFERENCES `lkup_top_level_condition_enum` (`top_level_condition`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `alert_history` ( `alert_history_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `system_rules_fk` bigint(20) unsigned NOT NULL COMMENT 'PK of event that caused alert.', `event_fk` bigint(20) unsigned NOT NULL COMMENT 'PK of rule that fired to cause alert', `component_fk` bigint(20) unsigned NOT NULL COMMENT 'Generic PK of component generating alert.', `alert_severity_enum` varchar(16) NOT NULL DEFAULT 'NONE' COMMENT 'Severity of the alert. Values: UNKNOWN, NONE, INFORMATIVE, WARNING, SEVERE (see lkup_alert_severities)', `alert_workflow_enum` varchar(16) NOT NULL DEFAULT 'NEW' COMMENT 'Work flow state of the alert. Values: UNKNOWN, NEW, IN_PROGRESS, DISMISSED, ACKNOWLEDGED (see lkup_workflow_states)', `annotation` varchar(128) DEFAULT NULL COMMENT 'User provided notes, comments, etc.', PRIMARY KEY (`alert_history_pk`), UNIQUE KEY `alert_history_pk_UNIQUE` (`alert_history_pk`), KEY `ah_event_fk1_idx` (`system_rules_fk`), KEY `ah_rule_fk1_idx` (`event_fk`), KEY `ah_component_fk1_idx` (`component_fk`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `all_traps` ( `all_traps_pk` bigint(20) NOT NULL, `libraries_fk` bigint(20) unsigned DEFAULT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `trap_type_enum` varchar(30) DEFAULT NULL, `drives_fk` bigint(20) DEFAULT NULL, `sent_time` datetime DEFAULT NULL, `library_top_level_cond_enum` varchar(20) DEFAULT 'UNKNOWN', `agent_boot_date` datetime DEFAULT NULL, `device_id` varchar(44) DEFAULT NULL, `device_state` varchar(20) DEFAULT NULL, `device_time` datetime DEFAULT NULL, `device_address` varchar(12) DEFAULT NULL, `device_user_name` varchar(8) DEFAULT NULL, `device_interface_name` varchar(8) DEFAULT NULL, `device_activity` varchar(20) DEFAULT NULL, `device_request_id` varchar(8) DEFAULT NULL, `device_severity` varchar(6) DEFAULT NULL, `device_free_form_text` varchar(1350) DEFAULT NULL, `device_result_code` varchar(5) DEFAULT NULL, `device_property_name` varchar(128) DEFAULT NULL, `device_new_prop_value` varchar(128) DEFAULT NULL, `device_new_prop_effective` varchar(128) DEFAULT NULL, `drive_type` varchar(45) DEFAULT NULL, `drive_vendor` varchar(32) DEFAULT NULL, `device_serial_number` varchar(32) DEFAULT NULL, `oid_level` tinyint(4) DEFAULT NULL, `library_stkbase_model` varchar(8) DEFAULT NULL, `library_properties_fk` bigint(20) unsigned DEFAULT NULL, `ha_id` varchar(12) NOT NULL DEFAULT 'UNKNOWN', `ha_slot` varchar(12) NOT NULL DEFAULT 'UNKNOWN', `ha_state` varchar(12) NOT NULL DEFAULT 'UNKNOWN', `ha_alternate_ip` varchar(32) DEFAULT NULL, `trap_count` int(11) DEFAULT NULL, `lib_boot_date` datetime DEFAULT NULL, `lib_current_date` datetime DEFAULT NULL, `robots_fk` bigint(20) unsigned DEFAULT NULL, `trap_status_code` int(11) DEFAULT NULL, PRIMARY KEY (`all_traps_pk`), KEY `idx_libraries_fk` (`libraries_fk`), KEY `idx_drives_fk` (`drives_fk`), KEY `idx_sent_time` (`sent_time`), KEY `fk_all_traps_lkup_trap_type_enum1_idx` (`trap_type_enum`), KEY `fk_all_traps_library_properties1_idx` (`library_properties_fk`), KEY `fk_all_traps_lkup_ha_id1_idx` (`ha_id`), KEY `fk_all_traps_lkup_ha_slot1_idx` (`ha_slot`), KEY `fk_all_traps_lkup_ha_state1_idx` (`ha_state`), KEY `robots_fk1_idx` (`robots_fk`), CONSTRAINT `fk_all_traps_libraries1` FOREIGN KEY (`libraries_fk`) REFERENCES `libraries` (`libraries_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_all_traps_library_properties1` FOREIGN KEY (`library_properties_fk`) REFERENCES `library_properties` (`library_properties_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_all_traps_lkup_ha_id1` FOREIGN KEY (`ha_id`) REFERENCES `lkup_ha_id` (`ha_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_all_traps_lkup_ha_slot1` FOREIGN KEY (`ha_slot`) REFERENCES `lkup_ha_slot` (`ha_slot`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_all_traps_lkup_ha_state1` FOREIGN KEY (`ha_state`) REFERENCES `lkup_ha_state` (`ha_state`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_all_traps_lkup_trap_type_enum1` FOREIGN KEY (`trap_type_enum`) REFERENCES `lkup_trap_type_enum` (`trap_type`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `analytics_audit` ( `analytics_audit_pk` bigint(20) unsigned NOT NULL, `audit_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `aa_exchanges_fk` bigint(20) unsigned NOT NULL, `subsystem_id` enum('UNDEFINED','ANALYTICS','SUMMARIES','ALERTS') NOT NULL DEFAULT 'UNDEFINED' COMMENT 'Subsystem identifier: UNDEFINED, ANALYTICS; SUMMARIES; ALERT; UNSPECIFIED.', `secondary_id` varchar(64) NOT NULL DEFAULT 'unknown class' COMMENT 'The class name that is sending the audit event.', `vote` tinyint(3) unsigned DEFAULT NULL COMMENT 'The decision to save this exception to this log. 0=Do not save; 1=Save it; NULL=Do not care.', `proprietary` tinyint(3) unsigned DEFAULT '0' COMMENT 'Proprietary information: 0=Do not show to customers; 1=OK for customers to view.', `product_version` varchar(24) DEFAULT NULL COMMENT 'STA product version copied from the currently active version_info table.', `schema_version` varchar(32) DEFAULT NULL COMMENT 'STA schema version copied from the currently active version_info table.', `sequence_number` tinyint(3) unsigned DEFAULT NULL COMMENT 'ID of where in the class audit the exception was generated. Values: 0-255.', `result` varchar(64) DEFAULT NULL COMMENT 'Alphanumeric result code.', `note` varchar(128) DEFAULT NULL COMMENT 'Description of the exception.', PRIMARY KEY (`analytics_audit_pk`), KEY `fk_analytics_audit_exchanges1_idx` (`aa_exchanges_fk`), KEY `idx_sequence_number` (`sequence_number`), KEY `idx_schema_version` (`schema_version`), KEY `idx_vote` (`vote`), CONSTRAINT `fk_analytics_audit_exchanges1` FOREIGN KEY (`aa_exchanges_fk`) REFERENCES `exchanges` (`exchanges_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `annotations` ( `annotations_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `annotation_text` varchar(255) DEFAULT NULL COMMENT 'The user-entered annotation text', PRIMARY KEY (`annotations_pk`), UNIQUE KEY `annotations_pk_unq` (`annotations_pk`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `annotations_entities` ( `annotations_entities_pk` bigint(20) unsigned NOT NULL, `last_changed` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The time this entity-annotation link was created or most recently edited.', `ae_annotations_fk` bigint(20) unsigned NOT NULL COMMENT 'Primary key of the annotation record.', `ae_entity_fk` bigint(20) unsigned NOT NULL COMMENT 'Primary key of entity record (drive, media, et al)', `last_app_user_fk` bigint(20) unsigned DEFAULT NULL COMMENT 'Primary key of the user who created or most recently edited this entity-annotation link.', `entity_type` tinyint(3) unsigned DEFAULT NULL COMMENT 'The type of entity being annotated (drive, media, et al).', `is_latest` tinyint(1) unsigned DEFAULT '0', PRIMARY KEY (`annotations_entities_pk`), KEY `fk_annotations_entities_annotations1_idx` (`ae_annotations_fk`), KEY `entity_type1_idx` (`entity_type`), CONSTRAINT `fk_annotations_entities_annotations1` FOREIGN KEY (`ae_annotations_fk`) REFERENCES `annotations` (`annotations_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `app_users` ( `app_users_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `userid` varchar(64) NOT NULL COMMENT 'TBI User login id.', `firstname` varchar(64) DEFAULT NULL COMMENT 'User first name.', `lastname` varchar(64) DEFAULT NULL COMMENT 'User last name.', `middlename` varchar(64) DEFAULT NULL COMMENT 'User middle name(s) or initial(s).', `role` varchar(128) DEFAULT NULL, PRIMARY KEY (`app_users_pk`), KEY `userid1_idx` (`userid`), KEY `role1_idx` (`role`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `asr_alert_history` ( `asr_alert_history_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `client_id` varchar(48) NOT NULL, `asr_inventory_fk` bigint(20) unsigned NOT NULL, `exchange_fk` bigint(20) unsigned DEFAULT NULL, `service_request_id` varchar(16) NOT NULL, `pre_alarm_id` varchar(16) DEFAULT NULL, `is_active` tinyint(4) DEFAULT NULL, `status_enum` varchar(24) DEFAULT NULL, `alarm_summary` varchar(16) DEFAULT NULL, `alarm_description` varchar(256) DEFAULT NULL, `remarks` varchar(128) DEFAULT NULL, `asp_fsc` varchar(24) DEFAULT NULL, `alert_started` datetime NOT NULL, `alert_sent` datetime DEFAULT NULL, `alert_closed` datetime DEFAULT NULL, PRIMARY KEY (`asr_alert_history_pk`), UNIQUE KEY `asr_alert_history_pk_unq` (`asr_alert_history_pk`), KEY `fk_asr_alert_history_asr_inventory1_idx` (`asr_inventory_fk`), KEY `fk_asr_alert_history_exchanges1_idx` (`exchange_fk`), CONSTRAINT `fk_asr_alert_history_asr_inventory1` FOREIGN KEY (`asr_inventory_fk`) REFERENCES `asr_inventory` (`asr_inventory_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_asr_alert_history_exchanges1` FOREIGN KEY (`exchange_fk`) REFERENCES `exchanges` (`exchanges_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `asr_inventory` ( `asr_inventory_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `inventory_type_enum` varchar(16) NOT NULL, `serial_number` varchar(64) NOT NULL, `model` varchar(20) NOT NULL, `is_activatable` tinyint(4) DEFAULT NULL, `is_activated` tinyint(4) DEFAULT NULL, `remarks` varchar(128) DEFAULT NULL, `exist_start` datetime NOT NULL, `exist_end` datetime DEFAULT NULL, PRIMARY KEY (`asr_inventory_pk`), UNIQUE KEY `asr_inventory_pk_UNIQUE` (`asr_inventory_pk`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `asr_settings` ( `asr_settings_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `client_id` varchar(48) DEFAULT NULL, `is_configured` tinyint(4) DEFAULT '0', `is_connected` tinyint(4) DEFAULT '0', `is_registered` tinyint(4) DEFAULT '0', `last_update` datetime DEFAULT NULL, `asp_host_address` varchar(256) DEFAULT NULL, `asp_port` int(11) DEFAULT NULL, `asp_register_status` varchar(48) DEFAULT NULL, `sso_account` varchar(48) DEFAULT NULL, `sso_password` varchar(48) DEFAULT NULL, `base_url` varchar(48) DEFAULT NULL, `proxy_server` int(11) DEFAULT NULL, `proxy_port` int(11) DEFAULT NULL, `remarks` varchar(128) DEFAULT NULL, `last_asp_connect` datetime DEFAULT NULL, `last_asp_db_sync` datetime DEFAULT NULL, PRIMARY KEY (`asr_settings_pk`), UNIQUE KEY `asr_settings_pk_UNIQUE` (`asr_settings_pk`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `cap_properties` ( `cap_properties_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `cp_caps_fk` bigint(20) unsigned DEFAULT NULL, `id` int(10) unsigned DEFAULT NULL, `app_version` varchar(32) DEFAULT NULL, `fw_version` varchar(32) DEFAULT NULL, `name` varchar(64) DEFAULT NULL, `exist_start` datetime NOT NULL, `exist_end` datetime DEFAULT NULL, `is_latest` tinyint(3) unsigned DEFAULT NULL, PRIMARY KEY (`cap_properties_pk`), KEY `fk_cap_properties_caps1_idx` (`cp_caps_fk`), CONSTRAINT `fk_cap_properties_caps1` FOREIGN KEY (`cp_caps_fk`) REFERENCES `caps` (`caps_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `cap_stats` ( `cap_stats_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `cs_caps_fk` bigint(20) unsigned DEFAULT NULL, `led_state_enum` varchar(8) DEFAULT 'UNKNOWN', `op_status_enum` varchar(20) DEFAULT NULL, `state` varchar(32) DEFAULT NULL, `accessibility` varchar(32) DEFAULT NULL, `access_status_enum` varchar(8) DEFAULT NULL, `num_cap_rotation_totals` int(11) DEFAULT NULL, `num_cap_rotation_retries` int(11) DEFAULT NULL, `num_cap_rotation_fails` int(11) DEFAULT NULL, `num_cap_ipls` int(11) DEFAULT NULL, `num_cap_slots` smallint(6) DEFAULT NULL, `acquired` datetime DEFAULT NULL, PRIMARY KEY (`cap_stats_pk`), KEY `fk_cap_stats_caps1_idx` (`cs_caps_fk`), KEY `fk_cap_stats_lkup_device_op_status1_idx` (`op_status_enum`), KEY `fk_cap_stats_lkup_cap_access_state1_idx` (`access_status_enum`), KEY `fk_cap_stats_lkup_led_state1_idx` (`led_state_enum`), CONSTRAINT `fk_cap_stats_caps1` FOREIGN KEY (`cs_caps_fk`) REFERENCES `caps` (`caps_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_cap_stats_lkup_cap_access_state1` FOREIGN KEY (`access_status_enum`) REFERENCES `lkup_cap_access_state` (`cap_access_state`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_cap_stats_lkup_device_op_status1` FOREIGN KEY (`op_status_enum`) REFERENCES `lkup_device_op_status` (`device_op_status`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_cap_stats_lkup_led_state1` FOREIGN KEY (`led_state_enum`) REFERENCES `lkup_led_state` (`led_state`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `cap_summaries` ( `cap_summaries_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `caps_fk` bigint(20) unsigned NOT NULL, `cap_stats_fk` bigint(20) unsigned DEFAULT NULL, `cap_properties_fk` bigint(20) unsigned DEFAULT NULL, `num_media_enters` int(10) unsigned DEFAULT '0', `num_media_ejects` int(10) unsigned DEFAULT '0', `num_cap_rotation_totals` int(10) unsigned DEFAULT '0', `num_cap_rotation_retries` int(10) unsigned DEFAULT '0', `num_cap_rotation_fails` int(10) unsigned DEFAULT '0', `num_cap_ipls` int(10) unsigned DEFAULT '0', `lib_cap_health_enum` varchar(20) DEFAULT NULL, `summary_date` datetime DEFAULT NULL, `last_mib_walk` datetime DEFAULT NULL, `num_snmp_traps` int(10) unsigned DEFAULT '0', PRIMARY KEY (`cap_summaries_pk`), UNIQUE KEY `cap_summaries_pk_UNIQUE` (`cap_summaries_pk`), UNIQUE KEY `cs_caps_fk_summary_date_UNIQUE` (`caps_fk`,`summary_date`), KEY `fk_cap_summaries_lkup_top_level_condition_enum1_idx` (`lib_cap_health_enum`), KEY `fk_cap_summaries_caps1_idx` (`caps_fk`), KEY `fk_cap_summaries_cap_stats1_idx` (`cap_stats_fk`), KEY `fk_cap_summaries_cap_properties1_idx` (`cap_properties_fk`), CONSTRAINT `fk_cap_summaries_caps1` FOREIGN KEY (`caps_fk`) REFERENCES `caps` (`caps_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_cap_summaries_cap_properties1` FOREIGN KEY (`cap_properties_fk`) REFERENCES `cap_properties` (`cap_properties_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_cap_summaries_cap_stats1` FOREIGN KEY (`cap_stats_fk`) REFERENCES `cap_stats` (`cap_stats_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_cap_summaries_lkup_top_level_condition_enum1` FOREIGN KEY (`lib_cap_health_enum`) REFERENCES `lkup_top_level_condition_enum` (`top_level_condition`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `caps` ( `caps_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `serial_number` varchar(64) DEFAULT NULL, `hw_version` varchar(45) DEFAULT NULL, `is_broken` tinyint(1) DEFAULT '0', `exist_start` datetime NOT NULL, `exist_end` datetime DEFAULT NULL, PRIMARY KEY (`caps_pk`), UNIQUE KEY `caps_pk_UNIQUE` (`caps_pk`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `cells` ( `cells_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created. Automatically set to the CURRENT_TIME by MySQL when record is initially created in the DB. Not necessary for the application to set this value.', `ce_partitions_fk` bigint(20) unsigned DEFAULT NULL COMMENT 'Foreign key to the PARTITIONS table.', `ce_rails_fk` bigint(20) unsigned NOT NULL COMMENT 'Foreign key into the RAILS table.', `type_enum` varchar(20) NOT NULL DEFAULT 'UNKNOWN' COMMENT 'The type of cell. Values: "INVALID", "STORAGE", "DRIVE", "CAP", "PLAYGROUND", "INTRANSIT", "PTP", "HAND", "ELEVATOR", "GENERIC." NULL indicates an unknown cell type. [Source: slCellHostType]', `hli_address` varchar(32) DEFAULT NULL COMMENT 'HLI Address of the tape drive as a string of comma separated numbers, e.g., ''3,4,2,5'' for ACS,LSM,PANEL,TRANSPORT or ''3,4,4,5,16'' for ACS,LSM,PANEL,ROW,COL. Note that ROW/COL may be negative!', `hli_acs_name` varchar(16) DEFAULT NULL COMMENT 'Name of the ACS, if any.', `hli_acs_number` tinyint(3) unsigned DEFAULT NULL COMMENT 'The ACS number from the SMF record.', `hli_lsm_number` tinyint(3) unsigned DEFAULT NULL COMMENT 'The LSM number from the SMF record.', `hli_panel_number` smallint(6) DEFAULT NULL COMMENT 'Panel number from SMF record.', `hli_row_number` smallint(6) DEFAULT NULL COMMENT 'Row number from SMF record.', `hli_column_number` smallint(6) DEFAULT NULL COMMENT 'Column number from SMF record.', `physical_address` varchar(32) DEFAULT NULL COMMENT 'Physical address in LIBRARY,RAIL,COL,SIDE,ROW fomat, e.g. 1,3,5,3. [Source: slTBIEventData header]', `physical_library_number` smallint(6) DEFAULT NULL COMMENT 'Library number. [Source: slTBIEventData header]', `physical_rail_number` smallint(6) DEFAULT NULL COMMENT 'Rail number. [Source: slTBIEventData header]', `physical_column_number` smallint(6) DEFAULT NULL COMMENT 'Column number. [Source: slTBIEventData header]', `physical_side_number` smallint(6) DEFAULT NULL COMMENT 'Side number. [Source: slTBIEventData header]', `physical_row_number` smallint(6) DEFAULT NULL COMMENT 'Cell''s physical row number. [Source: slTBIEventData header]', `physical_module_number` smallint(6) DEFAULT NULL COMMENT 'Cell''s physical module number if the cell lives in an SL500. This will be empty for SL3000 and SL8500. [Source: SNMP slCellPhysicalAddressStr]', `scsi_element_id` int(11) DEFAULT NULL COMMENT 'Physical element ID/address of the storage cell. [OID: slCellElementID]', `exist_start` datetime NOT NULL COMMENT 'Date this cell first appeared in the library.', `exist_end` datetime DEFAULT NULL COMMENT 'Date this cell ceased to exist in the library. NULL if it is still defined.', `physical_address_display` varchar(32) DEFAULT NULL COMMENT 'User friendly addressing scheme currently used only by SL150.', PRIMARY KEY (`cells_pk`), KEY `fk_cells_rails1` (`ce_rails_fk`), KEY `fk_cells_partitions1` (`ce_partitions_fk`), KEY `fk_cells_lkup_cell_type_enum1` (`type_enum`), KEY `idx_cells_exist_end` (`exist_end`), CONSTRAINT `fk_cells_lkup_cell_type_enum1` FOREIGN KEY (`type_enum`) REFERENCES `lkup_cell_type_enum` (`cell_type`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_cells_partitions1` FOREIGN KEY (`ce_partitions_fk`) REFERENCES `partitions` (`partitions_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_cells_rails1` FOREIGN KEY (`ce_rails_fk`) REFERENCES `rails` (`rails_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `cells_caps` ( `cells_caps_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `cc_cells_fk` bigint(20) unsigned NOT NULL, `cc_caps_fk` bigint(20) unsigned NOT NULL, `exist_start` datetime NOT NULL, `exist_end` datetime DEFAULT NULL, `missing_start` datetime DEFAULT NULL, PRIMARY KEY (`cells_caps_pk`), KEY `fk_cells_caps_cells1_idx` (`cc_cells_fk`), KEY `fk_cells_caps_caps1_idx` (`cc_caps_fk`), CONSTRAINT `fk_cells_caps_caps1` FOREIGN KEY (`cc_caps_fk`) REFERENCES `caps` (`caps_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_cells_caps_cells1` FOREIGN KEY (`cc_cells_fk`) REFERENCES `cells` (`cells_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `cells_drives` ( `cells_drives_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created. Automatically set to the CURRENT_TIME by MySQL when record is initially created in the DB. Not necessary for the application to set this value.', `cd_cells_fk` bigint(20) unsigned NOT NULL, `cd_drives_fk` bigint(20) unsigned NOT NULL, `exist_start` datetime NOT NULL COMMENT 'The timestamp of when this drive first appeared in this cell.', `exist_end` datetime DEFAULT NULL COMMENT 'The timestamp of when this drive last appeared in this cell.', `missing_start` datetime DEFAULT NULL COMMENT 'Column added by SNMP to prevent premature retiring of cells_drives.', PRIMARY KEY (`cells_drives_pk`), UNIQUE KEY `IDX_CELLS_DRIVES_PK_UNQ` (`cells_drives_pk`), KEY `IDX_CD_DRIVES_FK` (`cd_drives_fk`), KEY `IDX_CD_CELLS_FK` (`cd_cells_fk`), KEY `idx_cd_exist_end` (`exist_end`), CONSTRAINT `CD_CELLS_FK1` FOREIGN KEY (`cd_cells_fk`) REFERENCES `cells` (`cells_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `CD_DRIVES_FK1` FOREIGN KEY (`cd_drives_fk`) REFERENCES `drives` (`drives_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `cells_media` ( `cells_media_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created. Automatically set to the CURRENT_TIME by MySQL when record is initially created in the DB. Not necessary for the application to set this value.', `cm_cells_fk` bigint(20) unsigned NOT NULL COMMENT 'Foreign key to cells.', `cm_media_fk` bigint(20) unsigned NOT NULL COMMENT 'Foreign key to media', `exist_start` datetime NOT NULL COMMENT 'The timestamp of when this media first appeared in this cell.', `exist_end` datetime DEFAULT NULL COMMENT 'The timestamp of when this media last appeared in this cell. NULL means the media is still in the cell.', `is_latest` tinyint(4) DEFAULT NULL COMMENT 'Boolean value to indicate latest cells_media record for a media.', `missing_start` datetime DEFAULT NULL COMMENT 'Column added by SNMP to prevent premature retiring of cells.', PRIMARY KEY (`cells_media_pk`), UNIQUE KEY `IDX_CELLS_MEDIA_PK_UNQ` (`cells_media_pk`), KEY `IDX_CM_MEDIA_FK` (`cm_media_fk`), KEY `IDX_CM_CELLS_FK` (`cm_cells_fk`), KEY `idx_cm_exist_end` (`exist_end`), KEY `idx_cm_latest_media` (`cm_media_fk`,`is_latest`), CONSTRAINT `CM_CELLS_FK1` FOREIGN KEY (`cm_cells_fk`) REFERENCES `cells` (`cells_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `CM_MEDIA_FK1` FOREIGN KEY (`cm_media_fk`) REFERENCES `media` (`media_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `cells_stats` ( `cells_stats_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `cs_cells_fk` bigint(20) unsigned DEFAULT NULL COMMENT 'Foreign key to the CELLS table.', `content_status_enum` varchar(25) NOT NULL DEFAULT 'UNKNOWN' COMMENT 'The status of the cell. Values: UNKNOWN, EMPTY, READABLE, NOT_READABLE, CAP_MAGAZINE_NOT_PRESENT, DRIVE_NOT_PRESENT, DRIVE_NOT_AVAILABLE. [Source: SNMP slCellContentStatus]', `content_label` varchar(32) DEFAULT NULL COMMENT 'The label of the cartridge in the cell. (zero length if the cell is empty, and "??????" if the label is unreadable.) [Source: SNMP slCellContentLabel]', `content_type` varchar(32) DEFAULT NULL COMMENT 'The type of cartridge in the cell (zero length string if cell is empty), e.g. "DltCartridge", "Lto_200GB", etc. [OID: slCellContentType]', `get_retries` int(11) DEFAULT NULL COMMENT 'Number of get retries performed from this cell. [Source: SNMP slCellGetRetryCount]', `put_retries` int(11) DEFAULT NULL COMMENT 'Number of put retries performed to this cell. [Source: SNMP slCellPutRetryCount]', `acquired` datetime NOT NULL, `is_latest` tinyint(4) DEFAULT NULL COMMENT 'Boolean value to indicate latest cells_stats record for a cell.', `is_host_accessible` tinyint(4) DEFAULT NULL COMMENT 'Is this cell accessible by the host? values: 0=NO, 1=YES. NULL indicates UNKNOWN condition.', PRIMARY KEY (`cells_stats_pk`), UNIQUE KEY `cells_stats_pk_UNIQUE` (`cells_stats_pk`), KEY `idx_cells_stats_cells_fk` (`cs_cells_fk`), KEY `idx_is_latest` (`is_latest`), KEY `idx_cells_is_host_accessible` (`cs_cells_fk`,`is_host_accessible`), KEY `idx_is_host_accessible` (`is_host_accessible`), KEY `fk_cells_stats_lkup_cell_content_status_enum1` (`content_status_enum`), CONSTRAINT `CELLS_STATS_CELLS_FK1` FOREIGN KEY (`cs_cells_fk`) REFERENCES `cells` (`cells_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_cells_stats_lkup_cell_content_status_enum1` FOREIGN KEY (`content_status_enum`) REFERENCES `lkup_cell_content_status_enum` (`cell_content_status`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `collection_summaries` ( `collection_summaries_pk` bigint(20) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `collection_fk` bigint(20) unsigned NOT NULL, `collection_type` tinyint(3) unsigned NOT NULL DEFAULT '0', `num_drive_bays` int(10) unsigned DEFAULT '0', `num_drive_bays_allocated` int(10) unsigned DEFAULT '0', `num_drive_bays_unallocated` int(10) unsigned DEFAULT '0', `num_media_cells` int(10) unsigned DEFAULT '0', `num_media_cells_allocated` int(10) unsigned DEFAULT '0', `num_media_cells_unallocated` int(10) unsigned DEFAULT '0', `mb_rw` double unsigned DEFAULT '0', `mb_read` double unsigned DEFAULT '0', `mb_written` double unsigned DEFAULT '0', `num_enters` int(10) unsigned DEFAULT '0', `num_ejects` int(10) unsigned DEFAULT '0', `num_cleans` int(10) unsigned DEFAULT '0', `num_mounts` bigint(20) unsigned DEFAULT '0', `num_dismounts` bigint(20) unsigned DEFAULT '0', `mb_sent` double unsigned DEFAULT '0', `mb_received` double unsigned DEFAULT '0', `drive_utilization` float unsigned DEFAULT '0', `total_cartridge_capacity` int(10) unsigned DEFAULT '0', `average_free_cells` int(10) unsigned DEFAULT '0', `max_free_cells` int(10) unsigned DEFAULT '0', `min_free_cells` int(10) unsigned DEFAULT '0', `average_used_cells` int(10) unsigned DEFAULT '0', `cartridge_movements` int(10) unsigned DEFAULT '0', `oldest_last_access_date` datetime DEFAULT NULL, `cartridge_utilization` float unsigned DEFAULT '0', `last_exchange_processed` datetime DEFAULT NULL, `summary_date` datetime DEFAULT NULL, `cart_util_band_unknown` int(10) unsigned DEFAULT '0', `cart_util_band_0` int(10) unsigned DEFAULT '0', `cart_util_band_1` int(10) unsigned DEFAULT '0', `cart_util_band_2` int(10) unsigned DEFAULT '0', `cart_util_band_3` int(10) unsigned DEFAULT '0', `cart_util_band_4` int(10) unsigned DEFAULT '0', `cart_util_band_5` int(10) unsigned DEFAULT '0', PRIMARY KEY (`collection_summaries_pk`), UNIQUE KEY `collection_summaries_pk_UNIQUE` (`collection_summaries_pk`), UNIQUE KEY `collection_fk_summary_date_UNIQUE` (`collection_fk`,`summary_date`), KEY `idx_last_exchange_processed` (`last_exchange_processed`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `controller_properties` ( `controller_properties_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `cp_controllers_fk` bigint(20) unsigned DEFAULT NULL, `id` int(10) unsigned DEFAULT NULL, `app_version` varchar(32) DEFAULT NULL COMMENT 'The PTP code version', `fw_version` varchar(32) DEFAULT NULL COMMENT 'The PTP firmware version.', `exist_start` datetime NOT NULL, `exist_end` datetime DEFAULT NULL, `is_latest` tinyint(3) unsigned DEFAULT NULL, PRIMARY KEY (`controller_properties_pk`), KEY `fk_controller_properties_controllers1_idx` (`cp_controllers_fk`), KEY `cp_exist_start_idx` (`exist_start`), KEY `cp_exist_end_idx` (`exist_end`), CONSTRAINT `fk_controller_properties_controllers1` FOREIGN KEY (`cp_controllers_fk`) REFERENCES `controllers` (`controllers_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `controller_stats` ( `controller_stats_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `cs_controllers_fk` bigint(20) unsigned DEFAULT NULL COMMENT 'Foreign key back to the controllers table.', `led_fault_enum` varchar(8) DEFAULT 'UNKNOWN' COMMENT 'State of the controller fault LED: ON, OFF, UNKNOWN.', `led_safe_to_remove_enum` varchar(8) DEFAULT NULL COMMENT 'State of the controller safe-to-remove LED: ON, OFF, UNKNOWN.', `top_level_condition_enum` varchar(20) DEFAULT NULL COMMENT 'The controller top-level condition: NORMAL, DEGRADED, NONOPERATIVE.', `controller_status_enum` varchar(20) DEFAULT NULL COMMENT 'The controller status: OK, ERROR, WARNING, INFO, TRACE, UNKNOWN.', `ha_slot` varchar(12) DEFAULT NULL, `ha_id` varchar(12) DEFAULT NULL, `ha_state` varchar(12) DEFAULT NULL, `ha_alternate_ip` varchar(32) DEFAULT NULL, `acquired` datetime DEFAULT NULL, PRIMARY KEY (`controller_stats_pk`), UNIQUE KEY `controller_stats_pk_unq` (`controller_stats_pk`), KEY `fk_controller_stats_lkup_device_op_status1_idx` (`controller_status_enum`), KEY `fk_controller_stats_lkup_top_level_condition_enum1_idx` (`top_level_condition_enum`), KEY `fk_controller_stats_controllers1_idx` (`cs_controllers_fk`), KEY `fk_controller_stats_lkup_led_state1_idx` (`led_fault_enum`), KEY `fk_controller_stats_lkup_led_state2_idx` (`led_safe_to_remove_enum`), CONSTRAINT `fk_controller_stats_controllers1` FOREIGN KEY (`cs_controllers_fk`) REFERENCES `controllers` (`controllers_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_controller_stats_lkup_device_op_status1` FOREIGN KEY (`controller_status_enum`) REFERENCES `lkup_device_op_status` (`device_op_status`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_controller_stats_lkup_led_state1` FOREIGN KEY (`led_fault_enum`) REFERENCES `lkup_led_state` (`led_state`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_controller_stats_lkup_led_state2` FOREIGN KEY (`led_safe_to_remove_enum`) REFERENCES `lkup_led_state` (`led_state`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_controller_stats_lkup_top_level_condition_enum1` FOREIGN KEY (`top_level_condition_enum`) REFERENCES `lkup_top_level_condition_enum` (`top_level_condition`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `controllers` ( `controllers_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `serial_number` varchar(64) DEFAULT NULL, `hw_version` varchar(45) DEFAULT NULL, `fru` varchar(72) DEFAULT NULL, `is_broken` tinyint(1) DEFAULT NULL, `exist_start` datetime NOT NULL, `exist_end` datetime DEFAULT NULL, PRIMARY KEY (`controllers_pk`), UNIQUE KEY `controllers_pk_unq` (`controllers_pk`), KEY `controllers_hw_version_idx` (`hw_version`), KEY `controllers_is_broken_idx` (`is_broken`), KEY `controllers_fru_idx` (`fru`), KEY `controllers_exist_start_idx` (`exist_start`), KEY `controllers_exist_end_idx` (`exist_end`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `drive_analytics` ( `drive_analytics_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created. Automatically set to the CURRENT_TIME by MySQL when record is initially created in the DB. Not necessary for the application to set this value.', `da_exchgs_prv_fk` bigint(20) unsigned DEFAULT NULL COMMENT 'Foreign key to the EXCHANGES record previous to the current EXCHANGES record in the chain of exchanges resulting in this analytics record. NULL indicates that this is the first analytics record in the chain.', `da_exchanges_fk` bigint(20) unsigned NOT NULL COMMENT 'Foreign key to the exchanges record responsible for this ANALYTICS record.', `da_exchgs_nxt_fk` bigint(20) unsigned DEFAULT NULL COMMENT 'Foreign key to the next EXCHANGES record after the current EXCHANGES record in the chain of exchanges resulting in this analytics record. NULL indicates that this is the last analytics record in the chain.', `da_drives_fk` bigint(20) unsigned NOT NULL, `da_media_fk` bigint(20) unsigned NOT NULL, `exchg_elapsed_time` bigint(20) DEFAULT NULL COMMENT 'Elapsed time of drive move in hh:mm:ss format.', `exchg_mount_time` bigint(20) DEFAULT NULL COMMENT 'Total time in seconds that tapes were mounted on this drive.', `read_throughput` float DEFAULT '0' COMMENT 'The average read throughput over the total aggregate time period. ATP value. ', `write_throughput` float DEFAULT '0' COMMENT 'The average write throughput over the total aggregate time period.', `io_throughput` float DEFAULT '0' COMMENT 'The average read and write throughput, not a useful number for the drive but may be useful for system recommendations and optimizations.', `suspicion_level` float DEFAULT '0' COMMENT 'The latest calculated suspicion level for the drive. Value from last completed exchange either prior to or during this aggregate period.', `inefficient` tinyint(1) DEFAULT NULL COMMENT 'Does drive meet the write efficiency standard for this drive type. Value from last completed exchange either prior to or during this aggregate period. PIT value: 0=NO; 1=YES.', `marginal` tinyint(1) DEFAULT NULL COMMENT 'Does drive meet the read margin standard for this drive type. Value from last completed exchange either prior to or during this aggregate period. PIT value: 0=NO; 1=YES;', `health_enum` varchar(20) NOT NULL DEFAULT 'USE' COMMENT 'Reliability of the drive. Value from last completed exchange either prior to or during this aggregate period. PIT value: "USE", "MONITOR", "EVALUATE", "ACTION".', `exchg_err_status_enum` varchar(20) DEFAULT 'UNKNOWN' COMMENT '''FATAL_ERROR, READ_ERROR, DRIVE_ERROR, WRITE_ERROR, UNLOAD_ERROR, OTHER_ERROR, NON_DRV_ERROR, UNKNOWN, GOOD''', `suspicion_type` int(10) unsigned DEFAULT NULL, `read_ratio` float DEFAULT NULL, `write_ratio` float DEFAULT NULL, `io_ratio` float DEFAULT NULL, `time_spent_rw` int(11) DEFAULT NULL, `compression_ratio` float DEFAULT NULL, `mount_read_throughput` float DEFAULT NULL, `mount_write_throughput` float DEFAULT NULL, `mount_io_throughput` float DEFAULT NULL, `mb_since_last_clean` double DEFAULT NULL, `mb_for_last_clean` double DEFAULT NULL COMMENT 'The number of MB transferred before the last cleaning operation was performed. PIT value.', `num_critical_ta` tinyint(3) unsigned DEFAULT '0', `num_info_ta` tinyint(3) unsigned DEFAULT '0', `num_warning_ta` tinyint(3) unsigned DEFAULT '0', PRIMARY KEY (`drive_analytics_pk`), KEY `fk_drive_analytics_exchanges1` (`da_exchgs_prv_fk`), KEY `fk_drive_analytics_exchanges2` (`da_exchanges_fk`), KEY `fk_drive_analytics_exchanges3` (`da_exchgs_nxt_fk`), KEY `fk_drive_analytics_drives1` (`da_drives_fk`), KEY `fk_drive_analytics_media1` (`da_media_fk`), KEY `fk_drive_analytics_lkup_exchg_err_status1` (`exchg_err_status_enum`), KEY `fk_drive_analytics_lkup_health_enum1` (`health_enum`), KEY `idx_da_health_enum` (`health_enum`), CONSTRAINT `fk_drive_analytics_drives1` FOREIGN KEY (`da_drives_fk`) REFERENCES `drives` (`drives_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_drive_analytics_exchanges1` FOREIGN KEY (`da_exchgs_prv_fk`) REFERENCES `exchanges` (`exchanges_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_drive_analytics_exchanges2` FOREIGN KEY (`da_exchanges_fk`) REFERENCES `exchanges` (`exchanges_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_drive_analytics_exchanges3` FOREIGN KEY (`da_exchgs_nxt_fk`) REFERENCES `exchanges` (`exchanges_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_drive_analytics_lkup_exchg_err_status1` FOREIGN KEY (`exchg_err_status_enum`) REFERENCES `lkup_exchg_err_status` (`exchg_err_enum`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_drive_analytics_lkup_health_enum1` FOREIGN KEY (`health_enum`) REFERENCES `lkup_health_enum` (`health_enum`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_drive_analytics_media1` FOREIGN KEY (`da_media_fk`) REFERENCES `media` (`media_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `drive_properties` ( `drive_properties_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created. Automatically set to the CURRENT_TIME by MySQL when record is initially created in the DB. Not necessary for the application to set this value.', `dp_drives_fk` bigint(20) unsigned NOT NULL COMMENT 'Foreign key to DRIVES table.', `address` varchar(32) DEFAULT NULL COMMENT 'The drive''s device generic address (either logical or SCSI element ID) as a string. [Source: SNMP slDriveAddress]', `id` int(11) NOT NULL COMMENT 'The drive''s SCSI ID or FIBRE port assignment. [Source: SNMP slDriveID]', `firmware_level` varchar(32) NOT NULL COMMENT 'Drive’s firmware & interface level from an HLI record or the drive dismount data packet of the SNMP slTbiEventData trap. Sun: (firmware-TTI_level) - dash separator; HP: (firmware-interface) with dash sep;IBM: (firmware).', `is_wwn_enabled` tinyint(1) DEFAULT '0' COMMENT 'Is the drive''s world wide name option enabled? Values: 0=DISABLED; 1=ENABLED. NULL indicates an unknown condition. [Source: SNMP slDriveWWNEnabled]', `fc_node_wwn` varchar(32) DEFAULT NULL COMMENT 'Drive''s fibre node World Wide Name. [Source: SNMP slDriveFibreNodeName]', `fc_port_count` tinyint(4) NOT NULL COMMENT 'The number of active ports on the drive, 1=Single; 2=Dual. [Source: SNMP slDriveFibrePortCount]', `fc_port_a_wwn` varchar(32) DEFAULT NULL COMMENT 'Port A - world wide name. [Source: SNMP slDriveFibrePortAWWN]', `fc_port_a_address_mode_enum` varchar(8) DEFAULT 'UNKNOWN' COMMENT 'Port A - addressing mode. Values: "HARD," "SOFT". [Source: SNMP slDriveFibrePortAAddressingMode]', `is_fc_port_a_enabled` tinyint(1) DEFAULT '0' COMMENT 'Port A - is port enabled? Values: 0=NO; 1=YES, [Source: SNMP slDriveFibrePortAPortEnabled]', `fc_port_a_loop_id` int(11) DEFAULT NULL COMMENT 'Port A - loop ID [Source: SNMP slDriveFibrePortALoopId]', `fc_port_a_port_speed_enum` varchar(16) DEFAULT 'UNKNOWN' COMMENT 'Port A - port speed. Values: "1GBIT", "2GBIT", "4GBIT". UNKNOWN indicates an unknown speed. [Source: SNMP slDriveFibrePortAPortSpeed]', `fc_port_b_wwn` varchar(32) DEFAULT NULL COMMENT 'Port B - world wide name. [Source: SNMP slDriveFibrePortBWWN]', `fc_port_b_address_mode_enum` varchar(8) DEFAULT 'UNKNOWN' COMMENT 'Port B - addressing mode. Values: "HARD," "SOFT". [Source: SNMP slDriveFibrePortBAddressingMode]', `is_fc_port_b_enabled` tinyint(1) DEFAULT '0' COMMENT 'Port B - is port enabled? Values: "YES", "NO". [Source: SNMP slDriveFibrePortAPortEnabled]', `fc_port_b_loop_id` int(11) DEFAULT NULL COMMENT 'Port B - loop ID. [Source: SNMP slDriveFibrePortBLoopId]', `fc_port_b_port_speed_enum` varchar(16) DEFAULT 'UNKNOWN' COMMENT 'Port B - port speed. Values: "1GBIT", "2GBIT", "4GBIT". UNKNOWN indicates an unknown speed. [Source: SNMP slDriveFibrePortBPortSpeed]', `exist_start` datetime NOT NULL COMMENT 'Date this drive first appeared in the library.', `exist_end` datetime DEFAULT NULL COMMENT 'Date this drive ceased to exist in the library. NULL if it is still defined.', `is_latest` tinyint(4) DEFAULT '0' COMMENT 'Flag to indicate latest drive properties', `drive_tray_serial_num` varchar(32) DEFAULT NULL COMMENT 'Drive tray serial number.', `mdv_pool` tinyint(3) unsigned DEFAULT '0', PRIMARY KEY (`drive_properties_pk`), KEY `IDX_DP_DRIVES_FK` (`dp_drives_fk`), KEY `fk_drive_properties_lkup_fc_port_address_enum1` (`fc_port_a_address_mode_enum`), KEY `fk_drive_properties_lkup_fc_port_speed_enum1` (`fc_port_a_port_speed_enum`), KEY `fk_drive_properties_lkup_fc_port_address_enum2` (`fc_port_b_address_mode_enum`), KEY `fk_drive_properties_lkup_fc_port_speed_enum2` (`fc_port_b_port_speed_enum`), KEY `idx_dp_exist_end` (`exist_end`), KEY `idx_dp_latest` (`is_latest`), CONSTRAINT `DP_DRIVES_FK1` FOREIGN KEY (`dp_drives_fk`) REFERENCES `drives` (`drives_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_drive_properties_lkup_fc_port_address_enum1` FOREIGN KEY (`fc_port_a_address_mode_enum`) REFERENCES `lkup_fc_port_address_enum` (`port_address_type`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_drive_properties_lkup_fc_port_address_enum2` FOREIGN KEY (`fc_port_b_address_mode_enum`) REFERENCES `lkup_fc_port_address_enum` (`port_address_type`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_drive_properties_lkup_fc_port_speed_enum1` FOREIGN KEY (`fc_port_a_port_speed_enum`) REFERENCES `lkup_fc_port_speed_enum` (`speed_type`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_drive_properties_lkup_fc_port_speed_enum2` FOREIGN KEY (`fc_port_b_port_speed_enum`) REFERENCES `lkup_fc_port_speed_enum` (`speed_type`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `drive_stats` ( `DRIVE_STATS_PK` bigint(20) unsigned NOT NULL COMMENT 'Primary key.', `CREATED` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Date this record was created.', `DRVS_DRIVES_FK` bigint(20) unsigned NOT NULL COMMENT 'Foreign key to the DRIVES table.', `STATE` varchar(24) DEFAULT NULL COMMENT 'The drive''s state as a string, e.g. "EMPTY", "LOADED", "NEEDS CLEANING", etc. [Source: SNMP slDriveState ]', `OP_STATUS_ENUM` varchar(20) NOT NULL DEFAULT 'UNKNOWN' COMMENT 'The drive''s operational status. Values: "INITIALIZING", "EMPTY", "CARTRIDGEPRESENT", "LOADING", "LOADED", "CLEANING", "REWINDING", "UNLOADING", "INOPERATIVE", "NOTLOADABLE", "NOTUNLOADABLE". [Source: SNMP slDriveStatusEnum]', `GET_RETRIES` int(11) NOT NULL COMMENT 'The number of mount retries performed to the drive. [Source: SNMP slDriveGetRetries]', `LED_STATE_ENUM` varchar(8) NOT NULL DEFAULT 'OFF' COMMENT 'Drive tray LED state as string, i.e. ON, OFF, UNKNOWN. [Source: SNMP slDriveLED]', `PUT_RETRIES` int(11) NOT NULL COMMENT 'The number of dismount retries performed to the drive. [Source: SNMP slDrivePutRetries]', `CLEAN_COMMAND_ENUM` varchar(8) DEFAULT NULL COMMENT 'Signal to clean or cancel the cleaning of the drive. Values: "ENABLE", "CANCEL". [Source: SNMP slDriveCommandClean]', `CELL_STATUS_ENUM` varchar(25) NOT NULL DEFAULT 'UNKNOWN' COMMENT 'The status of the drive cell. Values: EMPTY, FULL. NULL indicates an unknown status. Source: SNMP slDriveCellStatusText]', `CELL_CONTENT_LABEL` varchar(32) DEFAULT NULL COMMENT 'The label of the cartridge in the drive (zero length string if empty; "??????" if unreadable). [Source: SNMP slDriveCellContentLabel]', `CELL_CONTENT_TYPE` varchar(32) DEFAULT NULL COMMENT 'The type of cartridge in the drive (zero length string if empty). [Source: SNMP slDriveCellContentType]', `IDLE_SECONDS` bigint(20) NOT NULL DEFAULT '0' COMMENT 'The number of seconds that the drive has been idle (un-mounted). [Source: SNMP slDriveIdleSeconds]', `NUM_MOUNTS` bigint(20) NOT NULL DEFAULT '0' COMMENT 'The number of mounts to the drive. [Source: SNMP slDriveNumMounts]', `ACQUIRED` datetime NOT NULL COMMENT 'Timestamp of when this data point was acquired.', PRIMARY KEY (`DRIVE_STATS_PK`), UNIQUE KEY `IDX_DRIVE_STATS_PK_UNQ` (`DRIVE_STATS_PK`), KEY `IDX_DRVS_DRIVES_FK` (`DRVS_DRIVES_FK`), KEY `fk_drive_stats_lkup_drive_op_status1` (`OP_STATUS_ENUM`), KEY `fk_drive_stats_lkup_cell_content_status_enum1` (`CELL_STATUS_ENUM`), KEY `fk_drive_stats_lkup_led_state1_idx` (`LED_STATE_ENUM`), CONSTRAINT `DRVS_DRIVES_FK1` FOREIGN KEY (`DRVS_DRIVES_FK`) REFERENCES `drives` (`drives_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_drive_stats_lkup_cell_content_status_enum1` FOREIGN KEY (`CELL_STATUS_ENUM`) REFERENCES `lkup_cell_content_status_enum` (`cell_content_status`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_drive_stats_lkup_drive_op_status1` FOREIGN KEY (`OP_STATUS_ENUM`) REFERENCES `lkup_drive_op_status` (`drive_op_status`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_drive_stats_lkup_led_state1` FOREIGN KEY (`LED_STATE_ENUM`) REFERENCES `lkup_led_state` (`led_state`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `drive_summaries` ( `drive_summaries_pk` bigint(20) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created. Automatically set to the CURRENT_TIME by MySQL when record is initially created in the DB. Not necessary for the application to set this value.', `ds_drives_fk` bigint(20) unsigned NOT NULL COMMENT 'The drive that his data is associated with.', `mb_rw` double DEFAULT '0' COMMENT 'The sum total of the MB read and MB written by this drive in this aggregation period.', `mb_written` double DEFAULT '0' COMMENT 'The cumulative number of MB written to this drive in this aggregation period. ATP value. [Source: Lib SNMP from COMPAT 23 Bytes # 47-55 or SMF21BW data.]', `mb_read` double DEFAULT '0' COMMENT 'The cumulative number of MB written to this drive in this aggregation period. ATP value. [Source: Lib SNMP from COMPAT 23 Bytes # 38-46 or SMF21BR data.]', `mounts` int(11) DEFAULT '0' COMMENT 'Cumulative number of times cartridges were loaded into this drive in this aggregation period. ATP values from the EXCHANGE data incremented on each exchange for this drive. Move data for cleaning tapes, unless cleaning also becomes an exchange.\n', `dismounts` int(11) DEFAULT '0' COMMENT 'Cumulative number of times cartridges have been unloaded from this drive in this aggregation period. ATP values from the EXCHANGE data incremented on each exchange for this drive. Move data for cleaning tapes, unless cleaning also becomes an exchange.', `errors` int(11) DEFAULT '0' COMMENT 'The cumulative number of drive errors for this drive in this aggregation period. ATP value. [Source: Lib SNMP from COMPAT 23 Bytes # 7 or SMF32 data]', `cleans` int(11) DEFAULT '0' COMMENT 'The cumulative number of times this drive has had a cleaning cartridge dismounted in this aggregation period. ATP value. [Source: From MOVES.CURRENT_CLEANING_USES. Data not in COMPAT 23.]', `write_efficiency_metric` float DEFAULT '0' COMMENT 'How much space is used up in the drive for a write operation based on the last exchange. PIT value from last completed exchange prior to or during this aggregate period. [Source: T10K drives only. Lib SNMP from COMPAT 23 Bytes # 27-31 or SMF32 data]', `read_margin` float DEFAULT '0' COMMENT 'The percentage of ECC check symbols available to correct a data group. PIT value from last exchange prior to or during this aggregate period. [Source: Lib SNMP from COMPAT 23 Bytes # 32-36 or SMF32 data]', `suspicion_level` float DEFAULT '0' COMMENT 'Latest calculated suspicion level for the drive. PIT value from last completed exchange prior to or during this aggregate period. [Source: calculation]', `was_load_limit_reported` tinyint(1) DEFAULT '0' COMMENT 'Have we exceeded the load specification for this drive? PIT value from last completed exchange prior to or during this aggregate period. Values: 0=NO, 1=YES. [Source: Lib SNMP from COMPAT 23 Byte #25 or SMF32CLN data]', `inefficient` tinyint(1) DEFAULT NULL, `marginal` tinyint(1) DEFAULT NULL COMMENT 'Does drive meet the read margin standard for this drive type. PIT value from last completed exchange prior to or during this aggregate period. Values: 0=NO; 1=YES. [Source: calculation]', `health_enum` varchar(20) NOT NULL DEFAULT 'USE' COMMENT 'Reliability of the drive. Value from last completed exchange either prior to or during this aggregate period. PIT value: "USE", "MONITOR", "EVALUATE", "ACTION".\n', `utilization` float DEFAULT '0' COMMENT 'Percentage of the total aggregate time period media has been loaded in this drive. ATP value. [Source: calculation]\n', `mount_time` bigint(20) DEFAULT '0' COMMENT 'Total time in seconds that media was mounted on this drive during this aggregation period.', `read_throughput` float DEFAULT '0' COMMENT 'The average read throughput over the total aggregate time period. ATP value. [Source: calculation]', `write_throughput` float DEFAULT '0' COMMENT 'The average write throughput over the total aggregate time period. ATP value. [Source: calculation]', `io_throughput` float DEFAULT '0' COMMENT 'The average read + write throughput, not a useful number for the drive but may be useful for system recommendations and optimizations. ATP value. [Source: calculation]', `exchg_err_status_enum` varchar(20) DEFAULT 'UNKNOWN' COMMENT 'Value from last completed exchange either prior to or during this aggregate period. PIT value: See lkup_exchg_err_status for valid values', `mb_for_last_clean` double DEFAULT NULL COMMENT 'The number of MB transferred before the last cleaning operation was performed. PIT value.', `mb_since_last_clean` double DEFAULT NULL COMMENT 'The number of MB transferred since the last cleaning operation was performed.', `ds_drive_properties_fk` bigint(20) unsigned NOT NULL COMMENT 'Foreign key to the DRIVE_PROPERTIES table.', `mb_sent` double unsigned DEFAULT '0' COMMENT 'The number of uncompressed data bytes transferred from the drive to the initiator or initiators during read command operations. This is the number of bytes transferred over external interface after decompression by the drive.', `mb_received` double unsigned DEFAULT '0' COMMENT 'The number of uncompressed data bytes received by the drive from the initiator or initiators during write command operations. This is the number of bytes transferred over external interface before compression by the drive.', `read_ratio` float unsigned DEFAULT '0', `write_ratio` float unsigned DEFAULT '0', `io_ratio` float unsigned DEFAULT '0', `mount_read_throughput` float unsigned DEFAULT '0', `mount_write_throughput` float unsigned DEFAULT '0', `mount_io_throughput` float unsigned DEFAULT '0', `read_mb_per_mount` float unsigned DEFAULT '0' COMMENT 'For this summary period, this is the total of the MB read, divided by the total number of exchanges. STP value.', `write_mb_per_mount` float unsigned DEFAULT '0' COMMENT 'For this summary period, this is the total of the MB written, divided by the total number of exchanges. STP value.', `rw_mb_per_mount` float unsigned DEFAULT '0' COMMENT 'For this summary period, this is the total of the MB read + MB written, divided by the total number of exchanges. STP value.', `lifetime_meters` double unsigned DEFAULT '0' COMMENT 'The number of meters of tape that has been moved across the head.', `lifetime_loads` int(10) unsigned DEFAULT '0', `lifetime_power_hours` int(10) unsigned DEFAULT '0' COMMENT 'The number of hours the drive has been powered on', `time_spent_reading` int(10) unsigned DEFAULT '0', `time_spent_writing` int(10) unsigned DEFAULT '0', `time_spent_rw` int(10) unsigned DEFAULT '0', `compression_ratio` float DEFAULT '0', `exchg_elapsed_time` bigint(20) DEFAULT NULL, `exchg_mount_time` bigint(20) unsigned DEFAULT NULL, `lifetime_cleans` int(10) unsigned DEFAULT '0', `summary_date` datetime DEFAULT NULL, `last_exchange_processed` datetime DEFAULT NULL, `lib_drive_health_enum` varchar(20) DEFAULT NULL COMMENT 'Value of the last drive status trap received for this drive.', `drive_snmp_trap_count` bigint(20) unsigned DEFAULT '0' COMMENT 'Number of drive status traps received for this drive.', `ds_drive_stats_fk` bigint(20) unsigned DEFAULT NULL, `last_mib_walk` datetime DEFAULT NULL, PRIMARY KEY (`drive_summaries_pk`), UNIQUE KEY `idx_uk_drive_summary` (`ds_drives_fk`,`summary_date`), KEY `idx_ds_drives_fk` (`ds_drives_fk`), KEY `idx_ds_drive_props_fk` (`ds_drive_properties_fk`), KEY `idx_summary_date` (`summary_date`), KEY `fk_drive_summaries_lkup_exchg_err_status1` (`exchg_err_status_enum`), KEY `fk_drive_summaries_lkup_health_enum1` (`health_enum`), KEY `idx_last_exchg_processed_ds` (`last_exchange_processed`), KEY `fk_drive_summaries_drive_stats1_idx` (`ds_drive_stats_fk`), CONSTRAINT `fk_drive_summaries_drive_stats1` FOREIGN KEY (`ds_drive_stats_fk`) REFERENCES `drive_stats` (`DRIVE_STATS_PK`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_drive_summaries_lkup_exchg_err_status1` FOREIGN KEY (`exchg_err_status_enum`) REFERENCES `lkup_exchg_err_status` (`exchg_err_enum`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_drive_summaries_lkup_health_enum1` FOREIGN KEY (`health_enum`) REFERENCES `lkup_health_enum` (`health_enum`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `FK_DS_DRIVES_FK` FOREIGN KEY (`ds_drives_fk`) REFERENCES `drives` (`drives_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `FK_DS_DRIVE_PROPS_FK` FOREIGN KEY (`ds_drive_properties_fk`) REFERENCES `drive_properties` (`drive_properties_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `drive_usage_milestone` ( `drive_usage_milestone_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `drive_usage_tracker_fk` bigint(20) unsigned DEFAULT NULL, `begin_date` datetime DEFAULT NULL, `end_date` datetime DEFAULT NULL, `last_updated` datetime DEFAULT NULL, `final_num_mounted_drives` smallint(6) DEFAULT NULL, `average_num_mounted_drives` float(10,5) unsigned DEFAULT NULL, `total_capacity` float(10,5) unsigned DEFAULT NULL, `used_capacity` float(10,5) unsigned DEFAULT NULL, `unused_capacity` float(10,5) unsigned DEFAULT NULL, `utilization_chart` text, PRIMARY KEY (`drive_usage_milestone_pk`), UNIQUE KEY `drive_usage_milestone_pk_UNIQUE` (`drive_usage_milestone_pk`), UNIQUE KEY `drive_usage_milestone_fld_UNIQUE` (`drive_usage_tracker_fk`,`begin_date`,`end_date`), KEY `fk_drive_usage_tracker_idx` (`drive_usage_tracker_fk`), CONSTRAINT `fk_drive_usage_tracker1` FOREIGN KEY (`drive_usage_tracker_fk`) REFERENCES `drive_usage_tracker` (`drive_usage_tracker_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `drive_usage_tracker` ( `drive_usage_tracker_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `library_complexes_fk` bigint(20) unsigned DEFAULT NULL, `libraries_fk` bigint(20) unsigned DEFAULT NULL, `rails_fk` bigint(20) unsigned DEFAULT NULL, `lkup_drives_fk` int(10) unsigned DEFAULT NULL, `statutory_period_type` varchar(1) NOT NULL, `last_updated` datetime DEFAULT NULL, `created_until` datetime DEFAULT NULL, PRIMARY KEY (`drive_usage_tracker_pk`), UNIQUE KEY `drive_usage_tracker_pk_UNIQUE` (`drive_usage_tracker_pk`), UNIQUE KEY `drive_usage_tracker_fld_UNIQUE` (`library_complexes_fk`,`libraries_fk`,`rails_fk`,`lkup_drives_fk`,`statutory_period_type`), KEY `fk_libraries1_idx` (`libraries_fk`), KEY `fk_library_complexes1_idx` (`library_complexes_fk`), KEY `fk_rails1_idx` (`rails_fk`), KEY `fk_lkup_drives1_idx` (`lkup_drives_fk`), CONSTRAINT `fk_libraries1` FOREIGN KEY (`libraries_fk`) REFERENCES `libraries` (`libraries_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_library_complexes1` FOREIGN KEY (`library_complexes_fk`) REFERENCES `library_complexes` (`library_complexes_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_lkup_drives1` FOREIGN KEY (`lkup_drives_fk`) REFERENCES `lkup_drives` (`lkup_drives_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_rails1` FOREIGN KEY (`rails_fk`) REFERENCES `rails` (`rails_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `drives` ( `drives_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created. Automatically set to the CURRENT_TIME by MySQL when record is initially created in the DB. Not necessary for the application to set this value.', `serial_number` varchar(32) NOT NULL DEFAULT '*NO-SERIAL*' COMMENT 'Drive serial number, e.g. 531004004520, if known. If not, set to *NO-SERIAL*', `interface_type_enum` varchar(8) NOT NULL DEFAULT 'UNKNOWN' COMMENT 'Interface type as string. Values: "UNKNOWN"; "SCSI"; "FIBRE". NULL indicates an unknown condition. [Source: SNMP slDriveInterfaceType]', `family_code` tinyint(4) NOT NULL COMMENT 'The drive family code. Unsigned value up to 255.', `is_encryption_capable` tinyint(4) DEFAULT '-1' COMMENT 'Is the drive capable of encryption? Values: 0=NO; 1=YES. NULL indicates an unknown condition.', `is_broken` tinyint(1) DEFAULT '0', `type_code` tinyint(3) unsigned DEFAULT NULL COMMENT 'Drive type code. An unsigned value up to 255', `type` varchar(45) DEFAULT NULL COMMENT 'Unused column', `model` varchar(20) DEFAULT 'UNKNOWN' COMMENT 'Drive model name as a string, e.g. STK9840, LTO, etc. [Source: SNMP slDriveType]', `vendor` varchar(20) DEFAULT 'UNKNOWN' COMMENT 'The drive vendor as a string, e.g. STK, IBM, QUANTUM, etc. [Source: SNMP slDriveVendor]', `exist_start` datetime NOT NULL COMMENT 'Date this drive first appeared in the library.', `exist_end` datetime DEFAULT NULL COMMENT 'Date this drive ceased to exist in the library. NULL if it is still defined.', PRIMARY KEY (`drives_pk`), KEY `fk_drives_lkup_drive_interface_types1` (`interface_type_enum`), KEY `idx_drive_serial_number` (`serial_number`), KEY `idx_drive_exist_end` (`exist_end`), KEY `idx_drive_is_broken` (`is_broken`), KEY `idx_drive_vendor` (`vendor`), KEY `idx_drive_exist_start` (`exist_start`), KEY `idx_drive_model` (`model`), CONSTRAINT `fk_drives_lkup_drive_interface_types1` FOREIGN KEY (`interface_type_enum`) REFERENCES `lkup_drive_interface_type_enum` (`interface_type`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `elevator_properties` ( `elevator_properties_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `ep_elevators_fk` bigint(20) unsigned DEFAULT NULL, `id` int(10) unsigned DEFAULT NULL, `app_version` varchar(32) DEFAULT NULL, `fw_version` varchar(32) DEFAULT NULL, `exist_start` datetime NOT NULL, `exist_end` datetime DEFAULT NULL, `is_latest` tinyint(3) unsigned DEFAULT NULL, PRIMARY KEY (`elevator_properties_pk`), KEY `idx_ep_exist_start1` (`exist_start`), KEY `idx_ep_exist_end1` (`exist_end`), KEY `fk_elevator_properties_elevators1_idx` (`ep_elevators_fk`), CONSTRAINT `fk_elevator_properties_elevators1` FOREIGN KEY (`ep_elevators_fk`) REFERENCES `elevators` (`elevators_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `elevator_stats` ( `elevator_stats_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `es_elevators_fk` bigint(20) unsigned DEFAULT NULL COMMENT 'Foreign key back to the elevators table.', `hand_status_enum` varchar(25) DEFAULT 'UNKNOWN' COMMENT 'Hand state of the elevator.', `led_state_enum` varchar(8) DEFAULT 'UNKNOWN' COMMENT 'State of the LED: ON, OFF, UNKNOWN.', `op_status_enum` varchar(20) DEFAULT NULL COMMENT 'Operational status: OK, ERROR, WARNING, INFO, TRACE.', `state` varchar(32) DEFAULT NULL COMMENT 'The elevator state: empty, loaded, moving, etc.', `num_elevator_get_retries` int(11) DEFAULT NULL, `num_elevator_put_retries` int(11) DEFAULT NULL, `num_elevator_get_fails` int(11) DEFAULT NULL, `num_elevator_put_fails` int(11) DEFAULT NULL, `num_elevator_get_totals` int(11) DEFAULT NULL, `num_elevator_put_totals` int(11) DEFAULT NULL, `acquired` datetime DEFAULT NULL, PRIMARY KEY (`elevator_stats_pk`), KEY `fk_elevator_stats_elevators1_idx` (`es_elevators_fk`), KEY `fk_elevator_stats_lkup_cell_content_status_enum1_idx` (`hand_status_enum`), KEY `fk_elevator_stats_lkup_device_op_status1_idx` (`op_status_enum`), KEY `fk_elevator_stats_lkup_led_state1_idx` (`led_state_enum`), CONSTRAINT `fk_elevator_stats_elevators1` FOREIGN KEY (`es_elevators_fk`) REFERENCES `elevators` (`elevators_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_elevator_stats_lkup_cell_content_status_enum1` FOREIGN KEY (`hand_status_enum`) REFERENCES `lkup_cell_content_status_enum` (`cell_content_status`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_elevator_stats_lkup_device_op_status1` FOREIGN KEY (`op_status_enum`) REFERENCES `lkup_device_op_status` (`device_op_status`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_elevator_stats_lkup_led_state1` FOREIGN KEY (`led_state_enum`) REFERENCES `lkup_led_state` (`led_state`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `elevator_summaries` ( `elevator_summaries_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `elevators_fk` bigint(20) unsigned NOT NULL, `elevator_stats_fk` bigint(20) unsigned DEFAULT NULL, `elevator_properties_fk` bigint(20) unsigned DEFAULT NULL, `num_elevator_get_retries` int(10) unsigned DEFAULT '0', `num_elevator_put_retries` int(10) unsigned DEFAULT '0', `num_elevator_get_fails` int(10) unsigned DEFAULT '0', `num_elevator_put_fails` int(10) unsigned DEFAULT '0', `num_elevator_get_totals` int(10) unsigned DEFAULT '0', `num_elevator_put_totals` int(10) unsigned DEFAULT '0', `lib_elevator_health_enum` varchar(20) DEFAULT NULL, `summary_date` datetime DEFAULT NULL, `last_mib_walk` datetime DEFAULT NULL, `num_snmp_traps` int(10) unsigned DEFAULT '0', PRIMARY KEY (`elevator_summaries_pk`), UNIQUE KEY `elevator_summaries_pk_UNIQUE` (`elevator_summaries_pk`), UNIQUE KEY `es_elevators_fk_summary_date_UNIQUE` (`elevators_fk`,`summary_date`), KEY `fk_es_lkup_top_level_condition_enum1_idx` (`lib_elevator_health_enum`), KEY `fk_elevator_summaries_elevators1_idx` (`elevators_fk`), KEY `fk_elevator_summaries_elevator_stats1_idx` (`elevator_stats_fk`), KEY `fk_elevator_summaries_elevator_properties1_idx` (`elevator_properties_fk`), CONSTRAINT `fk_elevator_summaries_elevators1_idx` FOREIGN KEY (`elevators_fk`) REFERENCES `elevators` (`elevators_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_elevator_summaries_elevator_properties1` FOREIGN KEY (`elevator_properties_fk`) REFERENCES `elevator_properties` (`elevator_properties_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_elevator_summaries_elevator_stats1` FOREIGN KEY (`elevator_stats_fk`) REFERENCES `elevator_stats` (`elevator_stats_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_es_lkup_top_level_condition_enum1` FOREIGN KEY (`lib_elevator_health_enum`) REFERENCES `lkup_top_level_condition_enum` (`top_level_condition`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `elevators` ( `elevators_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `serial_number` varchar(64) DEFAULT NULL, `hw_version` varchar(45) DEFAULT NULL, `is_broken` tinyint(1) DEFAULT '0', `exist_start` datetime NOT NULL, `exist_end` datetime DEFAULT NULL, PRIMARY KEY (`elevators_pk`), UNIQUE KEY `elevators_pk_UNIQUE` (`elevators_pk`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `email_history` ( `email_history_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `sent_time` datetime NOT NULL COMMENT 'Time the email was sent.', `alert_history_fk` bigint(20) unsigned DEFAULT NULL COMMENT 'Foreign key into alert_history table.', `user_rules_fk` bigint(20) unsigned DEFAULT NULL COMMENT 'User rule that caused email to be sent.', `email_origin_enum` varchar(16) NOT NULL DEFAULT 'NONE' COMMENT 'The process triggering the email. Values: UNKNOWN, NONE, ALERT, REPORT, ASR, MDV, TEST (see lkup_email_origins).', `annotation` varchar(128) DEFAULT NULL COMMENT 'Optional notes.', `email_from` varchar(128) NOT NULL COMMENT 'Email sender name or address.', `email_recipient` varchar(128) NOT NULL COMMENT 'Email recipient address.', `email_header` varchar(128) NOT NULL COMMENT 'Email header string.', `email_body` varchar(512) NOT NULL COMMENT 'Email body string.', `has_attachment` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'Email has attachment?', PRIMARY KEY (`email_history_pk`), UNIQUE KEY `email_history_pk_UNIQUE` (`email_history_pk`), KEY `em_sent_time_idx` (`sent_time`), KEY `em_event_fk1_idx` (`alert_history_fk`), KEY `em_rule_fk1_idx` (`user_rules_fk`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `email_recipients` ( `email_recipients_pk` bigint(20) NOT NULL, `email_address` varchar(255) NOT NULL, `locale_enum` varchar(64) DEFAULT 'EN', `timezone_enum` varchar(64) DEFAULT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `comments` varchar(128) DEFAULT NULL, PRIMARY KEY (`email_recipients_pk`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `ent_exchanges` ( `ent_exchanges_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `ee_exchanges_fk` bigint(20) unsigned NOT NULL COMMENT 'Foreign key to EXCHANGES table.', `fsc` varchar(4) DEFAULT NULL COMMENT 'Fault symptom code as a 4-byte hexidecimal value returned if there is an error, e.g. "FD55." Null otherwise.', `media_percent_eow` float DEFAULT NULL COMMENT 'Percentage of the media warrantee that has been used thus far. (Data source: HLI intermediate Dismount COMPAT 23, lsTBIDismount trap)', `media_percent_eol` float DEFAULT NULL COMMENT 'Percentage of the estimated media life that has been used thus far. (Data source: HLI intermediate Dismount COMPAT 23, lsTBIDismount trap)', `was_media_loadlimit_reported` tinyint(1) DEFAULT NULL COMMENT 'If the number of media loads exceeded warranty recommendations, was the cartridge load limit alert reported? Values: 0=NO; 1=YES. NULL indicates unknown. [Source: HLI intermediate dismount COMPAT 23, slTbiEventData]', `was_drive_loadlimit_reported` tinyint(1) DEFAULT NULL COMMENT 'If the number of drive loads exceeded the warranty recommendations, was the drive load limit alert reported? Values: 0=NO; 1=YES;. [Source: HLI intermediate dismount COMPAT 23, slTBIEventData]', `drive_percent_eol` float DEFAULT NULL COMMENT 'Drive usage as a percentage of its estimated end-of-life. Drive EOL is the same as its EOW. (Data source: HLI intermediate Dismount COMPAT 23, lsTBIDismount trap)', `write_efficiency_metric` float DEFAULT NULL COMMENT 'Latest write efficiency metric for this drive. See COMPAT 23 for definition.', `read_margin` float DEFAULT NULL COMMENT 'This is the "read margin percentage" reported by the drive. Aka: How much margin\nis left in recording for subsequent reads. See the COMPAT 21 for details.', `encryption_status` varchar(20) DEFAULT 'Unknown' COMMENT 'Encryption status of the media. Values: "NOT_ENCRYPTED", "ENCRYPTED_SUN", "ENCRYPTED_ANSI_10".', `block_error_rate_writes` smallint(5) unsigned DEFAULT NULL COMMENT 'Block error rate on writes for this exchange (defined COMPAT 23).', `block_error_rate_reads` smallint(5) unsigned DEFAULT NULL COMMENT 'Block error rate on reads for this exchange (defined COMPAT 23).', `degraded_read_channels` tinyint(3) unsigned DEFAULT NULL COMMENT 'Number of degraded read channels (defined COMPAT 23).', `degraded_write_channels` tinyint(3) unsigned DEFAULT NULL COMMENT 'Number of degraded write channels (defined COMPAT 23).', `degraded_servo_channels` tinyint(3) unsigned DEFAULT NULL COMMENT 'Number of degraded servo channels (defined COMPAT 23).', `servo_tracking_exceptions` smallint(5) unsigned DEFAULT NULL COMMENT 'Number of servo tracking exceptions (defined COMPAT 23).', `servo_perm_errors` smallint(5) unsigned DEFAULT NULL COMMENT 'Number of permanant servo errors (defined COMPAT 23).', `unload_perm_errors` smallint(5) unsigned DEFAULT NULL COMMENT 'Number of permanent unload errors (defined COMPAT 23).', `usage_perm_errors` smallint(5) unsigned DEFAULT NULL COMMENT 'Number of permanent unknown usage errors (defined COMPAT 23).', `time_spent_writing` int(11) DEFAULT NULL, `time_spent_reading` int(11) DEFAULT NULL, `time_spent_loading` int(11) DEFAULT NULL, `tape_repo_cycles` int(11) DEFAULT NULL, `tape_nonerp_repo_cycles` int(11) DEFAULT NULL, `meters_at_high_speed` bigint(20) DEFAULT NULL, `meters_at_head_contact` bigint(20) DEFAULT NULL, `ta_dump_avail` tinyint(4) DEFAULT NULL, `ta_down_level_drive` tinyint(4) DEFAULT NULL, `ta_write_warn` tinyint(4) DEFAULT NULL COMMENT 'Obsolete as of DB32.02, CR#7191810', `ta_tape_snapped` tinyint(4) DEFAULT NULL, `ta_mir_invalid_load` tinyint(4) DEFAULT NULL, `ta_event_log_near_full` tinyint(4) DEFAULT NULL, `ta_perm_err` tinyint(4) DEFAULT NULL, `ta_media_at_warranty_end` tinyint(4) DEFAULT NULL, `ta_rfid_open_at_load` tinyint(4) DEFAULT NULL, `ta_drive_maintenance` tinyint(4) DEFAULT NULL, `ta_unrec_load_failure` tinyint(4) DEFAULT NULL, `read_perm_errors` smallint(5) unsigned DEFAULT NULL, `write_perm_errors` smallint(5) unsigned DEFAULT NULL, `media_mb_available_post` double unsigned DEFAULT NULL COMMENT 'media-mb-available after the current exchange.', PRIMARY KEY (`ent_exchanges_pk`), KEY `fk_ent_exchanges_exchanges1` (`ee_exchanges_fk`), CONSTRAINT `fk_ent_exchanges_exchanges1` FOREIGN KEY (`ee_exchanges_fk`) REFERENCES `exchanges` (`exchanges_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `exchanges` ( `exchanges_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created. Automatically set to the CURRENT_TIME by MySQL when record is initially created in the DB. Not necessary for the application to set this value.', `ex_drives_fk` bigint(20) unsigned NOT NULL, `ex_drive_properties_fk` bigint(20) unsigned NOT NULL COMMENT 'Foreign key into the DRIVE_PROPERTIES table.', `ex_media_fk` bigint(20) unsigned NOT NULL, `ex_cells_src_fk` bigint(20) unsigned DEFAULT NULL COMMENT 'Foreign key to the source cell of the move.', `ex_cells_drives_fk` bigint(20) unsigned NOT NULL COMMENT 'Foreign key to the drive cell that contained or is currently containing the media.', `ex_cells_dst_fk` bigint(20) unsigned DEFAULT NULL COMMENT 'Foreign key to the destination cell of the move. If NULL then the move has not completed.', `ex_mount_moves_fk` bigint(20) unsigned DEFAULT NULL, `ex_dismount_moves_fk` bigint(20) unsigned DEFAULT NULL, `exchange_start` datetime NOT NULL COMMENT 'Timestamp of when the exchange started.', `exchange_end` datetime DEFAULT NULL COMMENT 'Timestamp of when the exchange was complete. NULL indicates this exchange is still in progress.', `mb_written` double unsigned DEFAULT NULL COMMENT 'Total number of megabytes written during the exchange.', `mb_read` double unsigned DEFAULT NULL COMMENT 'Total number of megabytes read during the exchange.', `mb_sent` double DEFAULT NULL COMMENT 'The number of data bytes transferred to the initiator or initiators during read command operations. This is the number of bytes transferred over SCSI, after decompression.', `mb_received` double DEFAULT NULL COMMENT 'The number of data bytes received from application clients during write command operations. This is the number of bytes transferred over SCSI, before compression.', `does_drive_need_cleaning` tinyint(1) DEFAULT NULL COMMENT 'Cleaning required, a non-volatile cleaning indication. Values: 0=NO; 1=YES. [Source: SNMP slTbiEventData]', `media_mounted` datetime DEFAULT NULL COMMENT 'The date and time stamp of when the tape was mounted in a drive. [Source: date/time of the load move record.]', `media_dismounted` datetime DEFAULT NULL COMMENT 'Date and timestamp of when the tape was dismounted from drive. [Source: date/time of the unload move record.]', `read_errs_corr_retry` smallint(5) unsigned DEFAULT NULL COMMENT 'Errors corrected with possible delays. Total number of errors corrected using retries.', `write_errs_corr_retry` smallint(5) unsigned DEFAULT NULL COMMENT 'Write errors corrected with possible delays. Total number of write errors corrected using retries.', `ta_read_warning` tinyint(3) unsigned DEFAULT NULL COMMENT 'Read warning.', `ta_hard_err` tinyint(3) unsigned DEFAULT NULL COMMENT 'Set for any unrecoverable read/write/positioning error, and is internally cleared when the media is ejected (this flag is set as in 5, or 6)', `ta_media_err` tinyint(3) unsigned DEFAULT NULL COMMENT 'Set for any unrecoverable read/write/positioning error that is due to faulty media, and is internally cleared when the media is ejected.', `ta_media_life` tinyint(3) unsigned DEFAULT NULL COMMENT 'Media life.', `ta_cm_failure` tinyint(3) unsigned DEFAULT NULL COMMENT 'Memory chip in cartridge failure.', `ta_clean_now` tinyint(3) unsigned DEFAULT NULL COMMENT 'Set when the tape drive detects it needs cleaning (i.e. when the cleaning LED is lit), and is internally cleared when the drive is successfully cleaned.', `ta_clean_periodic` tinyint(3) unsigned DEFAULT NULL COMMENT 'Clean periodic.', `ta_drive_temp` tinyint(3) unsigned DEFAULT NULL COMMENT 'Drive temperature.', `ta_predictive_failure` tinyint(3) unsigned DEFAULT NULL COMMENT 'Predictive failure of drive hardware.', `ta_lost_statistics` tinyint(3) unsigned DEFAULT NULL COMMENT 'Lost statistics.', `ta_directory_invalid_unload` tinyint(3) unsigned DEFAULT NULL COMMENT 'Tape directory invalid at unload.', `ta_sys_area_write_failure` tinyint(3) unsigned DEFAULT NULL COMMENT 'Tape system area write failure.', `ta_sys_area_read_failure` tinyint(3) unsigned DEFAULT NULL COMMENT 'Tape system area read failure.', `ta_loading_failure` tinyint(3) unsigned DEFAULT NULL COMMENT 'Loading failure.', `ta_fw_failure` tinyint(3) unsigned DEFAULT NULL COMMENT 'Firmware failure.', `mb_media_capacity` double unsigned DEFAULT NULL COMMENT 'Maximum capacity in partition (MB).', `media_serial_number` varchar(32) DEFAULT NULL COMMENT 'Manufacturer serial number.', `lifetime_cleans` int(10) unsigned DEFAULT NULL, `lifetime_loads` int(10) unsigned DEFAULT NULL, `lifetime_meters` double unsigned DEFAULT NULL, `lifetime_power_hours` int(10) unsigned DEFAULT NULL, `ta_expired_cleaning_tape` tinyint(4) DEFAULT NULL, `recording_technique` varchar(12) DEFAULT NULL, `alert_sent` tinyint(4) DEFAULT NULL, `data_rich` tinyint(1) unsigned DEFAULT NULL, `cal_media_mounted` datetime DEFAULT NULL COMMENT 'Calculated media mounted time based off of media_mounted, mount move time or exchange_start whichever is available', `cal_media_dismounted` datetime DEFAULT NULL COMMENT 'Calculated media dismounted time based off of media_dismounted, dismount move time or exchange_end whichever is available', `is_volsafe_cartridge` tinyint(4) DEFAULT '-1', `max_cleaning_uses` int(11) DEFAULT NULL, `sta_fsc` int(11) DEFAULT NULL COMMENT 'Errors detected by analytics or transformer in the drive or library.', `media_stats_fk` bigint(20) unsigned DEFAULT NULL, `msn_changed` tinyint(4) DEFAULT NULL COMMENT 'Flag to indicate if media serial number changed.', `ex_libraries_fk` bigint(20) unsigned DEFAULT NULL, `ex_library_properties_fk` bigint(20) unsigned DEFAULT NULL, `ta_write_warning` tinyint(3) unsigned DEFAULT NULL, `request_id` bigint(20) unsigned DEFAULT NULL, `mdv_type` tinyint(3) unsigned DEFAULT '0', `last_time_media_updated` datetime DEFAULT NULL, `ta_start_data_not_found` tinyint(3) unsigned DEFAULT NULL, PRIMARY KEY (`exchanges_pk`), KEY `fk_exchanges_drives1` (`ex_drives_fk`), KEY `fk_exchanges_drive_properties1` (`ex_drive_properties_fk`), KEY `fk_exchanges_media1` (`ex_media_fk`), KEY `fk_exchanges_cells1` (`ex_cells_src_fk`), KEY `fk_exchanges_cells_drives1` (`ex_cells_drives_fk`), KEY `fk_exchanges_cells2` (`ex_cells_dst_fk`), KEY `fk_exchanges_moves1` (`ex_mount_moves_fk`), KEY `fk_exchanges_moves2` (`ex_dismount_moves_fk`), KEY `idx_exchanges_alert_sent` (`alert_sent`), KEY `idx_exchange_start` (`exchange_start`), KEY `idx_exchange_end` (`exchange_end`), KEY `fk_exchanges_media_stats1` (`media_stats_fk`), KEY `fk_exchanges_libraries1` (`ex_libraries_fk`), KEY `fk_exchanges_library_properties1` (`ex_library_properties_fk`), KEY `last_time_media_updated1_idx` (`last_time_media_updated`), CONSTRAINT `fk_exchanges_cells1` FOREIGN KEY (`ex_cells_src_fk`) REFERENCES `cells` (`cells_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_exchanges_cells2` FOREIGN KEY (`ex_cells_dst_fk`) REFERENCES `cells` (`cells_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_exchanges_cells_drives1` FOREIGN KEY (`ex_cells_drives_fk`) REFERENCES `cells_drives` (`cells_drives_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_exchanges_drives1` FOREIGN KEY (`ex_drives_fk`) REFERENCES `drives` (`drives_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_exchanges_drive_properties1` FOREIGN KEY (`ex_drive_properties_fk`) REFERENCES `drive_properties` (`drive_properties_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_exchanges_libraries1` FOREIGN KEY (`ex_libraries_fk`) REFERENCES `libraries` (`libraries_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_exchanges_library_properties1` FOREIGN KEY (`ex_library_properties_fk`) REFERENCES `library_properties` (`library_properties_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_exchanges_media1` FOREIGN KEY (`ex_media_fk`) REFERENCES `media` (`media_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_exchanges_media_stats1` FOREIGN KEY (`media_stats_fk`) REFERENCES `media_stats` (`media_stats_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_exchanges_moves1` FOREIGN KEY (`ex_mount_moves_fk`) REFERENCES `moves` (`MOVES_PK`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_exchanges_moves2` FOREIGN KEY (`ex_dismount_moves_fk`) REFERENCES `moves` (`MOVES_PK`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hourly_cap_summaries` ( `hourly_cap_summaries_pk` bigint(20) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `caps_fk` bigint(20) unsigned NOT NULL, `cap_stats_fk` bigint(20) unsigned DEFAULT NULL, `cap_properties_fk` bigint(20) unsigned DEFAULT NULL, `num_media_ejects` int(10) unsigned DEFAULT '0', `num_media_enters` int(10) unsigned DEFAULT '0', `num_cap_rotation_totals` int(10) unsigned DEFAULT '0', `num_cap_rotation_retries` int(10) unsigned DEFAULT '0', `num_cap_rotation_fails` int(10) unsigned DEFAULT '0', `num_cap_ipls` int(10) unsigned DEFAULT '0', `lib_cap_health_enum` varchar(20) DEFAULT NULL, `summary_date` datetime DEFAULT NULL, `last_mib_walk` datetime DEFAULT NULL, `num_snmp_traps` int(10) unsigned DEFAULT '0', PRIMARY KEY (`hourly_cap_summaries_pk`), UNIQUE KEY `hourly_cap_summaries_pk_UNIQUE` (`hourly_cap_summaries_pk`), UNIQUE KEY `caps_fk_summary_date_UNIQUE` (`cap_stats_fk`,`summary_date`), KEY `fk_hcs_lkup_top_level_condition_enum1_idx` (`lib_cap_health_enum`), KEY `fk_hrly_cap_summaries_caps1_idx` (`caps_fk`), KEY `fk_hrly_cap_summaries_cap_stats1_idx` (`cap_stats_fk`), KEY `fk_hrly_cap_summaries_cap_properties1_idx` (`cap_properties_fk`), CONSTRAINT `fk_hcs_lkup_top_level_condition_enum1` FOREIGN KEY (`lib_cap_health_enum`) REFERENCES `lkup_top_level_condition_enum` (`top_level_condition`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_hrly_cap_summaries_caps1` FOREIGN KEY (`caps_fk`) REFERENCES `caps` (`caps_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_hrly_cap_summaries_cap_properties1` FOREIGN KEY (`cap_properties_fk`) REFERENCES `cap_properties` (`cap_properties_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_hrly_cap_summaries_cap_stats1` FOREIGN KEY (`cap_stats_fk`) REFERENCES `cap_stats` (`cap_stats_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hourly_collection_summaries` ( `hourly_collection_summaries_pk` bigint(20) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `collection_fk` bigint(20) unsigned NOT NULL, `collection_type` tinyint(3) unsigned NOT NULL DEFAULT '0', `num_drive_bays` int(10) unsigned DEFAULT '0', `num_drive_bays_allocated` int(10) unsigned DEFAULT '0', `num_drive_bays_unallocated` int(10) unsigned DEFAULT '0', `num_media_cells` int(10) unsigned DEFAULT '0', `num_media_cells_allocated` int(10) unsigned DEFAULT '0', `num_media_cells_unallocated` int(10) unsigned DEFAULT '0', `mb_rw` double unsigned DEFAULT '0', `mb_read` double unsigned DEFAULT '0', `mb_written` double unsigned DEFAULT '0', `num_enters` int(10) unsigned DEFAULT '0', `num_ejects` int(10) unsigned DEFAULT '0', `num_cleans` int(10) unsigned DEFAULT '0', `num_mounts` bigint(20) unsigned DEFAULT '0', `num_dismounts` bigint(20) unsigned DEFAULT '0', `mb_sent` double unsigned DEFAULT '0', `mb_received` double unsigned DEFAULT '0', `drive_utilization` float unsigned DEFAULT '0', `total_cartridge_capacity` int(10) unsigned DEFAULT '0', `average_free_cells` int(10) unsigned DEFAULT '0', `max_free_cells` int(10) unsigned DEFAULT '0', `min_free_cells` int(10) unsigned DEFAULT '0', `average_used_cells` int(10) unsigned DEFAULT '0', `cartridge_movements` int(10) unsigned DEFAULT '0', `oldest_last_access_date` datetime DEFAULT NULL, `cartridge_utilization` float unsigned DEFAULT '0', `last_exchange_processed` datetime DEFAULT NULL, `summary_date` datetime DEFAULT NULL, `cart_util_band_unknown` int(10) unsigned DEFAULT '0', `cart_util_band_0` int(10) unsigned DEFAULT '0', `cart_util_band_1` int(10) unsigned DEFAULT '0', `cart_util_band_2` int(10) unsigned DEFAULT '0', `cart_util_band_3` int(10) unsigned DEFAULT '0', `cart_util_band_4` int(10) unsigned DEFAULT '0', `cart_util_band_5` int(10) unsigned DEFAULT '0', PRIMARY KEY (`hourly_collection_summaries_pk`), UNIQUE KEY `hourly_collection_summaries_pk_UNIQUE` (`hourly_collection_summaries_pk`), UNIQUE KEY `collection_fk_summary_date_UNIQUE` (`collection_fk`,`summary_date`), KEY `idx_last_exchange_processed` (`last_exchange_processed`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hourly_drive_summaries` ( `hourly_drive_summaries_pk` bigint(20) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `drives_fk` bigint(20) unsigned NOT NULL, `mb_rw` double DEFAULT '0', `mb_written` double DEFAULT '0', `mb_read` double DEFAULT '0', `mounts` int(11) DEFAULT '0', `dismounts` int(11) DEFAULT '0', `errors` int(11) DEFAULT '0', `cleans` int(11) DEFAULT '0', `write_efficiency_metric` float DEFAULT '0', `read_margin` float DEFAULT '0', `suspicion_level` float DEFAULT '0', `was_load_limit_reported` tinyint(1) DEFAULT '0', `inefficient` tinyint(1) DEFAULT NULL, `marginal` tinyint(1) DEFAULT NULL, `health_enum` varchar(20) NOT NULL DEFAULT 'USE', `utilization` float DEFAULT '0', `mount_time` bigint(20) DEFAULT '0', `read_throughput` float DEFAULT '0', `write_throughput` float DEFAULT '0', `io_throughput` float DEFAULT '0', `exchg_err_status_enum` varchar(20) DEFAULT 'UNKNOWN', `mb_for_last_clean` double DEFAULT NULL, `mb_since_last_clean` double DEFAULT NULL, `drive_properties_fk` bigint(20) unsigned NOT NULL, `mb_sent` double unsigned DEFAULT '0', `mb_received` double unsigned DEFAULT '0', `read_ratio` float unsigned DEFAULT '0', `write_ratio` float unsigned DEFAULT '0', `io_ratio` float unsigned DEFAULT '0', `mount_read_throughput` float unsigned DEFAULT '0', `mount_write_throughput` float unsigned DEFAULT '0', `mount_io_throughput` float unsigned DEFAULT '0', `read_mb_per_mount` float unsigned DEFAULT '0', `write_mb_per_mount` float unsigned DEFAULT '0', `rw_mb_per_mount` float unsigned DEFAULT '0', `lifetime_meters` double unsigned DEFAULT '0', `lifetime_loads` int(10) unsigned DEFAULT '0', `lifetime_power_hours` int(10) unsigned DEFAULT '0', `time_spent_reading` int(10) unsigned DEFAULT '0', `time_spent_writing` int(10) unsigned DEFAULT '0', `time_spent_rw` int(10) unsigned DEFAULT '0', `compression_ratio` float DEFAULT '0', `exchg_elapsed_time` bigint(20) DEFAULT NULL, `exchg_mount_time` bigint(20) unsigned DEFAULT NULL, `lifetime_cleans` int(10) unsigned DEFAULT '0', `summary_date` datetime DEFAULT NULL, `last_exchange_processed` datetime DEFAULT NULL, `lib_drive_health_enum` varchar(20) DEFAULT NULL, `drive_snmp_trap_count` bigint(20) unsigned DEFAULT '0', `drive_stats_fk` bigint(20) unsigned DEFAULT NULL, `last_mib_walk` datetime DEFAULT NULL, `capacity_utilization` float unsigned DEFAULT '0', PRIMARY KEY (`hourly_drive_summaries_pk`), UNIQUE KEY `drives_fk_summary_date1_UNIQUE` (`drives_fk`,`summary_date`), KEY `fk_hds_drives1_idx` (`drives_fk`), KEY `fk_hds_drive_properties1_idx` (`drive_properties_fk`), KEY `fk_hds_lkup_exchg_err_status1_idx` (`exchg_err_status_enum`), KEY `fk_hds_lkup_health_enum1_idx` (`health_enum`), KEY `fk_hds_drive_stats1_idx` (`drive_stats_fk`), KEY `last_exchange_processed1_idx` (`last_exchange_processed`), KEY `summary_date1_idx` (`summary_date`), CONSTRAINT `fk_hds_drives1` FOREIGN KEY (`drives_fk`) REFERENCES `drives` (`drives_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_hds_drive_properties1` FOREIGN KEY (`drive_properties_fk`) REFERENCES `drive_properties` (`drive_properties_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_hds_drive_stats1` FOREIGN KEY (`drive_stats_fk`) REFERENCES `drive_stats` (`DRIVE_STATS_PK`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_hds_lkup_exchg_err_status1` FOREIGN KEY (`exchg_err_status_enum`) REFERENCES `lkup_exchg_err_status` (`exchg_err_enum`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_hds_lkup_health_enum1` FOREIGN KEY (`health_enum`) REFERENCES `lkup_health_enum` (`health_enum`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hourly_elevator_summaries` ( `hourly_elevator_summaries_pk` bigint(20) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `elevators_fk` bigint(20) unsigned NOT NULL, `elevator_stats_fk` bigint(20) unsigned DEFAULT NULL, `elevator_properties_fk` bigint(20) unsigned DEFAULT NULL, `num_elevator_get_retries` int(10) unsigned DEFAULT '0', `num_elevator_put_retries` int(10) unsigned DEFAULT '0', `num_elevator_get_fails` int(10) unsigned DEFAULT '0', `num_elevator_put_fails` int(10) unsigned DEFAULT '0', `num_elevator_get_totals` int(10) unsigned DEFAULT '0', `num_elevator_put_totals` int(10) unsigned DEFAULT '0', `lib_elevator_health_enum` varchar(20) DEFAULT NULL, `summary_date` datetime DEFAULT NULL, `last_mib_walk` datetime DEFAULT NULL, `num_snmp_traps` int(10) unsigned DEFAULT '0', PRIMARY KEY (`hourly_elevator_summaries_pk`), UNIQUE KEY `hourly_elevator_summaries_pk_UNIQUE` (`hourly_elevator_summaries_pk`), UNIQUE KEY `elevators_fk_summaries_date_UNIQUE` (`elevators_fk`,`summary_date`), KEY `fk_hes_lkup_top_level_condition_enum1_idx` (`lib_elevator_health_enum`), KEY `fk_hrly_elev_summaries_elevators1_idx` (`elevators_fk`), KEY `fk_hrly_elev_summaries_elevator_stats1_idx` (`elevator_stats_fk`), KEY `fk_hrly_elev_summaries_elevator_properties1_idx` (`elevator_properties_fk`), CONSTRAINT `fk_hes_lkup_top_level_condition_enum1` FOREIGN KEY (`lib_elevator_health_enum`) REFERENCES `lkup_top_level_condition_enum` (`top_level_condition`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_hrly_elev_summaries_elevators1` FOREIGN KEY (`elevators_fk`) REFERENCES `elevators` (`elevators_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_hrly_elev_summaries_elevator_properties1` FOREIGN KEY (`elevator_properties_fk`) REFERENCES `elevator_properties` (`elevator_properties_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_hrly_elev_summaries_elevator_stats1` FOREIGN KEY (`elevator_stats_fk`) REFERENCES `elevator_stats` (`elevator_stats_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hourly_library_summaries` ( `hourly_library_summaries_pk` bigint(20) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `hls_libraries_fk` bigint(20) unsigned NOT NULL, `hls_library_properties_fk` bigint(20) unsigned NOT NULL, `hls_libraries_stats_fk` bigint(20) unsigned DEFAULT NULL, `num_partitions` int(10) unsigned DEFAULT '0', `num_drive_bays` int(10) unsigned DEFAULT '0', `num_drive_bays_allocated` int(10) unsigned DEFAULT '0', `num_drive_bays_unallocated` int(10) unsigned DEFAULT '0', `num_media_cells` int(10) unsigned DEFAULT '0', `num_media_cells_allocated` int(10) unsigned DEFAULT '0', `num_media_cells_unallocated` int(10) unsigned DEFAULT '0', `num_miscellaneous_cells` int(10) unsigned DEFAULT '0', `mb_rw` double unsigned DEFAULT '0', `mb_read` double unsigned DEFAULT '0', `mb_written` double unsigned DEFAULT '0', `num_enters` int(10) unsigned DEFAULT '0', `num_ejects` int(10) unsigned DEFAULT '0', `num_cleans` int(10) unsigned DEFAULT '0', `num_mounts` bigint(20) unsigned DEFAULT '0', `num_dismounts` bigint(20) unsigned DEFAULT '0', `num_library_snmp_traps` bigint(20) unsigned DEFAULT '0', `last_boot_date` datetime DEFAULT NULL, `last_mib_walk` datetime DEFAULT NULL, `mb_sent` double unsigned DEFAULT '0', `mb_received` double unsigned DEFAULT '0', `drive_utilization` float unsigned DEFAULT '0', `summary_date` datetime DEFAULT NULL, `last_exchange_processed` datetime DEFAULT NULL, `num_ptp_enters` int(10) unsigned DEFAULT '0', `num_ptp_ejects` int(10) unsigned DEFAULT '0', `total_host_requests` smallint(5) unsigned DEFAULT '0', `total_host_db_sync_requests` smallint(5) unsigned DEFAULT '0', `total_host_request_timeouts` smallint(5) unsigned DEFAULT '0', `num_caps` smallint(5) unsigned DEFAULT '0', `num_elevators` smallint(5) unsigned DEFAULT '0', `num_ptps` smallint(5) unsigned DEFAULT '0', `num_robots` smallint(5) unsigned DEFAULT '0', `clean_enabled` tinyint(3) unsigned DEFAULT '0', `accum_library_uptime` bigint(20) unsigned DEFAULT '0', `num_boots` int(10) unsigned DEFAULT '0', `num_cleaning_cartridges` int(10) unsigned DEFAULT '0', `num_cleaning_exp_cartridges` int(10) unsigned DEFAULT '0', `num_free_sys_storage_cells` int(10) unsigned DEFAULT '0', `num_get_totals` int(10) unsigned DEFAULT '0', `num_mdv_drives` int(10) unsigned DEFAULT '0', `num_mdv_media` int(10) unsigned DEFAULT '0', `num_moves` int(10) unsigned DEFAULT '0', `num_put_totals` int(10) unsigned DEFAULT '0', `num_sys_storage_cells` int(10) unsigned DEFAULT '0', `average_free_cells` int(10) unsigned DEFAULT '0', `average_used_cells` int(10) unsigned DEFAULT '0', `cartridge_movements` int(10) unsigned DEFAULT '0', `cartridge_utilization` float unsigned DEFAULT '0', `maximum_free_cells` int(10) unsigned DEFAULT '0', `minimum_free_cells` int(10) unsigned DEFAULT '0', `oldest_last_access_date` datetime DEFAULT NULL, `total_cartridge_capacity` int(10) unsigned DEFAULT '0', `cart_util_band_unknown` int(10) unsigned DEFAULT '0', `cart_util_band_0` int(10) unsigned DEFAULT '0', `cart_util_band_1` int(10) unsigned DEFAULT '0', `cart_util_band_2` int(10) unsigned DEFAULT '0', `cart_util_band_3` int(10) unsigned DEFAULT '0', `cart_util_band_4` int(10) unsigned DEFAULT '0', `cart_util_band_5` int(10) unsigned DEFAULT '0', PRIMARY KEY (`hourly_library_summaries_pk`), UNIQUE KEY `hourly_library_summaries_pk_UNIQUE` (`hourly_library_summaries_pk`), UNIQUE KEY `hls_libraries_fk_summary_date_UNIQUE` (`hls_libraries_fk`,`summary_date`), KEY `idx_last_exchange_processed` (`last_exchange_processed`), KEY `fk_hrly_library_summaries_libraries1_idx` (`hls_libraries_fk`), KEY `fk_hrly_library_summaries_library_properties1_idx` (`hls_library_properties_fk`), KEY `fk_hrly_library_summaries_library_stats1_idx` (`hls_libraries_stats_fk`), CONSTRAINT `fk_hrly_library_summaries_libraries1` FOREIGN KEY (`hls_libraries_fk`) REFERENCES `libraries` (`libraries_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_hrly_library_summaries_library_properties1` FOREIGN KEY (`hls_library_properties_fk`) REFERENCES `library_properties` (`library_properties_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_hrly_library_summaries_library_stats1` FOREIGN KEY (`hls_libraries_stats_fk`) REFERENCES `library_stats` (`LIBRARY_STATS_PK`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hourly_ptp_summaries` ( `hourly_ptp_summaries_pk` bigint(20) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `ptps_fk` bigint(20) unsigned NOT NULL, `ptp_stats_fk` bigint(20) unsigned DEFAULT NULL, `ptp_properties_fk` bigint(20) unsigned DEFAULT NULL, `num_ptp_move_retries` int(10) unsigned DEFAULT '0', `num_ptp_move_fails` int(10) unsigned DEFAULT '0', `num_ptp_move_totals` int(10) unsigned DEFAULT '0', `lib_ptp_health_enum` varchar(20) DEFAULT NULL, `summary_date` datetime DEFAULT NULL, `last_mib_walk` datetime DEFAULT NULL, `num_snmp_traps` int(10) unsigned DEFAULT '0', PRIMARY KEY (`hourly_ptp_summaries_pk`), UNIQUE KEY `hourly_ptp_summaries_pk_UNIQUE` (`hourly_ptp_summaries_pk`), UNIQUE KEY `ptps_fk_summary_date_UNIQUE` (`ptps_fk`,`summary_date`), KEY `fk_hps_lkup_top_level_condition_enum1_idx` (`lib_ptp_health_enum`), KEY `fk_hrly_ptp_summaries_ptps1_idx` (`ptps_fk`), KEY `fk_hrly_ptp_summaries_ptp_stats1_idx` (`ptp_stats_fk`), KEY `fk_hrly_ptp_summaries_ptp_properties1_idx` (`ptp_properties_fk`), CONSTRAINT `fk_hps_lkup_top_level_condition_enum10` FOREIGN KEY (`lib_ptp_health_enum`) REFERENCES `lkup_top_level_condition_enum` (`top_level_condition`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_hrly_ptp_summaries_ptps1` FOREIGN KEY (`ptps_fk`) REFERENCES `ptps` (`ptps_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_hrly_ptp_summaries_ptp_properties1` FOREIGN KEY (`ptp_properties_fk`) REFERENCES `ptp_properties` (`ptp_properties_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_hrly_ptp_summaries_ptp_stats1` FOREIGN KEY (`ptp_stats_fk`) REFERENCES `ptp_stats` (`ptp_stats_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hourly_robot_summaries` ( `hourly_robot_summaries_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `robots_fk` bigint(20) unsigned NOT NULL, `robot_stats_fk` bigint(20) unsigned DEFAULT NULL, `robot_properties_fk` bigint(20) unsigned DEFAULT NULL, `num_robot_get_retries` int(10) unsigned DEFAULT '0', `num_robot_put_retries` int(10) unsigned DEFAULT '0', `num_robot_get_fails` int(10) unsigned DEFAULT '0', `num_robot_put_fails` int(10) unsigned DEFAULT '0', `num_robot_get_totals` int(10) unsigned DEFAULT '0', `num_robot_put_totals` int(10) unsigned DEFAULT '0', `num_robot_reboots` smallint(5) unsigned DEFAULT '0', `num_robot_commanded_reboots` smallint(5) unsigned DEFAULT '0', `lib_robot_health_enum` varchar(20) DEFAULT NULL, `robot_health_enum` varchar(20) DEFAULT NULL, `summary_date` datetime DEFAULT NULL, `last_mib_walk` datetime DEFAULT NULL, `num_snmp_traps` int(10) unsigned DEFAULT '0', PRIMARY KEY (`hourly_robot_summaries_pk`), UNIQUE KEY `hourly_robot_summaries_pk_UNIQUE` (`hourly_robot_summaries_pk`), UNIQUE KEY `robots_fk_summary_date_UNIQUE` (`robots_fk`,`summary_date`), KEY `fk_hrs_lkup_top_level_condition_enum1_idx` (`lib_robot_health_enum`), KEY `fk_hrly_robot_summaries_robots1_idx` (`robots_fk`), KEY `fk_hrly_robot_summaries_robot_stats1_idx` (`robot_stats_fk`), KEY `fk_hrly_robot_summaries_robot_properties1_idx` (`robot_properties_fk`), KEY `fk_hrly_robot_summaries_lkup_health_enum1_idx` (`robot_health_enum`), CONSTRAINT `fk_hrly_robot_summaries_lkup_health_enum1` FOREIGN KEY (`robot_health_enum`) REFERENCES `lkup_health_enum` (`health_enum`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_hrly_robot_summaries_robots1` FOREIGN KEY (`robots_fk`) REFERENCES `robots` (`robots_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_hrly_robot_summaries_robot_properties1` FOREIGN KEY (`robot_properties_fk`) REFERENCES `robot_properties` (`robot_properties_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_hrly_robot_summaries_robot_stats1` FOREIGN KEY (`robot_stats_fk`) REFERENCES `robot_stats` (`robot_stats_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_hrs_lkup_top_level_condition_enum1` FOREIGN KEY (`lib_robot_health_enum`) REFERENCES `lkup_top_level_condition_enum` (`top_level_condition`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `inform_transform_log` ( `inform_transform_log_pk` bigint(20) unsigned NOT NULL, `exchange_fk` bigint(20) unsigned DEFAULT NULL, `snmp_inform_fk` bigint(20) DEFAULT NULL, `event_description` varchar(1024) DEFAULT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`inform_transform_log_pk`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `libraries` ( `libraries_pk` bigint(20) unsigned NOT NULL COMMENT 'Primary key.', `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created in the database.', `li_library_complexes_fk` bigint(20) unsigned NOT NULL COMMENT 'Foreign key to a LIBRARY_COMPLEX.', `serial_number` varchar(32) NOT NULL COMMENT 'Serial number of the library.', `model` varchar(20) NOT NULL COMMENT 'Model number of the library.', `hw_version` varchar(16) NOT NULL COMMENT 'The library controller hardware Engineering Change (EC) level. [Source: SNMP slLibVersionHardware]', `exist_start` datetime NOT NULL COMMENT 'Date when this LIBRARY came into existence.', `exist_end` datetime DEFAULT NULL COMMENT 'Date this LIBRARY ceased to exist. NULL indicates it is still in existence.', `snmp_lib_connects_fk` bigint(20) unsigned NOT NULL, PRIMARY KEY (`libraries_pk`), KEY `fk_snmp_lib_connects` (`snmp_lib_connects_fk`), KEY `fk_libraries_library_complexes1` (`li_library_complexes_fk`), KEY `fk_libraries_lkup_library_models1` (`model`), KEY `idx_libraries_exist_end` (`exist_end`), CONSTRAINT `fk_libraries_library_complexes1` FOREIGN KEY (`li_library_complexes_fk`) REFERENCES `library_complexes` (`library_complexes_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_libraries_lkup_library_models1` FOREIGN KEY (`model`) REFERENCES `lkup_library_models` (`model`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_snmp_lib_connects` FOREIGN KEY (`snmp_lib_connects_fk`) REFERENCES `snmp_lib_connects` (`snmp_lib_connects_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `library_complexes` ( `library_complexes_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `id` int(11) DEFAULT NULL COMMENT 'The complex identifier. [Source: SNMP slLibComplexId]', `name` varchar(32) DEFAULT NULL, `base_model` varchar(20) DEFAULT NULL COMMENT 'base model enumeration for the library', `max_libs` tinyint(4) DEFAULT NULL COMMENT 'The maximum number of libraries indentified within a complex. [Source: SNMP slLibLibraryIdMax]', `exist_start` datetime DEFAULT NULL COMMENT 'Date when this LIBRARY_COMPLEX came into existence.', `exist_end` datetime DEFAULT NULL COMMENT 'Date this LIBRARY_COMPLEX ceased to exist. NULL indicates that it is still in existence.', PRIMARY KEY (`library_complexes_pk`), UNIQUE KEY `IDX_LIBRARY_COMPLEXES_PK_UNQ` (`library_complexes_pk`), KEY `idx_lc_exist_end` (`exist_end`), KEY `idx_lc_name` (`name`), KEY `idx_lc_exist_start` (`exist_start`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `library_properties` ( `library_properties_pk` bigint(20) unsigned NOT NULL COMMENT 'Primary key.', `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created in the database.', `lp_libraries_fk` bigint(20) unsigned NOT NULL COMMENT 'Foreign key into the LIBRARIES table.', `id` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'The library identifier (n of Max) within a library complex. [OID: slLibLibraryId]', `name` varchar(32) DEFAULT NULL COMMENT 'User-assigned library name.', `wwn` varchar(32) DEFAULT NULL COMMENT 'The library World Wide Name.', `fw_version` varchar(64) DEFAULT NULL COMMENT 'The library embedded firmware version, i.e., the released firmware update jar-file manifest version. [Source: SNMP slLibVersionFirmRev]', `fw_date` datetime DEFAULT NULL COMMENT 'The library embedded firmware build date. [Source: SNMP slLibVersionFirmDate]\n', `os_version` varchar(16) DEFAULT NULL COMMENT 'The library boot software/OS version. [Source: SNMP slLibVersionBootRev]', `exist_start` datetime NOT NULL COMMENT 'Date when this set of LIBRARY_PROPERTIES came into existence.', `exist_end` datetime DEFAULT NULL COMMENT 'Date this LIBRARY_PROPERTIES record ceased to exist. NULL indicates it is still in existence.', `error_status_enum` varchar(24) DEFAULT NULL COMMENT 'Indicates fw-down-level. NULL if no error. "FW_DOWN_LEVEL"', PRIMARY KEY (`library_properties_pk`), UNIQUE KEY `IDX_LIBRARY_PROPERTIES_PK_UNQ` (`library_properties_pk`), KEY `IDX_LP_LIBRARIES_FK` (`lp_libraries_fk`), KEY `fk_library_properties_lkup_lib_error_status_enum1` (`error_status_enum`), KEY `idx_lp_exist_end` (`exist_end`), KEY `idx_lp_name` (`name`), CONSTRAINT `fk_library_properties_lkup_lib_error_status_enum1` FOREIGN KEY (`error_status_enum`) REFERENCES `lkup_lib_error_status_enum` (`error_status_enum`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `LIB_PROPS_LIBRARIES_FK1` FOREIGN KEY (`lp_libraries_fk`) REFERENCES `libraries` (`libraries_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `library_stats` ( `LIBRARY_STATS_PK` bigint(20) unsigned NOT NULL, `CREATED` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Date this record was created.', `LS_LIBRARIES_FK` bigint(20) unsigned NOT NULL, `NUM_BOOTS` int(11) NOT NULL DEFAULT '0' COMMENT 'The number of library initializations. [Source: SNMP slLibStatsNumBoots]', `NUM_DOOR_OPENS` int(11) NOT NULL DEFAULT '0' COMMENT 'The number of times the service door has been opened. [Source: SNMP slLibStatsNumDoorOpens]', `NUM_GET_RETRIES` int(11) NOT NULL DEFAULT '0' COMMENT 'The total number of Get retries. [Source: SNMP slLibStatsNumGetRetries]', `NUM_GET_FAILS` int(11) NOT NULL DEFAULT '0' COMMENT 'The total number of Get failures. [Source: SNMP slLibStatsNumGetFails]', `NUM_PUT_RETRIES` int(11) NOT NULL DEFAULT '0' COMMENT 'The total number of Put retries. [Source: SNMP slLibStatsNumPutRetries]', `NUM_PUT_FAILS` int(11) NOT NULL DEFAULT '0' COMMENT 'The total number of Put failures. [Source: SNMP slLibStatsNumPutFails]', `NUM_LABEL_RETRIES` int(11) NOT NULL DEFAULT '0' COMMENT 'The total number of label read retries. [Source: SNMP slLibStatsNumLabelRetries]', `NUM_LABEL_FAILS` int(11) NOT NULL DEFAULT '0' COMMENT 'The total number of label read failures. [Source: SNMP slLibStatsNumLabelFails]', `NUM_TARGET_RETRIES` int(11) NOT NULL DEFAULT '0' COMMENT 'The total number of target read retries. [Source: SNMP slLibStatsNumTargetRetries]', `NUM_TARGET_FAILS` int(11) NOT NULL DEFAULT '0' COMMENT 'The total number of target read failures. [Source: SNMP slLibStatsNumTargetFails]', `NUM_MOVES` bigint(20) NOT NULL DEFAULT '0' COMMENT 'The total number of cartridge moves. [Source: SNMP slLibStatsNumMoves]', `NUM_MOUNTS` bigint(20) NOT NULL DEFAULT '0' COMMENT 'The total number of mounts. [Source: SNMP slLibStatsNumMounts]', `NUM_TARGET_READS` bigint(20) NOT NULL DEFAULT '0' COMMENT 'The total number of target reads. [Source: SNMP slLibStatsNumTargetReads]', `NUM_EMPTY_READS` bigint(20) NOT NULL DEFAULT '0' COMMENT 'The total number of empty cell reads. [Source: SNMP NumEmptyReads]', `NUM_LABEL_READS` bigint(20) NOT NULL DEFAULT '0' COMMENT 'The total number of label reads. [Source: SNMP slLibStatsNumLabelReads]', `GET_TOTALS` bigint(20) NOT NULL DEFAULT '0' COMMENT 'Sum of all Get operations of individual robots. [Source: SNMP slLibStatsGetTotals]', `PUT_TOTALS` bigint(20) NOT NULL DEFAULT '0' COMMENT 'Sum of all Put operations of individual robots. [Source: SNMP slLibStatsPutTotals]', `CUM_MACHINE_UPTIME` bigint(20) NOT NULL DEFAULT '0' COMMENT 'Cumulative machine up time in seconds. [Source: SNMP slLibStatsCumMachUptime]', `UPTIME_SINCE_LAST_BOOT` bigint(20) NOT NULL DEFAULT '0' COMMENT 'Machine up time since last reboot in seconds. [Source: SNMP slLibStatsUpTimeSinceLastBoot]', `clean_enabled_enum` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'Auto clean feature configuration. Not all libraries suport this feature. Values are ENABLED, DISABLED, and NULL. NULL indicates an UNKNOWN status. [Source: SNMP slLibCleanEnabled]', `ACQUIRED` datetime NOT NULL COMMENT 'Timestamp of when this data point was acquired from the library.', `num_storage_cells` int(11) DEFAULT NULL COMMENT 'number of all storage cells', `num_free_storage_cells` int(11) DEFAULT NULL COMMENT 'number of storage cells w/o media', `num_free_sys_storage_cells` int(11) DEFAULT NULL COMMENT 'number of free cells available to the system', `num_drives` int(11) DEFAULT NULL COMMENT 'number of licensed drives', `num_media` int(11) DEFAULT NULL COMMENT 'number of licensed media', `num_cleaning_cartridges` int(11) DEFAULT NULL COMMENT 'licensed number of cleaning cartridges', `last_boot_date` datetime DEFAULT NULL, PRIMARY KEY (`LIBRARY_STATS_PK`), UNIQUE KEY `IDX_LIBRARY_STATS_PK_UNQ` (`LIBRARY_STATS_PK`), KEY `IDX_LS_LIBRARIES_FK` (`LS_LIBRARIES_FK`), CONSTRAINT `LS_LIBRARIES_FK1` FOREIGN KEY (`LS_LIBRARIES_FK`) REFERENCES `libraries` (`libraries_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `library_summaries` ( `library_summaries_pk` bigint(20) unsigned NOT NULL COMMENT 'Primary key.', `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Date and time this record was created in the database.', `ls_libraries_fk` bigint(20) unsigned NOT NULL COMMENT 'Foreign key into the LIBRARIES table. ', `ls_library_properties_fk` bigint(20) unsigned NOT NULL COMMENT 'Foreign key into the LIBARY_PROPERTIES table.', `num_partitions` int(10) unsigned DEFAULT '0' COMMENT 'Total number of partitions at the end of the aggregation period.', `num_drive_bays` int(10) unsigned DEFAULT '0' COMMENT 'Total number of drive bays at the end of the aggregation period.', `num_drive_bays_allocated` int(10) unsigned DEFAULT '0' COMMENT 'Number of occupied drive bays at the end of the aggregation period.', `num_drive_bays_unallocated` int(10) unsigned DEFAULT '0' COMMENT 'Number of unoccupied drive bays at the end of the aggregation period.', `num_media_cells` int(10) unsigned DEFAULT '0' COMMENT 'Total number of media storage cells at the end of the aggregation period.', `num_media_cells_allocated` int(10) unsigned DEFAULT '0' COMMENT 'Number of storage cells that are occupied during this aggregation period.', `num_media_cells_unallocated` int(10) unsigned DEFAULT '0' COMMENT 'Number of storage cells that are unoccupied during this aggregation period.', `num_miscellaneous_cells` int(10) unsigned DEFAULT '0' COMMENT 'Total number of library cells used for other purposed, i.e. system, drive, CAP, PTP, robot hand.', `mb_rw` double unsigned DEFAULT '0' COMMENT 'Total megabytes read and written for all drives during this aggregation period.', `mb_read` double unsigned DEFAULT '0' COMMENT 'Number of megabytes read from all drives during this aggregation period.\n', `mb_written` double unsigned DEFAULT '0' COMMENT 'Number of megabytes written to all drives during this aggregation period.', `num_enters` int(10) unsigned DEFAULT '0' COMMENT 'Number of media entered into the CAPs during this aggregation period.', `num_ejects` int(10) unsigned DEFAULT '0' COMMENT 'Number of media ejected through the CAPs during this aggregation period.', `num_cleans` int(10) unsigned DEFAULT '0' COMMENT 'Total number of cleaning activities during this aggregation period.', `num_mounts` bigint(20) unsigned DEFAULT '0', `num_dismounts` bigint(20) unsigned DEFAULT '0' COMMENT 'Number of exchanges completed during this aggregation period.', `num_library_snmp_traps` bigint(20) unsigned DEFAULT '0' COMMENT 'Number of SNMP traps received from the library during this aggregation period.', `last_boot_date` datetime DEFAULT NULL COMMENT 'Date and time the library was last booted prior to or during this aggregation period.', `last_mib_walk` datetime DEFAULT NULL COMMENT 'Date and time that the last library MIB walk was completed.', `mb_sent` double unsigned DEFAULT '0' COMMENT 'The number of uncompressed data bytes transferred from the drive to the initiator or initiators during read command operations. This is the number of bytes transferred over external interface after decompression by the drive.', `mb_received` double unsigned DEFAULT '0' COMMENT 'The number of uncompressed data bytes received by the drive from the initiator or initiators during write command operations. This is the number of bytes transferred over external interface before compression by the drive.', `drive_utilization` float unsigned DEFAULT '0' COMMENT 'The drive utilization for all drives in the library over the aggregation period.', `summary_date` datetime DEFAULT NULL, `last_exchange_processed` datetime DEFAULT NULL, `num_ptp_enters` int(10) unsigned DEFAULT '0' COMMENT 'Number of enters through the PTP.', `num_ptp_ejects` int(10) unsigned DEFAULT '0' COMMENT 'Number of ejects through the PTP.', `total_host_db_sync_requests` smallint(5) unsigned DEFAULT '0', `total_host_request_timeouts` smallint(5) unsigned DEFAULT '0', `total_host_requests` smallint(5) unsigned DEFAULT '0', `num_caps` smallint(5) unsigned DEFAULT '0', `num_elevators` smallint(5) unsigned DEFAULT '0', `num_ptps` smallint(5) unsigned DEFAULT '0', `num_robots` smallint(5) unsigned DEFAULT '0', `ls_library_stats_fk` bigint(20) unsigned DEFAULT NULL, `clean_enabled` tinyint(3) unsigned DEFAULT '0', `accum_library_uptime` bigint(20) unsigned DEFAULT '0', `num_boots` int(10) unsigned DEFAULT '0', `num_cleaning_cartridges` int(10) unsigned DEFAULT '0', `num_cleaning_exp_cartridges` int(10) unsigned DEFAULT '0', `num_free_sys_storage_cells` int(10) unsigned DEFAULT '0', `num_get_totals` int(10) unsigned DEFAULT '0', `num_mdv_drives` int(10) unsigned DEFAULT '0', `num_mdv_media` int(10) unsigned DEFAULT '0', `num_moves` int(10) unsigned DEFAULT '0', `num_put_totals` int(10) unsigned DEFAULT '0', `num_sys_storage_cells` int(10) unsigned DEFAULT '0', `average_free_cells` int(10) unsigned DEFAULT '0', `average_used_cells` int(10) unsigned DEFAULT '0', `cartridge_movements` int(10) unsigned DEFAULT '0', `cartridge_utilization` float unsigned DEFAULT '0', `maximum_free_cells` int(10) unsigned DEFAULT '0', `minimum_free_cells` int(10) unsigned DEFAULT '0', `oldest_last_access_date` datetime DEFAULT NULL, `total_cartridge_capacity` int(10) unsigned DEFAULT '0', `cart_util_band_unknown` int(10) unsigned DEFAULT '0', `cart_util_band_0` int(10) unsigned DEFAULT '0', `cart_util_band_1` int(10) unsigned DEFAULT '0', `cart_util_band_2` int(10) unsigned DEFAULT '0', `cart_util_band_3` int(10) unsigned DEFAULT '0', `cart_util_band_4` int(10) unsigned DEFAULT '0', `cart_util_band_5` int(10) unsigned DEFAULT '0', PRIMARY KEY (`library_summaries_pk`), UNIQUE KEY `idx_uq_lib_summary_date` (`ls_libraries_fk`,`summary_date`), KEY `idx_ls_libraries_fk` (`ls_libraries_fk`), KEY `idx_ls_lib_props_fk` (`ls_library_properties_fk`), KEY `idx_summary_date` (`summary_date`), KEY `idx_last_exchg_processed_ls` (`last_exchange_processed`), KEY `fk_library_summaries_library_stats1_idx` (`ls_library_stats_fk`), CONSTRAINT `fk_library_summaries_library_stats1` FOREIGN KEY (`ls_library_stats_fk`) REFERENCES `library_stats` (`LIBRARY_STATS_PK`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_ls_libraries_fk` FOREIGN KEY (`ls_libraries_fk`) REFERENCES `libraries` (`libraries_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_ls_lib_props_fk` FOREIGN KEY (`ls_library_properties_fk`) REFERENCES `library_properties` (`library_properties_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `library_top_level` ( `library_top_level_pk` bigint(20) unsigned NOT NULL, `libraries_fk` bigint(20) unsigned NOT NULL, `top_level_condition_enum` varchar(20) DEFAULT NULL, `time_received` datetime DEFAULT NULL COMMENT ' ', `is_latest` tinyint(1) unsigned DEFAULT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`library_top_level_pk`), KEY `fk_library_top_level_libraries1` (`libraries_fk`), KEY `fk_library_top_level_lkup_top_level_condition_enum1` (`top_level_condition_enum`), KEY `idx_lib_top_level_is_latest` (`is_latest`), CONSTRAINT `fk_library_top_level_libraries1` FOREIGN KEY (`libraries_fk`) REFERENCES `libraries` (`libraries_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_library_top_level_lkup_top_level_condition_enum1` FOREIGN KEY (`top_level_condition_enum`) REFERENCES `lkup_top_level_condition_enum` (`top_level_condition`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_agg_types` ( `agg_type_pk` tinyint(3) unsigned NOT NULL, `agg_type` varchar(20) NOT NULL, PRIMARY KEY (`agg_type_pk`), UNIQUE KEY `agg_type_pk_UNIQUE` (`agg_type_pk`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_alert_severities` ( `id` tinyint(3) unsigned NOT NULL, `str` varchar(20) NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), UNIQUE KEY `str_UNIQUE` (`str`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_cap_access_state` ( `cap_access_state` varchar(8) NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`cap_access_state`), UNIQUE KEY `cap_access_state_UNIQUE` (`cap_access_state`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_cell_content_status_enum` ( `cell_content_status` varchar(25) NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`cell_content_status`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_cell_type_enum` ( `cell_type` varchar(20) NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`cell_type`), UNIQUE KEY `LKUP_CELL_TYPES_PK_UNIQUE` (`cell_type`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_clean_enabled_enum` ( `id` tinyint(3) unsigned NOT NULL, `str` varchar(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_data_crypto_enum` ( `crypto_alg` varchar(8) NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`crypto_alg`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_device_op_status` ( `device_op_status` varchar(20) NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`device_op_status`), UNIQUE KEY `device_op_status_unq` (`device_op_status`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_drive_fw_mapping` ( `in_fw` varchar(24) NOT NULL, `mapped_fw` varchar(24) DEFAULT NULL COMMENT 'Lookup table to translate drive firmware mappings to their equivalent firmware. Needed for temporary and future drive FW values.', `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`in_fw`), UNIQUE KEY `in_fw_UNIQUE` (`in_fw`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_drive_interface_type_enum` ( `interface_type` varchar(8) NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `interface_id` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`interface_type`), UNIQUE KEY `interface_type_UNIQUE` (`interface_type`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_drive_op_status` ( `drive_op_status` varchar(20) NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`drive_op_status`), UNIQUE KEY `DRIVE_OP_STATUS_UNIQUE` (`drive_op_status`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_drives` ( `lkup_drives_pk` int(10) unsigned NOT NULL, `vendor` varchar(20) DEFAULT NULL, `type` varchar(45) DEFAULT NULL COMMENT 'SNMP raw string value', `model` varchar(20) NOT NULL COMMENT 'Short string to represent model of the drive', `is_supported` tinyint(1) DEFAULT NULL COMMENT '1 = STA supported\n0 = not STA supported\n-1 = unknown', `is_encryption_capable` tinyint(4) DEFAULT NULL COMMENT 'Is the drive encryption capable\n1=yes\n0=no\n-1=unknown', `family_code` tinyint(4) DEFAULT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`lkup_drives_pk`), UNIQUE KEY `idx_lkup_drives_pk_unq` (`lkup_drives_pk`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_email_origins` ( `id` tinyint(3) unsigned NOT NULL, `str` varchar(20) NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), UNIQUE KEY `str_UNIQUE` (`str`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_exchg_err_status` ( `exchg_err_enum` varchar(20) NOT NULL COMMENT 'String value corresponding to the error code values:\nGOOD, UNLOAD_ERROR, READ_ERROR, WRITE_ERROR, OTHER_ERROR, NON_DRV_ERROR, UNKNOWN', `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Timestamp of when the record was created in the database.', PRIMARY KEY (`exchg_err_enum`), UNIQUE KEY `exchg_err_enum_UNIQUE` (`exchg_err_enum`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_fc_port_address_enum` ( `port_address_type` varchar(8) NOT NULL COMMENT 'HARD or SOFT', `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`port_address_type`), UNIQUE KEY `drive_type_UNIQUE` (`port_address_type`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_fc_port_speed_enum` ( `speed_type` varchar(16) NOT NULL COMMENT 'UNKNOWN, 1 GBIT, 2 GBIT, 4 GBIT', `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`speed_type`), UNIQUE KEY `drive_type_UNIQUE` (`speed_type`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_fsc` ( `lkup_fsc_pk` bigint(20) unsigned NOT NULL, `fsc_number` varchar(4) NOT NULL, `drive_error_enum` varchar(20) DEFAULT NULL, `media_error_enum` varchar(20) DEFAULT NULL, `drive_model` varchar(32) NOT NULL COMMENT 'Error type for this code range', `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`lkup_fsc_pk`), KEY `idx_drive_fsc` (`drive_model`,`fsc_number`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_ha_id` ( `ha_id` varchar(12) NOT NULL DEFAULT 'UNKNOWN', `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`ha_id`), UNIQUE KEY `idx_ha_id_unq` (`ha_id`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_ha_slot` ( `ha_slot` varchar(12) NOT NULL DEFAULT 'UNKNOWN', `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`ha_slot`), UNIQUE KEY `idx_ha_slot_unq` (`ha_slot`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_ha_state` ( `ha_state` varchar(12) NOT NULL DEFAULT 'UNKNOWN', `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`ha_state`), UNIQUE KEY `idx_ha_state_unq` (`ha_state`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_hash_crypto_enum` ( `hash_alg` varchar(10) NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`hash_alg`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_health_enum` ( `health_enum` varchar(20) NOT NULL COMMENT 'String value corresponding to health enum - USE, MONITOR, EVALUATE, ACTION, UNKNOWN', `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Timestamp of when the record was created in the database.', PRIMARY KEY (`health_enum`), UNIQUE KEY `health_enum_UQ` (`health_enum`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_led_state` ( `led_state` varchar(8) NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`led_state`), UNIQUE KEY `led_state_UNIQUE` (`led_state`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_lib_error_status_enum` ( `error_status_enum` varchar(24) NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`error_status_enum`), UNIQUE KEY `in_fw_UNIQUE` (`error_status_enum`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_library_models` ( `model` varchar(20) NOT NULL COMMENT 'Name of the media movement type.', `max_rails` int(11) DEFAULT NULL, `min_fw_revision` float DEFAULT NULL COMMENT 'Minimum version of firmware revision supported for this library models', `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `min_mdv_revision` float DEFAULT NULL, PRIMARY KEY (`model`), UNIQUE KEY `MOVE_TYPE_UNIQUE` (`model`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_life_enum` ( `life_enum` varchar(8) NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`life_enum`), UNIQUE KEY `LIFE_ENUM_UNIQUE` (`life_enum`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_mdv_status` ( `mdv_status_pk` tinyint(3) unsigned NOT NULL, `mdv_status` varchar(20) NOT NULL DEFAULT 'UNKNOWN', PRIMARY KEY (`mdv_status_pk`), UNIQUE KEY `mdv_status_pk_UNIQUE` (`mdv_status_pk`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_mdv_test_types` ( `mdv_test_type_pk` tinyint(3) unsigned NOT NULL, `mdv_test_type` varchar(32) NOT NULL DEFAULT 'NONE', PRIMARY KEY (`mdv_test_type_pk`), UNIQUE KEY `mdv_test_type_pk_UNIQUE` (`mdv_test_type_pk`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_media` ( `lkup_media_pk` int(10) unsigned NOT NULL, `manufacturer` varchar(20) DEFAULT NULL, `type` varchar(20) NOT NULL COMMENT 'SNMP raw string value', `long_type` varchar(45) NOT NULL COMMENT 'Short string to represent model of the drive', `is_volsafe` tinyint(4) DEFAULT '0' COMMENT 'Is the drive volsafe: yes=1, no=0, -1=unknown\n', `is_cleaning` tinyint(1) DEFAULT '0', `is_supported` tinyint(1) DEFAULT '1', `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `domain_code` varchar(1) DEFAULT NULL, `type_code` varchar(1) DEFAULT NULL, `initial_capacity` int(10) unsigned NOT NULL DEFAULT '0', `is_mdv` tinyint(1) unsigned DEFAULT '0', PRIMARY KEY (`lkup_media_pk`), UNIQUE KEY `idx_lkup_media_pk_unq` (`lkup_media_pk`), KEY `idx_lkup_media_supported` (`is_supported`), KEY `idx_domain_code_lm` (`domain_code`), KEY `idx_type_code_lm` (`type_code`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_mib_walk_status_enum` ( `mib_walk_status` varchar(20) NOT NULL COMMENT 'MIB-WALK-STATUS-ENUM', `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'UNKNOWN, NORMAL, DEGRADED, NONOPERATIVE', PRIMARY KEY (`mib_walk_status`), UNIQUE KEY `MOVE_TYPE_UNIQUE` (`mib_walk_status`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_move_types` ( `move_type` varchar(24) NOT NULL COMMENT 'Name of the media movement type.', `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`move_type`), UNIQUE KEY `MOVE_TYPE_UNIQUE` (`move_type`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_partition_type_enum` ( `partition_type` varchar(8) NOT NULL COMMENT 'Values - HLI, SCSI, OTHER', `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`partition_type`), UNIQUE KEY `MOVE_TYPE_UNIQUE` (`partition_type`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_snmp_traps` ( `OID` varchar(80) NOT NULL COMMENT 'Fully qualified OID.', `OID_LEVEL` tinyint(3) unsigned zerofill NOT NULL COMMENT 'Level number of the OID, i.e. usually the number in the last field of the fully qualified OID.', `NAME` varchar(32) NOT NULL COMMENT 'Trap name.', `DESCRIPTION` varchar(128) NOT NULL COMMENT 'Description of the trap.', `RELATED_TABLE` varchar(32) DEFAULT NULL, PRIMARY KEY (`OID`), UNIQUE KEY `IDX_OID_UNQ` (`OID`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_top_level_condition_enum` ( `top_level_condition` varchar(20) NOT NULL COMMENT 'Name of the media movement type.', `top_level_condition_num` int(11) DEFAULT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'UNKNOWN, NORMAL, DEGRADED, NONOPERATIVE', PRIMARY KEY (`top_level_condition`), UNIQUE KEY `top_level_condition_unq` (`top_level_condition`), KEY `top_level_condition_num_idx` (`top_level_condition_num`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_trap_type_enum` ( `trap_type` varchar(30) NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Valid values include:\nlibrary status\nsnmp agent start\nlibrary log\nlibrary environment check\nlibrary configuration\nPTP\nCAP\nDrive', PRIMARY KEY (`trap_type`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_type_identifiers` ( `id` tinyint(3) unsigned NOT NULL, `str` varchar(32) NOT NULL DEFAULT 'UNKNOWN', PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_warranty_enum` ( `warranty_enum` varchar(20) NOT NULL COMMENT 'String value corresponding to warranty enum to represent whether media is in or out of warranty. Values include - UNKNOWN, IN_WARRANTY, OUT_OF_WARRANTY', `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Timestamp of when the record was created in the database.', PRIMARY KEY (`warranty_enum`), UNIQUE KEY `warranty_enum_UQ` (`warranty_enum`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lkup_workflow_states` ( `id` tinyint(3) unsigned NOT NULL, `str` varchar(20) NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), UNIQUE KEY `str_UNIQUE` (`str`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `logical_groups` ( `logical_groups_pk` bigint(20) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `app_user_fk` bigint(20) unsigned DEFAULT NULL COMMENT 'App_users_pk of the user who created this logical group', `type` enum('Manual','Dynamic') NOT NULL DEFAULT 'Manual', `name` varchar(250) NOT NULL COMMENT 'The application user who created this logical group.', PRIMARY KEY (`logical_groups_pk`), UNIQUE KEY `logical_groups_pk_unq` (`logical_groups_pk`), KEY `app_user_fk1_idx` (`app_user_fk`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `logical_groups_app_users` ( `logical_groups_app_users_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `lgau_logical_groups_fk` bigint(20) unsigned NOT NULL COMMENT 'The PK of the logical group', `lgau_app_users_fk` bigint(20) unsigned NOT NULL COMMENT 'The PK of the app user', PRIMARY KEY (`logical_groups_app_users_pk`), KEY `fk_lgau_logical_groups1_idx` (`lgau_logical_groups_fk`), KEY `lgau_app_users_fk1_idx` (`lgau_app_users_fk`), CONSTRAINT `fk_lgau_logical_groups1` FOREIGN KEY (`lgau_logical_groups_fk`) REFERENCES `logical_groups` (`logical_groups_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `logical_groups_entities` ( `logical_groups_entities_pk` bigint(20) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `lge_logical_groups_fk` bigint(20) unsigned NOT NULL COMMENT 'The PK of the logical group', `lge_entity_fk` bigint(20) unsigned NOT NULL COMMENT 'Either the drive PK or media PK', `entity_type` tinyint(3) unsigned DEFAULT '0' COMMENT 'The entity type (''drive'' or ''media'')', PRIMARY KEY (`logical_groups_entities_pk`), KEY `fk_lge_logical_groups1_idx` (`lge_logical_groups_fk`), KEY `lge_entity_fk1_idx` (`lge_entity_fk`), KEY `entity_type1_idx` (`entity_type`), CONSTRAINT `fk_lge_logical_groups1` FOREIGN KEY (`lge_logical_groups_fk`) REFERENCES `logical_groups` (`logical_groups_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `lto_exchanges` ( `lto_exchanges_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `lt_exchanges_fk` bigint(20) unsigned NOT NULL COMMENT 'Foreign key to EXCHANGES table.', `lifetime_media_loads` int(11) DEFAULT NULL COMMENT 'Lifetime media loads.', `lifetime_motion_hours` int(11) DEFAULT NULL, `lifetime_hours_incompat` bigint(20) unsigned DEFAULT NULL COMMENT 'Lifetime medium motion (head) hours when an incompatible volume was last loaded.', `motion_hours_lst_clean` int(11) DEFAULT NULL COMMENT 'Medium motion (head) hours since the last successful cleaning operation..', `formatted_density_code` int(11) DEFAULT NULL, `media_manufacturer` varchar(20) DEFAULT NULL COMMENT 'Medium manufacturer.', `media_length` int(11) DEFAULT NULL COMMENT 'Medium length (meters).', `media_width` int(11) DEFAULT NULL COMMENT 'Medium width (units?)', `media_mfg_date` datetime DEFAULT NULL COMMENT 'Medium manufacture date (YYYYMMDD).', `media_mam_capacity` double DEFAULT NULL COMMENT 'MAM capacity (units?).', `media_type` tinyint(3) unsigned DEFAULT NULL COMMENT 'Medium type. Values: 0x00=DATA; 0x01=CLEANING; 0x80=WORM', `hp_media_status` tinyint(4) DEFAULT NULL, `hp_device_status` int(11) DEFAULT NULL COMMENT ' ', `ibm_media_efficiency` int(11) DEFAULT NULL, `ibm_drive_efficiency` int(11) DEFAULT NULL, `ta_cleaning_media` tinyint(4) DEFAULT NULL, `ta_diagnostics_required` tinyint(4) DEFAULT NULL, `ta_directory_corrupt` tinyint(4) DEFAULT NULL, `ta_drive_voltage` tinyint(4) DEFAULT NULL, `ta_eject_media` tinyint(4) DEFAULT NULL, `ta_firmware_download_fault` tinyint(4) DEFAULT NULL, `ta_forced_eject` tinyint(4) DEFAULT NULL, `ta_hardware_a` tinyint(4) DEFAULT NULL COMMENT 'Hardware A - Drive has HW fault that requires a reset to recover.', `ta_hardware_b` tinyint(4) DEFAULT NULL COMMENT 'Set when the tape drive fails its internal Power-On-Self-Tests (POST), and is not internally cleared until the drive is powered off.', `ta_interface_fault` tinyint(4) DEFAULT NULL, `ta_invalid_cleaning` tinyint(4) DEFAULT NULL COMMENT 'Invalid cleaning cartridge.', `ta_nearing_media_life` tinyint(4) DEFAULT NULL, `ta_not_data_grade` tinyint(4) DEFAULT NULL, `ta_read_failure` tinyint(4) DEFAULT NULL COMMENT 'Set for any unrecoverable read error where the diagnosis is uncertain and could either be faulty media or faulty drive hardware, and is internally cleared when the media is ejected.', `ta_read_only` tinyint(4) DEFAULT NULL, `ta_recover_mech_cart_failure` tinyint(4) DEFAULT NULL, `ta_unload_prevented` tinyint(4) DEFAULT NULL COMMENT 'Unload was attempted when prevent media removal was on.', `ta_unrecover_unload_failure` tinyint(4) DEFAULT NULL, `ta_unsupported_format` tinyint(4) DEFAULT NULL, `ta_worm_integrity_failure` tinyint(4) DEFAULT NULL COMMENT 'WORM medium - integrity check failed.', `ta_worm_overwrite_attempted` tinyint(4) DEFAULT NULL COMMENT 'WORM medium - overwrite attempted.', `ta_write_failure` tinyint(4) DEFAULT NULL, `ta_write_protect` tinyint(4) DEFAULT NULL COMMENT 'Attempt to write on write protected tape', `media_mb_available_pre` double unsigned DEFAULT NULL COMMENT 'media_mb_available prior to the current exchange.', `ta_automated_interface_failure` tinyint(3) unsigned DEFAULT NULL, `ta_diminished_native_capacity` tinyint(3) unsigned DEFAULT NULL, `ta_dual_port_failure` tinyint(3) unsigned DEFAULT NULL, `ta_unrecover_mech_cart_failure` tinyint(3) unsigned DEFAULT NULL, PRIMARY KEY (`lto_exchanges_pk`), KEY `fk_lto_exchanges_exchanges1` (`lt_exchanges_fk`), CONSTRAINT `fk_lto_exchanges_exchanges1` FOREIGN KEY (`lt_exchanges_fk`) REFERENCES `exchanges` (`exchanges_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `mdv_audits` ( `mdv_audits_pk` bigint(20) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `request_time` datetime DEFAULT NULL, `snmp_mib_walk_fk` bigint(20) unsigned DEFAULT NULL, `snmp_lib_connects_fk` bigint(20) unsigned DEFAULT NULL, `mdv_status_fk` tinyint(3) unsigned NOT NULL DEFAULT '0', `mdv_test_type_fk` tinyint(3) unsigned NOT NULL DEFAULT '0', `drive_id` int(11) DEFAULT NULL, `drive_serial_number` varchar(32) DEFAULT NULL, `lib_name` varchar(32) DEFAULT NULL, `lib_serial_number` varchar(32) DEFAULT NULL, `volser` varchar(32) DEFAULT NULL, `mdv_failure_detail` varchar(1024) DEFAULT NULL, `request_reason` varchar(2048) DEFAULT NULL, `mdv_initiator` varchar(32) DEFAULT NULL, PRIMARY KEY (`mdv_audits_pk`), UNIQUE KEY `mdv_audits_pk_UNIQUE` (`mdv_audits_pk`), KEY `fk_mdv_audits_snmp_lib_connects1_idx` (`snmp_lib_connects_fk`), KEY `fk_mdv_audits_snmp_mib_walk1_idx` (`snmp_mib_walk_fk`), KEY `fk_mdv_audits_lkup_mdv_test_type1_idx` (`mdv_test_type_fk`), KEY `fk_mdv_audits_lkup_mdv_status1_idx` (`mdv_status_fk`), CONSTRAINT `fk_mdv_audits_lkup_mdv_status1` FOREIGN KEY (`mdv_status_fk`) REFERENCES `lkup_mdv_status` (`mdv_status_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_mdv_audits_lkup_mdv_test_type1` FOREIGN KEY (`mdv_test_type_fk`) REFERENCES `lkup_mdv_test_types` (`mdv_test_type_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_mdv_audits_snmp_lib_connects1` FOREIGN KEY (`snmp_lib_connects_fk`) REFERENCES `snmp_lib_connects` (`snmp_lib_connects_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_mdv_audits_snmp_mib_walk1` FOREIGN KEY (`snmp_mib_walk_fk`) REFERENCES `snmp_mib_walk` (`snmp_mib_walk_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `mdv_ext_exchanges` ( `mdv_ext_exchanges_pk` bigint(20) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `mee_exchanges_fk` bigint(20) unsigned DEFAULT NULL, `revision_code` tinyint(3) unsigned DEFAULT NULL, `actuator_0f_nvo` int(10) unsigned DEFAULT NULL, `actuator_0r_nvo` int(10) unsigned DEFAULT NULL, `actuator_0f_r1vo` int(10) unsigned DEFAULT NULL, `actuator_0r_r1vo` int(10) unsigned DEFAULT NULL, `actuator_0f_r2vo` int(10) unsigned DEFAULT NULL, `actuator_0r_r2vo` int(10) unsigned DEFAULT NULL, `actuator_0f_bvo` int(10) unsigned DEFAULT NULL, `actuator_0r_bvo` int(10) unsigned DEFAULT NULL, `actuator_1f_nvo` int(10) unsigned DEFAULT NULL, `actuator_1r_nvo` int(10) unsigned DEFAULT NULL, `actuator_1f_r1vo` int(10) unsigned DEFAULT NULL, `actuator_1r_r1vo` int(10) unsigned DEFAULT NULL, `actuator_1f_r2vo` int(10) unsigned DEFAULT NULL, `actuator_1r_r2vo` int(10) unsigned DEFAULT NULL, `actuator_1f_bvo` int(10) unsigned DEFAULT NULL, `actuator_1r_bvo` int(10) unsigned DEFAULT NULL, `actuator_0_b7_nsot` int(10) unsigned DEFAULT NULL, `actuator_0_b0_nsot` int(10) unsigned DEFAULT NULL, `actuator_0_b7_thrsot` int(10) unsigned DEFAULT NULL, `actuator_0_b0_thrsot` int(10) unsigned DEFAULT NULL, `actuator_0_b7_vosot` int(10) unsigned DEFAULT NULL, `actuator_0_b0_vosot` int(10) unsigned DEFAULT NULL, `actuator_0_b7_presot` int(10) unsigned DEFAULT NULL, `actuator_0_b0_presot` int(10) unsigned DEFAULT NULL, `actuator_1_b7_nsot` int(10) unsigned DEFAULT NULL, `actuator_1_b0_nsot` int(10) unsigned DEFAULT NULL, `actuator_1_b7_thrsot` int(10) unsigned DEFAULT NULL, `actuator_1_b0_thrsot` int(10) unsigned DEFAULT NULL, `actuator_1_b7_vosot` int(10) unsigned DEFAULT NULL, `actuator_1_b0_vosot` int(10) unsigned DEFAULT NULL, `actuator_1_b7_presot` int(10) unsigned DEFAULT NULL, `actuator_1_b0_presot` int(10) unsigned DEFAULT NULL, `head_pes0_0` int(10) unsigned DEFAULT NULL, `head_pes0_1` int(10) unsigned DEFAULT NULL, `head_pes0_30` int(10) unsigned DEFAULT NULL, `head_pes0_31` int(10) unsigned DEFAULT NULL, `head_pes1_0` int(10) unsigned DEFAULT NULL, `head_pes1_1` int(10) unsigned DEFAULT NULL, `head_pes1_30` int(10) unsigned DEFAULT NULL, `head_pes1_31` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`mdv_ext_exchanges_pk`), UNIQUE KEY `mdv_ext_exchanges_pk_UNIQUE` (`mdv_ext_exchanges_pk`), KEY `fk_mdv_ext_exchanges_exchanges1_idx` (`mee_exchanges_fk`), CONSTRAINT `fk_mdv_ext_exchanges_exchanges1` FOREIGN KEY (`mee_exchanges_fk`) REFERENCES `exchanges` (`exchanges_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `mdv_policies` ( `mdv_policies_pk` bigint(20) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `last_modified` datetime NOT NULL, `exist_end` datetime DEFAULT NULL, `rule_parameter` int(10) unsigned DEFAULT NULL, `evaluation_order` int(10) unsigned DEFAULT NULL, `element_type` tinyint(3) unsigned DEFAULT NULL, `rule_type` tinyint(3) unsigned DEFAULT NULL, `validation_type_enum` varchar(20) DEFAULT NULL, `element_subtype` varchar(2) DEFAULT NULL, `name` varchar(80) DEFAULT NULL, `library_complexes_fk` bigint(20) unsigned DEFAULT NULL, `logical_groups_fk` bigint(20) unsigned DEFAULT NULL, `description` varchar(250) DEFAULT NULL, PRIMARY KEY (`mdv_policies_pk`), UNIQUE KEY `mdv_policies_pk_UNIQUE` (`mdv_policies_pk`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `mdv_queue` ( `mdv_queue_pk` bigint(20) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `request_time` datetime DEFAULT NULL, `mq_exchanges_fk` bigint(20) unsigned DEFAULT NULL, `mq_mdv_policies_fk` bigint(20) unsigned DEFAULT NULL, `mq_media_fk` bigint(20) unsigned DEFAULT NULL, `mq_drives_fk` bigint(20) unsigned DEFAULT NULL, `priority_order` bigint(20) DEFAULT NULL, `hlu_id_started` bigint(20) DEFAULT NULL, `hlu_id_completed` bigint(20) DEFAULT NULL, `elapsed_time` float DEFAULT NULL, `partition_started` smallint(5) unsigned DEFAULT NULL, `perm_status` tinyint(3) unsigned DEFAULT NULL, `partition_completed` tinyint(3) unsigned DEFAULT NULL, `request_state_enum` tinyint(3) unsigned DEFAULT NULL, `validation_type_enum` tinyint(3) unsigned DEFAULT NULL, `read_percentage` float unsigned DEFAULT NULL, `rqi` float unsigned DEFAULT NULL, `reason_text` varchar(128) DEFAULT NULL, `last_state_update_time` datetime DEFAULT NULL, `initiator` varchar(8) DEFAULT NULL, `libraries_fk` bigint(20) unsigned DEFAULT NULL, `stop_request` tinyint(1) unsigned DEFAULT NULL, `drive_qual` tinyint(1) unsigned DEFAULT NULL, PRIMARY KEY (`mdv_queue_pk`), UNIQUE KEY `mdv_queue_pk_UNIQUE` (`mdv_queue_pk`), KEY `fk_mdv_queue_exchanges1_idx` (`mq_exchanges_fk`), KEY `fk_mdv_queue_media1_idx` (`mq_media_fk`), KEY `fk_mdv_queue_drives1_idx` (`mq_drives_fk`), KEY `fk_mdv_queue_mdv_policies1` (`mq_mdv_policies_fk`), CONSTRAINT `fk_mdv_queue_drives1` FOREIGN KEY (`mq_drives_fk`) REFERENCES `drives` (`drives_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_mdv_queue_exchanges1` FOREIGN KEY (`mq_exchanges_fk`) REFERENCES `exchanges` (`exchanges_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_mdv_queue_mdv_policies1` FOREIGN KEY (`mq_mdv_policies_fk`) REFERENCES `mdv_policies` (`mdv_policies_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_mdv_queue_media1` FOREIGN KEY (`mq_media_fk`) REFERENCES `media` (`media_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `mdv_settings` ( `mdv_settings_pk` int(1), `mdv_enabled` int(1), `select_media` varchar(9), `reserved_drive_count` int(4) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `mdv_stnd_exchanges` ( `mdv_stnd_exchanges_pk` bigint(20) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `mse_exchanges_fk` bigint(20) unsigned DEFAULT NULL, `hlu_id_started` bigint(20) DEFAULT NULL, `hlu_id_completed` bigint(20) DEFAULT NULL, `num_matrix_read` int(10) unsigned DEFAULT NULL, `stddev_pes0` int(10) unsigned DEFAULT NULL, `stddev_pes1` int(10) unsigned DEFAULT NULL, `mir_count_write` int(10) unsigned DEFAULT NULL, `mir_count_read` int(10) unsigned DEFAULT NULL, `elapsed_time` float DEFAULT NULL, `msc_1` int(10) unsigned DEFAULT NULL, `msc_2` int(10) unsigned DEFAULT NULL, `msc_3` int(10) unsigned DEFAULT NULL, `msc_4` int(10) unsigned DEFAULT NULL, `msc_5` int(10) unsigned DEFAULT NULL, `msc_6` int(10) unsigned DEFAULT NULL, `msc_7` int(10) unsigned DEFAULT NULL, `msc_8` int(10) unsigned DEFAULT NULL, `msc_9` int(10) unsigned DEFAULT NULL, `msc_10` int(10) unsigned DEFAULT NULL, `msc_11` int(10) unsigned DEFAULT NULL, `msc_12` int(10) unsigned DEFAULT NULL, `msc_13` int(10) unsigned DEFAULT NULL, `msc_14` int(10) unsigned DEFAULT NULL, `msc_15` int(10) unsigned DEFAULT NULL, `msc_16` int(10) unsigned DEFAULT NULL, `band_0f_nvo` int(10) unsigned DEFAULT NULL, `band_0r_nvo` int(10) unsigned DEFAULT NULL, `band_0f_r1vo` int(10) unsigned DEFAULT NULL, `band_0r_r1vo` int(10) unsigned DEFAULT NULL, `band_0f_r2vo` int(10) unsigned DEFAULT NULL, `band_0r_r2vo` int(10) unsigned DEFAULT NULL, `band_0f_bvo` int(10) unsigned DEFAULT NULL, `band_0r_bvo` int(10) unsigned DEFAULT NULL, `band_1f_nvo` int(10) unsigned DEFAULT NULL, `band_1r_nvo` int(10) unsigned DEFAULT NULL, `band_1f_r1vo` int(10) unsigned DEFAULT NULL, `band_1r_r1vo` int(10) unsigned DEFAULT NULL, `band_1f_r2vo` int(10) unsigned DEFAULT NULL, `band_1r_r2vo` int(10) unsigned DEFAULT NULL, `band_1f_bvo` int(10) unsigned DEFAULT NULL, `band_1r_bvo` int(10) unsigned DEFAULT NULL, `band_0_b7_nsot` int(10) unsigned DEFAULT NULL, `band_0_b0_nsot` int(10) unsigned DEFAULT NULL, `band_0_b7_thrsot` int(10) unsigned DEFAULT NULL, `band_0_b0_thrsot` int(10) unsigned DEFAULT NULL, `band_0_b7_vosot` int(10) unsigned DEFAULT NULL, `band_0_b0_vosot` int(10) unsigned DEFAULT NULL, `band_0_b7_presot` int(10) unsigned DEFAULT NULL, `band_0_b0_presot` int(10) unsigned DEFAULT NULL, `band_1_b7_nsot` int(10) unsigned DEFAULT NULL, `band_1_b0_nsot` int(10) unsigned DEFAULT NULL, `band_1_b7_thrsot` int(10) unsigned DEFAULT NULL, `band_1_b0_thrsot` int(10) unsigned DEFAULT NULL, `band_1_b7_vosot` int(10) unsigned DEFAULT NULL, `band_1_b0_vosot` int(10) unsigned DEFAULT NULL, `band_1_b7_presot` int(10) unsigned DEFAULT NULL, `band_1_b0_presot` int(10) unsigned DEFAULT NULL, `mv_operation` int(10) unsigned DEFAULT NULL, `revision_code` tinyint(3) unsigned DEFAULT NULL, `dsc` tinyint(3) unsigned DEFAULT NULL, `blank_tape` tinyint(3) unsigned DEFAULT NULL, `recording_format` tinyint(3) unsigned DEFAULT NULL, `perm_status` tinyint(3) unsigned DEFAULT NULL, `partition_started` tinyint(3) unsigned DEFAULT NULL, `partition_completed` tinyint(3) unsigned DEFAULT NULL, `tape_efficiency` float unsigned DEFAULT NULL, `read_percentage` float unsigned DEFAULT NULL, `rqi` float unsigned DEFAULT NULL, PRIMARY KEY (`mdv_stnd_exchanges_pk`), UNIQUE KEY `mdv_stnd_exchanges_pk_UNIQUE` (`mdv_stnd_exchanges_pk`), KEY `fk_mdv_stnd_exchanges_exchanges1_idx` (`mse_exchanges_fk`), CONSTRAINT `fk_mdv_stnd_exchanges_exchanges1` FOREIGN KEY (`mse_exchanges_fk`) REFERENCES `exchanges` (`exchanges_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `media` ( `media_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created. Automatically set to the CURRENT_TIME by MySQL when record is initially created in the DB. Not necessary for the application to set this value.', `volser` varchar(32) NOT NULL COMMENT 'Volume serial number.', `type_code` varchar(1) DEFAULT NULL COMMENT 'Media type code. [Source: SMF Subtype 32 SMF32MED Cartridge Media Type]', `domain_code` varchar(1) DEFAULT NULL COMMENT 'Media domain code. [Source: SMF Subtype 32 SMF32DMN Cartridge Media Domain]', `description` varchar(40) DEFAULT NULL COMMENT 'Long description of the media. [Source: Look up from somewhere]', `is_cleaning` tinyint(1) DEFAULT '0' COMMENT 'Is this a cleaning tape? Values: 0=NO; 1=YES. NULL indicates unknown media type.', `is_host_accessible` tinyint(1) DEFAULT NULL COMMENT 'Is the media accessible by the host? Values: 0=NO; 1=YES. NULL indicates an unknown condition. [Source: SNMP slTapeHostAccessible]', `exist_start` datetime NOT NULL COMMENT 'Date this media came into existence.', `exist_end` datetime DEFAULT NULL COMMENT 'Date this media went out of existance. NULL if media is still active.', `serial_number` varchar(32) DEFAULT NULL, `type` varchar(20) DEFAULT NULL COMMENT 'Short description of the media type, e.g.\\"LTO_GEN1_B_100GB\\" [Source: slTapeType]', `manufacturer` varchar(20) DEFAULT 'UNKNOWN', `long_type` varchar(45) DEFAULT NULL, `is_broken` tinyint(1) DEFAULT '0', PRIMARY KEY (`media_pk`), UNIQUE KEY `IDX_MEDIA_PK_UNQ` (`media_pk`), KEY `idx_cleaning_media` (`is_cleaning`), KEY `idx_media_exist_end` (`exist_end`), KEY `idx_media_is_broken` (`is_broken`), KEY `idx_media_type` (`type`), KEY `idx_media_exist_start` (`exist_start`), KEY `idx_media_volser` (`volser`), KEY `idx_domain_code_m` (`domain_code`), KEY `idx_type_code_m` (`type_code`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `media_analytics` ( `media_analytics_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created. Automatically set to the CURRENT_TIME by MySQL when record is initially created in the DB. Not necessary for the application to set this value.', `ma_exchanges_fk` bigint(20) unsigned NOT NULL, `ma_exchgs_prv_fk` bigint(20) unsigned DEFAULT NULL COMMENT 'Foreign key to the EXCHANGES record previous to the current EXCHANGES record in the chain of exchanges resulting in this analytics record. NULL indicates that this is the first analytics record in the chain.', `ma_exchgs_nxt_fk` bigint(20) unsigned DEFAULT NULL COMMENT 'Foreign key to the next EXCHANGES record after the current EXCHANGES record in the chain of exchanges resulting in this analytics record. NULL indicates that this is the last analytics record in the chain.', `ma_drives_fk` bigint(20) unsigned NOT NULL, `ma_media_fk` bigint(20) unsigned NOT NULL, `exchg_elapsed_time` bigint(20) DEFAULT NULL COMMENT 'Elapsed time of an exchange in seconds.', `exchg_mount_time` bigint(20) DEFAULT NULL COMMENT 'Elapsed time a medium has been mounted into a drive.', `mount_read_throughput` float DEFAULT '0' COMMENT 'Throughput of all read operations performed during this exchange averaged over the total mount time.', `mount_write_throughput` float DEFAULT '0' COMMENT 'The throughput of all the write operations performed during this exchange averaged over total mount time.', `mount_io_throughput` float DEFAULT '0' COMMENT 'The throughput of all the read and write operations performed during this exchange averaged over the total mount time.', `suspicion_level` float DEFAULT '0' COMMENT 'Suspicion that the media may be marginal or faulty. Value from last completed exchange either prior to or during this aggregate period.', `inefficient` tinyint(1) DEFAULT NULL COMMENT 'Boolean indicator based on write efficiency. Value from last completed exchange either prior to or during this aggregate period. PIT value: 0=NO; 1=YES.', `marginal` tinyint(1) DEFAULT NULL COMMENT 'This is a boolean indicator based on read margin. Value from last completed exchange either prior to or during this aggregate period. PIT value: 0=NO; 1=YES.', `health_enum` varchar(20) NOT NULL DEFAULT 'USE' COMMENT 'Reliability of the media. Value from last completed exchange either prior to or during this aggregate period. PIT value: "USE", "MONITOR", "EVALUATE", "ACTION".', `warranty_enum` varchar(20) NOT NULL DEFAULT 'UNKNOWN' COMMENT 'Whether the media is in or out of warranty. Value from last completed exchange either prior to or during this aggregate period. PIT values: "UNKNOWN", "IN_WARRANTY", "OUT_OF_WARRANTY".', `was_load_limit_reported` tinyint(4) DEFAULT '0' COMMENT 'If the number of media loads exceeded warranty recommendations, was the cartridge load limit alert reported? Values: 0=NO; 1=YES. NULL indicates unknown. [Source: HLI intermediate dismount COMPAT 23, slTbiEventData]', `cur_clean_uses` int(11) DEFAULT '0' COMMENT 'Number of times this clreaning cartridge has been used.', `suspicion_type` int(10) unsigned DEFAULT NULL COMMENT 'Type of suspicion', `exchg_err_status_enum` varchar(20) DEFAULT 'UNKNOWN' COMMENT 'Derived status from error, efficient and marginal status. Value from last completed exchange. See lkup_exchg_err_status for valid values', `life_enum` varchar(8) NOT NULL DEFAULT 'UNKNOWN' COMMENT 'Has the media reached end of life? Value from last completed exchange prior to or during this aggregate period. Values can be UNKNOWN, GOOD or EOL', `write_ratio` float DEFAULT NULL COMMENT 'Ratio of mount time spent writing the tape for this exchange.', `read_ratio` float DEFAULT NULL COMMENT 'The ratio of mount time spent reading the tape for this exchange.', `io_ratio` float DEFAULT NULL COMMENT 'The ratio of mount time spent writing and reading the tape for this exchange.', `time_spent_rw` int(11) DEFAULT NULL COMMENT 'Time spent writing and reading in this exchange. ', `compression_ratio` float DEFAULT NULL, `read_throughput` float DEFAULT NULL COMMENT 'Tape read throughput in MB/sec for this exchange.', `write_throughput` float DEFAULT NULL COMMENT 'Tape write throughput in MB/sec for this exchange.', `io_throughput` float DEFAULT NULL COMMENT 'Tape write and read throughput in MB/sec for this exchange.', `max_cleaning_uses` int(11) DEFAULT NULL COMMENT 'Contains last non-null value of max_cleaning_uses from exchanges.', `is_dir_invalid` tinyint(4) DEFAULT '0', `num_critical_ta` tinyint(3) unsigned DEFAULT '0', `num_info_ta` tinyint(3) unsigned DEFAULT '0', `num_warning_ta` tinyint(3) unsigned DEFAULT '0', PRIMARY KEY (`media_analytics_pk`), KEY `fk_media_analytics_exchanges1` (`ma_exchanges_fk`), KEY `fk_media_analytics_exchanges2` (`ma_exchgs_prv_fk`), KEY `fk_media_analytics_exchanges3` (`ma_exchgs_nxt_fk`), KEY `fk_media_analytics_drives1` (`ma_drives_fk`), KEY `fk_media_analytics_media1` (`ma_media_fk`), KEY `fk_media_analytics_lkup_health_enum1` (`health_enum`), KEY `fk_media_analytics_lkup_warranty_enum1` (`warranty_enum`), KEY `fk_media_analytics_lkup_exchg_err_status1` (`exchg_err_status_enum`), KEY `fk_media_analytics_lkup_life_enum1` (`life_enum`), CONSTRAINT `fk_media_analytics_drives1` FOREIGN KEY (`ma_drives_fk`) REFERENCES `drives` (`drives_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_media_analytics_exchanges1` FOREIGN KEY (`ma_exchanges_fk`) REFERENCES `exchanges` (`exchanges_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_media_analytics_exchanges2` FOREIGN KEY (`ma_exchgs_prv_fk`) REFERENCES `exchanges` (`exchanges_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_media_analytics_exchanges3` FOREIGN KEY (`ma_exchgs_nxt_fk`) REFERENCES `exchanges` (`exchanges_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_media_analytics_lkup_exchg_err_status1` FOREIGN KEY (`exchg_err_status_enum`) REFERENCES `lkup_exchg_err_status` (`exchg_err_enum`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_media_analytics_lkup_health_enum1` FOREIGN KEY (`health_enum`) REFERENCES `lkup_health_enum` (`health_enum`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_media_analytics_lkup_life_enum1` FOREIGN KEY (`life_enum`) REFERENCES `lkup_life_enum` (`life_enum`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_media_analytics_lkup_warranty_enum1` FOREIGN KEY (`warranty_enum`) REFERENCES `lkup_warranty_enum` (`warranty_enum`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_media_analytics_media1` FOREIGN KEY (`ma_media_fk`) REFERENCES `media` (`media_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `media_stats` ( `media_stats_pk` bigint(20) unsigned NOT NULL, `media_fk` bigint(20) unsigned DEFAULT NULL, `current_cleaning_uses` int(11) DEFAULT NULL, `acquired` datetime DEFAULT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `max_cleaning_uses` int(11) DEFAULT NULL, PRIMARY KEY (`media_stats_pk`), UNIQUE KEY `media_stats_pk_UNIQUE` (`media_stats_pk`), KEY `fk_media_stats_media1` (`media_fk`), CONSTRAINT `fk_media_stats_media1` FOREIGN KEY (`media_fk`) REFERENCES `media` (`media_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `media_summaries` ( `media_summaries_pk` bigint(20) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created. Automatically set to the CURRENT_TIME by MySQL when record is initially created in the DB. Not necessary for the application to set this value.', `ms_media_fk` bigint(20) unsigned NOT NULL, `mb_rw` double DEFAULT '0' COMMENT 'The sum total of the MB read and MB written in this aggregation period.', `mb_written` double DEFAULT '0' COMMENT 'The number of MB written to this media in this aggregation period. ATP Value. [Source: Lib SNMP from COMPAT 23 Bytes # 47-55 or SMF21BW data]', `mb_read` double DEFAULT '0' COMMENT 'The number of MB read from this media in this aggregation period. ATP value. [Source: Lib SNMP from COMPAT 23 Bytes # 38-46 or SMF21BR data]', `mounts` int(11) DEFAULT '0' COMMENT 'The number of times this media was loaded into a drive in this aggregation period. ATP Value. [Source: From Exchange data, incremented on each exchange for this drive. Move data for cleaning, unless cleaning also becomes an exchange.]', `dismounts` int(11) DEFAULT '0' COMMENT 'The number of times this media was unloaded from a drive in this aggregation period. ATP value. [Source: From Exchanges data, increment on each exchange for this drive. Move data for cleaning, unless cleaning alsoc becomes an exchange.]', `errors` int(11) DEFAULT '0' COMMENT 'The number of media errors this cartridge has experienced in this aggregation period. ATP value. [Source: Lib SNMP from COMPAT 23 Bytes #8 or SMF32 data.]', `write_efficiency_metric` float DEFAULT '0' COMMENT 'The efficiency of the data being written to the media based on capacity over distance. PIT value from last completed exchange prior to or during this aggregate period. [Source: Lib SNMP from COMPAT 23 Bytes # 27-31 or SMF32 data.]', `read_margin` float DEFAULT '0' COMMENT 'Indicates how much ECC margin remains for the data that was read on this media during the last mount. PIT value from last completed exchange prior to or during this aggregate period. [Source: Lib SNMP from COMPAT 23 Bytes # 32-36 or SMF32 data.]', `suspicion_level` float DEFAULT '0' COMMENT 'Suspicion that the media may be marginal or faulty. PIT value from last completed exchange prior to or during this aggregate period. [Source: Calculation]', `was_loadlimit_reported` tinyint(1) DEFAULT '0' COMMENT 'The media has exceeded the design limit for loads. ATP value from last completed exchange prior to or during this aggregate period. Values: 0=NO, 1=YES. [Source: Lib SNMP from COMPAT 23 Bytes # 26 or SMF32 data]', `inefficient` tinyint(1) DEFAULT NULL COMMENT 'Boolean indicator based on write efficiency. ATP value from last completed exchange prior to or during this aggregate period. Values: 0=NO; 1=YES. [Source: calculated]', `marginal` tinyint(1) DEFAULT NULL COMMENT 'Boolean indicator based on read margin. ATP value from last completed exchange prior to or during this aggregate period. Values: 0=NO; 1=YES. [Source: calculation]', `health_enum` varchar(20) NOT NULL DEFAULT 'USE' COMMENT 'Reliability of the media. Value from last completed exchange either prior to or during this aggregate period. PIT value: "USE", "MONITOR", "EVALUATE", "ACTION".', `exchg_time` bigint(20) DEFAULT '0' COMMENT 'The cumulative amount of time in seconds the media has been in exchanges during this aggregate period. Atp value.', `mount_time` bigint(20) DEFAULT '0' COMMENT 'The cumulative amount of time in seconds the media has been mounted in one or more drives during this aggregate period. ATP value. [Source: Calculation]', `read_throughput` float DEFAULT '0' COMMENT 'Average tape read throughput in MB/sec over the total aggregate time period. ATP value. [Source: calculation]', `write_throughput` float DEFAULT '0' COMMENT 'Average tape write throughput in MB/sec in this time period. ATP value. [Source: calculation]', `io_throughput` float DEFAULT '0' COMMENT 'The average tape read and write throughput in MB/sec for the total aggregation period. ATP value. [Source: calculation]', `exchg_err_status_enum` varchar(20) DEFAULT 'UNKNOWN' COMMENT 'Value from last completed exchange either prior to or during this aggregate period. PIT value: See lkup_exchg_err_status for valid values', `warranty_enum` varchar(20) NOT NULL DEFAULT 'UNKNOWN' COMMENT 'Whether the media is in or out of warranty. ATP value. Values: "UNKNOWN", "IN_WARRANTY", "OUT_OF_WARRANTY". [Source: calculation.]', `mb_sent` double DEFAULT '0' COMMENT 'The number of uncompressed data bytes transferred from the drive to the initiator or initiators during read command operations. This is the number of bytes transferred over external interface after decompression by the drive.', `mb_received` double DEFAULT '0' COMMENT 'The number of uncompressed data bytes received by the drive from the initiator or initiators during write command operations. This is the number of bytes transferred over external interface before compression by the drive.', `read_ratio` float DEFAULT '0', `write_ratio` float DEFAULT '0', `io_ratio` float DEFAULT '0' COMMENT ' ', `mount_read_throughput` float DEFAULT '0' COMMENT ' ', `mount_write_throughput` float DEFAULT '0', `mount_io_throughput` float DEFAULT '0', `life_enum` varchar(12) DEFAULT 'GOOD' COMMENT 'Values include: GOOD or EOL', `remaining_capacity` float DEFAULT '0' COMMENT 'The storage capacity in MB left on this cartridge', `time_spent_reading` int(11) DEFAULT '0' COMMENT 'The amount of time this drive has spent reading during this summary period ', `time_spent_writing` int(11) DEFAULT '0' COMMENT 'The amount of time this drive has spent writing during this summary period ', `time_spent_rw` int(11) DEFAULT '0' COMMENT 'The amount of time this drive has spent writing and reading during this summary period ', `compression_ratio` float DEFAULT '0' COMMENT 'The compression ratio for this aggregate period', `exchg_elapsed_time` bigint(20) DEFAULT NULL, `exchg_mount_time` bigint(20) DEFAULT NULL, `summary_date` datetime DEFAULT NULL, `last_exchange_processed` datetime DEFAULT NULL, `last_mib_walk` datetime DEFAULT NULL, `ms_media_stats_fk` bigint(20) unsigned DEFAULT NULL, `num_snmp_traps` int(10) unsigned DEFAULT '0', `capacity_utilization` float unsigned DEFAULT '0', `ejected_date` datetime DEFAULT NULL, `entered_date` datetime DEFAULT NULL, `is_dir_invalid` tinyint(4) DEFAULT '0', PRIMARY KEY (`media_summaries_pk`), UNIQUE KEY `idx_uq_media_summary` (`ms_media_fk`,`summary_date`), KEY `IDX_MS_MEDIA_FK` (`ms_media_fk`), KEY `idx_ms_summary_date` (`summary_date`), KEY `fk_media_summaries_lkup_health_enum1` (`health_enum`), KEY `fk_media_summaries_lkup_exchg_err_status1` (`exchg_err_status_enum`), KEY `fk_media_summaries_lkup_warranty_enum1` (`warranty_enum`), KEY `idx_last_exchg_processed_ms` (`last_exchange_processed`), KEY `fk_media_summaries_media_stats1_idx` (`ms_media_stats_fk`), CONSTRAINT `fk_media_summaries_lkup_exchg_err_status1` FOREIGN KEY (`exchg_err_status_enum`) REFERENCES `lkup_exchg_err_status` (`exchg_err_enum`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_media_summaries_lkup_health_enum1` FOREIGN KEY (`health_enum`) REFERENCES `lkup_health_enum` (`health_enum`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_media_summaries_lkup_warranty_enum1` FOREIGN KEY (`warranty_enum`) REFERENCES `lkup_warranty_enum` (`warranty_enum`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_media_summaries_media_stats1` FOREIGN KEY (`ms_media_stats_fk`) REFERENCES `media_stats` (`media_stats_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `FK_MS_MEDIA_FK` FOREIGN KEY (`ms_media_fk`) REFERENCES `media` (`media_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `moves` ( `MOVES_PK` bigint(20) unsigned NOT NULL, `CREATED` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created. Automatically set to the CURRENT_TIME by MySQL when record is initially created in the DB. Not necessary for the application to set this value.', `MV_DRIVES_FK` bigint(20) unsigned DEFAULT NULL COMMENT 'Foreign key to the drives object.', `MV_DRIVE_PROPERTIES_FK` bigint(20) unsigned DEFAULT NULL COMMENT 'Foreign key into the DRIVE_PROPERTIES table.', `MV_MEDIA_FK` bigint(20) unsigned NOT NULL COMMENT 'Foreign key to the medias object.', `MV_CELLS_SRC_FK` bigint(20) unsigned NOT NULL COMMENT 'Foreign key to the source cell of the move.', `MV_CELLS_DST_FK` bigint(20) unsigned NOT NULL COMMENT 'Foreign key to the destination cell object.', `INFERRED` tinyint(4) DEFAULT '0' COMMENT 'When set to 1 indicates that this MOVE record was synthesized due to a dropped or incomplete exchange cycle. An intermediate dismount move, or final dismount move may have been lost. [Source: SNMP transform algorithms]', `MOVE_START` datetime NOT NULL COMMENT 'Timestamp when the move was initiated. ', `MOVE_END` datetime DEFAULT NULL COMMENT 'Timestamp of when the move was completed. NULL indicates that move is still in progress.', `MOVE_TYPE_ENUM` varchar(24) NOT NULL COMMENT 'Movement type. Values: "SCRATCH_MOUNT", "NON_SCRATCH_MOUNT", "SCRATCH_DISMOUNT", "NON_SCRATCH_DISMOUNT", "VOLUME_ENTERED", "VOLUME_EJECTED", "VOLUME_MOVED", "MOUNT", "DISMOUNT".', `DOES_MOVE_HAVE_ERRORS` tinyint(1) DEFAULT '0' COMMENT 'Was there an error during the move? If so then the FSC column will be non-null. Values: 0=NO; 1=YES. NULL indicates unknown status.', `DOES_DRIVE_HAVE_ERRORS` tinyint(1) DEFAULT '0' COMMENT 'Does the drive have errors? Values: 0=NO; 1=YES. NULL indicates unknown status.', `DOES_MEDIA_HAVE_ERRORS` tinyint(1) DEFAULT '0' COMMENT 'Does the media have errors? Values:0=NO; 1=YES. NULL indicates unknown status.', `DO_RETRIES_IMPACT_PERF` tinyint(1) DEFAULT '0' COMMENT 'Was the performance impacted by one or more retries? Values: 0=NO; 1=YES.', `IS_DRIVE_CLEANING` tinyint(1) DEFAULT NULL COMMENT 'Is the drive currently in cleaning mode? Values: 0=NO; 1=YES; NULL indicates and unknown condition.', `TOTAL_LSMS_USED_IN_MOVE` int(11) DEFAULT NULL COMMENT 'Total number of LSM involved in this move.', `TOTAL_ELAPSED_REQUEST_TIME` int(11) DEFAULT NULL COMMENT 'Total elapsed time of move request in milliseconds.', `TOTAL_DRIVE_WAIT_TIME` int(11) DEFAULT NULL COMMENT 'Total time the drive waited on another operation to complete, in milliseconds', `DST_LSM_ROBOTICS_TIME` int(11) DEFAULT NULL COMMENT 'Destination robot time in milliseconds.', `DST_LSM_ROBOTICS_QUE_TIME` int(11) DEFAULT NULL COMMENT 'Time the destination robot spent in queuing operations, in milliseconds.', `OTHER_LSM_ROBOTIC_TIME` int(11) DEFAULT NULL COMMENT 'Milliseconds', `OTHER_LSM_ROBOTICS_QUE_TIME` int(11) DEFAULT NULL COMMENT 'Time the other robots spent in queuing operations, in milliseconds.', `TOTAL_PTP_ROBOTICS_TIME` int(11) DEFAULT NULL COMMENT 'Total time spend in one or more passthrough ports (PSP), in milliseconds.', `TOTAL_PTP_QUE_TIME` int(11) DEFAULT NULL COMMENT 'Total time spent in queing for one or more passthrough ports (PTP).', `mv_libraries_fk` bigint(20) unsigned DEFAULT NULL, `request_id` int(11) DEFAULT NULL, PRIMARY KEY (`MOVES_PK`), KEY `IDX_MV_MEDIA_FK` (`MV_MEDIA_FK`), KEY `IDX_MV_CELLS_SRC_FK` (`MV_CELLS_SRC_FK`), KEY `IDX_MV_CELLS_DST_FK` (`MV_CELLS_DST_FK`), KEY `IDX_MV_DRIVES_FK` (`MV_DRIVES_FK`), KEY `IDX_MV_DRIVE_PROPERTIES_FK` (`MV_DRIVE_PROPERTIES_FK`), KEY `fk_moves_lkup_move_types1` (`MOVE_TYPE_ENUM`), KEY `fk_moves_libraries1` (`mv_libraries_fk`), CONSTRAINT `fk_moves_libraries1` FOREIGN KEY (`mv_libraries_fk`) REFERENCES `libraries` (`libraries_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_moves_lkup_move_types1` FOREIGN KEY (`MOVE_TYPE_ENUM`) REFERENCES `lkup_move_types` (`move_type`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `MOVES_CELLS_FK1` FOREIGN KEY (`MV_CELLS_SRC_FK`) REFERENCES `cells` (`cells_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `MOVES_CELLS_FK2` FOREIGN KEY (`MV_CELLS_DST_FK`) REFERENCES `cells` (`cells_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `MOVES_DRIVES_FK1` FOREIGN KEY (`MV_DRIVES_FK`) REFERENCES `drives` (`drives_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `MOVES_DRIVE_PROPERTIES_FK1` FOREIGN KEY (`MV_DRIVE_PROPERTIES_FK`) REFERENCES `drive_properties` (`drive_properties_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `MOVES_MEDIA_FK1` FOREIGN KEY (`MV_MEDIA_FK`) REFERENCES `media` (`media_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `partitions` ( `partitions_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `pa_library_complexes_fk` bigint(20) unsigned NOT NULL COMMENT 'Foreign key to the LIBRARY_COMPLEXES table.', `type_enum` varchar(8) NOT NULL DEFAULT 'UNKNOWN' COMMENT 'Type of partition. Values: "HLI", "SCSI", "OTHER". [Source SNMP slCellPartitionType]', `name` varchar(64) DEFAULT NULL COMMENT 'Name of the partition. [Source: pulled this out of thin air.]', `number` int(11) DEFAULT NULL COMMENT 'Number of the partition. [Source: SNMP slCellPartitionID]', `exist_start` datetime NOT NULL COMMENT 'Date when this PARTITION came into existence.', `exist_end` datetime DEFAULT NULL COMMENT 'Date this PARTITION ceased to exist. NULL indicates that it is still in existence.', PRIMARY KEY (`partitions_pk`), KEY `fk_partitions_library_complexes1` (`pa_library_complexes_fk`), KEY `fk_partitions_lkup_partition_type_enum1` (`type_enum`), KEY `idx_partitions_exist_end` (`exist_end`), CONSTRAINT `fk_partitions_library_complexes1` FOREIGN KEY (`pa_library_complexes_fk`) REFERENCES `library_complexes` (`library_complexes_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_partitions_lkup_partition_type_enum1` FOREIGN KEY (`type_enum`) REFERENCES `lkup_partition_type_enum` (`partition_type`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `ptp_properties` ( `ptp_properties_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `pp_ptps_fk` bigint(20) unsigned DEFAULT NULL, `id` int(10) unsigned DEFAULT NULL, `app_version` varchar(32) DEFAULT NULL COMMENT 'The PTP code version', `fw_version` varchar(32) DEFAULT NULL COMMENT 'The PTP firmware version.', `exist_start` datetime NOT NULL, `exist_end` datetime DEFAULT NULL, `is_latest` tinyint(3) unsigned DEFAULT NULL, PRIMARY KEY (`ptp_properties_pk`), KEY `fk_pp_ptps_idx` (`pp_ptps_fk`), KEY `idx_pp_exist_start1` (`exist_start`), KEY `idx_pp_exist_end1` (`exist_end`), CONSTRAINT `fk_pp_ptps1` FOREIGN KEY (`pp_ptps_fk`) REFERENCES `ptps` (`ptps_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `ptp_stats` ( `ptp_stats_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `ps_ptps_fk` bigint(20) unsigned DEFAULT NULL COMMENT 'Foreign key back to the ptps table.', `led_state_enum` varchar(8) DEFAULT 'UNKNOWN' COMMENT 'State of the PTP fault LED: ON, OFF, UNKNOWN.', `op_status_enum` varchar(20) DEFAULT NULL COMMENT 'Operational status: OK, ERROR, WARNING, INFO, TRACE.', `state` varchar(32) DEFAULT NULL COMMENT 'The PTP state: empty, loaded, moving, etc.', `num_ptp_move_retries` int(11) DEFAULT NULL COMMENT 'Total number of PTP move retries.', `num_ptp_move_fails` int(11) DEFAULT NULL COMMENT 'The number of move failures.', `num_ptp_move_totals` int(11) DEFAULT NULL COMMENT 'The total number of completed moves.', `acquired` datetime DEFAULT NULL, PRIMARY KEY (`ptp_stats_pk`), UNIQUE KEY `ptp_stats_pk_unq` (`ptp_stats_pk`), KEY `fk_ptp_stats_ptps1_idx` (`ps_ptps_fk`), KEY `fk_ptp_stats_lkup_device_op_status1_idx` (`op_status_enum`), KEY `fk_ptp_stats_lkup_led_state1_idx` (`led_state_enum`), CONSTRAINT `fk_ptp_stats_lkup_device_op_status1` FOREIGN KEY (`op_status_enum`) REFERENCES `lkup_device_op_status` (`device_op_status`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_ptp_stats_lkup_led_state1` FOREIGN KEY (`led_state_enum`) REFERENCES `lkup_led_state` (`led_state`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_ptp_stats_ptps1` FOREIGN KEY (`ps_ptps_fk`) REFERENCES `ptps` (`ptps_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `ptp_summaries` ( `ptp_summaries_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `ptps_fk` bigint(20) unsigned NOT NULL, `ptp_stats_fk` bigint(20) unsigned DEFAULT NULL, `ptp_properties_fk` bigint(20) unsigned DEFAULT NULL, `num_ptp_move_retries` int(10) unsigned DEFAULT '0', `num_ptp_move_fails` int(10) unsigned DEFAULT '0', `num_ptp_move_totals` int(10) unsigned DEFAULT '0', `lib_ptp_health_enum` varchar(20) DEFAULT NULL, `summary_date` datetime DEFAULT NULL, `last_mib_walk` datetime DEFAULT NULL, `num_snmp_traps` int(10) unsigned DEFAULT '0', PRIMARY KEY (`ptp_summaries_pk`), UNIQUE KEY `ptp_summaries_pk_UNIQUE` (`ptp_summaries_pk`), UNIQUE KEY `ps_ptps_fk_summary_date_UNIQUE` (`ptps_fk`,`summary_date`), KEY `fk_ps_lkup_top_level_condition_enum1_idx` (`lib_ptp_health_enum`), KEY `fk_hourly_ptp_summaries_ptps1_idx` (`ptps_fk`), KEY `fk_ptp_summaries_ptp_stats1_idx` (`ptp_stats_fk`), KEY `fk_ptp_summaries_ptp_properties1_idx` (`ptp_properties_fk`), CONSTRAINT `fk_ps_lkup_top_level_condition_enum1` FOREIGN KEY (`lib_ptp_health_enum`) REFERENCES `lkup_top_level_condition_enum` (`top_level_condition`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_ptp_summaries_ptps1` FOREIGN KEY (`ptps_fk`) REFERENCES `ptps` (`ptps_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_ptp_summaries_ptp_properties1` FOREIGN KEY (`ptp_properties_fk`) REFERENCES `ptp_properties` (`ptp_properties_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_ptp_summaries_ptp_stats1` FOREIGN KEY (`ptp_stats_fk`) REFERENCES `ptp_stats` (`ptp_stats_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `ptps` ( `ptps_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `serial_number` varchar(64) DEFAULT NULL, `hw_version` varchar(45) DEFAULT NULL, `is_broken` tinyint(1) DEFAULT NULL, `exist_start` datetime NOT NULL, `exist_end` datetime DEFAULT NULL, PRIMARY KEY (`ptps_pk`), UNIQUE KEY `ptps_pk_unq` (`ptps_pk`), KEY `idx_hw_version_idx` (`hw_version`), KEY `idx_is_broken` (`is_broken`), KEY `idx_exist_start` (`exist_start`), KEY `idx_exist_end` (`exist_end`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `rails` ( `rails_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `ra_libraries_fk` bigint(20) unsigned NOT NULL COMMENT 'Foreign key to LIBRARIES.', `number` tinyint(4) NOT NULL, `exist_start` datetime NOT NULL, `exist_end` datetime DEFAULT NULL, PRIMARY KEY (`rails_pk`), KEY `fk_rails_libraries1` (`ra_libraries_fk`), KEY `idx_rails_exist_end` (`exist_end`), CONSTRAINT `fk_rails_libraries1` FOREIGN KEY (`ra_libraries_fk`) REFERENCES `libraries` (`libraries_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `reports` ( `reports_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `rpt_app_users_fk` bigint(20) unsigned DEFAULT NULL COMMENT 'Foreign key to the app_users table; A NULL value means the report is public.', `rpt_ui_views_pk` bigint(20) unsigned DEFAULT NULL COMMENT 'Foreign key to the ui_views table.', `name` varchar(255) NOT NULL COMMENT 'The name of the report.', `locale` varchar(8) DEFAULT 'en' COMMENT 'The locale the report should be generated in; default is ''en'' for English.', `schedule` enum('daily','weekly','monthly','quarterly','yearly') NOT NULL DEFAULT 'weekly' COMMENT 'The report run schedule (daily, weekly, monthly, quarterly, or yearly).', `next_firing` datetime NOT NULL COMMENT 'The next time the report is scheduled to run.', PRIMARY KEY (`reports_pk`), UNIQUE KEY `reports_pk_UNIQUE` (`reports_pk`), KEY `reports_created_idx` (`created`), KEY `reports_name_idx` (`name`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `reports_files` ( `reports_files_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'When the file was created', `rf_reports_fk` bigint(20) unsigned DEFAULT NULL COMMENT 'A foreign key to the report definition in the reports table.', `rf_app_users_fk` bigint(20) unsigned DEFAULT NULL COMMENT 'A foreign key to the report owner in the app_users table. NULL means the report is public.', `file_size` double DEFAULT '0' COMMENT 'The size of the file in bytes.', `file_hash` varchar(256) DEFAULT NULL COMMENT 'The MD5 hash code of the file', `file_contents` mediumblob COMMENT 'The encoded contents of the file.', PRIMARY KEY (`reports_files_pk`), UNIQUE KEY `reports_files_pk_UNIQUE` (`reports_files_pk`), KEY `reports_files_created_idx` (`created`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `reports_recipients` ( `reports_recipients_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `rr_reports_fk` bigint(20) unsigned DEFAULT NULL COMMENT 'Foreign key to reports table.', `rr_email_recipients_fk` bigint(20) unsigned DEFAULT NULL COMMENT 'Foreign key to email recipients table.', PRIMARY KEY (`reports_recipients_pk`), UNIQUE KEY `reports_recipients_pk_UNIQUE` (`reports_recipients_pk`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `robot_analytics` ( `robot_analytics_pk` bigint(20) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `robots_fk` bigint(20) unsigned DEFAULT NULL, `robot_stats_fk` bigint(20) unsigned DEFAULT NULL, `robot_properties_fk` bigint(20) unsigned DEFAULT NULL, `event_fk` bigint(20) unsigned DEFAULT NULL, `num_robot_get_retries` int(10) unsigned DEFAULT '0', `num_robot_put_retries` int(10) unsigned DEFAULT '0', `num_robot_get_fails` int(10) unsigned DEFAULT '0', `num_robot_put_fails` int(10) unsigned DEFAULT '0', `num_robot_get_totals` int(10) unsigned DEFAULT '0', `num_robot_put_totals` int(10) unsigned DEFAULT '0', `num_robot_reboots` smallint(5) unsigned DEFAULT '0', `num_robot_commanded_reboots` smallint(5) unsigned DEFAULT '0', `robot_health_reason_text` varchar(120) DEFAULT NULL, `robot_health_enum` varchar(20) DEFAULT NULL, `lib_robot_health_enum` varchar(20) DEFAULT NULL, `event_type` varchar(20) DEFAULT NULL, `event_time` datetime DEFAULT NULL, `is_updated_analytics` tinyint(4) DEFAULT NULL, `is_latest` tinyint(3) unsigned DEFAULT '0', PRIMARY KEY (`robot_analytics_pk`), UNIQUE KEY `robot_analytics_pk_UNIQUE` (`robot_analytics_pk`), KEY `fk_ra_robots1_idx` (`robots_fk`), KEY `fk_ra_lkup_health_enum1_idx` (`robot_health_enum`), KEY `ra_created_idx` (`created`), CONSTRAINT `fk_ra_lkup_health_enum1` FOREIGN KEY (`robot_health_enum`) REFERENCES `lkup_health_enum` (`health_enum`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_ra_robots1` FOREIGN KEY (`robots_fk`) REFERENCES `robots` (`robots_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `robot_properties` ( `robot_properties_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `rp_robots_fk` bigint(20) unsigned DEFAULT NULL, `id` int(10) unsigned DEFAULT NULL, `app_version` varchar(32) DEFAULT NULL COMMENT 'The robot code version', `fw_version` varchar(32) DEFAULT NULL COMMENT 'The robot firmware version.', `exist_start` datetime NOT NULL, `exist_end` datetime DEFAULT NULL, `is_latest` tinyint(3) unsigned DEFAULT NULL, PRIMARY KEY (`robot_properties_pk`), KEY `fk_rp_robots1_idx` (`rp_robots_fk`), KEY `idx_rp_exist_start1` (`exist_start`), KEY `idx_rp_exist_end1` (`exist_end`), CONSTRAINT `fk_rp_robots1` FOREIGN KEY (`rp_robots_fk`) REFERENCES `robots` (`robots_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `robot_stats` ( `robot_stats_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `rs_robots_fk` bigint(20) unsigned DEFAULT NULL COMMENT 'Foreign key back to the robots table.', `hand_status_enum` varchar(25) DEFAULT 'UNKNOWN' COMMENT 'Robot hand state.', `led_state_enum` varchar(8) DEFAULT 'UNKNOWN' COMMENT 'State of the LED: ON, OFF, UNKNOWN.', `op_status_enum` varchar(20) DEFAULT NULL COMMENT 'Operational status: OK, ERROR, WARNING, INFO, TRACE.', `state` varchar(32) DEFAULT NULL COMMENT 'The robot state: empty, loaded, moving, etc.', `num_robot_get_retries` int(11) DEFAULT NULL, `num_robot_put_retries` int(11) DEFAULT NULL, `num_robot_get_fails` int(11) DEFAULT NULL, `num_robot_put_fails` int(11) DEFAULT NULL, `num_robot_get_totals` int(11) DEFAULT NULL, `num_robot_put_totals` int(11) DEFAULT NULL, `acquired` datetime DEFAULT NULL, PRIMARY KEY (`robot_stats_pk`), KEY `fk_robots_robot_stats1_idx` (`rs_robots_fk`), KEY `fk_robot_stats_lkup_device_op_status1_idx` (`op_status_enum`), KEY `fk_robot_stats_lkup_cell_content_status_enum1` (`hand_status_enum`), KEY `fk_robot_stats_lkup_led_state1_idx` (`led_state_enum`), CONSTRAINT `fk_robots_robot_stats1` FOREIGN KEY (`rs_robots_fk`) REFERENCES `robots` (`robots_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_robot_stats_lkup_cell_content_status_enum1` FOREIGN KEY (`hand_status_enum`) REFERENCES `lkup_cell_content_status_enum` (`cell_content_status`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_robot_stats_lkup_device_op_status1` FOREIGN KEY (`op_status_enum`) REFERENCES `lkup_device_op_status` (`device_op_status`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_robot_stats_lkup_led_state1` FOREIGN KEY (`led_state_enum`) REFERENCES `lkup_led_state` (`led_state`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `robot_summaries` ( `robot_summaries_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `robots_fk` bigint(20) unsigned NOT NULL, `robot_stats_fk` bigint(20) unsigned DEFAULT NULL, `robot_properties_fk` bigint(20) unsigned DEFAULT NULL, `num_robot_get_retries` int(10) unsigned DEFAULT '0', `num_robot_put_retries` int(10) unsigned DEFAULT '0', `num_robot_get_fails` int(10) unsigned DEFAULT '0', `num_robot_put_fails` int(10) unsigned DEFAULT '0', `num_robot_get_totals` int(10) unsigned DEFAULT '0', `num_robot_put_totals` int(10) unsigned DEFAULT '0', `num_robot_reboots` smallint(5) unsigned DEFAULT '0', `num_robot_commanded_reboots` smallint(5) unsigned DEFAULT '0', `lib_robot_health_enum` varchar(20) DEFAULT NULL, `robot_health_enum` varchar(20) DEFAULT NULL, `summary_date` datetime DEFAULT NULL, `last_mib_walk` datetime DEFAULT NULL, `num_snmp_traps` int(10) unsigned DEFAULT '0', PRIMARY KEY (`robot_summaries_pk`), UNIQUE KEY `robot_summaries_pk_UNIQUE` (`robot_summaries_pk`), UNIQUE KEY `hr_robots_fk_summary_date_UNIQUE` (`robots_fk`,`summary_date`), KEY `fk_robot_summaries_lkup_top_level_condition_enum1_idx` (`lib_robot_health_enum`), KEY `fk_robot_summaries_robots1` (`robots_fk`), KEY `fk_robot_summaries_robot_stats1_idx` (`robot_stats_fk`), KEY `fk_robot_summaries_robot_properties1_idx` (`robot_properties_fk`), KEY `fk_robot_summaries_lkup_health_enum1_idx` (`robot_health_enum`), CONSTRAINT `fk_robot_summaries_lkup_health_enum1` FOREIGN KEY (`robot_health_enum`) REFERENCES `lkup_health_enum` (`health_enum`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_robot_summaries_lkup_top_level_condition_enum1` FOREIGN KEY (`lib_robot_health_enum`) REFERENCES `lkup_top_level_condition_enum` (`top_level_condition`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_robot_summaries_robots1` FOREIGN KEY (`robots_fk`) REFERENCES `robots` (`robots_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_robot_summaries_robot_properties1` FOREIGN KEY (`robot_properties_fk`) REFERENCES `robot_properties` (`robot_properties_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_robot_summaries_robot_stats1` FOREIGN KEY (`robot_stats_fk`) REFERENCES `robot_stats` (`robot_stats_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `robots` ( `robots_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `serial_number` varchar(64) DEFAULT NULL, `hw_version` varchar(45) DEFAULT NULL, `is_broken` tinyint(1) DEFAULT '0', `exist_start` datetime NOT NULL, `exist_end` datetime DEFAULT NULL, PRIMARY KEY (`robots_pk`), UNIQUE KEY `robots_pk_unq` (`robots_pk`), KEY `idx_robot_hw_version1` (`hw_version`), KEY `idx_robot_is_broken1` (`is_broken`), KEY `idx_robot_exist_start1` (`exist_start`), KEY `idx_robot_exist_end1` (`exist_end`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `smtp_settings` ( `smtp_settings_pk` int(11) NOT NULL, `host_address` varchar(255) NOT NULL, `port` int(11) DEFAULT NULL, `transport_enum` varchar(10) DEFAULT 'TCP' COMMENT '''TCP'', ''SLS'' or ''TLS''', `user_name` varchar(45) DEFAULT NULL, `password` varchar(45) DEFAULT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `from_address` varchar(80) DEFAULT NULL, `from_label` varchar(80) DEFAULT 'Oracle StorageTek Tape Analytics Alert', `requires_authentication` tinyint(1) DEFAULT NULL, PRIMARY KEY (`smtp_settings_pk`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `snmp_agents` ( `snmp_agents_pk` bigint(20) unsigned NOT NULL COMMENT 'Primary key.', `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Timestamp of when this record was created in the database.', `auth_usr` varchar(32) DEFAULT NULL COMMENT 'SNMP agent user name used to authenticate and establish library connections.', `auth_pwd` varchar(32) DEFAULT NULL COMMENT 'SNMP agent user password used to authenticate and establish library connections. ', `auth_crypto_enum` varchar(10) DEFAULT 'SHA' COMMENT 'Encryption type used to encrypt the SNMP agent user password. Values: "SHA", "MD5".', `data_pwd` varchar(32) DEFAULT NULL COMMENT 'Password used to encrypt SNMP data transfers to/from the library.', `data_crypto_enum` varchar(8) DEFAULT 'DES' COMMENT 'Encryption type used to encrypt SNMP data transfers to/from the library. Values: "DES", "AES".', `agent_engine_id` varchar(72) DEFAULT NULL COMMENT 'Unique identifier for the TBI SNMP agent engine.', `trap_levels` varchar(80) DEFAULT NULL, `trap_community` varchar(32) DEFAULT 'public' COMMENT 'Community string for MIB walk using SNMP V2c protocol.', `user_community` varchar(32) DEFAULT 'public' COMMENT 'Community string for traps and informs using SNMP V2c \nprotocol.', `v2c_fallback` tinyint(1) DEFAULT '0' COMMENT 'Should SNMP V2c protocol be honored for MIB walk and \ntraps/informs?', PRIMARY KEY (`snmp_agents_pk`), KEY `fk_snmp_agents_lkup_data_crypto_enum1` (`data_crypto_enum`), KEY `fk_snmp_agents_lkup_hash_crypto_enum1` (`auth_crypto_enum`), CONSTRAINT `fk_snmp_agents_lkup_data_crypto_enum1` FOREIGN KEY (`data_crypto_enum`) REFERENCES `lkup_data_crypto_enum` (`crypto_alg`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_snmp_agents_lkup_hash_crypto_enum1` FOREIGN KEY (`auth_crypto_enum`) REFERENCES `lkup_hash_crypto_enum` (`hash_alg`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `snmp_cap_status_traps` ( `snmp_cap_status_traps_pk` bigint(20) unsigned NOT NULL COMMENT 'Primary key.', `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created. Automatically set to the CURRENT_TIME by MySQL when record is initially created in the DB. Not necessary for the application to set this value.', `sent_time` datetime DEFAULT NULL COMMENT 'Date the trap was sent from the device. [OID: Trap Header record?]', `oid_level` tinyint(4) DEFAULT NULL COMMENT 'Trap OID level. Sould always be 61, 63, or 65. [OID: slTrapCapStatusGood, slTrapCapStatusOpen, slTrapCapStatusCheck]', `library_serial_number` varchar(32) DEFAULT NULL COMMENT 'Frame serial number of the library. [OID: slTrapLibrarySerialNumber]', `cap_state` varchar(32) DEFAULT NULL COMMENT 'The physical state of the CAP as a string, i.e. "unknown", "open", "close". [OID: slCapState]', `cap_address` varchar(32) DEFAULT NULL COMMENT 'The CAP device address. [OID: slCapAddress]', `processed` datetime DEFAULT NULL COMMENT 'Timestamp of when this record was processed into the data warehouse.', `snmp_lib_connects_fk` bigint(20) unsigned NOT NULL, `request_id` bigint(20) DEFAULT NULL, `expired` datetime DEFAULT NULL, `snmp_protocol` varchar(10) DEFAULT NULL, `pdu_version` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`snmp_cap_status_traps_pk`), UNIQUE KEY `IDX_SNMP_CAP_STAT_TRAPS_PK_UNQ` (`snmp_cap_status_traps_pk`), KEY `fk_snmp_cap_status_traps_snmp_lib_connects1_idx` (`snmp_lib_connects_fk`), CONSTRAINT `fk_snmp_cap_status_traps_snmp_lib_connects1` FOREIGN KEY (`snmp_lib_connects_fk`) REFERENCES `snmp_lib_connects` (`snmp_lib_connects_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `snmp_caps` ( `snmp_caps_pk` bigint(20) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `sc_snmp_libraries_fk` bigint(20) unsigned NOT NULL, `cap_index` int(11) DEFAULT NULL COMMENT 'Integer index into the CAP table. [OID: slCapIndex]', `cap_serial_num` int(11) DEFAULT NULL COMMENT 'Serial number of the CAP. [OID: slCapSerialNum]', `cap_rotation_totals` int(11) DEFAULT NULL COMMENT 'The CAP rotation count. [OID: slCapRotations]', `cap_rotation_retries` int(11) DEFAULT NULL COMMENT 'The number of rotation retries performed by the CAP. [OID: slCapRotationRetries]', `cap_rotation_fails` int(11) DEFAULT NULL COMMENT 'The number of rotation failures performed by the CAP. [OID: slCapRotationFails]', `cap_ipls` int(11) DEFAULT NULL COMMENT 'The number of IPL''s performed by the CAP. [OID: slCapIPLs]', `cap_access_state_enum` int(11) DEFAULT NULL COMMENT 'The access state of the cap presented as an enumeration. [OID: slCapAccessStateEnum]', `cap_fault_led` tinyint(4) DEFAULT NULL COMMENT 'CAP LED state as an enumeration. Values: 1=On, 2=Off. [OID: slCapFaultLED]', `cap_status_enum` tinyint(4) DEFAULT NULL COMMENT 'The operational status of the CAP presented as an enumeration. [OID: slCapStatusEnum]', `cap_name` varchar(32) DEFAULT NULL COMMENT 'The CAP name. [OID: slCapName]', `cap_accessibility` varchar(32) DEFAULT NULL COMMENT 'The accessibility of a CAP (open allow/ prevent). [OID: slCapAccessibility]', `cap_physical_address_str` varchar(32) DEFAULT NULL COMMENT 'CAP physical address string. For backwards compatibility, the SL500 will return a logical SCSI Element ID in lieu of a physical address. [OID: slCapPhysicalAddressStr]', `cap_state` varchar(32) DEFAULT NULL COMMENT 'The physical state of the CAP. [OID: slCapState]', `cap_code_ver` varchar(32) DEFAULT NULL COMMENT 'The CAP code version. [OID: slCapCodeVer]', `cap_version` varchar(32) DEFAULT NULL COMMENT 'The CAP version. [OID: sCapVersion]', `cap_fw_version` varchar(32) DEFAULT NULL COMMENT 'The CAP firmware version. [OID: slCapFirmwareVer]', `processed` datetime DEFAULT NULL COMMENT 'Timestamp of when this trap was processed into the warehouse.', PRIMARY KEY (`snmp_caps_pk`), UNIQUE KEY `snmp_caps_pk_UNIQUE` (`snmp_caps_pk`), KEY `fk_snmp_caps_snmp_libraries1_idx` (`sc_snmp_libraries_fk`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `snmp_channel_test_traps` ( `snmp_channel_test_traps_pk` bigint(20) unsigned NOT NULL COMMENT 'Primary key.', `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created in the TBI database.', `snmp_lib_connects_fk` bigint(20) unsigned NOT NULL, `sent_time` datetime DEFAULT NULL COMMENT 'Date the trap was sent from the device. [OID: Trap Header record?]', `oid_level` tinyint(4) DEFAULT NULL COMMENT 'Trap OID level: 14=slTrapAgentTest; 15=slTrapAgentHeartbeatA', `trap_count` int(11) DEFAULT NULL COMMENT 'Number of traps generated since last boot.', `lib_boot_date` varchar(32) DEFAULT NULL COMMENT 'The date and time when the library agent initialized.', `lib_date_string` varchar(32) DEFAULT NULL COMMENT 'Library date/time in YYYY:MM:DDTHH:MM:SS.xxxx form.', `lib_serial_number` varchar(32) DEFAULT NULL COMMENT 'Library frame serial number.', `lib_top_level_condition` tinyint(4) DEFAULT NULL COMMENT 'The condition of the overall system at the time of event: 0=normal; 1=degraded; 2=notoperative.', `ha_state` tinyint(4) DEFAULT NULL COMMENT 'RE controller state: 0=simplex, 1=duplex(switchable).', `ha_id` tinyint(4) DEFAULT NULL COMMENT 'RE controller identifier: 0=active; 1=standby.', `ha_slot` tinyint(4) DEFAULT NULL COMMENT 'RE controler slot: 0=sideA; 1=sideB.', `ha_alternate_ip` varchar(32) DEFAULT NULL COMMENT 'Alternate RE controller IP address.', `snmp_protocol` varchar(10) DEFAULT NULL, `processed` datetime DEFAULT NULL COMMENT 'Timestamp of when this record was processed into the data warehouse.', `request_id` bigint(20) DEFAULT NULL, `expired` datetime DEFAULT NULL, `pdu_version` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`snmp_channel_test_traps_pk`), UNIQUE KEY `idx_snmp_channel_test_traps_pk_unq` (`snmp_channel_test_traps_pk`), KEY `fk_snmp_channel_test_traps_snmp_lib_connects1_idx` (`snmp_lib_connects_fk`), CONSTRAINT `fk_snmp_channel_test_traps_snmp_lib_connects1` FOREIGN KEY (`snmp_lib_connects_fk`) REFERENCES `snmp_lib_connects` (`snmp_lib_connects_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `snmp_cleaning_cartridges` ( `SNMP_CLEAN_CARTRIDGES_PK` bigint(20) unsigned NOT NULL COMMENT 'Primary key.', `CREATED` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Timestamp of when the record was created in the TBI database.', `SCC_SNMP_LIBRARIES_FK` bigint(20) unsigned NOT NULL COMMENT 'Integer index into the cleaning cartridge table. [Source: slCleanCartIndex]', `CLEAN_CART_INDEX` int(11) DEFAULT NULL COMMENT 'Integer index into the cleaning cart table. [OID: slCleanCartIndex]', `CLEAN_CART_LABEL` varchar(32) DEFAULT NULL COMMENT 'The cleaning cartridge label. [OID: slCleanCartLabel]\n', `CLEAN_CART_TYPE` varchar(32) DEFAULT NULL COMMENT 'Cleaning cartridge type: "DLT," "9840," "LTO," etc. [OID: slCleanCartType]', `CLEAN_CART_LOCATION_ELEMENT_ID` int(11) DEFAULT '0' COMMENT 'The cleaning cartridge location element ID. [OID: slCleanCartLocationElementID]\n', `CLEAN_CART_HOST_ACCESSIBLE` tinyint(4) DEFAULT NULL COMMENT 'Indication of host accessible status, 1=TRUE, 2=FALSE. [OID: slCleanCartHostAccessible ]', `CLEAN_CART_USAGE_COUNT` int(11) DEFAULT '0' COMMENT 'Number of times that the cartridge has been used for cleaning. [OID: slCleanCartUsageCount]\n', `PROCESSED` datetime DEFAULT NULL COMMENT 'Timestamp of when this record was processed into the data warehouse.', PRIMARY KEY (`SNMP_CLEAN_CARTRIDGES_PK`), UNIQUE KEY `IDX_SNMP_CLEAN_CTDG_PK_UNIQUE` (`SNMP_CLEAN_CARTRIDGES_PK`), KEY `IDX_SCC_SNMP_LIBS_FK1` (`SCC_SNMP_LIBRARIES_FK`), CONSTRAINT `SNMP_CLEAN_CARTRIDGES_SNMP_LIBRARIES_FK1` FOREIGN KEY (`SCC_SNMP_LIBRARIES_FK`) REFERENCES `snmp_libraries` (`SNMP_LIBRARIES_PK`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `snmp_controllers` ( `snmp_controllers_pk` bigint(20) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `sc_snmp_libraries_fk` bigint(20) unsigned NOT NULL, `controller_index` int(11) DEFAULT NULL COMMENT 'The controller card index. [OID:slControllerIndex]', `controller_physical_address_str` varchar(32) DEFAULT NULL COMMENT 'The controller physical address string. [OID: slControllerPhysicalAddressStr]', `controller_serial_num` int(11) DEFAULT NULL COMMENT 'The controller card serial number. [OID: slControllerSerialNum]', `controller_top_level_condition` int(11) DEFAULT NULL COMMENT 'The controller top level condition. Values: 0=normal; 1=degraded; 2=nonoperative. [OID: slControllerTopLevelCondition]', `controller_fault_led` tinyint(4) DEFAULT NULL COMMENT 'The controller fault LED state as an enumeration. Values: 1=On, 2=Off. [OID: slControllerFaultLED]', `controller_safe_to_remove_led` tinyint(4) DEFAULT NULL COMMENT 'The controller safe-to-remove LED state. Values: 1=On; 2=Off. [OID: slControllerSafeToRemoveLED]', `controller_status_enum` tinyint(4) DEFAULT NULL COMMENT 'The controller operational status in enumerated form: Values: 0-ok; 1-error; 2-warning; 3-info; 4-trace. [OID: slControllerStatusEnum]', `controller_code_ver` varchar(32) DEFAULT NULL COMMENT 'The CONTROLLER code version. [OID: slControllerCodeVer]', `controller_version` varchar(32) DEFAULT NULL COMMENT 'The CONTROLLER version. [OID: slControllerVersion]', `controller_fw_version` varchar(32) DEFAULT NULL COMMENT 'The controller firmware version. [OID: slControllerFirmwareVer]', `controller_ha_state` tinyint(4) DEFAULT NULL COMMENT 'RE controller state. simplex=0, duplex(switchable)=1. [OID: slControllerHaState]', `controller_ha_id` tinyint(4) DEFAULT NULL COMMENT 'RE controller identifier. active=0, standby=1. [OID: slControllerHaId]', `controller_ha_slot` tinyint(4) DEFAULT NULL COMMENT 'RE controller slot. sideA=0, sideB=1. [OID: slControllerHaSlot]', `controller_ha_alternate_ip` varchar(32) DEFAULT NULL COMMENT 'Alternate RE controller IP address. [OID: slControllerHaAlternateIp]', `controller_fru` varchar(44) DEFAULT NULL COMMENT 'The controller Field Replaceable Unit (FRU) based serial number. [OID: slControllerFru]', `processed` datetime DEFAULT NULL COMMENT 'Timestamp of when this record was processed into the data warehouse.', PRIMARY KEY (`snmp_controllers_pk`), UNIQUE KEY `snmp_controllers_pk_UNIQUE` (`snmp_controllers_pk`), KEY `snmp_controllers_snmp_libraries_fk1_idx` (`sc_snmp_libraries_fk`), CONSTRAINT `snmp_controllers_snmp_libraries_fk1` FOREIGN KEY (`sc_snmp_libraries_fk`) REFERENCES `snmp_libraries` (`SNMP_LIBRARIES_PK`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `snmp_drive_status_traps` ( `snmp_drive_status_traps_pk` bigint(20) unsigned NOT NULL COMMENT 'Primary key.', `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created int the TBI database.', `sent_time` datetime DEFAULT NULL COMMENT 'Date the trap was sent from the device. [OID: Trap Header record?]', `oid_level` tinyint(4) DEFAULT NULL COMMENT 'Trap OID level. Should only be 41, 45. [OID: slTrapDrvStatusGood, slTrapDrvStatusBad]', `library_serial_number` varchar(32) DEFAULT NULL COMMENT 'Frame serial number of the library. [OID: slTrapLibrarySerialNumber]', `drive_state` varchar(32) DEFAULT NULL COMMENT 'The drive state as a string, i.e. unknown, empty, loaded, loading, etc. [OID: slDriveState]', `drive_address` varchar(32) DEFAULT NULL COMMENT 'The drive device generic address (either logical or SCSI element ID) as a string.', `drive_type` varchar(32) DEFAULT NULL COMMENT 'The drive type as a string, e.g. STK9840, LTO, etc. [OID: SlDriveType]', `drive_serial_number` varchar(32) DEFAULT NULL COMMENT 'The drive electronic serial number. [OID: slDriveSerialNumber]', `processed` datetime DEFAULT NULL COMMENT 'Timestamp of when this record was processed into the data warehouse.', `drive_vendor` varchar(32) DEFAULT NULL COMMENT 'The drive vendor, e.g. STK, IBM, Quantum, etc. [OID: slDriveVendor]', `snmp_lib_connects_fk` bigint(20) unsigned NOT NULL, `request_id` bigint(20) DEFAULT NULL, `expired` datetime DEFAULT NULL, `snmp_protocol` varchar(10) DEFAULT NULL, `pdu_version` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`snmp_drive_status_traps_pk`), UNIQUE KEY `IDX_SNMP_DRV_STAT_TRAPS_PK_U` (`snmp_drive_status_traps_pk`), KEY `fk_snmp_drive_status_traps_snmp_lib_connects1_idx` (`snmp_lib_connects_fk`), CONSTRAINT `fk_snmp_drive_status_traps_snmp_lib_connects1` FOREIGN KEY (`snmp_lib_connects_fk`) REFERENCES `snmp_lib_connects` (`snmp_lib_connects_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `snmp_drives` ( `snmp_drives_pk` bigint(20) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created. Automatically set to the CURRENT_TIME by MySQL when record is initially created in the DB. Not necessary for the application to set this value.', `sd_snmp_libraries_fk` bigint(20) unsigned NOT NULL, `drive_index` int(11) DEFAULT NULL COMMENT 'Index into the slDriveEntry table. [OID: slDriveIndex]', `drive_element_id` int(11) DEFAULT NULL COMMENT 'Element ID/Address of the drive. [OID: SNMP slDriveElementID]', `drive_type` varchar(32) DEFAULT NULL COMMENT 'The drive type, e.g. "STK9840", "LTO", etc. [OID: slDriveType]', `drive_vendor` varchar(32) DEFAULT NULL COMMENT 'The drive vendor, e.g.,"STK"; "IBM"; "QUANTUM"; etc. [OID: slDriveVendor]', `drive_serial_num` varchar(32) DEFAULT NULL COMMENT 'The drive electronic serial number. [OID: slDriveEntry]', `drive_interface_type` int(11) DEFAULT NULL COMMENT 'The drive physical data transport type as an enumeration, i.e. 1=Unknown; 2=SCSE; 3-Fibre. [OID: slDriveInterfaceType]', `drive_id` int(11) DEFAULT NULL COMMENT 'The drive SCSI ID or FIBRE port assignment. [OID: slDriveID]', `drive_state` varchar(32) DEFAULT NULL COMMENT 'The drive state as a string, e.g. "empty", "loaded", "needs cleaning", etc. [OID: slDriveState]', `drive_led` tinyint(4) DEFAULT NULL COMMENT 'Drive tray LED state as an enumeration. Values: 1=On, 2=Off. [OID: slDriveLED]', `drive_status_enum` tinyint(4) DEFAULT NULL COMMENT 'The drive operational status in enumerated form. Values: 1-Initializing, 2-Empty, 3=cartridgePresent, 4=loading, 5=loaded, 6=cleaning, 7=rewinding, 8=unloading, 9=inoperative, 10=notLoadable, 11=notUnloadable. [OID: slDriveStatusEnum]', `drive_code_ver` varchar(32) DEFAULT NULL COMMENT 'The drive code version. [OID: slDriveCodeVer]', `drive_version` varchar(32) DEFAULT NULL COMMENT 'The drive version. [OID: slDriveVersion]', `drive_get_retries` int(11) DEFAULT NULL COMMENT 'The number of mount retries performed to the drive. [OID: slDriveGetRetries]', `drive_put_retries` int(11) DEFAULT NULL COMMENT 'The number of dismount retries performed to the drive. [OID: slDrivePutRetries]', `drive_command_clean` tinyint(4) DEFAULT NULL COMMENT 'Signal to clean/cancel cleaning of the drive as an enumeration. Values: \n1=Enable; 2=Disable. [OID: slDriveCommandClean]', `drive_cell_status_enum` tinyint(4) DEFAULT NULL COMMENT 'The status of the drive cell presented as an enumeration: Values: 1=Unknown; 2=empty; 3=full. [OID: slDriveCellStatusEnum]', `cell_status_text` varchar(32) DEFAULT NULL COMMENT 'The status of the drive cell as a string. Values: "UNKNOWN", "EMPTY", FULL". [OID: slDriveCellStatusText]', `cell_content_label` varchar(32) DEFAULT NULL COMMENT 'The label of the cartridge in the drive (zero length string if empty; "??????" if unreadable) [OID: slDriveCellContentLabel]', `cell_content_type` varchar(32) DEFAULT NULL COMMENT 'The type of cartridge in the drive (zero length string if empty). [OID: slDriveCellContentType]', `drive_idle_seconds` int(11) DEFAULT NULL COMMENT 'The number of seconds that the drive has been idle (un-mounted). [OID: slIdleSeconds]', `drive_num_mounts` int(11) DEFAULT NULL COMMENT 'The number of mounts to the drive. [OID: slDriveNumMounts]', `fc_node_name` varchar(32) DEFAULT NULL COMMENT 'Drive fibre node World Wide Name. [OID: slDriveFibreNodeName]', `fc_port_count` tinyint(4) DEFAULT NULL COMMENT 'The number of active ports on the drive. Values: 1=Single; 2=Dual. [OID: slDriveFibrePortCount]', `fc_port_a_wwn` varchar(32) DEFAULT NULL COMMENT 'Drive port A world wide name. [OID: slDriveFibrePortAWWN]', `fc_port_a_addressing_mode` tinyint(4) DEFAULT NULL COMMENT 'Port A addressing mode. Values: 1=Hard; 2= Soft. [OID: slDriveFibrePortAAddressingMode]', `fc_port_a_port_enabled` tinyint(4) DEFAULT NULL COMMENT 'Port A - is port enabled. Values: 1=Enabled; 2=Disabled. [OID: slDriveFibrePortAPortEnabled]', `fc_port_a_port_speed` tinyint(4) DEFAULT NULL COMMENT 'Port A - port speed enumeration. Values: 1=Unknown; 2=onGbit; 3-twoGbit; 4-fourGbit. [OID: slDriveFibrePortAPortSpeed]', `fc_port_b_wwn` varchar(32) DEFAULT NULL COMMENT 'Drive port B world wide name. [OID: slDriveFibrePortBWWN]', `fc_port_b_addressing_mode` tinyint(4) DEFAULT NULL COMMENT 'Port B addressing mode. Values: 1=Hard; 2= Soft. [OID: slDriveFibrePortBAddressingMode]', `fc_port_b_port_enabled` tinyint(4) DEFAULT NULL COMMENT 'Port B - is port enabled. Values: 1=Enabled; 2=Disabled. [OID: slDriveFibrePortBPortEnabled]', `fc_port_b_loop_id` int(11) DEFAULT NULL COMMENT 'Port B - loop ID. [OID: slDriveFibrePortBLoopId]', `fc_port_b_port_speed` tinyint(4) DEFAULT NULL COMMENT 'Port B - port speed as an enumeration. Values: 1=Unknown; 2=oneGbit; 3-twoGbit; 4-fourGbit. [OID: slDriveFibrePortBPortSpeed]', `drive_wwn_enabled` tinyint(4) DEFAULT NULL COMMENT 'The drive world wide name option. Values: 1=disabled; 2=enabled. [OID: slDriveWWNEnabled]', `drive_physical_address_str` varchar(32) DEFAULT NULL COMMENT 'The drive physical address string. [OID: slDrivePhysicalAddressStr]', `processed` datetime DEFAULT NULL COMMENT 'Timestamp of when this record was processed into the data warehouse.', `fc_port_a_loop_id` int(11) DEFAULT NULL COMMENT 'Port A - loop ID [OID: slDriveFibrePortALoopId]', `drive_tray_serial_num` varchar(32) DEFAULT NULL COMMENT 'Drive tray serial number.', PRIMARY KEY (`snmp_drives_pk`), UNIQUE KEY `IDX_SD_PK_UNIQUE` (`snmp_drives_pk`), KEY `IDX_SD_SNMP_LIBRARIES_FK1` (`sd_snmp_libraries_fk`), CONSTRAINT `SD_SNMP_LIBRARIES_FK1` FOREIGN KEY (`sd_snmp_libraries_fk`) REFERENCES `snmp_libraries` (`SNMP_LIBRARIES_PK`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `snmp_elevators` ( `snmp_elevators_pk` bigint(20) unsigned NOT NULL COMMENT 'Primary SNMP elevator record key.', `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created. Automatically set to the CURRENT_TIME by MySQL when record is initially created in the DB. Not necessary for the application to set this value.', `se_snmp_libraries_fk` bigint(20) unsigned NOT NULL COMMENT 'Foreign key to library containing the elevator.', `elevator_index` int(11) DEFAULT NULL COMMENT 'Elevator index. [OID:slElevatorIndex]', `elevator_position` int(11) DEFAULT NULL COMMENT 'Elevator position (not implemented on any SL Series Library). [OID: slElevatorPositionOn]', `elevator_serial_num` int(11) DEFAULT NULL COMMENT 'The elevator card serial number. [OID: slElevatorSerialNum]', `elevator_get_retries` int(11) DEFAULT NULL COMMENT 'The number of mount retries performed by the elevator. [OID: slElevatorGetRetries]', `elevator_put_retries` int(11) DEFAULT NULL COMMENT 'The number of dismount retries performed by the elevator. [OID: slElevatorPutRetries]', `elevator_get_fails` int(11) DEFAULT NULL COMMENT 'The number of GET fails for the elevator. [OID: slElevatorGetFails]', `elevator_put_fails` int(11) DEFAULT NULL COMMENT 'The number of PUT fails for an individual elevator.[OID: slElevatorPutFails]', `elevator_get_totals` int(11) DEFAULT NULL COMMENT 'The sum of all GET operations of individual elevators. [OID: slElevatorGetTotals]', `elevator_put_totals` int(11) DEFAULT NULL COMMENT 'The sum of all PUT operations of individual elevators. [OID: slElevatorPutTotals]', `elevator_hand_cart_status` tinyint(4) DEFAULT NULL COMMENT 'State of the elevator hand. 0=empty; 1=cartridge. [OID: slElevatorHandCartStatus]', `elevator_fault_led` tinyint(4) DEFAULT NULL COMMENT 'Elevator LED state as an enumeration. Values: 1=On, 2=Off. [OID: slElevatorFaultLED]', `elevator_status_enum` tinyint(4) DEFAULT NULL COMMENT 'The elevator operational status in enumerated form: Values: 0-ok; 1-error; 2-warning; 3-info; 4-trace. [OID: slElevatorStatusEnum]', `elevator_physical_address_str` varchar(32) DEFAULT NULL COMMENT 'The elevator physical address string. [OID: slElevatorPhysicalAddressStr]', `elevator_state` varchar(32) DEFAULT NULL COMMENT 'The current elevator state as a string: empty, loaded, moving, etc. [OID: slElevatorState]', `elevator_code_ver` varchar(32) DEFAULT NULL COMMENT 'The elevator code version. [OID: slElevatorCodeVer]', `elevator_version` varchar(32) DEFAULT NULL COMMENT 'The elevator version. [OID: slElevatorVersion]', `elevator_fw_version` varchar(32) DEFAULT NULL COMMENT 'The elevator firmware version. [OID: slElevatorFirmwareVer]', `processed` datetime DEFAULT NULL COMMENT 'Timestamp of when this record was processed into the data warehouse.', PRIMARY KEY (`snmp_elevators_pk`), UNIQUE KEY `snmp_elevators_pk_UNIQUE` (`snmp_elevators_pk`), KEY `fk_snmp_elevators_snmp_libraries1_idx` (`se_snmp_libraries_fk`), CONSTRAINT `fk_snmp_elevators_snmp_libraries1` FOREIGN KEY (`se_snmp_libraries_fk`) REFERENCES `snmp_libraries` (`SNMP_LIBRARIES_PK`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `snmp_informs` ( `snmp_informs_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `oid_level` tinyint(4) NOT NULL COMMENT 'Trap level number.', `sent_time` datetime NOT NULL COMMENT 'Time the trap was actually sent.', `library_serial_number` varchar(32) DEFAULT NULL, `library_host_name` varchar(255) NOT NULL, `raw_event_record` varchar(1536) NOT NULL, `processed` datetime DEFAULT NULL, `request_id` bigint(20) unsigned DEFAULT NULL, `snmp_lib_connects_fk` bigint(20) unsigned NOT NULL, `pkt_grp_num` int(11) DEFAULT NULL, `pkt_num` int(11) DEFAULT NULL, `expired` datetime DEFAULT NULL, `snmp_protocol` varchar(10) DEFAULT NULL, `pdu_version` int(10) unsigned DEFAULT NULL, `is_out_of_order` tinyint(4) DEFAULT NULL, `num_missing` int(10) unsigned DEFAULT '0', `seq_pkt_grp_num` int(11) DEFAULT NULL, `seq_pkt_num` int(11) DEFAULT NULL, `exchanges_fk` bigint(20) unsigned DEFAULT NULL, PRIMARY KEY (`snmp_informs_pk`), UNIQUE KEY `IDX_SNMP_INFORMS_PK_UNQ` (`snmp_informs_pk`), KEY `fk_inf_snmp_lib_connects_idx` (`snmp_lib_connects_fk`), KEY `fk_snmp_informs_exchanges_idx` (`exchanges_fk`), CONSTRAINT `fk_inf_snmp_lib_connects` FOREIGN KEY (`snmp_lib_connects_fk`) REFERENCES `snmp_lib_connects` (`snmp_lib_connects_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_snmp_informs_exchanges` FOREIGN KEY (`exchanges_fk`) REFERENCES `exchanges` (`exchanges_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `snmp_lib_agent_start_traps` ( `snmp_lib_agent_start_traps_pk` bigint(20) unsigned NOT NULL COMMENT 'Primary key.', `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created. Automatically set to the CURRENT_TIME by MySQL when record is initially created in the DB. Not necessary for the application to set this value.', `sent_time` datetime DEFAULT NULL COMMENT 'Date the trap was sent from the device. [OID: Trap Header record?]', `oid_level` tinyint(4) DEFAULT NULL COMMENT 'Trap OID level. This should always be 11. [OID: slTrapAgentStart]', `library_serial_number` varchar(32) DEFAULT NULL COMMENT 'Frame serial number of the library. [OID: slTrapLibrarySerialNumber]', `agent_boot_date` varchar(32) DEFAULT NULL COMMENT 'The data and time when the agent was booted. [OID: slAgentBootDate]', `processed` datetime DEFAULT NULL COMMENT 'Timestamp of when this record was processed into the data warehouse.', `snmp_lib_connects_fk` bigint(20) unsigned NOT NULL, `request_id` bigint(20) DEFAULT NULL, `expired` datetime DEFAULT NULL, `snmp_protocol` varchar(10) DEFAULT NULL, `pdu_version` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`snmp_lib_agent_start_traps_pk`), UNIQUE KEY `IDX_LIB_AGNT_STRT_TRAPS_PK_UNQ` (`snmp_lib_agent_start_traps_pk`), KEY `fk_snmp_lib_agent_start_traps_snmp_lib_connects1_idx` (`snmp_lib_connects_fk`), CONSTRAINT `fk_snmp_lib_agent_start_traps_snmp_lib_connects1` FOREIGN KEY (`snmp_lib_connects_fk`) REFERENCES `snmp_lib_connects` (`snmp_lib_connects_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `snmp_lib_comm_status` ( `snmp_lib_comm_status_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `snmp_lib_connects_fk` bigint(20) unsigned NOT NULL, `snmp_comm_condition_enum` varchar(32) DEFAULT NULL, `time_received` datetime DEFAULT NULL, `is_latest` tinyint(1) unsigned DEFAULT NULL, PRIMARY KEY (`snmp_lib_comm_status_pk`), UNIQUE KEY `snmp_lib_comm_status_pk_unq` (`snmp_lib_comm_status_pk`), KEY `fk_slcs_snmp_lib_connects1_idx` (`snmp_lib_connects_fk`), KEY `idx_slcs_snmp_comm_condition_enum` (`snmp_comm_condition_enum`), KEY `idx_slcs_time_received` (`time_received`), KEY `idx_slcs_is_latest` (`is_latest`), CONSTRAINT `fk_slcs_snmp_lib_connects1` FOREIGN KEY (`snmp_lib_connects_fk`) REFERENCES `snmp_lib_connects` (`snmp_lib_connects_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `snmp_lib_config_traps` ( `snmp_lib_config_traps_pk` bigint(20) unsigned NOT NULL COMMENT 'Primary key.', `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created. Automatically set to the CURRENT_TIME by MySQL when record is initially created in the DB. Not necessary for the application to set this value.', `sent_time` datetime DEFAULT NULL COMMENT 'Date the trap was sent from the device. [OID: Trap Header record?]', `oid_level` tinyint(4) DEFAULT NULL COMMENT 'Trap OID level. Should always be 4. [OID: slTrapConfiguration]', `library_serial_number` varchar(32) DEFAULT NULL COMMENT 'The frame serial number of the library. [OID: slTrapConfigLibrarySerialNumber]', `device_id` varchar(44) DEFAULT NULL COMMENT 'The device FRU ID, needed for high availability. [OID: slTrapConfigDeviceId]', `device_time` varchar(24) DEFAULT NULL COMMENT 'The device date and time in UTC standard format per ISO 1086. [OID: slTrapConfigDeviceTime]', `device_address` varchar(12) DEFAULT NULL COMMENT 'The device address of the component associated with the log entry. [OID: slTrapConfigDeviceAddress ]', `device_user_name` varchar(8) DEFAULT NULL COMMENT 'The user name on the device identifying the access level that originated the activity. [OID: slTrapConfigDeviceUserName]', `device_interface_name` varchar(8) DEFAULT NULL COMMENT 'A name representing the interface on the device that was used to request the activity. [OID: slTrapConfigInterfaceName]', `device_activity` varchar(20) DEFAULT NULL COMMENT 'A short text name representing the device activity being performed. [OID: slTrapConfigDeviceActivity]', `device_request_id` varchar(8) DEFAULT NULL COMMENT 'The device request id associated with the activity with this trap. [OID: slTrapConfigRequestId]', `device_severity` varchar(6) DEFAULT NULL COMMENT 'The device log severity. [OID: slTrapConfigDeviceSeverity]', `device_result_code` varchar(5) DEFAULT NULL COMMENT 'The device result code (event id). [OID: slTrapConfigDeviceResultCode]', `device_property_name` varchar(128) DEFAULT NULL COMMENT 'The device property name that is being configured. [OID: slTrapConfigDevicePropertyName]', `device_new_property_value` varchar(128) DEFAULT NULL COMMENT 'The new value that has been changed. Success will only be reported. [OID: slTrapConfigDeviceNewPropertyValue]', `device_new_property_effective` varchar(128) DEFAULT NULL COMMENT 'The condition when the new property value will be effective. [OID: slTrapConfigDeviceNewPropertyValue]', `processed` datetime DEFAULT NULL COMMENT 'Timestamp of when this record was processed into the data warehouse.', `snmp_lib_connects_fk` bigint(20) unsigned NOT NULL, `request_id` bigint(20) DEFAULT NULL, `expired` datetime DEFAULT NULL, `snmp_protocol` varchar(10) DEFAULT NULL, `pdu_version` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`snmp_lib_config_traps_pk`), UNIQUE KEY `IDX_SNMP_CONFIG_TRAPS_PK_UNQ` (`snmp_lib_config_traps_pk`), KEY `fk_snmp_lib_config_traps_snmp_lib_connects1_idx` (`snmp_lib_connects_fk`), CONSTRAINT `fk_snmp_lib_config_traps_snmp_lib_connects1` FOREIGN KEY (`snmp_lib_connects_fk`) REFERENCES `snmp_lib_connects` (`snmp_lib_connects_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `snmp_lib_connects` ( `snmp_lib_connects_pk` bigint(20) unsigned NOT NULL COMMENT 'Primary key.', `slc_snmp_agents_fk` bigint(20) unsigned DEFAULT NULL COMMENT 'Foreign key to the SNMP_TBI_AGENTS table.', `lib_ip_primary` varchar(255) DEFAULT NULL COMMENT 'Primary SNMP IP address. Either IPV4 or IPv6. For SL3000 and SL8500, this is the "2B" connector port on the primary board. For SL500 this is the "1A" connector port.', `lib_ip_secondary` varchar(255) DEFAULT NULL COMMENT 'Secondary SNMP IP address. Either IPv4 or IPv6. Only valid for SL3000 and SL8500 with redundant controller boards. This is the "2B" connector port on the redundant controller board.', `lib_name` varchar(32) DEFAULT NULL COMMENT 'Name of the SNMP-enabled library. ', `lib_agent_engine_id` varchar(72) DEFAULT NULL COMMENT 'Unique identifier for the library SNMP agent engine.', `agent_ip` varchar(255) DEFAULT NULL COMMENT 'IP address of the server hosting the TBI SNMP agent.', `requested_mib_walk_time` time DEFAULT NULL COMMENT 'User requested mib walk start time.', `has_changes` tinyint(1) DEFAULT NULL COMMENT 'Flag set by UI and SNMP modules to indicate configuration information has changed.', `library_serial_number` varchar(32) DEFAULT NULL, `is_valid` tinyint(1) DEFAULT NULL COMMENT 'Flag to indicate if the record is still valid. This flag should be verified to be on before connecting to the library.', `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Date this record was created in the database.', `timezone_enum` varchar(64) DEFAULT NULL, `retired` timestamp NULL DEFAULT NULL COMMENT 'The time and date that this library and its assets were removed from STA monitoring activities.\n', PRIMARY KEY (`snmp_lib_connects_pk`), UNIQUE KEY `snmp_lib_connects_pk_UNIQUE` (`snmp_lib_connects_pk`), KEY `IDX_SLC_SNMP_TBI_AGENTS_FK` (`slc_snmp_agents_fk`), KEY `idx_slc_is_valid` (`is_valid`), KEY `idx_slc_lib_name` (`lib_name`), CONSTRAINT `SLC_SNMP_TBI_AGENTS_FK1` FOREIGN KEY (`slc_snmp_agents_fk`) REFERENCES `snmp_agents` (`snmp_agents_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `snmp_lib_env_check_traps` ( `snmp_lib_env_check_traps_pk` bigint(20) unsigned NOT NULL COMMENT 'Primary key.', `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created in the TBI database.', `sent_time` datetime DEFAULT NULL COMMENT 'Date the trap was sent from the device. [OID: Trap Header record?]', `oid_level` tinyint(4) DEFAULT NULL COMMENT 'Trap OID level: 1=error; 2=warning; 3=information.', `device_severity` varchar(6) DEFAULT NULL COMMENT 'The device log severity. [Source: SNMP slTrapDeviceSeverity]', `library_serial_number` varchar(32) DEFAULT NULL COMMENT 'Frame serial number of the library. [OID: slTrapLibrarySerialNumber]', `device_id` varchar(44) DEFAULT NULL COMMENT 'The device FRU ID, needed for high availability. [OID: slTrapDeviceId]', `device_time` varchar(24) DEFAULT NULL COMMENT 'The device date and time in UTC standard format per ISO 1086. [OID: slTrapDeviceTime]', `device_address` varchar(12) DEFAULT NULL COMMENT 'The device address of the component associated with the log entry. [OID: slTrapDeviceAddress ]', `device_user_name` varchar(8) DEFAULT NULL COMMENT 'The user name on the device identifying the access level that originated the activity. [OID: slTrapDeviceUserName]', `device_interface_name` varchar(8) DEFAULT NULL COMMENT 'A name representing the interface on the device that was used to request the activity. [OID: slTrapInterfaceName]', `device_activity` varchar(20) DEFAULT NULL COMMENT 'A short text name representing the device activity being performed. [OID: slTrapDeviceActivity]', `device_request_id` varchar(8) DEFAULT NULL COMMENT 'The device request id associated with the activity with this trap. [OID: slTrapRequestId]', `device_result_code` varchar(5) DEFAULT NULL COMMENT 'The device result code (event id). [OID: slTrapDeviceResultCode]', `device_free_form_text` varchar(1350) DEFAULT NULL COMMENT 'Usually text from sub-systems that led to the log entry. [OID: slTrapDeviceFreeFormText]', `processed` datetime DEFAULT NULL COMMENT 'Timestamp of when this record was processed into the data warehouse.', `request_id` bigint(20) DEFAULT NULL, `snmp_lib_connects_fk` bigint(20) unsigned NOT NULL, `expired` datetime DEFAULT NULL, `snmp_protocol` varchar(10) DEFAULT NULL, `pdu_version` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`snmp_lib_env_check_traps_pk`), UNIQUE KEY `IDX_LIB_ENV_CHNG_TRAPS_PK_UNQ` (`snmp_lib_env_check_traps_pk`), KEY `fk_snmp_lib_env_check_traps_snmp_lib_connects1_idx` (`snmp_lib_connects_fk`), CONSTRAINT `fk_snmp_lib_env_check_traps_snmp_lib_connects1` FOREIGN KEY (`snmp_lib_connects_fk`) REFERENCES `snmp_lib_connects` (`snmp_lib_connects_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `snmp_lib_log_traps` ( `snmp_lib_log_traps_pk` bigint(20) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created. Automatically set to the CURRENT_TIME by MySQL when record is initially created in the DB. Not necessary for the application to set this value.', `sent_time` datetime DEFAULT NULL COMMENT 'Date the trap was sent from the device. [Source: SNMP Trap Header record?]', `oid_level` tinyint(4) DEFAULT NULL COMMENT 'Trap OID level. This will be 1=error; 2=warning; 3=information. [Source: SNMP slTrapError, slTrapWarning, slTrapInformation]', `library_serial_number` varchar(32) DEFAULT NULL COMMENT 'Frame serial number of the library. [Source: OID slTrapLibrarySerialNumber]', `device_id` varchar(44) DEFAULT NULL COMMENT 'The device FRU ID, needed for high availability. [Source: OID slTrapDeviceId]', `device_time` varchar(24) DEFAULT NULL COMMENT 'The device date and time in UTC standard format per ISO 1086. [Source: OID slTrapDeviceTime]', `device_address` varchar(12) DEFAULT NULL COMMENT 'The device address of the component associated with the log entry. [Source: OID slTrapDeviceAddress ]', `device_interface_name` varchar(8) DEFAULT NULL COMMENT 'A name representing the interface on the device that was used to request the activity. [Source: OID slTrapDeviceInterfaceName]', `device_user_name` varchar(8) DEFAULT NULL COMMENT 'The user name on the device identifying the access level that originated the activity. [Source: OID slTrapDeviceUserName]', `device_activity` varchar(20) DEFAULT NULL COMMENT 'A short text name representing the device activity being performed. [Source: OID slTrapDeviceActivity]', `device_request_id` varchar(8) DEFAULT NULL COMMENT 'The device request id associated with the activity with this trap. [Source: OID slTrapRequestId]', `device_severity` varchar(6) DEFAULT NULL COMMENT 'The device log severity. [Source: OID slTrapDeviceSeverity]', `device_result_code` varchar(5) DEFAULT NULL COMMENT 'The device result code (event id). [Source: OID slTrapDeviceResultCode]', `device_free_form_text` varchar(1350) DEFAULT NULL COMMENT 'Usually text from sub-systems that led to the log entry. [Source: OID slTrapDeviceFreeFormText]', `processed` datetime DEFAULT NULL, `request_id` bigint(20) DEFAULT NULL, `snmp_lib_connects_fk` bigint(20) unsigned NOT NULL, `expired` datetime DEFAULT NULL, `snmp_protocol` varchar(10) DEFAULT NULL, `pdu_version` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`snmp_lib_log_traps_pk`), UNIQUE KEY `IDX_SNMP_LOG_TRAPS_PK_UNQ` (`snmp_lib_log_traps_pk`), KEY `fk_snmp_lib_log_traps_snmp_lib_connects1_idx` (`snmp_lib_connects_fk`), CONSTRAINT `fk_snmp_lib_log_traps_snmp_lib_connects1` FOREIGN KEY (`snmp_lib_connects_fk`) REFERENCES `snmp_lib_connects` (`snmp_lib_connects_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `snmp_lib_status_traps` ( `snmp_lib_status_traps_pk` bigint(20) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created int he TBI database.', `sent_time` datetime DEFAULT NULL COMMENT 'Date the trap was sent from the device. [OID: Trap Header record?]', `oid_level` tinyint(4) DEFAULT NULL COMMENT 'Trap OID level. Should always be 21=good or 25=check. [OID: slTrapLibStatusGood, slTrapLibStatusCheck]', `library_serial_number` varchar(32) DEFAULT NULL COMMENT 'Frame serial number of the library. [OID: slLibSerialNumber]\n', `library_stkbase_model` varchar(8) DEFAULT NULL COMMENT 'StorageTek Model Name as a text string. [OID: slLibStkBaseModel]', `library_top_level_condition` tinyint(4) DEFAULT NULL COMMENT 'The overall condition of the library as an enumeration, i.e. 0=normal; 1=degraded; 2=notoperative. [OID: slLibraryTopLevelCondition]', `processed` datetime DEFAULT NULL COMMENT 'Timestamp of when this record was processed into the data warehouse.', `snmp_lib_connects_fk` bigint(20) unsigned NOT NULL, `request_id` bigint(20) DEFAULT NULL, `expired` datetime DEFAULT NULL, `snmp_protocol` varchar(10) DEFAULT NULL, `pdu_version` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`snmp_lib_status_traps_pk`), UNIQUE KEY `IDX_SNMP_LIB_STATUS_TRAPS_PK_UNQ` (`snmp_lib_status_traps_pk`), KEY `fk_sc_lib_connects_fk1_idx` (`snmp_lib_connects_fk`), CONSTRAINT `fk_sc_lib_connects_fk1` FOREIGN KEY (`snmp_lib_connects_fk`) REFERENCES `snmp_lib_connects` (`snmp_lib_connects_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `snmp_libraries` ( `SNMP_LIBRARIES_PK` bigint(20) unsigned NOT NULL, `CREATED` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created. Automatically set to the CURRENT_TIME by MySQL when record is initially created in the DB. Not necessary for the application to set this value.', `LIB_NAME` varchar(32) DEFAULT NULL COMMENT 'Library name.', `LIB_STK_BASE_MODEL` varchar(32) DEFAULT NULL COMMENT 'The StorageTek Model Name. [OID: slLibStkBaseModel]', `LIB_SERIAL_NUMBER` varchar(32) DEFAULT NULL COMMENT 'The library frame serial number.[OID: slLibSerialNumber]', `LIB_WWN_NUMBER` varchar(32) DEFAULT NULL COMMENT 'The library''s WWN number. The form will be eight octets separated by colons, e.g. XX:XX:XX:XX:XX:XX:XX:XX. [OID: slLibWWNNumber]', `LIB_TOP_LEVEL_CONDITION` tinyint(4) DEFAULT NULL COMMENT 'The library''s current condition as an enumeration, i.e. 1-Normal; 2=Degraded; 3-NotOperative.[OID: slLibraryTopLevelCondition]', `LIB_VERSION_FIRM_REV` varchar(64) DEFAULT NULL COMMENT 'The library''s current condition as an enumeration, i.e. 1-Normal; 2=Degraded; 3-NotOperative. [OID: slLibVersionFirmRev]', `LIB_VERSION_FIRM_DATE` varchar(32) DEFAULT NULL COMMENT 'The library''s embedded firmware build data. [OID: slLibVersionFirmDate]', `LIB_VERSION_BOOT_REV` varchar(32) DEFAULT NULL COMMENT 'The library''s boot software/OS version. [OID: slLibVersionBootRev]', `LIB_VERSION_HARDWARE` varchar(32) DEFAULT NULL COMMENT 'The library\\''s controller hardware version. [OID: slLibVersionHardware]', `LIB_CLEAN_ENABLED` tinyint(4) DEFAULT NULL COMMENT 'Auto clean feature configuration. Not all libraries suport this feature. 1-Disabled; 2=Enabled. [OID: slLibCleanEnabled]', `LIB_LIBRARY_ID_MAX` tinyint(4) DEFAULT '1' COMMENT 'The maximum library indentified within a complex. [OID: slLibLibraryIdMax]', `LIB_LIBRARY_ID` tinyint(4) DEFAULT '1' COMMENT 'The library identifier (n of Max) within a library complex. [OID: slLibLibraryId]', `LIB_COMPLEX_ID` int(11) DEFAULT '1' COMMENT 'The complex identifier. [OID: slLibComplexId]', `NUM_BOOTS` int(11) DEFAULT NULL COMMENT 'The number of library initializations.[OID: slLibStatsNumBoots]', `NUM_DOOR_OPENS` int(11) DEFAULT NULL COMMENT 'The number of times the service door has been opened.[OID: slLibStatsNumDoorOpens]', `NUM_GET_RETRIES` int(11) DEFAULT NULL COMMENT 'The total number of Get retries. [OID: slLibStatsNumGetRetries]', `NUM_GET_FAILS` int(11) DEFAULT NULL COMMENT 'The total number of Get failures. [OID: slLibStatsNumGetFails]', `NUM_PUT_RETRIES` int(11) DEFAULT NULL COMMENT 'The total number of Put retries. [OID: slLibStatsNumPutRetries]', `NUM_PUT_FAILS` int(11) DEFAULT NULL COMMENT 'The total number of Put failures. [OID: slLibStatsNumPutFails]', `NUM_LABEL_RETRIES` int(11) DEFAULT NULL COMMENT 'The total number of label read retries. [OID: slLibStatsNumLabelRetries]', `NUM_LABEL_FAILS` int(11) DEFAULT NULL COMMENT 'The total number of label read failures. [OID: slLibStatsNumLabelFails]', `NUM_TARGET_READS` int(11) DEFAULT NULL COMMENT 'The total number of target reads. [OID: slLibStatsNumTargetReads]', `NUM_TARGET_RETRIES` int(11) DEFAULT NULL COMMENT 'The total number of target read retries. [OID: slLibStatsNumTargetRetries]', `NUM_TARGET_FAILS` int(11) DEFAULT NULL COMMENT 'The total number of target read failures. [OID: slLibStatsNumTargetFails]', `NUM_MOVES` int(11) DEFAULT NULL COMMENT 'The total number of cartridge moves. [OID: slLibStatsNumMoves]', `NUM_MOUNTS` int(11) DEFAULT NULL COMMENT 'The total number of mounts. [OID: slLibStatsNumMounts]', `NUM_EMPTY_READS` int(11) DEFAULT NULL COMMENT 'The total number of empty cell reads. [OID: NumEmptyReads]', `NUM_LABEL_READS` int(11) DEFAULT NULL COMMENT 'The total number of label reads. [OID: slLibStatsNumLabelReads]', `GET_TOTALS` bigint(20) DEFAULT NULL COMMENT 'Sum of all Get operations of individual robots. [OID: slLibStatsGetTotals]', `PUT_TOTALS` bigint(20) DEFAULT NULL COMMENT 'Sum of all Put operations of individual robots. [OID: slLibStatsPutTotals]', `CUM_MACHINE_UPTIME` bigint(20) DEFAULT NULL COMMENT 'Cumulative machine up time in seconds. [OID: slLibStatsCumMachUptime]', `UPTIME_SINCE_LAST_BOOT` bigint(20) DEFAULT NULL COMMENT 'Machine up time since last reboot in seconds. [OID: slLibStatsUpTimeSinceLastBoot]', `PROCESSED` datetime DEFAULT NULL COMMENT 'Timestamp of when the data in this table was processed into the data warehouse. NULL indicates that the transforms for the data in this table is still in progress.', `AGENT_BOOT_TIME` datetime DEFAULT NULL COMMENT 'The data and time when the agent was booted. [OID: slAgentBootDate]', `current_library_time` varchar(45) DEFAULT NULL, `current_mib_version` varchar(20) DEFAULT NULL, `num_storage_cells` int(11) DEFAULT NULL, `num_free_sys_storage_cells` int(11) DEFAULT NULL COMMENT 'Number of ', `num_free_storage_cells` int(11) DEFAULT NULL, `num_drives` int(11) DEFAULT NULL, `num_media` int(11) DEFAULT NULL, `num_clean_cartridges` int(11) DEFAULT NULL, `snmp_mib_walk_fk` bigint(20) unsigned NOT NULL, PRIMARY KEY (`SNMP_LIBRARIES_PK`), KEY `idx_snmp_mib_walk_fk` (`snmp_mib_walk_fk`), CONSTRAINT `fk_snmp_libraries_snmp_mib_walk1` FOREIGN KEY (`snmp_mib_walk_fk`) REFERENCES `snmp_mib_walk` (`snmp_mib_walk_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `snmp_listener_audit` ( `snmp_listener_audit_pk` bigint(20) NOT NULL, `action_time` datetime DEFAULT NULL, `action_type` varchar(12) DEFAULT NULL, `action_status` varchar(45) DEFAULT NULL, `action_failure_detail` varchar(1024) DEFAULT NULL, `action_initiator` varchar(45) DEFAULT NULL, `ip_address` varchar(255) DEFAULT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `action_reason` varchar(255) DEFAULT NULL, PRIMARY KEY (`snmp_listener_audit_pk`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `snmp_media` ( `SNMP_MEDIA_PK` bigint(20) unsigned NOT NULL, `CREATED` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created. Automatically set to the CURRENT_TIME by MySQL when record is initially created in the DB. Not necessary for the application to set this value.', `SM_SNMP_LIBRARIES_FK` bigint(20) unsigned NOT NULL COMMENT 'Foreign key into the SNMP_LIBRARIES table.', `TAPE_INDEX` int(11) DEFAULT NULL COMMENT 'Index into the SNMP Tape table. [OID: slTapeIndex]', `TAPE_LABEL` varchar(32) DEFAULT NULL COMMENT 'The media label contents as a string. [OID: slTapeLabel]', `TAPE_TYPE` varchar(32) DEFAULT NULL COMMENT 'The cartridge type in string form, e.g. "LTOCleaningCart", "LTO_300Gb", etc. [OID: slTapeType]', `TAPE_LOCATION_ELEMENT_ID` int(11) DEFAULT NULL COMMENT 'The cartridge location-element ID. [OID: slTapeLocationElementID]', `TAPE_HOST_ACCESSIBLE` tinyint(4) DEFAULT NULL COMMENT 'Indication of host accessible status. Values: 1=TRUE; 2=FALSE [OID: slTapeHostAccessible]', `TAPE_PHYSICAL_ADDRESS_STR` varchar(32) DEFAULT NULL COMMENT 'Tape cartridge physical address string. [OID: slTapePhysicalAddressStr]', `TAPE_LOGICAL_ADDRESS_STR` varchar(32) DEFAULT NULL COMMENT 'Tape cartridge logical address string. [OID: slTapeLogicalAddressStr]', `TAPE_PARTITION` int(11) DEFAULT NULL COMMENT 'Tape cartridge partition ID. [OID: slTapePartition]', `TAPE_PARTITION_TYPE` tinyint(4) DEFAULT NULL COMMENT 'Tape cartridge partition type.[OID: slTapePartitionType]', `PROCESSED` datetime DEFAULT NULL COMMENT 'Timestamp of when this record was processed into the data warehouse.', PRIMARY KEY (`SNMP_MEDIA_PK`), UNIQUE KEY `IDX_SM_PK_UNIQUE` (`SNMP_MEDIA_PK`), KEY `IDX_SM_LIBRARIES_FK1` (`SM_SNMP_LIBRARIES_FK`), CONSTRAINT `SM_SNMP_LIBRARIES_FK1` FOREIGN KEY (`SM_SNMP_LIBRARIES_FK`) REFERENCES `snmp_libraries` (`SNMP_LIBRARIES_PK`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `snmp_mib_walk` ( `snmp_mib_walk_pk` bigint(20) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created. Automatically set to the CURRENT_TIME by MySQL when record is initially created in the DB. Not necessary for the application to set this value.', `snmp_lib_connects_fk` bigint(20) unsigned DEFAULT NULL COMMENT 'Timestamp of when this instance of the MIB walk was started. [Source: Application]', `mib_walk_initiator` varchar(32) DEFAULT NULL COMMENT '''Name of the object, bean, operation, etc., that initiated this MIB \\"get\\" operation, i.e. \\"TIMER\\", \\"INVENTORY\\", etc. [Source: Application]''', `mib_walk_start` datetime DEFAULT NULL, `mib_walk_end` datetime DEFAULT NULL, `mib_walk_request_time` datetime DEFAULT NULL, `transform_log_fk` bigint(20) unsigned DEFAULT NULL, `mib_walk_status_enum` varchar(20) NOT NULL DEFAULT 'UNKNOWN', `lib_serial_number` varchar(32) DEFAULT NULL, `snmp_protocol` varchar(10) DEFAULT NULL, `lib_name` varchar(32) DEFAULT NULL, `mib_walk_span` varchar(45) DEFAULT NULL COMMENT 'What level of MIB-WALK happened (e.g. top-level, media-only etc) TOP_LIBRARY, COMPLETE, STORAGE_CELLS, DRIVES, MEDIA', `mib_walk_failure_detail` varchar(1024) DEFAULT NULL, `mib_walk_reason` varchar(2048) DEFAULT NULL, `detailed_status_enum` varchar(24) DEFAULT NULL, `is_on_demand` tinyint(1) unsigned DEFAULT '0', PRIMARY KEY (`snmp_mib_walk_pk`), KEY `fk_snmp_mib_walk_snmp_lib_connects1` (`snmp_lib_connects_fk`), KEY `fk_snmp_mib_walk_lkup_mib_walk_status_enum1` (`mib_walk_status_enum`), KEY `fk_snmp_mib_walk_transform_log1` (`transform_log_fk`), CONSTRAINT `fk_snmp_mib_walk_lkup_mib_walk_status_enum1` FOREIGN KEY (`mib_walk_status_enum`) REFERENCES `lkup_mib_walk_status_enum` (`mib_walk_status`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_snmp_mib_walk_snmp_lib_connects1` FOREIGN KEY (`snmp_lib_connects_fk`) REFERENCES `snmp_lib_connects` (`snmp_lib_connects_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_snmp_mib_walk_transform_log1` FOREIGN KEY (`transform_log_fk`) REFERENCES `transform_log` (`transform_log_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `snmp_ptp_status_traps` ( `snmp_ptp_status_traps_pk` bigint(20) unsigned NOT NULL COMMENT 'Primary key.', `snmp_lib_connects_fk` bigint(20) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created in the TBI database.', `sent_time` datetime DEFAULT NULL COMMENT 'Date the trap was sent from the device. [OID: Trap Header record?]', `oid_level` tinyint(4) DEFAULT NULL COMMENT 'Trap OID level.', `library_serial_number` varchar(32) DEFAULT NULL COMMENT 'Frame serial number of the library. [OID: slTrapLibrarySerialNumber]', `ptp_state` varchar(32) DEFAULT NULL COMMENT 'The PTP operational state as a text string, i.e. "ok", "error," "warning," "info," trace." [OID: slPtpState]', `ptp_address` varchar(32) DEFAULT NULL COMMENT 'The PTP device address.', `ptp_serial_number` varchar(32) DEFAULT NULL COMMENT 'The PTP controller serial number. [OID: slPtpSerialNumber]', `processed` datetime DEFAULT NULL, `request_id` bigint(20) DEFAULT NULL, `expired` datetime DEFAULT NULL, `snmp_protocol` varchar(10) DEFAULT NULL, `pdu_version` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`snmp_ptp_status_traps_pk`), UNIQUE KEY `IDX_SNMP_PTP_STAT_TRAPS_PK_UNQ` (`snmp_ptp_status_traps_pk`), KEY `fk_snmp_ptp_status_traps_snmp_lib_connects1_idx` (`snmp_lib_connects_fk`), CONSTRAINT `fk_snmp_ptp_status_traps_snmp_lib_connects1` FOREIGN KEY (`snmp_lib_connects_fk`) REFERENCES `snmp_lib_connects` (`snmp_lib_connects_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `snmp_ptps` ( `snmp_ptps_pk` bigint(20) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `sp_snmp_libraries_fk` bigint(20) unsigned NOT NULL, `ptp_index` int(11) DEFAULT NULL COMMENT 'PTP index. [OID:slPtpIndex]', `ptp_serial_num` int(11) DEFAULT NULL COMMENT 'The PTP card serial number. [OID: slPtpSerialNum]', `ptp_fault_led` tinyint(4) DEFAULT NULL COMMENT 'PTP LED state as an enumeration. Values: 1=On, 2=Off. [OID: slPtpFaultLED]', `ptp_move_retries` int(11) DEFAULT NULL COMMENT 'The number of move retries. [OID: slPtpMoveRetries]', `ptp_move_fails` int(11) DEFAULT NULL COMMENT 'The number of move fails on a particular PTP. [OID: slPtpMoveFails]', `ptp_move_totals` int(11) DEFAULT NULL COMMENT 'The number of completed PTP moves. [OID: slPtpMoveTotals]', `ptp_status_enum` tinyint(4) DEFAULT NULL COMMENT 'The PTP operational status in enumerated form: Values: 0-ok; 1-error; 2-warning; 3-info; 4-trace. [OID: slPtpStatusEnum]', `ptp_physical_address_str` varchar(32) DEFAULT NULL COMMENT 'The PTP physical address string. [OID: slPtpPhysicalAddressStr]', `ptp_state` varchar(32) DEFAULT NULL COMMENT 'The current PTP state as a string: empty, loaded, etc.', `ptp_code_ver` varchar(32) DEFAULT NULL COMMENT 'The PTP code version. [OID: slPtpCodeVer]', `ptp_version` varchar(32) DEFAULT NULL COMMENT 'The PTP version. [OID: slPtpVersion]', `ptp_fw_version` varchar(32) DEFAULT NULL COMMENT 'The PTP firmware version. [OID: slPtpFirmwareVer]', `processed` datetime DEFAULT NULL COMMENT 'Timestamp of when this record was processed into the data warehouse.', PRIMARY KEY (`snmp_ptps_pk`), UNIQUE KEY `snmp_ptps_pk_unq` (`snmp_ptps_pk`), KEY `sp_snmp_libraries_fk1_idx` (`sp_snmp_libraries_fk`), CONSTRAINT `sp_snmp_libraries_fk1` FOREIGN KEY (`sp_snmp_libraries_fk`) REFERENCES `snmp_libraries` (`SNMP_LIBRARIES_PK`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `snmp_robots` ( `snmp_robots_pk` bigint(20) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created. Automatically set to the CURRENT_TIME by MySQL when record is initially created in the DB. Not necessary for the application to set this value.', `sr_snmp_libraries_fk` bigint(20) unsigned NOT NULL, `robot_index` int(11) DEFAULT NULL COMMENT 'Robot index. [OID:slRobotIndex]', `robot_position` int(11) DEFAULT NULL COMMENT 'Position of the robot. DEPRECATED. Unused for all SL series libraries. [OID: slRobotPosition]', `robot_serial_num` int(11) DEFAULT NULL COMMENT 'The robot card serial number. [OID: slRobotSerialNum]', `robot_get_retries` int(11) DEFAULT NULL COMMENT 'The number of mount retries performed by the robot. [OID: slRobotGetRetries]', `robot_put_retries` int(11) DEFAULT NULL COMMENT 'The number of dismount retries performed by the robot. [OID: slRobotPutRetries]', `robot_get_fails` int(11) DEFAULT NULL COMMENT 'The number of GET fails for an individual robot. [OID: slRobotGetFails]', `robot_put_fails` int(11) DEFAULT NULL COMMENT 'The number of PUT fails for an individual robot. [OID: slRobotPutFails]', `robot_get_totals` int(11) DEFAULT NULL COMMENT 'The sum of all GET operations of individual robots.', `robot_put_totals` int(11) DEFAULT NULL COMMENT 'The sum of all PUT operations of individual robots.', `robot_hand_cart_status` tinyint(4) DEFAULT NULL COMMENT 'State of the robot hand. 0=empty; 1=cartridge. [OID: slRobotHandCartStatus]', `robot_fault_led` tinyint(4) DEFAULT NULL COMMENT 'Robot LED state as an enumeration. Values: 1=On, 2=Off. [OID: slRobotFaultLED]', `robot_status_enum` tinyint(4) DEFAULT NULL COMMENT 'The robot operational status in enumerated form: Values: 0-ok; 1-error; 2-warning; 3-info; 4-trace. [OID: slRobotStatusEnum]', `robot_physical_address_str` varchar(32) DEFAULT NULL COMMENT 'The robot physical address string. [OID: slRobotPhysicalAddressStr]', `robot_state` varchar(32) DEFAULT NULL COMMENT 'The current robot state as a string: empty, loaded, moving, etc', `robot_code_ver` varchar(32) DEFAULT NULL COMMENT 'The robot code version. [OID: slRobotCodeVer]', `robot_version` varchar(32) DEFAULT NULL COMMENT 'The robot version. [OID: slRobotVersion]', `robot_fw_version` varchar(32) DEFAULT NULL COMMENT 'The robot firmware version. [OID: slRobotFirmwareVer]', `processed` datetime DEFAULT NULL COMMENT 'Timestamp of when this record was processed into the data warehouse.', PRIMARY KEY (`snmp_robots_pk`), UNIQUE KEY `IDX_SD_PK_UNIQUE` (`snmp_robots_pk`), KEY `IDX_SD_SNMP_LIBRARIES_FK1` (`sr_snmp_libraries_fk`), CONSTRAINT `sr_snmp_libraries_fk10` FOREIGN KEY (`sr_snmp_libraries_fk`) REFERENCES `snmp_libraries` (`SNMP_LIBRARIES_PK`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `snmp_storage_cells` ( `snmp_cells_pk` bigint(20) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created. Automatically set to the CURRENT_TIME by MySQL when record is initially created in the DB. Not necessary for the application to set this value.', `scel_snmp_libraries_fk` bigint(20) unsigned NOT NULL COMMENT 'Foreign key into the SNMP_LIBRARIES table.', `cell_index` int(11) DEFAULT NULL COMMENT 'Integer index into the storage cell table. [OID: slCellIndex]', `cell_element_id` int(11) DEFAULT NULL COMMENT 'Physical element ID/address of the storage cell. [OID: slCellElementID]', `cell_host_accessible` tinyint(4) DEFAULT NULL COMMENT 'Indication of host accessible status. Values: 1=TRUE; 2=FALSE. [OID: slCellHostAccessible]', `cell_content_status` varchar(25) DEFAULT NULL COMMENT 'The status of the cell. Values: 0=UNKNOWN; 1=EMPTY; 2=READABLE; 3=NOT_READABLE; 4=CAP_MAG_NOT_PRESENT; 5=DRIVE_NOT_PRESENT; 6=DRIVE_NOT_AVAILABLE. [OID: slCellContentStatus ]', `cell_content_label` varchar(32) DEFAULT NULL COMMENT 'The label of the cartridge in the cell. (zero length if the cell is empty, and "??????" if the label is unreadable.) [OID: slCellContentLabel]', `cell_content_type` varchar(32) DEFAULT NULL COMMENT 'The type of cartridge in the cell (zero length string if cell is empty), e.g. "DltCartridge", "Lto_200GB", etc. [OID: slCellContentType]', `cell_get_retry_count` int(11) DEFAULT NULL COMMENT 'Number of get retries performed from this cell. [OID: slCellGetRetryCount]', `cell_put_retry_count` int(11) DEFAULT NULL COMMENT 'Number of put retries performed to this cell. [OID: slCellPutRetryCount]', `cell_host_type` tinyint(4) DEFAULT NULL COMMENT 'The type of cell. Values: 0=INVALID; 1=STORAGE; 2=DRIVE; 3=CAP; 4=PLAYGROUND; 5=INTRANSIT; 6=PTP; 7=HAND; 8=GENERIC. [OID: SNMP slCellHostType]', `cell_physical_address_str` varchar(32) DEFAULT NULL COMMENT 'Storage cell physical address string. [OID: slCellPhysicalAddressStr]', `cell_logical_address_str` varchar(32) DEFAULT NULL COMMENT 'Storage cell logical address string. [OID: slCellLogicalAddressStr]', `cell_partition` int(11) DEFAULT NULL COMMENT 'Storage cell partition ID. [OID: slCellPartition]', `cell_partition_type` tinyint(4) DEFAULT NULL COMMENT 'Storage cell partition type. [OID: slCellPartitionType]', `processed` datetime DEFAULT NULL COMMENT 'Timestamp of when this record was processed into the data warehouse.', PRIMARY KEY (`snmp_cells_pk`), UNIQUE KEY `IDX_SNMP_CELLS_PK_UNIQUE` (`snmp_cells_pk`), KEY `IDX_SCEL_SNMP_LIBRARIES_FK1` (`scel_snmp_libraries_fk`), KEY `idx_cell_content_status_ssc` (`cell_content_status`), CONSTRAINT `SCEL_SNMP_LIBRARIES_FK1` FOREIGN KEY (`scel_snmp_libraries_fk`) REFERENCES `snmp_libraries` (`SNMP_LIBRARIES_PK`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `task_tracker` ( `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `event_fk` bigint(20) unsigned NOT NULL, `event_type_fk` tinyint(3) unsigned NOT NULL DEFAULT '0', `views_processed` tinyint(3) unsigned NOT NULL DEFAULT '0', `analytics_processed` tinyint(3) unsigned NOT NULL DEFAULT '0', `analytics_expired` tinyint(3) unsigned NOT NULL DEFAULT '0', `summaries_processed` tinyint(3) unsigned NOT NULL DEFAULT '0', `summaries_expired` tinyint(3) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`event_fk`,`event_type_fk`), KEY `task_tracker_compkey4_UNIQUE` (`event_fk`,`event_type_fk`,`analytics_processed`,`summaries_processed`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `transform_log` ( `transform_log_pk` bigint(20) unsigned NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created. Automatically set to the CURRENT_TIME by MySQL when record is initially created in the DB. Not necessary for the application to set this value.', `transform_start` datetime DEFAULT NULL COMMENT 'Timestamp of when this instance of the MIB walk was started. [Source: Application]', `transform_end` datetime DEFAULT NULL COMMENT 'Timestamp of when this instance of the MIB walk ended. [Source: Application]', `transform_failure_detail` varchar(1024) DEFAULT NULL, `transform_status` varchar(20) DEFAULT NULL COMMENT '''SUCCESS'', ''FAILURE''', `snmp_mib_walk_fk` bigint(20) unsigned DEFAULT NULL, `libraries_fk` bigint(20) unsigned DEFAULT NULL, `library_properties_fk` bigint(20) unsigned DEFAULT NULL, `library_stats_fk` bigint(20) unsigned DEFAULT NULL, `mib_walk_trans_span` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`transform_log_pk`), KEY `fk_transform_log_snmp_mib_walk1` (`snmp_mib_walk_fk`), KEY `fk_transform_log_libraries1` (`libraries_fk`), KEY `fk_transform_log_library_properties1` (`library_properties_fk`), KEY `fk_transform_log_library_stats1` (`library_stats_fk`), CONSTRAINT `fk_transform_log_libraries1` FOREIGN KEY (`libraries_fk`) REFERENCES `libraries` (`libraries_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_transform_log_library_properties1` FOREIGN KEY (`library_properties_fk`) REFERENCES `library_properties` (`library_properties_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_transform_log_library_stats1` FOREIGN KEY (`library_stats_fk`) REFERENCES `library_stats` (`LIBRARY_STATS_PK`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_transform_log_snmp_mib_walk1` FOREIGN KEY (`snmp_mib_walk_fk`) REFERENCES `snmp_mib_walk` (`snmp_mib_walk_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `transient_cells` ( `transient_cells_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the record was created. Automatically set to the CURRENT_TIME by MySQL when record is initially created in the DB. Not necessary for the application to set this value.', `tc_rails_fk` bigint(20) unsigned NOT NULL COMMENT 'Foreign key into the RAILS table.', `type_enum` varchar(20) NOT NULL DEFAULT 'UNKNOWN' COMMENT 'The type of cell. Values: "INVALID", "STORAGE", "DRIVE", "CAP", "PLAYGROUND", "INTRANSIT", "PTP", "HAND", "ELEVATOR", "GENERIC." NULL indicates an unknown cell type. [Source: slCellHostType]', `physical_address` varchar(32) DEFAULT NULL COMMENT 'Physical address in LIBRARY,RAIL,COL,SIDE,ROW fomat, e.g. 1,3,5,3. [Source: slTBIEventData header]', `physical_library_number` smallint(6) DEFAULT NULL COMMENT 'Library number. [Source: slTBIEventData header]', `physical_rail_number` smallint(6) DEFAULT NULL COMMENT 'Rail number. [Source: slTBIEventData header]', `physical_column_number` smallint(6) DEFAULT NULL COMMENT 'Column number. [Source: slTBIEventData header]', `physical_side_number` smallint(6) DEFAULT NULL COMMENT 'Side number. [Source: slTBIEventData header]', `physical_row_number` smallint(6) DEFAULT NULL COMMENT 'Cell''s physical row number. [Source: slTBIEventData header]', `physical_module_number` smallint(6) DEFAULT NULL COMMENT 'Cell''s physical module number if the cell lives in an SL500. This will be empty for SL3000 and SL8500. [Source: SNMP slCellPhysicalAddressStr]', `exist_start` datetime NOT NULL COMMENT 'Date this cell first appeared in the library.', `exist_end` datetime DEFAULT NULL COMMENT 'Date this cell ceased to exist in the library. NULL if it is still defined.', PRIMARY KEY (`transient_cells_pk`), UNIQUE KEY `transient_cells_pk_unq` (`transient_cells_pk`), KEY `fk_transient_cells_rails1_idx` (`tc_rails_fk`), KEY `fk_trans_cells_lkup_cell_type_enum1_idx` (`type_enum`), KEY `idx_tc_exist_start` (`exist_start`), KEY `idx_tc_exist_end` (`exist_end`), CONSTRAINT `fk_transient_cells_rails1` FOREIGN KEY (`tc_rails_fk`) REFERENCES `rails` (`rails_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_trans_cells_lkup_cell_type_enum1` FOREIGN KEY (`type_enum`) REFERENCES `lkup_cell_type_enum` (`cell_type`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `transient_cells_caps` ( `transient_cells_caps_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `tcc_trans_cells_fk` bigint(20) unsigned NOT NULL, `tcc_caps_fk` bigint(20) unsigned NOT NULL, `exist_start` datetime NOT NULL, `exist_end` datetime DEFAULT NULL, `missing_start` datetime DEFAULT NULL, PRIMARY KEY (`transient_cells_caps_pk`), KEY `idx_tcc_exist_start1` (`exist_start`), KEY `idx_tcc_exist_end1` (`exist_end`), KEY `fk_tcc_transient_cells1_idx` (`tcc_trans_cells_fk`), KEY `fk_tcc_caps1_idx` (`tcc_caps_fk`), CONSTRAINT `fk_tcc_caps1` FOREIGN KEY (`tcc_caps_fk`) REFERENCES `caps` (`caps_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_tcc_transient_cells1` FOREIGN KEY (`tcc_trans_cells_fk`) REFERENCES `transient_cells` (`transient_cells_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `transient_cells_controllers` ( `transient_cells_controllers_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `tcc_trans_cells_fk` bigint(20) unsigned NOT NULL, `tcc_controllers_fk` bigint(20) unsigned NOT NULL, `exist_start` datetime NOT NULL, `exist_end` datetime DEFAULT NULL, `missing_start` datetime DEFAULT NULL, PRIMARY KEY (`transient_cells_controllers_pk`), KEY `fk_transient_cells_controllers_transient_cells1_idx` (`tcc_trans_cells_fk`), KEY `fk_transient_cells_controllers_controllers1_idx` (`tcc_controllers_fk`), KEY `tcc_exist_start_idx` (`exist_start`), KEY `tcc_exist_end_idx` (`exist_end`), CONSTRAINT `fk_transient_cells_controllers_controllers1` FOREIGN KEY (`tcc_controllers_fk`) REFERENCES `controllers` (`controllers_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_transient_cells_controllers_transient_cells1` FOREIGN KEY (`tcc_trans_cells_fk`) REFERENCES `transient_cells` (`transient_cells_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `transient_cells_elevators` ( `transient_cells_elevators_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `tce_trans_cells_fk` bigint(20) unsigned NOT NULL, `tce_elevators_fk` bigint(20) unsigned NOT NULL, `exist_start` datetime NOT NULL, `exist_end` datetime DEFAULT NULL, `missing_start` datetime DEFAULT NULL, PRIMARY KEY (`transient_cells_elevators_pk`), KEY `idx_tce_exist_start1` (`exist_start`), KEY `idx_tce_exist_end1` (`exist_end`), KEY `fk_tce_transient_cells1_idx` (`tce_trans_cells_fk`), KEY `fk_tce_elevators1_idx` (`tce_elevators_fk`), CONSTRAINT `fk_tce_elevators1` FOREIGN KEY (`tce_elevators_fk`) REFERENCES `elevators` (`elevators_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_tce_transient_cells1` FOREIGN KEY (`tce_trans_cells_fk`) REFERENCES `transient_cells` (`transient_cells_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `transient_cells_ptps` ( `transient_cells_ptps_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `tcp_trans_cells_fk` bigint(20) unsigned NOT NULL, `tcp_ptps_fk` bigint(20) unsigned NOT NULL, `exist_start` datetime NOT NULL, `exist_end` datetime DEFAULT NULL, `missing_start` datetime DEFAULT NULL, PRIMARY KEY (`transient_cells_ptps_pk`), KEY `idx_tcp_exist_start1` (`exist_start`), KEY `idx_tcp_exist_end1` (`exist_end`), KEY `fk_tcp_transient_cells1_idx` (`tcp_trans_cells_fk`), KEY `fk_tcp_ptps1_idx` (`tcp_ptps_fk`), CONSTRAINT `fk_tcp_ptps1` FOREIGN KEY (`tcp_ptps_fk`) REFERENCES `ptps` (`ptps_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_tcp_transient_cells1` FOREIGN KEY (`tcp_trans_cells_fk`) REFERENCES `transient_cells` (`transient_cells_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `transient_cells_robots` ( `transient_cells_robots_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `tcr_trans_cells_fk` bigint(20) unsigned NOT NULL, `tcr_robots_fk` bigint(20) unsigned NOT NULL, `exist_start` datetime NOT NULL, `exist_end` datetime DEFAULT NULL, `missing_start` datetime DEFAULT NULL, PRIMARY KEY (`transient_cells_robots_pk`), KEY `idx_tcr_exist_start1` (`exist_start`), KEY `idx_tcr_exist_end1` (`exist_end`), KEY `fk_tcr_transient_cells1_idx` (`tcr_trans_cells_fk`), KEY `fk_tcr_robots1_idx` (`tcr_robots_fk`), CONSTRAINT `fk_tcr_robots1` FOREIGN KEY (`tcr_robots_fk`) REFERENCES `robots` (`robots_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_tcr_transient_cells1` FOREIGN KEY (`tcr_trans_cells_fk`) REFERENCES `transient_cells` (`transient_cells_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `ui_defaults` ( `ui_defaults_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `app_users_fk` bigint(20) unsigned DEFAULT NULL, `ui_views_fk` bigint(20) unsigned DEFAULT NULL COMMENT 'TBI User login id.', PRIMARY KEY (`ui_defaults_pk`), UNIQUE KEY `ui_defaults_pk_unq` (`ui_defaults_pk`), KEY `fk_ui_defaults_app_users1_idx` (`app_users_fk`), KEY `fk_ui_defaults_ui_views1_idx` (`ui_views_fk`), CONSTRAINT `fk_ui_defaults_app_users1` FOREIGN KEY (`app_users_fk`) REFERENCES `app_users` (`app_users_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_ui_defaults_ui_views1` FOREIGN KEY (`ui_views_fk`) REFERENCES `ui_views` (`ui_views_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `ui_settings` ( `ui_settings_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Record creation date.', `app_users_fk` bigint(20) unsigned DEFAULT NULL COMMENT 'Foreign key to the TBI_USERS table.', `name` varchar(64) DEFAULT NULL COMMENT 'Name of the setting that this will be known by.', `saved_settings` text COMMENT 'Serialized session settings.', PRIMARY KEY (`ui_settings_pk`), KEY `idx_app_users_fk` (`app_users_fk`), KEY `idx_ui_settings_fk` (`ui_settings_pk`), CONSTRAINT `fk_users_fk` FOREIGN KEY (`app_users_fk`) REFERENCES `app_users` (`app_users_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `ui_views` ( `ui_views_pk` bigint(20) unsigned NOT NULL, `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `app_users_fk` bigint(20) unsigned DEFAULT NULL COMMENT 'Foreign key to TBI_USERS table.', `ui_settings_fk` bigint(20) unsigned NOT NULL COMMENT 'Foreign key to the TBI_UI_SETTINGS table.', `name` varchar(64) DEFAULT NULL COMMENT 'Name of the view.', `type` varchar(64) DEFAULT NULL COMMENT 'Type of view.', `is_default` tinyint(3) unsigned DEFAULT NULL, `is_canned` tinyint(3) unsigned DEFAULT NULL, `is_hidden` tinyint(3) unsigned DEFAULT NULL, PRIMARY KEY (`ui_views_pk`), KEY `idx_ui_settings_fk` (`ui_settings_fk`), KEY `idx_app_users_fk` (`app_users_fk`), CONSTRAINT `fk_app_users` FOREIGN KEY (`app_users_fk`) REFERENCES `app_users` (`app_users_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_ui_settings` FOREIGN KEY (`ui_settings_fk`) REFERENCES `ui_settings` (`ui_settings_pk`) ON DELETE NO ACTION ON UPDATE NO ACTION ); /*!40101 SET character_set_client = @saved_cs_client */; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_action_drives` ( `drives_pk` bigint(20) unsigned, `drive_serial_number` varchar(32), `drive_model` varchar(20), `drive_health` varchar(20), `analytics_date` timestamp, `annotation` varchar(255), `library_serial_number` varchar(32), `library_model` varchar(20), `library_name` varchar(32), `lib_complex_name` varchar(32), `logical_group_names` text ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_action_media` ( `media_pk` bigint(20) unsigned, `volser` varchar(32), `media_type` varchar(20), `media_health` varchar(20), `analytics_date` timestamp, `annotation` varchar(255), `library_name` varchar(32), `library_serial_number` varchar(32), `library_model` varchar(20), `lib_complex_name` varchar(32), `logical_group_names` text ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_alert_history` ( `alert_history_pk` int(1), `create_date` datetime, `annotation` binary(0), `component_fk` binary(0), `event_fk` binary(0), `rule_fk` binary(0), `severity` varchar(4), `event_type_enum` varchar(3), `work_flow_enum` varchar(3) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_analytics_audit` ( `aa_exchanges_fk` bigint(20) unsigned, `sequence_numbers` text, `analytics_audit_pks` text, `analytics_audit_notes` text ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_annotations` ( `annotations_entities_pk` bigint(20) unsigned, `annotations_pk` bigint(20) unsigned, `annotation_text` varchar(255), `last_changed` timestamp, `ae_entity_fk` bigint(20) unsigned, `last_app_user_fk` bigint(20) unsigned, `userid` varchar(64), `entity_type` varchar(32), `entity_type_id` tinyint(3) unsigned, `is_latest` tinyint(1) unsigned ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_cap_locations` ( `caps_pk` bigint(20) unsigned, `serial_number` varchar(64), `physical_address` varchar(32), `library_complexes_pk` bigint(20) unsigned, `libraries_pk` bigint(20) unsigned ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `v_cap_summary_averages` ( `summary_date` date DEFAULT NULL, `avg_num_snmp_traps` int(10) DEFAULT NULL, `avg_num_media_enters` int(10) DEFAULT NULL, `avg_num_media_ejects` int(10) DEFAULT NULL, KEY `v_cap_summ_avgs_idx` (`summary_date`) ); /*!40101 SET character_set_client = @saved_cs_client */; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_caps` ( `caps_pk` bigint(20) unsigned, `serial_number` varchar(64), `exist_start` datetime, `exist_end` datetime, `state` varchar(32), `accessibility` varchar(32), `op_status_enum` varchar(20), `access_status_enum` varchar(8), `num_media_enters_30days` int(10) unsigned, `num_media_ejects_30days` int(10) unsigned, `num_cap_traps_30days` int(10) unsigned, `lib_cap_health_enum_30days` varchar(20), `library_complexes_pk` bigint(20) unsigned, `lib_complex_name` varchar(32), `libraries_pk` bigint(20) unsigned, `library_model` varchar(20), `physical_address` varchar(32), `library_name` varchar(32), `library_serial_number` varchar(32), `annotation` varchar(255), `cap_exist_start_dayts` bigint(10), `cap_exist_end_dayts` bigint(10) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `v_cleaning_actions` ( `library_complexes_pk` bigint(20) unsigned DEFAULT NULL, `lib_complex_name` varchar(32) DEFAULT NULL, `libraries_pk` bigint(20) unsigned DEFAULT NULL, `library_model` varchar(20) DEFAULT NULL, `library_serial_number` varchar(20) DEFAULT NULL, `library_name` varchar(32) DEFAULT NULL, `library_wwn` varchar(32) DEFAULT NULL, `drives_pk` bigint(20) unsigned DEFAULT NULL, `drive_serial_number` varchar(32) DEFAULT NULL, `drive_type` varchar(45) DEFAULT NULL, `drive_model` varchar(20) DEFAULT NULL, `drive_vendor` varchar(20) DEFAULT NULL, `drive_exist_start` datetime DEFAULT NULL, `drive_exist_end` datetime DEFAULT NULL, `fc_node_wwn` varchar(32) DEFAULT NULL, `drive_id` int(11) DEFAULT NULL, `fc_port_a_wwn` varchar(32) DEFAULT NULL, `fc_port_b_wwn` varchar(32) DEFAULT NULL, `mb_for_last_clean` double DEFAULT NULL, `drive_health_enum` varchar(20) DEFAULT NULL, `exchg_err_status_enum` varchar(20) DEFAULT NULL, `exchg_elapsed_time` bigint(20) DEFAULT NULL, `exchg_mount_time` bigint(20) DEFAULT NULL, `media_pk` bigint(20) unsigned DEFAULT NULL, `volser` varchar(32) DEFAULT NULL, `media_exist_start` datetime DEFAULT NULL, `media_exist_end` datetime DEFAULT NULL, `media_health_enum` varchar(20) DEFAULT NULL, `media_exchg_err_status_enum` varchar(20) DEFAULT NULL, `max_cleaning_uses` int(6) DEFAULT NULL, `current_cleaning_uses` int(11) DEFAULT NULL, `cleaning_media_expired` tinyint(4) DEFAULT NULL, `exchanges_pk` bigint(20) unsigned DEFAULT NULL, `exchange_start` datetime DEFAULT NULL, `exchange_end` datetime DEFAULT NULL, `lifetime_cleans` int(10) unsigned DEFAULT NULL, `lifetime_loads` int(10) unsigned DEFAULT NULL, `lifetime_meters` double unsigned DEFAULT NULL, `does_drive_need_cleaning` tinyint(1) DEFAULT NULL, `fsc` varchar(4) DEFAULT NULL, `exchange_start_dayts` bigint(10) DEFAULT NULL, `exchange_end_dayts` bigint(10) DEFAULT NULL, `media_exist_start_dayts` bigint(10) DEFAULT NULL, `media_exist_end_dayts` bigint(10) DEFAULT NULL, `drive_exist_start_dayts` bigint(10) DEFAULT NULL, `drive_exist_end_dayts` bigint(10) DEFAULT NULL, `annotation_text` varchar(255) DEFAULT NULL, UNIQUE KEY `v_clnact_pk_asc` (`exchanges_pk`), KEY `v_clnact_startts_asc_idx` (`exchange_start_dayts`), KEY `v_clnact_endts_asc_idx` (`exchange_end_dayts`), KEY `v_clnact_drive_ser_asc_idx` (`drive_serial_number`), KEY `v_clnact_volser_asc_idx` (`volser`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `v_cleaning_averages` ( `avg_cleaning_uses` bigint(16) unsigned DEFAULT NULL, `avg_max_cleaning_uses` bigint(16) unsigned DEFAULT NULL, `avg_drive_lifetime_loads` bigint(16) unsigned DEFAULT NULL, `avg_drive_lifetime_cleans` bigint(16) unsigned DEFAULT NULL, `avg_drive_lifetime_meters` bigint(26) unsigned DEFAULT NULL, `avg_mb_for_last_clean` bigint(26) unsigned DEFAULT NULL ); /*!40101 SET character_set_client = @saved_cs_client */; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_combined_details` ( `entity_pk` bigint(20) unsigned, `type` varchar(5), `exist_start` datetime, `drive_serial_number` varchar(32), `volser` varchar(32), `drive_type` varchar(45), `media_type` varchar(20), `manufacturer` varchar(20), `drive_firmware_level` varchar(32), `drive_health` varchar(20), `media_health` varchar(20), `drive_suspicion` float, `media_suspicion` float, `media_is_cleaning` tinyint(4), `library_complexes_pk` bigint(20) unsigned, `lib_complex_name` varchar(32), `libraries_pk` bigint(20) unsigned, `library_model` varchar(20), `library_name` varchar(32), `library_serial_number` varchar(32), `partitions_pk` bigint(20) unsigned, `partition_type` varchar(8), `partition_name` varchar(64), `partition_number` int(11), `physical_library_number` smallint(6), `physical_rail_number` smallint(6), `physical_address` varchar(32), `hli_address` varchar(32), `scsi_element_id` int(11), `logical_groups_pks` varchar(341) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_controllers` ( `controllers_pk` bigint(20) unsigned, `exist_start` datetime, `controller_serial_number` varchar(64), `fru` varchar(72), `is_broken` tinyint(1), `controller_id` int(10) unsigned, `hardware_version` varchar(45), `app_version` varchar(32), `firmware_version` varchar(32), `controller_stats_pk` bigint(20) unsigned, `controller_stats_created` timestamp, `led_fault_enum` varchar(8), `led_safe_to_remove_enum` varchar(8), `top_level_condition_enum` varchar(20), `controller_status_enum` varchar(20), `ha_slot` varchar(12), `ha_id` varchar(12), `ha_state` varchar(12), `ha_alternate_ip` varchar(32), `transient_cells_controllers_pk` bigint(20) unsigned, `transient_cells_pk` bigint(20) unsigned, `physical_library_number` smallint(6), `physical_rail_number` smallint(6), `physical_address` varchar(32), `tc_rails_fk` bigint(20) unsigned, `rails_pk` bigint(20) unsigned, `libraries_pk` bigint(20) unsigned, `library_model` varchar(20), `library_serial_number` varchar(32), `library_name` varchar(32), `library_complexes_pk` bigint(20) unsigned, `lib_complex_name` varchar(32), `annotation` varchar(255) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_drive_health_detail` ( `drives_pk` bigint(20) unsigned, `exist_start` datetime, `drive_exist_end` datetime, `fc_node_wwn` varchar(32), `drive_serial_number` varchar(32), `tray_serial_number` varchar(32), `drive_type` varchar(45), `drive_health` varchar(20), `drive_id` int(11), `fc_port_a_wwn` varchar(32), `fc_port_b_wwn` varchar(32), `drive_model` varchar(20), `drive_vendor` varchar(20), `is_encryption_capable` tinyint(4), `drive_interface_type` varchar(8), `date_drive_properties_changed` datetime, `firmware_level` varchar(32), `drive_version` varchar(32), `code_version` varchar(32), `exchanges_pk` bigint(20) unsigned, `exchange_start` datetime, `exchg_elapsed_time` bigint(20), `exchg_mount_time` bigint(20), `mount_io_throughput` float, `encryption_status` varchar(20), `recording_technique` varchar(12), `exchg_err_status` varchar(20), `fsc` varchar(4), `does_drive_need_cleaning` tinyint(1), `inefficient` tinyint(1), `is_marginal` tinyint(1), `was_drive_loadlimit_reported` tinyint(1), `ta_diagnostics_required` tinyint(4), `lifetime_motion_hours` int(11), `ibm_drive_efficiency` int(11), `ibm_media_efficiency` int(11), `hp_device_status` int(11), `drive_suspicion_level` float, `write_efficiency_metric` float, `read_margin` float, `drive_percent_eol` float, `last_mb_for_last_clean` double, `last_mb_since_last_clean` double, `daily_mb_for_last_clean` double, `daily_mb_since_last_clean` double, `lib_drive_health` varchar(20), `compression_ratio` float, `lifetime_cleans` int(10) unsigned, `lifetime_loads` int(10) unsigned, `lifetime_meters` double unsigned, `lifetime_power_hours` int(10) unsigned, `time_spent_reading` int(11), `time_spent_writing` int(11), `time_spent_rw` int(11), `read_throughput` float, `write_throughput` float, `io_throughput` float, `read_ratio` float, `write_ratio` float, `io_ratio` float, `media_pk` bigint(20) unsigned, `media_exist_start` datetime, `media_exist_end` datetime, `volser` varchar(32), `media_serial_number` varchar(32), `media_health` varchar(20), `is_volsafe_cartridge` tinyint(4), `is_cleaning_media` tinyint(1), `drive_utilization_30days` float, `drive_dismounts_30days` int(11), `drive_errors_30days` int(11), `drive_cleans_30days` int(11), `drive_mb_read_30days` double, `drive_mb_written_30days` double, `drive_mb_rw_30days` double, `drive_mb_sent_30days` double, `drive_mb_received_30days` double, `mount_read_throughput_30days` float, `mount_write_throughput_30days` float, `mount_io_throughput_30days` float, `avg_read_mb_per_mount_30days` float, `avg_write_mb_per_mount_30days` float, `avg_rw_mb_per_mount_30days` float, `drive_snmp_trap_count_30days` bigint(20) unsigned, `library_complexes_pk` bigint(20) unsigned, `lib_complex_name` varchar(32), `libraries_pk` bigint(20) unsigned, `library_model` varchar(20), `library_name` varchar(32), `library_serial_number` varchar(32), `partition_type_enum` varchar(8), `partition_name` varchar(64), `partition_number` int(11), `physical_library_number` int(6), `physical_rail_number` smallint(6), `physical_address` varchar(32), `hli_address` varchar(32), `scsi_element_id` int(11), `annotation` varchar(255), `logical_group_names` text, `exist_start_dayts` bigint(10), `drive_exist_end_dayts` bigint(10), `date_drive_properties_changed_dayts` bigint(10), `exchange_start_dayts` bigint(10) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_drive_hourly_averages` ( `summary_date` date, `summary_hour` int(2), `count` bigint(21), `avg_exchg_elapsed_time` decimal(23,4), `avg_exchg_mount_time` decimal(23,4), `avg_mount_read_throughput` double(21,4), `avg_mount_write_throughput` double(21,4), `avg_mount_io_throughput` double(21,4), `avg_suspicion_level` double(21,4), `avg_write_ratio` double(21,4), `avg_read_ratio` double(21,4), `avg_io_ratio` double(21,4), `avg_time_spent_rw` decimal(14,4), `avg_compression_ratio` double(21,4), `avg_read_throughput` double(21,4), `avg_write_throughput` double(21,4), `avg_io_throughput` double(21,4), `avg_mb_since_last_clean` double(21,4), `avg_mb_for_last_clean` double(21,4) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_drive_locations` ( `drives_pk` bigint(20) unsigned, `serial_number` varchar(32), `drive_type` varchar(45), `library_complexes_pk` bigint(20) unsigned, `libraries_pk` bigint(20) unsigned, `physical_address` varchar(32) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `v_drive_summary_averages` ( `summary_date` date DEFAULT NULL, `avg_megabytes_read` double(21,4) DEFAULT NULL, `avg_megabytes_written` double(21,4) DEFAULT NULL, `avg_megabytes_rw` double(21,4) DEFAULT NULL, `avg_mb_sent` double(21,4) DEFAULT NULL, `avg_mb_received` double(21,4) DEFAULT NULL, `avg_drive_selections` decimal(14,4) DEFAULT NULL, `avg_drive_read_margin` double(21,4) DEFAULT NULL, `avg_drive_write_efficiency` double(21,4) DEFAULT NULL, `avg_drive_utilization_level` double(21,4) DEFAULT NULL, `avg_drive_suspicion_level` double(21,4) DEFAULT NULL, `avg_elapsed_time` decimal(23,4) DEFAULT NULL, `avg_mount_time` decimal(24,4) DEFAULT NULL, `avg_read_throughput` double(21,4) DEFAULT NULL, `avg_write_throughput` double(21,4) DEFAULT NULL, `avg_overall_throughput` double(21,4) DEFAULT NULL, `avg_mb_for_last_clean` double(21,4) DEFAULT NULL, `avg_mb_since_last_clean` double(21,4) DEFAULT NULL, `avg_drive_dismounts` decimal(14,4) DEFAULT NULL, `avg_drive_snmp_trap_count` decimal(14,4) DEFAULT NULL, `avg_drive_errors` decimal(14,4) DEFAULT NULL, `avg_drive_cleans` decimal(14,4) DEFAULT NULL, `avg_read_ratio` double(21,4) DEFAULT NULL, `avg_write_ratio` double(21,4) DEFAULT NULL, `avg_overall_ratio` double(21,4) DEFAULT NULL, `avg_read_mb_per_mount` double(21,4) DEFAULT NULL, `avg_write_mb_per_mount` double(21,4) DEFAULT NULL, `avg_rw_mb_per_mount` double(21,4) DEFAULT NULL, `avg_compression_ratio` double(21,4) DEFAULT NULL, `avg_io_throughput` double(21,4) DEFAULT NULL, KEY `v_drive_summ_avgs_idx` (`summary_date`) ); /*!40101 SET character_set_client = @saved_cs_client */; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_drive_throughputs` ( `drives_pk` bigint(20) unsigned, `summary_date` date, `mb_read` double, `mb_written` double, `mb_sent` double unsigned, `mb_received` double unsigned, `compression_ratio` float, `write_efficiency_metric` float, `read_margin` float, `mount_read_throughput` float unsigned, `mount_write_throughput` float unsigned, `mount_io_throughput` float unsigned, `read_mb_per_mount` float unsigned, `write_mb_per_mount` float unsigned, `rw_mb_per_mount` float unsigned, `library_name` varchar(32), `library_serial_number` varchar(32), `library_model` varchar(20), `lib_complex_name` varchar(32), `logical_group_names` text ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_drive_utilization` ( `summary_date` date, `drive_utilization` double(19,2) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_drives_requiring_most_cleans` ( `drives_pk` bigint(20) unsigned, `drive_serial_number` varchar(32), `drive_model` varchar(20), `mb_for_last_clean` double, `library_serial_number` varchar(32), `library_model` varchar(20), `library_name` varchar(32), `lib_complex_name` varchar(32), `logical_group_names` text ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `v_elevator_summary_averages` ( `summary_date` date DEFAULT NULL, `avg_num_snmp_traps` int(10) DEFAULT NULL, KEY `v_elevator_summ_avgs_idx` (`summary_date`) ); /*!40101 SET character_set_client = @saved_cs_client */; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_elevators` ( `elevators_pk` bigint(20) unsigned, `serial_number` varchar(64), `exist_start` datetime, `exist_end` datetime, `state` varchar(32), `led_state_enum` varchar(8), `op_status_enum` varchar(20), `num_snmp_traps_30days` int(10) unsigned, `lib_elevator_health_enum_30days` varchar(20), `library_complexes_pk` bigint(20) unsigned, `lib_complex_name` varchar(32), `libraries_pk` bigint(20) unsigned, `library_model` varchar(20), `physical_address` varchar(32), `library_name` varchar(32), `library_serial_number` varchar(32), `annotation` varchar(255), `elevator_exist_start_dayts` bigint(10), `elevator_exist_end_dayts` bigint(10) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_enterprise_io` ( `date` date, `mbread` double(21,4), `mbwritten` double(21,4), `mbreadandwritten` double(21,4) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `v_exchange_averages` ( `avg_write_efficiency_metric` double(21,4) DEFAULT NULL, `avg_read_margin` double(21,4) DEFAULT NULL, `mount_read_throughput` double(21,4) DEFAULT NULL, `mount_write_throughput` double(21,4) DEFAULT NULL, `mount_io_throughput` double(21,4) DEFAULT NULL, `avg_read_throughput` double(21,4) DEFAULT NULL, `avg_write_throughput` double(21,4) DEFAULT NULL, `avg_io_throughput` double(21,4) DEFAULT NULL, `avg_mb_read` double(21,4) DEFAULT NULL, `avg_mb_written` double(21,4) DEFAULT NULL, `avg_mb_rw` double(21,4) DEFAULT NULL, `avg_mb_sent` double(21,4) DEFAULT NULL, `avg_mb_received` double(21,4) DEFAULT NULL, `avg_elapsed_time` decimal(23,4) DEFAULT NULL, `avg_mount_time` decimal(23,4) DEFAULT NULL, `avg_read_ratio` double(21,4) DEFAULT NULL, `avg_write_ratio` double(21,4) DEFAULT NULL, `avg_io_ratio` double(21,4) DEFAULT NULL, `avg_compression_ratio` double(21,4) DEFAULT NULL, `avg_drive_suspicion_level` double(21,4) DEFAULT NULL, `avg_media_suspicion_level` double(21,4) DEFAULT NULL ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `v_exchanges` ( `exchanges_pk` bigint(20) unsigned DEFAULT NULL, `fc_node_wwn` varchar(32) DEFAULT NULL, `drives_pk` bigint(20) unsigned DEFAULT NULL, `drive_serial_number` varchar(32) DEFAULT NULL, `drive_type` varchar(45) DEFAULT NULL, `drive_model` varchar(20) DEFAULT NULL, `drive_vendor` varchar(20) DEFAULT NULL, `drive_exist_start` datetime DEFAULT NULL, `drive_exist_end` datetime DEFAULT NULL, `drive_firmware_level` varchar(32) DEFAULT NULL, `drive_id` int(11) DEFAULT NULL, `fc_port_a_wwn` varchar(32) DEFAULT NULL, `fc_port_b_wwn` varchar(32) DEFAULT NULL, `mb_for_last_clean` double DEFAULT NULL, `drive_health` varchar(20) DEFAULT NULL, `exchg_elapsed_time` bigint(20) DEFAULT NULL, `exchg_mount_time` bigint(20) DEFAULT NULL, `drive_exchg_err_status` varchar(20) DEFAULT NULL, `mount_read_throughput` float DEFAULT NULL, `mount_write_throughput` float DEFAULT NULL, `mount_io_throughput` float DEFAULT NULL, `read_ratio` float DEFAULT NULL, `write_ratio` float DEFAULT NULL, `io_ratio` float DEFAULT NULL, `compression_ratio` float DEFAULT NULL, `read_throughput` float DEFAULT NULL, `write_throughput` float DEFAULT NULL, `io_throughput` float DEFAULT NULL, `time_spent_rw` int(11) DEFAULT NULL, `drive_suspicion_level` float DEFAULT NULL, `media_pk` bigint(20) unsigned DEFAULT NULL, `volser` varchar(32) DEFAULT NULL, `media_type` varchar(20) DEFAULT NULL, `media_serial_number` varchar(32) DEFAULT NULL, `manufacturer` varchar(20) DEFAULT NULL, `media_exist_start` datetime DEFAULT NULL, `media_exist_end` datetime DEFAULT NULL, `media_health` varchar(20) DEFAULT NULL, `is_cleaning` tinyint(4) DEFAULT NULL, `current_cleaning_uses` int(11) DEFAULT NULL, `max_cleaning_uses` int(11) DEFAULT NULL, `media_exchg_err_status` varchar(20) DEFAULT NULL, `media_suspicion_level` float DEFAULT NULL, `exchange_start` datetime DEFAULT NULL, `exchange_end` datetime DEFAULT NULL, `does_drive_need_cleaning` tinyint(1) DEFAULT NULL, `lifetime_cleans` int(10) unsigned DEFAULT NULL, `lifetime_loads` int(10) unsigned DEFAULT NULL, `lifetime_meters` double unsigned DEFAULT NULL, `lifetime_power_hours` int(10) unsigned DEFAULT NULL, `mb_read` double unsigned DEFAULT NULL, `mb_written` double unsigned DEFAULT NULL, `mb_rw` double DEFAULT NULL, `mb_sent` double DEFAULT NULL, `mb_received` double DEFAULT NULL, `mb_media_capacity` double unsigned DEFAULT NULL, `recording_technique` varchar(12) DEFAULT NULL, `ta_expired_cleaning_tape` tinyint(4) DEFAULT NULL, `ta_cm_failure` tinyint(3) unsigned DEFAULT NULL, `ta_read_warning` tinyint(3) unsigned DEFAULT NULL, `ta_hard_err` tinyint(3) unsigned DEFAULT NULL, `ta_media_err` tinyint(3) unsigned DEFAULT NULL, `ta_media_life` tinyint(3) unsigned DEFAULT NULL, `ta_clean_periodic` tinyint(3) unsigned DEFAULT NULL, `ta_clean_now` tinyint(3) unsigned DEFAULT NULL, `ta_drive_temp` tinyint(3) unsigned DEFAULT NULL, `ta_predictive_failure` tinyint(3) unsigned DEFAULT NULL, `ta_lost_statistics` tinyint(3) unsigned DEFAULT NULL, `ta_directory_invalid_unload` tinyint(3) unsigned DEFAULT NULL, `ta_sys_area_write_failure` tinyint(3) unsigned DEFAULT NULL, `ta_sys_area_read_failure` tinyint(3) unsigned DEFAULT NULL, `ta_loading_failure` tinyint(3) unsigned DEFAULT NULL, `ta_fw_failure` tinyint(3) unsigned DEFAULT NULL, `msn_changed` tinyint(4) DEFAULT NULL, `fsc` varchar(4) DEFAULT NULL, `media_mb_available_post` double unsigned DEFAULT NULL, `was_drive_loadlimit_reported` tinyint(1) DEFAULT NULL, `was_media_loadlimit_reported` tinyint(1) DEFAULT NULL, `write_efficiency_metric` float DEFAULT NULL, `read_margin` float DEFAULT NULL, `block_error_rate_writes` smallint(5) unsigned DEFAULT NULL, `block_error_rate_reads` smallint(5) unsigned DEFAULT NULL, `degraded_write_channels` tinyint(3) unsigned DEFAULT NULL, `degraded_read_channels` tinyint(3) unsigned DEFAULT NULL, `degraded_servo_channels` tinyint(3) unsigned DEFAULT NULL, `servo_tracking_exceptions` smallint(5) unsigned DEFAULT NULL, `read_perm_errors` smallint(5) unsigned DEFAULT NULL, `write_perm_errors` smallint(5) unsigned DEFAULT NULL, `servo_perm_errors` smallint(5) unsigned DEFAULT NULL, `unload_perm_errors` smallint(5) unsigned DEFAULT NULL, `usage_perm_errors` smallint(5) unsigned DEFAULT NULL, `drive_time_spent_reading` int(11) DEFAULT NULL, `drive_time_spent_writing` int(11) DEFAULT NULL, `drive_time_spent_loading` int(11) DEFAULT NULL, `ta_drive_maintenance` tinyint(4) DEFAULT NULL, `tape_repo_cycles` int(11) DEFAULT NULL, `tape_nonerp_repo_cycles` int(11) DEFAULT NULL, `meters_at_high_speed` bigint(20) DEFAULT NULL, `meters_at_head_contact` bigint(20) DEFAULT NULL, `ta_media_at_warranty_end` tinyint(4) DEFAULT NULL, `ta_dump_avail` tinyint(4) DEFAULT NULL, `ta_down_level_drive` tinyint(4) DEFAULT NULL, `ta_event_log_near_full` tinyint(4) DEFAULT NULL, `ta_write_warn` tinyint(4) DEFAULT NULL, `ta_unrec_load_failure` tinyint(4) DEFAULT NULL, `ta_tape_snapped` tinyint(4) DEFAULT NULL, `ta_mir_invalid_load` tinyint(4) DEFAULT NULL, `ta_rfid_open_at_load` tinyint(4) DEFAULT NULL, `ta_perm_err` tinyint(4) DEFAULT NULL, `ta_start_data_not_found` tinyint(4) DEFAULT NULL, `ta_diagnostics_required` tinyint(4) DEFAULT NULL, `ta_nearing_media_life` tinyint(4) DEFAULT NULL, `ibm_drive_efficiency` int(11) DEFAULT NULL, `hp_device_status` int(11) DEFAULT NULL, `hp_media_status` tinyint(4) DEFAULT NULL, `media_length` int(11) DEFAULT NULL, `media_mfg_date` datetime DEFAULT NULL, `media_mam_capacity` double DEFAULT NULL, `media_mb_available_pre` double unsigned DEFAULT NULL, `ta_cleaning_media` tinyint(4) DEFAULT NULL, `formatted_density_code` int(11) DEFAULT NULL, `lifetime_hours_incompat` bigint(20) unsigned DEFAULT NULL, `ta_drive_voltage` tinyint(4) DEFAULT NULL, `ta_recover_mech_cart_failure` tinyint(4) DEFAULT NULL, `ta_unload_prevented` tinyint(4) DEFAULT NULL, `ta_unrecover_unload_failure` tinyint(4) DEFAULT NULL, `ta_eject_media` tinyint(4) DEFAULT NULL, `ta_firmware_download_fault` tinyint(4) DEFAULT NULL, `ta_forced_eject` tinyint(4) DEFAULT NULL, `ta_hardware_a` tinyint(4) DEFAULT NULL, `ta_hardware_b` tinyint(4) DEFAULT NULL, `ta_interface_fault` tinyint(4) DEFAULT NULL, `ta_directory_corrupt` tinyint(4) DEFAULT NULL, `ta_invalid_cleaning` tinyint(4) DEFAULT NULL, `ta_not_data_grade` tinyint(4) DEFAULT NULL, `ta_read_failure` tinyint(4) DEFAULT NULL, `ta_read_only` tinyint(4) DEFAULT NULL, `lifetime_motion_hours` int(11) DEFAULT NULL, `ibm_media_efficiency` int(11) DEFAULT NULL, `ta_write_failure` tinyint(4) DEFAULT NULL, `ta_write_protect` tinyint(4) DEFAULT NULL, `ta_unsupported_format` tinyint(4) DEFAULT NULL, `ta_worm_integrity_failure` tinyint(4) DEFAULT NULL, `ta_worm_overwrite_attempted` tinyint(4) DEFAULT NULL, `library_complexes_pk` bigint(20) unsigned DEFAULT NULL, `lib_complex_name` varchar(32) DEFAULT NULL, `drive_library_pk` bigint(20) unsigned DEFAULT NULL, `source_media_library_pk` bigint(20) unsigned DEFAULT NULL, `dest_media_library_pk` bigint(20) unsigned DEFAULT NULL, `library_model` varchar(20) DEFAULT NULL, `drive_library_serial_number` varchar(20) DEFAULT NULL, `drive_library_name` varchar(32) DEFAULT NULL, `drive_library_wwn` varchar(32) DEFAULT NULL, `partition_type_enum` varchar(8) DEFAULT NULL, `partition_name` varchar(32) DEFAULT NULL, `partition_number` int(11) DEFAULT NULL, `drive_physical_library_number` smallint(6) DEFAULT NULL, `drive_rail_number` smallint(6) DEFAULT NULL, `drive_physical_address` varchar(32) DEFAULT NULL, `drive_hli_address` varchar(32) DEFAULT NULL, `drive_scsi_element_id` int(11) DEFAULT NULL, `media_source_phys_lib_number` smallint(6) DEFAULT NULL, `media_source_rail_number` smallint(6) DEFAULT NULL, `media_source_physical_address` varchar(32) DEFAULT NULL, `media_source_hli_address` varchar(32) DEFAULT NULL, `media_source_scsi_element_id` int(11) DEFAULT NULL, `media_dest_phys_lib_number` smallint(6) DEFAULT NULL, `media_dest_rail_number` smallint(6) DEFAULT NULL, `media_dest_physical_address` varchar(32) DEFAULT NULL, `media_dest_hli_address` varchar(32) DEFAULT NULL, `media_dest_scsi_element_id` int(11) DEFAULT NULL, `exchange_start_dayts` bigint(10) DEFAULT NULL, `exchange_end_dayts` bigint(10) DEFAULT NULL, `media_exist_start_dayts` bigint(10) DEFAULT NULL, `media_exist_end_dayts` bigint(10) DEFAULT NULL, `drive_exist_start_dayts` bigint(10) DEFAULT NULL, `drive_exist_end_dayts` bigint(10) DEFAULT NULL, `media_mfg_date_dayts` bigint(10) DEFAULT NULL, `annotation_text` varchar(255) DEFAULT NULL, `time_to_mount` int(10) unsigned DEFAULT '0', UNIQUE KEY `v_exchg_pk_asc` (`exchanges_pk`), KEY `v_exchg_startts_asc_idx` (`exchange_start_dayts`), KEY `v_exchg_endts_asc_idx` (`exchange_end_dayts`), KEY `v_exchg_drive_ser_asc_idx` (`drive_serial_number`), KEY `v_exchg_volser_asc_idx` (`volser`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `v_hourly_cap_summary_averages` ( `summary_date` datetime DEFAULT NULL, `avg_num_snmp_traps` int(10) DEFAULT NULL, `avg_num_media_enters` int(10) DEFAULT NULL, `avg_num_media_ejects` int(10) DEFAULT NULL, KEY `v_hourly_cap_summ_avgs_idx` (`summary_date`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `v_hourly_elevator_summary_averages` ( `summary_date` datetime DEFAULT NULL, `avg_num_snmp_traps` int(10) DEFAULT NULL, KEY `v_hourly_elevator_summ_avgs_idx` (`summary_date`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `v_hourly_ptp_summary_averages` ( `summary_date` datetime DEFAULT NULL, `avg_num_snmp_traps` int(10) DEFAULT NULL, KEY `v_hourly_ptp_summ_avgs_idx` (`summary_date`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `v_hourly_robot_summary_averages` ( `summary_date` datetime DEFAULT NULL, `avg_num_robot_get_fails` int(10) DEFAULT NULL, `avg_num_robot_put_fails` int(10) DEFAULT NULL, `avg_num_robot_get_retries` int(10) DEFAULT NULL, `avg_num_robot_put_retries` int(10) DEFAULT NULL, `avg_num_robot_get_totals` int(10) DEFAULT NULL, `avg_num_robot_put_totals` int(10) DEFAULT NULL, `avg_num_snmp_traps` int(10) DEFAULT NULL, KEY `v_hourly_robot_summ_avgs_idx` (`summary_date`) ); /*!40101 SET character_set_client = @saved_cs_client */; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_last_scan` ( `snmp_lib_connects_fk` bigint(20) unsigned, `mib_walk_fk` bigint(20) unsigned, `mib_walk_start` datetime ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_last_successful_scan` ( `snmp_lib_connects_fk` bigint(20) unsigned, `mib_walk_fk` bigint(20) unsigned, `sucessful_mib_walk_end` datetime ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_lib_comm_status_detail` ( `snmp_lib_comm_status_pk` bigint(20) unsigned, `snmp_lib_connects_fk` bigint(20) unsigned, `time_received` datetime, `snmp_comm_condition` int(3) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_lib_comm_status_summary` ( `snmp_lib_comm_status_pk` bigint(20) unsigned, `snmp_lib_connects_fk` bigint(20) unsigned, `recv_date` date, `recv_hour` int(2), `recv_minute` int(2), `snmp_comm_condition` decimal(7,4), `count` bigint(21) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `v_lib_complex_summary_averages` ( `summary_date` date DEFAULT NULL, `avg_num_partitions` decimal(36,4) DEFAULT NULL, `avg_num_drive_bays_allocated` decimal(36,4) DEFAULT NULL, `avg_num_drive_bays_unallocated` decimal(36,4) DEFAULT NULL, `avg_num_media_cells_allocated` decimal(36,4) DEFAULT NULL, `avg_num_media_cells_unallocated` decimal(36,4) DEFAULT NULL, `avg_mb_read` double(21,4) DEFAULT NULL, `avg_mb_written` double(21,4) DEFAULT NULL, `avg_mb_rw` double(21,4) DEFAULT NULL, `avg_mb_sent` double(21,4) DEFAULT NULL, `avg_mb_received` double(21,4) DEFAULT NULL, `avg_num_enters` decimal(36,4) DEFAULT NULL, `avg_num_ejects` decimal(36,4) DEFAULT NULL, `avg_num_ptp_enters` decimal(36,4) DEFAULT NULL, `avg_num_ptp_ejects` decimal(36,4) DEFAULT NULL, `avg_num_cleans` decimal(36,4) DEFAULT NULL, `avg_num_mounts` decimal(46,4) DEFAULT NULL, `avg_num_dismounts` decimal(46,4) DEFAULT NULL, `avg_num_library_snmp_traps` decimal(46,4) DEFAULT NULL, `avg_drive_utilization` double(21,4) DEFAULT NULL, `sum_megabytes_read` bigint(23) unsigned DEFAULT NULL, `sum_megabytes_written` bigint(23) unsigned DEFAULT NULL, `sum_megabytes_rw` bigint(23) unsigned DEFAULT NULL, `sum_megabytes_sent` bigint(23) unsigned DEFAULT NULL, `sum_megabytes_received` bigint(23) unsigned DEFAULT NULL, `sum_num_enters` bigint(55) unsigned DEFAULT NULL, `sum_num_ejects` bigint(55) unsigned DEFAULT NULL, `sum_num_ptp_enters` bigint(55) unsigned DEFAULT NULL, `sum_num_ptp_ejects` bigint(55) unsigned DEFAULT NULL, `sum_num_cleans` bigint(55) unsigned DEFAULT NULL, `sum_num_mounts` bigint(65) unsigned DEFAULT NULL, `sum_num_dismounts` bigint(65) unsigned DEFAULT NULL, `sum_num_traps` bigint(65) unsigned DEFAULT NULL, KEY `v_lib_cplx_summ_avgs_idx` (`summary_date`) ); /*!40101 SET character_set_client = @saved_cs_client */; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_lib_last_mib_walk` ( `snmp_lib_connects_fk` bigint(20) unsigned, `mib_walk_start` datetime ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_lib_success_mib_walk` ( `snmp_lib_connects_fk` bigint(20) unsigned, `mib_walk_end` datetime ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_libraries` ( `library_complexes_pk` bigint(20) unsigned, `libraries_pk` bigint(20) unsigned, `exist_start` datetime, `library_name` varchar(32), `library_model` varchar(20), `library_number` tinyint(4), `complex_name` varchar(32), `complex_id` int(11), `library_serial_number` varchar(32), `library_wwn` varchar(32), `top_level_condition` varchar(20), `last_boot_date` datetime, `library_fw_date` datetime, `library_fw_version` varchar(64), `library_hw_version` varchar(16), `library_os_version` varchar(16), `lib_ip_primary` varchar(255), `lib_ip_secondary` varchar(255), `num_partitions` int(10) unsigned, `num_drive_bays_allocated` int(10) unsigned, `num_drive_bays_unallocated` int(10) unsigned, `num_media_cells_allocated` int(10) unsigned, `num_media_cells_unallocated` int(10) unsigned, `last_mib_walk` datetime, `num_caps` smallint(5) unsigned, `num_elevators` smallint(5) unsigned, `num_ptps` smallint(5) unsigned, `num_robots` smallint(5) unsigned, `num_library_snmp_traps_30days` bigint(20) unsigned, `num_dismounts_30days` bigint(20) unsigned, `num_enters_30days` int(10) unsigned, `num_ejects_30days` int(10) unsigned, `num_cleans_30days` int(10) unsigned, `mb_read_30days` double, `mb_written_30days` double, `mb_rw_30days` double, `mb_sent_30days` double, `mb_received_30days` double, `drive_utilization_30days` float, `num_ptp_enters_30days` int(10) unsigned, `num_ptp_ejects_30days` int(10) unsigned, `annotation` varchar(255), `exist_start_dayts` bigint(10), `last_boot_date_dayts` bigint(10), `library_fw_date_dayts` bigint(10), `last_mib_walk_dayts` bigint(10) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_library_activity` ( `date` date, `Dismounts` decimal(42,0), `Enters` decimal(32,0), `Ejects` decimal(32,0) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_library_complex_activity` ( `vlca_library_complexes_fk` bigint(20) unsigned, `lib_complex_name` varchar(32), `num_library_snmp_traps_30days` decimal(42,0), `num_dismounts_30days` decimal(42,0), `num_enters_30days` decimal(32,0), `num_ejects_30days` decimal(32,0), `num_cleans_30days` decimal(32,0), `mb_read_30days` double, `mb_written_30days` double, `mb_rw_30days` double, `mb_sent_30days` double, `mb_received_30days` double, `num_ptp_enters_30days` decimal(32,0), `num_ptp_ejects_30days` decimal(32,0), `drive_utilization_30days` double ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_library_complex_io` ( `library_complexes_pk` bigint(20) unsigned, `lib_complex_name` varchar(32), `date` date, `mbread` double, `mbwritten` double, `mbreadandwritten` double ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_library_complex_summaries` ( `summary_date` date, `library_complexes_pk` bigint(20) unsigned, `num_partitions` decimal(32,0), `num_drive_bays_allocated` decimal(32,0), `num_drive_bays_unallocated` decimal(32,0), `num_media_cells_allocated` decimal(32,0), `num_media_cells_unallocated` decimal(32,0), `mb_read` double, `mb_written` double, `mb_rw` double, `mb_sent` double, `mb_received` double, `num_enters` decimal(32,0), `num_ejects` decimal(32,0), `num_cleans` decimal(32,0), `num_dismounts` decimal(42,0), `num_library_snmp_traps` decimal(42,0), `num_ptp_enters` decimal(32,0), `num_ptp_ejects` decimal(32,0), `num_caps` decimal(27,0), `num_elevators` decimal(27,0), `num_ptps` decimal(27,0), `num_robots` decimal(27,0), `drive_utilization` double ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_library_complexes` ( `library_complexes_pk` bigint(20) unsigned, `exist_start` datetime, `lib_complex_name` varchar(32), `lib_complex_id` int(11), `lib_complex_model` varchar(20), `num_libraries` bigint(21), `num_partitions` decimal(32,0), `num_drive_bays_allocated` decimal(32,0), `num_drive_bays_unallocated` decimal(32,0), `num_media_cells_allocated` decimal(32,0), `num_media_cells_unallocated` decimal(32,0), `num_robots` decimal(27,0), `num_caps` decimal(27,0), `num_ptps` decimal(27,0), `num_elevators` decimal(27,0), `num_library_snmp_traps_30days` decimal(42,0), `num_dismounts_30days` decimal(42,0), `num_enters_30days` decimal(32,0), `num_ejects_30days` decimal(32,0), `num_cleans_30days` decimal(32,0), `mb_read_30days` double, `mb_written_30days` double, `mb_rw_30days` double, `mb_sent_30days` double, `mb_received_30days` double, `drive_utilization_30days` double, `num_ptp_enters_30days` decimal(32,0), `num_ptp_ejects_30days` decimal(32,0), `annotation` varchar(255), `exist_start_dayts` bigint(10) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_library_hourly_averages` ( `summary_date` date, `summary_hour` int(2), `ex_libraries_fk` bigint(20) unsigned, `count` bigint(21), `avg_mb_read` double(21,4), `avg_mb_written` double(21,4), `avg_mb_rw` double(21,4), `avg_mb_sent` double(21,4), `avg_mb_received` double(21,4), `avg_exchg_elapsed_time` double(21,4), `avg_exchg_mount_time` double(21,4) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_library_scan` ( `snmp_lib_connects_pk` bigint(20) unsigned, `agent_ip` varchar(255), `library_name` varchar(32), `complex_name` varchar(32), `lib_ip_primary` varchar(255), `lib_ip_secondary` varchar(255), `lib_agent_engine_id` varchar(72), `requested_mib_walk_time` time, `library_serial_number` varchar(32), `timezone_enum` varchar(64), `snmp_comm_condition_enum` varchar(32), `last_successful_scan` datetime, `last_scan` datetime, `last_scan_status` varchar(20), `last_scan_failure_detail` varchar(1024) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `v_library_summary_averages` ( `summary_date` date DEFAULT NULL, `avg_megabytes_read` double(21,4) DEFAULT NULL, `avg_megabytes_written` double(21,4) DEFAULT NULL, `avg_megabytes_rw` double(21,4) DEFAULT NULL, `avg_megabytes_sent` double(21,4) DEFAULT NULL, `avg_megabytes_received` double(21,4) DEFAULT NULL, `avg_num_partitions` decimal(14,4) DEFAULT NULL, `avg_num_enters` decimal(14,4) DEFAULT NULL, `avg_num_ejects` decimal(14,4) DEFAULT NULL, `avg_num_ptp_enters` decimal(14,4) DEFAULT NULL, `avg_num_ptp_ejects` decimal(14,4) DEFAULT NULL, `avg_num_cleans` decimal(14,4) DEFAULT NULL, `avg_num_mounts` decimal(24,4) DEFAULT NULL, `avg_num_dismounts` decimal(24,4) DEFAULT NULL, `avg_num_traps` decimal(24,4) DEFAULT NULL, `avg_num_drive_bays` decimal(14,4) DEFAULT NULL, `avg_drive_bays_allocated` decimal(14,4) DEFAULT NULL, `avg_drive_bays_unallocated` decimal(14,4) DEFAULT NULL, `avg_num_media_cells` decimal(14,4) DEFAULT NULL, `avg_media_cells_allocated` decimal(14,4) DEFAULT NULL, `avg_media_cells_unallocated` decimal(14,4) DEFAULT NULL, `avg_drive_utilization` double(21,4) DEFAULT NULL, `sum_megabytes_read` bigint(23) unsigned DEFAULT NULL, `sum_megabytes_written` bigint(23) unsigned DEFAULT NULL, `sum_megabytes_rw` bigint(23) unsigned DEFAULT NULL, `sum_megabytes_sent` bigint(23) unsigned DEFAULT NULL, `sum_megabytes_received` bigint(23) unsigned DEFAULT NULL, `sum_num_enters` bigint(33) unsigned DEFAULT NULL, `sum_num_ejects` bigint(33) unsigned DEFAULT NULL, `sum_num_ptp_enters` bigint(55) unsigned DEFAULT NULL, `sum_num_ptp_ejects` bigint(55) unsigned DEFAULT NULL, `sum_num_cleans` bigint(33) unsigned DEFAULT NULL, `sum_num_mounts` bigint(43) unsigned DEFAULT NULL, `sum_num_dismounts` bigint(43) unsigned DEFAULT NULL, `sum_num_traps` bigint(43) unsigned DEFAULT NULL, KEY `v_library_summ_avgs_idx` (`summary_date`) ); /*!40101 SET character_set_client = @saved_cs_client */; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_library_type_by_health` ( `library_model` varchar(20), `normal` decimal(23,0), `degraded` decimal(23,0), `notoperative` decimal(23,0), `unknown` decimal(23,0) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_logical_groups_counts` ( `logical_groups_pk` bigint(20) unsigned, `logical_group_name` varchar(250), `logical_group_type` enum('Manual','Dynamic'), `owner` varchar(64), `media_count` bigint(21), `drive_count` bigint(21) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_logical_groups_details` ( `logical_groups_entities_pk` bigint(20) unsigned, `logical_groups_pk` bigint(20) unsigned, `logical_group_name` varchar(250), `logical_group_type` varchar(7), `assigned_entity_pk` bigint(20) unsigned, `date_joined` timestamp, `assigned_entity_type` tinyint(4) unsigned, `assigned_entity_label` varchar(32), `assigned_entity_desc` varchar(20) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_logical_groups_drives_membership` ( `drives_pk` bigint(20) unsigned, `logical_group_pks` text, `logical_group_names` text ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_logical_groups_labels` ( `logical_groups_pk` bigint(20) unsigned, `logical_group_name` varchar(250), `logical_group_type` enum('Manual','Dynamic'), `owner` varchar(64), `volsers` varchar(341), `drives` varchar(341) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_logical_groups_media_membership` ( `media_pk` bigint(20) unsigned, `logical_group_pks` text, `logical_group_names` text ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_logical_groups_pks` ( `logical_groups_pk` bigint(20) unsigned, `logical_group_name` varchar(250), `logical_group_type` enum('Manual','Dynamic'), `owner` varchar(64), `media_pks` varchar(341), `drive_pks` varchar(341) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_mdv_drives` ( `drives_pk` bigint(20) unsigned, `serial_number` varchar(32), `address` varchar(32), `model` varchar(20), `libraries_pk` bigint(20) unsigned, `library_complexes_pk` bigint(20) unsigned ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_mdv_libraries` ( `library_complexes_pk` bigint(20) unsigned, `name` varchar(32) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_mdv_policies` ( `mdv_policies_pk` bigint(20) unsigned, `policy_name` varchar(80), `policy_description` varchar(250), `logical_group_name` varchar(250), `lib_complex_name` varchar(32), `created` timestamp, `last_modified` datetime, `exist_end` datetime, `policy_enabled` int(1), `rule_parameter` int(10) unsigned, `evaluation_order` int(10) unsigned, `element_type` tinyint(3) unsigned, `rule_type` tinyint(3) unsigned, `library_complexes_fk` bigint(20) unsigned, `logical_groups_fk` bigint(20) unsigned, `validation_type_enum` varchar(20), `mdv_test_type` varchar(32), `validation_type` varchar(29), `element_subtype` varchar(2) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_mdv_queue` ( `mdv_queue_pk` bigint(20) unsigned, `library_complexes_pk` bigint(20) unsigned, `libraries_pk` bigint(20) unsigned, `exchanges_pk` bigint(20) unsigned, `mq_mdv_policies_fk` bigint(20) unsigned, `media_pk` bigint(20) unsigned, `drives_pk` bigint(20) unsigned, `priority_order` bigint(20), `hlu_id_started` bigint(20), `hlu_id_completed` bigint(20), `elapsed_time` float, `created` timestamp, `partition_start` smallint(5) unsigned, `perm_status` tinyint(3) unsigned, `partition_started` smallint(5) unsigned, `partition_completed` tinyint(3) unsigned, `read_percentage` double, `rqi` float unsigned, `mdv_test_type` varchar(32), `validation_type` varchar(29), `request_state_enum` decimal(3,0), `request_state` varchar(11), `request_time` datetime, `reason_text` varchar(128), `last_state_update_time` datetime, `initiator` varchar(8), `stop_request` decimal(3,0), `drive_qual` tinyint(1) unsigned, `serial_number` varchar(32), `exchange_start` datetime, `health_enum` varchar(20), `volser` varchar(32), `media_type` varchar(20), `library_complex_name` varchar(32), `annotation` varchar(255), `policy_name` varchar(80), `rule_type` tinyint(3) unsigned ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_media_exceptions` ( `media_pk` bigint(20) unsigned, `volser` varchar(32), `media_type` varchar(20), `media_exist_end` datetime, `last_summary_date` datetime, `media_summaries_pk` bigint(20) unsigned, `annotation` varchar(255), `library_name` varchar(32), `library_serial_number` varchar(32), `library_model` varchar(20), `lib_complex_name` varchar(32) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_media_health_detail` ( `media_pk` bigint(20) unsigned, `exist_start` datetime, `media_exist_end` datetime, `volser` varchar(32), `media_serial_number` varchar(32), `manufacturer` varchar(20), `media_long_type` varchar(45), `media_type` varchar(20), `media_health` varchar(20), `exchange_start` datetime, `exchg_elapsed_time` bigint(20), `exchg_mount_time` bigint(20), `is_volsafe_cartridge` tinyint(4), `exchanges_pk` bigint(20) unsigned, `encryption_status` varchar(20), `recording_technique` varchar(12), `mb_media_capacity` double unsigned, `lifetime_meters` double unsigned, `exchg_err_status` varchar(20), `fsc` varchar(4), `media_mb_available_post` double unsigned, `does_drive_need_cleaning` tinyint(1), `inefficient` tinyint(1), `is_marginal` tinyint(1), `write_efficiency_metric` float, `read_margin` float, `mount_io_throughput` float, `warranty_enum` varchar(20), `was_media_loadlimit_reported` tinyint(1), `media_suspicion_level` float, `media_percent_eol` float, `media_percent_eow` float, `ta_nearing_media_life` tinyint(4), `ibm_media_efficiency` int(11), `hp_media_status` tinyint(4), `media_length` int(11), `media_mfg_date` datetime, `media_mam_capacity` double, `ta_directory_corrupt` tinyint(4), `media_mb_available_pre` double unsigned, `ta_cm_failure` tinyint(3) unsigned, `is_cleaning_media` tinyint(1), `max_cleaning_uses` int(6), `current_cleaning_uses` int(11), `cleaning_media_expired` tinyint(4), `fc_node_wwn` varchar(32), `drive_id` int(11), `drives_pk` bigint(20) unsigned, `drive_exist_start` datetime, `drive_exist_end` datetime, `drive_serial_number` varchar(32), `drive_type` varchar(45), `drive_model` varchar(20), `drive_vendor` varchar(20), `drive_health` varchar(20), `life_enum` varchar(8), `compression_ratio` float, `time_spent_reading` int(11), `time_spent_writing` int(11), `time_spent_rw` int(11), `read_throughput` float, `write_throughput` float, `io_throughput` float, `read_ratio` float, `write_ratio` float, `io_ratio` float, `media_dismounts_30days` int(10) unsigned, `media_errors_30days` int(10) unsigned, `media_mb_read_30days` double, `media_mb_written_30days` double, `media_mb_rw_30days` double, `media_mb_sent_30days` double, `media_mb_received_30days` double, `mount_read_throughput_30days` float, `mount_write_throughput_30days` float, `mount_io_throughput_30days` float, `library_complexes_pk` bigint(20) unsigned, `lib_complex_name` varchar(32), `libraries_pk` bigint(20) unsigned, `library_model` varchar(20), `library_name` varchar(32), `library_serial_number` varchar(32), `partition_type_enum` varchar(8), `partition_name` varchar(64), `partition_number` int(11), `physical_library_number` int(6), `physical_rail_number` smallint(6), `physical_address` varchar(32), `hli_address` varchar(32), `scsi_element_id` int(11), `annotation` varchar(255), `logical_group_names` text, `exist_start_dayts` bigint(10), `media_exist_end_dayts` bigint(10), `exchange_start_dayts` bigint(10), `media_mfg_date_dayts` bigint(10) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_media_hourly_averages` ( `summary_date` date, `summary_hour` int(2), `count` bigint(21), `avg_exchg_elapsed_time` decimal(23,4), `avg_exchg_mount_time` decimal(23,4), `avg_mount_read_throughput` double(21,4), `avg_mount_write_throughput` double(21,4), `avg_mount_io_throughput` double(21,4), `avg_suspicion_level` double(21,4), `avg_write_ratio` double(21,4), `avg_read_ratio` double(21,4), `avg_io_ratio` double(21,4), `avg_time_spent_rw` decimal(14,4), `avg_compression_ratio` double(21,4), `avg_read_throughput` double(21,4), `avg_write_throughput` double(21,4), `avg_io_throughput` double(21,4) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_media_locations` ( `media_pk` bigint(20) unsigned, `volser` varchar(32), `media_type` varchar(20), `library_complexes_pk` bigint(20) unsigned, `libraries_pk` bigint(20) unsigned, `physical_address` varchar(32) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `v_media_summary_averages` ( `summary_date` date DEFAULT NULL, `avg_megabytes_read` double(21,4) DEFAULT NULL, `avg_megabytes_written` double(21,4) DEFAULT NULL, `avg_megabytes_rw` double(21,4) DEFAULT NULL, `avg_mb_sent` double(21,4) DEFAULT NULL, `avg_mb_received` double(21,4) DEFAULT NULL, `avg_media_selections` decimal(14,4) DEFAULT NULL, `avg_media_read_margin` double(21,4) DEFAULT NULL, `avg_media_write_efficiency` double(21,4) DEFAULT NULL, `avg_media_suspicion_level` double(21,4) DEFAULT NULL, `avg_elapsed_time` decimal(23,4) DEFAULT NULL, `avg_mount_time` decimal(23,4) DEFAULT NULL, `avg_read_throughput` double(21,4) DEFAULT NULL, `avg_write_throughput` double(21,4) DEFAULT NULL, `avg_mount_read_throughput` double(21,4) DEFAULT NULL, `avg_mount_write_throughput` double(21,4) DEFAULT NULL, `avg_mount_io_throughput` double(21,4) DEFAULT NULL, `avg_io_throughput` double(21,4) DEFAULT NULL, `avg_io_ratio` double(21,4) DEFAULT NULL, `avg_mounts` decimal(14,4) DEFAULT NULL, `avg_mounts_with_errors` decimal(14,4) DEFAULT NULL, `avg_compression_ratio` double(21,4) DEFAULT NULL, KEY `v_media_summ_avgs_idx` (`summary_date`) ); /*!40101 SET character_set_client = @saved_cs_client */; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_monitored_entity_counts` ( `entity_type` varchar(7), `entity_pk` bigint(20) unsigned, `library_name` varchar(32), `library_serial_number` varchar(32), `library_model` varchar(20), `lib_complex_name` varchar(32), `exist_start` datetime, `exist_end` datetime, `logical_groups_names` text ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_ptp_locations` ( `ptps_pk` bigint(20) unsigned, `serial_number` varchar(64), `physical_address` varchar(32), `library_complexes_pk` bigint(20) unsigned, `libraries_pk` bigint(20) unsigned ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `v_ptp_summary_averages` ( `summary_date` date DEFAULT NULL, `avg_num_snmp_traps` int(10) DEFAULT NULL, KEY `v_ptp_summ_avgs_idx` (`summary_date`) ); /*!40101 SET character_set_client = @saved_cs_client */; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_ptps` ( `ptps_pk` bigint(20) unsigned, `serial_number` varchar(64), `exist_start` datetime, `exist_end` datetime, `state` varchar(32), `led_state_enum` varchar(8), `op_status_enum` varchar(20), `num_snmp_traps_30days` int(10) unsigned, `lib_ptp_health_enum_30days` varchar(20), `library_complexes_pk` bigint(20) unsigned, `lib_complex_name` varchar(32), `libraries_pk` bigint(20) unsigned, `library_model` varchar(20), `physical_address` varchar(32), `library_name` varchar(32), `library_serial_number` varchar(32), `annotation` varchar(255), `ptp_exist_start_dayts` bigint(10), `ptp_exist_end_dayts` bigint(10) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_robot_locations` ( `robots_pk` bigint(20) unsigned, `serial_number` varchar(64), `physical_address` varchar(32), `library_complexes_pk` bigint(20) unsigned, `libraries_pk` bigint(20) unsigned ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `v_robot_summary_averages` ( `summary_date` date DEFAULT NULL, `avg_num_robot_get_fails` int(10) DEFAULT NULL, `avg_num_robot_put_fails` int(10) DEFAULT NULL, `avg_num_robot_get_retries` int(10) DEFAULT NULL, `avg_num_robot_put_retries` int(10) DEFAULT NULL, `avg_num_robot_get_totals` int(10) DEFAULT NULL, `avg_num_robot_put_totals` int(10) DEFAULT NULL, `avg_num_snmp_traps` int(10) DEFAULT NULL, KEY `v_robot_summ_avgs_idx` (`summary_date`) ); /*!40101 SET character_set_client = @saved_cs_client */; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v_robots` ( `robots_pk` bigint(20) unsigned, `serial_number` varchar(64), `exist_start` datetime, `exist_end` datetime, `robot_health_enum` varchar(20), `robot_health_reason_text` varchar(120), `state` varchar(32), `hand_status_enum` varchar(25), `led_state_enum` varchar(8), `op_status_enum` varchar(20), `num_robot_put_fails_30days` int(10) unsigned, `num_robot_get_fails_30days` int(10) unsigned, `num_robot_put_retries_30days` int(10) unsigned, `num_robot_get_retries_30days` int(10) unsigned, `num_robot_put_totals_30days` int(10) unsigned, `num_robot_get_totals_30days` int(10) unsigned, `num_snmp_traps_30days` int(10) unsigned, `lib_robot_health_enum_30days` varchar(20), `library_complexes_pk` bigint(20) unsigned, `lib_complex_name` varchar(32), `libraries_pk` bigint(20) unsigned, `library_model` varchar(20), `physical_address` varchar(32), `library_name` varchar(32), `library_serial_number` varchar(32), `annotation` varchar(255), `robot_exist_start_dayts` bigint(10), `robot_exist_end_dayts` bigint(10) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `v_snmp_traps` ( `trap_type` varchar(30) DEFAULT NULL, `trap_pk` bigint(20) DEFAULT NULL, `library_complexes_pk` bigint(20) unsigned DEFAULT NULL, `libraries_pk` bigint(20) unsigned DEFAULT NULL, `drives_pk` bigint(20) DEFAULT NULL, `drive_exist_end` datetime DEFAULT NULL, `media_pk` bigint(20) unsigned DEFAULT NULL, `media_exist_end` datetime DEFAULT NULL, `sent_time` datetime DEFAULT NULL, `lib_complex_id` int(4) DEFAULT NULL, `lib_complex_name` varchar(32) DEFAULT NULL, `library_name` varchar(32) DEFAULT NULL, `library_model` varchar(20) DEFAULT NULL, `library_serial_number` varchar(20) DEFAULT NULL, `library_top_level_cond_enum` varchar(20) DEFAULT NULL, `device_state` varchar(20) DEFAULT NULL, `agent_boot_date` datetime DEFAULT NULL, `device_id` varchar(44) DEFAULT NULL, `device_time` datetime DEFAULT NULL, `device_address` varchar(12) DEFAULT NULL, `device_user_name` varchar(8) DEFAULT NULL, `device_interface_name` varchar(8) DEFAULT NULL, `device_activity` varchar(20) DEFAULT NULL, `device_request_id` varchar(8) DEFAULT NULL, `device_severity` varchar(7) DEFAULT NULL, `device_result_code` varchar(5) DEFAULT NULL, `device_free_form_text` varchar(1350) DEFAULT NULL, `device_property_name` varchar(128) DEFAULT NULL, `device_new_prop_value` varchar(128) DEFAULT NULL, `device_new_prop_effective` varchar(128) DEFAULT NULL, `drive_type` varchar(45) DEFAULT NULL, `drive_vendor` varchar(32) DEFAULT NULL, `device_serial_number` varchar(32) DEFAULT NULL, `device_pk` bigint(20) unsigned DEFAULT NULL, `volser` varchar(32) DEFAULT NULL, `media_type` varchar(20) DEFAULT NULL, `sent_time_dayts` bigint(10) DEFAULT NULL, `drive_exist_end_dayts` bigint(10) DEFAULT NULL, `agent_boot_date_dayts` bigint(10) DEFAULT NULL, `device_time_dayts` bigint(10) DEFAULT NULL, `annotation_text` varchar(255) DEFAULT NULL, UNIQUE KEY `v_snmptrap_pk_asc` (`trap_pk`), KEY `v_snmptrap_sent_asc_idx` (`sent_time_dayts`), KEY `v_snmptrap_serial_asc_idx` (`device_serial_number`) ); /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `version_info` ( `version_pk` tinyint(4) NOT NULL, `installed` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `schema_version` varchar(32) NOT NULL, `schema_released` datetime NOT NULL, `product_version` varchar(24) NOT NULL, `product_name` varchar(64) NOT NULL, `previous_version` varchar(32) DEFAULT NULL COMMENT 'Version that the schema was upgraded from. NULL indicates this schema has not been upgraded.', `upgraded` datetime DEFAULT NULL COMMENT 'Timestamp of when this schema was upgraded. NULL indicates this schema has not been upgraded.', `schema_revision` tinyint(3) unsigned DEFAULT '0', PRIMARY KEY (`version_pk`) ); /*!40101 SET character_set_client = @saved_cs_client */; CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `test`; USE `backups`; USE `mysql`; USE `stadb`; /*!50001 DROP TABLE IF EXISTS `mdv_settings`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `mdv_settings` AS select 1 AS `mdv_settings_pk`,1 AS `mdv_enabled`,'all_media' AS `select_media`,1200 AS `reserved_drive_count` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_action_drives`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_action_drives` AS select `drives`.`drives_pk` AS `drives_pk`,`drives`.`serial_number` AS `drive_serial_number`,`drives`.`model` AS `drive_model`,`drive_analytics`.`health_enum` AS `drive_health`,`drive_analytics`.`created` AS `analytics_date`,`annotations`.`annotation_text` AS `annotation`,`libraries`.`serial_number` AS `library_serial_number`,`libraries`.`model` AS `library_model`,`library_properties`.`name` AS `library_name`,`library_complexes`.`name` AS `lib_complex_name`,`v_logical_groups_drives_membership`.`logical_group_names` AS `logical_group_names` from ((((((((((`drives` join `v_logical_groups_drives_membership` on((`v_logical_groups_drives_membership`.`drives_pk` = `drives`.`drives_pk`))) left join `drive_analytics` on((isnull(`drive_analytics`.`da_exchgs_nxt_fk`) and (`drives`.`drives_pk` = `drive_analytics`.`da_drives_fk`)))) join `cells_drives` on(((`cells_drives`.`cd_drives_fk` = `drives`.`drives_pk`) and isnull(`cells_drives`.`exist_end`)))) join `cells` on((`cells`.`cells_pk` = `cells_drives`.`cd_cells_fk`))) join `rails` on((`rails`.`rails_pk` = `cells`.`ce_rails_fk`))) join `libraries` on((`libraries`.`libraries_pk` = `rails`.`ra_libraries_fk`))) left join `library_properties` on(((`library_properties`.`lp_libraries_fk` = `libraries`.`libraries_pk`) and isnull(`library_properties`.`exist_end`)))) join `library_complexes` on((`library_complexes`.`library_complexes_pk` = `libraries`.`li_library_complexes_fk`))) left join `annotations_entities` on(((`annotations_entities`.`entity_type` = 4) and (`annotations_entities`.`ae_entity_fk` = `libraries`.`libraries_pk`) and (`annotations_entities`.`is_latest` = 1)))) left join `annotations` on((`annotations_entities`.`ae_annotations_fk` = `annotations`.`annotations_pk`))) where (isnull(`drives`.`exist_end`) and (`drive_analytics`.`health_enum` = 'ACTION')) order by `drive_analytics`.`created` desc */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_action_media`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_action_media` AS select `media`.`media_pk` AS `media_pk`,`media`.`volser` AS `volser`,`media`.`type` AS `media_type`,`media_analytics`.`health_enum` AS `media_health`,`media_analytics`.`created` AS `analytics_date`,`annotations`.`annotation_text` AS `annotation`,`library_properties`.`name` AS `library_name`,`libraries`.`serial_number` AS `library_serial_number`,`libraries`.`model` AS `library_model`,`library_complexes`.`name` AS `lib_complex_name`,`v_logical_groups_media_membership`.`logical_group_names` AS `logical_group_names` from ((((((((((`media` join `v_logical_groups_media_membership` on((`v_logical_groups_media_membership`.`media_pk` = `media`.`media_pk`))) left join `media_analytics` on(((`media`.`media_pk` = `media_analytics`.`ma_media_fk`) and isnull(`media_analytics`.`ma_exchgs_nxt_fk`)))) join `cells_media` on(((`cells_media`.`cm_media_fk` = `media`.`media_pk`) and isnull(`cells_media`.`exist_end`) and (`cells_media`.`is_latest` = 1)))) join `cells` on((`cells`.`cells_pk` = `cells_media`.`cm_cells_fk`))) join `rails` on((`rails`.`rails_pk` = `cells`.`ce_rails_fk`))) join `libraries` on((`libraries`.`libraries_pk` = `rails`.`ra_libraries_fk`))) left join `library_properties` on(((`library_properties`.`lp_libraries_fk` = `libraries`.`libraries_pk`) and isnull(`library_properties`.`exist_end`)))) join `library_complexes` on((`library_complexes`.`library_complexes_pk` = `libraries`.`li_library_complexes_fk`))) left join `annotations_entities` on(((`annotations_entities`.`entity_type` = 5) and (`annotations_entities`.`ae_entity_fk` = `media`.`media_pk`) and (`annotations_entities`.`is_latest` = 1)))) left join `annotations` on((`annotations_entities`.`ae_annotations_fk` = `annotations`.`annotations_pk`))) where (isnull(`media`.`exist_end`) and (`media_analytics`.`health_enum` = 'ACTION')) order by `media_analytics`.`created` desc */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_alert_history`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_alert_history` AS select 0 AS `alert_history_pk`,now() AS `create_date`,NULL AS `annotation`,NULL AS `component_fk`,NULL AS `event_fk`,NULL AS `rule_fk`,'NONE' AS `severity`,'STA' AS `event_type_enum`,'NEW' AS `work_flow_enum` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_analytics_audit`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_analytics_audit` AS select `analytics_audit`.`aa_exchanges_fk` AS `aa_exchanges_fk`,group_concat(`analytics_audit`.`sequence_number` separator ';') AS `sequence_numbers`,group_concat(`analytics_audit`.`analytics_audit_pk` separator ';') AS `analytics_audit_pks`,group_concat(`analytics_audit`.`note` separator ';') AS `analytics_audit_notes` from `analytics_audit` where (`analytics_audit`.`proprietary` = 0) group by `analytics_audit`.`aa_exchanges_fk` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_annotations`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_annotations` AS select `annotations_entities`.`annotations_entities_pk` AS `annotations_entities_pk`,`annotations_entities`.`ae_annotations_fk` AS `annotations_pk`,`annotations`.`annotation_text` AS `annotation_text`,`annotations_entities`.`last_changed` AS `last_changed`,`annotations_entities`.`ae_entity_fk` AS `ae_entity_fk`,`annotations_entities`.`last_app_user_fk` AS `last_app_user_fk`,coalesce(`app_users`.`userid`,'UNKNOWN') AS `userid`,lcase(`lkup_type_identifiers`.`str`) AS `entity_type`,`lkup_type_identifiers`.`id` AS `entity_type_id`,`annotations_entities`.`is_latest` AS `is_latest` from (((`annotations_entities` join `annotations` on((`annotations_entities`.`ae_annotations_fk` = `annotations`.`annotations_pk`))) join `lkup_type_identifiers` on((`lkup_type_identifiers`.`id` = `annotations_entities`.`entity_type`))) left join `app_users` on((`app_users`.`app_users_pk` = `annotations_entities`.`last_app_user_fk`))) order by lcase(`lkup_type_identifiers`.`str`),`annotations_entities`.`ae_entity_fk`,`annotations_entities`.`last_changed` desc */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_cap_locations`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_cap_locations` AS select `caps`.`caps_pk` AS `caps_pk`,`caps`.`serial_number` AS `serial_number`,`transient_cells`.`physical_address` AS `physical_address`,`library_complexes`.`library_complexes_pk` AS `library_complexes_pk`,`libraries`.`libraries_pk` AS `libraries_pk` from (((((`caps` join `transient_cells_caps` on((isnull(`transient_cells_caps`.`exist_end`) and (`transient_cells_caps`.`tcc_caps_fk` = `caps`.`caps_pk`)))) join `transient_cells` on((isnull(`transient_cells`.`exist_end`) and (`transient_cells_caps`.`tcc_trans_cells_fk` = `transient_cells`.`transient_cells_pk`)))) join `rails` on((isnull(`rails`.`exist_end`) and (`rails`.`rails_pk` = `transient_cells`.`tc_rails_fk`)))) join `libraries` on((isnull(`libraries`.`exist_end`) and (`rails`.`ra_libraries_fk` = `libraries`.`libraries_pk`)))) join `library_complexes` on((isnull(`library_complexes`.`exist_end`) and (`library_complexes`.`library_complexes_pk` = `libraries`.`li_library_complexes_fk`)))) where isnull(`caps`.`exist_end`) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_caps`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_caps` AS select `caps`.`caps_pk` AS `caps_pk`,`caps`.`serial_number` AS `serial_number`,`caps`.`exist_start` AS `exist_start`,`caps`.`exist_end` AS `exist_end`,`cap_stats`.`state` AS `state`,`cap_stats`.`accessibility` AS `accessibility`,coalesce(`cap_stats`.`op_status_enum`,'UNKNOWN') AS `op_status_enum`,coalesce(`cap_stats`.`access_status_enum`,'UNKNOWN') AS `access_status_enum`,`agg_cap_summaries`.`num_media_enters` AS `num_media_enters_30days`,`agg_cap_summaries`.`num_media_ejects` AS `num_media_ejects_30days`,`agg_cap_summaries`.`num_snmp_traps` AS `num_cap_traps_30days`,coalesce(`agg_cap_summaries`.`lib_cap_health_enum`,'UNKNOWN') AS `lib_cap_health_enum_30days`,`library_complexes`.`library_complexes_pk` AS `library_complexes_pk`,coalesce(`library_complexes`.`name`,'REMOVED') AS `lib_complex_name`,`libraries`.`libraries_pk` AS `libraries_pk`,coalesce(`libraries`.`model`,'REMOVED') AS `library_model`,`transient_cells`.`physical_address` AS `physical_address`,`library_properties`.`name` AS `library_name`,`libraries`.`serial_number` AS `library_serial_number`,`annotations`.`annotation_text` AS `annotation`,unix_timestamp(`caps`.`exist_start`) AS `cap_exist_start_dayts`,unix_timestamp(`caps`.`exist_end`) AS `cap_exist_end_dayts` from ((((((((((`caps` join `transient_cells_caps` on(((`caps`.`caps_pk` = `transient_cells_caps`.`tcc_caps_fk`) and isnull(`transient_cells_caps`.`exist_end`)))) join `transient_cells` on(((`transient_cells_caps`.`tcc_trans_cells_fk` = `transient_cells`.`transient_cells_pk`) and isnull(`transient_cells`.`exist_end`)))) join `rails` on(((`transient_cells`.`tc_rails_fk` = `rails`.`rails_pk`) and isnull(`rails`.`exist_end`)))) join `libraries` on(((`rails`.`ra_libraries_fk` = `libraries`.`libraries_pk`) and isnull(`libraries`.`exist_end`)))) join `library_properties` on(((`library_properties`.`lp_libraries_fk` = `libraries`.`libraries_pk`) and isnull(`library_properties`.`exist_end`)))) join `library_complexes` on(((`libraries`.`li_library_complexes_fk` = `library_complexes`.`library_complexes_pk`) and isnull(`library_complexes`.`exist_end`)))) join `cap_stats` on((`caps`.`caps_pk` = `cap_stats`.`cs_caps_fk`))) left join `agg_cap_summaries` on(((`caps`.`caps_pk` = `agg_cap_summaries`.`caps_fk`) and (`agg_cap_summaries`.`agg_type` = 6)))) left join `annotations_entities` on(((`annotations_entities`.`entity_type` = 6) and (`annotations_entities`.`ae_entity_fk` = `caps`.`caps_pk`)))) left join `annotations` on((`annotations_entities`.`ae_annotations_fk` = `annotations`.`annotations_pk`))) where isnull(`caps`.`exist_end`) group by `caps`.`caps_pk` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_combined_details`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_combined_details` AS select `drives`.`drives_pk` AS `entity_pk`,'drive' AS `type`,`drives`.`exist_start` AS `exist_start`,`drives`.`serial_number` AS `drive_serial_number`,NULL AS `volser`,`drives`.`type` AS `drive_type`,NULL AS `media_type`,`drives`.`vendor` AS `manufacturer`,`drive_properties`.`firmware_level` AS `drive_firmware_level`,coalesce(`drive_analytics`.`health_enum`,'UNKNOWN') AS `drive_health`,NULL AS `media_health`,coalesce(`drive_analytics`.`suspicion_level`,0) AS `drive_suspicion`,NULL AS `media_suspicion`,NULL AS `media_is_cleaning`,`library_complexes`.`library_complexes_pk` AS `library_complexes_pk`,`library_complexes`.`name` AS `lib_complex_name`,`libraries`.`libraries_pk` AS `libraries_pk`,`libraries`.`model` AS `library_model`,`library_properties`.`name` AS `library_name`,`libraries`.`serial_number` AS `library_serial_number`,`partitions`.`partitions_pk` AS `partitions_pk`,`partitions`.`type_enum` AS `partition_type`,`partitions`.`name` AS `partition_name`,`partitions`.`number` AS `partition_number`,`cells`.`physical_library_number` AS `physical_library_number`,`cells`.`physical_rail_number` AS `physical_rail_number`,`cells`.`physical_address_display` AS `physical_address`,`cells`.`hli_address` AS `hli_address`,`cells`.`scsi_element_id` AS `scsi_element_id`,(select group_concat(`logical_groups_entities`.`lge_logical_groups_fk` separator ',') from `logical_groups_entities` where ((`logical_groups_entities`.`entity_type` = 4) and (`logical_groups_entities`.`lge_entity_fk` = `drives`.`drives_pk`))) AS `logical_groups_pks` from (((((((((`drives` left join `drive_properties` on((`drives`.`drives_pk` = `drive_properties`.`dp_drives_fk`))) left join `drive_analytics` on((`drives`.`drives_pk` = `drive_analytics`.`da_drives_fk`))) join `cells_drives` on((`cells_drives`.`cd_drives_fk` = `drives`.`drives_pk`))) join `cells` on((`cells`.`cells_pk` = `cells_drives`.`cd_cells_fk`))) join `rails` on((`rails`.`rails_pk` = `cells`.`ce_rails_fk`))) join `libraries` on((`libraries`.`libraries_pk` = `rails`.`ra_libraries_fk`))) left join `partitions` on((`partitions`.`partitions_pk` = `cells`.`ce_partitions_fk`))) left join `library_properties` on((`library_properties`.`lp_libraries_fk` = `libraries`.`libraries_pk`))) join `library_complexes` on((`library_complexes`.`library_complexes_pk` = `libraries`.`li_library_complexes_fk`))) where (isnull(`drives`.`exist_end`) and (`drive_properties`.`is_latest` = 1) and isnull(`drive_analytics`.`da_exchgs_nxt_fk`) and isnull(`cells_drives`.`exist_end`) and isnull(`partitions`.`exist_end`) and isnull(`library_properties`.`exist_end`)) union select `media`.`media_pk` AS `entity_pk`,'media' AS `type`,`media`.`exist_start` AS `exist_start`,NULL AS `drive_serial_number`,`media`.`volser` AS `volser`,NULL AS `drive_type`,`media`.`type` AS `media_type`,`media`.`manufacturer` AS `manufacturer`,NULL AS `drive_firmware_level`,NULL AS `drive_health`,coalesce(`media_analytics`.`health_enum`,'UNKNOWN') AS `media_health`,NULL AS `drive_suspicion`,coalesce(`media_analytics`.`suspicion_level`,0) AS `media_suspicion`,`media`.`is_cleaning` AS `media_is_cleaning`,`library_complexes`.`library_complexes_pk` AS `library_complexes_pk`,`library_complexes`.`name` AS `lib_complex_name`,`libraries`.`libraries_pk` AS `libraries_pk`,`libraries`.`model` AS `library_model`,`library_properties`.`name` AS `library_name`,`libraries`.`serial_number` AS `library_serial_number`,`partitions`.`partitions_pk` AS `partitions_pk`,`partitions`.`type_enum` AS `partition_type`,`partitions`.`name` AS `partition_name`,`partitions`.`number` AS `partition_number`,`cells`.`physical_library_number` AS `physical_library_number`,`cells`.`physical_rail_number` AS `physical_rail_number`,`cells`.`physical_address_display` AS `physical_address`,`cells`.`hli_address` AS `hli_address`,`cells`.`scsi_element_id` AS `scsi_element_id`,(select group_concat(`logical_groups_entities`.`lge_logical_groups_fk` separator ',') from `logical_groups_entities` where ((`logical_groups_entities`.`entity_type` = 5) and (`logical_groups_entities`.`lge_entity_fk` = `media`.`media_pk`))) AS `logical_groups_pks` from ((((((((`media` left join `media_analytics` on((`media`.`media_pk` = `media_analytics`.`ma_media_fk`))) join `cells_media` on((`cells_media`.`cm_media_fk` = `media`.`media_pk`))) join `cells` on((`cells`.`cells_pk` = `cells_media`.`cm_cells_fk`))) join `rails` on((`rails`.`rails_pk` = `cells`.`ce_rails_fk`))) join `libraries` on((`libraries`.`libraries_pk` = `rails`.`ra_libraries_fk`))) left join `partitions` on((`partitions`.`partitions_pk` = `cells`.`ce_partitions_fk`))) left join `library_properties` on((`library_properties`.`lp_libraries_fk` = `libraries`.`libraries_pk`))) join `library_complexes` on((`library_complexes`.`library_complexes_pk` = `libraries`.`li_library_complexes_fk`))) where (isnull(`media`.`exist_end`) and isnull(`media_analytics`.`ma_exchgs_nxt_fk`) and isnull(`cells_media`.`exist_end`) and (`cells_media`.`is_latest` = 1) and isnull(`partitions`.`exist_end`) and isnull(`library_properties`.`exist_end`)) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_controllers`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_controllers` AS select `controllers`.`controllers_pk` AS `controllers_pk`,`controllers`.`exist_start` AS `exist_start`,`controllers`.`serial_number` AS `controller_serial_number`,`controllers`.`fru` AS `fru`,`controllers`.`is_broken` AS `is_broken`,`controller_properties`.`id` AS `controller_id`,`controllers`.`hw_version` AS `hardware_version`,`controller_properties`.`app_version` AS `app_version`,`controller_properties`.`fw_version` AS `firmware_version`,`controller_stats`.`controller_stats_pk` AS `controller_stats_pk`,`controller_stats`.`created` AS `controller_stats_created`,`controller_stats`.`led_fault_enum` AS `led_fault_enum`,`controller_stats`.`led_safe_to_remove_enum` AS `led_safe_to_remove_enum`,`controller_stats`.`top_level_condition_enum` AS `top_level_condition_enum`,`controller_stats`.`controller_status_enum` AS `controller_status_enum`,if((`controller_stats`.`ha_slot` = 'Non-RE'),NULL,`controller_stats`.`ha_slot`) AS `ha_slot`,if((`controller_stats`.`ha_id` = 'Non-RE'),NULL,`controller_stats`.`ha_id`) AS `ha_id`,if((`controller_stats`.`ha_state` = 'Non-RE'),NULL,`controller_stats`.`ha_state`) AS `ha_state`,if((`controller_stats`.`ha_alternate_ip` = ''),NULL,`controller_stats`.`ha_alternate_ip`) AS `ha_alternate_ip`,`transient_cells_controllers`.`transient_cells_controllers_pk` AS `transient_cells_controllers_pk`,`transient_cells`.`transient_cells_pk` AS `transient_cells_pk`,`transient_cells`.`physical_library_number` AS `physical_library_number`,`transient_cells`.`physical_rail_number` AS `physical_rail_number`,`transient_cells`.`physical_address` AS `physical_address`,`transient_cells`.`tc_rails_fk` AS `tc_rails_fk`,`rails`.`rails_pk` AS `rails_pk`,`libraries`.`libraries_pk` AS `libraries_pk`,`libraries`.`model` AS `library_model`,`libraries`.`serial_number` AS `library_serial_number`,`library_properties`.`name` AS `library_name`,`library_complexes`.`library_complexes_pk` AS `library_complexes_pk`,`library_complexes`.`name` AS `lib_complex_name`,`annotations`.`annotation_text` AS `annotation` from ((((((((((`controllers` left join `controller_stats` on((`controller_stats`.`cs_controllers_fk` = `controllers`.`controllers_pk`))) join `controller_properties` on(((`controllers`.`controllers_pk` = `controller_properties`.`cp_controllers_fk`) and (`controller_properties`.`is_latest` = 1)))) join `transient_cells_controllers` on((isnull(`transient_cells_controllers`.`exist_end`) and (`transient_cells_controllers`.`tcc_controllers_fk` = `controllers`.`controllers_pk`)))) join `transient_cells` on((isnull(`transient_cells`.`exist_end`) and (`transient_cells_controllers`.`tcc_trans_cells_fk` = `transient_cells`.`transient_cells_pk`)))) join `rails` on((isnull(`rails`.`exist_end`) and (`rails`.`rails_pk` = `transient_cells`.`tc_rails_fk`)))) join `libraries` on((isnull(`libraries`.`exist_end`) and (`rails`.`ra_libraries_fk` = `libraries`.`libraries_pk`)))) join `library_properties` on((isnull(`library_properties`.`exist_end`) and (`library_properties`.`lp_libraries_fk` = `libraries`.`libraries_pk`)))) join `library_complexes` on((isnull(`library_complexes`.`exist_end`) and (`library_complexes`.`library_complexes_pk` = `libraries`.`li_library_complexes_fk`)))) left join `annotations_entities` on(((`annotations_entities`.`entity_type` = 20) and (`controllers`.`controllers_pk` = `annotations_entities`.`ae_entity_fk`)))) left join `annotations` on((`annotations_entities`.`ae_annotations_fk` = `annotations`.`annotations_pk`))) where isnull(`controllers`.`exist_end`) group by `controllers`.`controllers_pk` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_drive_health_detail`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_drive_health_detail` AS select `drives`.`drives_pk` AS `drives_pk`,`drives`.`exist_start` AS `exist_start`,`drives`.`exist_end` AS `drive_exist_end`,`drive_properties`.`fc_node_wwn` AS `fc_node_wwn`,`drives`.`serial_number` AS `drive_serial_number`,`drive_properties`.`drive_tray_serial_num` AS `tray_serial_number`,`drives`.`type` AS `drive_type`,coalesce(`drive_analytics`.`health_enum`,'UNKNOWN') AS `drive_health`,`drive_properties`.`id` AS `drive_id`,`drive_properties`.`fc_port_a_wwn` AS `fc_port_a_wwn`,`drive_properties`.`fc_port_b_wwn` AS `fc_port_b_wwn`,`drives`.`model` AS `drive_model`,`drives`.`vendor` AS `drive_vendor`,`drives`.`is_encryption_capable` AS `is_encryption_capable`,`drives`.`interface_type_enum` AS `drive_interface_type`,`drive_properties`.`exist_start` AS `date_drive_properties_changed`,`drive_properties`.`firmware_level` AS `firmware_level`,`drive_properties`.`firmware_level` AS `drive_version`,`drive_properties`.`firmware_level` AS `code_version`,`exchanges`.`exchanges_pk` AS `exchanges_pk`,`exchanges`.`exchange_start` AS `exchange_start`,`drive_analytics`.`exchg_elapsed_time` AS `exchg_elapsed_time`,`drive_analytics`.`exchg_mount_time` AS `exchg_mount_time`,`drive_analytics`.`mount_io_throughput` AS `mount_io_throughput`,`ent_exchanges`.`encryption_status` AS `encryption_status`,`exchanges`.`recording_technique` AS `recording_technique`,`drive_analytics`.`exchg_err_status_enum` AS `exchg_err_status`,`ent_exchanges`.`fsc` AS `fsc`,`exchanges`.`does_drive_need_cleaning` AS `does_drive_need_cleaning`,`drive_analytics`.`inefficient` AS `inefficient`,`drive_analytics`.`marginal` AS `is_marginal`,`ent_exchanges`.`was_drive_loadlimit_reported` AS `was_drive_loadlimit_reported`,`lto_exchanges`.`ta_diagnostics_required` AS `ta_diagnostics_required`,`lto_exchanges`.`lifetime_motion_hours` AS `lifetime_motion_hours`,`lto_exchanges`.`ibm_drive_efficiency` AS `ibm_drive_efficiency`,`lto_exchanges`.`ibm_media_efficiency` AS `ibm_media_efficiency`,`lto_exchanges`.`hp_device_status` AS `hp_device_status`,`drive_analytics`.`suspicion_level` AS `drive_suspicion_level`,`ent_exchanges`.`write_efficiency_metric` AS `write_efficiency_metric`,`ent_exchanges`.`read_margin` AS `read_margin`,`ent_exchanges`.`drive_percent_eol` AS `drive_percent_eol`,`drive_analytics`.`mb_for_last_clean` AS `last_mb_for_last_clean`,`drive_analytics`.`mb_since_last_clean` AS `last_mb_since_last_clean`,coalesce(`drive_summaries`.`mb_for_last_clean`,0) AS `daily_mb_for_last_clean`,coalesce(`drive_summaries`.`mb_since_last_clean`,0) AS `daily_mb_since_last_clean`,coalesce(`drive_summaries`.`lib_drive_health_enum`,'UNKNOWN') AS `lib_drive_health`,`drive_analytics`.`compression_ratio` AS `compression_ratio`,`exchanges`.`lifetime_cleans` AS `lifetime_cleans`,`exchanges`.`lifetime_loads` AS `lifetime_loads`,`exchanges`.`lifetime_meters` AS `lifetime_meters`,`exchanges`.`lifetime_power_hours` AS `lifetime_power_hours`,`ent_exchanges`.`time_spent_reading` AS `time_spent_reading`,`ent_exchanges`.`time_spent_writing` AS `time_spent_writing`,`drive_analytics`.`time_spent_rw` AS `time_spent_rw`,`drive_analytics`.`read_throughput` AS `read_throughput`,`drive_analytics`.`write_throughput` AS `write_throughput`,`drive_analytics`.`io_throughput` AS `io_throughput`,`drive_analytics`.`read_ratio` AS `read_ratio`,`drive_analytics`.`write_ratio` AS `write_ratio`,`drive_analytics`.`io_ratio` AS `io_ratio`,`media`.`media_pk` AS `media_pk`,`media`.`exist_start` AS `media_exist_start`,`media`.`exist_end` AS `media_exist_end`,`media`.`volser` AS `volser`,`exchanges`.`media_serial_number` AS `media_serial_number`,coalesce(`media_analytics`.`health_enum`,'UNKNOWN') AS `media_health`,`exchanges`.`is_volsafe_cartridge` AS `is_volsafe_cartridge`,`media`.`is_cleaning` AS `is_cleaning_media`,`agg_drive_summaries`.`utilization` AS `drive_utilization_30days`,`agg_drive_summaries`.`dismounts` AS `drive_dismounts_30days`,`agg_drive_summaries`.`errors` AS `drive_errors_30days`,`agg_drive_summaries`.`cleans` AS `drive_cleans_30days`,`agg_drive_summaries`.`mb_read` AS `drive_mb_read_30days`,`agg_drive_summaries`.`mb_written` AS `drive_mb_written_30days`,`agg_drive_summaries`.`mb_rw` AS `drive_mb_rw_30days`,`agg_drive_summaries`.`mb_sent` AS `drive_mb_sent_30days`,`agg_drive_summaries`.`mb_received` AS `drive_mb_received_30days`,`agg_drive_summaries`.`mount_read_throughput` AS `mount_read_throughput_30days`,`agg_drive_summaries`.`mount_write_throughput` AS `mount_write_throughput_30days`,`agg_drive_summaries`.`mount_io_throughput` AS `mount_io_throughput_30days`,`agg_drive_summaries`.`avg_read_mb_per_mount` AS `avg_read_mb_per_mount_30days`,`agg_drive_summaries`.`avg_write_mb_per_mount` AS `avg_write_mb_per_mount_30days`,`agg_drive_summaries`.`avg_rw_mb_per_mount` AS `avg_rw_mb_per_mount_30days`,`agg_drive_summaries`.`drive_snmp_trap_count` AS `drive_snmp_trap_count_30days`,`library_complexes`.`library_complexes_pk` AS `library_complexes_pk`,coalesce(`library_complexes`.`name`,'REMOVED') AS `lib_complex_name`,`libraries`.`libraries_pk` AS `libraries_pk`,coalesce(`libraries`.`model`,'REMOVED') AS `library_model`,`library_properties`.`name` AS `library_name`,`libraries`.`serial_number` AS `library_serial_number`,coalesce(`partitions`.`type_enum`,'REMOVED') AS `partition_type_enum`,coalesce(`partitions`.`name`,'REMOVED') AS `partition_name`,`partitions`.`number` AS `partition_number`,coalesce(`cells`.`physical_library_number`,-(1)) AS `physical_library_number`,`cells`.`physical_rail_number` AS `physical_rail_number`,coalesce(`cells`.`physical_address_display`,'REMOVED') AS `physical_address`,coalesce(`cells`.`hli_address`,'REMOVED') AS `hli_address`,`cells`.`scsi_element_id` AS `scsi_element_id`,`annotations`.`annotation_text` AS `annotation`,`v_logical_groups_drives_membership`.`logical_group_names` AS `logical_group_names`,unix_timestamp(`drives`.`exist_start`) AS `exist_start_dayts`,unix_timestamp(`drives`.`exist_end`) AS `drive_exist_end_dayts`,unix_timestamp(`drive_properties`.`exist_start`) AS `date_drive_properties_changed_dayts`,unix_timestamp(`exchanges`.`exchange_start`) AS `exchange_start_dayts` from (((((((((((((((((((`drives` join `v_logical_groups_drives_membership` on((`v_logical_groups_drives_membership`.`drives_pk` = `drives`.`drives_pk`))) left join `drive_properties` on(((`drive_properties`.`dp_drives_fk` = `drives`.`drives_pk`) and (`drive_properties`.`is_latest` = 1)))) left join `cells_drives` on((isnull(`cells_drives`.`exist_end`) and (`drives`.`drives_pk` = `cells_drives`.`cd_drives_fk`)))) left join `cells` on((isnull(`cells`.`exist_end`) and (`cells`.`cells_pk` = `cells_drives`.`cd_cells_fk`)))) left join `partitions` on((isnull(`partitions`.`exist_end`) and (`partitions`.`partitions_pk` = `cells`.`ce_partitions_fk`)))) left join `rails` on((isnull(`rails`.`exist_end`) and (`rails`.`rails_pk` = `cells`.`ce_rails_fk`)))) left join `libraries` on((isnull(`libraries`.`exist_end`) and (`rails`.`ra_libraries_fk` = `libraries`.`libraries_pk`)))) left join `library_complexes` on((isnull(`library_complexes`.`exist_end`) and (`library_complexes`.`library_complexes_pk` = `libraries`.`li_library_complexes_fk`)))) left join `library_properties` on((isnull(`library_properties`.`exist_end`) and (`library_properties`.`lp_libraries_fk` = `libraries`.`libraries_pk`)))) left join `drive_analytics` on((isnull(`drive_analytics`.`da_exchgs_nxt_fk`) and (`drives`.`drives_pk` = `drive_analytics`.`da_drives_fk`)))) left join `exchanges` on(((`exchanges`.`ex_drives_fk` = `drives`.`drives_pk`) and (`drive_analytics`.`da_exchanges_fk` = `exchanges`.`exchanges_pk`) and (`exchanges`.`alert_sent` = 1)))) left join `ent_exchanges` on((`exchanges`.`exchanges_pk` = `ent_exchanges`.`ee_exchanges_fk`))) left join `lto_exchanges` on((`exchanges`.`exchanges_pk` = `lto_exchanges`.`lt_exchanges_fk`))) left join `drive_summaries` on((((`drive_summaries`.`mounts` > 0) or (`drive_summaries`.`dismounts` > 0)) and (cast(`drive_summaries`.`summary_date` as date) = cast(now() as date)) and (`drive_summaries`.`ds_drives_fk` = `drives`.`drives_pk`)))) left join `agg_drive_summaries` on(((`drives`.`drives_pk` = `agg_drive_summaries`.`drives_fk`) and (`agg_drive_summaries`.`agg_type` = 6)))) left join `media_analytics` on(((`drives`.`drives_pk` = `media_analytics`.`ma_drives_fk`) and (`media_analytics`.`ma_exchanges_fk` = `drive_analytics`.`da_exchanges_fk`)))) left join `media` on((`media`.`media_pk` = `media_analytics`.`ma_media_fk`))) left join `annotations_entities` on(((`annotations_entities`.`entity_type` = 4) and (`annotations_entities`.`ae_entity_fk` = `drives`.`drives_pk`) and (`annotations_entities`.`is_latest` = 1)))) left join `annotations` on((`annotations_entities`.`ae_annotations_fk` = `annotations`.`annotations_pk`))) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_drive_hourly_averages`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_drive_hourly_averages` AS select cast(`drive_analytics`.`created` as date) AS `summary_date`,hour(`drive_analytics`.`created`) AS `summary_hour`,count(`drive_analytics`.`drive_analytics_pk`) AS `count`,round(avg(nullif(`drive_analytics`.`exchg_elapsed_time`,0)),4) AS `avg_exchg_elapsed_time`,round(avg(nullif(`drive_analytics`.`exchg_mount_time`,0)),4) AS `avg_exchg_mount_time`,round(avg(nullif(`drive_analytics`.`mount_read_throughput`,0)),4) AS `avg_mount_read_throughput`,round(avg(nullif(`drive_analytics`.`mount_write_throughput`,0)),4) AS `avg_mount_write_throughput`,round(avg(nullif(`drive_analytics`.`mount_io_throughput`,0)),4) AS `avg_mount_io_throughput`,round(avg(nullif(`drive_analytics`.`suspicion_level`,0)),4) AS `avg_suspicion_level`,round(avg(nullif(`drive_analytics`.`write_ratio`,0)),4) AS `avg_write_ratio`,round(avg(nullif(`drive_analytics`.`read_ratio`,0)),4) AS `avg_read_ratio`,round(avg(nullif(`drive_analytics`.`io_ratio`,0)),4) AS `avg_io_ratio`,round(avg(nullif(`drive_analytics`.`time_spent_rw`,0)),4) AS `avg_time_spent_rw`,round(avg(nullif(`drive_analytics`.`compression_ratio`,0)),4) AS `avg_compression_ratio`,round(avg(nullif(`drive_analytics`.`read_throughput`,0)),4) AS `avg_read_throughput`,round(avg(nullif(`drive_analytics`.`write_throughput`,0)),4) AS `avg_write_throughput`,round(avg(nullif(`drive_analytics`.`io_throughput`,0)),4) AS `avg_io_throughput`,round(avg(nullif(`drive_analytics`.`mb_since_last_clean`,0)),4) AS `avg_mb_since_last_clean`,round(avg(nullif(`drive_analytics`.`mb_for_last_clean`,0)),4) AS `avg_mb_for_last_clean` from (((((((`drive_analytics` join `drives` on((`drives`.`drives_pk` = `drive_analytics`.`da_drives_fk`))) join `exchanges` on((`exchanges`.`exchanges_pk` = `drive_analytics`.`da_exchanges_fk`))) join `libraries` on((`libraries`.`libraries_pk` = `exchanges`.`ex_libraries_fk`))) join `library_properties` on((`library_properties`.`library_properties_pk` = `exchanges`.`ex_library_properties_fk`))) join `library_complexes` on((`libraries`.`li_library_complexes_fk` = `library_complexes`.`library_complexes_pk`))) left join `logical_groups_entities` on(((`logical_groups_entities`.`lge_entity_fk` = `drives`.`drives_pk`) and (`logical_groups_entities`.`entity_type` = 'drive')))) left join `logical_groups` on((`logical_groups_entities`.`lge_logical_groups_fk` = `logical_groups`.`logical_groups_pk`))) where (1 = 1) group by cast(`drive_analytics`.`created` as date),hour(`drive_analytics`.`created`) order by cast(`drive_analytics`.`created` as date) desc,hour(`drive_analytics`.`created`) desc limit 48 */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_drive_locations`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_drive_locations` AS select `drives`.`drives_pk` AS `drives_pk`,`drives`.`serial_number` AS `serial_number`,`drives`.`type` AS `drive_type`,`library_complexes`.`library_complexes_pk` AS `library_complexes_pk`,`libraries`.`libraries_pk` AS `libraries_pk`,`cells`.`physical_address_display` AS `physical_address` from (((((`drives` join `cells_drives` on((isnull(`cells_drives`.`exist_end`) and (`drives`.`drives_pk` = `cells_drives`.`cd_drives_fk`)))) join `cells` on((isnull(`cells`.`exist_end`) and (`cells`.`cells_pk` = `cells_drives`.`cd_cells_fk`)))) join `rails` on((isnull(`rails`.`exist_end`) and (`rails`.`rails_pk` = `cells`.`ce_rails_fk`)))) join `libraries` on((isnull(`libraries`.`exist_end`) and (`rails`.`ra_libraries_fk` = `libraries`.`libraries_pk`)))) join `library_complexes` on((isnull(`library_complexes`.`exist_end`) and (`library_complexes`.`library_complexes_pk` = `libraries`.`li_library_complexes_fk`)))) where isnull(`drives`.`exist_end`) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_drive_throughputs`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_drive_throughputs` AS select `drives`.`drives_pk` AS `drives_pk`,cast(`drive_summaries`.`summary_date` as date) AS `summary_date`,`drive_summaries`.`mb_read` AS `mb_read`,`drive_summaries`.`mb_written` AS `mb_written`,`drive_summaries`.`mb_sent` AS `mb_sent`,`drive_summaries`.`mb_received` AS `mb_received`,`drive_summaries`.`compression_ratio` AS `compression_ratio`,`drive_summaries`.`write_efficiency_metric` AS `write_efficiency_metric`,`drive_summaries`.`read_margin` AS `read_margin`,`drive_summaries`.`mount_read_throughput` AS `mount_read_throughput`,`drive_summaries`.`mount_write_throughput` AS `mount_write_throughput`,`drive_summaries`.`mount_io_throughput` AS `mount_io_throughput`,`drive_summaries`.`read_mb_per_mount` AS `read_mb_per_mount`,`drive_summaries`.`write_mb_per_mount` AS `write_mb_per_mount`,`drive_summaries`.`rw_mb_per_mount` AS `rw_mb_per_mount`,`library_properties`.`name` AS `library_name`,`libraries`.`serial_number` AS `library_serial_number`,`libraries`.`model` AS `library_model`,`library_complexes`.`name` AS `lib_complex_name`,`v_logical_groups_drives_membership`.`logical_group_names` AS `logical_group_names` from (((((((((`drives` join `v_logical_groups_drives_membership` on((`v_logical_groups_drives_membership`.`drives_pk` = `drives`.`drives_pk`))) join `drive_summaries` on(((`drive_summaries`.`dismounts` > 0) and (`drive_summaries`.`mounts` > 0) and ((`drive_summaries`.`mb_read` > 0) or (`drive_summaries`.`mb_written` > 0)) and (`drive_summaries`.`ds_drives_fk` = `drives`.`drives_pk`)))) left join `cells_drives` on((isnull(`cells_drives`.`exist_end`) and (`cells_drives`.`cd_drives_fk` = `drives`.`drives_pk`)))) left join `cells` on((isnull(`cells`.`exist_end`) and (`cells`.`cells_pk` = `cells_drives`.`cd_cells_fk`)))) left join `rails` on((isnull(`rails`.`exist_end`) and (`rails`.`rails_pk` = `cells`.`ce_rails_fk`)))) left join `libraries` on((isnull(`libraries`.`exist_end`) and (`libraries`.`libraries_pk` = `rails`.`ra_libraries_fk`)))) left join `partitions` on((isnull(`partitions`.`exist_end`) and (`partitions`.`partitions_pk` = `cells`.`ce_partitions_fk`)))) left join `library_properties` on((isnull(`library_properties`.`exist_end`) and (`library_properties`.`lp_libraries_fk` = `libraries`.`libraries_pk`)))) left join `library_complexes` on((isnull(`library_complexes`.`exist_end`) and (`library_complexes`.`library_complexes_pk` = `libraries`.`li_library_complexes_fk`)))) order by cast(`drive_summaries`.`summary_date` as date) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_drive_utilization`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_drive_utilization` AS select cast(`library_summaries`.`summary_date` as date) AS `summary_date`,round(avg(`library_summaries`.`drive_utilization`),2) AS `drive_utilization` from `library_summaries` where ((`library_summaries`.`drive_utilization` is not null) and (`library_summaries`.`drive_utilization` > 0) and (cast(`library_summaries`.`summary_date` as date) <= cast(now() as date)) and (cast(`library_summaries`.`summary_date` as date) > (now() - interval 30 day))) group by cast(`library_summaries`.`summary_date` as date) order by cast(`library_summaries`.`summary_date` as date) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_drives_requiring_most_cleans`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_drives_requiring_most_cleans` AS select `drives`.`drives_pk` AS `drives_pk`,`drives`.`serial_number` AS `drive_serial_number`,`drives`.`model` AS `drive_model`,coalesce(`drive_analytics`.`mb_for_last_clean`,0) AS `mb_for_last_clean`,`libraries`.`serial_number` AS `library_serial_number`,`libraries`.`model` AS `library_model`,`library_properties`.`name` AS `library_name`,`library_complexes`.`name` AS `lib_complex_name`,`v_logical_groups_drives_membership`.`logical_group_names` AS `logical_group_names` from ((((((((`drives` join `v_logical_groups_drives_membership` on((`v_logical_groups_drives_membership`.`drives_pk` = `drives`.`drives_pk`))) left join `drive_analytics` on((isnull(`drive_analytics`.`da_exchgs_nxt_fk`) and (`drives`.`drives_pk` = `drive_analytics`.`da_drives_fk`)))) left join `cells_drives` on((isnull(`cells_drives`.`exist_end`) and (`cells_drives`.`cd_drives_fk` = `drives`.`drives_pk`)))) left join `cells` on((isnull(`cells`.`exist_end`) and (`cells`.`cells_pk` = `cells_drives`.`cd_cells_fk`)))) left join `rails` on((isnull(`rails`.`exist_end`) and (`rails`.`rails_pk` = `cells`.`ce_rails_fk`)))) left join `libraries` on((isnull(`libraries`.`exist_end`) and (`libraries`.`libraries_pk` = `rails`.`ra_libraries_fk`)))) left join `library_properties` on((isnull(`library_properties`.`exist_end`) and (`library_properties`.`lp_libraries_fk` = `libraries`.`libraries_pk`)))) left join `library_complexes` on((`library_complexes`.`library_complexes_pk` = `libraries`.`li_library_complexes_fk`))) where (isnull(`drives`.`exist_end`) and (`drive_analytics`.`mb_for_last_clean` > 0)) order by coalesce(`drive_analytics`.`mb_for_last_clean`,0) limit 5 */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_elevators`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_elevators` AS select `elevators`.`elevators_pk` AS `elevators_pk`,`elevators`.`serial_number` AS `serial_number`,`elevators`.`exist_start` AS `exist_start`,`elevators`.`exist_end` AS `exist_end`,`elevator_stats`.`state` AS `state`,coalesce(`elevator_stats`.`led_state_enum`,'UNKNOWN') AS `led_state_enum`,coalesce(`elevator_stats`.`op_status_enum`,'UNKNOWN') AS `op_status_enum`,`agg_elevator_summaries`.`num_snmp_traps` AS `num_snmp_traps_30days`,coalesce(`agg_elevator_summaries`.`lib_elevator_health_enum`,'UNKNOWN') AS `lib_elevator_health_enum_30days`,`library_complexes`.`library_complexes_pk` AS `library_complexes_pk`,coalesce(`library_complexes`.`name`,'REMOVED') AS `lib_complex_name`,`libraries`.`libraries_pk` AS `libraries_pk`,coalesce(`libraries`.`model`,'REMOVED') AS `library_model`,`transient_cells`.`physical_address` AS `physical_address`,`library_properties`.`name` AS `library_name`,`libraries`.`serial_number` AS `library_serial_number`,`annotations`.`annotation_text` AS `annotation`,unix_timestamp(`elevators`.`exist_start`) AS `elevator_exist_start_dayts`,unix_timestamp(`elevators`.`exist_end`) AS `elevator_exist_end_dayts` from ((((((((((`elevators` join `elevator_stats` on((`elevators`.`elevators_pk` = `elevator_stats`.`es_elevators_fk`))) join `transient_cells_elevators` on(((`elevators`.`elevators_pk` = `transient_cells_elevators`.`tce_elevators_fk`) and isnull(`transient_cells_elevators`.`exist_end`)))) join `transient_cells` on(((`transient_cells_elevators`.`tce_trans_cells_fk` = `transient_cells`.`transient_cells_pk`) and isnull(`transient_cells`.`exist_end`)))) join `rails` on(((`transient_cells`.`tc_rails_fk` = `rails`.`rails_pk`) and isnull(`rails`.`exist_end`)))) join `libraries` on(((`rails`.`ra_libraries_fk` = `libraries`.`libraries_pk`) and isnull(`libraries`.`exist_end`)))) join `library_properties` on(((`library_properties`.`lp_libraries_fk` = `libraries`.`libraries_pk`) and isnull(`library_properties`.`exist_end`)))) join `library_complexes` on(((`libraries`.`li_library_complexes_fk` = `library_complexes`.`library_complexes_pk`) and isnull(`library_complexes`.`exist_end`)))) left join `agg_elevator_summaries` on(((`elevators`.`elevators_pk` = `agg_elevator_summaries`.`elevators_fk`) and (`agg_elevator_summaries`.`agg_type` = 6)))) left join `annotations_entities` on(((`annotations_entities`.`entity_type` = 8) and (`annotations_entities`.`ae_entity_fk` = `elevators`.`elevators_pk`)))) left join `annotations` on((`annotations_entities`.`ae_annotations_fk` = `annotations`.`annotations_pk`))) where isnull(`elevators`.`exist_end`) group by `elevators`.`elevators_pk` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_enterprise_io`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_enterprise_io` AS select cast(`library_summaries`.`summary_date` as date) AS `date`,round(sum(`library_summaries`.`mb_read`),4) AS `mbread`,round(sum(`library_summaries`.`mb_written`),4) AS `mbwritten`,round(sum(`library_summaries`.`mb_rw`),4) AS `mbreadandwritten` from (((`library_summaries` join `libraries` on((`libraries`.`libraries_pk` = `library_summaries`.`ls_libraries_fk`))) join `library_properties` on(((`library_properties`.`library_properties_pk` = `library_summaries`.`ls_library_properties_fk`) and isnull(`library_properties`.`exist_end`)))) join `library_complexes` on((`libraries`.`li_library_complexes_fk` = `library_complexes`.`library_complexes_pk`))) where ((cast(`library_summaries`.`summary_date` as date) <= cast(now() as date)) and (cast(`library_summaries`.`summary_date` as date) > (now() - interval 30 day)) and (1 = 1)) group by cast(`library_summaries`.`summary_date` as date) order by cast(`library_summaries`.`summary_date` as date) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_last_scan`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_last_scan` AS select `snmp_mib_walk`.`snmp_lib_connects_fk` AS `snmp_lib_connects_fk`,max(`snmp_mib_walk`.`snmp_mib_walk_pk`) AS `mib_walk_fk`,`v_lib_last_mib_walk`.`mib_walk_start` AS `mib_walk_start` from (`snmp_mib_walk` join `v_lib_last_mib_walk` on(((`snmp_mib_walk`.`snmp_lib_connects_fk` = `v_lib_last_mib_walk`.`snmp_lib_connects_fk`) and (`snmp_mib_walk`.`mib_walk_start` = `v_lib_last_mib_walk`.`mib_walk_start`) and (`snmp_mib_walk`.`mib_walk_status_enum` <> 'SKIPPED')))) group by `snmp_mib_walk`.`snmp_lib_connects_fk` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_last_successful_scan`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_last_successful_scan` AS select `snmp_mib_walk`.`snmp_lib_connects_fk` AS `snmp_lib_connects_fk`,max(`snmp_mib_walk`.`snmp_mib_walk_pk`) AS `mib_walk_fk`,`v_lib_success_mib_walk`.`mib_walk_end` AS `sucessful_mib_walk_end` from (`snmp_mib_walk` join `v_lib_success_mib_walk` on(((`snmp_mib_walk`.`snmp_lib_connects_fk` = `v_lib_success_mib_walk`.`snmp_lib_connects_fk`) and (`snmp_mib_walk`.`mib_walk_end` = `v_lib_success_mib_walk`.`mib_walk_end`) and (`snmp_mib_walk`.`mib_walk_status_enum` <> 'SKIPPED')))) group by `snmp_mib_walk`.`snmp_lib_connects_fk` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_lib_comm_status_detail`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_lib_comm_status_detail` AS select `snmp_lib_comm_status`.`snmp_lib_comm_status_pk` AS `snmp_lib_comm_status_pk`,`snmp_lib_comm_status`.`snmp_lib_connects_fk` AS `snmp_lib_connects_fk`,`snmp_lib_comm_status`.`time_received` AS `time_received`,if((`snmp_lib_comm_status`.`snmp_comm_condition_enum` = 'GOOD'),100,if((`snmp_lib_comm_status`.`snmp_comm_condition_enum` = 'DEGRADED'),60,0)) AS `snmp_comm_condition` from `snmp_lib_comm_status` where (cast(`snmp_lib_comm_status`.`time_received` as date) >= (now() - interval 30 day)) order by `snmp_lib_comm_status`.`snmp_lib_connects_fk`,`snmp_lib_comm_status`.`time_received` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_lib_comm_status_summary`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_lib_comm_status_summary` AS select `snmp_lib_comm_status`.`snmp_lib_comm_status_pk` AS `snmp_lib_comm_status_pk`,`snmp_lib_comm_status`.`snmp_lib_connects_fk` AS `snmp_lib_connects_fk`,cast(`snmp_lib_comm_status`.`time_received` as date) AS `recv_date`,hour(`snmp_lib_comm_status`.`time_received`) AS `recv_hour`,minute(`snmp_lib_comm_status`.`time_received`) AS `recv_minute`,avg(if((`snmp_lib_comm_status`.`snmp_comm_condition_enum` = 'GOOD'),100,if((`snmp_lib_comm_status`.`snmp_comm_condition_enum` = 'DEGRADED'),60,0))) AS `snmp_comm_condition`,count(`snmp_lib_comm_status`.`snmp_lib_comm_status_pk`) AS `count` from `snmp_lib_comm_status` where (cast(`snmp_lib_comm_status`.`time_received` as date) >= (now() - interval 30 day)) group by `snmp_lib_comm_status`.`snmp_lib_connects_fk`,cast(`snmp_lib_comm_status`.`time_received` as date),hour(`snmp_lib_comm_status`.`time_received`),minute(`snmp_lib_comm_status`.`time_received`) order by `snmp_lib_comm_status`.`snmp_lib_connects_fk`,cast(`snmp_lib_comm_status`.`time_received` as date),hour(`snmp_lib_comm_status`.`time_received`),minute(`snmp_lib_comm_status`.`time_received`) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_lib_last_mib_walk`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_lib_last_mib_walk` AS select `snmp_mib_walk`.`snmp_lib_connects_fk` AS `snmp_lib_connects_fk`,max(`snmp_mib_walk`.`mib_walk_start`) AS `mib_walk_start` from `snmp_mib_walk` where (`snmp_mib_walk`.`mib_walk_status_enum` <> 'SKIPPED') group by `snmp_mib_walk`.`snmp_lib_connects_fk` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_lib_success_mib_walk`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_lib_success_mib_walk` AS select `snmp_mib_walk`.`snmp_lib_connects_fk` AS `snmp_lib_connects_fk`,max(`snmp_mib_walk`.`mib_walk_end`) AS `mib_walk_end` from `snmp_mib_walk` where ((`snmp_mib_walk`.`mib_walk_status_enum` = 'SUCCESS') and (`snmp_mib_walk`.`mib_walk_end` is not null)) group by `snmp_mib_walk`.`snmp_lib_connects_fk` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_libraries`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_libraries` AS select `library_complexes`.`library_complexes_pk` AS `library_complexes_pk`,`libraries`.`libraries_pk` AS `libraries_pk`,`libraries`.`exist_start` AS `exist_start`,`library_properties`.`name` AS `library_name`,`libraries`.`model` AS `library_model`,`library_properties`.`id` AS `library_number`,`library_complexes`.`name` AS `complex_name`,`library_complexes`.`id` AS `complex_id`,`libraries`.`serial_number` AS `library_serial_number`,`library_properties`.`wwn` AS `library_wwn`,`library_top_level`.`top_level_condition_enum` AS `top_level_condition`,`library_summaries`.`last_boot_date` AS `last_boot_date`,`library_properties`.`fw_date` AS `library_fw_date`,`library_properties`.`fw_version` AS `library_fw_version`,`libraries`.`hw_version` AS `library_hw_version`,`library_properties`.`os_version` AS `library_os_version`,`snmp_lib_connects`.`lib_ip_primary` AS `lib_ip_primary`,`snmp_lib_connects`.`lib_ip_secondary` AS `lib_ip_secondary`,`library_summaries`.`num_partitions` AS `num_partitions`,`library_summaries`.`num_drive_bays_allocated` AS `num_drive_bays_allocated`,`library_summaries`.`num_drive_bays_unallocated` AS `num_drive_bays_unallocated`,`library_summaries`.`num_media_cells_allocated` AS `num_media_cells_allocated`,`library_summaries`.`num_media_cells_unallocated` AS `num_media_cells_unallocated`,`library_summaries`.`last_mib_walk` AS `last_mib_walk`,`library_summaries`.`num_caps` AS `num_caps`,`library_summaries`.`num_elevators` AS `num_elevators`,`library_summaries`.`num_ptps` AS `num_ptps`,`library_summaries`.`num_robots` AS `num_robots`,`agg_library_summaries`.`num_library_snmp_traps` AS `num_library_snmp_traps_30days`,`agg_library_summaries`.`num_dismounts` AS `num_dismounts_30days`,`agg_library_summaries`.`num_enters` AS `num_enters_30days`,`agg_library_summaries`.`num_ejects` AS `num_ejects_30days`,`agg_library_summaries`.`num_cleans` AS `num_cleans_30days`,`agg_library_summaries`.`mb_read` AS `mb_read_30days`,`agg_library_summaries`.`mb_written` AS `mb_written_30days`,`agg_library_summaries`.`mb_rw` AS `mb_rw_30days`,`agg_library_summaries`.`mb_sent` AS `mb_sent_30days`,`agg_library_summaries`.`mb_received` AS `mb_received_30days`,`agg_library_summaries`.`drive_utilization` AS `drive_utilization_30days`,`agg_library_summaries`.`num_ptp_enters` AS `num_ptp_enters_30days`,`agg_library_summaries`.`num_ptp_ejects` AS `num_ptp_ejects_30days`,`annotations`.`annotation_text` AS `annotation`,unix_timestamp(`libraries`.`exist_start`) AS `exist_start_dayts`,unix_timestamp(`library_summaries`.`last_boot_date`) AS `last_boot_date_dayts`,unix_timestamp(`library_properties`.`fw_date`) AS `library_fw_date_dayts`,unix_timestamp(`library_summaries`.`last_mib_walk`) AS `last_mib_walk_dayts` from ((((((((`libraries` join `library_properties` on(((`libraries`.`libraries_pk` = `library_properties`.`lp_libraries_fk`) and isnull(`library_properties`.`exist_end`)))) join `snmp_lib_connects` on((`libraries`.`snmp_lib_connects_fk` = `snmp_lib_connects`.`snmp_lib_connects_pk`))) join `library_complexes` on((`libraries`.`li_library_complexes_fk` = `library_complexes`.`library_complexes_pk`))) join `agg_library_summaries` on(((`agg_library_summaries`.`libraries_fk` = `libraries`.`libraries_pk`) and (`agg_library_summaries`.`agg_type` = 6)))) left join `library_top_level` on(((`library_top_level`.`libraries_fk` = `libraries`.`libraries_pk`) and (`library_top_level`.`is_latest` = 1)))) left join `library_summaries` on(((`libraries`.`libraries_pk` = `library_summaries`.`ls_libraries_fk`) and (cast(`library_summaries`.`summary_date` as date) = cast(now() as date))))) left join `annotations_entities` on(((`annotations_entities`.`entity_type` = 3) and (`annotations_entities`.`ae_entity_fk` = `libraries`.`libraries_pk`) and (`annotations_entities`.`is_latest` = 1)))) left join `annotations` on((`annotations_entities`.`ae_annotations_fk` = `annotations`.`annotations_pk`))) where (isnull(`libraries`.`exist_end`) and isnull(`library_complexes`.`exist_end`)) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_library_activity`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_library_activity` AS select cast(`library_summaries`.`summary_date` as date) AS `date`,coalesce(sum(`library_summaries`.`num_dismounts`),0) AS `Dismounts`,coalesce(sum(`library_summaries`.`num_enters`),0) AS `Enters`,coalesce(sum(`library_summaries`.`num_ejects`),0) AS `Ejects` from (((`library_summaries` join `libraries` on((`libraries`.`libraries_pk` = `library_summaries`.`ls_libraries_fk`))) join `library_properties` on(((`library_properties`.`library_properties_pk` = `library_summaries`.`ls_library_properties_fk`) and isnull(`library_properties`.`exist_end`)))) join `library_complexes` on((`libraries`.`li_library_complexes_fk` = `library_complexes`.`library_complexes_pk`))) where ((cast(`library_summaries`.`summary_date` as date) <= cast(now() as date)) and (cast(`library_summaries`.`summary_date` as date) > (now() - interval 30 day)) and (1 = 1)) group by cast(`library_summaries`.`summary_date` as date) order by cast(`library_summaries`.`summary_date` as date) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_library_complex_activity`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_library_complex_activity` AS select `library_complexes`.`library_complexes_pk` AS `vlca_library_complexes_fk`,`library_complexes`.`name` AS `lib_complex_name`,sum(`library_summaries`.`num_library_snmp_traps`) AS `num_library_snmp_traps_30days`,sum(`library_summaries`.`num_dismounts`) AS `num_dismounts_30days`,sum(`library_summaries`.`num_enters`) AS `num_enters_30days`,sum(`library_summaries`.`num_ejects`) AS `num_ejects_30days`,sum(`library_summaries`.`num_cleans`) AS `num_cleans_30days`,sum(`library_summaries`.`mb_read`) AS `mb_read_30days`,sum(`library_summaries`.`mb_written`) AS `mb_written_30days`,sum(`library_summaries`.`mb_rw`) AS `mb_rw_30days`,sum(`library_summaries`.`mb_sent`) AS `mb_sent_30days`,sum(`library_summaries`.`mb_received`) AS `mb_received_30days`,sum(`library_summaries`.`num_ptp_enters`) AS `num_ptp_enters_30days`,sum(`library_summaries`.`num_ptp_ejects`) AS `num_ptp_ejects_30days`,avg(`library_summaries`.`drive_utilization`) AS `drive_utilization_30days` from ((`library_complexes` join `libraries` on((`libraries`.`li_library_complexes_fk` = `library_complexes`.`library_complexes_pk`))) left join `library_summaries` on(((`library_summaries`.`ls_libraries_fk` = `libraries`.`libraries_pk`) and (cast(`library_summaries`.`summary_date` as date) <= cast(now() as date)) and (cast(`library_summaries`.`summary_date` as date) > (now() - interval 30 day))))) group by `library_complexes`.`library_complexes_pk` order by `library_complexes`.`library_complexes_pk` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_library_complex_io`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_library_complex_io` AS select `library_complexes`.`library_complexes_pk` AS `library_complexes_pk`,`library_complexes`.`name` AS `lib_complex_name`,cast(`library_summaries`.`summary_date` as date) AS `date`,sum(`library_summaries`.`mb_read`) AS `mbread`,sum(`library_summaries`.`mb_written`) AS `mbwritten`,sum(`library_summaries`.`mb_rw`) AS `mbreadandwritten` from ((`library_complexes` join `libraries` on((`library_complexes`.`library_complexes_pk` = `libraries`.`li_library_complexes_fk`))) left join `library_summaries` on(((`libraries`.`libraries_pk` = `library_summaries`.`ls_libraries_fk`) and (cast(`library_summaries`.`summary_date` as date) <= cast(now() as date)) and (cast(`library_summaries`.`summary_date` as date) > (now() - interval 30 day))))) where (isnull(`libraries`.`exist_end`) and isnull(`library_complexes`.`exist_end`)) group by `library_complexes`.`library_complexes_pk`,cast(`library_summaries`.`summary_date` as date) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_library_complex_summaries`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_library_complex_summaries` AS select cast(`library_summaries`.`summary_date` as date) AS `summary_date`,`library_complexes`.`library_complexes_pk` AS `library_complexes_pk`,sum(`library_summaries`.`num_partitions`) AS `num_partitions`,sum(`library_summaries`.`num_drive_bays_allocated`) AS `num_drive_bays_allocated`,sum(`library_summaries`.`num_drive_bays_unallocated`) AS `num_drive_bays_unallocated`,sum(`library_summaries`.`num_media_cells_allocated`) AS `num_media_cells_allocated`,sum(`library_summaries`.`num_media_cells_unallocated`) AS `num_media_cells_unallocated`,sum(`library_summaries`.`mb_read`) AS `mb_read`,sum(`library_summaries`.`mb_written`) AS `mb_written`,sum(`library_summaries`.`mb_rw`) AS `mb_rw`,sum(`library_summaries`.`mb_sent`) AS `mb_sent`,sum(`library_summaries`.`mb_received`) AS `mb_received`,sum(`library_summaries`.`num_enters`) AS `num_enters`,sum(`library_summaries`.`num_ejects`) AS `num_ejects`,sum(`library_summaries`.`num_cleans`) AS `num_cleans`,sum(`library_summaries`.`num_dismounts`) AS `num_dismounts`,sum(`library_summaries`.`num_library_snmp_traps`) AS `num_library_snmp_traps`,sum(`library_summaries`.`num_ptp_enters`) AS `num_ptp_enters`,sum(`library_summaries`.`num_ptp_ejects`) AS `num_ptp_ejects`,sum(`library_summaries`.`num_caps`) AS `num_caps`,sum(`library_summaries`.`num_elevators`) AS `num_elevators`,sum(`library_summaries`.`num_ptps`) AS `num_ptps`,sum(`library_summaries`.`num_robots`) AS `num_robots`,avg(`library_summaries`.`drive_utilization`) AS `drive_utilization` from ((`library_complexes` join `libraries` on((`libraries`.`li_library_complexes_fk` = `library_complexes`.`library_complexes_pk`))) left join `library_summaries` on(((`library_summaries`.`ls_libraries_fk` = `libraries`.`libraries_pk`) and (cast(`library_summaries`.`summary_date` as date) <= cast(now() as date))))) where (isnull(`libraries`.`exist_end`) and isnull(`library_complexes`.`exist_end`)) group by `library_complexes`.`library_complexes_pk`,cast(`library_summaries`.`summary_date` as date) order by cast(`library_summaries`.`summary_date` as date) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_library_complexes`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_library_complexes` AS select `library_complexes`.`library_complexes_pk` AS `library_complexes_pk`,`library_complexes`.`exist_start` AS `exist_start`,`library_complexes`.`name` AS `lib_complex_name`,`library_complexes`.`id` AS `lib_complex_id`,`library_complexes`.`base_model` AS `lib_complex_model`,count(`libraries`.`libraries_pk`) AS `num_libraries`,sum(`library_summaries`.`num_partitions`) AS `num_partitions`,sum(`library_summaries`.`num_drive_bays_allocated`) AS `num_drive_bays_allocated`,sum(`library_summaries`.`num_drive_bays_unallocated`) AS `num_drive_bays_unallocated`,sum(`library_summaries`.`num_media_cells_allocated`) AS `num_media_cells_allocated`,sum(`library_summaries`.`num_media_cells_unallocated`) AS `num_media_cells_unallocated`,sum(`library_summaries`.`num_robots`) AS `num_robots`,sum(`library_summaries`.`num_caps`) AS `num_caps`,sum(`library_summaries`.`num_ptps`) AS `num_ptps`,sum(`library_summaries`.`num_elevators`) AS `num_elevators`,`v_library_complex_activity`.`num_library_snmp_traps_30days` AS `num_library_snmp_traps_30days`,`v_library_complex_activity`.`num_dismounts_30days` AS `num_dismounts_30days`,`v_library_complex_activity`.`num_enters_30days` AS `num_enters_30days`,`v_library_complex_activity`.`num_ejects_30days` AS `num_ejects_30days`,`v_library_complex_activity`.`num_cleans_30days` AS `num_cleans_30days`,`v_library_complex_activity`.`mb_read_30days` AS `mb_read_30days`,`v_library_complex_activity`.`mb_written_30days` AS `mb_written_30days`,`v_library_complex_activity`.`mb_rw_30days` AS `mb_rw_30days`,`v_library_complex_activity`.`mb_sent_30days` AS `mb_sent_30days`,`v_library_complex_activity`.`mb_received_30days` AS `mb_received_30days`,`v_library_complex_activity`.`drive_utilization_30days` AS `drive_utilization_30days`,`v_library_complex_activity`.`num_ptp_enters_30days` AS `num_ptp_enters_30days`,`v_library_complex_activity`.`num_ptp_ejects_30days` AS `num_ptp_ejects_30days`,`annotations`.`annotation_text` AS `annotation`,unix_timestamp(`library_complexes`.`exist_start`) AS `exist_start_dayts` from (((((`libraries` join `library_complexes` on((`libraries`.`li_library_complexes_fk` = `library_complexes`.`library_complexes_pk`))) join `v_library_complex_activity` on((`library_complexes`.`library_complexes_pk` = `v_library_complex_activity`.`vlca_library_complexes_fk`))) left join `library_summaries` on(((`libraries`.`libraries_pk` = `library_summaries`.`ls_libraries_fk`) and (cast(`library_summaries`.`summary_date` as date) = cast(now() as date))))) left join `annotations_entities` on(((`annotations_entities`.`entity_type` = 2) and (`annotations_entities`.`ae_entity_fk` = `library_complexes`.`library_complexes_pk`) and (`annotations_entities`.`is_latest` = 1)))) left join `annotations` on((`annotations_entities`.`ae_annotations_fk` = `annotations`.`annotations_pk`))) where (isnull(`library_complexes`.`exist_end`) and isnull(`libraries`.`exist_end`)) group by `library_complexes`.`library_complexes_pk` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_library_hourly_averages`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_library_hourly_averages` AS select cast(`exchanges`.`created` as date) AS `summary_date`,hour(`exchanges`.`created`) AS `summary_hour`,`exchanges`.`ex_libraries_fk` AS `ex_libraries_fk`,count(`exchanges`.`exchanges_pk`) AS `count`,round(avg(nullif(`exchanges`.`mb_read`,0)),4) AS `avg_mb_read`,round(avg(nullif(`exchanges`.`mb_written`,0)),4) AS `avg_mb_written`,round(avg(nullif((`exchanges`.`mb_read` + `exchanges`.`mb_written`),0)),4) AS `avg_mb_rw`,round(avg(nullif(`exchanges`.`mb_sent`,0)),4) AS `avg_mb_sent`,round(avg(nullif(`exchanges`.`mb_received`,0)),4) AS `avg_mb_received`,round(avg(nullif((`exchanges`.`exchange_end` - `exchanges`.`exchange_start`),0)),4) AS `avg_exchg_elapsed_time`,round(avg(nullif((`exchanges`.`media_dismounted` - `exchanges`.`media_mounted`),0)),4) AS `avg_exchg_mount_time` from (((`exchanges` join `libraries` on((`libraries`.`libraries_pk` = `exchanges`.`ex_libraries_fk`))) join `library_properties` on((`library_properties`.`library_properties_pk` = `exchanges`.`ex_library_properties_fk`))) join `library_complexes` on((`libraries`.`li_library_complexes_fk` = `library_complexes`.`library_complexes_pk`))) where ((`exchanges`.`alert_sent` = 1) and (1 = 1)) group by cast(`exchanges`.`created` as date),hour(`exchanges`.`created`),`exchanges`.`ex_libraries_fk` order by cast(`exchanges`.`created` as date) desc,hour(`exchanges`.`created`) desc limit 48 */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_library_scan`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_library_scan` AS select `snmp_lib_connects`.`snmp_lib_connects_pk` AS `snmp_lib_connects_pk`,`snmp_lib_connects`.`agent_ip` AS `agent_ip`,`snmp_lib_connects`.`lib_name` AS `library_name`,`library_complexes`.`name` AS `complex_name`,`snmp_lib_connects`.`lib_ip_primary` AS `lib_ip_primary`,`snmp_lib_connects`.`lib_ip_secondary` AS `lib_ip_secondary`,`snmp_lib_connects`.`lib_agent_engine_id` AS `lib_agent_engine_id`,`snmp_lib_connects`.`requested_mib_walk_time` AS `requested_mib_walk_time`,`snmp_lib_connects`.`library_serial_number` AS `library_serial_number`,`snmp_lib_connects`.`timezone_enum` AS `timezone_enum`,coalesce(ucase(`snmp_lib_comm_status`.`snmp_comm_condition_enum`),'NONE') AS `snmp_comm_condition_enum`,`last_good_walk`.`mib_walk_end` AS `last_successful_scan`,`last_walk`.`mib_walk_start` AS `last_scan`,`last_walk`.`mib_walk_status_enum` AS `last_scan_status`,`last_walk`.`mib_walk_failure_detail` AS `last_scan_failure_detail` from (((((((`snmp_lib_connects` left join `snmp_lib_comm_status` on(((`snmp_lib_comm_status`.`snmp_lib_connects_fk` = `snmp_lib_connects`.`snmp_lib_connects_pk`) and (`snmp_lib_comm_status`.`is_latest` = 1)))) left join `v_last_scan` on((`v_last_scan`.`snmp_lib_connects_fk` = `snmp_lib_connects`.`snmp_lib_connects_pk`))) left join `snmp_mib_walk` `last_walk` on(((`v_last_scan`.`snmp_lib_connects_fk` = `last_walk`.`snmp_lib_connects_fk`) and (`last_walk`.`snmp_mib_walk_pk` = `v_last_scan`.`mib_walk_fk`)))) left join `v_last_successful_scan` on((`v_last_successful_scan`.`snmp_lib_connects_fk` = `snmp_lib_connects`.`snmp_lib_connects_pk`))) left join `snmp_mib_walk` `last_good_walk` on(((`v_last_successful_scan`.`snmp_lib_connects_fk` = `last_good_walk`.`snmp_lib_connects_fk`) and (`last_good_walk`.`snmp_mib_walk_pk` = `v_last_successful_scan`.`mib_walk_fk`)))) left join `libraries` on(((`snmp_lib_connects`.`snmp_lib_connects_pk` = `libraries`.`snmp_lib_connects_fk`) and isnull(`libraries`.`exist_end`)))) left join `library_complexes` on(((`libraries`.`li_library_complexes_fk` = `library_complexes`.`library_complexes_pk`) and isnull(`library_complexes`.`exist_end`)))) where (`snmp_lib_connects`.`is_valid` = 1) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_library_type_by_health`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_library_type_by_health` AS select `libraries`.`model` AS `library_model`,sum((case when (`library_top_level`.`top_level_condition_enum` = 'NORMAL') then 1 else 0 end)) AS `normal`,sum((case when (`library_top_level`.`top_level_condition_enum` = 'DEGRADED') then 1 else 0 end)) AS `degraded`,sum((case when (`library_top_level`.`top_level_condition_enum` = 'NOTOPERATIVE') then 1 else 0 end)) AS `notoperative`,sum((case when ((`library_top_level`.`top_level_condition_enum` = 'UNKNOWN') or isnull(`library_top_level`.`top_level_condition_enum`)) then 1 else 0 end)) AS `unknown` from (((`libraries` join `library_top_level` on((`libraries`.`libraries_pk` = `library_top_level`.`libraries_fk`))) left join `library_properties` on((isnull(`library_properties`.`exist_end`) and (`library_properties`.`lp_libraries_fk` = `libraries`.`libraries_pk`)))) join `library_complexes` on((`library_complexes`.`library_complexes_pk` = `libraries`.`li_library_complexes_fk`))) where (isnull(`libraries`.`exist_end`) and (`library_top_level`.`is_latest` = 1) and (1 = 1)) group by `libraries`.`model` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_logical_groups_counts`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_logical_groups_counts` AS select `logical_groups`.`logical_groups_pk` AS `logical_groups_pk`,`logical_groups`.`name` AS `logical_group_name`,`logical_groups`.`type` AS `logical_group_type`,`app_users`.`userid` AS `owner`,(select count(`logical_groups_entities`.`lge_entity_fk`) from `logical_groups_entities` where ((`logical_groups_entities`.`entity_type` = 5) and (`logical_groups`.`logical_groups_pk` = `logical_groups_entities`.`lge_logical_groups_fk`))) AS `media_count`,(select count(`logical_groups_entities`.`lge_entity_fk`) from `logical_groups_entities` where ((`logical_groups_entities`.`entity_type` = 4) and (`logical_groups`.`logical_groups_pk` = `logical_groups_entities`.`lge_logical_groups_fk`))) AS `drive_count` from (`logical_groups` join `app_users` on((`app_users`.`app_users_pk` = `logical_groups`.`app_user_fk`))) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_logical_groups_details`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_logical_groups_details` AS select `logical_groups_entities`.`logical_groups_entities_pk` AS `logical_groups_entities_pk`,`logical_groups`.`logical_groups_pk` AS `logical_groups_pk`,`logical_groups`.`name` AS `logical_group_name`,`logical_groups`.`type` AS `logical_group_type`,`logical_groups_entities`.`lge_entity_fk` AS `assigned_entity_pk`,`logical_groups_entities`.`created` AS `date_joined`,`logical_groups_entities`.`entity_type` AS `assigned_entity_type`,`media`.`volser` AS `assigned_entity_label`,`media`.`type` AS `assigned_entity_desc` from ((`logical_groups` join `logical_groups_entities` on((`logical_groups`.`logical_groups_pk` = `logical_groups_entities`.`lge_logical_groups_fk`))) join `media` on(((`logical_groups_entities`.`lge_entity_fk` = `media`.`media_pk`) and (`logical_groups_entities`.`entity_type` = 5)))) union select `logical_groups_entities`.`logical_groups_entities_pk` AS `logical_groups_entities_pk`,`logical_groups`.`logical_groups_pk` AS `logical_groups_pk`,`logical_groups`.`name` AS `logical_group_name`,`logical_groups`.`type` AS `logical_group_type`,`logical_groups_entities`.`lge_entity_fk` AS `assigned_entity_pk`,`logical_groups_entities`.`created` AS `date_joined`,`logical_groups_entities`.`entity_type` AS `assigned_entity_type`,`drives`.`serial_number` AS `assigned_entity_label`,`drives`.`model` AS `assigned_entity_desc` from ((`logical_groups` join `logical_groups_entities` on((`logical_groups`.`logical_groups_pk` = `logical_groups_entities`.`lge_logical_groups_fk`))) join `drives` on(((`logical_groups_entities`.`lge_entity_fk` = `drives`.`drives_pk`) and (`logical_groups_entities`.`entity_type` = 4)))) order by `logical_group_name`,`logical_groups_entities_pk` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_logical_groups_drives_membership`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_logical_groups_drives_membership` AS select `drives`.`drives_pk` AS `drives_pk`,group_concat(`logical_groups`.`logical_groups_pk` separator ',') AS `logical_group_pks`,group_concat(`logical_groups`.`name` separator ',') AS `logical_group_names` from ((`drives` left join `logical_groups_entities` on(((`logical_groups_entities`.`lge_entity_fk` = `drives`.`drives_pk`) and (`logical_groups_entities`.`entity_type` = 4)))) left join `logical_groups` on((`logical_groups_entities`.`lge_logical_groups_fk` = `logical_groups`.`logical_groups_pk`))) group by `drives`.`drives_pk` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_logical_groups_labels`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_logical_groups_labels` AS select `logical_groups`.`logical_groups_pk` AS `logical_groups_pk`,`logical_groups`.`name` AS `logical_group_name`,`logical_groups`.`type` AS `logical_group_type`,`app_users`.`userid` AS `owner`,(select group_concat(`media`.`volser` separator ',') from `media` where `media`.`media_pk` in (select `logical_groups_entities`.`lge_entity_fk` from `logical_groups_entities` where ((`logical_groups_entities`.`entity_type` = 5) and (`logical_groups`.`logical_groups_pk` = `logical_groups_entities`.`lge_logical_groups_fk`)))) AS `volsers`,(select group_concat(`drives`.`serial_number` separator ',') from `drives` where `drives`.`drives_pk` in (select `logical_groups_entities`.`lge_entity_fk` from `logical_groups_entities` where ((`logical_groups_entities`.`entity_type` = 4) and (`logical_groups`.`logical_groups_pk` = `logical_groups_entities`.`lge_logical_groups_fk`)))) AS `drives` from (`logical_groups` join `app_users` on((`app_users`.`app_users_pk` = `logical_groups`.`app_user_fk`))) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_logical_groups_media_membership`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_logical_groups_media_membership` AS select `media`.`media_pk` AS `media_pk`,group_concat(`logical_groups`.`logical_groups_pk` separator ',') AS `logical_group_pks`,group_concat(`logical_groups`.`name` separator ',') AS `logical_group_names` from ((`media` left join `logical_groups_entities` on(((`logical_groups_entities`.`lge_entity_fk` = `media`.`media_pk`) and (`logical_groups_entities`.`entity_type` = 5)))) left join `logical_groups` on((`logical_groups_entities`.`lge_logical_groups_fk` = `logical_groups`.`logical_groups_pk`))) group by `media`.`media_pk` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_logical_groups_pks`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_logical_groups_pks` AS select `logical_groups`.`logical_groups_pk` AS `logical_groups_pk`,`logical_groups`.`name` AS `logical_group_name`,`logical_groups`.`type` AS `logical_group_type`,`app_users`.`userid` AS `owner`,(select group_concat(`logical_groups_entities`.`lge_entity_fk` separator ',') from `logical_groups_entities` where ((`logical_groups_entities`.`entity_type` = 5) and (`logical_groups`.`logical_groups_pk` = `logical_groups_entities`.`lge_logical_groups_fk`))) AS `media_pks`,(select group_concat(`logical_groups_entities`.`lge_entity_fk` separator ',') from `logical_groups_entities` where ((`logical_groups_entities`.`entity_type` = 4) and (`logical_groups`.`logical_groups_pk` = `logical_groups_entities`.`lge_logical_groups_fk`))) AS `drive_pks` from (`logical_groups` join `app_users` on((`app_users`.`app_users_pk` = `logical_groups`.`app_user_fk`))) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_mdv_drives`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_mdv_drives` AS select `drives`.`drives_pk` AS `drives_pk`,`drives`.`serial_number` AS `serial_number`,`drive_properties`.`address` AS `address`,`drives`.`model` AS `model`,`l`.`libraries_pk` AS `libraries_pk`,`l`.`li_library_complexes_fk` AS `library_complexes_pk` from (((((`cells_drives` `cd` join `rails` `r`) join `cells` `c`) join `libraries` `l`) join `drive_properties`) join `drives`) where ((`c`.`ce_rails_fk` = `r`.`rails_pk`) and (`cd`.`cd_cells_fk` = `c`.`cells_pk`) and (`r`.`ra_libraries_fk` = `l`.`libraries_pk`) and (`drives`.`drives_pk` = `cd`.`cd_drives_fk`) and (`drive_properties`.`dp_drives_fk` = `drives`.`drives_pk`) and isnull(`drives`.`exist_end`) and (`drive_properties`.`is_latest` = 1) and ((ucase(`drives`.`model`) like 'T10000C%') or (ucase(`drives`.`model`) like 'T10000D%'))) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_mdv_libraries`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_mdv_libraries` AS select distinct `lc`.`library_complexes_pk` AS `library_complexes_pk`,`lc`.`name` AS `name` from (((((`libraries` `l` join `library_complexes` `lc`) join `rails` `ra`) join `cells` `ce`) join `cells_drives` `cd`) join `drives` `d`) where ((`l`.`li_library_complexes_fk` = `lc`.`library_complexes_pk`) and (`l`.`libraries_pk` = `ra`.`ra_libraries_fk`) and (`ra`.`rails_pk` = `ce`.`ce_rails_fk`) and (`cd`.`cd_cells_fk` = `ce`.`cells_pk`) and (`cd`.`cd_drives_fk` = `d`.`drives_pk`) and ((`d`.`model` = 'T10000C') or (`d`.`model` = 'T10000D')) and isnull(`d`.`exist_end`) and isnull(`cd`.`exist_end`) and isnull(`ce`.`exist_end`) and isnull(`ra`.`exist_end`) and isnull(`l`.`exist_end`)) order by `lc`.`name` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_mdv_policies`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_mdv_policies` AS select `mdv_policies`.`mdv_policies_pk` AS `mdv_policies_pk`,`mdv_policies`.`name` AS `policy_name`,`mdv_policies`.`description` AS `policy_description`,`logical_groups`.`name` AS `logical_group_name`,`library_complexes`.`name` AS `lib_complex_name`,`mdv_policies`.`created` AS `created`,`mdv_policies`.`last_modified` AS `last_modified`,`mdv_policies`.`exist_end` AS `exist_end`,if(isnull(`mdv_policies`.`exist_end`),1,0) AS `policy_enabled`,`mdv_policies`.`rule_parameter` AS `rule_parameter`,`mdv_policies`.`evaluation_order` AS `evaluation_order`,`mdv_policies`.`element_type` AS `element_type`,`mdv_policies`.`rule_type` AS `rule_type`,`mdv_policies`.`library_complexes_fk` AS `library_complexes_fk`,`mdv_policies`.`logical_groups_fk` AS `logical_groups_fk`,`mdv_policies`.`validation_type_enum` AS `validation_type_enum`,`lkup_mdv_test_types`.`mdv_test_type` AS `mdv_test_type`,if((`mdv_policies`.`validation_type_enum` = 1),'Basic Verify',if((`mdv_policies`.`validation_type_enum` = 2),'Complete Verify',if((`mdv_policies`.`validation_type_enum` = 3),'Complete Verify - Resume',if((`mdv_policies`.`validation_type_enum` = 4),'Complete Verify Plus',if((`mdv_policies`.`validation_type_enum` = 5),'Complete Verify Plus - Resume',if((`mdv_policies`.`validation_type_enum` = 6),'Standard Verify',if((`mdv_policies`.`validation_type_enum` = 7),'Verify and Rebuild MIR','Unknown'))))))) AS `validation_type`,`mdv_policies`.`element_subtype` AS `element_subtype` from (((`mdv_policies` left join `lkup_mdv_test_types` on((`lkup_mdv_test_types`.`mdv_test_type_pk` = `mdv_policies`.`validation_type_enum`))) left join `library_complexes` on(((`mdv_policies`.`library_complexes_fk` = `library_complexes`.`library_complexes_pk`) and isnull(`library_complexes`.`exist_end`)))) left join `logical_groups` on((`mdv_policies`.`logical_groups_fk` = `logical_groups`.`logical_groups_pk`))) order by if(isnull(`mdv_policies`.`exist_end`),1,0) desc,`mdv_policies`.`name` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_mdv_queue`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_mdv_queue` AS select `mdv_queue`.`mdv_queue_pk` AS `mdv_queue_pk`,`library_complexes`.`library_complexes_pk` AS `library_complexes_pk`,`exchanges`.`ex_libraries_fk` AS `libraries_pk`,`mdv_queue`.`mq_exchanges_fk` AS `exchanges_pk`,`mdv_queue`.`mq_mdv_policies_fk` AS `mq_mdv_policies_fk`,`mdv_queue`.`mq_media_fk` AS `media_pk`,`mdv_queue`.`mq_drives_fk` AS `drives_pk`,`mdv_queue`.`priority_order` AS `priority_order`,`mdv_queue`.`hlu_id_started` AS `hlu_id_started`,`mdv_queue`.`hlu_id_completed` AS `hlu_id_completed`,`mdv_queue`.`elapsed_time` AS `elapsed_time`,`mdv_queue`.`created` AS `created`,`mdv_queue`.`partition_started` AS `partition_start`,`mdv_queue`.`perm_status` AS `perm_status`,`mdv_queue`.`partition_started` AS `partition_started`,`mdv_queue`.`partition_completed` AS `partition_completed`,coalesce(`mdv_queue`.`read_percentage`,0) AS `read_percentage`,`mdv_queue`.`rqi` AS `rqi`,`lkup_mdv_test_types`.`mdv_test_type` AS `mdv_test_type`,if((`mdv_queue`.`validation_type_enum` = 1),'Basic Verify',if((`mdv_queue`.`validation_type_enum` = 2),'Complete Verify',if((`mdv_queue`.`validation_type_enum` = 3),'Complete Verify - Resume',if((`mdv_queue`.`validation_type_enum` = 4),'Complete Verify Plus',if((`mdv_queue`.`validation_type_enum` = 5),'Complete Verify Plus - Resume',if((`mdv_queue`.`validation_type_enum` = 6),'Standard Verify',if((`mdv_queue`.`validation_type_enum` = 7),'Verify and Rebuild MIR','Unknown'))))))) AS `validation_type`,coalesce(`mdv_queue`.`request_state_enum`,0) AS `request_state_enum`,if((`mdv_queue`.`request_state_enum` = 1),'Pending',if((`mdv_queue`.`request_state_enum` = 2),'Starting',if((`mdv_queue`.`request_state_enum` = 3),'In Progress',if((`mdv_queue`.`request_state_enum` = 4),'Stopping',if((`mdv_queue`.`request_state_enum` = 5),'Completed',if((`mdv_queue`.`request_state_enum` = 6),'Error','Unknown')))))) AS `request_state`,`mdv_queue`.`request_time` AS `request_time`,`mdv_queue`.`reason_text` AS `reason_text`,`mdv_queue`.`last_state_update_time` AS `last_state_update_time`,`mdv_queue`.`initiator` AS `initiator`,coalesce(`mdv_queue`.`stop_request`,0) AS `stop_request`,`mdv_queue`.`drive_qual` AS `drive_qual`,`drives`.`serial_number` AS `serial_number`,`exchanges`.`exchange_start` AS `exchange_start`,`media_analytics`.`health_enum` AS `health_enum`,`media`.`volser` AS `volser`,`media`.`type` AS `media_type`,`library_complexes`.`name` AS `library_complex_name`,`annotations`.`annotation_text` AS `annotation`,`mdv_policies`.`name` AS `policy_name`,`mdv_policies`.`rule_type` AS `rule_type` from (((((((((((((`mdv_queue` join `lkup_mdv_test_types` on((`lkup_mdv_test_types`.`mdv_test_type_pk` = `mdv_queue`.`validation_type_enum`))) join `media` on((`mdv_queue`.`mq_media_fk` = `media`.`media_pk`))) left join `drives` on((`mdv_queue`.`mq_drives_fk` = `drives`.`drives_pk`))) left join `media_analytics` on((`mdv_queue`.`mq_exchanges_fk` = `media_analytics`.`ma_exchanges_fk`))) left join `exchanges` on((`mdv_queue`.`mq_exchanges_fk` = `exchanges`.`exchanges_pk`))) left join `cells_media` on((isnull(`cells_media`.`exist_end`) and (`cells_media`.`is_latest` = 1) and (`media`.`media_pk` = `cells_media`.`cm_media_fk`)))) left join `cells` on((isnull(`cells`.`exist_end`) and (`cells_media`.`cm_cells_fk` = `cells`.`cells_pk`)))) left join `rails` on((isnull(`rails`.`exist_end`) and (`cells`.`ce_rails_fk` = `rails`.`rails_pk`)))) left join `libraries` on((isnull(`libraries`.`exist_end`) and (`rails`.`ra_libraries_fk` = `libraries`.`libraries_pk`)))) left join `library_complexes` on((`library_complexes`.`library_complexes_pk` = `libraries`.`li_library_complexes_fk`))) left join `mdv_policies` on((`mdv_queue`.`mq_mdv_policies_fk` = `mdv_policies`.`mdv_policies_pk`))) left join `annotations_entities` on(((`annotations_entities`.`entity_type` = 21) and (`annotations_entities`.`ae_entity_fk` = `media`.`media_pk`) and (`annotations_entities`.`is_latest` = 1)))) left join `annotations` on((`annotations_entities`.`ae_annotations_fk` = `annotations`.`annotations_pk`))) order by `mdv_queue`.`priority_order` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_media_exceptions`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_media_exceptions` AS select `media`.`media_pk` AS `media_pk`,`media`.`volser` AS `volser`,`media`.`type` AS `media_type`,`media`.`exist_end` AS `media_exist_end`,`media_summaries`.`summary_date` AS `last_summary_date`,`media_summaries`.`media_summaries_pk` AS `media_summaries_pk`,`annotations`.`annotation_text` AS `annotation`,`library_properties`.`name` AS `library_name`,`libraries`.`serial_number` AS `library_serial_number`,`libraries`.`model` AS `library_model`,`library_complexes`.`name` AS `lib_complex_name` from (((((((((`media` join `media_summaries` on((`media`.`media_pk` = `media_summaries`.`ms_media_fk`))) left join `cells_media` on((`cells_media`.`cm_media_fk` = `media`.`media_pk`))) left join `cells` on((`cells`.`cells_pk` = `cells_media`.`cm_cells_fk`))) left join `rails` on(((`rails`.`rails_pk` = `cells`.`ce_rails_fk`) and isnull(`rails`.`exist_end`)))) left join `libraries` on(((`libraries`.`libraries_pk` = `rails`.`ra_libraries_fk`) and isnull(`libraries`.`exist_end`)))) left join `library_properties` on(((`library_properties`.`lp_libraries_fk` = `libraries`.`libraries_pk`) and isnull(`library_properties`.`exist_end`)))) left join `library_complexes` on(((`library_complexes`.`library_complexes_pk` = `libraries`.`li_library_complexes_fk`) and isnull(`library_complexes`.`exist_end`)))) left join `annotations_entities` on(((`annotations_entities`.`entity_type` = 5) and (`annotations_entities`.`ae_entity_fk` = `media`.`media_pk`) and (`annotations_entities`.`is_latest` = 1)))) left join `annotations` on((`annotations_entities`.`ae_annotations_fk` = `annotations`.`annotations_pk`))) where ((`media`.`exist_end` is not null) and isnull(`media_summaries`.`ejected_date`)) group by `media`.`media_pk` order by `media`.`volser` desc */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_media_health_detail`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_media_health_detail` AS select `media`.`media_pk` AS `media_pk`,`media`.`exist_start` AS `exist_start`,`media`.`exist_end` AS `media_exist_end`,`media`.`volser` AS `volser`,`exchanges`.`media_serial_number` AS `media_serial_number`,if((`lto_exchanges`.`media_manufacturer` is not null),`lto_exchanges`.`media_manufacturer`,`media`.`manufacturer`) AS `manufacturer`,`media`.`long_type` AS `media_long_type`,`media`.`type` AS `media_type`,coalesce(`media_analytics`.`health_enum`,'UNKNOWN') AS `media_health`,`exchanges`.`exchange_start` AS `exchange_start`,`media_analytics`.`exchg_elapsed_time` AS `exchg_elapsed_time`,`media_analytics`.`exchg_mount_time` AS `exchg_mount_time`,`exchanges`.`is_volsafe_cartridge` AS `is_volsafe_cartridge`,`exchanges`.`exchanges_pk` AS `exchanges_pk`,`ent_exchanges`.`encryption_status` AS `encryption_status`,`exchanges`.`recording_technique` AS `recording_technique`,`exchanges`.`mb_media_capacity` AS `mb_media_capacity`,`exchanges`.`lifetime_meters` AS `lifetime_meters`,`media_analytics`.`exchg_err_status_enum` AS `exchg_err_status`,`ent_exchanges`.`fsc` AS `fsc`,`ent_exchanges`.`media_mb_available_post` AS `media_mb_available_post`,`exchanges`.`does_drive_need_cleaning` AS `does_drive_need_cleaning`,`media_analytics`.`inefficient` AS `inefficient`,`media_analytics`.`marginal` AS `is_marginal`,`ent_exchanges`.`write_efficiency_metric` AS `write_efficiency_metric`,`ent_exchanges`.`read_margin` AS `read_margin`,`drive_analytics`.`mount_io_throughput` AS `mount_io_throughput`,`media_analytics`.`warranty_enum` AS `warranty_enum`,`ent_exchanges`.`was_media_loadlimit_reported` AS `was_media_loadlimit_reported`,`media_analytics`.`suspicion_level` AS `media_suspicion_level`,`ent_exchanges`.`media_percent_eol` AS `media_percent_eol`,`ent_exchanges`.`media_percent_eow` AS `media_percent_eow`,`lto_exchanges`.`ta_nearing_media_life` AS `ta_nearing_media_life`,`lto_exchanges`.`ibm_media_efficiency` AS `ibm_media_efficiency`,`lto_exchanges`.`hp_media_status` AS `hp_media_status`,`lto_exchanges`.`media_length` AS `media_length`,`lto_exchanges`.`media_mfg_date` AS `media_mfg_date`,`lto_exchanges`.`media_mam_capacity` AS `media_mam_capacity`,`lto_exchanges`.`ta_directory_corrupt` AS `ta_directory_corrupt`,`lto_exchanges`.`media_mb_available_pre` AS `media_mb_available_pre`,`exchanges`.`ta_cm_failure` AS `ta_cm_failure`,`media`.`is_cleaning` AS `is_cleaning_media`,(`media`.`is_cleaning` * 50) AS `max_cleaning_uses`,`media_analytics`.`cur_clean_uses` AS `current_cleaning_uses`,`exchanges`.`ta_expired_cleaning_tape` AS `cleaning_media_expired`,`drive_properties`.`fc_node_wwn` AS `fc_node_wwn`,`drive_properties`.`id` AS `drive_id`,`drives`.`drives_pk` AS `drives_pk`,`drives`.`exist_start` AS `drive_exist_start`,`drives`.`exist_end` AS `drive_exist_end`,`drives`.`serial_number` AS `drive_serial_number`,`drives`.`type` AS `drive_type`,`drives`.`model` AS `drive_model`,`drives`.`vendor` AS `drive_vendor`,coalesce(`drive_analytics`.`health_enum`,'UNKNOWN') AS `drive_health`,coalesce(`media_analytics`.`life_enum`,'UNKNOWN') AS `life_enum`,`media_analytics`.`compression_ratio` AS `compression_ratio`,`ent_exchanges`.`time_spent_reading` AS `time_spent_reading`,`ent_exchanges`.`time_spent_writing` AS `time_spent_writing`,`media_analytics`.`time_spent_rw` AS `time_spent_rw`,`media_analytics`.`read_throughput` AS `read_throughput`,`media_analytics`.`write_throughput` AS `write_throughput`,`media_analytics`.`io_throughput` AS `io_throughput`,`media_analytics`.`read_ratio` AS `read_ratio`,`media_analytics`.`write_ratio` AS `write_ratio`,`media_analytics`.`io_ratio` AS `io_ratio`,`agg_media_summaries`.`dismounts` AS `media_dismounts_30days`,`agg_media_summaries`.`errors` AS `media_errors_30days`,`agg_media_summaries`.`mb_read` AS `media_mb_read_30days`,`agg_media_summaries`.`mb_written` AS `media_mb_written_30days`,`agg_media_summaries`.`mb_rw` AS `media_mb_rw_30days`,`agg_media_summaries`.`mb_sent` AS `media_mb_sent_30days`,`agg_media_summaries`.`mb_received` AS `media_mb_received_30days`,`agg_media_summaries`.`mount_read_throughput` AS `mount_read_throughput_30days`,`agg_media_summaries`.`mount_write_throughput` AS `mount_write_throughput_30days`,`agg_media_summaries`.`mount_io_throughput` AS `mount_io_throughput_30days`,`library_complexes`.`library_complexes_pk` AS `library_complexes_pk`,coalesce(`library_complexes`.`name`,'REMOVED') AS `lib_complex_name`,`libraries`.`libraries_pk` AS `libraries_pk`,coalesce(`libraries`.`model`,'REMOVED') AS `library_model`,`library_properties`.`name` AS `library_name`,`libraries`.`serial_number` AS `library_serial_number`,coalesce(`partitions`.`type_enum`,'REMOVED') AS `partition_type_enum`,coalesce(`partitions`.`name`,'REMOVED') AS `partition_name`,`partitions`.`number` AS `partition_number`,coalesce(`cells`.`physical_library_number`,-(1)) AS `physical_library_number`,`cells`.`physical_rail_number` AS `physical_rail_number`,coalesce(`cells`.`physical_address_display`,'REMOVED') AS `physical_address`,coalesce(`cells`.`hli_address`,'REMOVED') AS `hli_address`,`cells`.`scsi_element_id` AS `scsi_element_id`,`annotations`.`annotation_text` AS `annotation`,`v_logical_groups_media_membership`.`logical_group_names` AS `logical_group_names`,unix_timestamp(`media`.`exist_start`) AS `exist_start_dayts`,unix_timestamp(`media`.`exist_end`) AS `media_exist_end_dayts`,unix_timestamp(`exchanges`.`exchange_start`) AS `exchange_start_dayts`,unix_timestamp(`lto_exchanges`.`media_mfg_date`) AS `media_mfg_date_dayts` from ((((((((((((((((((`media` join `v_logical_groups_media_membership` on((`v_logical_groups_media_membership`.`media_pk` = `media`.`media_pk`))) left join `media_analytics` on(((`media`.`media_pk` = `media_analytics`.`ma_media_fk`) and isnull(`media_analytics`.`ma_exchgs_nxt_fk`)))) left join `drives` on((`media_analytics`.`ma_drives_fk` = `drives`.`drives_pk`))) left join `drive_analytics` on((`drive_analytics`.`da_exchanges_fk` = `media_analytics`.`ma_exchanges_fk`))) left join `agg_media_summaries` on(((`media`.`media_pk` = `agg_media_summaries`.`media_fk`) and (`agg_media_summaries`.`agg_type` = 6)))) left join `exchanges` on(((`exchanges`.`exchanges_pk` = `media_analytics`.`ma_exchanges_fk`) and (`exchanges`.`exchanges_pk` = `drive_analytics`.`da_exchanges_fk`) and (`exchanges`.`alert_sent` = 1)))) left join `drive_properties` on(((`drive_properties`.`is_latest` = 1) and (`exchanges`.`ex_drive_properties_fk` = `drive_properties`.`drive_properties_pk`)))) left join `ent_exchanges` on((`exchanges`.`exchanges_pk` = `ent_exchanges`.`ee_exchanges_fk`))) left join `lto_exchanges` on((`exchanges`.`exchanges_pk` = `lto_exchanges`.`lt_exchanges_fk`))) left join `cells_media` on((isnull(`cells_media`.`exist_end`) and (`cells_media`.`is_latest` = 1) and (`media`.`media_pk` = `cells_media`.`cm_media_fk`)))) left join `cells` on((isnull(`cells`.`exist_end`) and (`cells_media`.`cm_cells_fk` = `cells`.`cells_pk`)))) left join `partitions` on((isnull(`partitions`.`exist_end`) and (`cells`.`ce_partitions_fk` = `partitions`.`partitions_pk`)))) left join `rails` on((isnull(`rails`.`exist_end`) and (`cells`.`ce_rails_fk` = `rails`.`rails_pk`)))) left join `libraries` on((isnull(`libraries`.`exist_end`) and (`rails`.`ra_libraries_fk` = `libraries`.`libraries_pk`)))) left join `library_properties` on((isnull(`library_properties`.`exist_end`) and (`library_properties`.`lp_libraries_fk` = `libraries`.`libraries_pk`)))) left join `library_complexes` on((isnull(`library_complexes`.`exist_end`) and (`libraries`.`li_library_complexes_fk` = `library_complexes`.`library_complexes_pk`)))) left join `annotations_entities` on(((`annotations_entities`.`entity_type` = 5) and (`annotations_entities`.`ae_entity_fk` = `media`.`media_pk`) and (`annotations_entities`.`is_latest` = 1)))) left join `annotations` on((`annotations_entities`.`ae_annotations_fk` = `annotations`.`annotations_pk`))) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_media_hourly_averages`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_media_hourly_averages` AS select cast(`media_analytics`.`created` as date) AS `summary_date`,hour(`media_analytics`.`created`) AS `summary_hour`,count(`media_analytics`.`media_analytics_pk`) AS `count`,round(avg(nullif(`media_analytics`.`exchg_elapsed_time`,0)),4) AS `avg_exchg_elapsed_time`,round(avg(nullif(`media_analytics`.`exchg_mount_time`,0)),4) AS `avg_exchg_mount_time`,round(avg(nullif(`media_analytics`.`mount_read_throughput`,0)),4) AS `avg_mount_read_throughput`,round(avg(nullif(`media_analytics`.`mount_write_throughput`,0)),4) AS `avg_mount_write_throughput`,round(avg(nullif(`media_analytics`.`mount_io_throughput`,0)),4) AS `avg_mount_io_throughput`,round(avg(nullif(`media_analytics`.`suspicion_level`,0)),4) AS `avg_suspicion_level`,round(avg(nullif(`media_analytics`.`write_ratio`,0)),4) AS `avg_write_ratio`,round(avg(nullif(`media_analytics`.`read_ratio`,0)),4) AS `avg_read_ratio`,round(avg(nullif(`media_analytics`.`io_ratio`,0)),4) AS `avg_io_ratio`,round(avg(nullif(`media_analytics`.`time_spent_rw`,0)),4) AS `avg_time_spent_rw`,round(avg(nullif(`media_analytics`.`compression_ratio`,0)),4) AS `avg_compression_ratio`,round(avg(nullif(`media_analytics`.`read_throughput`,0)),4) AS `avg_read_throughput`,round(avg(nullif(`media_analytics`.`write_throughput`,0)),4) AS `avg_write_throughput`,round(avg(nullif(`media_analytics`.`io_throughput`,0)),4) AS `avg_io_throughput` from (((((((`media_analytics` join `media` on((`media`.`media_pk` = `media_analytics`.`ma_media_fk`))) join `exchanges` on((`exchanges`.`exchanges_pk` = `media_analytics`.`ma_exchanges_fk`))) join `libraries` on((`libraries`.`libraries_pk` = `exchanges`.`ex_libraries_fk`))) join `library_properties` on((`library_properties`.`library_properties_pk` = `exchanges`.`ex_library_properties_fk`))) join `library_complexes` on((`libraries`.`li_library_complexes_fk` = `library_complexes`.`library_complexes_pk`))) left join `logical_groups_entities` on(((`logical_groups_entities`.`lge_entity_fk` = `media`.`media_pk`) and (`logical_groups_entities`.`entity_type` = 'media')))) left join `logical_groups` on((`logical_groups_entities`.`lge_logical_groups_fk` = `logical_groups`.`logical_groups_pk`))) where (1 = 1) group by cast(`media_analytics`.`created` as date),hour(`media_analytics`.`created`) order by cast(`media_analytics`.`created` as date) desc,hour(`media_analytics`.`created`) desc limit 48 */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_media_locations`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_media_locations` AS select `media`.`media_pk` AS `media_pk`,`media`.`volser` AS `volser`,`media`.`type` AS `media_type`,`library_complexes`.`library_complexes_pk` AS `library_complexes_pk`,`libraries`.`libraries_pk` AS `libraries_pk`,`cells`.`physical_address_display` AS `physical_address` from (((((`media` join `cells_media` on(((`cells_media`.`cm_media_fk` = `media`.`media_pk`) and (`cells_media`.`is_latest` = 1)))) join `cells` on((isnull(`cells`.`exist_end`) and (`cells`.`cells_pk` = `cells_media`.`cm_cells_fk`)))) join `rails` on((isnull(`rails`.`exist_end`) and (`rails`.`rails_pk` = `cells`.`ce_rails_fk`)))) join `libraries` on((isnull(`libraries`.`exist_end`) and (`libraries`.`libraries_pk` = `rails`.`ra_libraries_fk`)))) join `library_complexes` on((isnull(`library_complexes`.`exist_end`) and (`library_complexes`.`library_complexes_pk` = `libraries`.`li_library_complexes_fk`)))) where isnull(`media`.`exist_end`) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_monitored_entity_counts`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_monitored_entity_counts` AS select 'library' AS `entity_type`,`libraries`.`libraries_pk` AS `entity_pk`,`library_properties`.`name` AS `library_name`,`libraries`.`serial_number` AS `library_serial_number`,`libraries`.`model` AS `library_model`,`library_complexes`.`name` AS `lib_complex_name`,`libraries`.`exist_start` AS `exist_start`,`libraries`.`exist_end` AS `exist_end`,NULL AS `logical_groups_names` from ((`libraries` join `library_properties` on((isnull(`library_properties`.`exist_end`) and (`library_properties`.`lp_libraries_fk` = `libraries`.`libraries_pk`)))) join `library_complexes` on((isnull(`library_complexes`.`exist_end`) and (`library_complexes`.`library_complexes_pk` = `libraries`.`li_library_complexes_fk`)))) union select 'robot' AS `entity_type`,`robots`.`robots_pk` AS `entity_pk`,`library_properties`.`name` AS `library_name`,`libraries`.`serial_number` AS `library_serial_number`,`libraries`.`model` AS `library_model`,`library_complexes`.`name` AS `lib_complex_name`,`robots`.`exist_start` AS `exist_start`,`robots`.`exist_end` AS `exist_end`,NULL AS `logical_groups_names` from ((((((`robots` join `transient_cells_robots` on((isnull(`transient_cells_robots`.`exist_end`) and (`robots`.`robots_pk` = `transient_cells_robots`.`tcr_robots_fk`)))) join `transient_cells` on((isnull(`transient_cells`.`exist_end`) and (`transient_cells_robots`.`tcr_trans_cells_fk` = `transient_cells`.`transient_cells_pk`)))) join `rails` on((isnull(`rails`.`exist_end`) and (`transient_cells`.`tc_rails_fk` = `rails`.`rails_pk`)))) join `libraries` on((isnull(`libraries`.`exist_end`) and (`rails`.`ra_libraries_fk` = `libraries`.`libraries_pk`)))) join `library_properties` on((isnull(`library_properties`.`exist_end`) and (`library_properties`.`lp_libraries_fk` = `libraries`.`libraries_pk`)))) join `library_complexes` on((isnull(`library_complexes`.`exist_end`) and (`libraries`.`li_library_complexes_fk` = `library_complexes`.`library_complexes_pk`)))) union select 'cap' AS `entity_type`,`snmp_caps`.`snmp_caps_pk` AS `entity_pk`,`library_properties`.`name` AS `library_name`,`libraries`.`serial_number` AS `library_serial_number`,`libraries`.`model` AS `library_model`,`library_complexes`.`name` AS `lib_complex_name`,`snmp_caps`.`created` AS `exist_start`,NULL AS `exist_end`,NULL AS `logical_groups_names` from ((((((`snmp_caps` join `snmp_libraries` on((`snmp_caps`.`sc_snmp_libraries_fk` = `snmp_libraries`.`SNMP_LIBRARIES_PK`))) join `snmp_mib_walk` on((`snmp_libraries`.`snmp_mib_walk_fk` = `snmp_mib_walk`.`snmp_mib_walk_pk`))) join `snmp_lib_connects` on((`snmp_mib_walk`.`snmp_lib_connects_fk` = `snmp_lib_connects`.`snmp_lib_connects_pk`))) join `libraries` on((`snmp_lib_connects`.`snmp_lib_connects_pk` = `libraries`.`snmp_lib_connects_fk`))) left join `library_properties` on((isnull(`library_properties`.`exist_end`) and (`library_properties`.`lp_libraries_fk` = `libraries`.`libraries_pk`)))) left join `library_complexes` on((isnull(`library_complexes`.`exist_end`) and (`libraries`.`li_library_complexes_fk` = `library_complexes`.`library_complexes_pk`)))) group by `library_properties`.`name`,`snmp_caps`.`cap_physical_address_str` union select 'ptp' AS `entity_type`,`snmp_ptps`.`ptp_serial_num` AS `entity_pk`,`library_properties`.`name` AS `library_name`,`libraries`.`serial_number` AS `library_serial_number`,`libraries`.`model` AS `library_model`,`library_complexes`.`name` AS `lib_complex_name`,`snmp_ptps`.`created` AS `exist_start`,NULL AS `exist_end`,NULL AS `logical_groups_names` from ((((((`snmp_ptps` join `snmp_libraries` on((`snmp_ptps`.`sp_snmp_libraries_fk` = `snmp_libraries`.`SNMP_LIBRARIES_PK`))) join `snmp_mib_walk` on((`snmp_libraries`.`snmp_mib_walk_fk` = `snmp_mib_walk`.`snmp_mib_walk_pk`))) join `snmp_lib_connects` on((`snmp_mib_walk`.`snmp_lib_connects_fk` = `snmp_lib_connects`.`snmp_lib_connects_pk`))) join `libraries` on((`snmp_lib_connects`.`snmp_lib_connects_pk` = `libraries`.`snmp_lib_connects_fk`))) left join `library_properties` on((isnull(`library_properties`.`exist_end`) and (`library_properties`.`lp_libraries_fk` = `libraries`.`libraries_pk`)))) left join `library_complexes` on((isnull(`library_complexes`.`exist_end`) and (`libraries`.`li_library_complexes_fk` = `library_complexes`.`library_complexes_pk`)))) group by `snmp_ptps`.`ptp_serial_num` union select 'drive' AS `entity_type`,`drives`.`drives_pk` AS `entity_pk`,`library_properties`.`name` AS `library_name`,`libraries`.`serial_number` AS `library_serial_number`,`libraries`.`model` AS `library_model`,`library_complexes`.`name` AS `lib_complex_name`,`drives`.`exist_start` AS `exist_start`,`drives`.`exist_end` AS `exist_end`,`v_logical_groups_drives_membership`.`logical_group_names` AS `logical_group_names` from ((((((((`drives` join `v_logical_groups_drives_membership` on((`v_logical_groups_drives_membership`.`drives_pk` = `drives`.`drives_pk`))) left join `cells_drives` on((isnull(`cells_drives`.`exist_end`) and (`cells_drives`.`cd_drives_fk` = `drives`.`drives_pk`)))) left join `cells` on((isnull(`cells`.`exist_end`) and (`cells`.`cells_pk` = `cells_drives`.`cd_cells_fk`)))) left join `rails` on((isnull(`rails`.`exist_end`) and (`rails`.`rails_pk` = `cells`.`ce_rails_fk`)))) left join `libraries` on((isnull(`libraries`.`exist_end`) and (`libraries`.`libraries_pk` = `rails`.`ra_libraries_fk`)))) left join `partitions` on((isnull(`partitions`.`exist_end`) and (`partitions`.`partitions_pk` = `cells`.`ce_partitions_fk`)))) left join `library_properties` on((isnull(`library_properties`.`exist_end`) and (`library_properties`.`lp_libraries_fk` = `libraries`.`libraries_pk`)))) left join `library_complexes` on((isnull(`library_complexes`.`exist_end`) and (`library_complexes`.`library_complexes_pk` = `libraries`.`li_library_complexes_fk`)))) union select 'media' AS `entity_type`,`media`.`media_pk` AS `entity_pk`,`library_properties`.`name` AS `library_name`,`libraries`.`serial_number` AS `library_serial_number`,`libraries`.`model` AS `library_model`,`library_complexes`.`name` AS `lib_complex_name`,`media`.`exist_start` AS `exist_start`,`media`.`exist_end` AS `exist_end`,`v_logical_groups_media_membership`.`logical_group_names` AS `logical_group_names` from ((((((((`media` join `v_logical_groups_media_membership` on((`v_logical_groups_media_membership`.`media_pk` = `media`.`media_pk`))) left join `cells_media` on((isnull(`cells_media`.`exist_end`) and (`media`.`media_pk` = `cells_media`.`cm_media_fk`) and (`cells_media`.`is_latest` = 1)))) left join `cells` on((isnull(`cells`.`exist_end`) and (`cells_media`.`cm_cells_fk` = `cells`.`cells_pk`)))) left join `partitions` on((isnull(`partitions`.`exist_end`) and (`cells`.`ce_partitions_fk` = `partitions`.`partitions_pk`)))) left join `rails` on((isnull(`rails`.`exist_end`) and (`cells`.`ce_rails_fk` = `rails`.`rails_pk`)))) left join `libraries` on((isnull(`libraries`.`exist_end`) and (`rails`.`ra_libraries_fk` = `libraries`.`libraries_pk`)))) left join `library_properties` on((isnull(`library_properties`.`exist_end`) and (`library_properties`.`lp_libraries_fk` = `libraries`.`libraries_pk`)))) left join `library_complexes` on((isnull(`library_complexes`.`exist_end`) and (`libraries`.`li_library_complexes_fk` = `library_complexes`.`library_complexes_pk`)))) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_ptp_locations`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_ptp_locations` AS select `ptps`.`ptps_pk` AS `ptps_pk`,`ptps`.`serial_number` AS `serial_number`,`transient_cells`.`physical_address` AS `physical_address`,`library_complexes`.`library_complexes_pk` AS `library_complexes_pk`,`libraries`.`libraries_pk` AS `libraries_pk` from (((((`ptps` join `transient_cells_ptps` on((isnull(`transient_cells_ptps`.`exist_end`) and (`transient_cells_ptps`.`tcp_ptps_fk` = `ptps`.`ptps_pk`)))) join `transient_cells` on((isnull(`transient_cells`.`exist_end`) and (`transient_cells_ptps`.`tcp_trans_cells_fk` = `transient_cells`.`transient_cells_pk`)))) join `rails` on((isnull(`rails`.`exist_end`) and (`rails`.`rails_pk` = `transient_cells`.`tc_rails_fk`)))) join `libraries` on((isnull(`libraries`.`exist_end`) and (`rails`.`ra_libraries_fk` = `libraries`.`libraries_pk`)))) join `library_complexes` on((isnull(`library_complexes`.`exist_end`) and (`library_complexes`.`library_complexes_pk` = `libraries`.`li_library_complexes_fk`)))) where isnull(`ptps`.`exist_end`) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_ptps`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_ptps` AS select `ptps`.`ptps_pk` AS `ptps_pk`,`ptps`.`serial_number` AS `serial_number`,`ptps`.`exist_start` AS `exist_start`,`ptps`.`exist_end` AS `exist_end`,`ptp_stats`.`state` AS `state`,coalesce(`ptp_stats`.`led_state_enum`,'UNKNOWN') AS `led_state_enum`,coalesce(`ptp_stats`.`op_status_enum`,'UNKNOWN') AS `op_status_enum`,`agg_ptp_summaries`.`num_snmp_traps` AS `num_snmp_traps_30days`,coalesce(`agg_ptp_summaries`.`lib_ptp_health_enum`,'UNKNOWN') AS `lib_ptp_health_enum_30days`,`library_complexes`.`library_complexes_pk` AS `library_complexes_pk`,coalesce(`library_complexes`.`name`,'REMOVED') AS `lib_complex_name`,`libraries`.`libraries_pk` AS `libraries_pk`,coalesce(`libraries`.`model`,'REMOVED') AS `library_model`,`transient_cells`.`physical_address` AS `physical_address`,`library_properties`.`name` AS `library_name`,`libraries`.`serial_number` AS `library_serial_number`,`annotations`.`annotation_text` AS `annotation`,unix_timestamp(`ptps`.`exist_start`) AS `ptp_exist_start_dayts`,unix_timestamp(`ptps`.`exist_end`) AS `ptp_exist_end_dayts` from ((((((((((`ptps` join `ptp_stats` on((`ptps`.`ptps_pk` = `ptp_stats`.`ps_ptps_fk`))) join `transient_cells_ptps` on(((`ptps`.`ptps_pk` = `transient_cells_ptps`.`tcp_ptps_fk`) and isnull(`transient_cells_ptps`.`exist_end`)))) join `transient_cells` on(((`transient_cells_ptps`.`tcp_trans_cells_fk` = `transient_cells`.`transient_cells_pk`) and isnull(`transient_cells`.`exist_end`)))) join `rails` on(((`transient_cells`.`tc_rails_fk` = `rails`.`rails_pk`) and isnull(`rails`.`exist_end`)))) join `libraries` on(((`rails`.`ra_libraries_fk` = `libraries`.`libraries_pk`) and isnull(`libraries`.`exist_end`)))) join `library_properties` on(((`library_properties`.`lp_libraries_fk` = `libraries`.`libraries_pk`) and isnull(`library_properties`.`exist_end`)))) join `library_complexes` on(((`libraries`.`li_library_complexes_fk` = `library_complexes`.`library_complexes_pk`) and isnull(`library_complexes`.`exist_end`)))) left join `agg_ptp_summaries` on(((`ptps`.`ptps_pk` = `agg_ptp_summaries`.`ptps_fk`) and (`agg_ptp_summaries`.`agg_type` = 6)))) left join `annotations_entities` on(((`annotations_entities`.`entity_type` = 9) and (`annotations_entities`.`ae_entity_fk` = `ptps`.`ptps_pk`)))) left join `annotations` on((`annotations_entities`.`ae_annotations_fk` = `annotations`.`annotations_pk`))) where isnull(`ptps`.`exist_end`) group by `ptps`.`ptps_pk` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_robot_locations`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_robot_locations` AS select `robots`.`robots_pk` AS `robots_pk`,`robots`.`serial_number` AS `serial_number`,`transient_cells`.`physical_address` AS `physical_address`,`library_complexes`.`library_complexes_pk` AS `library_complexes_pk`,`libraries`.`libraries_pk` AS `libraries_pk` from (((((`robots` join `transient_cells_robots` on((isnull(`transient_cells_robots`.`exist_end`) and (`transient_cells_robots`.`tcr_robots_fk` = `robots`.`robots_pk`)))) join `transient_cells` on((isnull(`transient_cells`.`exist_end`) and (`transient_cells_robots`.`tcr_trans_cells_fk` = `transient_cells`.`transient_cells_pk`)))) join `rails` on((isnull(`rails`.`exist_end`) and (`rails`.`rails_pk` = `transient_cells`.`tc_rails_fk`)))) join `libraries` on((isnull(`libraries`.`exist_end`) and (`rails`.`ra_libraries_fk` = `libraries`.`libraries_pk`)))) join `library_complexes` on((isnull(`library_complexes`.`exist_end`) and (`library_complexes`.`library_complexes_pk` = `libraries`.`li_library_complexes_fk`)))) where isnull(`robots`.`exist_end`) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!50001 DROP TABLE IF EXISTS `v_robots`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`stadba`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v_robots` AS select `robots`.`robots_pk` AS `robots_pk`,`robots`.`serial_number` AS `serial_number`,`robots`.`exist_start` AS `exist_start`,`robots`.`exist_end` AS `exist_end`,coalesce(`robot_analytics`.`robot_health_enum`,'UNKNOWN') AS `robot_health_enum`,`robot_analytics`.`robot_health_reason_text` AS `robot_health_reason_text`,`robot_stats`.`state` AS `state`,coalesce(`robot_stats`.`hand_status_enum`,'UNKNOWN') AS `hand_status_enum`,coalesce(`robot_stats`.`led_state_enum`,'UNKNOWN') AS `led_state_enum`,coalesce(`robot_stats`.`op_status_enum`,'UNKNOWN') AS `op_status_enum`,`agg_robot_summaries`.`num_robot_put_fails` AS `num_robot_put_fails_30days`,`agg_robot_summaries`.`num_robot_get_fails` AS `num_robot_get_fails_30days`,`agg_robot_summaries`.`num_robot_put_retries` AS `num_robot_put_retries_30days`,`agg_robot_summaries`.`num_robot_get_retries` AS `num_robot_get_retries_30days`,`agg_robot_summaries`.`num_robot_put_totals` AS `num_robot_put_totals_30days`,`agg_robot_summaries`.`num_robot_get_totals` AS `num_robot_get_totals_30days`,`agg_robot_summaries`.`num_snmp_traps` AS `num_snmp_traps_30days`,coalesce(`agg_robot_summaries`.`lib_robot_health_enum`,'UNKNOWN') AS `lib_robot_health_enum_30days`,`library_complexes`.`library_complexes_pk` AS `library_complexes_pk`,coalesce(`library_complexes`.`name`,'REMOVED') AS `lib_complex_name`,`libraries`.`libraries_pk` AS `libraries_pk`,coalesce(`libraries`.`model`,'REMOVED') AS `library_model`,`transient_cells`.`physical_address` AS `physical_address`,`library_properties`.`name` AS `library_name`,`libraries`.`serial_number` AS `library_serial_number`,`annotations`.`annotation_text` AS `annotation`,unix_timestamp(`robots`.`exist_start`) AS `robot_exist_start_dayts`,unix_timestamp(`robots`.`exist_end`) AS `robot_exist_end_dayts` from ((((((((((((`robots` join `robot_properties` on(((`robots`.`robots_pk` = `robot_properties`.`rp_robots_fk`) and (`robot_properties`.`is_latest` = 1)))) join `robot_stats` on((`robots`.`robots_pk` = `robot_stats`.`rs_robots_fk`))) join `transient_cells_robots` on(((`robots`.`robots_pk` = `transient_cells_robots`.`tcr_robots_fk`) and isnull(`transient_cells_robots`.`exist_end`)))) join `transient_cells` on(((`transient_cells_robots`.`tcr_trans_cells_fk` = `transient_cells`.`transient_cells_pk`) and isnull(`transient_cells`.`exist_end`)))) join `rails` on(((`transient_cells`.`tc_rails_fk` = `rails`.`rails_pk`) and isnull(`rails`.`exist_end`)))) join `libraries` on(((`rails`.`ra_libraries_fk` = `libraries`.`libraries_pk`) and isnull(`libraries`.`exist_end`)))) join `library_properties` on(((`library_properties`.`lp_libraries_fk` = `libraries`.`libraries_pk`) and isnull(`library_properties`.`exist_end`)))) join `library_complexes` on(((`libraries`.`li_library_complexes_fk` = `library_complexes`.`library_complexes_pk`) and isnull(`library_complexes`.`exist_end`)))) left join `robot_analytics` on(((`robot_analytics`.`is_latest` = 1) and (`robots`.`robots_pk` = `robot_analytics`.`robots_fk`)))) left join `agg_robot_summaries` on(((`robots`.`robots_pk` = `agg_robot_summaries`.`robots_fk`) and (`agg_robot_summaries`.`agg_type` = 6)))) left join `annotations_entities` on(((`annotations_entities`.`entity_type` = 7) and (`annotations_entities`.`ae_entity_fk` = `robots`.`robots_pk`)))) left join `annotations` on((`annotations_entities`.`ae_annotations_fk` = `annotations`.`annotations_pk`))) where isnull(`robots`.`exist_end`) group by `robots`.`robots_pk` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; USE `test`;