DROP TABLE AirWatchAPICertTest;
CREATE TABLE AirWatchAPICertTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
DAYS_TO_EXPIRE decimal(20,4) NOT NULL,
DAYS_TO_EXPIRE_ST varchar(32) NOT NULL
);
ALTER TABLE AirWatchAPICertTest ADD constraint PK_AirWatchAPICertTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
CREATE  INDEX IDX_AirWatchAPICertTest ON AirWatchAPICertTest
(
	 MSMT_TIME
);

DROP TABLE AirWatchAPICertTest_TREND;
CREATE TABLE AirWatchAPICertTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
DAYS_TO_EXPIRE_MIN decimal(20,4) NOT NULL,
DAYS_TO_EXPIRE_MAX decimal(20,4) NOT NULL,
DAYS_TO_EXPIRE_STCNT varchar(32) NOT NULL
);
ALTER TABLE AirWatchAPICertTest_TREND ADD constraint PK_AirWatchAPICertTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
CREATE INDEX IDX_TR_AirWatchAPICertTest on AirWatchAPICertTest_TREND(msmt_time,period);

DROP TABLE AirWatchAPICertTest_THRESH;
CREATE TABLE AirWatchAPICertTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
DAYS_TO_EXPIRE_MIN	VARCHAR(256)	 NOT NULL,
DAYS_TO_EXPIRE_MAX	VARCHAR(256)	 NOT NULL
);
ALTER TABLE AirWatchAPICertTest_THRESH ADD constraint PK_AirWatchAPICertTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_AirWatchAPICertTest_THRESH ON AirWatchAPICertTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_AirWatchAPICertTest on AirWatchAPICertTest_THRESH(msmt_time_start);


DROP TABLE CloudLoginTest_REPORT_INSIDE;
CREATE TABLE CloudLoginTest_REPORT_INSIDE ( 
SESSION_KEY VARCHAR(128), 
TRGT_HOST VARCHAR(32),  
PORT_NO VARCHAR(32),  
MSMT_TIME DATETIME NOT NULL,
USERNAME VARCHAR(128) NOT NULL,
GUESTNAME VARCHAR(128) NOT NULL,
LOGIN_TIME DATETIME NOT NULL,
DURATION DECIMAL (20,4) NOT NULL,
ACTIVE_TIME DECIMAL (20,4) NOT NULL,
IDLE_TIME DECIMAL (20,4) NOT NULL,
CLIENT_IP_ADDRESS VARCHAR(128),
CLIENT_NAME VARCHAR(128),
CLIENT_ID VARCHAR(128),
CLIENT_CATEGORY VARCHAR(128),
CTX_STATE VARCHAR(128),
HDX_DISPLAY_MODE VARCHAR(128),
HDX_ACTIVE_ENCODER VARCHAR(128),
HDX_PROTOCOL VARCHAR(128),
ENCRYPTION_LEVEL VARCHAR(128),
NETSCALER_RPTNAME VARCHAR(128),
NETSCALER_IP_ADDRESS VARCHAR(128),
XENAPP_IP_ADDRESS VARCHAR(128),
ENDPOINT_IP_ADDRESS VARCHAR(128),
COUNTRY_NAME VARCHAR(128),
COUNTRY_CODE VARCHAR(128),
REGION VARCHAR(128),
CITY VARCHAR(128),
LATITUDE VARCHAR(128),
LONGITUDE VARCHAR(128),
LOGON_DURATION DECIMAL (20,4) NOT NULL,
ACTUAL_LOGON_DURATION DECIMAL (20,4) NOT NULL,
CPU_UTIL DECIMAL (20,4) NOT NULL,
PHYSICAL_MEM_UTILZE DECIMAL (20,4) NOT NULL,
READ_RATE DECIMAL (20,4) NOT NULL,
WRITE_RATE DECIMAL (20,4) NOT NULL,
SESSION_AVG_LATENCY DECIMAL (20,4) NOT NULL,
ICA_NWLATENCY DECIMAL (20,4) NOT NULL,
INPUT_SESSION_BANDWIDTH DECIMAL (20,4) NOT NULL,
OUTPUT_SESSION_BANDWIDTH DECIMAL (20,4) NOT NULL,
INPUT_SE_LINE_SPEED DECIMAL (20,4) NOT NULL,
OUTPUT_SE_LINE_SPEED DECIMAL (20,4) NOT NULL,
LAST_RECD_LATENCY DECIMAL (20,4) NOT NULL,
MAX_INPUT_DELAY DECIMAL (20,4) NOT NULL,
AVG_INPUT_DELAY DECIMAL (20,4) NOT NULL
);
CREATE INDEX IDX_CloudLoginTest_RPT_INSIDE ON CloudLoginTest_REPORT_INSIDE(MSMT_TIME); 

DROP TABLE EsxLoginTest_REPORT_INSIDE;
CREATE TABLE EsxLoginTest_REPORT_INSIDE ( 
SESSION_KEY VARCHAR(128), 
TRGT_HOST VARCHAR(32),  
PORT_NO VARCHAR(32),  
MSMT_TIME DATETIME NOT NULL,
USERNAME VARCHAR(128) NOT NULL,
GUESTNAME VARCHAR(128) NOT NULL,
LOGIN_TIME DATETIME NOT NULL,
DURATION DECIMAL (20,4) NOT NULL,
ACTIVE_TIME DECIMAL (20,4) NOT NULL,
IDLE_TIME DECIMAL (20,4) NOT NULL,
CLIENT_IP_ADDRESS VARCHAR(128),
CLIENT_NAME VARCHAR(128),
CLIENT_ID VARCHAR(128),
CLIENT_CATEGORY VARCHAR(128),
CTX_STATE VARCHAR(128),
HDX_DISPLAY_MODE VARCHAR(128),
HDX_ACTIVE_ENCODER VARCHAR(128),
HDX_PROTOCOL VARCHAR(128),
ENCRYPTION_LEVEL VARCHAR(128),
NETSCALER_RPTNAME VARCHAR(128),
NETSCALER_IP_ADDRESS VARCHAR(128),
XENAPP_IP_ADDRESS VARCHAR(128),
ENDPOINT_IP_ADDRESS VARCHAR(128),
COUNTRY_NAME VARCHAR(128),
COUNTRY_CODE VARCHAR(128),
REGION VARCHAR(128),
CITY VARCHAR(128),
LATITUDE VARCHAR(128),
LONGITUDE VARCHAR(128),
LOGON_DURATION DECIMAL (20,4) NOT NULL,
ACTUAL_LOGON_DURATION DECIMAL (20,4) NOT NULL,
CPU_UTIL DECIMAL (20,4) NOT NULL,
TOTAL_PHY_MEM DECIMAL (20,4) NOT NULL,
PHYSICAL_MEM_UTILZE DECIMAL (20,4) NOT NULL,
PERCENT_BUSY DECIMAL (20,4) NOT NULL,
PERCENT_DISK_READS DECIMAL (20,4) NOT NULL,
PERCENT_DISK_WRITES DECIMAL (20,4) NOT NULL,
INCOMING_TRAFFIC DECIMAL (20,4) NOT NULL,
OUTGOING_TRAFFIC DECIMAL (20,4) NOT NULL,
SESSION_AVG_LATENCY DECIMAL (20,4) NOT NULL,
LAST_RECD_LATENCY DECIMAL (20,4) NOT NULL,
ICA_NWLATENCY DECIMAL (20,4) NOT NULL,
INPUT_SESSION_BANDWIDTH DECIMAL (20,4) NOT NULL,
OUTPUT_SESSION_BANDWIDTH DECIMAL (20,4) NOT NULL,
BROWSER_COUNT DECIMAL (20,4) NOT NULL,
AVG_CPU_UTIL DECIMAL (20,4) NOT NULL,
MEM_USED DECIMAL (20,4) NOT NULL,
CLIENT_IPADDRESS VARCHAR(32) NOT NULL,
CLIENT_VERSION VARCHAR(32) NOT NULL,
USED_PHY_MEM DECIMAL (20,4) NOT NULL,
MAX_INPUT_DELAY DECIMAL (20,4) NOT NULL,
AVG_INPUT_DELAY  DECIMAL (20,4) NOT NULL,
INC_BANDWIDTH DECIMAL (20,4) NOT NULL,
OUT_BANDWIDTH DECIMAL (20,4) NOT NULL,
REC_PACKETS DECIMAL (20,4) NOT NULL,
TRANS_PACKETS DECIMAL (20,4) NOT NULL,
SESSN_JITTR DECIMAL (20,4) NOT NULL,
SESSN_PCKT_LOSS DECIMAL (20,4) NOT NULL,
BANDHWIDTH DECIMAL (20,4) NOT NULL,
SESSN_RCVD_BYTS DECIMAL (20,4) NOT NULL,
SESSN_TRNSMTD_BYTS DECIMAL (20,4) NOT NULL,
INPUT_SE_LINE_SPEED DECIMAL (20,4) NOT NULL,
OUTPUT_SE_LINE_SPEED DECIMAL (20,4) NOT NULL
);
CREATE INDEX IDX_EsxLoginTest_RPT_INSIDE ON EsxLoginTest_REPORT_INSIDE(MSMT_TIME);

DROP TABLE AMHCrySvcTest;
CREATE TABLE AMHCrySvcTest
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME			DATETIME NOT NULL,
	STATUS				DECIMAL(20,4) NOT NULL,
	STATUS_ST			VARCHAR(32) NOT NULL	
);

CREATE INDEX IDX_AMHCrySvcTest ON AMHCrySvcTest(MSMT_TIME);
ALTER TABLE AMHCrySvcTest ADD constraint PK_AMHCrySvcTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);

DROP TABLE AMHCrySvcTest_TREND;
CREATE TABLE AMHCrySvcTest_TREND
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME			DATETIME NOT NULL,
	PERIOD				VARCHAR(32) NOT NULL,
	STATUS_MIN			DECIMAL(20,4) NOT NULL,
	STATUS_MAX			DECIMAL(20,4) NOT NULL,
	STATUS_STCNT		VARCHAR(32) NOT NULL  
);
ALTER TABLE AMHCrySvcTest_TREND ADD constraint PK_AMHCrySvcTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);

DROP TABLE AMHCrySvcTest_THRESH;
CREATE TABLE AMHCrySvcTest_THRESH
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME_START		DATETIME NOT NULL,
	MSMT_TIME_END		DATETIME NOT NULL,
	STATUS_MIN			VARCHAR(256) NOT NULL,
	STATUS_MAX			VARCHAR(256) NOT NULL
); 
ALTER TABLE AMHCrySvcTest_THRESH ADD constraint PK_AMHCrySvcTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_AMHCrySvcTest_THRESH ON AMHCrySvcTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_AMHCrySvcTest ON AMHCrySvcTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_AMHCrySvcTest ON AMHCrySvcTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE AMHFileSvcTest;
CREATE TABLE AMHFileSvcTest
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME			DATETIME NOT NULL,
	STATUS				DECIMAL(20,4) NOT NULL,
	STATUS_ST			VARCHAR(32) NOT NULL	
);					  
CREATE INDEX IDX_AMHFileSvcTest ON AMHFileSvcTest(MSMT_TIME);
ALTER TABLE AMHFileSvcTest ADD constraint PK_AMHFileSvcTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);

DROP TABLE AMHFileSvcTest_TREND;
CREATE TABLE AMHFileSvcTest_TREND
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME			DATETIME NOT NULL,
	PERIOD				VARCHAR(32) NOT NULL,
	STATUS_MIN			DECIMAL(20,4) NOT NULL,
	STATUS_MAX			DECIMAL(20,4) NOT NULL,
	STATUS_STCNT		VARCHAR(32) NOT NULL  
);
ALTER TABLE AMHFileSvcTest_TREND ADD constraint PK_AMHFileSvcTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);

DROP TABLE AMHFileSvcTest_THRESH;
CREATE TABLE AMHFileSvcTest_THRESH
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME_START		DATETIME NOT NULL,
	MSMT_TIME_END		DATETIME NOT NULL,
	STATUS_MIN			VARCHAR(256) NOT NULL,
	STATUS_MAX			VARCHAR(256) NOT NULL
); 
ALTER TABLE AMHFileSvcTest_THRESH ADD constraint PK_AMHFileSvcTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_AMHFileSvcTest_THRESH ON AMHFileSvcTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_AMHFileSvcTest ON AMHFileSvcTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_AMHFileSvcTest ON AMHFileSvcTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE AMHInpChnsTest;
CREATE TABLE AMHInpChnsTest
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME			DATETIME NOT NULL,
	STATUS				DECIMAL(20,4) NOT NULL,
	STATUS_ST			VARCHAR(32) NOT NULL	
);
CREATE INDEX IDX_AMHInpChnsTest ON AMHInpChnsTest(MSMT_TIME);
ALTER TABLE AMHInpChnsTest ADD constraint PK_AMHInpChnsTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);

DROP TABLE AMHInpChnsTest_TREND;
CREATE TABLE AMHInpChnsTest_TREND
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME			DATETIME NOT NULL,
	PERIOD				VARCHAR(32) NOT NULL,
	STATUS_MIN			DECIMAL(20,4) NOT NULL,
	STATUS_MAX			DECIMAL(20,4) NOT NULL,
	STATUS_STCNT		VARCHAR(32) NOT NULL  
);
ALTER TABLE AMHInpChnsTest_TREND ADD constraint PK_AMHInpChnsTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);

DROP TABLE AMHInpChnsTest_THRESH;
CREATE TABLE AMHInpChnsTest_THRESH
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME_START		DATETIME NOT NULL,
	MSMT_TIME_END		DATETIME NOT NULL,
	STATUS_MIN			VARCHAR(256) NOT NULL,
	STATUS_MAX			VARCHAR(256) NOT NULL
); 
ALTER TABLE AMHInpChnsTest_THRESH ADD constraint PK_AMHInpChnsTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_AMHInpChnsTest_THRESH ON AMHInpChnsTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_AMHInpChnsTest ON AMHInpChnsTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_AMHInpChnsTest ON AMHInpChnsTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE AMHJMSConnTest;
CREATE TABLE AMHJMSConnTest
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME			DATETIME NOT NULL,
	TOTAL_CONNECTIONS		DECIMAL(20,4) NOT NULL,
	TOTAL_CONNECTIONS_ST		VARCHAR(32) NOT NULL,  
	ACTIVE_CONNECTIONS      		DECIMAL(20,4) NOT NULL,
	ACTIVE_CONNECTIONS_ST		VARCHAR(32) NOT NULL,  
	INACTIVE_CONNECTIONS			DECIMAL(20,4) NOT NULL,
	INACTIVE_CONNECTIONS_ST		VARCHAR(32) NOT NULL,
	TOTAL_TIMEDOUT			DECIMAL(20,4) NOT NULL,
	TOTAL_TIMEDOUT_ST		VARCHAR(32) NOT NULL,
	SESSIONS_PER_CONNECTION			DECIMAL(20,4) NOT NULL,
	SESSIONS_PER_CONNECTION_ST		VARCHAR(32) NOT NULL
	
);
CREATE INDEX IDX_AMHJMSConnTest ON AMHJMSConnTest(MSMT_TIME);
ALTER TABLE AMHJMSConnTest ADD constraint PK_AMHJMSConnTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);

DROP TABLE AMHJMSConnTest_TREND;
CREATE TABLE AMHJMSConnTest_TREND
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME			DATETIME NOT NULL,
	PERIOD				VARCHAR(32) NOT NULL,
	TOTAL_CONNECTIONS_MIN		DECIMAL(20,4) NOT NULL,
	TOTAL_CONNECTIONS_MAX		DECIMAL(20,4) NOT NULL,
	TOTAL_CONNECTIONS_STCNT		VARCHAR(32) NOT NULL,  
	ACTIVE_CONNECTIONS_MIN		DECIMAL(20,4) NOT NULL,
	ACTIVE_CONNECTIONS_MAX		DECIMAL(20,4) NOT NULL,
	ACTIVE_CONNECTIONS_STCNT		VARCHAR(32) NOT NULL,  
	INACTIVE_CONNECTIONS_MIN		DECIMAL(20,4) NOT NULL,
	INACTIVE_CONNECTIONS_MAX		DECIMAL(20,4) NOT NULL,
	INACTIVE_CONNECTIONS_STCNT	VARCHAR(32) NOT NULL,
	TOTAL_TIMEDOUT_MIN		DECIMAL(20,4) NOT NULL,
	TOTAL_TIMEDOUT_MAX		DECIMAL(20,4) NOT NULL,
	TOTAL_TIMEDOUT_STCNT	VARCHAR(32) NOT NULL,
	SESSIONS_PER_CONNECTION_MIN		DECIMAL(20,4) NOT NULL,
	SESSIONS_PER_CONNECTION_MAX		DECIMAL(20,4) NOT NULL,
	SESSIONS_PER_CONNECTION_STCNT	VARCHAR(32) NOT NULL
  
);
ALTER TABLE AMHJMSConnTest_TREND ADD constraint PK_AMHJMSConnTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);

DROP TABLE AMHJMSConnTest_THRESH;
CREATE TABLE AMHJMSConnTest_THRESH
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME_START			DATETIME NOT NULL,
	MSMT_TIME_END			DATETIME NOT NULL,
	TOTAL_CONNECTIONS_MIN		VARCHAR(256) NOT NULL,
	TOTAL_CONNECTIONS_MAX		VARCHAR(256) NOT NULL,
	ACTIVE_CONNECTIONS_MIN		VARCHAR(256) NOT NULL,
	ACTIVE_CONNECTIONS_MAX		VARCHAR(256) NOT NULL,
	INACTIVE_CONNECTIONS_MIN		VARCHAR(256) NOT NULL,
	INACTIVE_CONNECTIONS_MAX		VARCHAR(256) NOT NULL,
	TOTAL_TIMEDOUT_MIN		VARCHAR(256) NOT NULL,
	TOTAL_TIMEDOUT_MAX		VARCHAR(256) NOT NULL,
	SESSIONS_PER_CONNECTION_MIN		VARCHAR(256) NOT NULL,
	SESSIONS_PER_CONNECTION_MAX		VARCHAR(256) NOT NULL
); 
ALTER TABLE AMHJMSConnTest_THRESH ADD constraint PK_AMHJMSConnTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_AMHJMSConnTest_THRESH ON AMHJMSConnTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_AMHJMSConnTest ON AMHJMSConnTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_AMHJMSConnTest ON AMHJMSConnTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE AMHJMSQTest;
CREATE TABLE AMHJMSQTest
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME			DATETIME NOT NULL,
	STATUS				DECIMAL(20,4) NOT NULL,
	STATUS_ST			VARCHAR(32) NOT NULL	
);
CREATE INDEX IDX_AMHJMSQTest ON AMHJMSQTest(MSMT_TIME);
ALTER TABLE AMHJMSQTest ADD constraint PK_AMHJMSQTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);

DROP TABLE AMHJMSQTest_TREND;
CREATE TABLE AMHJMSQTest_TREND
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME			DATETIME NOT NULL,
	PERIOD				VARCHAR(32) NOT NULL,
	STATUS_MIN			DECIMAL(20,4) NOT NULL,
	STATUS_MAX			DECIMAL(20,4) NOT NULL,
	STATUS_STCNT		VARCHAR(32) NOT NULL  
);
ALTER TABLE AMHJMSQTest_TREND ADD constraint PK_AMHJMSQTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);

DROP TABLE AMHJMSQTest_THRESH;
CREATE TABLE AMHJMSQTest_THRESH
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME_START		DATETIME NOT NULL,
	MSMT_TIME_END		DATETIME NOT NULL,
	STATUS_MIN			VARCHAR(256) NOT NULL,
	STATUS_MAX			VARCHAR(256) NOT NULL
); 
ALTER TABLE AMHJMSQTest_THRESH ADD constraint PK_AMHJMSQTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_AMHJMSQTest_THRESH ON AMHJMSQTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_AMHJMSQTest ON AMHJMSQTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_AMHJMSQTest ON AMHJMSQTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE AMHJMSSvcTest;
CREATE TABLE AMHJMSSvcTest
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME			DATETIME NOT NULL,
	STATUS				DECIMAL(20,4) NOT NULL,
	STATUS_ST			VARCHAR(32) NOT NULL	
);					  
CREATE INDEX IDX_AMHJMSSvcTest ON AMHJMSSvcTest(MSMT_TIME);
ALTER TABLE AMHJMSSvcTest ADD constraint PK_AMHJMSSvcTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);

DROP TABLE AMHJMSSvcTest_TREND;
CREATE TABLE AMHJMSSvcTest_TREND
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME			DATETIME NOT NULL,
	PERIOD				VARCHAR(32) NOT NULL,
	STATUS_MIN			DECIMAL(20,4) NOT NULL,
	STATUS_MAX			DECIMAL(20,4) NOT NULL,
	STATUS_STCNT		VARCHAR(32) NOT NULL  
);
ALTER TABLE AMHJMSSvcTest_TREND ADD constraint PK_AMHJMSSvcTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);

DROP TABLE AMHJMSSvcTest_THRESH;
CREATE TABLE AMHJMSSvcTest_THRESH
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME_START		DATETIME NOT NULL,
	MSMT_TIME_END		DATETIME NOT NULL,
	STATUS_MIN			VARCHAR(256) NOT NULL,
	STATUS_MAX			VARCHAR(256) NOT NULL
); 
ALTER TABLE AMHJMSSvcTest_THRESH ADD constraint PK_AMHJMSSvcTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_AMHJMSSvcTest_THRESH ON AMHJMSSvcTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_AMHJMSSvcTest ON AMHJMSSvcTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_AMHJMSSvcTest ON AMHJMSSvcTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE AMHPQSvcTest;
CREATE TABLE AMHPQSvcTest
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME			DATETIME NOT NULL,
	STATUS				DECIMAL(20,4) NOT NULL,
	STATUS_ST			VARCHAR(32) NOT NULL	
);
CREATE INDEX IDX_AMHPQSvcTest ON AMHPQSvcTest(MSMT_TIME);
ALTER TABLE AMHPQSvcTest ADD constraint PK_AMHPQSvcTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);

DROP TABLE AMHPQSvcTest_TREND;
CREATE TABLE AMHPQSvcTest_TREND
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME			DATETIME NOT NULL,
	PERIOD				VARCHAR(32) NOT NULL,
	STATUS_MIN			DECIMAL(20,4) NOT NULL,
	STATUS_MAX			DECIMAL(20,4) NOT NULL,
	STATUS_STCNT		VARCHAR(32) NOT NULL  
);
ALTER TABLE AMHPQSvcTest_TREND ADD constraint PK_AMHPQSvcTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);

DROP TABLE AMHPQSvcTest_THRESH;
CREATE TABLE AMHPQSvcTest_THRESH
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME_START		DATETIME NOT NULL,
	MSMT_TIME_END		DATETIME NOT NULL,
	STATUS_MIN			VARCHAR(256) NOT NULL,
	STATUS_MAX			VARCHAR(256) NOT NULL
); 
ALTER TABLE AMHPQSvcTest_THRESH ADD constraint PK_AMHPQSvcTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_AMHPQSvcTest_THRESH ON AMHPQSvcTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_AMHPQSvcTest ON AMHPQSvcTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_AMHPQSvcTest ON AMHPQSvcTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE AMHSAGCltSvcTest;
CREATE TABLE AMHSAGCltSvcTest
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME			DATETIME NOT NULL,
	STATUS				DECIMAL(20,4) NOT NULL,
	STATUS_ST			VARCHAR(32) NOT NULL	
);					  
CREATE INDEX IDX_AMHSAGCltSvcTest ON AMHSAGCltSvcTest(MSMT_TIME);
ALTER TABLE AMHSAGCltSvcTest ADD constraint PK_AMHSAGCltSvcTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);

DROP TABLE AMHSAGCltSvcTest_TREND;
CREATE TABLE AMHSAGCltSvcTest_TREND
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME			DATETIME NOT NULL,
	PERIOD				VARCHAR(32) NOT NULL,
	STATUS_MIN			DECIMAL(20,4) NOT NULL,
	STATUS_MAX			DECIMAL(20,4) NOT NULL,
	STATUS_STCNT		VARCHAR(32) NOT NULL  
);
ALTER TABLE AMHSAGCltSvcTest_TREND ADD constraint PK_AMHSAGCltSvcTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);

DROP TABLE AMHSAGCltSvcTest_THRESH;
CREATE TABLE AMHSAGCltSvcTest_THRESH
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME_START		DATETIME NOT NULL,
	MSMT_TIME_END		DATETIME NOT NULL,
	STATUS_MIN			VARCHAR(256) NOT NULL,
	STATUS_MAX			VARCHAR(256) NOT NULL
); 
ALTER TABLE AMHSAGCltSvcTest_THRESH ADD constraint PK_AMHSAGCltSvcTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_AMHSAGCltSvcTest_THRESH ON AMHSAGCltSvcTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_AMHSAGCltSvcTest ON AMHSAGCltSvcTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_AMHSAGCltSvcTest ON AMHSAGCltSvcTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE AMHSealBlkTest;
CREATE TABLE AMHSealBlkTest
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME			DATETIME NOT NULL,
	STATUS				DECIMAL(20,4) NOT NULL,
	STATUS_ST			VARCHAR(32) NOT NULL	
);					  
CREATE INDEX IDX_AMHSealBlkTest ON AMHSealBlkTest(MSMT_TIME);
ALTER TABLE AMHSealBlkTest ADD constraint PK_AMHSealBlkTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);

DROP TABLE AMHSealBlkTest_TREND;
CREATE TABLE AMHSealBlkTest_TREND
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME			DATETIME NOT NULL,
	PERIOD				VARCHAR(32) NOT NULL,
	STATUS_MIN			DECIMAL(20,4) NOT NULL,
	STATUS_MAX			DECIMAL(20,4) NOT NULL,
	STATUS_STCNT		VARCHAR(32) NOT NULL  
);
ALTER TABLE AMHSealBlkTest_TREND ADD constraint PK_AMHSealBlkTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);

DROP TABLE AMHSealBlkTest_THRESH;
CREATE TABLE AMHSealBlkTest_THRESH
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME_START		DATETIME NOT NULL,
	MSMT_TIME_END		DATETIME NOT NULL,
	STATUS_MIN			VARCHAR(256) NOT NULL,
	STATUS_MAX			VARCHAR(256) NOT NULL
); 
ALTER TABLE AMHSealBlkTest_THRESH ADD constraint PK_AMHSealBlkTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_AMHSealBlkTest_THRESH ON AMHSealBlkTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_AMHSealBlkTest ON AMHSealBlkTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_AMHSealBlkTest ON AMHSealBlkTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE AMHSNFInpChnTest;
CREATE TABLE AMHSNFInpChnTest
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME			DATETIME NOT NULL,
	STATUS				DECIMAL(20,4) NOT NULL,
	STATUS_ST			VARCHAR(32) NOT NULL	
);					  
CREATE INDEX IDX_AMHSNFInpChnTest ON AMHSNFInpChnTest(MSMT_TIME);
ALTER TABLE AMHSNFInpChnTest ADD constraint PK_AMHSNFInpChnTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);

DROP TABLE AMHSNFInpChnTest_TREND;
CREATE TABLE AMHSNFInpChnTest_TREND
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME			DATETIME NOT NULL,
	PERIOD				VARCHAR(32) NOT NULL,
	STATUS_MIN			DECIMAL(20,4) NOT NULL,
	STATUS_MAX			DECIMAL(20,4) NOT NULL,
	STATUS_STCNT		VARCHAR(32) NOT NULL  
);
ALTER TABLE AMHSNFInpChnTest_TREND ADD constraint PK_AMHSNFInpChnTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);

DROP TABLE AMHSNFInpChnTest_THRESH;
CREATE TABLE AMHSNFInpChnTest_THRESH
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME_START		DATETIME NOT NULL,
	MSMT_TIME_END		DATETIME NOT NULL,
	STATUS_MIN			VARCHAR(256) NOT NULL,
	STATUS_MAX			VARCHAR(256) NOT NULL
); 
ALTER TABLE AMHSNFInpChnTest_THRESH ADD constraint PK_AMHSNFInpChnTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_AMHSNFInpChnTest_THRESH ON AMHSNFInpChnTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_AMHSNFInpChnTest ON AMHSNFInpChnTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_AMHSNFInpChnTest ON AMHSNFInpChnTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE AMHSNFQMsgTest;
CREATE TABLE AMHSNFQMsgTest
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME			DATETIME NOT NULL,
	STATUS				DECIMAL(20,4) NOT NULL,
	STATUS_ST			VARCHAR(32) NOT NULL	
);
CREATE INDEX IDX_AMHSNFQMsgTest ON AMHSNFQMsgTest(MSMT_TIME);
ALTER TABLE AMHSNFQMsgTest ADD constraint PK_AMHSNFQMsgTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);

DROP TABLE AMHSNFQMsgTest_TREND;
CREATE TABLE AMHSNFQMsgTest_TREND
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME			DATETIME NOT NULL,
	PERIOD				VARCHAR(32) NOT NULL,
	STATUS_MIN			DECIMAL(20,4) NOT NULL,
	STATUS_MAX			DECIMAL(20,4) NOT NULL,
	STATUS_STCNT		VARCHAR(32) NOT NULL  
);
ALTER TABLE AMHSNFQMsgTest_TREND ADD constraint PK_AMHSNFQMsgTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);

DROP TABLE AMHSNFQMsgTest_THRESH;
CREATE TABLE AMHSNFQMsgTest_THRESH
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME_START		DATETIME NOT NULL,
	MSMT_TIME_END		DATETIME NOT NULL,
	STATUS_MIN			VARCHAR(256) NOT NULL,
	STATUS_MAX			VARCHAR(256) NOT NULL
); 
ALTER TABLE AMHSNFQMsgTest_THRESH ADD constraint PK_AMHSNFQMsgTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_AMHSNFQMsgTest_THRESH ON AMHSNFQMsgTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_AMHSNFQMsgTest ON AMHSNFQMsgTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_AMHSNFQMsgTest ON AMHSNFQMsgTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE AMHSNFQSvcTest;
CREATE TABLE AMHSNFQSvcTest
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME			DATETIME NOT NULL,
	STATUS				DECIMAL(20,4) NOT NULL,
	STATUS_ST			VARCHAR(32) NOT NULL	
);					  
CREATE INDEX IDX_AMHSNFQSvcTest ON AMHSNFQSvcTest(MSMT_TIME);
ALTER TABLE AMHSNFQSvcTest ADD constraint PK_AMHSNFQSvcTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);

DROP TABLE AMHSNFQSvcTest_TREND;
CREATE TABLE AMHSNFQSvcTest_TREND
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME			DATETIME NOT NULL,
	PERIOD				VARCHAR(32) NOT NULL,
	STATUS_MIN			DECIMAL(20,4) NOT NULL,
	STATUS_MAX			DECIMAL(20,4) NOT NULL,
	STATUS_STCNT		VARCHAR(32) NOT NULL  
);
ALTER TABLE AMHSNFQSvcTest_TREND ADD constraint PK_AMHSNFQSvcTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);

DROP TABLE AMHSNFQSvcTest_THRESH;
CREATE TABLE AMHSNFQSvcTest_THRESH
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME_START		DATETIME NOT NULL,
	MSMT_TIME_END		DATETIME NOT NULL,
	STATUS_MIN			VARCHAR(256) NOT NULL,
	STATUS_MAX			VARCHAR(256) NOT NULL
); 
ALTER TABLE AMHSNFQSvcTest_THRESH ADD constraint PK_AMHSNFQSvcTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_AMHSNFQSvcTest_THRESH ON AMHSNFQSvcTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_AMHSNFQSvcTest ON AMHSNFQSvcTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_AMHSNFQSvcTest ON AMHSNFQSvcTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE AMHSwiftConnTest;
CREATE TABLE AMHSwiftConnTest
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME			DATETIME NOT NULL,
	STATUS				DECIMAL(20,4) NOT NULL,
	STATUS_ST			VARCHAR(32) NOT NULL	
);					  
CREATE INDEX IDX_AMHSwiftConnTest ON AMHSwiftConnTest(MSMT_TIME);
ALTER TABLE AMHSwiftConnTest ADD constraint PK_AMHSwiftConnTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);

DROP TABLE AMHSwiftConnTest_TREND;
CREATE TABLE AMHSwiftConnTest_TREND
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME			DATETIME NOT NULL,
	PERIOD				VARCHAR(32) NOT NULL,
	STATUS_MIN			DECIMAL(20,4) NOT NULL,
	STATUS_MAX			DECIMAL(20,4) NOT NULL,
	STATUS_STCNT		VARCHAR(32) NOT NULL  
);
ALTER TABLE AMHSwiftConnTest_TREND ADD constraint PK_AMHSwiftConnTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);

DROP TABLE AMHSwiftConnTest_THRESH;
CREATE TABLE AMHSwiftConnTest_THRESH
(
	TRGT_HOST			VARCHAR(32) NOT NULL,
	PORT_NO				VARCHAR(32) NOT NULL,
	SITE_NAME			VARCHAR(64) NOT NULL,
	INFO				VARCHAR(128) NOT NULL,
	MSMT_HOST			VARCHAR(32) NOT NULL,
	MSMT_TIME_START		DATETIME NOT NULL,
	MSMT_TIME_END		DATETIME NOT NULL,
	STATUS_MIN			VARCHAR(256) NOT NULL,
	STATUS_MAX			VARCHAR(256) NOT NULL
); 
ALTER TABLE AMHSwiftConnTest_THRESH ADD constraint PK_AMHSwiftConnTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_AMHSwiftConnTest_THRESH ON AMHSwiftConnTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_AMHSwiftConnTest ON AMHSwiftConnTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_AMHSwiftConnTest ON AMHSwiftConnTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE SolQueueStatTest;
CREATE TABLE SolQueueStatTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
ENGR_CONFIG_STATUS DECIMAL(20,4) NOT NULL,
ENGR_CONFIG_STATUS_ST varchar(32) NOT NULL,
INGR_CONFIG_STATUS DECIMAL(20,4) NOT NULL,
INGR_CONFIG_STATUS_ST varchar(32) NOT NULL,
HIGH_WATERMARK DECIMAL(20,4) NOT NULL,
HIGH_WATERMARK_ST varchar(32) NOT NULL,
TOTAL_MSG_SPOOLED DECIMAL(20,4) NOT NULL,
TOTAL_MSG_SPOOLED_ST varchar(32) NOT NULL,
TOTAL_SUBSCRIPTIONS DECIMAL(20,4) NOT NULL,
TOTAL_SUBSCRIPTIONS_ST varchar(32) NOT NULL,
SPOOL_USAGE DECIMAL(20,4) NOT NULL,
SPOOL_USAGE_ST varchar(32) NOT NULL,
CURRENT_CONSUMERS DECIMAL(20,4) NOT NULL,
CURRENT_CONSUMERS_ST varchar(32) NOT NULL);

CREATE INDEX IDX_SolQueueStatTest ON SolQueueStatTest(MSMT_TIME);
ALTER TABLE SolQueueStatTest ADD constraint PK_SolQueueStatTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE SolQueueStatTest_TREND;
CREATE TABLE SolQueueStatTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
ENGR_CONFIG_STATUS_MIN DECIMAL(20,4) NOT NULL,
ENGR_CONFIG_STATUS_MAX DECIMAL(20,4) NOT NULL,
ENGR_CONFIG_STATUS_STCNT varchar(32) NOT NULL,
INGR_CONFIG_STATUS_MIN DECIMAL(20,4) NOT NULL,
INGR_CONFIG_STATUS_MAX DECIMAL(20,4) NOT NULL,
INGR_CONFIG_STATUS_STCNT varchar(32) NOT NULL,
HIGH_WATERMARK_MIN DECIMAL(20,4) NOT NULL,
HIGH_WATERMARK_MAX DECIMAL(20,4) NOT NULL,
HIGH_WATERMARK_STCNT varchar(32) NOT NULL,
TOTAL_MSG_SPOOLED_MIN DECIMAL(20,4) NOT NULL,
TOTAL_MSG_SPOOLED_MAX DECIMAL(20,4) NOT NULL,
TOTAL_MSG_SPOOLED_STCNT varchar(32) NOT NULL,
TOTAL_SUBSCRIPTIONS_MIN DECIMAL(20,4) NOT NULL,
TOTAL_SUBSCRIPTIONS_MAX DECIMAL(20,4) NOT NULL,
TOTAL_SUBSCRIPTIONS_STCNT varchar(32) NOT NULL,
SPOOL_USAGE_MIN DECIMAL(20,4) NOT NULL,
SPOOL_USAGE_MAX DECIMAL(20,4) NOT NULL,
SPOOL_USAGE_STCNT varchar(32) NOT NULL,
CURRENT_CONSUMERS_MIN DECIMAL(20,4) NOT NULL,
CURRENT_CONSUMERS_MAX DECIMAL(20,4) NOT NULL,
CURRENT_CONSUMERS_STCNT varchar(32) NOT NULL);

ALTER TABLE SolQueueStatTest_TREND ADD constraint PK_SolQueueStatTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE SolQueueStatTest_THRESH;
CREATE TABLE SolQueueStatTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
ENGR_CONFIG_STATUS_MIN VARCHAR(256) NOT NULL,
ENGR_CONFIG_STATUS_MAX VARCHAR(256) NOT NULL,
INGR_CONFIG_STATUS_MIN VARCHAR(256) NOT NULL,
INGR_CONFIG_STATUS_MAX VARCHAR(256) NOT NULL,
HIGH_WATERMARK_MIN VARCHAR(256) NOT NULL,
HIGH_WATERMARK_MAX VARCHAR(256) NOT NULL,
TOTAL_MSG_SPOOLED_MIN VARCHAR(256) NOT NULL,
TOTAL_MSG_SPOOLED_MAX VARCHAR(256) NOT NULL,
TOTAL_SUBSCRIPTIONS_MIN VARCHAR(256) NOT NULL,
TOTAL_SUBSCRIPTIONS_MAX VARCHAR(256) NOT NULL,
SPOOL_USAGE_MIN VARCHAR(256) NOT NULL,
SPOOL_USAGE_MAX VARCHAR(256) NOT NULL,
CURRENT_CONSUMERS_MIN VARCHAR(256) NOT NULL,
CURRENT_CONSUMERS_MAX VARCHAR(256) NOT NULL);

ALTER TABLE SolQueueStatTest_THRESH ADD constraint PK_SolQueueStatTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_SolQueueStatTest_THRESH ON SolQueueStatTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_SolQueueStatTest ON SolQueueStatTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_SolQueueStatTest ON SolQueueStatTest_TREND (MSMT_TIME,PERIOD);


DROP TABLE WVDLoginTest_REPORT;
CREATE TABLE WVDLoginTest_REPORT ( 
SESSION_KEY VARCHAR(128), 
TRGT_HOST VARCHAR(32),  
PORT_NO VARCHAR(32),  
MSMT_TIME DATETIME NOT NULL,
USERNAME VARCHAR(128) NOT NULL,
GUESTNAME VARCHAR(128) NOT NULL,
LOGIN_TIME DATETIME NOT NULL,
DURATION DECIMAL (20,4) NOT NULL,
ACTIVE_TIME DECIMAL (20,4) NOT NULL,
IDLE_TIME DECIMAL (20,4) NOT NULL,
CLIENT_IP_ADDRESS VARCHAR(128),
CLIENT_NAME VARCHAR(128),
CLIENT_ID VARCHAR(128),
CLIENT_CATEGORY VARCHAR(128),
CTX_STATE VARCHAR(128),
HDX_DISPLAY_MODE VARCHAR(128),
HDX_ACTIVE_ENCODER VARCHAR(128),
HDX_PROTOCOL VARCHAR(128),
ENCRYPTION_LEVEL VARCHAR(128),
NETSCALER_RPTNAME VARCHAR(128),
NETSCALER_IP_ADDRESS VARCHAR(128),
XENAPP_IP_ADDRESS VARCHAR(128),
ENDPOINT_IP_ADDRESS VARCHAR(128),
COUNTRY_NAME VARCHAR(128),
COUNTRY_CODE VARCHAR(128),
REGION VARCHAR(128),
CITY VARCHAR(128),
LATITUDE VARCHAR(128),
LONGITUDE VARCHAR(128),
LOGON_DURATION DECIMAL (20,4) NOT NULL,
ACTUAL_LOGON_DURATION DECIMAL (20,4) NOT NULL,
CPU_UTIL DECIMAL (20,4) NOT NULL,
MEM_UTIL DECIMAL (20,4) NOT NULL,
IO_READS DECIMAL (20,4) NOT NULL,
IO_WRITES DECIMAL (20,4) NOT NULL,
AVG_USER_INPUT_DELAY DECIMAL (20,4) NOT NULL,
MAX_USER_INPUT_DELAY DECIMAL (20,4) NOT NULL,
CURRENT_TCP DECIMAL (20,4) NOT NULL,
CURRENT_UDP DECIMAL (20,4) NOT NULL,
FRAME_QUALITY DECIMAL (20,4) NOT NULL,
CURRENT_TCP_BW DECIMAL (20,4) NOT NULL,
CURRENT_UDP_BW DECIMAL (20,4) NOT NULL
);	
CREATE INDEX IDX_WVDLoginTest_REPORT ON WVDLoginTest_REPORT(MSMT_TIME);
CREATE INDEX IDX1_WVDLoginTest_REPORT ON WVDLoginTest_REPORT (SESSION_KEY, TRGT_HOST);


DROP TABLE SolaceUptimeTest;
CREATE TABLE SolaceUptimeTest(
TRGT_HOST       				varchar(32) NOT NULL,
PORT_NO         				varchar(32) NOT NULL,
SITE_NAME       				varchar(64) NOT NULL,
INFO            				varchar(128) NOT NULL,
MSMT_HOST       				varchar(32) NOT NULL,
MSMT_TIME       				datetime NOT NULL,
REBOOTED						DECIMAL(20,4) NOT NULL,
REBOOTED_ST 					varchar(32) NOT NULL,
UPTIME 							DECIMAL(20,4) NOT NULL,
UPTIME_ST 						varchar(32) NOT NULL,
TOTAL_UPTIME 					DECIMAL(20,4) NOT NULL,
TOTAL_UPTIME_ST 				varchar(32) NOT NULL);

CREATE INDEX IDX_SolaceUptimeTest ON SolaceUptimeTest(MSMT_TIME);
ALTER TABLE SolaceUptimeTest ADD constraint PK_SolaceUptimeTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);

DROP TABLE SolaceUptimeTest_TREND;
CREATE TABLE SolaceUptimeTest_TREND(
TRGT_HOST       				varchar(32) NOT NULL,
PORT_NO        					varchar(32) NOT NULL,
SITE_NAME       				varchar(64) NOT NULL,
INFO            				varchar(128) NOT NULL,
MSMT_HOST       				varchar(32) NOT NULL,
MSMT_TIME       				datetime NOT NULL,
PERIOD       					varchar(32) NOT NULL,
REBOOTED_MIN 					DECIMAL(20,4) NOT NULL,
REBOOTED_MAX 					DECIMAL(20,4) NOT NULL,
REBOOTED_STCNT 					varchar(32) NOT NULL,
UPTIME_MIN 						DECIMAL(20,4) NOT NULL,
UPTIME_MAX 						DECIMAL(20,4) NOT NULL,
UPTIME_STCNT 					varchar(32) NOT NULL,
TOTAL_UPTIME_MIN 				DECIMAL(20,4) NOT NULL,
TOTAL_UPTIME_MAX 				DECIMAL(20,4) NOT NULL,
TOTAL_UPTIME_STCNT 				varchar(32) NOT NULL);

ALTER TABLE SolaceUptimeTest_TREND ADD constraint PK_SolaceUptimeTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);

DROP TABLE SolaceUptimeTest_THRESH;
CREATE TABLE SolaceUptimeTest_THRESH(
TRGT_HOST       				varchar(32) NOT NULL,
PORT_NO         				varchar(32) NOT NULL,
SITE_NAME       				varchar(64) NOT NULL,
INFO            				varchar(128) NOT NULL,
MSMT_HOST       				varchar(32) NOT NULL,
MSMT_TIME_START 				datetime NOT NULL,
MSMT_TIME_END   				datetime NOT NULL,
REBOOTED_MIN 					VARCHAR(256) NOT NULL,
REBOOTED_MAX 					VARCHAR(256) NOT NULL,
UPTIME_MIN 						VARCHAR(256) NOT NULL,
UPTIME_MAX 						VARCHAR(256) NOT NULL,
TOTAL_UPTIME_MIN 				VARCHAR(256) NOT NULL,
TOTAL_UPTIME_MAX 				VARCHAR(256) NOT NULL);

ALTER TABLE SolaceUptimeTest_THRESH ADD constraint PK_SolaceUptimeTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_SolaceUptimeTest_THRESH ON SolaceUptimeTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_SolaceUptimeTest ON SolaceUptimeTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_SolaceUptimeTest ON SolaceUptimeTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE SolaceAvailTest;
CREATE TABLE SolaceAvailTest(
TRGT_HOST       				varchar(32) NOT NULL,
PORT_NO         				varchar(32) NOT NULL,
SITE_NAME       				varchar(64) NOT NULL,
INFO            				varchar(128) NOT NULL,
MSMT_HOST       				varchar(32) NOT NULL,
MSMT_TIME       				datetime NOT NULL,
AVAILABILITY					DECIMAL(20,4) NOT NULL,
AVAILABILITY_ST 				varchar(32) NOT NULL,
RESPONSE_TIME 					DECIMAL(20,4) NOT NULL,
RESPONSE_TIME_ST 				varchar(32) NOT NULL,
RESPONSE_CODE 					DECIMAL(20,4) NOT NULL,
RESPONSE_CODE_ST 				varchar(32) NOT NULL,
CONTENT_LENGTH 					DECIMAL(20,4) NOT NULL,
CONTENT_LENGTH_ST 				varchar(32) NOT NULL);

CREATE INDEX IDX_SolaceAvailTest ON SolaceAvailTest(MSMT_TIME);
ALTER TABLE SolaceAvailTest ADD constraint PK_SolaceAvailTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);

DROP TABLE SolaceAvailTest_TREND;
CREATE TABLE SolaceAvailTest_TREND(
TRGT_HOST       				varchar(32) NOT NULL,
PORT_NO         				varchar(32) NOT NULL,
SITE_NAME       				varchar(64) NOT NULL,
INFO            				varchar(128) NOT NULL,
MSMT_HOST       				varchar(32) NOT NULL,
MSMT_TIME       				datetime NOT NULL,
PERIOD       					varchar(32) NOT NULL,
AVAILABILITY_MIN 				DECIMAL(20,4) NOT NULL,
AVAILABILITY_MAX 				DECIMAL(20,4) NOT NULL,
AVAILABILITY_STCNT 				varchar(32) NOT NULL,
RESPONSE_TIME_MIN 				DECIMAL(20,4) NOT NULL,
RESPONSE_TIME_MAX 				DECIMAL(20,4) NOT NULL,
RESPONSE_TIME_STCNT 			varchar(32) NOT NULL,
RESPONSE_CODE_MIN 				DECIMAL(20,4) NOT NULL,
RESPONSE_CODE_MAX 				DECIMAL(20,4) NOT NULL,
RESPONSE_CODE_STCNT 			varchar(32) NOT NULL,
CONTENT_LENGTH_MIN 				DECIMAL(20,4) NOT NULL,
CONTENT_LENGTH_MAX 				DECIMAL(20,4) NOT NULL,
CONTENT_LENGTH_STCNT 			varchar(32) NOT NULL);

ALTER TABLE SolaceAvailTest_TREND ADD constraint PK_SolaceAvailTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);

DROP TABLE SolaceAvailTest_THRESH;
CREATE TABLE SolaceAvailTest_THRESH(
TRGT_HOST       				varchar(32) NOT NULL,
PORT_NO         				varchar(32) NOT NULL,
SITE_NAME       				varchar(64) NOT NULL,
INFO            				varchar(128) NOT NULL,
MSMT_HOST       				varchar(32) NOT NULL,
MSMT_TIME_START 				datetime NOT NULL,
MSMT_TIME_END   				datetime NOT NULL,
AVAILABILITY_MIN 				VARCHAR(256) NOT NULL,
AVAILABILITY_MAX 				VARCHAR(256) NOT NULL,
RESPONSE_TIME_MIN 				VARCHAR(256) NOT NULL,
RESPONSE_TIME_MAX 				VARCHAR(256) NOT NULL,
RESPONSE_CODE_MIN 				VARCHAR(256) NOT NULL,
RESPONSE_CODE_MAX 				VARCHAR(256) NOT NULL,
CONTENT_LENGTH_MIN 				VARCHAR(256) NOT NULL,
CONTENT_LENGTH_MAX 				VARCHAR(256) NOT NULL);

ALTER TABLE SolaceAvailTest_THRESH ADD constraint PK_SolaceAvailTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_SolaceAvailTest_THRESH ON SolaceAvailTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_SolaceAvailTest ON SolaceAvailTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_SolaceAvailTest ON SolaceAvailTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE SolaceInterfaceTest;
CREATE TABLE SolaceInterfaceTest(
TRGT_HOST       				varchar(32) NOT NULL,
PORT_NO         				varchar(32) NOT NULL,
SITE_NAME       				varchar(64) NOT NULL,
INFO            				varchar(128) NOT NULL,
MSMT_HOST       				varchar(32) NOT NULL,
MSMT_TIME       				datetime NOT NULL,
OPER_STATUS 					DECIMAL(20,4) NOT NULL,
OPER_STATUS_ST 					varchar(32) NOT NULL,
PACKET_RCVD 					DECIMAL(20,4) NOT NULL,
PACKET_RCVD_ST 					varchar(32) NOT NULL,
PACKET_TXMTD 					DECIMAL(20,4) NOT NULL,
PACKET_TXMTD_ST 				varchar(32) NOT NULL,
DATA_RCVD 						DECIMAL(20,4) NOT NULL,
DATA_RCVD_ST 					varchar(32) NOT NULL,
DATA_TXMTD 						DECIMAL(20,4) NOT NULL,
DATA_TXMTD_ST 					varchar(32) NOT NULL,
OPER_MODE 							DECIMAL(20,4) NOT NULL,
OPER_MODE_ST 						varchar(32) NOT NULL,
OPERATIONA_MEMBER 				DECIMAL(20,4) NOT NULL,
OPERATIONA_MEMBER_ST 			varchar(32) NOT NULL,
CONFIGURED_MEMBER 				DECIMAL(20,4) NOT NULL,
CONFIGURED_MEMBER_ST 			varchar(32) NOT NULL,
AVAILABLE_MEMBER 				DECIMAL(20,4) NOT NULL,
AVAILABLE_MEMBER_ST 			varchar(32) NOT NULL,
PRIMARY_MEMBER 					DECIMAL(20,4) NOT NULL,
PRIMARY_MEMBER_ST 				varchar(32) NOT NULL,
FRAG_IP_PKT_DROP 				DECIMAL(20,4) NOT NULL,
FRAG_IP_PKT_DROP_ST 			varchar(32) NOT NULL);

CREATE INDEX IDX_SolaceInterfaceTest ON SolaceInterfaceTest(MSMT_TIME);
ALTER TABLE SolaceInterfaceTest ADD constraint PK_SolaceInterfaceTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);

DROP TABLE SolaceInterfaceTest_TREND;
CREATE TABLE SolaceInterfaceTest_TREND(
TRGT_HOST       				varchar(32) NOT NULL,
PORT_NO         				varchar(32) NOT NULL,
SITE_NAME       				varchar(64) NOT NULL,
INFO            				varchar(128) NOT NULL,
MSMT_HOST       				varchar(32) NOT NULL,
MSMT_TIME       				datetime NOT NULL,
PERIOD       					varchar(32) NOT NULL,
OPER_STATUS_MIN 				DECIMAL(20,4) NOT NULL,
OPER_STATUS_MAX 				DECIMAL(20,4) NOT NULL,
OPER_STATUS_STCNT 				varchar(32) NOT NULL,
PACKET_RCVD_MIN					DECIMAL(20,4) NOT NULL,
PACKET_RCVD_MAX 				DECIMAL(20,4) NOT NULL,
PACKET_RCVD_STCNT 				varchar(32) NOT NULL,
PACKET_TXMTD_MIN 				DECIMAL(20,4) NOT NULL,
PACKET_TXMTD_MAX 				DECIMAL(20,4) NOT NULL,
PACKET_TXMTD_STCNT 				varchar(32) NOT NULL,
DATA_RCVD_MIN 					DECIMAL(20,4) NOT NULL,
DATA_RCVD_MAX 					DECIMAL(20,4) NOT NULL,
DATA_RCVD_STCNT 				varchar(32) NOT NULL,
DATA_TXMTD_MIN 					DECIMAL(20,4) NOT NULL,
DATA_TXMTD_MAX 					DECIMAL(20,4) NOT NULL,
DATA_TXMTD_STCNT 				varchar(32) NOT NULL,
OPER_MODE_MIN 						DECIMAL(20,4) NOT NULL,
OPER_MODE_MAX 						DECIMAL(20,4) NOT NULL,
OPER_MODE_STCNT 						varchar(32) NOT NULL,
OPERATIONA_MEMBER_MIN 			DECIMAL(20,4) NOT NULL,
OPERATIONA_MEMBER_MAX 			DECIMAL(20,4) NOT NULL,
OPERATIONA_MEMBER_STCNT			varchar(32) NOT NULL,
CONFIGURED_MEMBER_MIN 			DECIMAL(20,4) NOT NULL,
CONFIGURED_MEMBER_MAX 			DECIMAL(20,4) NOT NULL,
CONFIGURED_MEMBER_STCNT 		varchar(32) NOT NULL,
AVAILABLE_MEMBER_MIN 			DECIMAL(20,4) NOT NULL,
AVAILABLE_MEMBER_MAX 			DECIMAL(20,4) NOT NULL,
AVAILABLE_MEMBER_STCNT 			varchar(32) NOT NULL,
PRIMARY_MEMBER_MIN 				DECIMAL(20,4) NOT NULL,
PRIMARY_MEMBER_MAX 				DECIMAL(20,4) NOT NULL,
PRIMARY_MEMBER_STCNT 			varchar(32) NOT NULL,
FRAG_IP_PKT_DROP_MIN 			DECIMAL(20,4) NOT NULL,
FRAG_IP_PKT_DROP_MAX 			DECIMAL(20,4) NOT NULL,
FRAG_IP_PKT_DROP_STCNT 			varchar(32) NOT NULL);

ALTER TABLE SolaceInterfaceTest_TREND ADD constraint PK_SolaceInterfaceTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);

DROP TABLE SolaceInterfaceTest_THRESH;
CREATE TABLE SolaceInterfaceTest_THRESH(
TRGT_HOST       				varchar(32) NOT NULL,
PORT_NO         				varchar(32) NOT NULL,
SITE_NAME       				varchar(64) NOT NULL,
INFO            				varchar(128) NOT NULL,
MSMT_HOST       				varchar(32) NOT NULL,
MSMT_TIME_START 				datetime NOT NULL,
MSMT_TIME_END   				datetime NOT NULL,
OPER_STATUS_MIN 				VARCHAR(256) NOT NULL,
OPER_STATUS_MAX 				VARCHAR(256) NOT NULL,
PACKET_RCVD_MIN 				VARCHAR(256) NOT NULL,
PACKET_RCVD_MAX 				VARCHAR(256) NOT NULL,
PACKET_TXMTD_MIN 				VARCHAR(256) NOT NULL,
PACKET_TXMTD_MAX 				VARCHAR(256) NOT NULL,
DATA_RCVD_MIN 					VARCHAR(256) NOT NULL,
DATA_RCVD_MAX 					VARCHAR(256) NOT NULL,
DATA_TXMTD_MIN 					VARCHAR(256) NOT NULL,
DATA_TXMTD_MAX 					VARCHAR(256) NOT NULL,
OPER_MODE_MIN 						VARCHAR(256) NOT NULL,
OPER_MODE_MAX 						VARCHAR(256) NOT NULL,
OPERATIONA_MEMBER_MIN 			VARCHAR(256) NOT NULL,
OPERATIONA_MEMBER_MAX 			VARCHAR(256) NOT NULL,
CONFIGURED_MEMBER_MIN 			VARCHAR(256) NOT NULL,
CONFIGURED_MEMBER_MAX 			VARCHAR(256) NOT NULL,
AVAILABLE_MEMBER_MIN 			VARCHAR(256) NOT NULL,
AVAILABLE_MEMBER_MAX 			VARCHAR(256) NOT NULL,
PRIMARY_MEMBER_MIN 				VARCHAR(256) NOT NULL,
PRIMARY_MEMBER_MAX 				VARCHAR(256) NOT NULL,
FRAG_IP_PKT_DROP_MIN 			VARCHAR(256) NOT NULL,
FRAG_IP_PKT_DROP_MAX 			VARCHAR(256) NOT NULL);

ALTER TABLE SolaceInterfaceTest_THRESH ADD constraint PK_SolaceInterfaceTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_SolaceInterfaceTest_THRESH ON SolaceInterfaceTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_SolaceInterfaceTest ON SolaceInterfaceTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_SolaceInterfaceTest ON SolaceInterfaceTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE SolaceMemoryTest;
CREATE TABLE SolaceMemoryTest(
TRGT_HOST       				varchar(32) NOT NULL,
PORT_NO         				varchar(32) NOT NULL,
SITE_NAME       				varchar(64) NOT NULL,
INFO            				varchar(128) NOT NULL,
MSMT_HOST       				varchar(32) NOT NULL,
MSMT_TIME       				datetime NOT NULL,
TOTAL_PHYSICAL_MEMORY 			DECIMAL(20,4) NOT NULL,
TOTAL_PHYSICAL_MEMORY_ST 		varchar(32) NOT NULL,
USED_PHYSICAL_MEMORY 			DECIMAL(20,4) NOT NULL,
USED_PHYSICAL_MEMORY_ST 		varchar(32) NOT NULL,
FREE_PHYSICAL_MEMORY 			DECIMAL(20,4) NOT NULL,
FREE_PHYSICAL_MEMORY_ST 		varchar(32) NOT NULL,
BUFFER_MEMORY 					DECIMAL(20,4) NOT NULL,
BUFFER_MEMORY_ST 				varchar(32) NOT NULL,
CACHE_MEMORY 					DECIMAL(20,4) NOT NULL,
CACHE_MEMORY_ST 				varchar(32) NOT NULL,
PHYSICAL_MEM_USAGE 				DECIMAL(20,4) NOT NULL,
PHYSICAL_MEM_USAGE_ST 			varchar(32) NOT NULL,
TOTAL_SWAP_MEMORY 				DECIMAL(20,4) NOT NULL,
TOTAL_SWAP_MEMORY_ST 			varchar(32) NOT NULL,
USED_SWAP_MEMORY 				DECIMAL(20,4) NOT NULL,
USED_SWAP_MEMORY_ST 			varchar(32) NOT NULL,
FREE_SWAP_MEMORY 				DECIMAL(20,4) NOT NULL,
FREE_SWAP_MEMORY_ST 			varchar(32) NOT NULL,
SWAP_MEM_USAGE 					DECIMAL(20,4) NOT NULL,
SWAP_MEM_USAGE_ST 				varchar(32) NOT NULL,
TOTAL_SUB_MEMORY 				DECIMAL(20,4) NOT NULL,
TOTAL_SUB_MEMORY_ST 			varchar(32) NOT NULL,
USED_SUB_MEMORY 				DECIMAL(20,4) NOT NULL,
USED_SUB_MEMORY_ST 				varchar(32) NOT NULL,
FREE_SUB_MEMORY 				DECIMAL(20,4) NOT NULL,
FREE_SUB_MEMORY_ST 				varchar(32) NOT NULL,
SUB_MEM_USAGE 					DECIMAL(20,4) NOT NULL,
SUB_MEM_USAGE_ST 				varchar(32) NOT NULL);

CREATE INDEX IDX_SolaceMemoryTest ON SolaceMemoryTest(MSMT_TIME);
ALTER TABLE SolaceMemoryTest ADD constraint PK_SolaceMemoryTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);

DROP TABLE SolaceMemoryTest_TREND;
CREATE TABLE SolaceMemoryTest_TREND(
TRGT_HOST       				varchar(32) NOT NULL,
PORT_NO         				varchar(32) NOT NULL,
SITE_NAME       				varchar(64) NOT NULL,
INFO            				varchar(128) NOT NULL,
MSMT_HOST       				varchar(32) NOT NULL,
MSMT_TIME       				datetime NOT NULL,
PERIOD       					varchar(32) NOT NULL,
TOTAL_PHYSICAL_MEMORY_MIN 		DECIMAL(20,4) NOT NULL,
TOTAL_PHYSICAL_MEMORY_MAX 		DECIMAL(20,4) NOT NULL,
TOTAL_PHYSICAL_MEMORY_STCNT 	varchar(32) NOT NULL,
USED_PHYSICAL_MEMORY_MIN 		DECIMAL(20,4) NOT NULL,
USED_PHYSICAL_MEMORY_MAX 		DECIMAL(20,4) NOT NULL,
USED_PHYSICAL_MEMORY_STCNT 		varchar(32) NOT NULL,
FREE_PHYSICAL_MEMORY_MIN 		DECIMAL(20,4) NOT NULL,
FREE_PHYSICAL_MEMORY_MAX 		DECIMAL(20,4) NOT NULL,
FREE_PHYSICAL_MEMORY_STCNT 		varchar(32) NOT NULL,
BUFFER_MEMORY_MIN 				DECIMAL(20,4) NOT NULL,
BUFFER_MEMORY_MAX 				DECIMAL(20,4) NOT NULL,
BUFFER_MEMORY_STCNT 			varchar(32) NOT NULL,
CACHE_MEMORY_MIN 				DECIMAL(20,4) NOT NULL,
CACHE_MEMORY_MAX 				DECIMAL(20,4) NOT NULL,
CACHE_MEMORY_STCNT 				varchar(32) NOT NULL,
PHYSICAL_MEM_USAGE_MIN 			DECIMAL(20,4) NOT NULL,
PHYSICAL_MEM_USAGE_MAX 			DECIMAL(20,4) NOT NULL,
PHYSICAL_MEM_USAGE_STCNT 		varchar(32) NOT NULL,
TOTAL_SWAP_MEMORY_MIN 			DECIMAL(20,4) NOT NULL,
TOTAL_SWAP_MEMORY_MAX 			DECIMAL(20,4) NOT NULL,
TOTAL_SWAP_MEMORY_STCNT 		varchar(32) NOT NULL,
USED_SWAP_MEMORY_MIN 			DECIMAL(20,4) NOT NULL,
USED_SWAP_MEMORY_MAX 			DECIMAL(20,4) NOT NULL,
USED_SWAP_MEMORY_STCNT 			varchar(32) NOT NULL,
FREE_SWAP_MEMORY_MIN 			DECIMAL(20,4) NOT NULL,
FREE_SWAP_MEMORY_MAX 			DECIMAL(20,4) NOT NULL,
FREE_SWAP_MEMORY_STCNT 			varchar(32) NOT NULL,
SWAP_MEM_USAGE_MIN 				DECIMAL(20,4) NOT NULL,
SWAP_MEM_USAGE_MAX 				DECIMAL(20,4) NOT NULL,
SWAP_MEM_USAGE_STCNT 			varchar(32) NOT NULL,
TOTAL_SUB_MEMORY_MIN 			DECIMAL(20,4) NOT NULL,
TOTAL_SUB_MEMORY_MAX 			DECIMAL(20,4) NOT NULL,
TOTAL_SUB_MEMORY_STCNT 			varchar(32) NOT NULL,
USED_SUB_MEMORY_MIN 			DECIMAL(20,4) NOT NULL,
USED_SUB_MEMORY_MAX 			DECIMAL(20,4) NOT NULL,
USED_SUB_MEMORY_STCNT 			varchar(32) NOT NULL,
FREE_SUB_MEMORY_MIN 			DECIMAL(20,4) NOT NULL,
FREE_SUB_MEMORY_MAX 			DECIMAL(20,4) NOT NULL,
FREE_SUB_MEMORY_STCNT 			varchar(32) NOT NULL,
SUB_MEM_USAGE_MIN 				DECIMAL(20,4) NOT NULL,
SUB_MEM_USAGE_MAX 				DECIMAL(20,4) NOT NULL,
SUB_MEM_USAGE_STCNT 			varchar(32) NOT NULL);

ALTER TABLE SolaceMemoryTest_TREND ADD constraint PK_SolaceMemoryTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);

DROP TABLE SolaceMemoryTest_THRESH;
CREATE TABLE SolaceMemoryTest_THRESH(
TRGT_HOST       				varchar(32) NOT NULL,
PORT_NO         				varchar(32) NOT NULL,
SITE_NAME       				varchar(64) NOT NULL,
INFO            				varchar(128) NOT NULL,
MSMT_HOST       				varchar(32) NOT NULL,
MSMT_TIME_START 				datetime NOT NULL,
MSMT_TIME_END   				datetime NOT NULL,
TOTAL_PHYSICAL_MEMORY_MIN 		VARCHAR(256) NOT NULL,
TOTAL_PHYSICAL_MEMORY_MAX 		VARCHAR(256) NOT NULL,
USED_PHYSICAL_MEMORY_MIN 		VARCHAR(256) NOT NULL,
USED_PHYSICAL_MEMORY_MAX 		VARCHAR(256) NOT NULL,
FREE_PHYSICAL_MEMORY_MIN 		VARCHAR(256) NOT NULL,
FREE_PHYSICAL_MEMORY_MAX 		VARCHAR(256) NOT NULL,
BUFFER_MEMORY_MIN 				VARCHAR(256) NOT NULL,
BUFFER_MEMORY_MAX 				VARCHAR(256) NOT NULL,
CACHE_MEMORY_MIN 				VARCHAR(256) NOT NULL,
CACHE_MEMORY_MAX 				VARCHAR(256) NOT NULL,
PHYSICAL_MEM_USAGE_MIN 			VARCHAR(256) NOT NULL,
PHYSICAL_MEM_USAGE_MAX 			VARCHAR(256) NOT NULL,
TOTAL_SWAP_MEMORY_MIN 			VARCHAR(256) NOT NULL,
TOTAL_SWAP_MEMORY_MAX 			VARCHAR(256) NOT NULL,
USED_SWAP_MEMORY_MIN 			VARCHAR(256) NOT NULL,
USED_SWAP_MEMORY_MAX 			VARCHAR(256) NOT NULL,
FREE_SWAP_MEMORY_MIN 			VARCHAR(256) NOT NULL,
FREE_SWAP_MEMORY_MAX 			VARCHAR(256) NOT NULL,
SWAP_MEM_USAGE_MIN 				VARCHAR(256) NOT NULL,
SWAP_MEM_USAGE_MAX 				VARCHAR(256) NOT NULL,
TOTAL_SUB_MEMORY_MIN 			VARCHAR(256) NOT NULL,
TOTAL_SUB_MEMORY_MAX 			VARCHAR(256) NOT NULL,
USED_SUB_MEMORY_MIN 			VARCHAR(256) NOT NULL,
USED_SUB_MEMORY_MAX 			VARCHAR(256) NOT NULL,
FREE_SUB_MEMORY_MIN 			VARCHAR(256) NOT NULL,
FREE_SUB_MEMORY_MAX 			VARCHAR(256) NOT NULL,
SUB_MEM_USAGE_MIN 				VARCHAR(256) NOT NULL,
SUB_MEM_USAGE_MAX 				VARCHAR(256) NOT NULL);

ALTER TABLE SolaceMemoryTest_THRESH ADD constraint PK_SolaceMemoryTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_SolaceMemoryTest_THRESH ON SolaceMemoryTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_SolaceMemoryTest ON SolaceMemoryTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_SolaceMemoryTest ON SolaceMemoryTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE SolaceMsgSpoolTest;
CREATE TABLE SolaceMsgSpoolTest(
TRGT_HOST       				varchar(32) NOT NULL,
PORT_NO         				varchar(32) NOT NULL,
SITE_NAME       				varchar(64) NOT NULL,
INFO            				varchar(128) NOT NULL,
MSMT_HOST      					varchar(32) NOT NULL,
MSMT_TIME       				datetime NOT NULL,
CONFIG_STATUS 					DECIMAL(20,4) NOT NULL,
CONFIG_STATUS_ST 				varchar(32) NOT NULL,
OPER_STATUS 					DECIMAL(20,4) NOT NULL,
OPER_STATUS_ST 					varchar(32) NOT NULL,
GURANTEED_MSG_SUPT 				DECIMAL(20,4) NOT NULL,
GURANTEED_MSG_SUPT_ST 			varchar(32) NOT NULL,
DATAPATH_STATUS 				DECIMAL(20,4) NOT NULL,
DATAPATH_STATUS_ST 				varchar(32) NOT NULL,
SYNC_STATUS 					DECIMAL(20,4) NOT NULL,
SYNC_STATUS_ST 					varchar(32) NOT NULL,
DFRAG_STATUS 					DECIMAL(20,4) NOT NULL,
DFRAG_STATUS_ST 				varchar(32) NOT NULL,
DEL_IN_PROGRESS 				DECIMAL(20,4) NOT NULL,
DEL_IN_PROGRESS_ST 				varchar(32) NOT NULL,
RFAD_MSG_SPOOLED 				DECIMAL(20,4) NOT NULL,
RFAD_MSG_SPOOLED_ST 			varchar(32) NOT NULL,
DISK_MSG_SPOOLED 				DECIMAL(20,4) NOT NULL,
DISK_MSG_SPOOLED_ST 			varchar(32) NOT NULL,
TOTAL_MSG_SPOOLED 				DECIMAL(20,4) NOT NULL,
TOTAL_MSG_SPOOLED_ST 			varchar(32) NOT NULL,
SPOOL_FILE_UTIL 				DECIMAL(20,4) NOT NULL,
SPOOL_FILE_UTIL_ST 				varchar(32) NOT NULL,
ACTIVE_DSKPART_UTIL 			DECIMAL(20,4) NOT NULL,
ACTIVE_DSKPART_UTIL_ST 			varchar(32) NOT NULL,
TRANS_SESS_COUNT_UTIL 			DECIMAL(20,4) NOT NULL,
TRANS_SESS_COUNT_UTIL_ST 		varchar(32) NOT NULL,
TRANS_SESS_RESRC_UTIL 			DECIMAL(20,4) NOT NULL,
TRANS_SESS_RESRC_UTIL_ST 		varchar(32) NOT NULL,
RFAD_UTIL 						DECIMAL(20,4) NOT NULL,
RFAD_UTIL_ST 					varchar(32) NOT NULL,
DISK_MSG_SPOOL_UTIL 			DECIMAL(20,4) NOT NULL,
DISK_MSG_SPOOL_UTIL_ST 			varchar(32) NOT NULL,
PERSIST_UTIL 					DECIMAL(20,4) NOT NULL,
PERSIST_UTIL_ST 				varchar(32) NOT NULL,
MSG_CNT_UTIL 					DECIMAL(20,4) NOT NULL,
MSG_CNT_UTIL_ST 				varchar(32) NOT NULL,
TRANS_RSRC_UTIL 				DECIMAL(20,4) NOT NULL,
TRANS_RSRC_UTIL_ST 				varchar(32) NOT NULL,
DLVRD_UNACK_MSG_UTIL 			DECIMAL(20,4) NOT NULL,
DLVRD_UNACK_MSG_UTIL_ST 		varchar(32) NOT NULL,
DEFRAG_EST_FRAG 				DECIMAL(20,4) NOT NULL,
DEFRAG_EST_FRAG_ST 				varchar(32) NOT NULL,
DEFRAG_EST_RECOVER 				DECIMAL(20,4) NOT NULL,
DEFRAG_EST_RECOVER_ST 			varchar(32) NOT NULL,
MSGSPL_ENTITY_USED_QUEUE 		DECIMAL(20,4) NOT NULL,
MSGSPL_ENTITY_USED_QUEUE_ST 	varchar(32) NOT NULL,
MSGSPL_ENTITY_USED_DTE 			DECIMAL(20,4) NOT NULL,
MSGSPL_ENTITY_USED_DTE_ST 		varchar(32) NOT NULL,
TRANS_SESS_USED 				DECIMAL(20,4) NOT NULL,
TRANS_SESS_USED_ST 				varchar(32) NOT NULL);

CREATE INDEX IDX_SolaceMsgSpoolTest ON SolaceMsgSpoolTest(MSMT_TIME);
ALTER TABLE SolaceMsgSpoolTest ADD constraint PK_SolaceMsgSpoolTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);

DROP TABLE SolaceMsgSpoolTest_TREND;
CREATE TABLE SolaceMsgSpoolTest_TREND(
TRGT_HOST       				varchar(32) NOT NULL,
PORT_NO         				varchar(32) NOT NULL,
SITE_NAME       				varchar(64) NOT NULL,
INFO            				varchar(128) NOT NULL,
MSMT_HOST       				varchar(32) NOT NULL,
MSMT_TIME       				datetime NOT NULL,
PERIOD       					varchar(32) NOT NULL,
CONFIG_STATUS_MIN 				DECIMAL(20,4) NOT NULL,
CONFIG_STATUS_MAX 				DECIMAL(20,4) NOT NULL,
CONFIG_STATUS_STCNT 			varchar(32) NOT NULL,
OPER_STATUS_MIN 				DECIMAL(20,4) NOT NULL,
OPER_STATUS_MAX 				DECIMAL(20,4) NOT NULL,
OPER_STATUS_STCNT 				varchar(32) NOT NULL,
GURANTEED_MSG_SUPT_MIN 			DECIMAL(20,4) NOT NULL,
GURANTEED_MSG_SUPT_MAX 			DECIMAL(20,4) NOT NULL,
GURANTEED_MSG_SUPT_STCNT 		varchar(32) NOT NULL,
DATAPATH_STATUS_MIN 			DECIMAL(20,4) NOT NULL,
DATAPATH_STATUS_MAX 			DECIMAL(20,4) NOT NULL,
DATAPATH_STATUS_STCNT 			varchar(32) NOT NULL,
SYNC_STATUS_MIN 				DECIMAL(20,4) NOT NULL,
SYNC_STATUS_MAX 				DECIMAL(20,4) NOT NULL,
SYNC_STATUS_STCNT 				varchar(32) NOT NULL,
DFRAG_STATUS_MIN 				DECIMAL(20,4) NOT NULL,
DFRAG_STATUS_MAX 				DECIMAL(20,4) NOT NULL,
DFRAG_STATUS_STCNT 				varchar(32) NOT NULL,
DEL_IN_PROGRESS_MIN 			DECIMAL(20,4) NOT NULL,
DEL_IN_PROGRESS_MAX 			DECIMAL(20,4) NOT NULL,
DEL_IN_PROGRESS_STCNT 			varchar(32) NOT NULL,
RFAD_MSG_SPOOLED_MIN 			DECIMAL(20,4) NOT NULL,
RFAD_MSG_SPOOLED_MAX 			DECIMAL(20,4) NOT NULL,
RFAD_MSG_SPOOLED_STCNT 			varchar(32) NOT NULL,
DISK_MSG_SPOOLED_MIN 			DECIMAL(20,4) NOT NULL,
DISK_MSG_SPOOLED_MAX 			DECIMAL(20,4) NOT NULL,
DISK_MSG_SPOOLED_STCNT 			varchar(32) NOT NULL,
TOTAL_MSG_SPOOLED_MIN 			DECIMAL(20,4) NOT NULL,
TOTAL_MSG_SPOOLED_MAX 			DECIMAL(20,4) NOT NULL,
TOTAL_MSG_SPOOLED_STCNT 		varchar(32) NOT NULL,
SPOOL_FILE_UTIL_MIN 			DECIMAL(20,4) NOT NULL,
SPOOL_FILE_UTIL_MAX 			DECIMAL(20,4) NOT NULL,
SPOOL_FILE_UTIL_STCNT 			varchar(32) NOT NULL,
ACTIVE_DSKPART_UTIL_MIN 		DECIMAL(20,4) NOT NULL,
ACTIVE_DSKPART_UTIL_MAX 		DECIMAL(20,4) NOT NULL,
ACTIVE_DSKPART_UTIL_STCNT 		varchar(32) NOT NULL,
TRANS_SESS_COUNT_UTIL_MIN 		DECIMAL(20,4) NOT NULL,
TRANS_SESS_COUNT_UTIL_MAX 		DECIMAL(20,4) NOT NULL,
TRANS_SESS_COUNT_UTIL_STCNT 	varchar(32) NOT NULL,
TRANS_SESS_RESRC_UTIL_MIN 		DECIMAL(20,4) NOT NULL,
TRANS_SESS_RESRC_UTIL_MAX 		DECIMAL(20,4) NOT NULL,
TRANS_SESS_RESRC_UTIL_STCNT 	varchar(32) NOT NULL,
RFAD_UTIL_MIN 					DECIMAL(20,4) NOT NULL,
RFAD_UTIL_MAX 					DECIMAL(20,4) NOT NULL,
RFAD_UTIL_STCNT 				varchar(32) NOT NULL,
DISK_MSG_SPOOL_UTIL_MIN 		DECIMAL(20,4) NOT NULL,
DISK_MSG_SPOOL_UTIL_MAX 		DECIMAL(20,4) NOT NULL,
DISK_MSG_SPOOL_UTIL_STCNT 		varchar(32) NOT NULL,
PERSIST_UTIL_MIN 				DECIMAL(20,4) NOT NULL,
PERSIST_UTIL_MAX 				DECIMAL(20,4) NOT NULL,
PERSIST_UTIL_STCNT 				varchar(32) NOT NULL,
MSG_CNT_UTIL_MIN 				DECIMAL(20,4) NOT NULL,
MSG_CNT_UTIL_MAX 				DECIMAL(20,4) NOT NULL,
MSG_CNT_UTIL_STCNT 				varchar(32) NOT NULL,
TRANS_RSRC_UTIL_MIN 			DECIMAL(20,4) NOT NULL,
TRANS_RSRC_UTIL_MAX 			DECIMAL(20,4) NOT NULL,
TRANS_RSRC_UTIL_STCNT 			varchar(32) NOT NULL,
DLVRD_UNACK_MSG_UTIL_MIN 		DECIMAL(20,4) NOT NULL,
DLVRD_UNACK_MSG_UTIL_MAX 		DECIMAL(20,4) NOT NULL,
DLVRD_UNACK_MSG_UTIL_STCNT 		varchar(32) NOT NULL,
DEFRAG_EST_FRAG_MIN 			DECIMAL(20,4) NOT NULL,
DEFRAG_EST_FRAG_MAX 			DECIMAL(20,4) NOT NULL,
DEFRAG_EST_FRAG_STCNT 			varchar(32) NOT NULL,
DEFRAG_EST_RECOVER_MIN 			DECIMAL(20,4) NOT NULL,
DEFRAG_EST_RECOVER_MAX 			DECIMAL(20,4) NOT NULL,
DEFRAG_EST_RECOVER_STCNT 		varchar(32) NOT NULL,
MSGSPL_ENTITY_USED_QUEUE_MIN 	DECIMAL(20,4) NOT NULL,
MSGSPL_ENTITY_USED_QUEUE_MAX 	DECIMAL(20,4) NOT NULL,
MSGSPL_ENTITY_USED_QUEUE_STCNT 	varchar(32) NOT NULL,
MSGSPL_ENTITY_USED_DTE_MIN 		DECIMAL(20,4) NOT NULL,
MSGSPL_ENTITY_USED_DTE_MAX 		DECIMAL(20,4) NOT NULL,
MSGSPL_ENTITY_USED_DTE_STCNT 	varchar(32) NOT NULL,
TRANS_SESS_USED_MIN 			DECIMAL(20,4) NOT NULL,
TRANS_SESS_USED_MAX 			DECIMAL(20,4) NOT NULL,
TRANS_SESS_USED_STCNT 			varchar(32) NOT NULL);

ALTER TABLE SolaceMsgSpoolTest_TREND ADD constraint PK_SolaceMsgSpoolTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);

DROP TABLE SolaceMsgSpoolTest_THRESH;
CREATE TABLE SolaceMsgSpoolTest_THRESH(
TRGT_HOST       				varchar(32) NOT NULL,
PORT_NO         				varchar(32) NOT NULL,
SITE_NAME       				varchar(64) NOT NULL,
INFO            				varchar(128) NOT NULL,
MSMT_HOST       				varchar(32) NOT NULL,
MSMT_TIME_START 				datetime NOT NULL,
MSMT_TIME_END   				datetime NOT NULL,
CONFIG_STATUS_MIN 				VARCHAR(256) NOT NULL,
CONFIG_STATUS_MAX 				VARCHAR(256) NOT NULL,
OPER_STATUS_MIN 				VARCHAR(256) NOT NULL,
OPER_STATUS_MAX 				VARCHAR(256) NOT NULL,
GURANTEED_MSG_SUPT_MIN 			VARCHAR(256) NOT NULL,
GURANTEED_MSG_SUPT_MAX 			VARCHAR(256) NOT NULL,
DATAPATH_STATUS_MIN 			VARCHAR(256) NOT NULL,
DATAPATH_STATUS_MAX 			VARCHAR(256) NOT NULL,
SYNC_STATUS_MIN 				VARCHAR(256) NOT NULL,
SYNC_STATUS_MAX 				VARCHAR(256) NOT NULL,
DFRAG_STATUS_MIN 				VARCHAR(256) NOT NULL,
DFRAG_STATUS_MAX 				VARCHAR(256) NOT NULL,
DEL_IN_PROGRESS_MIN 			VARCHAR(256) NOT NULL,
DEL_IN_PROGRESS_MAX 			VARCHAR(256) NOT NULL,
RFAD_MSG_SPOOLED_MIN 			VARCHAR(256) NOT NULL,
RFAD_MSG_SPOOLED_MAX 			VARCHAR(256) NOT NULL,
DISK_MSG_SPOOLED_MIN 			VARCHAR(256) NOT NULL,
DISK_MSG_SPOOLED_MAX 			VARCHAR(256) NOT NULL,
TOTAL_MSG_SPOOLED_MIN 			VARCHAR(256) NOT NULL,
TOTAL_MSG_SPOOLED_MAX 			VARCHAR(256) NOT NULL,
SPOOL_FILE_UTIL_MIN 			VARCHAR(256) NOT NULL,
SPOOL_FILE_UTIL_MAX 			VARCHAR(256) NOT NULL,
ACTIVE_DSKPART_UTIL_MIN 		VARCHAR(256) NOT NULL,
ACTIVE_DSKPART_UTIL_MAX 		VARCHAR(256) NOT NULL,
TRANS_SESS_COUNT_UTIL_MIN 		VARCHAR(256) NOT NULL,
TRANS_SESS_COUNT_UTIL_MAX 		VARCHAR(256) NOT NULL,
TRANS_SESS_RESRC_UTIL_MIN 		VARCHAR(256) NOT NULL,
TRANS_SESS_RESRC_UTIL_MAX 		VARCHAR(256) NOT NULL,
RFAD_UTIL_MIN 					VARCHAR(256) NOT NULL,
RFAD_UTIL_MAX 					VARCHAR(256) NOT NULL,
DISK_MSG_SPOOL_UTIL_MIN 		VARCHAR(256) NOT NULL,
DISK_MSG_SPOOL_UTIL_MAX 		VARCHAR(256) NOT NULL,
PERSIST_UTIL_MIN 				VARCHAR(256) NOT NULL,
PERSIST_UTIL_MAX 				VARCHAR(256) NOT NULL,
MSG_CNT_UTIL_MIN 				VARCHAR(256) NOT NULL,
MSG_CNT_UTIL_MAX 				VARCHAR(256) NOT NULL,
TRANS_RSRC_UTIL_MIN 			VARCHAR(256) NOT NULL,
TRANS_RSRC_UTIL_MAX 			VARCHAR(256) NOT NULL,
DLVRD_UNACK_MSG_UTIL_MIN 		VARCHAR(256) NOT NULL,
DLVRD_UNACK_MSG_UTIL_MAX 		VARCHAR(256) NOT NULL,
DEFRAG_EST_FRAG_MIN 			VARCHAR(256) NOT NULL,
DEFRAG_EST_FRAG_MAX 			VARCHAR(256) NOT NULL,
DEFRAG_EST_RECOVER_MIN 			VARCHAR(256) NOT NULL,
DEFRAG_EST_RECOVER_MAX 			VARCHAR(256) NOT NULL,
MSGSPL_ENTITY_USED_QUEUE_MIN 	VARCHAR(256) NOT NULL,
MSGSPL_ENTITY_USED_QUEUE_MAX 	VARCHAR(256) NOT NULL,
MSGSPL_ENTITY_USED_DTE_MIN 		VARCHAR(256) NOT NULL,
MSGSPL_ENTITY_USED_DTE_MAX 		VARCHAR(256) NOT NULL,
TRANS_SESS_USED_MIN 			VARCHAR(256) NOT NULL,
TRANS_SESS_USED_MAX 			VARCHAR(256) NOT NULL);

ALTER TABLE SolaceMsgSpoolTest_THRESH ADD constraint PK_SolaceMsgSpoolTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_SolaceMsgSpoolTest_THRESH ON SolaceMsgSpoolTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_SolaceMsgSpoolTest ON SolaceMsgSpoolTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_SolaceMsgSpoolTest ON SolaceMsgSpoolTest_TREND (MSMT_TIME,PERIOD);


DROP TABLE SolaceSysClientTest;
CREATE TABLE SolaceSysClientTest(
TRGT_HOST       				varchar(32) NOT NULL,
PORT_NO         				varchar(32) NOT NULL,
SITE_NAME       				varchar(64) NOT NULL,
INFO            				varchar(128) NOT NULL,
MSMT_HOST       				varchar(32) NOT NULL,
MSMT_TIME       				datetime NOT NULL,
TOTAL_CLIENTS 					DECIMAL(20,4) NOT NULL,
TOTAL_CLIENTS_ST 				varchar(32) NOT NULL,
CONNECTED_CLIENTS 				DECIMAL(20,4) NOT NULL,
CONNECTED_CLIENTS_ST 			varchar(32) NOT NULL,
MQTT_CLIENTS_CONNECTED 			DECIMAL(20,4) NOT NULL,
MQTT_CLIENTS_CONNECTED_ST 		varchar(32) NOT NULL,
TOTAL_REST_CLIENTS_CONNECTED 	DECIMAL(20,4) NOT NULL,
TOTAL_REST_CLIENTS_CONNECTED_ST varchar(32) NOT NULL,
TOTAL_SMF_CLIENTS_CONNECTED 	DECIMAL(20,4) NOT NULL,
TOTAL_SMF_CLIENTS_CONNECTED_ST 	varchar(32) NOT NULL,
TOTAL_WEB_SERVICE_CLIENTS_CONNECTED DECIMAL(20,4) NOT NULL,
TOTAL_WEB_SERVICE_CLIENTS_CONNECTED_ST varchar(32) NOT NULL,
TOTAL_CLIENTS_CONNECTED_WITH_COMPRESSION DECIMAL(20,4) NOT NULL,
TOTAL_CLIENTS_CONNECTED_WITH_COMPRESSION_ST varchar(32) NOT NULL,
TOTAL_SSL_CLIENTS_CONNECTED 	DECIMAL(20,4) NOT NULL,
TOTAL_SSL_CLIENTS_CONNECTED_ST 	varchar(32) NOT NULL,
TOTAL_CLIENT_BYTES_RECEIVED 	DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_BYTES_RECEIVED_ST 	varchar(32) NOT NULL,
TOTAL_CLIENT_BYTES_TRANSMITTED 	DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_BYTES_TRANSMITTED_ST varchar(32) NOT NULL,
TOTAL_CLIENT_MESSAGES_RECEIVED 	DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_MESSAGES_RECEIVED_ST varchar(32) NOT NULL,
TOTAL_CLIENT_MESSAGES_TRANSMITTED DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_MESSAGES_TRANSMITTED_ST varchar(32) NOT NULL,
CLIENT_DIRECT_BYTES_RECEIVED 	DECIMAL(20,4) NOT NULL,
CLIENT_DIRECT_BYTES_RECEIVED_ST varchar(32) NOT NULL,
CLIENT_DIRECT_BYTES_TRANSMITTED DECIMAL(20,4) NOT NULL,
CLIENT_DIRECT_BYTES_TRANSMITTED_ST varchar(32) NOT NULL,
CLIENT_DIRECT_MESSAGES_RECEIVED DECIMAL(20,4) NOT NULL,
CLIENT_DIRECT_MESSAGES_RECEIVED_ST varchar(32) NOT NULL,
CLIENT_DIRECT_MESSAGES_TRANSMITTED 	DECIMAL(20,4) NOT NULL,
CLIENT_DIRECT_MESSAGES_TRANSMITTED_ST varchar(32) NOT NULL,
CLIENT_PERSISTENT_BYTES_RECEIVED DECIMAL(20,4) NOT NULL,
CLIENT_PERSISTENT_BYTES_RECEIVED_ST varchar(32) NOT NULL,
CLIENT_PERSISTENT_BYTES_TRANSMITTED DECIMAL(20,4) NOT NULL,
CLIENT_PERSISTENT_BYTES_TRANSMITTED_ST varchar(32) NOT NULL,
CLIENT_PERSISTENT_MESSAGES_RECEIVED DECIMAL(20,4) NOT NULL,
CLIENT_PERSISTENT_MESSAGES_RECEIVED_ST varchar(32) NOT NULL,
CLIENT_PERSISTENT_MESSAGES_TRANSMITTED DECIMAL(20,4) NOT NULL,
CLIENT_PERSISTENT_MESSAGES_TRANSMITTED_ST varchar(32) NOT NULL,
CLIENT_NON_PERSISTENT_BYTES_RECEIVED DECIMAL(20,4) NOT NULL,
CLIENT_NON_PERSISTENT_BYTES_RECEIVED_ST varchar(32) NOT NULL,
CLIENT_NON_PERSISTENT_BYTES_TRANSMITTED DECIMAL(20,4) NOT NULL,
CLIENT_NON_PERSISTENT_BYTES_TRANSMITTED_ST varchar(32) NOT NULL,
CLIENT_NON_PERSISTENT_MESSAGES_RECEIVED DECIMAL(20,4) NOT NULL,
CLIENT_NON_PERSISTENT_MESSAGES_RECEIVED_ST varchar(32) NOT NULL,
CLIENT_NONPERS_MSG_TRANS 		DECIMAL(20,4) NOT NULL,
CLIENT_NONPERS_MSG_TRANS_ST 	varchar(32) NOT NULL,
INGRESS_BYTE_RATE 				DECIMAL(20,4) NOT NULL,
INGRESS_BYTE_RATE_ST 			varchar(32) NOT NULL,
INGRESS_RATE 					DECIMAL(20,4) NOT NULL,
INGRESS_RATE_ST 				varchar(32) NOT NULL,
TOTAL_INGRESS_DISCARDS 			DECIMAL(20,4) NOT NULL,
TOTAL_INGRESS_DISCARDS_ST 		varchar(32) NOT NULL,
NO_SUBSCRIPTION_MATCH 			DECIMAL(20,4) NOT NULL,
NO_SUBSCRIPTION_MATCH_ST 		varchar(32) NOT NULL,
TOPIC_PARSE_ERROR 				DECIMAL(20,4) NOT NULL,
TOPIC_PARSE_ERROR_ST 			varchar(32) NOT NULL,
PARSE_ERROR 					DECIMAL(20,4) NOT NULL,
PARSE_ERROR_ST 					varchar(32) NOT NULL,
TOO_BIG_MESSAGES 				DECIMAL(20,4) NOT NULL,
TOO_BIG_MESSAGES_ST 			varchar(32) NOT NULL,
TTL_EXCEEDED 					DECIMAL(20,4) NOT NULL,
TTL_EXCEEDED_ST 				varchar(32) NOT NULL,
WEB_PARSE_ERROR 				DECIMAL(20,4) NOT NULL,
WEB_PARSE_ERROR_ST 				varchar(32) NOT NULL,
PUBLISH_TOPIC_ACL 				DECIMAL(20,4) NOT NULL,
PUBLISH_TOPIC_ACL_ST 			varchar(32) NOT NULL,
MESSAGESPOOL_DISCARDS 			DECIMAL(20,4) NOT NULL,
MESSAGESPOOL_DISCARDS_ST 		varchar(32) NOT NULL,
MESSAGE_PROMOTION_CONGESTION 	DECIMAL(20,4) NOT NULL,
MESSAGE_PROMOTION_CONGESTION_ST varchar(32) NOT NULL,
MESSAGESPOOL_CONGESTION 		DECIMAL(20,4) NOT NULL,
MESSAGESPOOL_CONGESTION_ST 		varchar(32) NOT NULL,
EGRESS_BYTE_RATE 				DECIMAL(20,4) NOT NULL,
EGRESS_BYTE_RATE_ST 			varchar(32) NOT NULL,
EGRESS_RATE 					DECIMAL(20,4) NOT NULL,
EGRESS_RATE_ST 					varchar(32) NOT NULL,
TOTAL_EGRESS_DISCARDS 			DECIMAL(20,4) NOT NULL,
TOTAL_EGRESS_DISCARDS_ST 		varchar(32) NOT NULL,
TRANSMIT_CONGESTION 			DECIMAL(20,4) NOT NULL,
TRANSMIT_CONGESTION_ST 			varchar(32) NOT NULL,
COMPRESSION_CONGESTION 			DECIMAL(20,4) NOT NULL,
COMPRESSION_CONGESTION_ST 		varchar(32) NOT NULL,
MESSAGES_ELIDED 				DECIMAL(20,4) NOT NULL,
MESSAGES_ELIDED_ST 				varchar(32) NOT NULL,
EGRESS_TTL_EXCEEDED 			DECIMAL(20,4) NOT NULL,
EGRESS_TTL_EXCEEDED_ST 			varchar(32) NOT NULL,
PAYLOAD_COULD_NOT_BE_FORMATTED DECIMAL(20,4) NOT NULL,
PAYLOAD_COULD_NOT_BE_FORMATTED_ST varchar(32) NOT NULL,
EGRESS_MESSAGE_PROMOTION_CONGESTION DECIMAL(20,4) NOT NULL,
EGRESS_MESSAGE_PROMOTION_CONGESTION_ST varchar(32) NOT NULL,
EGRESS_MESSAGESPOOL_CONGESTION DECIMAL(20,4) NOT NULL,
EGRESS_MESSAGESPOOL_CONGESTION_ST varchar(32) NOT NULL,
CLIENTS_NOT_CONNECTED 			DECIMAL(20,4) NOT NULL,
CLIENTS_NOT_CONNECTED_ST 		varchar(32) NOT NULL,
EGRESS_MESSAGESPOOL_DISCARDS 	DECIMAL(20,4) NOT NULL,
EGRESS_MESSAGESPOOL_DISCARDS_ST varchar(32) NOT NULL);

CREATE INDEX IDX_SolaceSysClientTest ON SolaceSysClientTest(MSMT_TIME);
ALTER TABLE SolaceSysClientTest ADD constraint PK_SolaceSysClientTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE SolaceSysClientTest_TREND;
CREATE TABLE SolaceSysClientTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
TOTAL_CLIENTS_MIN DECIMAL(20,4) NOT NULL,
TOTAL_CLIENTS_MAX DECIMAL(20,4) NOT NULL,
TOTAL_CLIENTS_STCNT varchar(32) NOT NULL,
CONNECTED_CLIENTS_MIN DECIMAL(20,4) NOT NULL,
CONNECTED_CLIENTS_MAX DECIMAL(20,4) NOT NULL,
CONNECTED_CLIENTS_STCNT varchar(32) NOT NULL,
MQTT_CLIENTS_CONNECTED_MIN DECIMAL(20,4) NOT NULL,
MQTT_CLIENTS_CONNECTED_MAX DECIMAL(20,4) NOT NULL,
MQTT_CLIENTS_CONNECTED_STCNT varchar(32) NOT NULL,
TOTAL_REST_CLIENTS_CONNECTED_MIN DECIMAL(20,4) NOT NULL,
TOTAL_REST_CLIENTS_CONNECTED_MAX DECIMAL(20,4) NOT NULL,
TOTAL_REST_CLIENTS_CONNECTED_STCNT varchar(32) NOT NULL,
TOTAL_SMF_CLIENTS_CONNECTED_MIN DECIMAL(20,4) NOT NULL,
TOTAL_SMF_CLIENTS_CONNECTED_MAX DECIMAL(20,4) NOT NULL,
TOTAL_SMF_CLIENTS_CONNECTED_STCNT varchar(32) NOT NULL,
TOTAL_WEB_SERVICE_CLIENTS_CONNECTED_MIN DECIMAL(20,4) NOT NULL,
TOTAL_WEB_SERVICE_CLIENTS_CONNECTED_MAX DECIMAL(20,4) NOT NULL,
TOTAL_WEB_SERVICE_CLIENTS_CONNECTED_STCNT varchar(32) NOT NULL,
TOTAL_CLIENTS_CONNECTED_WITH_COMPRESSION_MIN DECIMAL(20,4) NOT NULL,
TOTAL_CLIENTS_CONNECTED_WITH_COMPRESSION_MAX DECIMAL(20,4) NOT NULL,
TOTAL_CLIENTS_CONNECTED_WITH_COMPRESSION_STCNT varchar(32) NOT NULL,
TOTAL_SSL_CLIENTS_CONNECTED_MIN DECIMAL(20,4) NOT NULL,
TOTAL_SSL_CLIENTS_CONNECTED_MAX DECIMAL(20,4) NOT NULL,
TOTAL_SSL_CLIENTS_CONNECTED_STCNT varchar(32) NOT NULL,
TOTAL_CLIENT_BYTES_RECEIVED_MIN DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_BYTES_RECEIVED_MAX DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_BYTES_RECEIVED_STCNT varchar(32) NOT NULL,
TOTAL_CLIENT_BYTES_TRANSMITTED_MIN DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_BYTES_TRANSMITTED_MAX DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_BYTES_TRANSMITTED_STCNT varchar(32) NOT NULL,
TOTAL_CLIENT_MESSAGES_RECEIVED_MIN DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_MESSAGES_RECEIVED_MAX DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_MESSAGES_RECEIVED_STCNT varchar(32) NOT NULL,
TOTAL_CLIENT_MESSAGES_TRANSMITTED_MIN DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_MESSAGES_TRANSMITTED_MAX DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_MESSAGES_TRANSMITTED_STCNT varchar(32) NOT NULL,
CLIENT_DIRECT_BYTES_RECEIVED_MIN DECIMAL(20,4) NOT NULL,
CLIENT_DIRECT_BYTES_RECEIVED_MAX DECIMAL(20,4) NOT NULL,
CLIENT_DIRECT_BYTES_RECEIVED_STCNT varchar(32) NOT NULL,
CLIENT_DIRECT_BYTES_TRANSMITTED_MIN DECIMAL(20,4) NOT NULL,
CLIENT_DIRECT_BYTES_TRANSMITTED_MAX DECIMAL(20,4) NOT NULL,
CLIENT_DIRECT_BYTES_TRANSMITTED_STCNT varchar(32) NOT NULL,
CLIENT_DIRECT_MESSAGES_RECEIVED_MIN DECIMAL(20,4) NOT NULL,
CLIENT_DIRECT_MESSAGES_RECEIVED_MAX DECIMAL(20,4) NOT NULL,
CLIENT_DIRECT_MESSAGES_RECEIVED_STCNT varchar(32) NOT NULL,
CLIENT_DIRECT_MESSAGES_TRANSMITTED_MIN DECIMAL(20,4) NOT NULL,
CLIENT_DIRECT_MESSAGES_TRANSMITTED_MAX DECIMAL(20,4) NOT NULL,
CLIENT_DIRECT_MESSAGES_TRANSMITTED_STCNT varchar(32) NOT NULL,
CLIENT_PERSISTENT_BYTES_RECEIVED_MIN DECIMAL(20,4) NOT NULL,
CLIENT_PERSISTENT_BYTES_RECEIVED_MAX DECIMAL(20,4) NOT NULL,
CLIENT_PERSISTENT_BYTES_RECEIVED_STCNT varchar(32) NOT NULL,
CLIENT_PERSISTENT_BYTES_TRANSMITTED_MIN DECIMAL(20,4) NOT NULL,
CLIENT_PERSISTENT_BYTES_TRANSMITTED_MAX DECIMAL(20,4) NOT NULL,
CLIENT_PERSISTENT_BYTES_TRANSMITTED_STCNT varchar(32) NOT NULL,
CLIENT_PERSISTENT_MESSAGES_RECEIVED_MIN DECIMAL(20,4) NOT NULL,
CLIENT_PERSISTENT_MESSAGES_RECEIVED_MAX DECIMAL(20,4) NOT NULL,
CLIENT_PERSISTENT_MESSAGES_RECEIVED_STCNT varchar(32) NOT NULL,
CLIENT_PERSISTENT_MESSAGES_TRANSMITTED_MIN DECIMAL(20,4) NOT NULL,
CLIENT_PERSISTENT_MESSAGES_TRANSMITTED_MAX DECIMAL(20,4) NOT NULL,
CLIENT_PERSISTENT_MESSAGES_TRANSMITTED_STCNT varchar(32) NOT NULL,
CLIENT_NON_PERSISTENT_BYTES_RECEIVED_MIN DECIMAL(20,4) NOT NULL,
CLIENT_NON_PERSISTENT_BYTES_RECEIVED_MAX DECIMAL(20,4) NOT NULL,
CLIENT_NON_PERSISTENT_BYTES_RECEIVED_STCNT varchar(32) NOT NULL,
CLIENT_NON_PERSISTENT_BYTES_TRANSMITTED_MIN DECIMAL(20,4) NOT NULL,
CLIENT_NON_PERSISTENT_BYTES_TRANSMITTED_MAX DECIMAL(20,4) NOT NULL,
CLIENT_NON_PERSISTENT_BYTES_TRANSMITTED_STCNT varchar(32) NOT NULL,
CLIENT_NON_PERSISTENT_MESSAGES_RECEIVED_MIN DECIMAL(20,4) NOT NULL,
CLIENT_NON_PERSISTENT_MESSAGES_RECEIVED_MAX DECIMAL(20,4) NOT NULL,
CLIENT_NON_PERSISTENT_MESSAGES_RECEIVED_STCNT varchar(32) NOT NULL,
CLIENT_NONPERS_MSG_TRANS_MIN DECIMAL(20,4) NOT NULL,
CLIENT_NONPERS_MSG_TRANS_MAX DECIMAL(20,4) NOT NULL,
CLIENT_NONPERS_MSG_TRANS_STCNT varchar(32) NOT NULL,
INGRESS_BYTE_RATE_MIN DECIMAL(20,4) NOT NULL,
INGRESS_BYTE_RATE_MAX DECIMAL(20,4) NOT NULL,
INGRESS_BYTE_RATE_STCNT varchar(32) NOT NULL,
INGRESS_RATE_MIN DECIMAL(20,4) NOT NULL,
INGRESS_RATE_MAX DECIMAL(20,4) NOT NULL,
INGRESS_RATE_STCNT varchar(32) NOT NULL,
TOTAL_INGRESS_DISCARDS_MIN DECIMAL(20,4) NOT NULL,
TOTAL_INGRESS_DISCARDS_MAX DECIMAL(20,4) NOT NULL,
TOTAL_INGRESS_DISCARDS_STCNT varchar(32) NOT NULL,
NO_SUBSCRIPTION_MATCH_MIN DECIMAL(20,4) NOT NULL,
NO_SUBSCRIPTION_MATCH_MAX DECIMAL(20,4) NOT NULL,
NO_SUBSCRIPTION_MATCH_STCNT varchar(32) NOT NULL,
TOPIC_PARSE_ERROR_MIN DECIMAL(20,4) NOT NULL,
TOPIC_PARSE_ERROR_MAX DECIMAL(20,4) NOT NULL,
TOPIC_PARSE_ERROR_STCNT varchar(32) NOT NULL,
PARSE_ERROR_MIN DECIMAL(20,4) NOT NULL,
PARSE_ERROR_MAX DECIMAL(20,4) NOT NULL,
PARSE_ERROR_STCNT varchar(32) NOT NULL,
TOO_BIG_MESSAGES_MIN DECIMAL(20,4) NOT NULL,
TOO_BIG_MESSAGES_MAX DECIMAL(20,4) NOT NULL,
TOO_BIG_MESSAGES_STCNT varchar(32) NOT NULL,
TTL_EXCEEDED_MIN DECIMAL(20,4) NOT NULL,
TTL_EXCEEDED_MAX DECIMAL(20,4) NOT NULL,
TTL_EXCEEDED_STCNT varchar(32) NOT NULL,
WEB_PARSE_ERROR_MIN DECIMAL(20,4) NOT NULL,
WEB_PARSE_ERROR_MAX DECIMAL(20,4) NOT NULL,
WEB_PARSE_ERROR_STCNT varchar(32) NOT NULL,
PUBLISH_TOPIC_ACL_MIN DECIMAL(20,4) NOT NULL,
PUBLISH_TOPIC_ACL_MAX DECIMAL(20,4) NOT NULL,
PUBLISH_TOPIC_ACL_STCNT varchar(32) NOT NULL,
MESSAGESPOOL_DISCARDS_MIN DECIMAL(20,4) NOT NULL,
MESSAGESPOOL_DISCARDS_MAX DECIMAL(20,4) NOT NULL,
MESSAGESPOOL_DISCARDS_STCNT varchar(32) NOT NULL,
MESSAGE_PROMOTION_CONGESTION_MIN DECIMAL(20,4) NOT NULL,
MESSAGE_PROMOTION_CONGESTION_MAX DECIMAL(20,4) NOT NULL,
MESSAGE_PROMOTION_CONGESTION_STCNT varchar(32) NOT NULL,
MESSAGESPOOL_CONGESTION_MIN DECIMAL(20,4) NOT NULL,
MESSAGESPOOL_CONGESTION_MAX DECIMAL(20,4) NOT NULL,
MESSAGESPOOL_CONGESTION_STCNT varchar(32) NOT NULL,
EGRESS_BYTE_RATE_MIN DECIMAL(20,4) NOT NULL,
EGRESS_BYTE_RATE_MAX DECIMAL(20,4) NOT NULL,
EGRESS_BYTE_RATE_STCNT varchar(32) NOT NULL,
EGRESS_RATE_MIN DECIMAL(20,4) NOT NULL,
EGRESS_RATE_MAX DECIMAL(20,4) NOT NULL,
EGRESS_RATE_STCNT varchar(32) NOT NULL,
TOTAL_EGRESS_DISCARDS_MIN DECIMAL(20,4) NOT NULL,
TOTAL_EGRESS_DISCARDS_MAX DECIMAL(20,4) NOT NULL,
TOTAL_EGRESS_DISCARDS_STCNT varchar(32) NOT NULL,
TRANSMIT_CONGESTION_MIN DECIMAL(20,4) NOT NULL,
TRANSMIT_CONGESTION_MAX DECIMAL(20,4) NOT NULL,
TRANSMIT_CONGESTION_STCNT varchar(32) NOT NULL,
COMPRESSION_CONGESTION_MIN DECIMAL(20,4) NOT NULL,
COMPRESSION_CONGESTION_MAX DECIMAL(20,4) NOT NULL,
COMPRESSION_CONGESTION_STCNT varchar(32) NOT NULL,
MESSAGES_ELIDED_MIN DECIMAL(20,4) NOT NULL,
MESSAGES_ELIDED_MAX DECIMAL(20,4) NOT NULL,
MESSAGES_ELIDED_STCNT varchar(32) NOT NULL,
EGRESS_TTL_EXCEEDED_MIN DECIMAL(20,4) NOT NULL,
EGRESS_TTL_EXCEEDED_MAX DECIMAL(20,4) NOT NULL,
EGRESS_TTL_EXCEEDED_STCNT varchar(32) NOT NULL,
PAYLOAD_COULD_NOT_BE_FORMATTED_MIN DECIMAL(20,4) NOT NULL,
PAYLOAD_COULD_NOT_BE_FORMATTED_MAX DECIMAL(20,4) NOT NULL,
PAYLOAD_COULD_NOT_BE_FORMATTED_STCNT varchar(32) NOT NULL,
EGRESS_MESSAGE_PROMOTION_CONGESTION_MIN DECIMAL(20,4) NOT NULL,
EGRESS_MESSAGE_PROMOTION_CONGESTION_MAX DECIMAL(20,4) NOT NULL,
EGRESS_MESSAGE_PROMOTION_CONGESTION_STCNT varchar(32) NOT NULL,
EGRESS_MESSAGESPOOL_CONGESTION_MIN DECIMAL(20,4) NOT NULL,
EGRESS_MESSAGESPOOL_CONGESTION_MAX DECIMAL(20,4) NOT NULL,
EGRESS_MESSAGESPOOL_CONGESTION_STCNT varchar(32) NOT NULL,
CLIENTS_NOT_CONNECTED_MIN DECIMAL(20,4) NOT NULL,
CLIENTS_NOT_CONNECTED_MAX DECIMAL(20,4) NOT NULL,
CLIENTS_NOT_CONNECTED_STCNT varchar(32) NOT NULL,
EGRESS_MESSAGESPOOL_DISCARDS_MIN DECIMAL(20,4) NOT NULL,
EGRESS_MESSAGESPOOL_DISCARDS_MAX DECIMAL(20,4) NOT NULL,
EGRESS_MESSAGESPOOL_DISCARDS_STCNT varchar(32) NOT NULL);

ALTER TABLE SolaceSysClientTest_TREND ADD constraint PK_SolaceSysClientTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE SolaceSysClientTest_THRESH;
CREATE TABLE SolaceSysClientTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
TOTAL_CLIENTS_MIN VARCHAR(256) NOT NULL,
TOTAL_CLIENTS_MAX VARCHAR(256) NOT NULL,
CONNECTED_CLIENTS_MIN VARCHAR(256) NOT NULL,
CONNECTED_CLIENTS_MAX VARCHAR(256) NOT NULL,
MQTT_CLIENTS_CONNECTED_MIN VARCHAR(256) NOT NULL,
MQTT_CLIENTS_CONNECTED_MAX VARCHAR(256) NOT NULL,
TOTAL_REST_CLIENTS_CONNECTED_MIN VARCHAR(256) NOT NULL,
TOTAL_REST_CLIENTS_CONNECTED_MAX VARCHAR(256) NOT NULL,
TOTAL_SMF_CLIENTS_CONNECTED_MIN VARCHAR(256) NOT NULL,
TOTAL_SMF_CLIENTS_CONNECTED_MAX VARCHAR(256) NOT NULL,
TOTAL_WEB_SERVICE_CLIENTS_CONNECTED_MIN VARCHAR(256) NOT NULL,
TOTAL_WEB_SERVICE_CLIENTS_CONNECTED_MAX VARCHAR(256) NOT NULL,
TOTAL_CLIENTS_CONNECTED_WITH_COMPRESSION_MIN VARCHAR(256) NOT NULL,
TOTAL_CLIENTS_CONNECTED_WITH_COMPRESSION_MAX VARCHAR(256) NOT NULL,
TOTAL_SSL_CLIENTS_CONNECTED_MIN VARCHAR(256) NOT NULL,
TOTAL_SSL_CLIENTS_CONNECTED_MAX VARCHAR(256) NOT NULL,
TOTAL_CLIENT_BYTES_RECEIVED_MIN VARCHAR(256) NOT NULL,
TOTAL_CLIENT_BYTES_RECEIVED_MAX VARCHAR(256) NOT NULL,
TOTAL_CLIENT_BYTES_TRANSMITTED_MIN VARCHAR(256) NOT NULL,
TOTAL_CLIENT_BYTES_TRANSMITTED_MAX VARCHAR(256) NOT NULL,
TOTAL_CLIENT_MESSAGES_RECEIVED_MIN VARCHAR(256) NOT NULL,
TOTAL_CLIENT_MESSAGES_RECEIVED_MAX VARCHAR(256) NOT NULL,
TOTAL_CLIENT_MESSAGES_TRANSMITTED_MIN VARCHAR(256) NOT NULL,
TOTAL_CLIENT_MESSAGES_TRANSMITTED_MAX VARCHAR(256) NOT NULL,
CLIENT_DIRECT_BYTES_RECEIVED_MIN VARCHAR(256) NOT NULL,
CLIENT_DIRECT_BYTES_RECEIVED_MAX VARCHAR(256) NOT NULL,
CLIENT_DIRECT_BYTES_TRANSMITTED_MIN VARCHAR(256) NOT NULL,
CLIENT_DIRECT_BYTES_TRANSMITTED_MAX VARCHAR(256) NOT NULL,
CLIENT_DIRECT_MESSAGES_RECEIVED_MIN VARCHAR(256) NOT NULL,
CLIENT_DIRECT_MESSAGES_RECEIVED_MAX VARCHAR(256) NOT NULL,
CLIENT_DIRECT_MESSAGES_TRANSMITTED_MIN VARCHAR(256) NOT NULL,
CLIENT_DIRECT_MESSAGES_TRANSMITTED_MAX VARCHAR(256) NOT NULL,
CLIENT_PERSISTENT_BYTES_RECEIVED_MIN VARCHAR(256) NOT NULL,
CLIENT_PERSISTENT_BYTES_RECEIVED_MAX VARCHAR(256) NOT NULL,
CLIENT_PERSISTENT_BYTES_TRANSMITTED_MIN VARCHAR(256) NOT NULL,
CLIENT_PERSISTENT_BYTES_TRANSMITTED_MAX VARCHAR(256) NOT NULL,
CLIENT_PERSISTENT_MESSAGES_RECEIVED_MIN VARCHAR(256) NOT NULL,
CLIENT_PERSISTENT_MESSAGES_RECEIVED_MAX VARCHAR(256) NOT NULL,
CLIENT_PERSISTENT_MESSAGES_TRANSMITTED_MIN VARCHAR(256) NOT NULL,
CLIENT_PERSISTENT_MESSAGES_TRANSMITTED_MAX VARCHAR(256) NOT NULL,
CLIENT_NON_PERSISTENT_BYTES_RECEIVED_MIN VARCHAR(256) NOT NULL,
CLIENT_NON_PERSISTENT_BYTES_RECEIVED_MAX VARCHAR(256) NOT NULL,
CLIENT_NON_PERSISTENT_BYTES_TRANSMITTED_MIN VARCHAR(256) NOT NULL,
CLIENT_NON_PERSISTENT_BYTES_TRANSMITTED_MAX VARCHAR(256) NOT NULL,
CLIENT_NON_PERSISTENT_MESSAGES_RECEIVED_MIN VARCHAR(256) NOT NULL,
CLIENT_NON_PERSISTENT_MESSAGES_RECEIVED_MAX VARCHAR(256) NOT NULL,
CLIENT_NONPERS_MSG_TRANS_MIN VARCHAR(256) NOT NULL,
CLIENT_NONPERS_MSG_TRANS_MAX VARCHAR(256) NOT NULL,
INGRESS_BYTE_RATE_MIN VARCHAR(256) NOT NULL,
INGRESS_BYTE_RATE_MAX VARCHAR(256) NOT NULL,
INGRESS_RATE_MIN VARCHAR(256) NOT NULL,
INGRESS_RATE_MAX VARCHAR(256) NOT NULL,
TOTAL_INGRESS_DISCARDS_MIN VARCHAR(256) NOT NULL,
TOTAL_INGRESS_DISCARDS_MAX VARCHAR(256) NOT NULL,
NO_SUBSCRIPTION_MATCH_MIN VARCHAR(256) NOT NULL,
NO_SUBSCRIPTION_MATCH_MAX VARCHAR(256) NOT NULL,
TOPIC_PARSE_ERROR_MIN VARCHAR(256) NOT NULL,
TOPIC_PARSE_ERROR_MAX VARCHAR(256) NOT NULL,
PARSE_ERROR_MIN VARCHAR(256) NOT NULL,
PARSE_ERROR_MAX VARCHAR(256) NOT NULL,
TOO_BIG_MESSAGES_MIN VARCHAR(256) NOT NULL,
TOO_BIG_MESSAGES_MAX VARCHAR(256) NOT NULL,
TTL_EXCEEDED_MIN VARCHAR(256) NOT NULL,
TTL_EXCEEDED_MAX VARCHAR(256) NOT NULL,
WEB_PARSE_ERROR_MIN VARCHAR(256) NOT NULL,
WEB_PARSE_ERROR_MAX VARCHAR(256) NOT NULL,
PUBLISH_TOPIC_ACL_MIN VARCHAR(256) NOT NULL,
PUBLISH_TOPIC_ACL_MAX VARCHAR(256) NOT NULL,
MESSAGESPOOL_DISCARDS_MIN VARCHAR(256) NOT NULL,
MESSAGESPOOL_DISCARDS_MAX VARCHAR(256) NOT NULL,
MESSAGE_PROMOTION_CONGESTION_MIN VARCHAR(256) NOT NULL,
MESSAGE_PROMOTION_CONGESTION_MAX VARCHAR(256) NOT NULL,
MESSAGESPOOL_CONGESTION_MIN VARCHAR(256) NOT NULL,
MESSAGESPOOL_CONGESTION_MAX VARCHAR(256) NOT NULL,
EGRESS_BYTE_RATE_MIN VARCHAR(256) NOT NULL,
EGRESS_BYTE_RATE_MAX VARCHAR(256) NOT NULL,
EGRESS_RATE_MIN VARCHAR(256) NOT NULL,
EGRESS_RATE_MAX VARCHAR(256) NOT NULL,
TOTAL_EGRESS_DISCARDS_MIN VARCHAR(256) NOT NULL,
TOTAL_EGRESS_DISCARDS_MAX VARCHAR(256) NOT NULL,
TRANSMIT_CONGESTION_MIN VARCHAR(256) NOT NULL,
TRANSMIT_CONGESTION_MAX VARCHAR(256) NOT NULL,
COMPRESSION_CONGESTION_MIN VARCHAR(256) NOT NULL,
COMPRESSION_CONGESTION_MAX VARCHAR(256) NOT NULL,
MESSAGES_ELIDED_MIN VARCHAR(256) NOT NULL,
MESSAGES_ELIDED_MAX VARCHAR(256) NOT NULL,
EGRESS_TTL_EXCEEDED_MIN VARCHAR(256) NOT NULL,
EGRESS_TTL_EXCEEDED_MAX VARCHAR(256) NOT NULL,
PAYLOAD_COULD_NOT_BE_FORMATTED_MIN VARCHAR(256) NOT NULL,
PAYLOAD_COULD_NOT_BE_FORMATTED_MAX VARCHAR(256) NOT NULL,
EGRESS_MESSAGE_PROMOTION_CONGESTION_MIN VARCHAR(256) NOT NULL,
EGRESS_MESSAGE_PROMOTION_CONGESTION_MAX VARCHAR(256) NOT NULL,
EGRESS_MESSAGESPOOL_CONGESTION_MIN VARCHAR(256) NOT NULL,
EGRESS_MESSAGESPOOL_CONGESTION_MAX VARCHAR(256) NOT NULL,
CLIENTS_NOT_CONNECTED_MIN VARCHAR(256) NOT NULL,
CLIENTS_NOT_CONNECTED_MAX VARCHAR(256) NOT NULL,
EGRESS_MESSAGESPOOL_DISCARDS_MIN VARCHAR(256) NOT NULL,
EGRESS_MESSAGESPOOL_DISCARDS_MAX VARCHAR(256) NOT NULL);

ALTER TABLE SolaceSysClientTest_THRESH ADD constraint PK_SolaceSysClientTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_SolaceSysClientTest_THRESH ON SolaceSysClientTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_SolaceSysClientTest ON SolaceSysClientTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_SolaceSysClientTest ON SolaceSysClientTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE SolaceSysHelthTest;
CREATE TABLE SolaceSysHelthTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
DISK_LATENCY DECIMAL(20,4) NOT NULL,
DISK_LATENCY_ST varchar(32) NOT NULL,
MATE_LINK_LATENCY DECIMAL(20,4) NOT NULL,
MATE_LINK_LATENCY_ST varchar(32) NOT NULL,
COMPUTE_LATENCY DECIMAL(20,4) NOT NULL,
COMPUTE_LATENCY_ST varchar(32) NOT NULL,
NETWORK_LATENCY DECIMAL(20,4) NOT NULL,
NETWORK_LATENCY_ST varchar(32) NOT NULL);

CREATE INDEX IDX_SolaceSysHelthTest ON SolaceSysHelthTest(MSMT_TIME);
ALTER TABLE SolaceSysHelthTest ADD constraint PK_SolaceSysHelthTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE SolaceSysHelthTest_TREND;
CREATE TABLE SolaceSysHelthTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
DISK_LATENCY_MIN DECIMAL(20,4) NOT NULL,
DISK_LATENCY_MAX DECIMAL(20,4) NOT NULL,
DISK_LATENCY_STCNT varchar(32) NOT NULL,
MATE_LINK_LATENCY_MIN DECIMAL(20,4) NOT NULL,
MATE_LINK_LATENCY_MAX DECIMAL(20,4) NOT NULL,
MATE_LINK_LATENCY_STCNT varchar(32) NOT NULL,
COMPUTE_LATENCY_MIN DECIMAL(20,4) NOT NULL,
COMPUTE_LATENCY_MAX DECIMAL(20,4) NOT NULL,
COMPUTE_LATENCY_STCNT varchar(32) NOT NULL,
NETWORK_LATENCY_MIN DECIMAL(20,4) NOT NULL,
NETWORK_LATENCY_MAX DECIMAL(20,4) NOT NULL,
NETWORK_LATENCY_STCNT varchar(32) NOT NULL);

ALTER TABLE SolaceSysHelthTest_TREND ADD constraint PK_SolaceSysHelthTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE SolaceSysHelthTest_THRESH;
CREATE TABLE SolaceSysHelthTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
DISK_LATENCY_MIN VARCHAR(256) NOT NULL,
DISK_LATENCY_MAX VARCHAR(256) NOT NULL,
MATE_LINK_LATENCY_MIN VARCHAR(256) NOT NULL,
MATE_LINK_LATENCY_MAX VARCHAR(256) NOT NULL,
COMPUTE_LATENCY_MIN VARCHAR(256) NOT NULL,
COMPUTE_LATENCY_MAX VARCHAR(256) NOT NULL,
NETWORK_LATENCY_MIN VARCHAR(256) NOT NULL,
NETWORK_LATENCY_MAX VARCHAR(256) NOT NULL);

ALTER TABLE SolaceSysHelthTest_THRESH ADD constraint PK_SolaceSysHelthTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_SolaceSysHelthTest_THRESH ON SolaceSysHelthTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_SolaceSysHelthTest ON SolaceSysHelthTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_SolaceSysHelthTest ON SolaceSysHelthTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE SolaceVltSensorTest;
CREATE TABLE SolaceVltSensorTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
STATUS DECIMAL(20,4) NOT NULL,
STATUS_ST varchar(32) NOT NULL,
VALUE DECIMAL(20,4) NOT NULL,
VALUE_ST varchar(32) NOT NULL);

CREATE INDEX IDX_SolaceVltSensorTest ON SolaceVltSensorTest(MSMT_TIME);
ALTER TABLE SolaceVltSensorTest ADD constraint PK_SolaceVltSensorTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE SolaceVltSensorTest_TREND;
CREATE TABLE SolaceVltSensorTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
STATUS_MIN DECIMAL(20,4) NOT NULL,
STATUS_MAX DECIMAL(20,4) NOT NULL,
STATUS_STCNT varchar(32) NOT NULL,
VALUE_MIN DECIMAL(20,4) NOT NULL,
VALUE_MAX DECIMAL(20,4) NOT NULL,
VALUE_STCNT varchar(32) NOT NULL);

ALTER TABLE SolaceVltSensorTest_TREND ADD constraint PK_SolaceVltSensorTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE SolaceVltSensorTest_THRESH;
CREATE TABLE SolaceVltSensorTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
STATUS_MIN VARCHAR(256) NOT NULL,
STATUS_MAX VARCHAR(256) NOT NULL,
VALUE_MIN VARCHAR(256) NOT NULL,
VALUE_MAX VARCHAR(256) NOT NULL);

ALTER TABLE SolaceVltSensorTest_THRESH ADD constraint PK_SolaceVltSensorTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_SolaceVltSensorTest_THRESH ON SolaceVltSensorTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_SolaceVltSensorTest ON SolaceVltSensorTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_SolaceVltSensorTest ON SolaceVltSensorTest_TREND (MSMT_TIME,PERIOD);


DROP TABLE SolaceTmpSensorTest;
CREATE TABLE SolaceTmpSensorTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
STATUS DECIMAL(20,4) NOT NULL,
STATUS_ST varchar(32) NOT NULL,
VALUE DECIMAL(20,4) NOT NULL,
VALUE_ST varchar(32) NOT NULL);

CREATE INDEX IDX_SolaceTmpSensorTest ON SolaceTmpSensorTest(MSMT_TIME);
ALTER TABLE SolaceTmpSensorTest ADD constraint PK_SolaceTmpSensorTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE SolaceTmpSensorTest_TREND;
CREATE TABLE SolaceTmpSensorTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
STATUS_MIN DECIMAL(20,4) NOT NULL,
STATUS_MAX DECIMAL(20,4) NOT NULL,
STATUS_STCNT varchar(32) NOT NULL,
VALUE_MIN DECIMAL(20,4) NOT NULL,
VALUE_MAX DECIMAL(20,4) NOT NULL,
VALUE_STCNT varchar(32) NOT NULL);

ALTER TABLE SolaceTmpSensorTest_TREND ADD constraint PK_SolaceTmpSensorTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE SolaceTmpSensorTest_THRESH;
CREATE TABLE SolaceTmpSensorTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
STATUS_MIN VARCHAR(256) NOT NULL,
STATUS_MAX VARCHAR(256) NOT NULL,
VALUE_MIN VARCHAR(256) NOT NULL,
VALUE_MAX VARCHAR(256) NOT NULL);

ALTER TABLE SolaceTmpSensorTest_THRESH ADD constraint PK_SolaceTmpSensorTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_SolaceTmpSensorTest_THRESH ON SolaceTmpSensorTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_SolaceTmpSensorTest ON SolaceTmpSensorTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_SolaceTmpSensorTest ON SolaceTmpSensorTest_TREND (MSMT_TIME,PERIOD);


DROP TABLE SolaceFanSensorTest;
CREATE TABLE SolaceFanSensorTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
STATUS DECIMAL(20,4) NOT NULL,
STATUS_ST varchar(32) NOT NULL,
VALUE DECIMAL(20,4) NOT NULL,
VALUE_ST varchar(32) NOT NULL);

CREATE INDEX IDX_SolaceFanSensorTest ON SolaceFanSensorTest(MSMT_TIME);
ALTER TABLE SolaceFanSensorTest ADD constraint PK_SolaceFanSensorTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE SolaceFanSensorTest_TREND;
CREATE TABLE SolaceFanSensorTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
STATUS_MIN DECIMAL(20,4) NOT NULL,
STATUS_MAX DECIMAL(20,4) NOT NULL,
STATUS_STCNT varchar(32) NOT NULL,
VALUE_MIN DECIMAL(20,4) NOT NULL,
VALUE_MAX DECIMAL(20,4) NOT NULL,
VALUE_STCNT varchar(32) NOT NULL);

ALTER TABLE SolaceFanSensorTest_TREND ADD constraint PK_SolaceFanSensorTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE SolaceFanSensorTest_THRESH;
CREATE TABLE SolaceFanSensorTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
STATUS_MIN VARCHAR(256) NOT NULL,
STATUS_MAX VARCHAR(256) NOT NULL,
VALUE_MIN VARCHAR(256) NOT NULL,
VALUE_MAX VARCHAR(256) NOT NULL);

ALTER TABLE SolaceFanSensorTest_THRESH ADD constraint PK_SolaceFanSensorTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_SolaceFanSensorTest_THRESH ON SolaceFanSensorTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_SolaceFanSensorTest ON SolaceFanSensorTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_SolaceFanSensorTest ON SolaceFanSensorTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE SolaceMsgVPNQueTest;
CREATE TABLE SolaceMsgVPNQueTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
INGRESS_CONFIG_STATE DECIMAL(20,4) NOT NULL,
INGRESS_CONFIG_STATE_ST varchar(32) NOT NULL,
EGRESS_CONFIG_STATE DECIMAL(20,4) NOT NULL,
EGRESS_CONFIG_STATE_ST varchar(32) NOT NULL,
ACCESS_TYPE DECIMAL(20,4) NOT NULL,
ACCESS_TYPE_ST varchar(32) NOT NULL,
SELECTOR DECIMAL(20,4) NOT NULL,
SELECTOR_ST varchar(32) NOT NULL,
REDUNDANCY DECIMAL(20,4) NOT NULL,
REDUNDANCY_ST varchar(32) NOT NULL,
DURABILITY DECIMAL(20,4) NOT NULL,
DURABILITY_ST varchar(32) NOT NULL,
PRIORITY DECIMAL(20,4) NOT NULL,
PRIORITY_ST varchar(32) NOT NULL,
TOTAL_TOPIC_SUBSCRIPTION DECIMAL(20,4) NOT NULL,
TOTAL_TOPIC_SUBSCRIPTION_ST varchar(32) NOT NULL,
HIGH_WATERMARK_DATA DECIMAL(20,4) NOT NULL,
HIGH_WATERMARK_DATA_ST varchar(32) NOT NULL,
TOTAL_MSG_SPOOLED DECIMAL(20,4) NOT NULL,
TOTAL_MSG_SPOOLED_ST varchar(32) NOT NULL,
MSGSPOOL_USAGE DECIMAL(20,4) NOT NULL,
MSGSPOOL_USAGE_ST varchar(32) NOT NULL,
MSGSPOOL_QUOTA_CONFIG DECIMAL(20,4) NOT NULL,
MSGSPOOL_QUOTA_CONFIG_ST varchar(32) NOT NULL,
QUEUE_PCT_USED DECIMAL(20,4) NOT NULL,
QUEUE_PCT_USED_ST varchar(32) NOT NULL,
CURR_CONSUMER_COUNT DECIMAL(20,4) NOT NULL,
CURR_CONSUMER_COUNT_ST varchar(32) NOT NULL,
NEW_CONSUMER_COUNT DECIMAL(20,4) NOT NULL,
NEW_CONSUMER_COUNT_ST varchar(32) NOT NULL,
DISCONN_CONSUMER_COUNT DECIMAL(20,4) NOT NULL,
DISCONN_CONSUMER_COUNT_ST varchar(32) NOT NULL,
MAX_CONSUMER_CONFIG DECIMAL(20,4) NOT NULL,
MAX_CONSUMER_CONFIG_ST varchar(32) NOT NULL,
CONSUMER_PCT_USED DECIMAL(20,4) NOT NULL,
CONSUMER_PCT_USED_ST varchar(32) NOT NULL,
TOTAL_DELIVERED_UNACK_MSG DECIMAL(20,4) NOT NULL,
TOTAL_DELIVERED_UNACK_MSG_ST varchar(32) NOT NULL,
CURR_TOTAL_ACK_PROCESSED DECIMAL(20,4) NOT NULL,
CURR_TOTAL_ACK_PROCESSED_ST varchar(32) NOT NULL,
MSG_AGING DECIMAL(20,4) NOT NULL,
MSG_AGING_ST varchar(32) NOT NULL,
CURR_INGR_BYTE_RATE DECIMAL(20,4) NOT NULL,
CURR_INGR_BYTE_RATE_ST varchar(32) NOT NULL,
CURR_INGR_RATE DECIMAL(20,4) NOT NULL,
CURR_INGR_RATE_ST varchar(32) NOT NULL,
CURR_EGR_BYTE_RATE DECIMAL(20,4) NOT NULL,
CURR_EGR_BYTE_RATE_ST varchar(32) NOT NULL,
CURR_EGR_RATE DECIMAL(20,4) NOT NULL,
CURR_EGR_RATE_ST varchar(32) NOT NULL,
AVG_INGR_BYTE_RATE DECIMAL(20,4) NOT NULL,
AVG_INGR_BYTE_RATE_ST varchar(32) NOT NULL,
AVG_INGR_RATE DECIMAL(20,4) NOT NULL,
AVG_INGR_RATE_ST varchar(32) NOT NULL,
AVG_EGR_BYTE_RATE DECIMAL(20,4) NOT NULL,
AVG_EGR_BYTE_RATE_ST varchar(32) NOT NULL,
AVG_EGR_RATE DECIMAL(20,4) NOT NULL,
AVG_EGR_RATE_ST varchar(32) NOT NULL,
ACK_PROP_MSG_SENT DECIMAL(20,4) NOT NULL,
ACK_PROP_MSG_SENT_ST varchar(32) NOT NULL,
ACK_PROP_MSG_RCVD DECIMAL(20,4) NOT NULL,
ACK_PROP_MSG_RCVD_ST varchar(32) NOT NULL,
MSG_ACKD_VIA_ACK_PROP DECIMAL(20,4) NOT NULL,
MSG_ACKD_VIA_ACK_PROP_ST varchar(32) NOT NULL,
MSG_RCVD_FRM_ACTIVE DECIMAL(20,4) NOT NULL,
MSG_RCVD_FRM_ACTIVE_ST varchar(32) NOT NULL,
REPLY_START DECIMAL(20,4) NOT NULL,
REPLY_START_ST varchar(32) NOT NULL,
REPLY_SUCC DECIMAL(20,4) NOT NULL,
REPLY_SUCC_ST varchar(32) NOT NULL,
REPLY_FAIL DECIMAL(20,4) NOT NULL,
REPLY_FAIL_ST varchar(32) NOT NULL,
REPLY_MSG_SENT DECIMAL(20,4) NOT NULL,
REPLY_MSG_SENT_ST varchar(32) NOT NULL,
REPLY_MSG_ACKD DECIMAL(20,4) NOT NULL,
REPLY_MSG_ACKD_ST varchar(32) NOT NULL,
CONN_BIND_ATTEMPT DECIMAL(20,4) NOT NULL,
CONN_BIND_ATTEMPT_ST varchar(32) NOT NULL,
CONN_BIND_SUCC DECIMAL(20,4) NOT NULL,
CONN_BIND_SUCC_ST varchar(32) NOT NULL,
CONN_BIND_FAIL_ALRDY_BIND DECIMAL(20,4) NOT NULL,
CONN_BIND_FAIL_ALRDY_BIND_ST varchar(32) NOT NULL,
CONN_BIND_FAIL_QUEUE_DISABLED DECIMAL(20,4) NOT NULL,
CONN_BIND_FAIL_QUEUE_DISABLED_ST varchar(32) NOT NULL,
CONN_BIND_INVLD_SELCTR DECIMAL(20,4) NOT NULL,
CONN_BIND_INVLD_SELCTR_ST varchar(32) NOT NULL,
CONN_BIND_FAIL_MAX_BIND_CNT_EXCD DECIMAL(20,4) NOT NULL,
CONN_BIND_FAIL_MAX_BIND_CNT_EXCD_ST varchar(32) NOT NULL,
CONN_BIND_FAIL_OTHER DECIMAL(20,4) NOT NULL,
CONN_BIND_FAIL_OTHER_ST varchar(32) NOT NULL,
IMNQ_QUOTA_EXCEED DECIMAL(20,4) NOT NULL,
IMNQ_QUOTA_EXCEED_ST varchar(32) NOT NULL,
IMNQ_MAX_MSG_SIZE_EXCEED DECIMAL(20,4) NOT NULL,
IMNQ_MAX_MSG_SIZE_EXCEED_ST varchar(32) NOT NULL,
IMNQ_FAIL_QUEUE_DISABLE DECIMAL(20,4) NOT NULL,
IMNQ_FAIL_QUEUE_DISABLE_ST varchar(32) NOT NULL,
IMNQ_DND_CLIENT_PROF DECIMAL(20,4) NOT NULL,
IMNQ_DND_CLIENT_PROF_ST varchar(32) NOT NULL,
IMNQ_NOLCL_DLVRY_DISCD DECIMAL(20,4) NOT NULL,
IMNQ_NOLCL_DLVRY_DISCD_ST varchar(32) NOT NULL,
IMNQ_DST_GRP_ERR DECIMAL(20,4) NOT NULL,
IMNQ_DST_GRP_ERR_ST varchar(32) NOT NULL,
IMNQ_LOW_PRTY_CONGEST DECIMAL(20,4) NOT NULL,
IMNQ_LOW_PRTY_CONGEST_ST varchar(32) NOT NULL,
MRFQ_DEL_MSG DECIMAL(20,4) NOT NULL,
MRFQ_DEL_MSG_ST varchar(32) NOT NULL,
MRFQ_DISCD_EXPIRY DECIMAL(20,4) NOT NULL,
MRFQ_DISCD_EXPIRY_ST varchar(32) NOT NULL,
MRFQ_MVD_TO_DMQ DECIMAL(20,4) NOT NULL,
MRFQ_MVD_TO_DMQ_ST varchar(32) NOT NULL,
MRFQ_MVD_TO_DMQ_FAIL DECIMAL(20,4) NOT NULL,
MRFQ_MVD_TO_DMQ_FAIL_ST varchar(32) NOT NULL,
MRFQ_DISCD_MAX_REDLVR DECIMAL(20,4) NOT NULL,
MRFQ_DISCD_MAX_REDLVR_ST varchar(32) NOT NULL,
MRFQ_MVD_DMQ_MAX_REDLV DECIMAL(20,4) NOT NULL,
MRFQ_MVD_DMQ_MAX_REDLV_ST varchar(32) NOT NULL,
MRFQ_MVD_DMQ_FAIL_MAX_REDLV DECIMAL(20,4) NOT NULL,
MRFQ_MVD_DMQ_FAIL_MAX_REDLV_ST varchar(32) NOT NULL,
MRFQ_DSCD_TTL_EXCEED DECIMAL(20,4) NOT NULL,
MRFQ_DSCD_TTL_EXCEED_ST varchar(32) NOT NULL);

CREATE INDEX IDX_SolaceMsgVPNQueTest ON SolaceMsgVPNQueTest(MSMT_TIME);
ALTER TABLE SolaceMsgVPNQueTest ADD constraint PK_SolaceMsgVPNQueTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE SolaceMsgVPNQueTest_TREND;
CREATE TABLE SolaceMsgVPNQueTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
INGRESS_CONFIG_STATE_MIN DECIMAL(20,4) NOT NULL,
INGRESS_CONFIG_STATE_MAX DECIMAL(20,4) NOT NULL,
INGRESS_CONFIG_STATE_STCNT varchar(32) NOT NULL,
EGRESS_CONFIG_STATE_MIN DECIMAL(20,4) NOT NULL,
EGRESS_CONFIG_STATE_MAX DECIMAL(20,4) NOT NULL,
EGRESS_CONFIG_STATE_STCNT varchar(32) NOT NULL,
ACCESS_TYPE_MIN DECIMAL(20,4) NOT NULL,
ACCESS_TYPE_MAX DECIMAL(20,4) NOT NULL,
ACCESS_TYPE_STCNT varchar(32) NOT NULL,
SELECTOR_MIN DECIMAL(20,4) NOT NULL,
SELECTOR_MAX DECIMAL(20,4) NOT NULL,
SELECTOR_STCNT varchar(32) NOT NULL,
REDUNDANCY_MIN DECIMAL(20,4) NOT NULL,
REDUNDANCY_MAX DECIMAL(20,4) NOT NULL,
REDUNDANCY_STCNT varchar(32) NOT NULL,
DURABILITY_MIN DECIMAL(20,4) NOT NULL,
DURABILITY_MAX DECIMAL(20,4) NOT NULL,
DURABILITY_STCNT varchar(32) NOT NULL,
PRIORITY_MIN DECIMAL(20,4) NOT NULL,
PRIORITY_MAX DECIMAL(20,4) NOT NULL,
PRIORITY_STCNT varchar(32) NOT NULL,
TOTAL_TOPIC_SUBSCRIPTION_MIN DECIMAL(20,4) NOT NULL,
TOTAL_TOPIC_SUBSCRIPTION_MAX DECIMAL(20,4) NOT NULL,
TOTAL_TOPIC_SUBSCRIPTION_STCNT varchar(32) NOT NULL,
HIGH_WATERMARK_DATA_MIN DECIMAL(20,4) NOT NULL,
HIGH_WATERMARK_DATA_MAX DECIMAL(20,4) NOT NULL,
HIGH_WATERMARK_DATA_STCNT varchar(32) NOT NULL,
TOTAL_MSG_SPOOLED_MIN DECIMAL(20,4) NOT NULL,
TOTAL_MSG_SPOOLED_MAX DECIMAL(20,4) NOT NULL,
TOTAL_MSG_SPOOLED_STCNT varchar(32) NOT NULL,
MSGSPOOL_USAGE_MIN DECIMAL(20,4) NOT NULL,
MSGSPOOL_USAGE_MAX DECIMAL(20,4) NOT NULL,
MSGSPOOL_USAGE_STCNT varchar(32) NOT NULL,
MSGSPOOL_QUOTA_CONFIG_MIN DECIMAL(20,4) NOT NULL,
MSGSPOOL_QUOTA_CONFIG_MAX DECIMAL(20,4) NOT NULL,
MSGSPOOL_QUOTA_CONFIG_STCNT varchar(32) NOT NULL,
QUEUE_PCT_USED_MIN DECIMAL(20,4) NOT NULL,
QUEUE_PCT_USED_MAX DECIMAL(20,4) NOT NULL,
QUEUE_PCT_USED_STCNT varchar(32) NOT NULL,
CURR_CONSUMER_COUNT_MIN DECIMAL(20,4) NOT NULL,
CURR_CONSUMER_COUNT_MAX DECIMAL(20,4) NOT NULL,
CURR_CONSUMER_COUNT_STCNT varchar(32) NOT NULL,
NEW_CONSUMER_COUNT_MIN DECIMAL(20,4) NOT NULL,
NEW_CONSUMER_COUNT_MAX DECIMAL(20,4) NOT NULL,
NEW_CONSUMER_COUNT_STCNT varchar(32) NOT NULL,
DISCONN_CONSUMER_COUNT_MIN DECIMAL(20,4) NOT NULL,
DISCONN_CONSUMER_COUNT_MAX DECIMAL(20,4) NOT NULL,
DISCONN_CONSUMER_COUNT_STCNT varchar(32) NOT NULL,
MAX_CONSUMER_CONFIG_MIN DECIMAL(20,4) NOT NULL,
MAX_CONSUMER_CONFIG_MAX DECIMAL(20,4) NOT NULL,
MAX_CONSUMER_CONFIG_STCNT varchar(32) NOT NULL,
CONSUMER_PCT_USED_MIN DECIMAL(20,4) NOT NULL,
CONSUMER_PCT_USED_MAX DECIMAL(20,4) NOT NULL,
CONSUMER_PCT_USED_STCNT varchar(32) NOT NULL,
TOTAL_DELIVERED_UNACK_MSG_MIN DECIMAL(20,4) NOT NULL,
TOTAL_DELIVERED_UNACK_MSG_MAX DECIMAL(20,4) NOT NULL,
TOTAL_DELIVERED_UNACK_MSG_STCNT varchar(32) NOT NULL,
CURR_TOTAL_ACK_PROCESSED_MIN DECIMAL(20,4) NOT NULL,
CURR_TOTAL_ACK_PROCESSED_MAX DECIMAL(20,4) NOT NULL,
CURR_TOTAL_ACK_PROCESSED_STCNT varchar(32) NOT NULL,
MSG_AGING_MIN DECIMAL(20,4) NOT NULL,
MSG_AGING_MAX DECIMAL(20,4) NOT NULL,
MSG_AGING_STCNT varchar(32) NOT NULL,
CURR_INGR_BYTE_RATE_MIN DECIMAL(20,4) NOT NULL,
CURR_INGR_BYTE_RATE_MAX DECIMAL(20,4) NOT NULL,
CURR_INGR_BYTE_RATE_STCNT varchar(32) NOT NULL,
CURR_INGR_RATE_MIN DECIMAL(20,4) NOT NULL,
CURR_INGR_RATE_MAX DECIMAL(20,4) NOT NULL,
CURR_INGR_RATE_STCNT varchar(32) NOT NULL,
CURR_EGR_BYTE_RATE_MIN DECIMAL(20,4) NOT NULL,
CURR_EGR_BYTE_RATE_MAX DECIMAL(20,4) NOT NULL,
CURR_EGR_BYTE_RATE_STCNT varchar(32) NOT NULL,
CURR_EGR_RATE_MIN DECIMAL(20,4) NOT NULL,
CURR_EGR_RATE_MAX DECIMAL(20,4) NOT NULL,
CURR_EGR_RATE_STCNT varchar(32) NOT NULL,
AVG_INGR_BYTE_RATE_MIN DECIMAL(20,4) NOT NULL,
AVG_INGR_BYTE_RATE_MAX DECIMAL(20,4) NOT NULL,
AVG_INGR_BYTE_RATE_STCNT varchar(32) NOT NULL,
AVG_INGR_RATE_MIN DECIMAL(20,4) NOT NULL,
AVG_INGR_RATE_MAX DECIMAL(20,4) NOT NULL,
AVG_INGR_RATE_STCNT varchar(32) NOT NULL,
AVG_EGR_BYTE_RATE_MIN DECIMAL(20,4) NOT NULL,
AVG_EGR_BYTE_RATE_MAX DECIMAL(20,4) NOT NULL,
AVG_EGR_BYTE_RATE_STCNT varchar(32) NOT NULL,
AVG_EGR_RATE_MIN DECIMAL(20,4) NOT NULL,
AVG_EGR_RATE_MAX DECIMAL(20,4) NOT NULL,
AVG_EGR_RATE_STCNT varchar(32) NOT NULL,
ACK_PROP_MSG_SENT_MIN DECIMAL(20,4) NOT NULL,
ACK_PROP_MSG_SENT_MAX DECIMAL(20,4) NOT NULL,
ACK_PROP_MSG_SENT_STCNT varchar(32) NOT NULL,
ACK_PROP_MSG_RCVD_MIN DECIMAL(20,4) NOT NULL,
ACK_PROP_MSG_RCVD_MAX DECIMAL(20,4) NOT NULL,
ACK_PROP_MSG_RCVD_STCNT varchar(32) NOT NULL,
MSG_ACKD_VIA_ACK_PROP_MIN DECIMAL(20,4) NOT NULL,
MSG_ACKD_VIA_ACK_PROP_MAX DECIMAL(20,4) NOT NULL,
MSG_ACKD_VIA_ACK_PROP_STCNT varchar(32) NOT NULL,
MSG_RCVD_FRM_ACTIVE_MIN DECIMAL(20,4) NOT NULL,
MSG_RCVD_FRM_ACTIVE_MAX DECIMAL(20,4) NOT NULL,
MSG_RCVD_FRM_ACTIVE_STCNT varchar(32) NOT NULL,
REPLY_START_MIN DECIMAL(20,4) NOT NULL,
REPLY_START_MAX DECIMAL(20,4) NOT NULL,
REPLY_START_STCNT varchar(32) NOT NULL,
REPLY_SUCC_MIN DECIMAL(20,4) NOT NULL,
REPLY_SUCC_MAX DECIMAL(20,4) NOT NULL,
REPLY_SUCC_STCNT varchar(32) NOT NULL,
REPLY_FAIL_MIN DECIMAL(20,4) NOT NULL,
REPLY_FAIL_MAX DECIMAL(20,4) NOT NULL,
REPLY_FAIL_STCNT varchar(32) NOT NULL,
REPLY_MSG_SENT_MIN DECIMAL(20,4) NOT NULL,
REPLY_MSG_SENT_MAX DECIMAL(20,4) NOT NULL,
REPLY_MSG_SENT_STCNT varchar(32) NOT NULL,
REPLY_MSG_ACKD_MIN DECIMAL(20,4) NOT NULL,
REPLY_MSG_ACKD_MAX DECIMAL(20,4) NOT NULL,
REPLY_MSG_ACKD_STCNT varchar(32) NOT NULL,
CONN_BIND_ATTEMPT_MIN DECIMAL(20,4) NOT NULL,
CONN_BIND_ATTEMPT_MAX DECIMAL(20,4) NOT NULL,
CONN_BIND_ATTEMPT_STCNT varchar(32) NOT NULL,
CONN_BIND_SUCC_MIN DECIMAL(20,4) NOT NULL,
CONN_BIND_SUCC_MAX DECIMAL(20,4) NOT NULL,
CONN_BIND_SUCC_STCNT varchar(32) NOT NULL,
CONN_BIND_FAIL_ALRDY_BIND_MIN DECIMAL(20,4) NOT NULL,
CONN_BIND_FAIL_ALRDY_BIND_MAX DECIMAL(20,4) NOT NULL,
CONN_BIND_FAIL_ALRDY_BIND_STCNT varchar(32) NOT NULL,
CONN_BIND_FAIL_QUEUE_DISABLED_MIN DECIMAL(20,4) NOT NULL,
CONN_BIND_FAIL_QUEUE_DISABLED_MAX DECIMAL(20,4) NOT NULL,
CONN_BIND_FAIL_QUEUE_DISABLED_STCNT varchar(32) NOT NULL,
CONN_BIND_INVLD_SELCTR_MIN DECIMAL(20,4) NOT NULL,
CONN_BIND_INVLD_SELCTR_MAX DECIMAL(20,4) NOT NULL,
CONN_BIND_INVLD_SELCTR_STCNT varchar(32) NOT NULL,
CONN_BIND_FAIL_MAX_BIND_CNT_EXCD_MIN DECIMAL(20,4) NOT NULL,
CONN_BIND_FAIL_MAX_BIND_CNT_EXCD_MAX DECIMAL(20,4) NOT NULL,
CONN_BIND_FAIL_MAX_BIND_CNT_EXCD_STCNT varchar(32) NOT NULL,
CONN_BIND_FAIL_OTHER_MIN DECIMAL(20,4) NOT NULL,
CONN_BIND_FAIL_OTHER_MAX DECIMAL(20,4) NOT NULL,
CONN_BIND_FAIL_OTHER_STCNT varchar(32) NOT NULL,
IMNQ_QUOTA_EXCEED_MIN DECIMAL(20,4) NOT NULL,
IMNQ_QUOTA_EXCEED_MAX DECIMAL(20,4) NOT NULL,
IMNQ_QUOTA_EXCEED_STCNT varchar(32) NOT NULL,
IMNQ_MAX_MSG_SIZE_EXCEED_MIN DECIMAL(20,4) NOT NULL,
IMNQ_MAX_MSG_SIZE_EXCEED_MAX DECIMAL(20,4) NOT NULL,
IMNQ_MAX_MSG_SIZE_EXCEED_STCNT varchar(32) NOT NULL,
IMNQ_FAIL_QUEUE_DISABLE_MIN DECIMAL(20,4) NOT NULL,
IMNQ_FAIL_QUEUE_DISABLE_MAX DECIMAL(20,4) NOT NULL,
IMNQ_FAIL_QUEUE_DISABLE_STCNT varchar(32) NOT NULL,
IMNQ_DND_CLIENT_PROF_MIN DECIMAL(20,4) NOT NULL,
IMNQ_DND_CLIENT_PROF_MAX DECIMAL(20,4) NOT NULL,
IMNQ_DND_CLIENT_PROF_STCNT varchar(32) NOT NULL,
IMNQ_NOLCL_DLVRY_DISCD_MIN DECIMAL(20,4) NOT NULL,
IMNQ_NOLCL_DLVRY_DISCD_MAX DECIMAL(20,4) NOT NULL,
IMNQ_NOLCL_DLVRY_DISCD_STCNT varchar(32) NOT NULL,
IMNQ_DST_GRP_ERR_MIN DECIMAL(20,4) NOT NULL,
IMNQ_DST_GRP_ERR_MAX DECIMAL(20,4) NOT NULL,
IMNQ_DST_GRP_ERR_STCNT varchar(32) NOT NULL,
IMNQ_LOW_PRTY_CONGEST_MIN DECIMAL(20,4) NOT NULL,
IMNQ_LOW_PRTY_CONGEST_MAX DECIMAL(20,4) NOT NULL,
IMNQ_LOW_PRTY_CONGEST_STCNT varchar(32) NOT NULL,
MRFQ_DEL_MSG_MIN DECIMAL(20,4) NOT NULL,
MRFQ_DEL_MSG_MAX DECIMAL(20,4) NOT NULL,
MRFQ_DEL_MSG_STCNT varchar(32) NOT NULL,
MRFQ_DISCD_EXPIRY_MIN DECIMAL(20,4) NOT NULL,
MRFQ_DISCD_EXPIRY_MAX DECIMAL(20,4) NOT NULL,
MRFQ_DISCD_EXPIRY_STCNT varchar(32) NOT NULL,
MRFQ_MVD_TO_DMQ_MIN DECIMAL(20,4) NOT NULL,
MRFQ_MVD_TO_DMQ_MAX DECIMAL(20,4) NOT NULL,
MRFQ_MVD_TO_DMQ_STCNT varchar(32) NOT NULL,
MRFQ_MVD_TO_DMQ_FAIL_MIN DECIMAL(20,4) NOT NULL,
MRFQ_MVD_TO_DMQ_FAIL_MAX DECIMAL(20,4) NOT NULL,
MRFQ_MVD_TO_DMQ_FAIL_STCNT varchar(32) NOT NULL,
MRFQ_DISCD_MAX_REDLVR_MIN DECIMAL(20,4) NOT NULL,
MRFQ_DISCD_MAX_REDLVR_MAX DECIMAL(20,4) NOT NULL,
MRFQ_DISCD_MAX_REDLVR_STCNT varchar(32) NOT NULL,
MRFQ_MVD_DMQ_MAX_REDLV_MIN DECIMAL(20,4) NOT NULL,
MRFQ_MVD_DMQ_MAX_REDLV_MAX DECIMAL(20,4) NOT NULL,
MRFQ_MVD_DMQ_MAX_REDLV_STCNT varchar(32) NOT NULL,
MRFQ_MVD_DMQ_FAIL_MAX_REDLV_MIN DECIMAL(20,4) NOT NULL,
MRFQ_MVD_DMQ_FAIL_MAX_REDLV_MAX DECIMAL(20,4) NOT NULL,
MRFQ_MVD_DMQ_FAIL_MAX_REDLV_STCNT varchar(32) NOT NULL,
MRFQ_DSCD_TTL_EXCEED_MIN DECIMAL(20,4) NOT NULL,
MRFQ_DSCD_TTL_EXCEED_MAX DECIMAL(20,4) NOT NULL,
MRFQ_DSCD_TTL_EXCEED_STCNT varchar(32) NOT NULL);

ALTER TABLE SolaceMsgVPNQueTest_TREND ADD constraint PK_SolaceMsgVPNQueTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE SolaceMsgVPNQueTest_THRESH;
CREATE TABLE SolaceMsgVPNQueTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
INGRESS_CONFIG_STATE_MIN VARCHAR(256) NOT NULL,
INGRESS_CONFIG_STATE_MAX VARCHAR(256) NOT NULL,
EGRESS_CONFIG_STATE_MIN VARCHAR(256) NOT NULL,
EGRESS_CONFIG_STATE_MAX VARCHAR(256) NOT NULL,
ACCESS_TYPE_MIN VARCHAR(256) NOT NULL,
ACCESS_TYPE_MAX VARCHAR(256) NOT NULL,
SELECTOR_MIN VARCHAR(256) NOT NULL,
SELECTOR_MAX VARCHAR(256) NOT NULL,
REDUNDANCY_MIN VARCHAR(256) NOT NULL,
REDUNDANCY_MAX VARCHAR(256) NOT NULL,
DURABILITY_MIN VARCHAR(256) NOT NULL,
DURABILITY_MAX VARCHAR(256) NOT NULL,
PRIORITY_MIN VARCHAR(256) NOT NULL,
PRIORITY_MAX VARCHAR(256) NOT NULL,
TOTAL_TOPIC_SUBSCRIPTION_MIN VARCHAR(256) NOT NULL,
TOTAL_TOPIC_SUBSCRIPTION_MAX VARCHAR(256) NOT NULL,
HIGH_WATERMARK_DATA_MIN VARCHAR(256) NOT NULL,
HIGH_WATERMARK_DATA_MAX VARCHAR(256) NOT NULL,
TOTAL_MSG_SPOOLED_MIN VARCHAR(256) NOT NULL,
TOTAL_MSG_SPOOLED_MAX VARCHAR(256) NOT NULL,
MSGSPOOL_USAGE_MIN VARCHAR(256) NOT NULL,
MSGSPOOL_USAGE_MAX VARCHAR(256) NOT NULL,
MSGSPOOL_QUOTA_CONFIG_MIN VARCHAR(256) NOT NULL,
MSGSPOOL_QUOTA_CONFIG_MAX VARCHAR(256) NOT NULL,
QUEUE_PCT_USED_MIN VARCHAR(256) NOT NULL,
QUEUE_PCT_USED_MAX VARCHAR(256) NOT NULL,
CURR_CONSUMER_COUNT_MIN VARCHAR(256) NOT NULL,
CURR_CONSUMER_COUNT_MAX VARCHAR(256) NOT NULL,
NEW_CONSUMER_COUNT_MIN VARCHAR(256) NOT NULL,
NEW_CONSUMER_COUNT_MAX VARCHAR(256) NOT NULL,
DISCONN_CONSUMER_COUNT_MIN VARCHAR(256) NOT NULL,
DISCONN_CONSUMER_COUNT_MAX VARCHAR(256) NOT NULL,
MAX_CONSUMER_CONFIG_MIN VARCHAR(256) NOT NULL,
MAX_CONSUMER_CONFIG_MAX VARCHAR(256) NOT NULL,
CONSUMER_PCT_USED_MIN VARCHAR(256) NOT NULL,
CONSUMER_PCT_USED_MAX VARCHAR(256) NOT NULL,
TOTAL_DELIVERED_UNACK_MSG_MIN VARCHAR(256) NOT NULL,
TOTAL_DELIVERED_UNACK_MSG_MAX VARCHAR(256) NOT NULL,
CURR_TOTAL_ACK_PROCESSED_MIN VARCHAR(256) NOT NULL,
CURR_TOTAL_ACK_PROCESSED_MAX VARCHAR(256) NOT NULL,
MSG_AGING_MIN VARCHAR(256) NOT NULL,
MSG_AGING_MAX VARCHAR(256) NOT NULL,
CURR_INGR_BYTE_RATE_MIN VARCHAR(256) NOT NULL,
CURR_INGR_BYTE_RATE_MAX VARCHAR(256) NOT NULL,
CURR_INGR_RATE_MIN VARCHAR(256) NOT NULL,
CURR_INGR_RATE_MAX VARCHAR(256) NOT NULL,
CURR_EGR_BYTE_RATE_MIN VARCHAR(256) NOT NULL,
CURR_EGR_BYTE_RATE_MAX VARCHAR(256) NOT NULL,
CURR_EGR_RATE_MIN VARCHAR(256) NOT NULL,
CURR_EGR_RATE_MAX VARCHAR(256) NOT NULL,
AVG_INGR_BYTE_RATE_MIN VARCHAR(256) NOT NULL,
AVG_INGR_BYTE_RATE_MAX VARCHAR(256) NOT NULL,
AVG_INGR_RATE_MIN VARCHAR(256) NOT NULL,
AVG_INGR_RATE_MAX VARCHAR(256) NOT NULL,
AVG_EGR_BYTE_RATE_MIN VARCHAR(256) NOT NULL,
AVG_EGR_BYTE_RATE_MAX VARCHAR(256) NOT NULL,
AVG_EGR_RATE_MIN VARCHAR(256) NOT NULL,
AVG_EGR_RATE_MAX VARCHAR(256) NOT NULL,
ACK_PROP_MSG_SENT_MIN VARCHAR(256) NOT NULL,
ACK_PROP_MSG_SENT_MAX VARCHAR(256) NOT NULL,
ACK_PROP_MSG_RCVD_MIN VARCHAR(256) NOT NULL,
ACK_PROP_MSG_RCVD_MAX VARCHAR(256) NOT NULL,
MSG_ACKD_VIA_ACK_PROP_MIN VARCHAR(256) NOT NULL,
MSG_ACKD_VIA_ACK_PROP_MAX VARCHAR(256) NOT NULL,
MSG_RCVD_FRM_ACTIVE_MIN VARCHAR(256) NOT NULL,
MSG_RCVD_FRM_ACTIVE_MAX VARCHAR(256) NOT NULL,
REPLY_START_MIN VARCHAR(256) NOT NULL,
REPLY_START_MAX VARCHAR(256) NOT NULL,
REPLY_SUCC_MIN VARCHAR(256) NOT NULL,
REPLY_SUCC_MAX VARCHAR(256) NOT NULL,
REPLY_FAIL_MIN VARCHAR(256) NOT NULL,
REPLY_FAIL_MAX VARCHAR(256) NOT NULL,
REPLY_MSG_SENT_MIN VARCHAR(256) NOT NULL,
REPLY_MSG_SENT_MAX VARCHAR(256) NOT NULL,
REPLY_MSG_ACKD_MIN VARCHAR(256) NOT NULL,
REPLY_MSG_ACKD_MAX VARCHAR(256) NOT NULL,
CONN_BIND_ATTEMPT_MIN VARCHAR(256) NOT NULL,
CONN_BIND_ATTEMPT_MAX VARCHAR(256) NOT NULL,
CONN_BIND_SUCC_MIN VARCHAR(256) NOT NULL,
CONN_BIND_SUCC_MAX VARCHAR(256) NOT NULL,
CONN_BIND_FAIL_ALRDY_BIND_MIN VARCHAR(256) NOT NULL,
CONN_BIND_FAIL_ALRDY_BIND_MAX VARCHAR(256) NOT NULL,
CONN_BIND_FAIL_QUEUE_DISABLED_MIN VARCHAR(256) NOT NULL,
CONN_BIND_FAIL_QUEUE_DISABLED_MAX VARCHAR(256) NOT NULL,
CONN_BIND_INVLD_SELCTR_MIN VARCHAR(256) NOT NULL,
CONN_BIND_INVLD_SELCTR_MAX VARCHAR(256) NOT NULL,
CONN_BIND_FAIL_MAX_BIND_CNT_EXCD_MIN VARCHAR(256) NOT NULL,
CONN_BIND_FAIL_MAX_BIND_CNT_EXCD_MAX VARCHAR(256) NOT NULL,
CONN_BIND_FAIL_OTHER_MIN VARCHAR(256) NOT NULL,
CONN_BIND_FAIL_OTHER_MAX VARCHAR(256) NOT NULL,
IMNQ_QUOTA_EXCEED_MIN VARCHAR(256) NOT NULL,
IMNQ_QUOTA_EXCEED_MAX VARCHAR(256) NOT NULL,
IMNQ_MAX_MSG_SIZE_EXCEED_MIN VARCHAR(256) NOT NULL,
IMNQ_MAX_MSG_SIZE_EXCEED_MAX VARCHAR(256) NOT NULL,
IMNQ_FAIL_QUEUE_DISABLE_MIN VARCHAR(256) NOT NULL,
IMNQ_FAIL_QUEUE_DISABLE_MAX VARCHAR(256) NOT NULL,
IMNQ_DND_CLIENT_PROF_MIN VARCHAR(256) NOT NULL,
IMNQ_DND_CLIENT_PROF_MAX VARCHAR(256) NOT NULL,
IMNQ_NOLCL_DLVRY_DISCD_MIN VARCHAR(256) NOT NULL,
IMNQ_NOLCL_DLVRY_DISCD_MAX VARCHAR(256) NOT NULL,
IMNQ_DST_GRP_ERR_MIN VARCHAR(256) NOT NULL,
IMNQ_DST_GRP_ERR_MAX VARCHAR(256) NOT NULL,
IMNQ_LOW_PRTY_CONGEST_MIN VARCHAR(256) NOT NULL,
IMNQ_LOW_PRTY_CONGEST_MAX VARCHAR(256) NOT NULL,
MRFQ_DEL_MSG_MIN VARCHAR(256) NOT NULL,
MRFQ_DEL_MSG_MAX VARCHAR(256) NOT NULL,
MRFQ_DISCD_EXPIRY_MIN VARCHAR(256) NOT NULL,
MRFQ_DISCD_EXPIRY_MAX VARCHAR(256) NOT NULL,
MRFQ_MVD_TO_DMQ_MIN VARCHAR(256) NOT NULL,
MRFQ_MVD_TO_DMQ_MAX VARCHAR(256) NOT NULL,
MRFQ_MVD_TO_DMQ_FAIL_MIN VARCHAR(256) NOT NULL,
MRFQ_MVD_TO_DMQ_FAIL_MAX VARCHAR(256) NOT NULL,
MRFQ_DISCD_MAX_REDLVR_MIN VARCHAR(256) NOT NULL,
MRFQ_DISCD_MAX_REDLVR_MAX VARCHAR(256) NOT NULL,
MRFQ_MVD_DMQ_MAX_REDLV_MIN VARCHAR(256) NOT NULL,
MRFQ_MVD_DMQ_MAX_REDLV_MAX VARCHAR(256) NOT NULL,
MRFQ_MVD_DMQ_FAIL_MAX_REDLV_MIN VARCHAR(256) NOT NULL,
MRFQ_MVD_DMQ_FAIL_MAX_REDLV_MAX VARCHAR(256) NOT NULL,
MRFQ_DSCD_TTL_EXCEED_MIN VARCHAR(256) NOT NULL,
MRFQ_DSCD_TTL_EXCEED_MAX VARCHAR(256) NOT NULL);

ALTER TABLE SolaceMsgVPNQueTest_THRESH ADD constraint PK_SolaceMsgVPNQueTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_SolaceMsgVPNQueTest_THRESH ON SolaceMsgVPNQueTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_SolaceMsgVPNQueTest ON SolaceMsgVPNQueTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_SolaceMsgVPNQueTest ON SolaceMsgVPNQueTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE SolaceDiskUsageTest;
CREATE TABLE SolaceDiskUsageTest(
TRGT_HOST                     varchar(32) NOT NULL, 
PORT_NO                       varchar(32) NOT NULL, 
SITE_NAME                     varchar(64) NOT NULL, 
INFO                          varchar(128) NOT NULL, 
MSMT_HOST                     varchar(32) NOT NULL, 
MSMT_TIME                     datetime NOT NULL, 
TOTAL_SPACE                   DECIMAL(20,4) NOT NULL, 
TOTAL_SPACE_ST                varchar(32) NOT NULL, 
USED_SPACE                    DECIMAL(20,4) NOT NULL, 
USED_SPACE_ST                 varchar(32) NOT NULL, 
FREE_SPACE                    DECIMAL(20,4) NOT NULL, 
FREE_SPACE_ST                 varchar(32) NOT NULL, 
DISK_USAGE                    DECIMAL(20,4) NOT NULL, 
DISK_USAGE_ST                 varchar(32) NOT NULL); 

CREATE INDEX IDX_SolaceDiskUsageTest ON SolaceDiskUsageTest(MSMT_TIME);
ALTER TABLE SolaceDiskUsageTest ADD constraint PK_SolaceDiskUsageTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE SolaceDiskUsageTest_TREND;
CREATE TABLE SolaceDiskUsageTest_TREND(
TRGT_HOST                     varchar(32) NOT NULL, 
PORT_NO                       varchar(32) NOT NULL, 
SITE_NAME                     varchar(64) NOT NULL, 
INFO                          varchar(128) NOT NULL, 
MSMT_HOST                     varchar(32) NOT NULL, 
MSMT_TIME                     datetime NOT NULL, 
PERIOD                        varchar(32) NOT NULL, 
TOTAL_SPACE_MIN               DECIMAL(20,4) NOT NULL, 
TOTAL_SPACE_MAX               DECIMAL(20,4) NOT NULL, 
TOTAL_SPACE_STCNT             varchar(32) NOT NULL, 
USED_SPACE_MIN                DECIMAL(20,4) NOT NULL, 
USED_SPACE_MAX                DECIMAL(20,4) NOT NULL, 
USED_SPACE_STCNT              varchar(32) NOT NULL, 
FREE_SPACE_MIN                DECIMAL(20,4) NOT NULL, 
FREE_SPACE_MAX                DECIMAL(20,4) NOT NULL, 
FREE_SPACE_STCNT              varchar(32) NOT NULL, 
DISK_USAGE_MIN                DECIMAL(20,4) NOT NULL, 
DISK_USAGE_MAX                DECIMAL(20,4) NOT NULL, 
DISK_USAGE_STCNT              varchar(32) NOT NULL); 

ALTER TABLE SolaceDiskUsageTest_TREND ADD constraint PK_SolaceDiskUsageTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE SolaceDiskUsageTest_THRESH;
CREATE TABLE SolaceDiskUsageTest_THRESH(
TRGT_HOST                     varchar(32) NOT NULL, 
PORT_NO                       varchar(32) NOT NULL, 
SITE_NAME                     varchar(64) NOT NULL, 
INFO                          varchar(128) NOT NULL, 
MSMT_HOST                     varchar(32) NOT NULL, 
MSMT_TIME_START               datetime NOT NULL, 
MSMT_TIME_END                 datetime NOT NULL, 
TOTAL_SPACE_MIN               VARCHAR(256) NOT NULL, 
TOTAL_SPACE_MAX               VARCHAR(256) NOT NULL, 
USED_SPACE_MIN                VARCHAR(256) NOT NULL, 
USED_SPACE_MAX                VARCHAR(256) NOT NULL, 
FREE_SPACE_MIN                VARCHAR(256) NOT NULL, 
FREE_SPACE_MAX                VARCHAR(256) NOT NULL, 
DISK_USAGE_MIN                VARCHAR(256) NOT NULL, 
DISK_USAGE_MAX                VARCHAR(256) NOT NULL); 

ALTER TABLE SolaceDiskUsageTest_THRESH ADD constraint PK_SolaceDiskUsageTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_SolaceDiskUsageTest_THRESH ON SolaceDiskUsageTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_SolaceDiskUsageTest ON SolaceDiskUsageTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_SolaceDiskUsageTest ON SolaceDiskUsageTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE SolaceMsgVPNTest;
CREATE TABLE SolaceMsgVPNTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
ENABLED_STATUS DECIMAL(20,4) NOT NULL,
ENABLED_STATUS_ST varchar(32) NOT NULL,
LOCAL_STATUS DECIMAL(20,4) NOT NULL,
LOCAL_STATUS_ST varchar(32) NOT NULL,
OPERATIONAL_STATUS DECIMAL(20,4) NOT NULL,
OPERATIONAL_STATUS_ST varchar(32) NOT NULL,
IS_MGMT_VPN DECIMAL(20,4) NOT NULL,
IS_MGMT_VPN_ST varchar(32) NOT NULL,
DIST_CACHE_MGMT_STATUS DECIMAL(20,4) NOT NULL,
DIST_CACHE_MGMT_STATUS_ST varchar(32) NOT NULL,
TOTAL_LOCAL_UNIQUE_SUB DECIMAL(20,4) NOT NULL,
TOTAL_LOCAL_UNIQUE_SUB_ST varchar(32) NOT NULL,
TOTAL_RMT_UNIQUEU_SUB DECIMAL(20,4) NOT NULL,
TOTAL_RMT_UNIQUEU_SUB_ST varchar(32) NOT NULL,
TOTAL_UNIQUE_SUB DECIMAL(20,4) NOT NULL,
TOTAL_UNIQUE_SUB_ST varchar(32) NOT NULL,
MAX_SUBSCRIPTION DECIMAL(20,4) NOT NULL,
MAX_SUBSCRIPTION_ST varchar(32) NOT NULL,
SUBSCRIPTION_USAGE DECIMAL(20,4) NOT NULL,
SUBSCRIPTION_USAGE_ST varchar(32) NOT NULL,
ADD_SUB_MSG_RCVD DECIMAL(20,4) NOT NULL,
ADD_SUB_MSG_RCVD_ST varchar(32) NOT NULL,
ADD_SUB_MSG_SENT DECIMAL(20,4) NOT NULL,
ADD_SUB_MSG_SENT_ST varchar(32) NOT NULL,
DENINED_SUB_TOPIC_ACL DECIMAL(20,4) NOT NULL,
DENINED_SUB_TOPIC_ACL_ST varchar(32) NOT NULL,
DENIED_SUB_TOPIC_RVSRD DECIMAL(20,4) NOT NULL,
DENIED_SUB_TOPIC_RVSRD_ST varchar(32) NOT NULL,
DENIED_UNSUB_TOPIC_ACL DECIMAL(20,4) NOT NULL,
DENIED_UNSUB_TOPIC_ACL_ST varchar(32) NOT NULL,
DENIED_SUB_PERMISSION DECIMAL(20,4) NOT NULL,
DENIED_SUB_PERMISSION_ST varchar(32) NOT NULL,
DENIED_UNSUB_PERMISSION DECIMAL(20,4) NOT NULL,
DENIED_UNSUB_PERMISSION_ST varchar(32) NOT NULL,
AMQP_CONNS DECIMAL(20,4) NOT NULL,
AMQP_CONNS_ST varchar(32) NOT NULL,
MAX_AMQP_CONNS DECIMAL(20,4) NOT NULL,
MAX_AMQP_CONNS_ST varchar(32) NOT NULL,
AMQP_USAGE DECIMAL(20,4) NOT NULL,
AMQP_USAGE_ST varchar(32) NOT NULL,
MQTT_CONNS DECIMAL(20,4) NOT NULL,
MQTT_CONNS_ST varchar(32) NOT NULL,
MAX_MQTT_CONNS DECIMAL(20,4) NOT NULL,
MAX_MQTT_CONNS_ST varchar(32) NOT NULL,
MQTT_USAGE DECIMAL(20,4) NOT NULL,
MQTT_USAGE_ST varchar(32) NOT NULL,
IN_REST_CONNS DECIMAL(20,4) NOT NULL,
IN_REST_CONNS_ST varchar(32) NOT NULL,
MAX_IN_REST_CONNS DECIMAL(20,4) NOT NULL,
MAX_IN_REST_CONNS_ST varchar(32) NOT NULL,
IN_REST_USAGE DECIMAL(20,4) NOT NULL,
IN_REST_USAGE_ST varchar(32) NOT NULL,
OUT_REST_CONNS DECIMAL(20,4) NOT NULL,
OUT_REST_CONNS_ST varchar(32) NOT NULL,
MAX_OUT_REST_CONNS DECIMAL(20,4) NOT NULL,
MAX_OUT_REST_CONNS_ST varchar(32) NOT NULL,
OUT_REST_USAGE DECIMAL(20,4) NOT NULL,
OUT_REST_USAGE_ST varchar(32) NOT NULL,
SMF_CONNS DECIMAL(20,4) NOT NULL,
SMF_CONNS_ST varchar(32) NOT NULL,
MAX_SMF_CONNS DECIMAL(20,4) NOT NULL,
MAX_SMF_CONNS_ST varchar(32) NOT NULL,
SMF_USAGE DECIMAL(20,4) NOT NULL,
SMF_USAGE_ST varchar(32) NOT NULL,
WEB_CONNS DECIMAL(20,4) NOT NULL,
WEB_CONNS_ST varchar(32) NOT NULL,
MAX_WEB_CONNS DECIMAL(20,4) NOT NULL,
MAX_WEB_CONNS_ST varchar(32) NOT NULL,
WEB_CONNS_USAGE DECIMAL(20,4) NOT NULL,
WEB_CONNS_USAGE_ST varchar(32) NOT NULL,
TOTAL_CURR_CONNS DECIMAL(20,4) NOT NULL,
TOTAL_CURR_CONNS_ST varchar(32) NOT NULL,
MAX_CONNS_ALLOWED DECIMAL(20,4) NOT NULL,
MAX_CONNS_ALLOWED_ST varchar(32) NOT NULL,
CONN_USAGE DECIMAL(20,4) NOT NULL,
CONN_USAGE_ST varchar(32) NOT NULL,
CLIENT_CNTRL_DATA_RCVD DECIMAL(20,4) NOT NULL,
CLIENT_CNTRL_DATA_RCVD_ST varchar(32) NOT NULL,
CLIENT_CNTRL_DATA_SNT DECIMAL(20,4) NOT NULL,
CLIENT_CNTRL_DATA_SNT_ST varchar(32) NOT NULL,
CLIENT_DATA_RCVD DECIMAL(20,4) NOT NULL,
CLIENT_DATA_RCVD_ST varchar(32) NOT NULL,
CLIENT_DATA_SENT DECIMAL(20,4) NOT NULL,
CLIENT_DATA_SENT_ST varchar(32) NOT NULL,
TOTAL_CLIENT_DATA_RCVD DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_DATA_RCVD_ST varchar(32) NOT NULL,
TOTAL_CLIENT_DATA_SENT DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_DATA_SENT_ST varchar(32) NOT NULL,
CLIENT_DATA_MSG_RCVD DECIMAL(20,4) NOT NULL,
CLIENT_DATA_MSG_RCVD_ST varchar(32) NOT NULL,
CLIENT_DATA_MSG_SNT DECIMAL(20,4) NOT NULL,
CLIENT_DATA_MSG_SNT_ST varchar(32) NOT NULL,
CLIENT_CNTRL_MSG_RCVD DECIMAL(20,4) NOT NULL,
CLIENT_CNTRL_MSG_RCVD_ST varchar(32) NOT NULL,
CLIENT_CNTRL_MSG_SNT DECIMAL(20,4) NOT NULL,
CLIENT_CNTRL_MSG_SNT_ST varchar(32) NOT NULL,
TOTAL_CLIENT_MSG_RCVD DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_MSG_RCVD_ST varchar(32) NOT NULL,
TOTAL_CLIENT_MSG_SNT DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_MSG_SNT_ST varchar(32) NOT NULL,
LOGIN_MSG_RCVD DECIMAL(20,4) NOT NULL,
LOGIN_MSG_RCVD_ST varchar(32) NOT NULL,
LOGIN_MSG_SENT DECIMAL(20,4) NOT NULL,
LOGIN_MSG_SENT_ST varchar(32) NOT NULL,
INGR_DATA_RATE DECIMAL(20,4) NOT NULL,
INGR_DATA_RATE_ST varchar(32) NOT NULL,
INGR_RATE DECIMAL(20,4) NOT NULL,
INGR_RATE_ST varchar(32) NOT NULL,
TOTAL_INGR_DISCARD DECIMAL(20,4) NOT NULL,
TOTAL_INGR_DISCARD_ST varchar(32) NOT NULL,
INGR_MSGSPOOL_CONGEST DECIMAL(20,4) NOT NULL,
INGR_MSGSPOOL_CONGEST_ST varchar(32) NOT NULL,
INGR_MSG_PROMO_CONGEST DECIMAL(20,4) NOT NULL,
INGR_MSG_PROMO_CONGEST_ST varchar(32) NOT NULL,
INGR_MSGSPOOL_DISCD DECIMAL(20,4) NOT NULL,
INGR_MSGSPOOL_DISCD_ST varchar(32) NOT NULL,
INGR_TOOBIG_MSG DECIMAL(20,4) NOT NULL,
INGR_TOOBIG_MSG_ST varchar(32) NOT NULL,
INGR_NO_SUB_MATCH DECIMAL(20,4) NOT NULL,
INGR_NO_SUB_MATCH_ST varchar(32) NOT NULL,
INGR_PARSE_ERR DECIMAL(20,4) NOT NULL,
INGR_PARSE_ERR_ST varchar(32) NOT NULL,
INGR_PUB_TOPIC_ACL DECIMAL(20,4) NOT NULL,
INGR_PUB_TOPIC_ACL_ST varchar(32) NOT NULL,
INGR_TOPIC_PARSE_ERR DECIMAL(20,4) NOT NULL,
INGR_TOPIC_PARSE_ERR_ST varchar(32) NOT NULL,
INGR_TTL_EXCEED DECIMAL(20,4) NOT NULL,
INGR_TTL_EXCEED_ST varchar(32) NOT NULL,
EGR_DATA_RATE DECIMAL(20,4) NOT NULL,
EGR_DATA_RATE_ST varchar(32) NOT NULL,
EGR_RATE DECIMAL(20,4) NOT NULL,
EGR_RATE_ST varchar(32) NOT NULL,
TOTAL_EGR_DISCARD DECIMAL(20,4) NOT NULL,
TOTAL_EGR_DISCARD_ST varchar(32) NOT NULL,
EGR_MSGSPOOL_DISCD DECIMAL(20,4) NOT NULL,
EGR_MSGSPOOL_DISCD_ST varchar(32) NOT NULL,
EGR_CLIENT_NOT_CONTD DECIMAL(20,4) NOT NULL,
EGR_CLIENT_NOT_CONTD_ST varchar(32) NOT NULL,
EGR_COMPRESS_CONGEST DECIMAL(20,4) NOT NULL,
EGR_COMPRESS_CONGEST_ST varchar(32) NOT NULL,
EGR_MSG_ELIDED DECIMAL(20,4) NOT NULL,
EGR_MSG_ELIDED_ST varchar(32) NOT NULL,
EGR_MSG_PROMO_CONGEST DECIMAL(20,4) NOT NULL,
EGR_MSG_PROMO_CONGEST_ST varchar(32) NOT NULL,
EGR_MSGSPOOL_CONGEST DECIMAL(20,4) NOT NULL,
EGR_MSGSPOOL_CONGEST_ST varchar(32) NOT NULL,
EGR_TRANSMIT_CONGEST DECIMAL(20,4) NOT NULL,
EGR_TRANSMIT_CONGEST_ST varchar(32) NOT NULL,
EGR_TTL_EXCEED DECIMAL(20,4) NOT NULL,
EGR_TTL_EXCEED_ST varchar(32) NOT NULL);

CREATE INDEX IDX_SolaceMsgVPNTest ON SolaceMsgVPNTest(MSMT_TIME);
ALTER TABLE SolaceMsgVPNTest ADD constraint PK_SolaceMsgVPNTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE SolaceMsgVPNTest_TREND;
CREATE TABLE SolaceMsgVPNTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
ENABLED_STATUS_MIN DECIMAL(20,4) NOT NULL,
ENABLED_STATUS_MAX DECIMAL(20,4) NOT NULL,
ENABLED_STATUS_STCNT varchar(32) NOT NULL,
LOCAL_STATUS_MIN DECIMAL(20,4) NOT NULL,
LOCAL_STATUS_MAX DECIMAL(20,4) NOT NULL,
LOCAL_STATUS_STCNT varchar(32) NOT NULL,
OPERATIONAL_STATUS_MIN DECIMAL(20,4) NOT NULL,
OPERATIONAL_STATUS_MAX DECIMAL(20,4) NOT NULL,
OPERATIONAL_STATUS_STCNT varchar(32) NOT NULL,
IS_MGMT_VPN_MIN DECIMAL(20,4) NOT NULL,
IS_MGMT_VPN_MAX DECIMAL(20,4) NOT NULL,
IS_MGMT_VPN_STCNT varchar(32) NOT NULL,
DIST_CACHE_MGMT_STATUS_MIN DECIMAL(20,4) NOT NULL,
DIST_CACHE_MGMT_STATUS_MAX DECIMAL(20,4) NOT NULL,
DIST_CACHE_MGMT_STATUS_STCNT varchar(32) NOT NULL,
TOTAL_LOCAL_UNIQUE_SUB_MIN DECIMAL(20,4) NOT NULL,
TOTAL_LOCAL_UNIQUE_SUB_MAX DECIMAL(20,4) NOT NULL,
TOTAL_LOCAL_UNIQUE_SUB_STCNT varchar(32) NOT NULL,
TOTAL_RMT_UNIQUEU_SUB_MIN DECIMAL(20,4) NOT NULL,
TOTAL_RMT_UNIQUEU_SUB_MAX DECIMAL(20,4) NOT NULL,
TOTAL_RMT_UNIQUEU_SUB_STCNT varchar(32) NOT NULL,
TOTAL_UNIQUE_SUB_MIN DECIMAL(20,4) NOT NULL,
TOTAL_UNIQUE_SUB_MAX DECIMAL(20,4) NOT NULL,
TOTAL_UNIQUE_SUB_STCNT varchar(32) NOT NULL,
MAX_SUBSCRIPTION_MIN DECIMAL(20,4) NOT NULL,
MAX_SUBSCRIPTION_MAX DECIMAL(20,4) NOT NULL,
MAX_SUBSCRIPTION_STCNT varchar(32) NOT NULL,
SUBSCRIPTION_USAGE_MIN DECIMAL(20,4) NOT NULL,
SUBSCRIPTION_USAGE_MAX DECIMAL(20,4) NOT NULL,
SUBSCRIPTION_USAGE_STCNT varchar(32) NOT NULL,
ADD_SUB_MSG_RCVD_MIN DECIMAL(20,4) NOT NULL,
ADD_SUB_MSG_RCVD_MAX DECIMAL(20,4) NOT NULL,
ADD_SUB_MSG_RCVD_STCNT varchar(32) NOT NULL,
ADD_SUB_MSG_SENT_MIN DECIMAL(20,4) NOT NULL,
ADD_SUB_MSG_SENT_MAX DECIMAL(20,4) NOT NULL,
ADD_SUB_MSG_SENT_STCNT varchar(32) NOT NULL,
DENINED_SUB_TOPIC_ACL_MIN DECIMAL(20,4) NOT NULL,
DENINED_SUB_TOPIC_ACL_MAX DECIMAL(20,4) NOT NULL,
DENINED_SUB_TOPIC_ACL_STCNT varchar(32) NOT NULL,
DENIED_SUB_TOPIC_RVSRD_MIN DECIMAL(20,4) NOT NULL,
DENIED_SUB_TOPIC_RVSRD_MAX DECIMAL(20,4) NOT NULL,
DENIED_SUB_TOPIC_RVSRD_STCNT varchar(32) NOT NULL,
DENIED_UNSUB_TOPIC_ACL_MIN DECIMAL(20,4) NOT NULL,
DENIED_UNSUB_TOPIC_ACL_MAX DECIMAL(20,4) NOT NULL,
DENIED_UNSUB_TOPIC_ACL_STCNT varchar(32) NOT NULL,
DENIED_SUB_PERMISSION_MIN DECIMAL(20,4) NOT NULL,
DENIED_SUB_PERMISSION_MAX DECIMAL(20,4) NOT NULL,
DENIED_SUB_PERMISSION_STCNT varchar(32) NOT NULL,
DENIED_UNSUB_PERMISSION_MIN DECIMAL(20,4) NOT NULL,
DENIED_UNSUB_PERMISSION_MAX DECIMAL(20,4) NOT NULL,
DENIED_UNSUB_PERMISSION_STCNT varchar(32) NOT NULL,
AMQP_CONNS_MIN DECIMAL(20,4) NOT NULL,
AMQP_CONNS_MAX DECIMAL(20,4) NOT NULL,
AMQP_CONNS_STCNT varchar(32) NOT NULL,
MAX_AMQP_CONNS_MIN DECIMAL(20,4) NOT NULL,
MAX_AMQP_CONNS_MAX DECIMAL(20,4) NOT NULL,
MAX_AMQP_CONNS_STCNT varchar(32) NOT NULL,
AMQP_USAGE_MIN DECIMAL(20,4) NOT NULL,
AMQP_USAGE_MAX DECIMAL(20,4) NOT NULL,
AMQP_USAGE_STCNT varchar(32) NOT NULL,
MQTT_CONNS_MIN DECIMAL(20,4) NOT NULL,
MQTT_CONNS_MAX DECIMAL(20,4) NOT NULL,
MQTT_CONNS_STCNT varchar(32) NOT NULL,
MAX_MQTT_CONNS_MIN DECIMAL(20,4) NOT NULL,
MAX_MQTT_CONNS_MAX DECIMAL(20,4) NOT NULL,
MAX_MQTT_CONNS_STCNT varchar(32) NOT NULL,
MQTT_USAGE_MIN DECIMAL(20,4) NOT NULL,
MQTT_USAGE_MAX DECIMAL(20,4) NOT NULL,
MQTT_USAGE_STCNT varchar(32) NOT NULL,
IN_REST_CONNS_MIN DECIMAL(20,4) NOT NULL,
IN_REST_CONNS_MAX DECIMAL(20,4) NOT NULL,
IN_REST_CONNS_STCNT varchar(32) NOT NULL,
MAX_IN_REST_CONNS_MIN DECIMAL(20,4) NOT NULL,
MAX_IN_REST_CONNS_MAX DECIMAL(20,4) NOT NULL,
MAX_IN_REST_CONNS_STCNT varchar(32) NOT NULL,
IN_REST_USAGE_MIN DECIMAL(20,4) NOT NULL,
IN_REST_USAGE_MAX DECIMAL(20,4) NOT NULL,
IN_REST_USAGE_STCNT varchar(32) NOT NULL,
OUT_REST_CONNS_MIN DECIMAL(20,4) NOT NULL,
OUT_REST_CONNS_MAX DECIMAL(20,4) NOT NULL,
OUT_REST_CONNS_STCNT varchar(32) NOT NULL,
MAX_OUT_REST_CONNS_MIN DECIMAL(20,4) NOT NULL,
MAX_OUT_REST_CONNS_MAX DECIMAL(20,4) NOT NULL,
MAX_OUT_REST_CONNS_STCNT varchar(32) NOT NULL,
OUT_REST_USAGE_MIN DECIMAL(20,4) NOT NULL,
OUT_REST_USAGE_MAX DECIMAL(20,4) NOT NULL,
OUT_REST_USAGE_STCNT varchar(32) NOT NULL,
SMF_CONNS_MIN DECIMAL(20,4) NOT NULL,
SMF_CONNS_MAX DECIMAL(20,4) NOT NULL,
SMF_CONNS_STCNT varchar(32) NOT NULL,
MAX_SMF_CONNS_MIN DECIMAL(20,4) NOT NULL,
MAX_SMF_CONNS_MAX DECIMAL(20,4) NOT NULL,
MAX_SMF_CONNS_STCNT varchar(32) NOT NULL,
SMF_USAGE_MIN DECIMAL(20,4) NOT NULL,
SMF_USAGE_MAX DECIMAL(20,4) NOT NULL,
SMF_USAGE_STCNT varchar(32) NOT NULL,
WEB_CONNS_MIN DECIMAL(20,4) NOT NULL,
WEB_CONNS_MAX DECIMAL(20,4) NOT NULL,
WEB_CONNS_STCNT varchar(32) NOT NULL,
MAX_WEB_CONNS_MIN DECIMAL(20,4) NOT NULL,
MAX_WEB_CONNS_MAX DECIMAL(20,4) NOT NULL,
MAX_WEB_CONNS_STCNT varchar(32) NOT NULL,
WEB_CONNS_USAGE_MIN DECIMAL(20,4) NOT NULL,
WEB_CONNS_USAGE_MAX DECIMAL(20,4) NOT NULL,
WEB_CONNS_USAGE_STCNT varchar(32) NOT NULL,
TOTAL_CURR_CONNS_MIN DECIMAL(20,4) NOT NULL,
TOTAL_CURR_CONNS_MAX DECIMAL(20,4) NOT NULL,
TOTAL_CURR_CONNS_STCNT varchar(32) NOT NULL,
MAX_CONNS_ALLOWED_MIN DECIMAL(20,4) NOT NULL,
MAX_CONNS_ALLOWED_MAX DECIMAL(20,4) NOT NULL,
MAX_CONNS_ALLOWED_STCNT varchar(32) NOT NULL,
CONN_USAGE_MIN DECIMAL(20,4) NOT NULL,
CONN_USAGE_MAX DECIMAL(20,4) NOT NULL,
CONN_USAGE_STCNT varchar(32) NOT NULL,
CLIENT_CNTRL_DATA_RCVD_MIN DECIMAL(20,4) NOT NULL,
CLIENT_CNTRL_DATA_RCVD_MAX DECIMAL(20,4) NOT NULL,
CLIENT_CNTRL_DATA_RCVD_STCNT varchar(32) NOT NULL,
CLIENT_CNTRL_DATA_SNT_MIN DECIMAL(20,4) NOT NULL,
CLIENT_CNTRL_DATA_SNT_MAX DECIMAL(20,4) NOT NULL,
CLIENT_CNTRL_DATA_SNT_STCNT varchar(32) NOT NULL,
CLIENT_DATA_RCVD_MIN DECIMAL(20,4) NOT NULL,
CLIENT_DATA_RCVD_MAX DECIMAL(20,4) NOT NULL,
CLIENT_DATA_RCVD_STCNT varchar(32) NOT NULL,
CLIENT_DATA_SENT_MIN DECIMAL(20,4) NOT NULL,
CLIENT_DATA_SENT_MAX DECIMAL(20,4) NOT NULL,
CLIENT_DATA_SENT_STCNT varchar(32) NOT NULL,
TOTAL_CLIENT_DATA_RCVD_MIN DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_DATA_RCVD_MAX DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_DATA_RCVD_STCNT varchar(32) NOT NULL,
TOTAL_CLIENT_DATA_SENT_MIN DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_DATA_SENT_MAX DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_DATA_SENT_STCNT varchar(32) NOT NULL,
CLIENT_DATA_MSG_RCVD_MIN DECIMAL(20,4) NOT NULL,
CLIENT_DATA_MSG_RCVD_MAX DECIMAL(20,4) NOT NULL,
CLIENT_DATA_MSG_RCVD_STCNT varchar(32) NOT NULL,
CLIENT_DATA_MSG_SNT_MIN DECIMAL(20,4) NOT NULL,
CLIENT_DATA_MSG_SNT_MAX DECIMAL(20,4) NOT NULL,
CLIENT_DATA_MSG_SNT_STCNT varchar(32) NOT NULL,
CLIENT_CNTRL_MSG_RCVD_MIN DECIMAL(20,4) NOT NULL,
CLIENT_CNTRL_MSG_RCVD_MAX DECIMAL(20,4) NOT NULL,
CLIENT_CNTRL_MSG_RCVD_STCNT varchar(32) NOT NULL,
CLIENT_CNTRL_MSG_SNT_MIN DECIMAL(20,4) NOT NULL,
CLIENT_CNTRL_MSG_SNT_MAX DECIMAL(20,4) NOT NULL,
CLIENT_CNTRL_MSG_SNT_STCNT varchar(32) NOT NULL,
TOTAL_CLIENT_MSG_RCVD_MIN DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_MSG_RCVD_MAX DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_MSG_RCVD_STCNT varchar(32) NOT NULL,
TOTAL_CLIENT_MSG_SNT_MIN DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_MSG_SNT_MAX DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_MSG_SNT_STCNT varchar(32) NOT NULL,
LOGIN_MSG_RCVD_MIN DECIMAL(20,4) NOT NULL,
LOGIN_MSG_RCVD_MAX DECIMAL(20,4) NOT NULL,
LOGIN_MSG_RCVD_STCNT varchar(32) NOT NULL,
LOGIN_MSG_SENT_MIN DECIMAL(20,4) NOT NULL,
LOGIN_MSG_SENT_MAX DECIMAL(20,4) NOT NULL,
LOGIN_MSG_SENT_STCNT varchar(32) NOT NULL,
INGR_DATA_RATE_MIN DECIMAL(20,4) NOT NULL,
INGR_DATA_RATE_MAX DECIMAL(20,4) NOT NULL,
INGR_DATA_RATE_STCNT varchar(32) NOT NULL,
INGR_RATE_MIN DECIMAL(20,4) NOT NULL,
INGR_RATE_MAX DECIMAL(20,4) NOT NULL,
INGR_RATE_STCNT varchar(32) NOT NULL,
TOTAL_INGR_DISCARD_MIN DECIMAL(20,4) NOT NULL,
TOTAL_INGR_DISCARD_MAX DECIMAL(20,4) NOT NULL,
TOTAL_INGR_DISCARD_STCNT varchar(32) NOT NULL,
INGR_MSGSPOOL_CONGEST_MIN DECIMAL(20,4) NOT NULL,
INGR_MSGSPOOL_CONGEST_MAX DECIMAL(20,4) NOT NULL,
INGR_MSGSPOOL_CONGEST_STCNT varchar(32) NOT NULL,
INGR_MSG_PROMO_CONGEST_MIN DECIMAL(20,4) NOT NULL,
INGR_MSG_PROMO_CONGEST_MAX DECIMAL(20,4) NOT NULL,
INGR_MSG_PROMO_CONGEST_STCNT varchar(32) NOT NULL,
INGR_MSGSPOOL_DISCD_MIN DECIMAL(20,4) NOT NULL,
INGR_MSGSPOOL_DISCD_MAX DECIMAL(20,4) NOT NULL,
INGR_MSGSPOOL_DISCD_STCNT varchar(32) NOT NULL,
INGR_TOOBIG_MSG_MIN DECIMAL(20,4) NOT NULL,
INGR_TOOBIG_MSG_MAX DECIMAL(20,4) NOT NULL,
INGR_TOOBIG_MSG_STCNT varchar(32) NOT NULL,
INGR_NO_SUB_MATCH_MIN DECIMAL(20,4) NOT NULL,
INGR_NO_SUB_MATCH_MAX DECIMAL(20,4) NOT NULL,
INGR_NO_SUB_MATCH_STCNT varchar(32) NOT NULL,
INGR_PARSE_ERR_MIN DECIMAL(20,4) NOT NULL,
INGR_PARSE_ERR_MAX DECIMAL(20,4) NOT NULL,
INGR_PARSE_ERR_STCNT varchar(32) NOT NULL,
INGR_PUB_TOPIC_ACL_MIN DECIMAL(20,4) NOT NULL,
INGR_PUB_TOPIC_ACL_MAX DECIMAL(20,4) NOT NULL,
INGR_PUB_TOPIC_ACL_STCNT varchar(32) NOT NULL,
INGR_TOPIC_PARSE_ERR_MIN DECIMAL(20,4) NOT NULL,
INGR_TOPIC_PARSE_ERR_MAX DECIMAL(20,4) NOT NULL,
INGR_TOPIC_PARSE_ERR_STCNT varchar(32) NOT NULL,
INGR_TTL_EXCEED_MIN DECIMAL(20,4) NOT NULL,
INGR_TTL_EXCEED_MAX DECIMAL(20,4) NOT NULL,
INGR_TTL_EXCEED_STCNT varchar(32) NOT NULL,
EGR_DATA_RATE_MIN DECIMAL(20,4) NOT NULL,
EGR_DATA_RATE_MAX DECIMAL(20,4) NOT NULL,
EGR_DATA_RATE_STCNT varchar(32) NOT NULL,
EGR_RATE_MIN DECIMAL(20,4) NOT NULL,
EGR_RATE_MAX DECIMAL(20,4) NOT NULL,
EGR_RATE_STCNT varchar(32) NOT NULL,
TOTAL_EGR_DISCARD_MIN DECIMAL(20,4) NOT NULL,
TOTAL_EGR_DISCARD_MAX DECIMAL(20,4) NOT NULL,
TOTAL_EGR_DISCARD_STCNT varchar(32) NOT NULL,
EGR_MSGSPOOL_DISCD_MIN DECIMAL(20,4) NOT NULL,
EGR_MSGSPOOL_DISCD_MAX DECIMAL(20,4) NOT NULL,
EGR_MSGSPOOL_DISCD_STCNT varchar(32) NOT NULL,
EGR_CLIENT_NOT_CONTD_MIN DECIMAL(20,4) NOT NULL,
EGR_CLIENT_NOT_CONTD_MAX DECIMAL(20,4) NOT NULL,
EGR_CLIENT_NOT_CONTD_STCNT varchar(32) NOT NULL,
EGR_COMPRESS_CONGEST_MIN DECIMAL(20,4) NOT NULL,
EGR_COMPRESS_CONGEST_MAX DECIMAL(20,4) NOT NULL,
EGR_COMPRESS_CONGEST_STCNT varchar(32) NOT NULL,
EGR_MSG_ELIDED_MIN DECIMAL(20,4) NOT NULL,
EGR_MSG_ELIDED_MAX DECIMAL(20,4) NOT NULL,
EGR_MSG_ELIDED_STCNT varchar(32) NOT NULL,
EGR_MSG_PROMO_CONGEST_MIN DECIMAL(20,4) NOT NULL,
EGR_MSG_PROMO_CONGEST_MAX DECIMAL(20,4) NOT NULL,
EGR_MSG_PROMO_CONGEST_STCNT varchar(32) NOT NULL,
EGR_MSGSPOOL_CONGEST_MIN DECIMAL(20,4) NOT NULL,
EGR_MSGSPOOL_CONGEST_MAX DECIMAL(20,4) NOT NULL,
EGR_MSGSPOOL_CONGEST_STCNT varchar(32) NOT NULL,
EGR_TRANSMIT_CONGEST_MIN DECIMAL(20,4) NOT NULL,
EGR_TRANSMIT_CONGEST_MAX DECIMAL(20,4) NOT NULL,
EGR_TRANSMIT_CONGEST_STCNT varchar(32) NOT NULL,
EGR_TTL_EXCEED_MIN DECIMAL(20,4) NOT NULL,
EGR_TTL_EXCEED_MAX DECIMAL(20,4) NOT NULL,
EGR_TTL_EXCEED_STCNT varchar(32) NOT NULL);

ALTER TABLE SolaceMsgVPNTest_TREND ADD constraint PK_SolaceMsgVPNTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE SolaceMsgVPNTest_THRESH;
CREATE TABLE SolaceMsgVPNTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
ENABLED_STATUS_MIN VARCHAR(256) NOT NULL,
ENABLED_STATUS_MAX VARCHAR(256) NOT NULL,
LOCAL_STATUS_MIN VARCHAR(256) NOT NULL,
LOCAL_STATUS_MAX VARCHAR(256) NOT NULL,
OPERATIONAL_STATUS_MIN VARCHAR(256) NOT NULL,
OPERATIONAL_STATUS_MAX VARCHAR(256) NOT NULL,
IS_MGMT_VPN_MIN VARCHAR(256) NOT NULL,
IS_MGMT_VPN_MAX VARCHAR(256) NOT NULL,
DIST_CACHE_MGMT_STATUS_MIN VARCHAR(256) NOT NULL,
DIST_CACHE_MGMT_STATUS_MAX VARCHAR(256) NOT NULL,
TOTAL_LOCAL_UNIQUE_SUB_MIN VARCHAR(256) NOT NULL,
TOTAL_LOCAL_UNIQUE_SUB_MAX VARCHAR(256) NOT NULL,
TOTAL_RMT_UNIQUEU_SUB_MIN VARCHAR(256) NOT NULL,
TOTAL_RMT_UNIQUEU_SUB_MAX VARCHAR(256) NOT NULL,
TOTAL_UNIQUE_SUB_MIN VARCHAR(256) NOT NULL,
TOTAL_UNIQUE_SUB_MAX VARCHAR(256) NOT NULL,
MAX_SUBSCRIPTION_MIN VARCHAR(256) NOT NULL,
MAX_SUBSCRIPTION_MAX VARCHAR(256) NOT NULL,
SUBSCRIPTION_USAGE_MIN VARCHAR(256) NOT NULL,
SUBSCRIPTION_USAGE_MAX VARCHAR(256) NOT NULL,
ADD_SUB_MSG_RCVD_MIN VARCHAR(256) NOT NULL,
ADD_SUB_MSG_RCVD_MAX VARCHAR(256) NOT NULL,
ADD_SUB_MSG_SENT_MIN VARCHAR(256) NOT NULL,
ADD_SUB_MSG_SENT_MAX VARCHAR(256) NOT NULL,
DENINED_SUB_TOPIC_ACL_MIN VARCHAR(256) NOT NULL,
DENINED_SUB_TOPIC_ACL_MAX VARCHAR(256) NOT NULL,
DENIED_SUB_TOPIC_RVSRD_MIN VARCHAR(256) NOT NULL,
DENIED_SUB_TOPIC_RVSRD_MAX VARCHAR(256) NOT NULL,
DENIED_UNSUB_TOPIC_ACL_MIN VARCHAR(256) NOT NULL,
DENIED_UNSUB_TOPIC_ACL_MAX VARCHAR(256) NOT NULL,
DENIED_SUB_PERMISSION_MIN VARCHAR(256) NOT NULL,
DENIED_SUB_PERMISSION_MAX VARCHAR(256) NOT NULL,
DENIED_UNSUB_PERMISSION_MIN VARCHAR(256) NOT NULL,
DENIED_UNSUB_PERMISSION_MAX VARCHAR(256) NOT NULL,
AMQP_CONNS_MIN VARCHAR(256) NOT NULL,
AMQP_CONNS_MAX VARCHAR(256) NOT NULL,
MAX_AMQP_CONNS_MIN VARCHAR(256) NOT NULL,
MAX_AMQP_CONNS_MAX VARCHAR(256) NOT NULL,
AMQP_USAGE_MIN VARCHAR(256) NOT NULL,
AMQP_USAGE_MAX VARCHAR(256) NOT NULL,
MQTT_CONNS_MIN VARCHAR(256) NOT NULL,
MQTT_CONNS_MAX VARCHAR(256) NOT NULL,
MAX_MQTT_CONNS_MIN VARCHAR(256) NOT NULL,
MAX_MQTT_CONNS_MAX VARCHAR(256) NOT NULL,
MQTT_USAGE_MIN VARCHAR(256) NOT NULL,
MQTT_USAGE_MAX VARCHAR(256) NOT NULL,
IN_REST_CONNS_MIN VARCHAR(256) NOT NULL,
IN_REST_CONNS_MAX VARCHAR(256) NOT NULL,
MAX_IN_REST_CONNS_MIN VARCHAR(256) NOT NULL,
MAX_IN_REST_CONNS_MAX VARCHAR(256) NOT NULL,
IN_REST_USAGE_MIN VARCHAR(256) NOT NULL,
IN_REST_USAGE_MAX VARCHAR(256) NOT NULL,
OUT_REST_CONNS_MIN VARCHAR(256) NOT NULL,
OUT_REST_CONNS_MAX VARCHAR(256) NOT NULL,
MAX_OUT_REST_CONNS_MIN VARCHAR(256) NOT NULL,
MAX_OUT_REST_CONNS_MAX VARCHAR(256) NOT NULL,
OUT_REST_USAGE_MIN VARCHAR(256) NOT NULL,
OUT_REST_USAGE_MAX VARCHAR(256) NOT NULL,
SMF_CONNS_MIN VARCHAR(256) NOT NULL,
SMF_CONNS_MAX VARCHAR(256) NOT NULL,
MAX_SMF_CONNS_MIN VARCHAR(256) NOT NULL,
MAX_SMF_CONNS_MAX VARCHAR(256) NOT NULL,
SMF_USAGE_MIN VARCHAR(256) NOT NULL,
SMF_USAGE_MAX VARCHAR(256) NOT NULL,
WEB_CONNS_MIN VARCHAR(256) NOT NULL,
WEB_CONNS_MAX VARCHAR(256) NOT NULL,
MAX_WEB_CONNS_MIN VARCHAR(256) NOT NULL,
MAX_WEB_CONNS_MAX VARCHAR(256) NOT NULL,
WEB_CONNS_USAGE_MIN VARCHAR(256) NOT NULL,
WEB_CONNS_USAGE_MAX VARCHAR(256) NOT NULL,
TOTAL_CURR_CONNS_MIN VARCHAR(256) NOT NULL,
TOTAL_CURR_CONNS_MAX VARCHAR(256) NOT NULL,
MAX_CONNS_ALLOWED_MIN VARCHAR(256) NOT NULL,
MAX_CONNS_ALLOWED_MAX VARCHAR(256) NOT NULL,
CONN_USAGE_MIN VARCHAR(256) NOT NULL,
CONN_USAGE_MAX VARCHAR(256) NOT NULL,
CLIENT_CNTRL_DATA_RCVD_MIN VARCHAR(256) NOT NULL,
CLIENT_CNTRL_DATA_RCVD_MAX VARCHAR(256) NOT NULL,
CLIENT_CNTRL_DATA_SNT_MIN VARCHAR(256) NOT NULL,
CLIENT_CNTRL_DATA_SNT_MAX VARCHAR(256) NOT NULL,
CLIENT_DATA_RCVD_MIN VARCHAR(256) NOT NULL,
CLIENT_DATA_RCVD_MAX VARCHAR(256) NOT NULL,
CLIENT_DATA_SENT_MIN VARCHAR(256) NOT NULL,
CLIENT_DATA_SENT_MAX VARCHAR(256) NOT NULL,
TOTAL_CLIENT_DATA_RCVD_MIN VARCHAR(256) NOT NULL,
TOTAL_CLIENT_DATA_RCVD_MAX VARCHAR(256) NOT NULL,
TOTAL_CLIENT_DATA_SENT_MIN VARCHAR(256) NOT NULL,
TOTAL_CLIENT_DATA_SENT_MAX VARCHAR(256) NOT NULL,
CLIENT_DATA_MSG_RCVD_MIN VARCHAR(256) NOT NULL,
CLIENT_DATA_MSG_RCVD_MAX VARCHAR(256) NOT NULL,
CLIENT_DATA_MSG_SNT_MIN VARCHAR(256) NOT NULL,
CLIENT_DATA_MSG_SNT_MAX VARCHAR(256) NOT NULL,
CLIENT_CNTRL_MSG_RCVD_MIN VARCHAR(256) NOT NULL,
CLIENT_CNTRL_MSG_RCVD_MAX VARCHAR(256) NOT NULL,
CLIENT_CNTRL_MSG_SNT_MIN VARCHAR(256) NOT NULL,
CLIENT_CNTRL_MSG_SNT_MAX VARCHAR(256) NOT NULL,
TOTAL_CLIENT_MSG_RCVD_MIN VARCHAR(256) NOT NULL,
TOTAL_CLIENT_MSG_RCVD_MAX VARCHAR(256) NOT NULL,
TOTAL_CLIENT_MSG_SNT_MIN VARCHAR(256) NOT NULL,
TOTAL_CLIENT_MSG_SNT_MAX VARCHAR(256) NOT NULL,
LOGIN_MSG_RCVD_MIN VARCHAR(256) NOT NULL,
LOGIN_MSG_RCVD_MAX VARCHAR(256) NOT NULL,
LOGIN_MSG_SENT_MIN VARCHAR(256) NOT NULL,
LOGIN_MSG_SENT_MAX VARCHAR(256) NOT NULL,
INGR_DATA_RATE_MIN VARCHAR(256) NOT NULL,
INGR_DATA_RATE_MAX VARCHAR(256) NOT NULL,
INGR_RATE_MIN VARCHAR(256) NOT NULL,
INGR_RATE_MAX VARCHAR(256) NOT NULL,
TOTAL_INGR_DISCARD_MIN VARCHAR(256) NOT NULL,
TOTAL_INGR_DISCARD_MAX VARCHAR(256) NOT NULL,
INGR_MSGSPOOL_CONGEST_MIN VARCHAR(256) NOT NULL,
INGR_MSGSPOOL_CONGEST_MAX VARCHAR(256) NOT NULL,
INGR_MSG_PROMO_CONGEST_MIN VARCHAR(256) NOT NULL,
INGR_MSG_PROMO_CONGEST_MAX VARCHAR(256) NOT NULL,
INGR_MSGSPOOL_DISCD_MIN VARCHAR(256) NOT NULL,
INGR_MSGSPOOL_DISCD_MAX VARCHAR(256) NOT NULL,
INGR_TOOBIG_MSG_MIN VARCHAR(256) NOT NULL,
INGR_TOOBIG_MSG_MAX VARCHAR(256) NOT NULL,
INGR_NO_SUB_MATCH_MIN VARCHAR(256) NOT NULL,
INGR_NO_SUB_MATCH_MAX VARCHAR(256) NOT NULL,
INGR_PARSE_ERR_MIN VARCHAR(256) NOT NULL,
INGR_PARSE_ERR_MAX VARCHAR(256) NOT NULL,
INGR_PUB_TOPIC_ACL_MIN VARCHAR(256) NOT NULL,
INGR_PUB_TOPIC_ACL_MAX VARCHAR(256) NOT NULL,
INGR_TOPIC_PARSE_ERR_MIN VARCHAR(256) NOT NULL,
INGR_TOPIC_PARSE_ERR_MAX VARCHAR(256) NOT NULL,
INGR_TTL_EXCEED_MIN VARCHAR(256) NOT NULL,
INGR_TTL_EXCEED_MAX VARCHAR(256) NOT NULL,
EGR_DATA_RATE_MIN VARCHAR(256) NOT NULL,
EGR_DATA_RATE_MAX VARCHAR(256) NOT NULL,
EGR_RATE_MIN VARCHAR(256) NOT NULL,
EGR_RATE_MAX VARCHAR(256) NOT NULL,
TOTAL_EGR_DISCARD_MIN VARCHAR(256) NOT NULL,
TOTAL_EGR_DISCARD_MAX VARCHAR(256) NOT NULL,
EGR_MSGSPOOL_DISCD_MIN VARCHAR(256) NOT NULL,
EGR_MSGSPOOL_DISCD_MAX VARCHAR(256) NOT NULL,
EGR_CLIENT_NOT_CONTD_MIN VARCHAR(256) NOT NULL,
EGR_CLIENT_NOT_CONTD_MAX VARCHAR(256) NOT NULL,
EGR_COMPRESS_CONGEST_MIN VARCHAR(256) NOT NULL,
EGR_COMPRESS_CONGEST_MAX VARCHAR(256) NOT NULL,
EGR_MSG_ELIDED_MIN VARCHAR(256) NOT NULL,
EGR_MSG_ELIDED_MAX VARCHAR(256) NOT NULL,
EGR_MSG_PROMO_CONGEST_MIN VARCHAR(256) NOT NULL,
EGR_MSG_PROMO_CONGEST_MAX VARCHAR(256) NOT NULL,
EGR_MSGSPOOL_CONGEST_MIN VARCHAR(256) NOT NULL,
EGR_MSGSPOOL_CONGEST_MAX VARCHAR(256) NOT NULL,
EGR_TRANSMIT_CONGEST_MIN VARCHAR(256) NOT NULL,
EGR_TRANSMIT_CONGEST_MAX VARCHAR(256) NOT NULL,
EGR_TTL_EXCEED_MIN VARCHAR(256) NOT NULL,
EGR_TTL_EXCEED_MAX VARCHAR(256) NOT NULL);

ALTER TABLE SolaceMsgVPNTest_THRESH ADD constraint PK_SolaceMsgVPNTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_SolaceMsgVPNTest_THRESH ON SolaceMsgVPNTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_SolaceMsgVPNTest ON SolaceMsgVPNTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_SolaceMsgVPNTest ON SolaceMsgVPNTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE SolaceMsgVPNClTest;
CREATE TABLE SolaceMsgVPNClTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
IS_SLOW_SUBSCRIBER DECIMAL(20,4) NOT NULL,
IS_SLOW_SUBSCRIBER_ST varchar(32) NOT NULL,
TOTAL_SUBSCRIPTIONS DECIMAL(20,4) NOT NULL,
TOTAL_SUBSCRIPTIONS_ST varchar(32) NOT NULL,
CLIENT_ID DECIMAL(20,4) NOT NULL,
CLIENT_ID_ST varchar(32) NOT NULL,
CLIENT_CONTROL_DATA_RCVD DECIMAL(20,4) NOT NULL,
CLIENT_CONTROL_DATA_RCVD_ST varchar(32) NOT NULL,
CLIENT_CONTROL_DATA_SENT DECIMAL(20,4) NOT NULL,
CLIENT_CONTROL_DATA_SENT_ST varchar(32) NOT NULL,
CLIENT_DATA_RECEIVED DECIMAL(20,4) NOT NULL,
CLIENT_DATA_RECEIVED_ST varchar(32) NOT NULL,
CLIENT_DATA_SENT DECIMAL(20,4) NOT NULL,
CLIENT_DATA_SENT_ST varchar(32) NOT NULL,
TOTAL_CLIENT_DATA_RCVD DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_DATA_RCVD_ST varchar(32) NOT NULL,
TOTAL_CLIENT_DATA_SENT DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_DATA_SENT_ST varchar(32) NOT NULL,
CLIENT_DATA_MSG_RCVD DECIMAL(20,4) NOT NULL,
CLIENT_DATA_MSG_RCVD_ST varchar(32) NOT NULL,
CLIENT_DATA_MSG_SEN DECIMAL(20,4) NOT NULL,
CLIENT_DATA_MSG_SEN_ST varchar(32) NOT NULL,
CLIENT_CONTROL_MSG_RCVD DECIMAL(20,4) NOT NULL,
CLIENT_CONTROL_MSG_RCVD_ST varchar(32) NOT NULL,
CLIENT_CONTROL_MSG_SENT DECIMAL(20,4) NOT NULL,
CLIENT_CONTROL_MSG_SENT_ST varchar(32) NOT NULL,
TOTAL_CLIENT_MSGS_RCVD DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_MSGS_RCVD_ST varchar(32) NOT NULL,
TOTAL_CLIENT_MSGS_SENT DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_MSGS_SENT_ST varchar(32) NOT NULL,
LOGIN_MESSAGES_RCVD DECIMAL(20,4) NOT NULL,
LOGIN_MESSAGES_RCVD_ST varchar(32) NOT NULL,
LOGIN_MESSAGES_SENT DECIMAL(20,4) NOT NULL,
LOGIN_MESSAGES_SENT_ST varchar(32) NOT NULL,
ADD_SBSCRPTN_MSGS_RCVD DECIMAL(20,4) NOT NULL,
ADD_SBSCRPTN_MSGS_RCVD_ST varchar(32) NOT NULL,
ADD_SBSCRPTN_MSGS_SENT DECIMAL(20,4) NOT NULL,
ADD_SBSCRPTN_MSGS_SENT_ST varchar(32) NOT NULL,
ALREADY_EXISTS_MSGS_SENT DECIMAL(20,4) NOT NULL,
ALREADY_EXISTS_MSGS_SENT_ST varchar(32) NOT NULL,
NOT_ENGH_SPCE_MSGS_SENT DECIMAL(20,4) NOT NULL,
NOT_ENGH_SPCE_MSGS_SENT_ST varchar(32) NOT NULL,
MAX_EXCEEDED_MSGS_SENT DECIMAL(20,4) NOT NULL,
MAX_EXCEEDED_MSGS_SENT_ST varchar(32) NOT NULL,
PRSE_ERR_ON_AD_MSGS_SENT DECIMAL(20,4) NOT NULL,
PRSE_ERR_ON_AD_MSGS_SENT_ST varchar(32) NOT NULL,
RMV_SBSCRPTN_MSGS_RCVD DECIMAL(20,4) NOT NULL,
RMV_SBSCRPTN_MSGS_RCVD_ST varchar(32) NOT NULL,
RMV_SBSCRPTN_MSGS_SENT DECIMAL(20,4) NOT NULL,
RMV_SBSCRPTN_MSGS_SENT_ST varchar(32) NOT NULL,
NOT_FOUND_MSGS_SENT DECIMAL(20,4) NOT NULL,
NOT_FOUND_MSGS_SENT_ST varchar(32) NOT NULL,
PRSE_ER_ON_RMV_MSGS_SENT DECIMAL(20,4) NOT NULL,
PRSE_ER_ON_RMV_MSGS_SENT_ST varchar(32) NOT NULL,
DENIED_UNSUBSCRIBE_PRMSN DECIMAL(20,4) NOT NULL,
DENIED_UNSUBSCRIBE_PRMSN_ST varchar(32) NOT NULL,
UNSUBSCRIBE_CLNT_NOT_FND DECIMAL(20,4) NOT NULL,
UNSUBSCRIBE_CLNT_NOT_FND_ST varchar(32) NOT NULL,
INGRESS_DATA_RATE DECIMAL(20,4) NOT NULL,
INGRESS_DATA_RATE_ST varchar(32) NOT NULL,
INGRESS_RATE DECIMAL(20,4) NOT NULL,
INGRESS_RATE_ST varchar(32) NOT NULL,
INGRESS_COMPRESSED_DATA DECIMAL(20,4) NOT NULL,
INGRESS_COMPRESSED_DATA_ST varchar(32) NOT NULL,
TOTAL_INGRESS_DISCARDS DECIMAL(20,4) NOT NULL,
TOTAL_INGRESS_DISCARDS_ST varchar(32) NOT NULL,
MESSAGE_SPOOL_CONGESTION DECIMAL(20,4) NOT NULL,
MESSAGE_SPOOL_CONGESTION_ST varchar(32) NOT NULL,
MSG_PROMOTNN_CONGSTN DECIMAL(20,4) NOT NULL,
MSG_PROMOTNN_CONGSTN_ST varchar(32) NOT NULL,
MSG_SPOOL_DISCARDS DECIMAL(20,4) NOT NULL,
MSG_SPOOL_DISCARDS_ST varchar(32) NOT NULL,
MSG_TOO_BIG DECIMAL(20,4) NOT NULL,
MSG_TOO_BIG_ST varchar(32) NOT NULL,
NO_SUBSCRIPTION_MATCH DECIMAL(20,4) NOT NULL,
NO_SUBSCRIPTION_MATCH_ST varchar(32) NOT NULL,
PARSE_ERROR DECIMAL(20,4) NOT NULL,
PARSE_ERROR_ST varchar(32) NOT NULL,
PUBLISH_TOPIC_ACL DECIMAL(20,4) NOT NULL,
PUBLISH_TOPIC_ACL_ST varchar(32) NOT NULL,
TOPIC_PARSE_ERROR DECIMAL(20,4) NOT NULL,
TOPIC_PARSE_ERROR_ST varchar(32) NOT NULL,
TTL_EXCEEDED DECIMAL(20,4) NOT NULL,
TTL_EXCEEDED_ST varchar(32) NOT NULL,
EGRESS_DATA_RATE DECIMAL(20,4) NOT NULL,
EGRESS_DATA_RATE_ST varchar(32) NOT NULL,
EGRESS_RATE DECIMAL(20,4) NOT NULL,
EGRESS_RATE_ST varchar(32) NOT NULL,
EGRESS_COMPRESSED_DATA DECIMAL(20,4) NOT NULL,
EGRESS_COMPRESSED_DATA_ST varchar(32) NOT NULL,
TOTAL_EGRESS_DISCARDS DECIMAL(20,4) NOT NULL,
TOTAL_EGRESS_DISCARDS_ST varchar(32) NOT NULL,
CLIENT_NOT_CONNECTED DECIMAL(20,4) NOT NULL,
CLIENT_NOT_CONNECTED_ST varchar(32) NOT NULL,
COMPRESSION_CONGESTION DECIMAL(20,4) NOT NULL,
COMPRESSION_CONGESTION_ST varchar(32) NOT NULL,
MESSAGE_ELIDED DECIMAL(20,4) NOT NULL,
MESSAGE_ELIDED_ST varchar(32) NOT NULL,
EGR_MSG_PROMOTION_CONGSN DECIMAL(20,4) NOT NULL,
EGR_MSG_PROMOTION_CONGSN_ST varchar(32) NOT NULL,
EGR_MSG_SPOOL_CONGSTN DECIMAL(20,4) NOT NULL,
EGR_MSG_SPOOL_CONGSTN_ST varchar(32) NOT NULL,
TRANSMIT_CONGESTION DECIMAL(20,4) NOT NULL,
TRANSMIT_CONGESTION_ST varchar(32) NOT NULL,
EGR_TTL_EXCEEDED DECIMAL(20,4) NOT NULL,
EGR_TTL_EXCEEDED_ST varchar(32) NOT NULL,
CONN_STATE DECIMAL(20,4) NOT NULL,
CONN_STATE_ST varchar(32) NOT NULL,
CONN_UPTIME DECIMAL(20,4) NOT NULL,
CONN_UPTIME_ST varchar(32) NOT NULL,
CONN_COMPRESSED DECIMAL(20,4) NOT NULL,
CONN_COMPRESSED_ST varchar(32) NOT NULL,
CONN_TLS_STATE DECIMAL(20,4) NOT NULL,
CONN_TLS_STATE_ST varchar(32) NOT NULL,
SEND_QUEUE DECIMAL(20,4) NOT NULL,
SEND_QUEUE_ST varchar(32) NOT NULL,
RECEIVE_QUEUE DECIMAL(20,4) NOT NULL,
RECEIVE_QUEUE_ST varchar(32) NOT NULL,
ROUND_TRIP DECIMAL(20,4) NOT NULL,
ROUND_TRIP_ST varchar(32) NOT NULL,
TIMED_RETRANSMIT DECIMAL(20,4) NOT NULL,
TIMED_RETRANSMIT_ST varchar(32) NOT NULL,
FAST_RETRANSMIT DECIMAL(20,4) NOT NULL,
FAST_RETRANSMIT_ST varchar(32) NOT NULL,
REC_OUTOF_ORDER DECIMAL(20,4) NOT NULL,
REC_OUTOF_ORDER_ST varchar(32) NOT NULL);

CREATE INDEX IDX_SolaceMsgVPNClTest ON SolaceMsgVPNClTest(MSMT_TIME);
ALTER TABLE SolaceMsgVPNClTest ADD constraint PK_SolaceMsgVPNClTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE SolaceMsgVPNClTest_TREND;
CREATE TABLE SolaceMsgVPNClTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
IS_SLOW_SUBSCRIBER_MIN DECIMAL(20,4) NOT NULL,
IS_SLOW_SUBSCRIBER_MAX DECIMAL(20,4) NOT NULL,
IS_SLOW_SUBSCRIBER_STCNT varchar(32) NOT NULL,
TOTAL_SUBSCRIPTIONS_MIN DECIMAL(20,4) NOT NULL,
TOTAL_SUBSCRIPTIONS_MAX DECIMAL(20,4) NOT NULL,
TOTAL_SUBSCRIPTIONS_STCNT varchar(32) NOT NULL,
CLIENT_ID_MIN DECIMAL(20,4) NOT NULL,
CLIENT_ID_MAX DECIMAL(20,4) NOT NULL,
CLIENT_ID_STCNT varchar(32) NOT NULL,
CLIENT_CONTROL_DATA_RCVD_MIN DECIMAL(20,4) NOT NULL,
CLIENT_CONTROL_DATA_RCVD_MAX DECIMAL(20,4) NOT NULL,
CLIENT_CONTROL_DATA_RCVD_STCNT varchar(32) NOT NULL,
CLIENT_CONTROL_DATA_SENT_MIN DECIMAL(20,4) NOT NULL,
CLIENT_CONTROL_DATA_SENT_MAX DECIMAL(20,4) NOT NULL,
CLIENT_CONTROL_DATA_SENT_STCNT varchar(32) NOT NULL,
CLIENT_DATA_RECEIVED_MIN DECIMAL(20,4) NOT NULL,
CLIENT_DATA_RECEIVED_MAX DECIMAL(20,4) NOT NULL,
CLIENT_DATA_RECEIVED_STCNT varchar(32) NOT NULL,
CLIENT_DATA_SENT_MIN DECIMAL(20,4) NOT NULL,
CLIENT_DATA_SENT_MAX DECIMAL(20,4) NOT NULL,
CLIENT_DATA_SENT_STCNT varchar(32) NOT NULL,
TOTAL_CLIENT_DATA_RCVD_MIN DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_DATA_RCVD_MAX DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_DATA_RCVD_STCNT varchar(32) NOT NULL,
TOTAL_CLIENT_DATA_SENT_MIN DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_DATA_SENT_MAX DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_DATA_SENT_STCNT varchar(32) NOT NULL,
CLIENT_DATA_MSG_RCVD_MIN DECIMAL(20,4) NOT NULL,
CLIENT_DATA_MSG_RCVD_MAX DECIMAL(20,4) NOT NULL,
CLIENT_DATA_MSG_RCVD_STCNT varchar(32) NOT NULL,
CLIENT_DATA_MSG_SEN_MIN DECIMAL(20,4) NOT NULL,
CLIENT_DATA_MSG_SEN_MAX DECIMAL(20,4) NOT NULL,
CLIENT_DATA_MSG_SEN_STCNT varchar(32) NOT NULL,
CLIENT_CONTROL_MSG_RCVD_MIN DECIMAL(20,4) NOT NULL,
CLIENT_CONTROL_MSG_RCVD_MAX DECIMAL(20,4) NOT NULL,
CLIENT_CONTROL_MSG_RCVD_STCNT varchar(32) NOT NULL,
CLIENT_CONTROL_MSG_SENT_MIN DECIMAL(20,4) NOT NULL,
CLIENT_CONTROL_MSG_SENT_MAX DECIMAL(20,4) NOT NULL,
CLIENT_CONTROL_MSG_SENT_STCNT varchar(32) NOT NULL,
TOTAL_CLIENT_MSGS_RCVD_MIN DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_MSGS_RCVD_MAX DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_MSGS_RCVD_STCNT varchar(32) NOT NULL,
TOTAL_CLIENT_MSGS_SENT_MIN DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_MSGS_SENT_MAX DECIMAL(20,4) NOT NULL,
TOTAL_CLIENT_MSGS_SENT_STCNT varchar(32) NOT NULL,
LOGIN_MESSAGES_RCVD_MIN DECIMAL(20,4) NOT NULL,
LOGIN_MESSAGES_RCVD_MAX DECIMAL(20,4) NOT NULL,
LOGIN_MESSAGES_RCVD_STCNT varchar(32) NOT NULL,
LOGIN_MESSAGES_SENT_MIN DECIMAL(20,4) NOT NULL,
LOGIN_MESSAGES_SENT_MAX DECIMAL(20,4) NOT NULL,
LOGIN_MESSAGES_SENT_STCNT varchar(32) NOT NULL,
ADD_SBSCRPTN_MSGS_RCVD_MIN DECIMAL(20,4) NOT NULL,
ADD_SBSCRPTN_MSGS_RCVD_MAX DECIMAL(20,4) NOT NULL,
ADD_SBSCRPTN_MSGS_RCVD_STCNT varchar(32) NOT NULL,
ADD_SBSCRPTN_MSGS_SENT_MIN DECIMAL(20,4) NOT NULL,
ADD_SBSCRPTN_MSGS_SENT_MAX DECIMAL(20,4) NOT NULL,
ADD_SBSCRPTN_MSGS_SENT_STCNT varchar(32) NOT NULL,
ALREADY_EXISTS_MSGS_SENT_MIN DECIMAL(20,4) NOT NULL,
ALREADY_EXISTS_MSGS_SENT_MAX DECIMAL(20,4) NOT NULL,
ALREADY_EXISTS_MSGS_SENT_STCNT varchar(32) NOT NULL,
NOT_ENGH_SPCE_MSGS_SENT_MIN DECIMAL(20,4) NOT NULL,
NOT_ENGH_SPCE_MSGS_SENT_MAX DECIMAL(20,4) NOT NULL,
NOT_ENGH_SPCE_MSGS_SENT_STCNT varchar(32) NOT NULL,
MAX_EXCEEDED_MSGS_SENT_MIN DECIMAL(20,4) NOT NULL,
MAX_EXCEEDED_MSGS_SENT_MAX DECIMAL(20,4) NOT NULL,
MAX_EXCEEDED_MSGS_SENT_STCNT varchar(32) NOT NULL,
PRSE_ERR_ON_AD_MSGS_SENT_MIN DECIMAL(20,4) NOT NULL,
PRSE_ERR_ON_AD_MSGS_SENT_MAX DECIMAL(20,4) NOT NULL,
PRSE_ERR_ON_AD_MSGS_SENT_STCNT varchar(32) NOT NULL,
RMV_SBSCRPTN_MSGS_RCVD_MIN DECIMAL(20,4) NOT NULL,
RMV_SBSCRPTN_MSGS_RCVD_MAX DECIMAL(20,4) NOT NULL,
RMV_SBSCRPTN_MSGS_RCVD_STCNT varchar(32) NOT NULL,
RMV_SBSCRPTN_MSGS_SENT_MIN DECIMAL(20,4) NOT NULL,
RMV_SBSCRPTN_MSGS_SENT_MAX DECIMAL(20,4) NOT NULL,
RMV_SBSCRPTN_MSGS_SENT_STCNT varchar(32) NOT NULL,
NOT_FOUND_MSGS_SENT_MIN DECIMAL(20,4) NOT NULL,
NOT_FOUND_MSGS_SENT_MAX DECIMAL(20,4) NOT NULL,
NOT_FOUND_MSGS_SENT_STCNT varchar(32) NOT NULL,
PRSE_ER_ON_RMV_MSGS_SENT_MIN DECIMAL(20,4) NOT NULL,
PRSE_ER_ON_RMV_MSGS_SENT_MAX DECIMAL(20,4) NOT NULL,
PRSE_ER_ON_RMV_MSGS_SENT_STCNT varchar(32) NOT NULL,
DENIED_UNSUBSCRIBE_PRMSN_MIN DECIMAL(20,4) NOT NULL,
DENIED_UNSUBSCRIBE_PRMSN_MAX DECIMAL(20,4) NOT NULL,
DENIED_UNSUBSCRIBE_PRMSN_STCNT varchar(32) NOT NULL,
UNSUBSCRIBE_CLNT_NOT_FND_MIN DECIMAL(20,4) NOT NULL,
UNSUBSCRIBE_CLNT_NOT_FND_MAX DECIMAL(20,4) NOT NULL,
UNSUBSCRIBE_CLNT_NOT_FND_STCNT varchar(32) NOT NULL,
INGRESS_DATA_RATE_MIN DECIMAL(20,4) NOT NULL,
INGRESS_DATA_RATE_MAX DECIMAL(20,4) NOT NULL,
INGRESS_DATA_RATE_STCNT varchar(32) NOT NULL,
INGRESS_RATE_MIN DECIMAL(20,4) NOT NULL,
INGRESS_RATE_MAX DECIMAL(20,4) NOT NULL,
INGRESS_RATE_STCNT varchar(32) NOT NULL,
INGRESS_COMPRESSED_DATA_MIN DECIMAL(20,4) NOT NULL,
INGRESS_COMPRESSED_DATA_MAX DECIMAL(20,4) NOT NULL,
INGRESS_COMPRESSED_DATA_STCNT varchar(32) NOT NULL,
TOTAL_INGRESS_DISCARDS_MIN DECIMAL(20,4) NOT NULL,
TOTAL_INGRESS_DISCARDS_MAX DECIMAL(20,4) NOT NULL,
TOTAL_INGRESS_DISCARDS_STCNT varchar(32) NOT NULL,
MESSAGE_SPOOL_CONGESTION_MIN DECIMAL(20,4) NOT NULL,
MESSAGE_SPOOL_CONGESTION_MAX DECIMAL(20,4) NOT NULL,
MESSAGE_SPOOL_CONGESTION_STCNT varchar(32) NOT NULL,
MSG_PROMOTNN_CONGSTN_MIN DECIMAL(20,4) NOT NULL,
MSG_PROMOTNN_CONGSTN_MAX DECIMAL(20,4) NOT NULL,
MSG_PROMOTNN_CONGSTN_STCNT varchar(32) NOT NULL,
MSG_SPOOL_DISCARDS_MIN DECIMAL(20,4) NOT NULL,
MSG_SPOOL_DISCARDS_MAX DECIMAL(20,4) NOT NULL,
MSG_SPOOL_DISCARDS_STCNT varchar(32) NOT NULL,
MSG_TOO_BIG_MIN DECIMAL(20,4) NOT NULL,
MSG_TOO_BIG_MAX DECIMAL(20,4) NOT NULL,
MSG_TOO_BIG_STCNT varchar(32) NOT NULL,
NO_SUBSCRIPTION_MATCH_MIN DECIMAL(20,4) NOT NULL,
NO_SUBSCRIPTION_MATCH_MAX DECIMAL(20,4) NOT NULL,
NO_SUBSCRIPTION_MATCH_STCNT varchar(32) NOT NULL,
PARSE_ERROR_MIN DECIMAL(20,4) NOT NULL,
PARSE_ERROR_MAX DECIMAL(20,4) NOT NULL,
PARSE_ERROR_STCNT varchar(32) NOT NULL,
PUBLISH_TOPIC_ACL_MIN DECIMAL(20,4) NOT NULL,
PUBLISH_TOPIC_ACL_MAX DECIMAL(20,4) NOT NULL,
PUBLISH_TOPIC_ACL_STCNT varchar(32) NOT NULL,
TOPIC_PARSE_ERROR_MIN DECIMAL(20,4) NOT NULL,
TOPIC_PARSE_ERROR_MAX DECIMAL(20,4) NOT NULL,
TOPIC_PARSE_ERROR_STCNT varchar(32) NOT NULL,
TTL_EXCEEDED_MIN DECIMAL(20,4) NOT NULL,
TTL_EXCEEDED_MAX DECIMAL(20,4) NOT NULL,
TTL_EXCEEDED_STCNT varchar(32) NOT NULL,
EGRESS_DATA_RATE_MIN DECIMAL(20,4) NOT NULL,
EGRESS_DATA_RATE_MAX DECIMAL(20,4) NOT NULL,
EGRESS_DATA_RATE_STCNT varchar(32) NOT NULL,
EGRESS_RATE_MIN DECIMAL(20,4) NOT NULL,
EGRESS_RATE_MAX DECIMAL(20,4) NOT NULL,
EGRESS_RATE_STCNT varchar(32) NOT NULL,
EGRESS_COMPRESSED_DATA_MIN DECIMAL(20,4) NOT NULL,
EGRESS_COMPRESSED_DATA_MAX DECIMAL(20,4) NOT NULL,
EGRESS_COMPRESSED_DATA_STCNT varchar(32) NOT NULL,
TOTAL_EGRESS_DISCARDS_MIN DECIMAL(20,4) NOT NULL,
TOTAL_EGRESS_DISCARDS_MAX DECIMAL(20,4) NOT NULL,
TOTAL_EGRESS_DISCARDS_STCNT varchar(32) NOT NULL,
CLIENT_NOT_CONNECTED_MIN DECIMAL(20,4) NOT NULL,
CLIENT_NOT_CONNECTED_MAX DECIMAL(20,4) NOT NULL,
CLIENT_NOT_CONNECTED_STCNT varchar(32) NOT NULL,
COMPRESSION_CONGESTION_MIN DECIMAL(20,4) NOT NULL,
COMPRESSION_CONGESTION_MAX DECIMAL(20,4) NOT NULL,
COMPRESSION_CONGESTION_STCNT varchar(32) NOT NULL,
MESSAGE_ELIDED_MIN DECIMAL(20,4) NOT NULL,
MESSAGE_ELIDED_MAX DECIMAL(20,4) NOT NULL,
MESSAGE_ELIDED_STCNT varchar(32) NOT NULL,
EGR_MSG_PROMOTION_CONGSN_MIN DECIMAL(20,4) NOT NULL,
EGR_MSG_PROMOTION_CONGSN_MAX DECIMAL(20,4) NOT NULL,
EGR_MSG_PROMOTION_CONGSN_STCNT varchar(32) NOT NULL,
EGR_MSG_SPOOL_CONGSTN_MIN DECIMAL(20,4) NOT NULL,
EGR_MSG_SPOOL_CONGSTN_MAX DECIMAL(20,4) NOT NULL,
EGR_MSG_SPOOL_CONGSTN_STCNT varchar(32) NOT NULL,
TRANSMIT_CONGESTION_MIN DECIMAL(20,4) NOT NULL,
TRANSMIT_CONGESTION_MAX DECIMAL(20,4) NOT NULL,
TRANSMIT_CONGESTION_STCNT varchar(32) NOT NULL,
EGR_TTL_EXCEEDED_MIN DECIMAL(20,4) NOT NULL,
EGR_TTL_EXCEEDED_MAX DECIMAL(20,4) NOT NULL,
EGR_TTL_EXCEEDED_STCNT varchar(32) NOT NULL,
CONN_STATE_MIN DECIMAL(20,4) NOT NULL,
CONN_STATE_MAX DECIMAL(20,4) NOT NULL,
CONN_STATE_STCNT varchar(32) NOT NULL,
CONN_UPTIME_MIN DECIMAL(20,4) NOT NULL,
CONN_UPTIME_MAX DECIMAL(20,4) NOT NULL,
CONN_UPTIME_STCNT varchar(32) NOT NULL,
CONN_COMPRESSED_MIN DECIMAL(20,4) NOT NULL,
CONN_COMPRESSED_MAX DECIMAL(20,4) NOT NULL,
CONN_COMPRESSED_STCNT varchar(32) NOT NULL,
CONN_TLS_STATE_MIN DECIMAL(20,4) NOT NULL,
CONN_TLS_STATE_MAX DECIMAL(20,4) NOT NULL,
CONN_TLS_STATE_STCNT varchar(32) NOT NULL,
SEND_QUEUE_MIN DECIMAL(20,4) NOT NULL,
SEND_QUEUE_MAX DECIMAL(20,4) NOT NULL,
SEND_QUEUE_STCNT varchar(32) NOT NULL,
RECEIVE_QUEUE_MIN DECIMAL(20,4) NOT NULL,
RECEIVE_QUEUE_MAX DECIMAL(20,4) NOT NULL,
RECEIVE_QUEUE_STCNT varchar(32) NOT NULL,
ROUND_TRIP_MIN DECIMAL(20,4) NOT NULL,
ROUND_TRIP_MAX DECIMAL(20,4) NOT NULL,
ROUND_TRIP_STCNT varchar(32) NOT NULL,
TIMED_RETRANSMIT_MIN DECIMAL(20,4) NOT NULL,
TIMED_RETRANSMIT_MAX DECIMAL(20,4) NOT NULL,
TIMED_RETRANSMIT_STCNT varchar(32) NOT NULL,
FAST_RETRANSMIT_MIN DECIMAL(20,4) NOT NULL,
FAST_RETRANSMIT_MAX DECIMAL(20,4) NOT NULL,
FAST_RETRANSMIT_STCNT varchar(32) NOT NULL,
REC_OUTOF_ORDER_MIN DECIMAL(20,4) NOT NULL,
REC_OUTOF_ORDER_MAX DECIMAL(20,4) NOT NULL,
REC_OUTOF_ORDER_STCNT varchar(32) NOT NULL);

ALTER TABLE SolaceMsgVPNClTest_TREND ADD constraint PK_SolaceMsgVPNClTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE SolaceMsgVPNClTest_THRESH;
CREATE TABLE SolaceMsgVPNClTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
IS_SLOW_SUBSCRIBER_MIN VARCHAR(256) NOT NULL,
IS_SLOW_SUBSCRIBER_MAX VARCHAR(256) NOT NULL,
TOTAL_SUBSCRIPTIONS_MIN VARCHAR(256) NOT NULL,
TOTAL_SUBSCRIPTIONS_MAX VARCHAR(256) NOT NULL,
CLIENT_ID_MIN VARCHAR(256) NOT NULL,
CLIENT_ID_MAX VARCHAR(256) NOT NULL,
CLIENT_CONTROL_DATA_RCVD_MIN VARCHAR(256) NOT NULL,
CLIENT_CONTROL_DATA_RCVD_MAX VARCHAR(256) NOT NULL,
CLIENT_CONTROL_DATA_SENT_MIN VARCHAR(256) NOT NULL,
CLIENT_CONTROL_DATA_SENT_MAX VARCHAR(256) NOT NULL,
CLIENT_DATA_RECEIVED_MIN VARCHAR(256) NOT NULL,
CLIENT_DATA_RECEIVED_MAX VARCHAR(256) NOT NULL,
CLIENT_DATA_SENT_MIN VARCHAR(256) NOT NULL,
CLIENT_DATA_SENT_MAX VARCHAR(256) NOT NULL,
TOTAL_CLIENT_DATA_RCVD_MIN VARCHAR(256) NOT NULL,
TOTAL_CLIENT_DATA_RCVD_MAX VARCHAR(256) NOT NULL,
TOTAL_CLIENT_DATA_SENT_MIN VARCHAR(256) NOT NULL,
TOTAL_CLIENT_DATA_SENT_MAX VARCHAR(256) NOT NULL,
CLIENT_DATA_MSG_RCVD_MIN VARCHAR(256) NOT NULL,
CLIENT_DATA_MSG_RCVD_MAX VARCHAR(256) NOT NULL,
CLIENT_DATA_MSG_SEN_MIN VARCHAR(256) NOT NULL,
CLIENT_DATA_MSG_SEN_MAX VARCHAR(256) NOT NULL,
CLIENT_CONTROL_MSG_RCVD_MIN VARCHAR(256) NOT NULL,
CLIENT_CONTROL_MSG_RCVD_MAX VARCHAR(256) NOT NULL,
CLIENT_CONTROL_MSG_SENT_MIN VARCHAR(256) NOT NULL,
CLIENT_CONTROL_MSG_SENT_MAX VARCHAR(256) NOT NULL,
TOTAL_CLIENT_MSGS_RCVD_MIN VARCHAR(256) NOT NULL,
TOTAL_CLIENT_MSGS_RCVD_MAX VARCHAR(256) NOT NULL,
TOTAL_CLIENT_MSGS_SENT_MIN VARCHAR(256) NOT NULL,
TOTAL_CLIENT_MSGS_SENT_MAX VARCHAR(256) NOT NULL,
LOGIN_MESSAGES_RCVD_MIN VARCHAR(256) NOT NULL,
LOGIN_MESSAGES_RCVD_MAX VARCHAR(256) NOT NULL,
LOGIN_MESSAGES_SENT_MIN VARCHAR(256) NOT NULL,
LOGIN_MESSAGES_SENT_MAX VARCHAR(256) NOT NULL,
ADD_SBSCRPTN_MSGS_RCVD_MIN VARCHAR(256) NOT NULL,
ADD_SBSCRPTN_MSGS_RCVD_MAX VARCHAR(256) NOT NULL,
ADD_SBSCRPTN_MSGS_SENT_MIN VARCHAR(256) NOT NULL,
ADD_SBSCRPTN_MSGS_SENT_MAX VARCHAR(256) NOT NULL,
ALREADY_EXISTS_MSGS_SENT_MIN VARCHAR(256) NOT NULL,
ALREADY_EXISTS_MSGS_SENT_MAX VARCHAR(256) NOT NULL,
NOT_ENGH_SPCE_MSGS_SENT_MIN VARCHAR(256) NOT NULL,
NOT_ENGH_SPCE_MSGS_SENT_MAX VARCHAR(256) NOT NULL,
MAX_EXCEEDED_MSGS_SENT_MIN VARCHAR(256) NOT NULL,
MAX_EXCEEDED_MSGS_SENT_MAX VARCHAR(256) NOT NULL,
PRSE_ERR_ON_AD_MSGS_SENT_MIN VARCHAR(256) NOT NULL,
PRSE_ERR_ON_AD_MSGS_SENT_MAX VARCHAR(256) NOT NULL,
RMV_SBSCRPTN_MSGS_RCVD_MIN VARCHAR(256) NOT NULL,
RMV_SBSCRPTN_MSGS_RCVD_MAX VARCHAR(256) NOT NULL,
RMV_SBSCRPTN_MSGS_SENT_MIN VARCHAR(256) NOT NULL,
RMV_SBSCRPTN_MSGS_SENT_MAX VARCHAR(256) NOT NULL,
NOT_FOUND_MSGS_SENT_MIN VARCHAR(256) NOT NULL,
NOT_FOUND_MSGS_SENT_MAX VARCHAR(256) NOT NULL,
PRSE_ER_ON_RMV_MSGS_SENT_MIN VARCHAR(256) NOT NULL,
PRSE_ER_ON_RMV_MSGS_SENT_MAX VARCHAR(256) NOT NULL,
DENIED_UNSUBSCRIBE_PRMSN_MIN VARCHAR(256) NOT NULL,
DENIED_UNSUBSCRIBE_PRMSN_MAX VARCHAR(256) NOT NULL,
UNSUBSCRIBE_CLNT_NOT_FND_MIN VARCHAR(256) NOT NULL,
UNSUBSCRIBE_CLNT_NOT_FND_MAX VARCHAR(256) NOT NULL,
INGRESS_DATA_RATE_MIN VARCHAR(256) NOT NULL,
INGRESS_DATA_RATE_MAX VARCHAR(256) NOT NULL,
INGRESS_RATE_MIN VARCHAR(256) NOT NULL,
INGRESS_RATE_MAX VARCHAR(256) NOT NULL,
INGRESS_COMPRESSED_DATA_MIN VARCHAR(256) NOT NULL,
INGRESS_COMPRESSED_DATA_MAX VARCHAR(256) NOT NULL,
TOTAL_INGRESS_DISCARDS_MIN VARCHAR(256) NOT NULL,
TOTAL_INGRESS_DISCARDS_MAX VARCHAR(256) NOT NULL,
MESSAGE_SPOOL_CONGESTION_MIN VARCHAR(256) NOT NULL,
MESSAGE_SPOOL_CONGESTION_MAX VARCHAR(256) NOT NULL,
MSG_PROMOTNN_CONGSTN_MIN VARCHAR(256) NOT NULL,
MSG_PROMOTNN_CONGSTN_MAX VARCHAR(256) NOT NULL,
MSG_SPOOL_DISCARDS_MIN VARCHAR(256) NOT NULL,
MSG_SPOOL_DISCARDS_MAX VARCHAR(256) NOT NULL,
MSG_TOO_BIG_MIN VARCHAR(256) NOT NULL,
MSG_TOO_BIG_MAX VARCHAR(256) NOT NULL,
NO_SUBSCRIPTION_MATCH_MIN VARCHAR(256) NOT NULL,
NO_SUBSCRIPTION_MATCH_MAX VARCHAR(256) NOT NULL,
PARSE_ERROR_MIN VARCHAR(256) NOT NULL,
PARSE_ERROR_MAX VARCHAR(256) NOT NULL,
PUBLISH_TOPIC_ACL_MIN VARCHAR(256) NOT NULL,
PUBLISH_TOPIC_ACL_MAX VARCHAR(256) NOT NULL,
TOPIC_PARSE_ERROR_MIN VARCHAR(256) NOT NULL,
TOPIC_PARSE_ERROR_MAX VARCHAR(256) NOT NULL,
TTL_EXCEEDED_MIN VARCHAR(256) NOT NULL,
TTL_EXCEEDED_MAX VARCHAR(256) NOT NULL,
EGRESS_DATA_RATE_MIN VARCHAR(256) NOT NULL,
EGRESS_DATA_RATE_MAX VARCHAR(256) NOT NULL,
EGRESS_RATE_MIN VARCHAR(256) NOT NULL,
EGRESS_RATE_MAX VARCHAR(256) NOT NULL,
EGRESS_COMPRESSED_DATA_MIN VARCHAR(256) NOT NULL,
EGRESS_COMPRESSED_DATA_MAX VARCHAR(256) NOT NULL,
TOTAL_EGRESS_DISCARDS_MIN VARCHAR(256) NOT NULL,
TOTAL_EGRESS_DISCARDS_MAX VARCHAR(256) NOT NULL,
CLIENT_NOT_CONNECTED_MIN VARCHAR(256) NOT NULL,
CLIENT_NOT_CONNECTED_MAX VARCHAR(256) NOT NULL,
COMPRESSION_CONGESTION_MIN VARCHAR(256) NOT NULL,
COMPRESSION_CONGESTION_MAX VARCHAR(256) NOT NULL,
MESSAGE_ELIDED_MIN VARCHAR(256) NOT NULL,
MESSAGE_ELIDED_MAX VARCHAR(256) NOT NULL,
EGR_MSG_PROMOTION_CONGSN_MIN VARCHAR(256) NOT NULL,
EGR_MSG_PROMOTION_CONGSN_MAX VARCHAR(256) NOT NULL,
EGR_MSG_SPOOL_CONGSTN_MIN VARCHAR(256) NOT NULL,
EGR_MSG_SPOOL_CONGSTN_MAX VARCHAR(256) NOT NULL,
TRANSMIT_CONGESTION_MIN VARCHAR(256) NOT NULL,
TRANSMIT_CONGESTION_MAX VARCHAR(256) NOT NULL,
EGR_TTL_EXCEEDED_MIN VARCHAR(256) NOT NULL,
EGR_TTL_EXCEEDED_MAX VARCHAR(256) NOT NULL,
CONN_STATE_MIN VARCHAR(256) NOT NULL,
CONN_STATE_MAX VARCHAR(256) NOT NULL,
CONN_UPTIME_MIN VARCHAR(256) NOT NULL,
CONN_UPTIME_MAX VARCHAR(256) NOT NULL,
CONN_COMPRESSED_MIN VARCHAR(256) NOT NULL,
CONN_COMPRESSED_MAX VARCHAR(256) NOT NULL,
CONN_TLS_STATE_MIN VARCHAR(256) NOT NULL,
CONN_TLS_STATE_MAX VARCHAR(256) NOT NULL,
SEND_QUEUE_MIN VARCHAR(256) NOT NULL,
SEND_QUEUE_MAX VARCHAR(256) NOT NULL,
RECEIVE_QUEUE_MIN VARCHAR(256) NOT NULL,
RECEIVE_QUEUE_MAX VARCHAR(256) NOT NULL,
ROUND_TRIP_MIN VARCHAR(256) NOT NULL,
ROUND_TRIP_MAX VARCHAR(256) NOT NULL,
TIMED_RETRANSMIT_MIN VARCHAR(256) NOT NULL,
TIMED_RETRANSMIT_MAX VARCHAR(256) NOT NULL,
FAST_RETRANSMIT_MIN VARCHAR(256) NOT NULL,
FAST_RETRANSMIT_MAX VARCHAR(256) NOT NULL,
REC_OUTOF_ORDER_MIN VARCHAR(256) NOT NULL,
REC_OUTOF_ORDER_MAX VARCHAR(256) NOT NULL);

ALTER TABLE SolaceMsgVPNClTest_THRESH ADD constraint PK_SolaceMsgVPNClTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_SolaceMsgVPNClTest_THRESH ON SolaceMsgVPNClTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_SolaceMsgVPNClTest ON SolaceMsgVPNClTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_SolaceMsgVPNClTest ON SolaceMsgVPNClTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE SolaceMsgVPNQClTest;
CREATE TABLE SolaceMsgVPNQClTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
DELIVER_MSG DECIMAL(20,4) NOT NULL,
DELIVER_MSG_ST varchar(32) NOT NULL,
DISCD_MSG DECIMAL(20,4) NOT NULL,
DISCD_MSG_ST varchar(32) NOT NULL,
LENGTH_MSG DECIMAL(20,4) NOT NULL,
LENGTH_MSG_ST varchar(32) NOT NULL,
LENGTH_WORK DECIMAL(20,4) NOT NULL,
LENGTH_WORK_ST varchar(32) NOT NULL,
HIGH_WATER_MARK_WORK DECIMAL(20,4) NOT NULL,
HIGH_WATER_MARK_WORK_ST varchar(32) NOT NULL,
MAX_QUEUE_SIZE DECIMAL(20,4) NOT NULL,
MAX_QUEUE_SIZE_ST varchar(32) NOT NULL,
QUEUE_USAGE DECIMAL(20,4) NOT NULL,
QUEUE_USAGE_ST varchar(32) NOT NULL);

CREATE INDEX IDX_SolaceMsgVPNQClTest ON SolaceMsgVPNQClTest(MSMT_TIME);
ALTER TABLE SolaceMsgVPNQClTest ADD constraint PK_SolaceMsgVPNQClTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE SolaceMsgVPNQClTest_TREND;
CREATE TABLE SolaceMsgVPNQClTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
DELIVER_MSG_MIN DECIMAL(20,4) NOT NULL,
DELIVER_MSG_MAX DECIMAL(20,4) NOT NULL,
DELIVER_MSG_STCNT varchar(32) NOT NULL,
DISCD_MSG_MIN DECIMAL(20,4) NOT NULL,
DISCD_MSG_MAX DECIMAL(20,4) NOT NULL,
DISCD_MSG_STCNT varchar(32) NOT NULL,
LENGTH_MSG_MIN DECIMAL(20,4) NOT NULL,
LENGTH_MSG_MAX DECIMAL(20,4) NOT NULL,
LENGTH_MSG_STCNT varchar(32) NOT NULL,
LENGTH_WORK_MIN DECIMAL(20,4) NOT NULL,
LENGTH_WORK_MAX DECIMAL(20,4) NOT NULL,
LENGTH_WORK_STCNT varchar(32) NOT NULL,
HIGH_WATER_MARK_WORK_MIN DECIMAL(20,4) NOT NULL,
HIGH_WATER_MARK_WORK_MAX DECIMAL(20,4) NOT NULL,
HIGH_WATER_MARK_WORK_STCNT varchar(32) NOT NULL,
MAX_QUEUE_SIZE_MIN DECIMAL(20,4) NOT NULL,
MAX_QUEUE_SIZE_MAX DECIMAL(20,4) NOT NULL,
MAX_QUEUE_SIZE_STCNT varchar(32) NOT NULL,
QUEUE_USAGE_MIN DECIMAL(20,4) NOT NULL,
QUEUE_USAGE_MAX DECIMAL(20,4) NOT NULL,
QUEUE_USAGE_STCNT varchar(32) NOT NULL);

ALTER TABLE SolaceMsgVPNQClTest_TREND ADD constraint PK_SolaceMsgVPNQClTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE SolaceMsgVPNQClTest_THRESH;
CREATE TABLE SolaceMsgVPNQClTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
DELIVER_MSG_MIN VARCHAR(256) NOT NULL,
DELIVER_MSG_MAX VARCHAR(256) NOT NULL,
DISCD_MSG_MIN VARCHAR(256) NOT NULL,
DISCD_MSG_MAX VARCHAR(256) NOT NULL,
LENGTH_MSG_MIN VARCHAR(256) NOT NULL,
LENGTH_MSG_MAX VARCHAR(256) NOT NULL,
LENGTH_WORK_MIN VARCHAR(256) NOT NULL,
LENGTH_WORK_MAX VARCHAR(256) NOT NULL,
HIGH_WATER_MARK_WORK_MIN VARCHAR(256) NOT NULL,
HIGH_WATER_MARK_WORK_MAX VARCHAR(256) NOT NULL,
MAX_QUEUE_SIZE_MIN VARCHAR(256) NOT NULL,
MAX_QUEUE_SIZE_MAX VARCHAR(256) NOT NULL,
QUEUE_USAGE_MIN VARCHAR(256) NOT NULL,
QUEUE_USAGE_MAX VARCHAR(256) NOT NULL);

ALTER TABLE SolaceMsgVPNQClTest_THRESH ADD constraint PK_SolaceMsgVPNQClTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_SolaceMsgVPNQClTest_THRESH ON SolaceMsgVPNQClTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_SolaceMsgVPNQClTest ON SolaceMsgVPNQClTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_SolaceMsgVPNQClTest ON SolaceMsgVPNQClTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE SolaceReduncyStTest;
CREATE TABLE SolaceReduncyStTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
CONFIG_STATUS DECIMAL(20,4) NOT NULL,
CONFIG_STATUS_ST varchar(32) NOT NULL,
REDUNDANCY_STATUS DECIMAL(20,4) NOT NULL,
REDUNDANCY_STATUS_ST varchar(32) NOT NULL,
AUTO_REVERT_ENABLED DECIMAL(20,4) NOT NULL,
AUTO_REVERT_ENABLED_ST varchar(32) NOT NULL,
ACTIVE_STANDBY_ROLE DECIMAL(20,4) NOT NULL,
ACTIVE_STANDBY_ROLE_ST varchar(32) NOT NULL,
ADB_LINK_STATE DECIMAL(20,4) NOT NULL,
ADB_LINK_STATE_ST varchar(32) NOT NULL,
ADB_HELLO_STATE DECIMAL(20,4) NOT NULL,
ADB_HELLO_STATE_ST varchar(32) NOT NULL,
ADB_HELLO_AVGLATENCY DECIMAL(20,4) NOT NULL,
ADB_HELLO_AVGLATENCY_ST varchar(32) NOT NULL,
ADB_HELLO_MAXLATENCY DECIMAL(20,4) NOT NULL,
ADB_HELLO_MAXLATENCY_ST varchar(32) NOT NULL,
PRIMARY_ACTIVITY DECIMAL(20,4) NOT NULL,
PRIMARY_ACTIVITY_ST varchar(32) NOT NULL,
PRIMARY_ROUTE_IFSTATE DECIMAL(20,4) NOT NULL,
PRIMARY_ROUTE_IFSTATE_ST varchar(32) NOT NULL,
PRIMARY_MSGSPOOL_STATE DECIMAL(20,4) NOT NULL,
PRIMARY_MSGSPOOL_STATE_ST varchar(32) NOT NULL,
PRIMARY_SMRP_STATE DECIMAL(20,4) NOT NULL,
PRIMARY_SMRP_STATE_ST varchar(32) NOT NULL,
PRIMARY_ADMSTATE DECIMAL(20,4) NOT NULL,
PRIMARY_ADMSTATE_ST varchar(32) NOT NULL,
PRIMARY_ADMDPATH_STATE DECIMAL(20,4) NOT NULL,
PRIMARY_ADMDPATH_STATE_ST varchar(32) NOT NULL,
PRIMARY_FLASHMOD_STATE DECIMAL(20,4) NOT NULL,
PRIMARY_FLASHMOD_STATE_ST varchar(32) NOT NULL,
PRIMARY_PWRMOD_STATE DECIMAL(20,4) NOT NULL,
PRIMARY_PWRMOD_STATE_ST varchar(32) NOT NULL,
PRIMARY_ADMCNT_STATE DECIMAL(20,4) NOT NULL,
PRIMARY_ADMCNT_STATE_ST varchar(32) NOT NULL,
PRIMARY_DISK_STATE DECIMAL(20,4) NOT NULL,
PRIMARY_DISK_STATE_ST varchar(32) NOT NULL,
PRIMARY_DISKCNT_STATE DECIMAL(20,4) NOT NULL,
PRIMARY_DISKCNT_STATE_ST varchar(32) NOT NULL,
PRIMARY_DB_SYNC DECIMAL(20,4) NOT NULL,
PRIMARY_DB_SYNC_ST varchar(32) NOT NULL,
PRIMARY_DB_BUILD DECIMAL(20,4) NOT NULL,
PRIMARY_DB_BUILD_ST varchar(32) NOT NULL,
PRIMARY_DB_BUILD_PCT DECIMAL(20,4) NOT NULL,
PRIMARY_DB_BUILD_PCT_ST varchar(32) NOT NULL,
BACKUP_ACTIVITY DECIMAL(20,4) NOT NULL,
BACKUP_ACTIVITY_ST varchar(32) NOT NULL,
BACKUP_ROUTE_IFSTATE DECIMAL(20,4) NOT NULL,
BACKUP_ROUTE_IFSTATE_ST varchar(32) NOT NULL,
BACKUP_MSGSPOOL_STATE DECIMAL(20,4) NOT NULL,
BACKUP_MSGSPOOL_STATE_ST varchar(32) NOT NULL,
BACKUP_SMRP_STATE DECIMAL(20,4) NOT NULL,
BACKUP_SMRP_STATE_ST varchar(32) NOT NULL,
BACKUP_ADMSTATE DECIMAL(20,4) NOT NULL,
BACKUP_ADMSTATE_ST varchar(32) NOT NULL,
BACKUP_ADMDPATH_STATE DECIMAL(20,4) NOT NULL,
BACKUP_ADMDPATH_STATE_ST varchar(32) NOT NULL,
BACKUP_FLASHMOD_STATE DECIMAL(20,4) NOT NULL,
BACKUP_FLASHMOD_STATE_ST varchar(32) NOT NULL,
BACKUP_PWRMOD_STATE DECIMAL(20,4) NOT NULL,
BACKUP_PWRMOD_STATE_ST varchar(32) NOT NULL,
BACKUP_ADMCNT_STATE DECIMAL(20,4) NOT NULL,
BACKUP_ADMCNT_STATE_ST varchar(32) NOT NULL,
BACKUP_DISK_STATE DECIMAL(20,4) NOT NULL,
BACKUP_DISK_STATE_ST varchar(32) NOT NULL,
BACKUP_DISKCNT_STATE DECIMAL(20,4) NOT NULL,
BACKUP_DISKCNT_STATE_ST varchar(32) NOT NULL,
BACKUP_DB_SYNC DECIMAL(20,4) NOT NULL,
BACKUP_DB_SYNC_ST varchar(32) NOT NULL,
BACKUP_DB_BUILD DECIMAL(20,4) NOT NULL,
BACKUP_DB_BUILD_ST varchar(32) NOT NULL,
BACKUP_DB_BUILD_PCT DECIMAL(20,4) NOT NULL,
BACKUP_DB_BUILD_PCT_ST varchar(32) NOT NULL,
HAS_SWITCHOVER_OCCURRED DECIMAL(20,4) NOT NULL,
HAS_SWITCHOVER_OCCURRED_ST varchar(32) NOT NULL);

CREATE INDEX IDX_SolaceReduncyStTest ON SolaceReduncyStTest(MSMT_TIME);
ALTER TABLE SolaceReduncyStTest ADD constraint PK_SolaceReduncyStTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE SolaceReduncyStTest_TREND;
CREATE TABLE SolaceReduncyStTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
CONFIG_STATUS_MIN DECIMAL(20,4) NOT NULL,
CONFIG_STATUS_MAX DECIMAL(20,4) NOT NULL,
CONFIG_STATUS_STCNT varchar(32) NOT NULL,
REDUNDANCY_STATUS_MIN DECIMAL(20,4) NOT NULL,
REDUNDANCY_STATUS_MAX DECIMAL(20,4) NOT NULL,
REDUNDANCY_STATUS_STCNT varchar(32) NOT NULL,
AUTO_REVERT_ENABLED_MIN DECIMAL(20,4) NOT NULL,
AUTO_REVERT_ENABLED_MAX DECIMAL(20,4) NOT NULL,
AUTO_REVERT_ENABLED_STCNT varchar(32) NOT NULL,
ACTIVE_STANDBY_ROLE_MIN DECIMAL(20,4) NOT NULL,
ACTIVE_STANDBY_ROLE_MAX DECIMAL(20,4) NOT NULL,
ACTIVE_STANDBY_ROLE_STCNT varchar(32) NOT NULL,
ADB_LINK_STATE_MIN DECIMAL(20,4) NOT NULL,
ADB_LINK_STATE_MAX DECIMAL(20,4) NOT NULL,
ADB_LINK_STATE_STCNT varchar(32) NOT NULL,
ADB_HELLO_STATE_MIN DECIMAL(20,4) NOT NULL,
ADB_HELLO_STATE_MAX DECIMAL(20,4) NOT NULL,
ADB_HELLO_STATE_STCNT varchar(32) NOT NULL,
ADB_HELLO_AVGLATENCY_MIN DECIMAL(20,4) NOT NULL,
ADB_HELLO_AVGLATENCY_MAX DECIMAL(20,4) NOT NULL,
ADB_HELLO_AVGLATENCY_STCNT varchar(32) NOT NULL,
ADB_HELLO_MAXLATENCY_MIN DECIMAL(20,4) NOT NULL,
ADB_HELLO_MAXLATENCY_MAX DECIMAL(20,4) NOT NULL,
ADB_HELLO_MAXLATENCY_STCNT varchar(32) NOT NULL,
PRIMARY_ACTIVITY_MIN DECIMAL(20,4) NOT NULL,
PRIMARY_ACTIVITY_MAX DECIMAL(20,4) NOT NULL,
PRIMARY_ACTIVITY_STCNT varchar(32) NOT NULL,
PRIMARY_ROUTE_IFSTATE_MIN DECIMAL(20,4) NOT NULL,
PRIMARY_ROUTE_IFSTATE_MAX DECIMAL(20,4) NOT NULL,
PRIMARY_ROUTE_IFSTATE_STCNT varchar(32) NOT NULL,
PRIMARY_MSGSPOOL_STATE_MIN DECIMAL(20,4) NOT NULL,
PRIMARY_MSGSPOOL_STATE_MAX DECIMAL(20,4) NOT NULL,
PRIMARY_MSGSPOOL_STATE_STCNT varchar(32) NOT NULL,
PRIMARY_SMRP_STATE_MIN DECIMAL(20,4) NOT NULL,
PRIMARY_SMRP_STATE_MAX DECIMAL(20,4) NOT NULL,
PRIMARY_SMRP_STATE_STCNT varchar(32) NOT NULL,
PRIMARY_ADMSTATE_MIN DECIMAL(20,4) NOT NULL,
PRIMARY_ADMSTATE_MAX DECIMAL(20,4) NOT NULL,
PRIMARY_ADMSTATE_STCNT varchar(32) NOT NULL,
PRIMARY_ADMDPATH_STATE_MIN DECIMAL(20,4) NOT NULL,
PRIMARY_ADMDPATH_STATE_MAX DECIMAL(20,4) NOT NULL,
PRIMARY_ADMDPATH_STATE_STCNT varchar(32) NOT NULL,
PRIMARY_FLASHMOD_STATE_MIN DECIMAL(20,4) NOT NULL,
PRIMARY_FLASHMOD_STATE_MAX DECIMAL(20,4) NOT NULL,
PRIMARY_FLASHMOD_STATE_STCNT varchar(32) NOT NULL,
PRIMARY_PWRMOD_STATE_MIN DECIMAL(20,4) NOT NULL,
PRIMARY_PWRMOD_STATE_MAX DECIMAL(20,4) NOT NULL,
PRIMARY_PWRMOD_STATE_STCNT varchar(32) NOT NULL,
PRIMARY_ADMCNT_STATE_MIN DECIMAL(20,4) NOT NULL,
PRIMARY_ADMCNT_STATE_MAX DECIMAL(20,4) NOT NULL,
PRIMARY_ADMCNT_STATE_STCNT varchar(32) NOT NULL,
PRIMARY_DISK_STATE_MIN DECIMAL(20,4) NOT NULL,
PRIMARY_DISK_STATE_MAX DECIMAL(20,4) NOT NULL,
PRIMARY_DISK_STATE_STCNT varchar(32) NOT NULL,
PRIMARY_DISKCNT_STATE_MIN DECIMAL(20,4) NOT NULL,
PRIMARY_DISKCNT_STATE_MAX DECIMAL(20,4) NOT NULL,
PRIMARY_DISKCNT_STATE_STCNT varchar(32) NOT NULL,
PRIMARY_DB_SYNC_MIN DECIMAL(20,4) NOT NULL,
PRIMARY_DB_SYNC_MAX DECIMAL(20,4) NOT NULL,
PRIMARY_DB_SYNC_STCNT varchar(32) NOT NULL,
PRIMARY_DB_BUILD_MIN DECIMAL(20,4) NOT NULL,
PRIMARY_DB_BUILD_MAX DECIMAL(20,4) NOT NULL,
PRIMARY_DB_BUILD_STCNT varchar(32) NOT NULL,
PRIMARY_DB_BUILD_PCT_MIN DECIMAL(20,4) NOT NULL,
PRIMARY_DB_BUILD_PCT_MAX DECIMAL(20,4) NOT NULL,
PRIMARY_DB_BUILD_PCT_STCNT varchar(32) NOT NULL,
BACKUP_ACTIVITY_MIN DECIMAL(20,4) NOT NULL,
BACKUP_ACTIVITY_MAX DECIMAL(20,4) NOT NULL,
BACKUP_ACTIVITY_STCNT varchar(32) NOT NULL,
BACKUP_ROUTE_IFSTATE_MIN DECIMAL(20,4) NOT NULL,
BACKUP_ROUTE_IFSTATE_MAX DECIMAL(20,4) NOT NULL,
BACKUP_ROUTE_IFSTATE_STCNT varchar(32) NOT NULL,
BACKUP_MSGSPOOL_STATE_MIN DECIMAL(20,4) NOT NULL,
BACKUP_MSGSPOOL_STATE_MAX DECIMAL(20,4) NOT NULL,
BACKUP_MSGSPOOL_STATE_STCNT varchar(32) NOT NULL,
BACKUP_SMRP_STATE_MIN DECIMAL(20,4) NOT NULL,
BACKUP_SMRP_STATE_MAX DECIMAL(20,4) NOT NULL,
BACKUP_SMRP_STATE_STCNT varchar(32) NOT NULL,
BACKUP_ADMSTATE_MIN DECIMAL(20,4) NOT NULL,
BACKUP_ADMSTATE_MAX DECIMAL(20,4) NOT NULL,
BACKUP_ADMSTATE_STCNT varchar(32) NOT NULL,
BACKUP_ADMDPATH_STATE_MIN DECIMAL(20,4) NOT NULL,
BACKUP_ADMDPATH_STATE_MAX DECIMAL(20,4) NOT NULL,
BACKUP_ADMDPATH_STATE_STCNT varchar(32) NOT NULL,
BACKUP_FLASHMOD_STATE_MIN DECIMAL(20,4) NOT NULL,
BACKUP_FLASHMOD_STATE_MAX DECIMAL(20,4) NOT NULL,
BACKUP_FLASHMOD_STATE_STCNT varchar(32) NOT NULL,
BACKUP_PWRMOD_STATE_MIN DECIMAL(20,4) NOT NULL,
BACKUP_PWRMOD_STATE_MAX DECIMAL(20,4) NOT NULL,
BACKUP_PWRMOD_STATE_STCNT varchar(32) NOT NULL,
BACKUP_ADMCNT_STATE_MIN DECIMAL(20,4) NOT NULL,
BACKUP_ADMCNT_STATE_MAX DECIMAL(20,4) NOT NULL,
BACKUP_ADMCNT_STATE_STCNT varchar(32) NOT NULL,
BACKUP_DISK_STATE_MIN DECIMAL(20,4) NOT NULL,
BACKUP_DISK_STATE_MAX DECIMAL(20,4) NOT NULL,
BACKUP_DISK_STATE_STCNT varchar(32) NOT NULL,
BACKUP_DISKCNT_STATE_MIN DECIMAL(20,4) NOT NULL,
BACKUP_DISKCNT_STATE_MAX DECIMAL(20,4) NOT NULL,
BACKUP_DISKCNT_STATE_STCNT varchar(32) NOT NULL,
BACKUP_DB_SYNC_MIN DECIMAL(20,4) NOT NULL,
BACKUP_DB_SYNC_MAX DECIMAL(20,4) NOT NULL,
BACKUP_DB_SYNC_STCNT varchar(32) NOT NULL,
BACKUP_DB_BUILD_MIN DECIMAL(20,4) NOT NULL,
BACKUP_DB_BUILD_MAX DECIMAL(20,4) NOT NULL,
BACKUP_DB_BUILD_STCNT varchar(32) NOT NULL,
BACKUP_DB_BUILD_PCT_MIN DECIMAL(20,4) NOT NULL,
BACKUP_DB_BUILD_PCT_MAX DECIMAL(20,4) NOT NULL,
BACKUP_DB_BUILD_PCT_STCNT varchar(32) NOT NULL,
HAS_SWITCHOVER_OCCURRED_MIN DECIMAL(20,4) NOT NULL,
HAS_SWITCHOVER_OCCURRED_MAX DECIMAL(20,4) NOT NULL,
HAS_SWITCHOVER_OCCURRED_STCNT varchar(32) NOT NULL);

ALTER TABLE SolaceReduncyStTest_TREND ADD constraint PK_SolaceReduncyStTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE SolaceReduncyStTest_THRESH;
CREATE TABLE SolaceReduncyStTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
CONFIG_STATUS_MIN VARCHAR(256) NOT NULL,
CONFIG_STATUS_MAX VARCHAR(256) NOT NULL,
REDUNDANCY_STATUS_MIN VARCHAR(256) NOT NULL,
REDUNDANCY_STATUS_MAX VARCHAR(256) NOT NULL,
AUTO_REVERT_ENABLED_MIN VARCHAR(256) NOT NULL,
AUTO_REVERT_ENABLED_MAX VARCHAR(256) NOT NULL,
ACTIVE_STANDBY_ROLE_MIN VARCHAR(256) NOT NULL,
ACTIVE_STANDBY_ROLE_MAX VARCHAR(256) NOT NULL,
ADB_LINK_STATE_MIN VARCHAR(256) NOT NULL,
ADB_LINK_STATE_MAX VARCHAR(256) NOT NULL,
ADB_HELLO_STATE_MIN VARCHAR(256) NOT NULL,
ADB_HELLO_STATE_MAX VARCHAR(256) NOT NULL,
ADB_HELLO_AVGLATENCY_MIN VARCHAR(256) NOT NULL,
ADB_HELLO_AVGLATENCY_MAX VARCHAR(256) NOT NULL,
ADB_HELLO_MAXLATENCY_MIN VARCHAR(256) NOT NULL,
ADB_HELLO_MAXLATENCY_MAX VARCHAR(256) NOT NULL,
PRIMARY_ACTIVITY_MIN VARCHAR(256) NOT NULL,
PRIMARY_ACTIVITY_MAX VARCHAR(256) NOT NULL,
PRIMARY_ROUTE_IFSTATE_MIN VARCHAR(256) NOT NULL,
PRIMARY_ROUTE_IFSTATE_MAX VARCHAR(256) NOT NULL,
PRIMARY_MSGSPOOL_STATE_MIN VARCHAR(256) NOT NULL,
PRIMARY_MSGSPOOL_STATE_MAX VARCHAR(256) NOT NULL,
PRIMARY_SMRP_STATE_MIN VARCHAR(256) NOT NULL,
PRIMARY_SMRP_STATE_MAX VARCHAR(256) NOT NULL,
PRIMARY_ADMSTATE_MIN VARCHAR(256) NOT NULL,
PRIMARY_ADMSTATE_MAX VARCHAR(256) NOT NULL,
PRIMARY_ADMDPATH_STATE_MIN VARCHAR(256) NOT NULL,
PRIMARY_ADMDPATH_STATE_MAX VARCHAR(256) NOT NULL,
PRIMARY_FLASHMOD_STATE_MIN VARCHAR(256) NOT NULL,
PRIMARY_FLASHMOD_STATE_MAX VARCHAR(256) NOT NULL,
PRIMARY_PWRMOD_STATE_MIN VARCHAR(256) NOT NULL,
PRIMARY_PWRMOD_STATE_MAX VARCHAR(256) NOT NULL,
PRIMARY_ADMCNT_STATE_MIN VARCHAR(256) NOT NULL,
PRIMARY_ADMCNT_STATE_MAX VARCHAR(256) NOT NULL,
PRIMARY_DISK_STATE_MIN VARCHAR(256) NOT NULL,
PRIMARY_DISK_STATE_MAX VARCHAR(256) NOT NULL,
PRIMARY_DISKCNT_STATE_MIN VARCHAR(256) NOT NULL,
PRIMARY_DISKCNT_STATE_MAX VARCHAR(256) NOT NULL,
PRIMARY_DB_SYNC_MIN VARCHAR(256) NOT NULL,
PRIMARY_DB_SYNC_MAX VARCHAR(256) NOT NULL,
PRIMARY_DB_BUILD_MIN VARCHAR(256) NOT NULL,
PRIMARY_DB_BUILD_MAX VARCHAR(256) NOT NULL,
PRIMARY_DB_BUILD_PCT_MIN VARCHAR(256) NOT NULL,
PRIMARY_DB_BUILD_PCT_MAX VARCHAR(256) NOT NULL,
BACKUP_ACTIVITY_MIN VARCHAR(256) NOT NULL,
BACKUP_ACTIVITY_MAX VARCHAR(256) NOT NULL,
BACKUP_ROUTE_IFSTATE_MIN VARCHAR(256) NOT NULL,
BACKUP_ROUTE_IFSTATE_MAX VARCHAR(256) NOT NULL,
BACKUP_MSGSPOOL_STATE_MIN VARCHAR(256) NOT NULL,
BACKUP_MSGSPOOL_STATE_MAX VARCHAR(256) NOT NULL,
BACKUP_SMRP_STATE_MIN VARCHAR(256) NOT NULL,
BACKUP_SMRP_STATE_MAX VARCHAR(256) NOT NULL,
BACKUP_ADMSTATE_MIN VARCHAR(256) NOT NULL,
BACKUP_ADMSTATE_MAX VARCHAR(256) NOT NULL,
BACKUP_ADMDPATH_STATE_MIN VARCHAR(256) NOT NULL,
BACKUP_ADMDPATH_STATE_MAX VARCHAR(256) NOT NULL,
BACKUP_FLASHMOD_STATE_MIN VARCHAR(256) NOT NULL,
BACKUP_FLASHMOD_STATE_MAX VARCHAR(256) NOT NULL,
BACKUP_PWRMOD_STATE_MIN VARCHAR(256) NOT NULL,
BACKUP_PWRMOD_STATE_MAX VARCHAR(256) NOT NULL,
BACKUP_ADMCNT_STATE_MIN VARCHAR(256) NOT NULL,
BACKUP_ADMCNT_STATE_MAX VARCHAR(256) NOT NULL,
BACKUP_DISK_STATE_MIN VARCHAR(256) NOT NULL,
BACKUP_DISK_STATE_MAX VARCHAR(256) NOT NULL,
BACKUP_DISKCNT_STATE_MIN VARCHAR(256) NOT NULL,
BACKUP_DISKCNT_STATE_MAX VARCHAR(256) NOT NULL,
BACKUP_DB_SYNC_MIN VARCHAR(256) NOT NULL,
BACKUP_DB_SYNC_MAX VARCHAR(256) NOT NULL,
BACKUP_DB_BUILD_MIN VARCHAR(256) NOT NULL,
BACKUP_DB_BUILD_MAX VARCHAR(256) NOT NULL,
BACKUP_DB_BUILD_PCT_MIN VARCHAR(256) NOT NULL,
BACKUP_DB_BUILD_PCT_MAX VARCHAR(256) NOT NULL,
HAS_SWITCHOVER_OCCURRED_MIN VARCHAR(256) NOT NULL,
HAS_SWITCHOVER_OCCURRED_MAX VARCHAR(256) NOT NULL);

ALTER TABLE SolaceReduncyStTest_THRESH ADD constraint PK_SolaceReduncyStTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_SolaceReduncyStTest_THRESH ON SolaceReduncyStTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_SolaceReduncyStTest ON SolaceReduncyStTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_SolaceReduncyStTest ON SolaceReduncyStTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE SolaceMsgVpnRepTest;
CREATE TABLE SolaceMsgVpnRepTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
CONFIG_STATUS DECIMAL(20,4) NOT NULL,
CONFIG_STATUS_ST varchar(32) NOT NULL,
ADMIN_STATUS DECIMAL(20,4) NOT NULL,
ADMIN_STATUS_ST varchar(32) NOT NULL,
TRANSCTN_REPLI_MODE DECIMAL(20,4) NOT NULL,
TRANSCTN_REPLI_MODE_ST varchar(32) NOT NULL,
RJCT_MSGS_SYNC_INELIGBLE DECIMAL(20,4) NOT NULL,
RJCT_MSGS_SYNC_INELIGBLE_ST varchar(32) NOT NULL,
LCL_BRDGE_RETRY_DELAY DECIMAL(20,4) NOT NULL,
LCL_BRDGE_RETRY_DELAY_ST varchar(32) NOT NULL,
LCL_BRDGE_SSL DECIMAL(20,4) NOT NULL,
LCL_BRDGE_SSL_ST varchar(32) NOT NULL,
LCL_BRDGE_CMPRSD DECIMAL(20,4) NOT NULL,
LCL_BRDGE_CMPRSD_ST varchar(32) NOT NULL,
QUEUE_QUOTA DECIMAL(20,4) NOT NULL,
QUEUE_QUOTA_ST varchar(32) NOT NULL,
RJCT_MSGS_SENDER_DISCARD DECIMAL(20,4) NOT NULL,
RJCT_MSGS_SENDER_DISCARD_ST varchar(32) NOT NULL,
MATE_FLOW_CNGSTD_HWM DECIMAL(20,4) NOT NULL,
MATE_FLOW_CNGSTD_HWM_ST varchar(32) NOT NULL,
MATE_FLOW_NOT_CNGSTD_HWM DECIMAL(20,4) NOT NULL,
MATE_FLOW_NOT_CNGSTD_HWM_ST varchar(32) NOT NULL,
ELIGIBLE_HIGH_WM DECIMAL(20,4) NOT NULL,
ELIGIBLE_HIGH_WM_ST varchar(32) NOT NULL,
INELIGIBLE_HIGH_WM DECIMAL(20,4) NOT NULL,
INELIGIBLE_HIGH_WM_ST varchar(32) NOT NULL,
ASYNC_MSGS_QUE_TO_SB DECIMAL(20,4) NOT NULL,
ASYNC_MSGS_QUE_TO_SB_ST varchar(32) NOT NULL,
PRMTD_MSGS_QUE_TO_SB DECIMAL(20,4) NOT NULL,
PRMTD_MSGS_QUE_TO_SB_ST varchar(32) NOT NULL,
PRUNED_LCLY_CNSMD_MSGS DECIMAL(20,4) NOT NULL,
PRUNED_LCLY_CNSMD_MSGS_ST varchar(32) NOT NULL,
SYNC_MSGS_QUE_TO_SB DECIMAL(20,4) NOT NULL,
SYNC_MSGS_QUE_TO_SB_ST varchar(32) NOT NULL,
SYNC_MSGS_QUE_TO_SB_ASYN DECIMAL(20,4) NOT NULL,
SYNC_MSGS_QUE_TO_SB_ASYN_ST varchar(32) NOT NULL,
MSGS_TRANSMTD_TO_STANDBY DECIMAL(20,4) NOT NULL,
MSGS_TRANSMTD_TO_STANDBY_ST varchar(32) NOT NULL,
REC_REQ_FROM_STANDBY DECIMAL(20,4) NOT NULL,
REC_REQ_FROM_STANDBY_ST varchar(32) NOT NULL,
TRANSAC_REQ DECIMAL(20,4) NOT NULL,
TRANSAC_REQ_ST varchar(32) NOT NULL,
TRANSAC_REQ_SUC DECIMAL(20,4) NOT NULL,
TRANSAC_REQ_SUC_ST varchar(32) NOT NULL,
TRANSAC_REQ_SUC_COMMIT DECIMAL(20,4) NOT NULL,
TRANSAC_REQ_SUC_COMMIT_ST varchar(32) NOT NULL,
TRANSAC_REQ_SUC_PREPARE DECIMAL(20,4) NOT NULL,
TRANSAC_REQ_SUC_PREPARE_ST varchar(32) NOT NULL,
TRANSAC_REQ_SUC_ROLLBACK DECIMAL(20,4) NOT NULL,
TRANSAC_REQ_SUC_ROLLBACK_ST varchar(32) NOT NULL,
TRANSAC_REQ_FAIL DECIMAL(20,4) NOT NULL,
TRANSAC_REQ_FAIL_ST varchar(32) NOT NULL,
TRANSAC_REQ_FAIL_COMMIT DECIMAL(20,4) NOT NULL,
TRANSAC_REQ_FAIL_COMMIT_ST varchar(32) NOT NULL,
TRANSAC_REQ_FAIL_PREPARE DECIMAL(20,4) NOT NULL,
TRANSAC_REQ_FAIL_PREPARE_ST varchar(32) NOT NULL,
TRANSAC_REQ_FAIL_ROLLBAC DECIMAL(20,4) NOT NULL,
TRANSAC_REQ_FAIL_ROLLBAC_ST varchar(32) NOT NULL,
MSGS_RCVD_FROM_ACTIVE DECIMAL(20,4) NOT NULL,
MSGS_RCVD_FROM_ACTIVE_ST varchar(32) NOT NULL,
ACK_PROP_MSGS_RCVD DECIMAL(20,4) NOT NULL,
ACK_PROP_MSGS_RCVD_ST varchar(32) NOT NULL,
OUT_OF_SEQ_RCVD DECIMAL(20,4) NOT NULL,
OUT_OF_SEQ_RCVD_ST varchar(32) NOT NULL,
RECON_REQ_SNT_TO_ACTIVE DECIMAL(20,4) NOT NULL,
RECON_REQ_SNT_TO_ACTIVE_ST varchar(32) NOT NULL,
TRANS_TO_INELIGIBLE DECIMAL(20,4) NOT NULL,
TRANS_TO_INELIGIBLE_ST varchar(32) NOT NULL);

CREATE INDEX IDX_SolaceMsgVpnRepTest ON SolaceMsgVpnRepTest(MSMT_TIME);
ALTER TABLE SolaceMsgVpnRepTest ADD constraint PK_SolaceMsgVpnRepTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE SolaceMsgVpnRepTest_TREND;
CREATE TABLE SolaceMsgVpnRepTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
CONFIG_STATUS_MIN DECIMAL(20,4) NOT NULL,
CONFIG_STATUS_MAX DECIMAL(20,4) NOT NULL,
CONFIG_STATUS_STCNT varchar(32) NOT NULL,
ADMIN_STATUS_MIN DECIMAL(20,4) NOT NULL,
ADMIN_STATUS_MAX DECIMAL(20,4) NOT NULL,
ADMIN_STATUS_STCNT varchar(32) NOT NULL,
TRANSCTN_REPLI_MODE_MIN DECIMAL(20,4) NOT NULL,
TRANSCTN_REPLI_MODE_MAX DECIMAL(20,4) NOT NULL,
TRANSCTN_REPLI_MODE_STCNT varchar(32) NOT NULL,
RJCT_MSGS_SYNC_INELIGBLE_MIN DECIMAL(20,4) NOT NULL,
RJCT_MSGS_SYNC_INELIGBLE_MAX DECIMAL(20,4) NOT NULL,
RJCT_MSGS_SYNC_INELIGBLE_STCNT varchar(32) NOT NULL,
LCL_BRDGE_RETRY_DELAY_MIN DECIMAL(20,4) NOT NULL,
LCL_BRDGE_RETRY_DELAY_MAX DECIMAL(20,4) NOT NULL,
LCL_BRDGE_RETRY_DELAY_STCNT varchar(32) NOT NULL,
LCL_BRDGE_SSL_MIN DECIMAL(20,4) NOT NULL,
LCL_BRDGE_SSL_MAX DECIMAL(20,4) NOT NULL,
LCL_BRDGE_SSL_STCNT varchar(32) NOT NULL,
LCL_BRDGE_CMPRSD_MIN DECIMAL(20,4) NOT NULL,
LCL_BRDGE_CMPRSD_MAX DECIMAL(20,4) NOT NULL,
LCL_BRDGE_CMPRSD_STCNT varchar(32) NOT NULL,
QUEUE_QUOTA_MIN DECIMAL(20,4) NOT NULL,
QUEUE_QUOTA_MAX DECIMAL(20,4) NOT NULL,
QUEUE_QUOTA_STCNT varchar(32) NOT NULL,
RJCT_MSGS_SENDER_DISCARD_MIN DECIMAL(20,4) NOT NULL,
RJCT_MSGS_SENDER_DISCARD_MAX DECIMAL(20,4) NOT NULL,
RJCT_MSGS_SENDER_DISCARD_STCNT varchar(32) NOT NULL,
MATE_FLOW_CNGSTD_HWM_MIN DECIMAL(20,4) NOT NULL,
MATE_FLOW_CNGSTD_HWM_MAX DECIMAL(20,4) NOT NULL,
MATE_FLOW_CNGSTD_HWM_STCNT varchar(32) NOT NULL,
MATE_FLOW_NOT_CNGSTD_HWM_MIN DECIMAL(20,4) NOT NULL,
MATE_FLOW_NOT_CNGSTD_HWM_MAX DECIMAL(20,4) NOT NULL,
MATE_FLOW_NOT_CNGSTD_HWM_STCNT varchar(32) NOT NULL,
ELIGIBLE_HIGH_WM_MIN DECIMAL(20,4) NOT NULL,
ELIGIBLE_HIGH_WM_MAX DECIMAL(20,4) NOT NULL,
ELIGIBLE_HIGH_WM_STCNT varchar(32) NOT NULL,
INELIGIBLE_HIGH_WM_MIN DECIMAL(20,4) NOT NULL,
INELIGIBLE_HIGH_WM_MAX DECIMAL(20,4) NOT NULL,
INELIGIBLE_HIGH_WM_STCNT varchar(32) NOT NULL,
ASYNC_MSGS_QUE_TO_SB_MIN DECIMAL(20,4) NOT NULL,
ASYNC_MSGS_QUE_TO_SB_MAX DECIMAL(20,4) NOT NULL,
ASYNC_MSGS_QUE_TO_SB_STCNT varchar(32) NOT NULL,
PRMTD_MSGS_QUE_TO_SB_MIN DECIMAL(20,4) NOT NULL,
PRMTD_MSGS_QUE_TO_SB_MAX DECIMAL(20,4) NOT NULL,
PRMTD_MSGS_QUE_TO_SB_STCNT varchar(32) NOT NULL,
PRUNED_LCLY_CNSMD_MSGS_MIN DECIMAL(20,4) NOT NULL,
PRUNED_LCLY_CNSMD_MSGS_MAX DECIMAL(20,4) NOT NULL,
PRUNED_LCLY_CNSMD_MSGS_STCNT varchar(32) NOT NULL,
SYNC_MSGS_QUE_TO_SB_MIN DECIMAL(20,4) NOT NULL,
SYNC_MSGS_QUE_TO_SB_MAX DECIMAL(20,4) NOT NULL,
SYNC_MSGS_QUE_TO_SB_STCNT varchar(32) NOT NULL,
SYNC_MSGS_QUE_TO_SB_ASYN_MIN DECIMAL(20,4) NOT NULL,
SYNC_MSGS_QUE_TO_SB_ASYN_MAX DECIMAL(20,4) NOT NULL,
SYNC_MSGS_QUE_TO_SB_ASYN_STCNT varchar(32) NOT NULL,
MSGS_TRANSMTD_TO_STANDBY_MIN DECIMAL(20,4) NOT NULL,
MSGS_TRANSMTD_TO_STANDBY_MAX DECIMAL(20,4) NOT NULL,
MSGS_TRANSMTD_TO_STANDBY_STCNT varchar(32) NOT NULL,
REC_REQ_FROM_STANDBY_MIN DECIMAL(20,4) NOT NULL,
REC_REQ_FROM_STANDBY_MAX DECIMAL(20,4) NOT NULL,
REC_REQ_FROM_STANDBY_STCNT varchar(32) NOT NULL,
TRANSAC_REQ_MIN DECIMAL(20,4) NOT NULL,
TRANSAC_REQ_MAX DECIMAL(20,4) NOT NULL,
TRANSAC_REQ_STCNT varchar(32) NOT NULL,
TRANSAC_REQ_SUC_MIN DECIMAL(20,4) NOT NULL,
TRANSAC_REQ_SUC_MAX DECIMAL(20,4) NOT NULL,
TRANSAC_REQ_SUC_STCNT varchar(32) NOT NULL,
TRANSAC_REQ_SUC_COMMIT_MIN DECIMAL(20,4) NOT NULL,
TRANSAC_REQ_SUC_COMMIT_MAX DECIMAL(20,4) NOT NULL,
TRANSAC_REQ_SUC_COMMIT_STCNT varchar(32) NOT NULL,
TRANSAC_REQ_SUC_PREPARE_MIN DECIMAL(20,4) NOT NULL,
TRANSAC_REQ_SUC_PREPARE_MAX DECIMAL(20,4) NOT NULL,
TRANSAC_REQ_SUC_PREPARE_STCNT varchar(32) NOT NULL,
TRANSAC_REQ_SUC_ROLLBACK_MIN DECIMAL(20,4) NOT NULL,
TRANSAC_REQ_SUC_ROLLBACK_MAX DECIMAL(20,4) NOT NULL,
TRANSAC_REQ_SUC_ROLLBACK_STCNT varchar(32) NOT NULL,
TRANSAC_REQ_FAIL_MIN DECIMAL(20,4) NOT NULL,
TRANSAC_REQ_FAIL_MAX DECIMAL(20,4) NOT NULL,
TRANSAC_REQ_FAIL_STCNT varchar(32) NOT NULL,
TRANSAC_REQ_FAIL_COMMIT_MIN DECIMAL(20,4) NOT NULL,
TRANSAC_REQ_FAIL_COMMIT_MAX DECIMAL(20,4) NOT NULL,
TRANSAC_REQ_FAIL_COMMIT_STCNT varchar(32) NOT NULL,
TRANSAC_REQ_FAIL_PREPARE_MIN DECIMAL(20,4) NOT NULL,
TRANSAC_REQ_FAIL_PREPARE_MAX DECIMAL(20,4) NOT NULL,
TRANSAC_REQ_FAIL_PREPARE_STCNT varchar(32) NOT NULL,
TRANSAC_REQ_FAIL_ROLLBAC_MIN DECIMAL(20,4) NOT NULL,
TRANSAC_REQ_FAIL_ROLLBAC_MAX DECIMAL(20,4) NOT NULL,
TRANSAC_REQ_FAIL_ROLLBAC_STCNT varchar(32) NOT NULL,
MSGS_RCVD_FROM_ACTIVE_MIN DECIMAL(20,4) NOT NULL,
MSGS_RCVD_FROM_ACTIVE_MAX DECIMAL(20,4) NOT NULL,
MSGS_RCVD_FROM_ACTIVE_STCNT varchar(32) NOT NULL,
ACK_PROP_MSGS_RCVD_MIN DECIMAL(20,4) NOT NULL,
ACK_PROP_MSGS_RCVD_MAX DECIMAL(20,4) NOT NULL,
ACK_PROP_MSGS_RCVD_STCNT varchar(32) NOT NULL,
OUT_OF_SEQ_RCVD_MIN DECIMAL(20,4) NOT NULL,
OUT_OF_SEQ_RCVD_MAX DECIMAL(20,4) NOT NULL,
OUT_OF_SEQ_RCVD_STCNT varchar(32) NOT NULL,
RECON_REQ_SNT_TO_ACTIVE_MIN DECIMAL(20,4) NOT NULL,
RECON_REQ_SNT_TO_ACTIVE_MAX DECIMAL(20,4) NOT NULL,
RECON_REQ_SNT_TO_ACTIVE_STCNT varchar(32) NOT NULL,
TRANS_TO_INELIGIBLE_MIN DECIMAL(20,4) NOT NULL,
TRANS_TO_INELIGIBLE_MAX DECIMAL(20,4) NOT NULL,
TRANS_TO_INELIGIBLE_STCNT varchar(32) NOT NULL);

ALTER TABLE SolaceMsgVpnRepTest_TREND ADD constraint PK_SolaceMsgVpnRepTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE SolaceMsgVpnRepTest_THRESH;
CREATE TABLE SolaceMsgVpnRepTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
CONFIG_STATUS_MIN VARCHAR(256) NOT NULL,
CONFIG_STATUS_MAX VARCHAR(256) NOT NULL,
ADMIN_STATUS_MIN VARCHAR(256) NOT NULL,
ADMIN_STATUS_MAX VARCHAR(256) NOT NULL,
TRANSCTN_REPLI_MODE_MIN VARCHAR(256) NOT NULL,
TRANSCTN_REPLI_MODE_MAX VARCHAR(256) NOT NULL,
RJCT_MSGS_SYNC_INELIGBLE_MIN VARCHAR(256) NOT NULL,
RJCT_MSGS_SYNC_INELIGBLE_MAX VARCHAR(256) NOT NULL,
LCL_BRDGE_RETRY_DELAY_MIN VARCHAR(256) NOT NULL,
LCL_BRDGE_RETRY_DELAY_MAX VARCHAR(256) NOT NULL,
LCL_BRDGE_SSL_MIN VARCHAR(256) NOT NULL,
LCL_BRDGE_SSL_MAX VARCHAR(256) NOT NULL,
LCL_BRDGE_CMPRSD_MIN VARCHAR(256) NOT NULL,
LCL_BRDGE_CMPRSD_MAX VARCHAR(256) NOT NULL,
QUEUE_QUOTA_MIN VARCHAR(256) NOT NULL,
QUEUE_QUOTA_MAX VARCHAR(256) NOT NULL,
RJCT_MSGS_SENDER_DISCARD_MIN VARCHAR(256) NOT NULL,
RJCT_MSGS_SENDER_DISCARD_MAX VARCHAR(256) NOT NULL,
MATE_FLOW_CNGSTD_HWM_MIN VARCHAR(256) NOT NULL,
MATE_FLOW_CNGSTD_HWM_MAX VARCHAR(256) NOT NULL,
MATE_FLOW_NOT_CNGSTD_HWM_MIN VARCHAR(256) NOT NULL,
MATE_FLOW_NOT_CNGSTD_HWM_MAX VARCHAR(256) NOT NULL,
ELIGIBLE_HIGH_WM_MIN VARCHAR(256) NOT NULL,
ELIGIBLE_HIGH_WM_MAX VARCHAR(256) NOT NULL,
INELIGIBLE_HIGH_WM_MIN VARCHAR(256) NOT NULL,
INELIGIBLE_HIGH_WM_MAX VARCHAR(256) NOT NULL,
ASYNC_MSGS_QUE_TO_SB_MIN VARCHAR(256) NOT NULL,
ASYNC_MSGS_QUE_TO_SB_MAX VARCHAR(256) NOT NULL,
PRMTD_MSGS_QUE_TO_SB_MIN VARCHAR(256) NOT NULL,
PRMTD_MSGS_QUE_TO_SB_MAX VARCHAR(256) NOT NULL,
PRUNED_LCLY_CNSMD_MSGS_MIN VARCHAR(256) NOT NULL,
PRUNED_LCLY_CNSMD_MSGS_MAX VARCHAR(256) NOT NULL,
SYNC_MSGS_QUE_TO_SB_MIN VARCHAR(256) NOT NULL,
SYNC_MSGS_QUE_TO_SB_MAX VARCHAR(256) NOT NULL,
SYNC_MSGS_QUE_TO_SB_ASYN_MIN VARCHAR(256) NOT NULL,
SYNC_MSGS_QUE_TO_SB_ASYN_MAX VARCHAR(256) NOT NULL,
MSGS_TRANSMTD_TO_STANDBY_MIN VARCHAR(256) NOT NULL,
MSGS_TRANSMTD_TO_STANDBY_MAX VARCHAR(256) NOT NULL,
REC_REQ_FROM_STANDBY_MIN VARCHAR(256) NOT NULL,
REC_REQ_FROM_STANDBY_MAX VARCHAR(256) NOT NULL,
TRANSAC_REQ_MIN VARCHAR(256) NOT NULL,
TRANSAC_REQ_MAX VARCHAR(256) NOT NULL,
TRANSAC_REQ_SUC_MIN VARCHAR(256) NOT NULL,
TRANSAC_REQ_SUC_MAX VARCHAR(256) NOT NULL,
TRANSAC_REQ_SUC_COMMIT_MIN VARCHAR(256) NOT NULL,
TRANSAC_REQ_SUC_COMMIT_MAX VARCHAR(256) NOT NULL,
TRANSAC_REQ_SUC_PREPARE_MIN VARCHAR(256) NOT NULL,
TRANSAC_REQ_SUC_PREPARE_MAX VARCHAR(256) NOT NULL,
TRANSAC_REQ_SUC_ROLLBACK_MIN VARCHAR(256) NOT NULL,
TRANSAC_REQ_SUC_ROLLBACK_MAX VARCHAR(256) NOT NULL,
TRANSAC_REQ_FAIL_MIN VARCHAR(256) NOT NULL,
TRANSAC_REQ_FAIL_MAX VARCHAR(256) NOT NULL,
TRANSAC_REQ_FAIL_COMMIT_MIN VARCHAR(256) NOT NULL,
TRANSAC_REQ_FAIL_COMMIT_MAX VARCHAR(256) NOT NULL,
TRANSAC_REQ_FAIL_PREPARE_MIN VARCHAR(256) NOT NULL,
TRANSAC_REQ_FAIL_PREPARE_MAX VARCHAR(256) NOT NULL,
TRANSAC_REQ_FAIL_ROLLBAC_MIN VARCHAR(256) NOT NULL,
TRANSAC_REQ_FAIL_ROLLBAC_MAX VARCHAR(256) NOT NULL,
MSGS_RCVD_FROM_ACTIVE_MIN VARCHAR(256) NOT NULL,
MSGS_RCVD_FROM_ACTIVE_MAX VARCHAR(256) NOT NULL,
ACK_PROP_MSGS_RCVD_MIN VARCHAR(256) NOT NULL,
ACK_PROP_MSGS_RCVD_MAX VARCHAR(256) NOT NULL,
OUT_OF_SEQ_RCVD_MIN VARCHAR(256) NOT NULL,
OUT_OF_SEQ_RCVD_MAX VARCHAR(256) NOT NULL,
RECON_REQ_SNT_TO_ACTIVE_MIN VARCHAR(256) NOT NULL,
RECON_REQ_SNT_TO_ACTIVE_MAX VARCHAR(256) NOT NULL,
TRANS_TO_INELIGIBLE_MIN VARCHAR(256) NOT NULL,
TRANS_TO_INELIGIBLE_MAX VARCHAR(256) NOT NULL);

ALTER TABLE SolaceMsgVpnRepTest_THRESH ADD constraint PK_SolaceMsgVpnRepTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_SolaceMsgVpnRepTest_THRESH ON SolaceMsgVpnRepTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_SolaceMsgVpnRepTest ON SolaceMsgVpnRepTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_SolaceMsgVpnRepTest ON SolaceMsgVpnRepTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE SolaceSysReplTest;
CREATE TABLE SolaceSysReplTest(
TRGT_HOST                     varchar(32) NOT NULL, 
PORT_NO                       varchar(32) NOT NULL, 
SITE_NAME                     varchar(64) NOT NULL, 
INFO                          varchar(128) NOT NULL, 
MSMT_HOST                     varchar(32) NOT NULL, 
MSMT_TIME                     datetime NOT NULL, 
IS_REPLICATION_ENABLED        DECIMAL(20,4) NOT NULL, 
IS_REPLICATION_ENABLED_ST     varchar(32) NOT NULL, 
TRANSITIONS_TO_INELGBL        DECIMAL(20,4) NOT NULL, 
TRANSITIONS_TO_INELGBL_ST     varchar(32) NOT NULL, 
ASYNC_MSGS_QUE_TO_STNDBY      DECIMAL(20,4) NOT NULL, 
ASYNC_MSGS_QUE_TO_STNDBY_ST   varchar(32) NOT NULL, 
PROM_MSGS_QUE_TO_STNDBY       DECIMAL(20,4) NOT NULL, 
PROM_MSGS_QUE_TO_STNDBY_ST    varchar(32) NOT NULL, 
PRUN_LCLLY_CNSMD_MSGS         DECIMAL(20,4) NOT NULL, 
PRUN_LCLLY_CNSMD_MSGS_ST      varchar(32) NOT NULL, 
SYNC_MSGS_QUE_TO_STNDBY       DECIMAL(20,4) NOT NULL, 
SYNC_MSGS_QUE_TO_STNDBY_ST    varchar(32) NOT NULL, 
SYNC_MSGS_Q_TO_SB_ASYNC       DECIMAL(20,4) NOT NULL, 
SYNC_MSGS_Q_TO_SB_ASYNC_ST    varchar(32) NOT NULL, 
MSGS_TX_TO_STANDBY            DECIMAL(20,4) NOT NULL, 
MSGS_TX_TO_STANDBY_ST         varchar(32) NOT NULL, 
REC_REQ_FROM_STANDBY          DECIMAL(20,4) NOT NULL, 
REC_REQ_FROM_STANDBY_ST       varchar(32) NOT NULL, 
TRANS_REQ                     DECIMAL(20,4) NOT NULL, 
TRANS_REQ_ST                  varchar(32) NOT NULL, 
TRANS_REQ_SUC                 DECIMAL(20,4) NOT NULL, 
TRANS_REQ_SUC_ST              varchar(32) NOT NULL, 
TRANS_REQ_SUC_COMMIT          DECIMAL(20,4) NOT NULL, 
TRANS_REQ_SUC_COMMIT_ST       varchar(32) NOT NULL, 
TRANS_REQ_SUC_PREPARE         DECIMAL(20,4) NOT NULL, 
TRANS_REQ_SUC_PREPARE_ST      varchar(32) NOT NULL, 
TRANS_REQ_SUC_ROLLBACK        DECIMAL(20,4) NOT NULL, 
TRANS_REQ_SUC_ROLLBACK_ST     varchar(32) NOT NULL, 
TRANS_REQ_FAIL                DECIMAL(20,4) NOT NULL, 
TRANS_REQ_FAIL_ST             varchar(32) NOT NULL, 
TRANS_REQ_FAIL_COMMIT         DECIMAL(20,4) NOT NULL, 
TRANS_REQ_FAIL_COMMIT_ST      varchar(32) NOT NULL, 
TRANS_REQ_FAIL_PREPARE        DECIMAL(20,4) NOT NULL, 
TRANS_REQ_FAIL_PREPARE_ST     varchar(32) NOT NULL, 
TRANS_REQ_FAIL_ROLLBACK       DECIMAL(20,4) NOT NULL, 
TRANS_REQ_FAIL_ROLLBACK_ST    varchar(32) NOT NULL, 
MSGS_RX_FROM_ACTIVE           DECIMAL(20,4) NOT NULL, 
MSGS_RX_FROM_ACTIVE_ST        varchar(32) NOT NULL, 
ACK_PROP_MSGS_RX              DECIMAL(20,4) NOT NULL, 
ACK_PROP_MSGS_RX_ST           varchar(32) NOT NULL, 
OUT_OF_SEQ_RX                 DECIMAL(20,4) NOT NULL, 
OUT_OF_SEQ_RX_ST              varchar(32) NOT NULL, 
RECON_REQ_TX                  DECIMAL(20,4) NOT NULL, 
RECON_REQ_TX_ST               varchar(32) NOT NULL); 

CREATE INDEX IDX_SolaceSysReplTest ON SolaceSysReplTest(MSMT_TIME);
ALTER TABLE SolaceSysReplTest ADD constraint PK_SolaceSysReplTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE SolaceSysReplTest_TREND;
CREATE TABLE SolaceSysReplTest_TREND(
TRGT_HOST                     varchar(32) NOT NULL, 
PORT_NO                       varchar(32) NOT NULL, 
SITE_NAME                     varchar(64) NOT NULL, 
INFO                          varchar(128) NOT NULL, 
MSMT_HOST                     varchar(32) NOT NULL, 
MSMT_TIME                     datetime NOT NULL, 
PERIOD                        varchar(32) NOT NULL, 
IS_REPLICATION_ENABLED_MIN    DECIMAL(20,4) NOT NULL, 
IS_REPLICATION_ENABLED_MAX    DECIMAL(20,4) NOT NULL, 
IS_REPLICATION_ENABLED_STCNT  varchar(32) NOT NULL, 
TRANSITIONS_TO_INELGBL_MIN    DECIMAL(20,4) NOT NULL, 
TRANSITIONS_TO_INELGBL_MAX    DECIMAL(20,4) NOT NULL, 
TRANSITIONS_TO_INELGBL_STCNT  varchar(32) NOT NULL, 
ASYNC_MSGS_QUE_TO_STNDBY_MIN  DECIMAL(20,4) NOT NULL, 
ASYNC_MSGS_QUE_TO_STNDBY_MAX  DECIMAL(20,4) NOT NULL, 
ASYNC_MSGS_QUE_TO_STNDBY_STCNT varchar(32) NOT NULL, 
PROM_MSGS_QUE_TO_STNDBY_MIN   DECIMAL(20,4) NOT NULL, 
PROM_MSGS_QUE_TO_STNDBY_MAX   DECIMAL(20,4) NOT NULL, 
PROM_MSGS_QUE_TO_STNDBY_STCNT varchar(32) NOT NULL, 
PRUN_LCLLY_CNSMD_MSGS_MIN     DECIMAL(20,4) NOT NULL, 
PRUN_LCLLY_CNSMD_MSGS_MAX     DECIMAL(20,4) NOT NULL, 
PRUN_LCLLY_CNSMD_MSGS_STCNT   varchar(32) NOT NULL, 
SYNC_MSGS_QUE_TO_STNDBY_MIN   DECIMAL(20,4) NOT NULL, 
SYNC_MSGS_QUE_TO_STNDBY_MAX   DECIMAL(20,4) NOT NULL, 
SYNC_MSGS_QUE_TO_STNDBY_STCNT varchar(32) NOT NULL, 
SYNC_MSGS_Q_TO_SB_ASYNC_MIN   DECIMAL(20,4) NOT NULL, 
SYNC_MSGS_Q_TO_SB_ASYNC_MAX   DECIMAL(20,4) NOT NULL, 
SYNC_MSGS_Q_TO_SB_ASYNC_STCNT varchar(32) NOT NULL, 
MSGS_TX_TO_STANDBY_MIN        DECIMAL(20,4) NOT NULL, 
MSGS_TX_TO_STANDBY_MAX        DECIMAL(20,4) NOT NULL, 
MSGS_TX_TO_STANDBY_STCNT      varchar(32) NOT NULL, 
REC_REQ_FROM_STANDBY_MIN      DECIMAL(20,4) NOT NULL, 
REC_REQ_FROM_STANDBY_MAX      DECIMAL(20,4) NOT NULL, 
REC_REQ_FROM_STANDBY_STCNT    varchar(32) NOT NULL, 
TRANS_REQ_MIN                 DECIMAL(20,4) NOT NULL, 
TRANS_REQ_MAX                 DECIMAL(20,4) NOT NULL, 
TRANS_REQ_STCNT               varchar(32) NOT NULL, 
TRANS_REQ_SUC_MIN             DECIMAL(20,4) NOT NULL, 
TRANS_REQ_SUC_MAX             DECIMAL(20,4) NOT NULL, 
TRANS_REQ_SUC_STCNT           varchar(32) NOT NULL, 
TRANS_REQ_SUC_COMMIT_MIN      DECIMAL(20,4) NOT NULL, 
TRANS_REQ_SUC_COMMIT_MAX      DECIMAL(20,4) NOT NULL, 
TRANS_REQ_SUC_COMMIT_STCNT    varchar(32) NOT NULL, 
TRANS_REQ_SUC_PREPARE_MIN     DECIMAL(20,4) NOT NULL, 
TRANS_REQ_SUC_PREPARE_MAX     DECIMAL(20,4) NOT NULL, 
TRANS_REQ_SUC_PREPARE_STCNT   varchar(32) NOT NULL, 
TRANS_REQ_SUC_ROLLBACK_MIN    DECIMAL(20,4) NOT NULL, 
TRANS_REQ_SUC_ROLLBACK_MAX    DECIMAL(20,4) NOT NULL, 
TRANS_REQ_SUC_ROLLBACK_STCNT  varchar(32) NOT NULL, 
TRANS_REQ_FAIL_MIN            DECIMAL(20,4) NOT NULL, 
TRANS_REQ_FAIL_MAX            DECIMAL(20,4) NOT NULL, 
TRANS_REQ_FAIL_STCNT          varchar(32) NOT NULL, 
TRANS_REQ_FAIL_COMMIT_MIN     DECIMAL(20,4) NOT NULL, 
TRANS_REQ_FAIL_COMMIT_MAX     DECIMAL(20,4) NOT NULL, 
TRANS_REQ_FAIL_COMMIT_STCNT   varchar(32) NOT NULL, 
TRANS_REQ_FAIL_PREPARE_MIN    DECIMAL(20,4) NOT NULL, 
TRANS_REQ_FAIL_PREPARE_MAX    DECIMAL(20,4) NOT NULL, 
TRANS_REQ_FAIL_PREPARE_STCNT  varchar(32) NOT NULL, 
TRANS_REQ_FAIL_ROLLBACK_MIN   DECIMAL(20,4) NOT NULL, 
TRANS_REQ_FAIL_ROLLBACK_MAX   DECIMAL(20,4) NOT NULL, 
TRANS_REQ_FAIL_ROLLBACK_STCNT varchar(32) NOT NULL, 
MSGS_RX_FROM_ACTIVE_MIN       DECIMAL(20,4) NOT NULL, 
MSGS_RX_FROM_ACTIVE_MAX       DECIMAL(20,4) NOT NULL, 
MSGS_RX_FROM_ACTIVE_STCNT     varchar(32) NOT NULL, 
ACK_PROP_MSGS_RX_MIN          DECIMAL(20,4) NOT NULL, 
ACK_PROP_MSGS_RX_MAX          DECIMAL(20,4) NOT NULL, 
ACK_PROP_MSGS_RX_STCNT        varchar(32) NOT NULL, 
OUT_OF_SEQ_RX_MIN             DECIMAL(20,4) NOT NULL, 
OUT_OF_SEQ_RX_MAX             DECIMAL(20,4) NOT NULL, 
OUT_OF_SEQ_RX_STCNT           varchar(32) NOT NULL, 
RECON_REQ_TX_MIN              DECIMAL(20,4) NOT NULL, 
RECON_REQ_TX_MAX              DECIMAL(20,4) NOT NULL, 
RECON_REQ_TX_STCNT            varchar(32) NOT NULL); 

ALTER TABLE SolaceSysReplTest_TREND ADD constraint PK_SolaceSysReplTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE SolaceSysReplTest_THRESH;
CREATE TABLE SolaceSysReplTest_THRESH(
TRGT_HOST                     varchar(32) NOT NULL, 
PORT_NO                       varchar(32) NOT NULL, 
SITE_NAME                     varchar(64) NOT NULL, 
INFO                          varchar(128) NOT NULL, 
MSMT_HOST                     varchar(32) NOT NULL, 
MSMT_TIME_START               datetime NOT NULL, 
MSMT_TIME_END                 datetime NOT NULL, 
IS_REPLICATION_ENABLED_MIN    VARCHAR(256) NOT NULL, 
IS_REPLICATION_ENABLED_MAX    VARCHAR(256) NOT NULL, 
TRANSITIONS_TO_INELGBL_MIN    VARCHAR(256) NOT NULL, 
TRANSITIONS_TO_INELGBL_MAX    VARCHAR(256) NOT NULL, 
ASYNC_MSGS_QUE_TO_STNDBY_MIN  VARCHAR(256) NOT NULL, 
ASYNC_MSGS_QUE_TO_STNDBY_MAX  VARCHAR(256) NOT NULL, 
PROM_MSGS_QUE_TO_STNDBY_MIN   VARCHAR(256) NOT NULL, 
PROM_MSGS_QUE_TO_STNDBY_MAX   VARCHAR(256) NOT NULL, 
PRUN_LCLLY_CNSMD_MSGS_MIN     VARCHAR(256) NOT NULL, 
PRUN_LCLLY_CNSMD_MSGS_MAX     VARCHAR(256) NOT NULL, 
SYNC_MSGS_QUE_TO_STNDBY_MIN   VARCHAR(256) NOT NULL, 
SYNC_MSGS_QUE_TO_STNDBY_MAX   VARCHAR(256) NOT NULL, 
SYNC_MSGS_Q_TO_SB_ASYNC_MIN   VARCHAR(256) NOT NULL, 
SYNC_MSGS_Q_TO_SB_ASYNC_MAX   VARCHAR(256) NOT NULL, 
MSGS_TX_TO_STANDBY_MIN        VARCHAR(256) NOT NULL, 
MSGS_TX_TO_STANDBY_MAX        VARCHAR(256) NOT NULL, 
REC_REQ_FROM_STANDBY_MIN      VARCHAR(256) NOT NULL, 
REC_REQ_FROM_STANDBY_MAX      VARCHAR(256) NOT NULL, 
TRANS_REQ_MIN                 VARCHAR(256) NOT NULL, 
TRANS_REQ_MAX                 VARCHAR(256) NOT NULL, 
TRANS_REQ_SUC_MIN             VARCHAR(256) NOT NULL, 
TRANS_REQ_SUC_MAX             VARCHAR(256) NOT NULL, 
TRANS_REQ_SUC_COMMIT_MIN      VARCHAR(256) NOT NULL, 
TRANS_REQ_SUC_COMMIT_MAX      VARCHAR(256) NOT NULL, 
TRANS_REQ_SUC_PREPARE_MIN     VARCHAR(256) NOT NULL, 
TRANS_REQ_SUC_PREPARE_MAX     VARCHAR(256) NOT NULL, 
TRANS_REQ_SUC_ROLLBACK_MIN    VARCHAR(256) NOT NULL, 
TRANS_REQ_SUC_ROLLBACK_MAX    VARCHAR(256) NOT NULL, 
TRANS_REQ_FAIL_MIN            VARCHAR(256) NOT NULL, 
TRANS_REQ_FAIL_MAX            VARCHAR(256) NOT NULL, 
TRANS_REQ_FAIL_COMMIT_MIN     VARCHAR(256) NOT NULL, 
TRANS_REQ_FAIL_COMMIT_MAX     VARCHAR(256) NOT NULL, 
TRANS_REQ_FAIL_PREPARE_MIN    VARCHAR(256) NOT NULL, 
TRANS_REQ_FAIL_PREPARE_MAX    VARCHAR(256) NOT NULL, 
TRANS_REQ_FAIL_ROLLBACK_MIN   VARCHAR(256) NOT NULL, 
TRANS_REQ_FAIL_ROLLBACK_MAX   VARCHAR(256) NOT NULL, 
MSGS_RX_FROM_ACTIVE_MIN       VARCHAR(256) NOT NULL, 
MSGS_RX_FROM_ACTIVE_MAX       VARCHAR(256) NOT NULL, 
ACK_PROP_MSGS_RX_MIN          VARCHAR(256) NOT NULL, 
ACK_PROP_MSGS_RX_MAX          VARCHAR(256) NOT NULL, 
OUT_OF_SEQ_RX_MIN             VARCHAR(256) NOT NULL, 
OUT_OF_SEQ_RX_MAX             VARCHAR(256) NOT NULL, 
RECON_REQ_TX_MIN              VARCHAR(256) NOT NULL, 
RECON_REQ_TX_MAX              VARCHAR(256) NOT NULL); 

ALTER TABLE SolaceSysReplTest_THRESH ADD constraint PK_SolaceSysReplTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_SolaceSysReplTest_THRESH ON SolaceSysReplTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_SolaceSysReplTest ON SolaceSysReplTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_SolaceSysReplTest ON SolaceSysReplTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE SolaceClusterStTest;
CREATE TABLE SolaceClusterStTest(
TRGT_HOST                     	varchar(32) NOT NULL, 
PORT_NO                       	varchar(32) NOT NULL, 
SITE_NAME                     	varchar(64) NOT NULL, 
INFO                          	varchar(128) NOT NULL, 
MSMT_HOST                     	varchar(32) NOT NULL, 
MSMT_TIME                     	datetime NOT NULL, 
TOTAL_CLUSTER_NODE        		DECIMAL(20,4) NOT NULL, 
TOTAL_CLUSTER_NODE_ST     		varchar(32) NOT NULL, 
NODE_SUCCESS_NW_CONN       	 	DECIMAL(20,4) NOT NULL, 
NODE_SUCCESS_NW_CONN_ST     	varchar(32) NOT NULL, 
NODE_SUCCESS_NW_CONN_PCT      	DECIMAL(20,4) NOT NULL, 
NODE_SUCCESS_NW_CONN_PCT_ST   	varchar(32) NOT NULL, 
NODE_PORT_REACHABILITY       	DECIMAL(20,4) NOT NULL, 
NODE_PORT_REACHABILITY_ST    	varchar(32) NOT NULL, 
NODE_PORT_REACHABILITY_PCT      DECIMAL(20,4) NOT NULL, 
NODE_PORT_REACHABILITY_PCT_ST   varchar(32) NOT NULL, 
NODE_SEMP_CONN       			DECIMAL(20,4) NOT NULL, 
NODE_SEMP_CONN_ST    			varchar(32) NOT NULL, 
NODE_SEMP_CONN_PCT       		DECIMAL(20,4) NOT NULL, 
NODE_SEMP_CONN_PCT_ST    		varchar(32) NOT NULL, 
TOTAL_PRIMARY_NODE            	DECIMAL(20,4) NOT NULL, 
TOTAL_PRIMARY_NODE_ST         	varchar(32) NOT NULL, 
TOTAL_PRIMARY_NODE_PCT          DECIMAL(20,4) NOT NULL, 
TOTAL_PRIMARY_NODE_PCT_ST       varchar(32) NOT NULL, 
TOTAL_BACKUP_NODE               DECIMAL(20,4) NOT NULL, 
TOTAL_BACKUP_NODE_ST            varchar(32) NOT NULL, 
TOTAL_BACKUP_NODE_PCT           DECIMAL(20,4) NOT NULL, 
TOTAL_BACKUP_NODE_PCT_ST        varchar(32) NOT NULL, 
TOTAL_NODE_ROLE_CHANGED         DECIMAL(20,4) NOT NULL, 
TOTAL_NODE_ROLE_CHANGED_ST      varchar(32) NOT NULL, 
NODES_NOT_LOCAL_ACTIVE          DECIMAL(20,4) NOT NULL, 
NODES_NOT_LOCAL_ACTIVE_ST       varchar(32) NOT NULL, 
NODES_NOT_MATE_ACTIVE         	DECIMAL(20,4) NOT NULL, 
NODES_NOT_MATE_ACTIVE_ST      	varchar(32) NOT NULL); 

CREATE INDEX IDX_SolaceClusterStTest ON SolaceClusterStTest(MSMT_TIME);
ALTER TABLE SolaceClusterStTest ADD constraint PK_SolaceClusterStTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE SolaceClusterStTest_TREND;
CREATE TABLE SolaceClusterStTest_TREND(
TRGT_HOST                     	varchar(32) NOT NULL, 
PORT_NO                       	varchar(32) NOT NULL, 
SITE_NAME                     	varchar(64) NOT NULL, 
INFO                          	varchar(128) NOT NULL, 
MSMT_HOST                     	varchar(32) NOT NULL, 
MSMT_TIME                     	datetime NOT NULL, 
PERIOD                        	varchar(32) NOT NULL, 
TOTAL_CLUSTER_NODE_MIN    		DECIMAL(20,4) NOT NULL, 
TOTAL_CLUSTER_NODE_MAX    		DECIMAL(20,4) NOT NULL, 
TOTAL_CLUSTER_NODE_STCNT  		varchar(32) NOT NULL, 
NODE_SUCCESS_NW_CONN_MIN    	DECIMAL(20,4) NOT NULL, 
NODE_SUCCESS_NW_CONN_MAX    	DECIMAL(20,4) NOT NULL, 
NODE_SUCCESS_NW_CONN_STCNT  	varchar(32) NOT NULL, 
NODE_SUCCESS_NW_CONN_PCT_MIN  	DECIMAL(20,4) NOT NULL, 
NODE_SUCCESS_NW_CONN_PCT_MAX  	DECIMAL(20,4) NOT NULL, 
NODE_SUCCESS_NW_CONN_PCT_STCNT 	varchar(32) NOT NULL, 
NODE_PORT_REACHABILITY_MIN   	DECIMAL(20,4) NOT NULL, 
NODE_PORT_REACHABILITY_MAX   	DECIMAL(20,4) NOT NULL, 
NODE_PORT_REACHABILITY_STCNT 	varchar(32) NOT NULL, 
NODE_PORT_REACHABILITY_PCT_MIN     DECIMAL(20,4) NOT NULL, 
NODE_PORT_REACHABILITY_PCT_MAX     DECIMAL(20,4) NOT NULL, 
NODE_PORT_REACHABILITY_PCT_STCNT   varchar(32) NOT NULL, 
NODE_SEMP_CONN_MIN   DECIMAL(20,4) NOT NULL, 
NODE_SEMP_CONN_MAX   DECIMAL(20,4) NOT NULL, 
NODE_SEMP_CONN_STCNT varchar(32) NOT NULL, 
NODE_SEMP_CONN_PCT_MIN   		DECIMAL(20,4) NOT NULL, 
NODE_SEMP_CONN_PCT_MAX   		DECIMAL(20,4) NOT NULL, 
NODE_SEMP_CONN_PCT_STCNT 		varchar(32) NOT NULL, 
TOTAL_PRIMARY_NODE_MIN        	DECIMAL(20,4) NOT NULL, 
TOTAL_PRIMARY_NODE_MAX        	DECIMAL(20,4) NOT NULL, 
TOTAL_PRIMARY_NODE_STCNT      	varchar(32) NOT NULL, 
TOTAL_PRIMARY_NODE_PCT_MIN      DECIMAL(20,4) NOT NULL, 
TOTAL_PRIMARY_NODE_PCT_MAX      DECIMAL(20,4) NOT NULL, 
TOTAL_PRIMARY_NODE_PCT_STCNT    varchar(32) NOT NULL, 
TOTAL_BACKUP_NODE_MIN           DECIMAL(20,4) NOT NULL, 
TOTAL_BACKUP_NODE_MAX           DECIMAL(20,4) NOT NULL, 
TOTAL_BACKUP_NODE_STCNT         varchar(32) NOT NULL, 
TOTAL_BACKUP_NODE_PCT_MIN       DECIMAL(20,4) NOT NULL, 
TOTAL_BACKUP_NODE_PCT_MAX       DECIMAL(20,4) NOT NULL, 
TOTAL_BACKUP_NODE_PCT_STCNT     varchar(32) NOT NULL, 
TOTAL_NODE_ROLE_CHANGED_MIN     DECIMAL(20,4) NOT NULL, 
TOTAL_NODE_ROLE_CHANGED_MAX     DECIMAL(20,4) NOT NULL, 
TOTAL_NODE_ROLE_CHANGED_STCNT   varchar(32) NOT NULL,
NODES_NOT_LOCAL_ACTIVE_MIN      DECIMAL(20,4) NOT NULL, 
NODES_NOT_LOCAL_ACTIVE_MAX      DECIMAL(20,4) NOT NULL, 
NODES_NOT_LOCAL_ACTIVE_STCNT    varchar(32) NOT NULL, 
NODES_NOT_MATE_ACTIVE_MIN     	DECIMAL(20,4) NOT NULL, 
NODES_NOT_MATE_ACTIVE_MAX     	DECIMAL(20,4) NOT NULL, 
NODES_NOT_MATE_ACTIVE_STCNT   	varchar(32) NOT NULL); 

ALTER TABLE SolaceClusterStTest_TREND ADD constraint PK_SolaceClusterStTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE SolaceClusterStTest_THRESH;
CREATE TABLE SolaceClusterStTest_THRESH(
TRGT_HOST                     	varchar(32) NOT NULL, 
PORT_NO                       	varchar(32) NOT NULL, 
SITE_NAME                     	varchar(64) NOT NULL, 
INFO                          	varchar(128) NOT NULL, 
MSMT_HOST                     	varchar(32) NOT NULL, 
MSMT_TIME_START               	datetime NOT NULL, 
MSMT_TIME_END                 	datetime NOT NULL, 
TOTAL_CLUSTER_NODE_MIN    		VARCHAR(256) NOT NULL, 
TOTAL_CLUSTER_NODE_MAX    		VARCHAR(256) NOT NULL, 
NODE_SUCCESS_NW_CONN_MIN    	VARCHAR(256) NOT NULL, 
NODE_SUCCESS_NW_CONN_MAX    	VARCHAR(256) NOT NULL, 
NODE_SUCCESS_NW_CONN_PCT_MIN  	VARCHAR(256) NOT NULL, 
NODE_SUCCESS_NW_CONN_PCT_MAX  	VARCHAR(256) NOT NULL, 
NODE_PORT_REACHABILITY_MIN   	VARCHAR(256) NOT NULL, 
NODE_PORT_REACHABILITY_MAX   	VARCHAR(256) NOT NULL, 
NODE_PORT_REACHABILITY_PCT_MIN  VARCHAR(256) NOT NULL, 
NODE_PORT_REACHABILITY_PCT_MAX  VARCHAR(256) NOT NULL, 
NODE_SEMP_CONN_MIN   			VARCHAR(256) NOT NULL, 
NODE_SEMP_CONN_MAX   			VARCHAR(256) NOT NULL, 
NODE_SEMP_CONN_PCT_MIN   		VARCHAR(256) NOT NULL, 
NODE_SEMP_CONN_PCT_MAX   		VARCHAR(256) NOT NULL, 
TOTAL_PRIMARY_NODE_MIN        	VARCHAR(256) NOT NULL, 
TOTAL_PRIMARY_NODE_MAX        	VARCHAR(256) NOT NULL, 
TOTAL_PRIMARY_NODE_PCT_MIN      VARCHAR(256) NOT NULL, 
TOTAL_PRIMARY_NODE_PCT_MAX      VARCHAR(256) NOT NULL, 
TOTAL_BACKUP_NODE_MIN           VARCHAR(256) NOT NULL, 
TOTAL_BACKUP_NODE_MAX           VARCHAR(256) NOT NULL, 
TOTAL_BACKUP_NODE_PCT_MIN       VARCHAR(256) NOT NULL, 
TOTAL_BACKUP_NODE_PCT_MAX       VARCHAR(256) NOT NULL, 
TOTAL_NODE_ROLE_CHANGED_MIN     VARCHAR(256) NOT NULL, 
TOTAL_NODE_ROLE_CHANGED_MAX     VARCHAR(256) NOT NULL, 
NODES_NOT_LOCAL_ACTIVE_MIN      VARCHAR(256) NOT NULL, 
NODES_NOT_LOCAL_ACTIVE_MAX      VARCHAR(256) NOT NULL, 
NODES_NOT_MATE_ACTIVE_MIN     	VARCHAR(256) NOT NULL, 
NODES_NOT_MATE_ACTIVE_MAX     	VARCHAR(256) NOT NULL); 

ALTER TABLE SolaceClusterStTest_THRESH ADD constraint PK_SolaceClusterStTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_SolaceClusterStTest_THRESH ON SolaceClusterStTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_SolaceClusterStTest ON SolaceClusterStTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_SolaceClusterStTest ON SolaceClusterStTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE SolaceBridgesTest;
CREATE TABLE SolaceBridgesTest(
TRGT_HOST                     varchar(32) NOT NULL, 
PORT_NO                       varchar(32) NOT NULL, 
SITE_NAME                     varchar(64) NOT NULL, 
INFO                          varchar(128) NOT NULL, 
MSMT_HOST                     varchar(32) NOT NULL, 
MSMT_TIME                     datetime NOT NULL, 
TOT_LOCAL_BRIDGES             DECIMAL(20,4) NOT NULL, 
TOT_LOCAL_BRIDGES_ST          varchar(32) NOT NULL, 
MAX_LOCAL_BRIDGES             DECIMAL(20,4) NOT NULL, 
MAX_LOCAL_BRIDGES_ST          varchar(32) NOT NULL, 
LOCAL_BRIDGE_USAGE            DECIMAL(20,4) NOT NULL, 
LOCAL_BRIDGE_USAGE_ST         varchar(32) NOT NULL, 
TOT_RMT_BRIDGES               DECIMAL(20,4) NOT NULL, 
TOT_RMT_BRIDGES_ST            varchar(32) NOT NULL, 
MAX_RMT_BRIDGES               DECIMAL(20,4) NOT NULL, 
MAX_RMT_BRIDGES_ST            varchar(32) NOT NULL, 
RMT_BRIDGE_USAGE              DECIMAL(20,4) NOT NULL, 
RMT_BRIDGE_USAGE_ST           varchar(32) NOT NULL, 
TOT_BRIDGES_IN_SYS            DECIMAL(20,4) NOT NULL, 
TOT_BRIDGES_IN_SYS_ST         varchar(32) NOT NULL, 
MAX_BRIDGES_IN_SYS            DECIMAL(20,4) NOT NULL, 
MAX_BRIDGES_IN_SYS_ST         varchar(32) NOT NULL, 
SYS_BRIDGE_USAGE              DECIMAL(20,4) NOT NULL, 
SYS_BRIDGE_USAGE_ST           varchar(32) NOT NULL, 
TOT_RMT_BRIDGE_SUB            DECIMAL(20,4) NOT NULL, 
TOT_RMT_BRIDGE_SUB_ST         varchar(32) NOT NULL, 
MAX_RMT_BRIDGE_SUB            DECIMAL(20,4) NOT NULL, 
MAX_RMT_BRIDGE_SUB_ST         varchar(32) NOT NULL, 
RMT_BRIDGE_SUB_USAGE          DECIMAL(20,4) NOT NULL, 
RMT_BRIDGE_SUB_USAGE_ST       varchar(32) NOT NULL); 

CREATE INDEX IDX_SolaceBridgesTest ON SolaceBridgesTest(MSMT_TIME);
ALTER TABLE SolaceBridgesTest ADD constraint PK_SolaceBridgesTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE SolaceBridgesTest_TREND;
CREATE TABLE SolaceBridgesTest_TREND(
TRGT_HOST                     varchar(32) NOT NULL, 
PORT_NO                       varchar(32) NOT NULL, 
SITE_NAME                     varchar(64) NOT NULL, 
INFO                          varchar(128) NOT NULL, 
MSMT_HOST                     varchar(32) NOT NULL, 
MSMT_TIME                     datetime NOT NULL, 
PERIOD                        varchar(32) NOT NULL, 
TOT_LOCAL_BRIDGES_MIN         DECIMAL(20,4) NOT NULL, 
TOT_LOCAL_BRIDGES_MAX         DECIMAL(20,4) NOT NULL, 
TOT_LOCAL_BRIDGES_STCNT       varchar(32) NOT NULL, 
MAX_LOCAL_BRIDGES_MIN         DECIMAL(20,4) NOT NULL, 
MAX_LOCAL_BRIDGES_MAX         DECIMAL(20,4) NOT NULL, 
MAX_LOCAL_BRIDGES_STCNT       varchar(32) NOT NULL, 
LOCAL_BRIDGE_USAGE_MIN        DECIMAL(20,4) NOT NULL, 
LOCAL_BRIDGE_USAGE_MAX        DECIMAL(20,4) NOT NULL, 
LOCAL_BRIDGE_USAGE_STCNT      varchar(32) NOT NULL, 
TOT_RMT_BRIDGES_MIN           DECIMAL(20,4) NOT NULL, 
TOT_RMT_BRIDGES_MAX           DECIMAL(20,4) NOT NULL, 
TOT_RMT_BRIDGES_STCNT         varchar(32) NOT NULL, 
MAX_RMT_BRIDGES_MIN           DECIMAL(20,4) NOT NULL, 
MAX_RMT_BRIDGES_MAX           DECIMAL(20,4) NOT NULL, 
MAX_RMT_BRIDGES_STCNT         varchar(32) NOT NULL, 
RMT_BRIDGE_USAGE_MIN          DECIMAL(20,4) NOT NULL, 
RMT_BRIDGE_USAGE_MAX          DECIMAL(20,4) NOT NULL, 
RMT_BRIDGE_USAGE_STCNT        varchar(32) NOT NULL, 
TOT_BRIDGES_IN_SYS_MIN        DECIMAL(20,4) NOT NULL, 
TOT_BRIDGES_IN_SYS_MAX        DECIMAL(20,4) NOT NULL, 
TOT_BRIDGES_IN_SYS_STCNT      varchar(32) NOT NULL, 
MAX_BRIDGES_IN_SYS_MIN        DECIMAL(20,4) NOT NULL, 
MAX_BRIDGES_IN_SYS_MAX        DECIMAL(20,4) NOT NULL, 
MAX_BRIDGES_IN_SYS_STCNT      varchar(32) NOT NULL, 
SYS_BRIDGE_USAGE_MIN          DECIMAL(20,4) NOT NULL, 
SYS_BRIDGE_USAGE_MAX          DECIMAL(20,4) NOT NULL, 
SYS_BRIDGE_USAGE_STCNT        varchar(32) NOT NULL, 
TOT_RMT_BRIDGE_SUB_MIN        DECIMAL(20,4) NOT NULL, 
TOT_RMT_BRIDGE_SUB_MAX        DECIMAL(20,4) NOT NULL, 
TOT_RMT_BRIDGE_SUB_STCNT      varchar(32) NOT NULL, 
MAX_RMT_BRIDGE_SUB_MIN        DECIMAL(20,4) NOT NULL, 
MAX_RMT_BRIDGE_SUB_MAX        DECIMAL(20,4) NOT NULL, 
MAX_RMT_BRIDGE_SUB_STCNT      varchar(32) NOT NULL, 
RMT_BRIDGE_SUB_USAGE_MIN      DECIMAL(20,4) NOT NULL, 
RMT_BRIDGE_SUB_USAGE_MAX      DECIMAL(20,4) NOT NULL, 
RMT_BRIDGE_SUB_USAGE_STCNT    varchar(32) NOT NULL); 

ALTER TABLE SolaceBridgesTest_TREND ADD constraint PK_SolaceBridgesTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE SolaceBridgesTest_THRESH;
CREATE TABLE SolaceBridgesTest_THRESH(
TRGT_HOST                     varchar(32) NOT NULL, 
PORT_NO                       varchar(32) NOT NULL, 
SITE_NAME                     varchar(64) NOT NULL, 
INFO                          varchar(128) NOT NULL, 
MSMT_HOST                     varchar(32) NOT NULL, 
MSMT_TIME_START               datetime NOT NULL, 
MSMT_TIME_END                 datetime NOT NULL, 
TOT_LOCAL_BRIDGES_MIN         VARCHAR(256) NOT NULL, 
TOT_LOCAL_BRIDGES_MAX         VARCHAR(256) NOT NULL, 
MAX_LOCAL_BRIDGES_MIN         VARCHAR(256) NOT NULL, 
MAX_LOCAL_BRIDGES_MAX         VARCHAR(256) NOT NULL, 
LOCAL_BRIDGE_USAGE_MIN        VARCHAR(256) NOT NULL, 
LOCAL_BRIDGE_USAGE_MAX        VARCHAR(256) NOT NULL, 
TOT_RMT_BRIDGES_MIN           VARCHAR(256) NOT NULL, 
TOT_RMT_BRIDGES_MAX           VARCHAR(256) NOT NULL, 
MAX_RMT_BRIDGES_MIN           VARCHAR(256) NOT NULL, 
MAX_RMT_BRIDGES_MAX           VARCHAR(256) NOT NULL, 
RMT_BRIDGE_USAGE_MIN          VARCHAR(256) NOT NULL, 
RMT_BRIDGE_USAGE_MAX          VARCHAR(256) NOT NULL, 
TOT_BRIDGES_IN_SYS_MIN        VARCHAR(256) NOT NULL, 
TOT_BRIDGES_IN_SYS_MAX        VARCHAR(256) NOT NULL, 
MAX_BRIDGES_IN_SYS_MIN        VARCHAR(256) NOT NULL, 
MAX_BRIDGES_IN_SYS_MAX        VARCHAR(256) NOT NULL, 
SYS_BRIDGE_USAGE_MIN          VARCHAR(256) NOT NULL, 
SYS_BRIDGE_USAGE_MAX          VARCHAR(256) NOT NULL, 
TOT_RMT_BRIDGE_SUB_MIN        VARCHAR(256) NOT NULL, 
TOT_RMT_BRIDGE_SUB_MAX        VARCHAR(256) NOT NULL, 
MAX_RMT_BRIDGE_SUB_MIN        VARCHAR(256) NOT NULL, 
MAX_RMT_BRIDGE_SUB_MAX        VARCHAR(256) NOT NULL, 
RMT_BRIDGE_SUB_USAGE_MIN      VARCHAR(256) NOT NULL, 
RMT_BRIDGE_SUB_USAGE_MAX      VARCHAR(256) NOT NULL); 

ALTER TABLE SolaceBridgesTest_THRESH ADD constraint PK_SolaceBridgesTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_SolaceBridgesTest_THRESH ON SolaceBridgesTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_SolaceBridgesTest ON SolaceBridgesTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_SolaceBridgesTest ON SolaceBridgesTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE SolaceBridgeStTest;
CREATE TABLE SolaceBridgeStTest(
TRGT_HOST                     varchar(32) NOT NULL, 
PORT_NO                       varchar(32) NOT NULL, 
SITE_NAME                     varchar(64) NOT NULL, 
INFO                          varchar(128) NOT NULL, 
MSMT_HOST                     varchar(32) NOT NULL, 
MSMT_TIME                     datetime NOT NULL, 
ADMIN_STATE             DECIMAL(20,4) NOT NULL, 
ADMIN_STATE_ST          varchar(32) NOT NULL, 
CONN_ESTABLISHER             DECIMAL(20,4) NOT NULL, 
CONN_ESTABLISHER_ST          varchar(32) NOT NULL, 
INBOUND_OPER_ST            DECIMAL(20,4) NOT NULL, 
INBOUND_OPER_ST_ST         varchar(32) NOT NULL, 
OUTBOUND_OPER_ST               DECIMAL(20,4) NOT NULL, 
OUTBOUND_OPER_ST_ST            varchar(32) NOT NULL, 
QUEUE_ST               DECIMAL(20,4) NOT NULL, 
QUEUE_ST_ST            varchar(32) NOT NULL, 
REDUNDANCY_ST              DECIMAL(20,4) NOT NULL, 
REDUNDANCY_ST_ST           varchar(32) NOT NULL, 
CONN_UPTIME            DECIMAL(20,4) NOT NULL, 
CONN_UPTIME_ST         varchar(32) NOT NULL); 

CREATE INDEX IDX_SolaceBridgeStTest ON SolaceBridgeStTest(MSMT_TIME);
ALTER TABLE SolaceBridgeStTest ADD constraint PK_SolaceBridgeStTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE SolaceBridgeStTest_TREND;
CREATE TABLE SolaceBridgeStTest_TREND(
TRGT_HOST                     varchar(32) NOT NULL, 
PORT_NO                       varchar(32) NOT NULL, 
SITE_NAME                     varchar(64) NOT NULL, 
INFO                          varchar(128) NOT NULL, 
MSMT_HOST                     varchar(32) NOT NULL, 
MSMT_TIME                     datetime NOT NULL, 
PERIOD                        varchar(32) NOT NULL, 
ADMIN_STATE_MIN         DECIMAL(20,4) NOT NULL, 
ADMIN_STATE_MAX         DECIMAL(20,4) NOT NULL, 
ADMIN_STATE_STCNT       varchar(32) NOT NULL, 
CONN_ESTABLISHER_MIN         DECIMAL(20,4) NOT NULL, 
CONN_ESTABLISHER_MAX         DECIMAL(20,4) NOT NULL, 
CONN_ESTABLISHER_STCNT       varchar(32) NOT NULL, 
INBOUND_OPER_ST_MIN        DECIMAL(20,4) NOT NULL, 
INBOUND_OPER_ST_MAX        DECIMAL(20,4) NOT NULL, 
INBOUND_OPER_ST_STCNT      varchar(32) NOT NULL, 
OUTBOUND_OPER_ST_MIN           DECIMAL(20,4) NOT NULL, 
OUTBOUND_OPER_ST_MAX           DECIMAL(20,4) NOT NULL, 
OUTBOUND_OPER_ST_STCNT         varchar(32) NOT NULL, 
QUEUE_ST_MIN           DECIMAL(20,4) NOT NULL, 
QUEUE_ST_MAX           DECIMAL(20,4) NOT NULL, 
QUEUE_ST_STCNT         varchar(32) NOT NULL, 
REDUNDANCY_ST_MIN          DECIMAL(20,4) NOT NULL, 
REDUNDANCY_ST_MAX          DECIMAL(20,4) NOT NULL, 
REDUNDANCY_ST_STCNT        varchar(32) NOT NULL, 
CONN_UPTIME_MIN        DECIMAL(20,4) NOT NULL, 
CONN_UPTIME_MAX        DECIMAL(20,4) NOT NULL, 
CONN_UPTIME_STCNT      varchar(32) NOT NULL); 

ALTER TABLE SolaceBridgeStTest_TREND ADD constraint PK_SolaceBridgeStTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE SolaceBridgeStTest_THRESH;
CREATE TABLE SolaceBridgeStTest_THRESH(
TRGT_HOST                     varchar(32) NOT NULL, 
PORT_NO                       varchar(32) NOT NULL, 
SITE_NAME                     varchar(64) NOT NULL, 
INFO                          varchar(128) NOT NULL, 
MSMT_HOST                     varchar(32) NOT NULL, 
MSMT_TIME_START               datetime NOT NULL, 
MSMT_TIME_END                 datetime NOT NULL, 
ADMIN_STATE_MIN        		  VARCHAR(256) NOT NULL, 
ADMIN_STATE_MAX         	  VARCHAR(256) NOT NULL, 
CONN_ESTABLISHER_MIN          VARCHAR(256) NOT NULL, 
CONN_ESTABLISHER_MAX          VARCHAR(256) NOT NULL, 
INBOUND_OPER_ST_MIN        	  VARCHAR(256) NOT NULL, 
INBOUND_OPER_ST_MAX            VARCHAR(256) NOT NULL, 
OUTBOUND_OPER_ST_MIN           VARCHAR(256) NOT NULL, 
OUTBOUND_OPER_ST_MAX           VARCHAR(256) NOT NULL, 
QUEUE_ST_MIN           VARCHAR(256) NOT NULL, 
QUEUE_ST_MAX           VARCHAR(256) NOT NULL, 
REDUNDANCY_ST_MIN          VARCHAR(256) NOT NULL, 
REDUNDANCY_ST_MAX          VARCHAR(256) NOT NULL, 
CONN_UPTIME_MIN        VARCHAR(256) NOT NULL, 
CONN_UPTIME_MAX        VARCHAR(256) NOT NULL); 

ALTER TABLE SolaceBridgeStTest_THRESH ADD constraint PK_SolaceBridgeStTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_SolaceBridgeStTest_THRESH ON SolaceBridgeStTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_SolaceBridgeStTest ON SolaceBridgeStTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_SolaceBridgeStTest ON SolaceBridgeStTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE SolaceCluNodeTest;
CREATE TABLE SolaceCluNodeTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
CONFIG_STATUS DECIMAL(20,4) NOT NULL,
CONFIG_STATUS_ST varchar(32) NOT NULL,
REDUNDANCY_STATUS DECIMAL(20,4) NOT NULL,
REDUNDANCY_STATUS_ST varchar(32) NOT NULL,
AUTO_REVERT_ENABLED DECIMAL(20,4) NOT NULL,
AUTO_REVERT_ENABLED_ST varchar(32) NOT NULL,
ACTIVE_STANDBY_ROLE DECIMAL(20,4) NOT NULL,
ACTIVE_STANDBY_ROLE_ST varchar(32) NOT NULL,
ADB_LINK_STATE DECIMAL(20,4) NOT NULL,
ADB_LINK_STATE_ST varchar(32) NOT NULL,
ADB_HELLO_STATE DECIMAL(20,4) NOT NULL,
ADB_HELLO_STATE_ST varchar(32) NOT NULL,
ADB_HELLO_AVGLATENCY DECIMAL(20,4) NOT NULL,
ADB_HELLO_AVGLATENCY_ST varchar(32) NOT NULL,
ADB_HELLO_MAXLATENCY DECIMAL(20,4) NOT NULL,
ADB_HELLO_MAXLATENCY_ST varchar(32) NOT NULL,
PRIMARY_ACTIVITY DECIMAL(20,4) NOT NULL,
PRIMARY_ACTIVITY_ST varchar(32) NOT NULL,
PRIMARY_ROUTE_IFSTATE DECIMAL(20,4) NOT NULL,
PRIMARY_ROUTE_IFSTATE_ST varchar(32) NOT NULL,
PRIMARY_MSGSPOOL_STATE DECIMAL(20,4) NOT NULL,
PRIMARY_MSGSPOOL_STATE_ST varchar(32) NOT NULL,
PRIMARY_SMRP_STATE DECIMAL(20,4) NOT NULL,
PRIMARY_SMRP_STATE_ST varchar(32) NOT NULL,
PRIMARY_ADMSTATE DECIMAL(20,4) NOT NULL,
PRIMARY_ADMSTATE_ST varchar(32) NOT NULL,
PRIMARY_ADMDPATH_STATE DECIMAL(20,4) NOT NULL,
PRIMARY_ADMDPATH_STATE_ST varchar(32) NOT NULL,
PRIMARY_FLASHMOD_STATE DECIMAL(20,4) NOT NULL,
PRIMARY_FLASHMOD_STATE_ST varchar(32) NOT NULL,
PRIMARY_PWRMOD_STATE DECIMAL(20,4) NOT NULL,
PRIMARY_PWRMOD_STATE_ST varchar(32) NOT NULL,
PRIMARY_ADMCNT_STATE DECIMAL(20,4) NOT NULL,
PRIMARY_ADMCNT_STATE_ST varchar(32) NOT NULL,
PRIMARY_DISK_STATE DECIMAL(20,4) NOT NULL,
PRIMARY_DISK_STATE_ST varchar(32) NOT NULL,
PRIMARY_DISKCNT_STATE DECIMAL(20,4) NOT NULL,
PRIMARY_DISKCNT_STATE_ST varchar(32) NOT NULL,
PRIMARY_DB_SYNC DECIMAL(20,4) NOT NULL,
PRIMARY_DB_SYNC_ST varchar(32) NOT NULL,
PRIMARY_DB_BUILD DECIMAL(20,4) NOT NULL,
PRIMARY_DB_BUILD_ST varchar(32) NOT NULL,
PRIMARY_DB_BUILD_PCT DECIMAL(20,4) NOT NULL,
PRIMARY_DB_BUILD_PCT_ST varchar(32) NOT NULL,
BACKUP_ACTIVITY DECIMAL(20,4) NOT NULL,
BACKUP_ACTIVITY_ST varchar(32) NOT NULL,
BACKUP_ROUTE_IFSTATE DECIMAL(20,4) NOT NULL,
BACKUP_ROUTE_IFSTATE_ST varchar(32) NOT NULL,
BACKUP_MSGSPOOL_STATE DECIMAL(20,4) NOT NULL,
BACKUP_MSGSPOOL_STATE_ST varchar(32) NOT NULL,
BACKUP_SMRP_STATE DECIMAL(20,4) NOT NULL,
BACKUP_SMRP_STATE_ST varchar(32) NOT NULL,
BACKUP_ADMSTATE DECIMAL(20,4) NOT NULL,
BACKUP_ADMSTATE_ST varchar(32) NOT NULL,
BACKUP_ADMDPATH_STATE DECIMAL(20,4) NOT NULL,
BACKUP_ADMDPATH_STATE_ST varchar(32) NOT NULL,
BACKUP_FLASHMOD_STATE DECIMAL(20,4) NOT NULL,
BACKUP_FLASHMOD_STATE_ST varchar(32) NOT NULL,
BACKUP_PWRMOD_STATE DECIMAL(20,4) NOT NULL,
BACKUP_PWRMOD_STATE_ST varchar(32) NOT NULL,
BACKUP_ADMCNT_STATE DECIMAL(20,4) NOT NULL,
BACKUP_ADMCNT_STATE_ST varchar(32) NOT NULL,
BACKUP_DISK_STATE DECIMAL(20,4) NOT NULL,
BACKUP_DISK_STATE_ST varchar(32) NOT NULL,
BACKUP_DISKCNT_STATE DECIMAL(20,4) NOT NULL,
BACKUP_DISKCNT_STATE_ST varchar(32) NOT NULL,
BACKUP_DB_SYNC DECIMAL(20,4) NOT NULL,
BACKUP_DB_SYNC_ST varchar(32) NOT NULL,
BACKUP_DB_BUILD DECIMAL(20,4) NOT NULL,
BACKUP_DB_BUILD_ST varchar(32) NOT NULL,
BACKUP_DB_BUILD_PCT DECIMAL(20,4) NOT NULL,
BACKUP_DB_BUILD_PCT_ST varchar(32) NOT NULL,
HAS_SWITCHOVER_OCCURRED DECIMAL(20,4) NOT NULL,
HAS_SWITCHOVER_OCCURRED_ST varchar(32) NOT NULL,
NODE_STATUS DECIMAL(20,4) NOT NULL,
NODE_STATUS_ST varchar(32) NOT NULL);
CREATE INDEX IDX_SolaceCluNodeTest ON SolaceCluNodeTest(MSMT_TIME);
ALTER TABLE SolaceCluNodeTest ADD constraint PK_SolaceCluNodeTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE SolaceCluNodeTest_TREND;
CREATE TABLE SolaceCluNodeTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
CONFIG_STATUS_MIN DECIMAL(20,4) NOT NULL,
CONFIG_STATUS_MAX DECIMAL(20,4) NOT NULL,
CONFIG_STATUS_STCNT varchar(32) NOT NULL,
REDUNDANCY_STATUS_MIN DECIMAL(20,4) NOT NULL,
REDUNDANCY_STATUS_MAX DECIMAL(20,4) NOT NULL,
REDUNDANCY_STATUS_STCNT varchar(32) NOT NULL,
AUTO_REVERT_ENABLED_MIN DECIMAL(20,4) NOT NULL,
AUTO_REVERT_ENABLED_MAX DECIMAL(20,4) NOT NULL,
AUTO_REVERT_ENABLED_STCNT varchar(32) NOT NULL,
ACTIVE_STANDBY_ROLE_MIN DECIMAL(20,4) NOT NULL,
ACTIVE_STANDBY_ROLE_MAX DECIMAL(20,4) NOT NULL,
ACTIVE_STANDBY_ROLE_STCNT varchar(32) NOT NULL,
ADB_LINK_STATE_MIN DECIMAL(20,4) NOT NULL,
ADB_LINK_STATE_MAX DECIMAL(20,4) NOT NULL,
ADB_LINK_STATE_STCNT varchar(32) NOT NULL,
ADB_HELLO_STATE_MIN DECIMAL(20,4) NOT NULL,
ADB_HELLO_STATE_MAX DECIMAL(20,4) NOT NULL,
ADB_HELLO_STATE_STCNT varchar(32) NOT NULL,
ADB_HELLO_AVGLATENCY_MIN DECIMAL(20,4) NOT NULL,
ADB_HELLO_AVGLATENCY_MAX DECIMAL(20,4) NOT NULL,
ADB_HELLO_AVGLATENCY_STCNT varchar(32) NOT NULL,
ADB_HELLO_MAXLATENCY_MIN DECIMAL(20,4) NOT NULL,
ADB_HELLO_MAXLATENCY_MAX DECIMAL(20,4) NOT NULL,
ADB_HELLO_MAXLATENCY_STCNT varchar(32) NOT NULL,
PRIMARY_ACTIVITY_MIN DECIMAL(20,4) NOT NULL,
PRIMARY_ACTIVITY_MAX DECIMAL(20,4) NOT NULL,
PRIMARY_ACTIVITY_STCNT varchar(32) NOT NULL,
PRIMARY_ROUTE_IFSTATE_MIN DECIMAL(20,4) NOT NULL,
PRIMARY_ROUTE_IFSTATE_MAX DECIMAL(20,4) NOT NULL,
PRIMARY_ROUTE_IFSTATE_STCNT varchar(32) NOT NULL,
PRIMARY_MSGSPOOL_STATE_MIN DECIMAL(20,4) NOT NULL,
PRIMARY_MSGSPOOL_STATE_MAX DECIMAL(20,4) NOT NULL,
PRIMARY_MSGSPOOL_STATE_STCNT varchar(32) NOT NULL,
PRIMARY_SMRP_STATE_MIN DECIMAL(20,4) NOT NULL,
PRIMARY_SMRP_STATE_MAX DECIMAL(20,4) NOT NULL,
PRIMARY_SMRP_STATE_STCNT varchar(32) NOT NULL,
PRIMARY_ADMSTATE_MIN DECIMAL(20,4) NOT NULL,
PRIMARY_ADMSTATE_MAX DECIMAL(20,4) NOT NULL,
PRIMARY_ADMSTATE_STCNT varchar(32) NOT NULL,
PRIMARY_ADMDPATH_STATE_MIN DECIMAL(20,4) NOT NULL,
PRIMARY_ADMDPATH_STATE_MAX DECIMAL(20,4) NOT NULL,
PRIMARY_ADMDPATH_STATE_STCNT varchar(32) NOT NULL,
PRIMARY_FLASHMOD_STATE_MIN DECIMAL(20,4) NOT NULL,
PRIMARY_FLASHMOD_STATE_MAX DECIMAL(20,4) NOT NULL,
PRIMARY_FLASHMOD_STATE_STCNT varchar(32) NOT NULL,
PRIMARY_PWRMOD_STATE_MIN DECIMAL(20,4) NOT NULL,
PRIMARY_PWRMOD_STATE_MAX DECIMAL(20,4) NOT NULL,
PRIMARY_PWRMOD_STATE_STCNT varchar(32) NOT NULL,
PRIMARY_ADMCNT_STATE_MIN DECIMAL(20,4) NOT NULL,
PRIMARY_ADMCNT_STATE_MAX DECIMAL(20,4) NOT NULL,
PRIMARY_ADMCNT_STATE_STCNT varchar(32) NOT NULL,
PRIMARY_DISK_STATE_MIN DECIMAL(20,4) NOT NULL,
PRIMARY_DISK_STATE_MAX DECIMAL(20,4) NOT NULL,
PRIMARY_DISK_STATE_STCNT varchar(32) NOT NULL,
PRIMARY_DISKCNT_STATE_MIN DECIMAL(20,4) NOT NULL,
PRIMARY_DISKCNT_STATE_MAX DECIMAL(20,4) NOT NULL,
PRIMARY_DISKCNT_STATE_STCNT varchar(32) NOT NULL,
PRIMARY_DB_SYNC_MIN DECIMAL(20,4) NOT NULL,
PRIMARY_DB_SYNC_MAX DECIMAL(20,4) NOT NULL,
PRIMARY_DB_SYNC_STCNT varchar(32) NOT NULL,
PRIMARY_DB_BUILD_MIN DECIMAL(20,4) NOT NULL,
PRIMARY_DB_BUILD_MAX DECIMAL(20,4) NOT NULL,
PRIMARY_DB_BUILD_STCNT varchar(32) NOT NULL,
PRIMARY_DB_BUILD_PCT_MIN DECIMAL(20,4) NOT NULL,
PRIMARY_DB_BUILD_PCT_MAX DECIMAL(20,4) NOT NULL,
PRIMARY_DB_BUILD_PCT_STCNT varchar(32) NOT NULL,
BACKUP_ACTIVITY_MIN DECIMAL(20,4) NOT NULL,
BACKUP_ACTIVITY_MAX DECIMAL(20,4) NOT NULL,
BACKUP_ACTIVITY_STCNT varchar(32) NOT NULL,
BACKUP_ROUTE_IFSTATE_MIN DECIMAL(20,4) NOT NULL,
BACKUP_ROUTE_IFSTATE_MAX DECIMAL(20,4) NOT NULL,
BACKUP_ROUTE_IFSTATE_STCNT varchar(32) NOT NULL,
BACKUP_MSGSPOOL_STATE_MIN DECIMAL(20,4) NOT NULL,
BACKUP_MSGSPOOL_STATE_MAX DECIMAL(20,4) NOT NULL,
BACKUP_MSGSPOOL_STATE_STCNT varchar(32) NOT NULL,
BACKUP_SMRP_STATE_MIN DECIMAL(20,4) NOT NULL,
BACKUP_SMRP_STATE_MAX DECIMAL(20,4) NOT NULL,
BACKUP_SMRP_STATE_STCNT varchar(32) NOT NULL,
BACKUP_ADMSTATE_MIN DECIMAL(20,4) NOT NULL,
BACKUP_ADMSTATE_MAX DECIMAL(20,4) NOT NULL,
BACKUP_ADMSTATE_STCNT varchar(32) NOT NULL,
BACKUP_ADMDPATH_STATE_MIN DECIMAL(20,4) NOT NULL,
BACKUP_ADMDPATH_STATE_MAX DECIMAL(20,4) NOT NULL,
BACKUP_ADMDPATH_STATE_STCNT varchar(32) NOT NULL,
BACKUP_FLASHMOD_STATE_MIN DECIMAL(20,4) NOT NULL,
BACKUP_FLASHMOD_STATE_MAX DECIMAL(20,4) NOT NULL,
BACKUP_FLASHMOD_STATE_STCNT varchar(32) NOT NULL,
BACKUP_PWRMOD_STATE_MIN DECIMAL(20,4) NOT NULL,
BACKUP_PWRMOD_STATE_MAX DECIMAL(20,4) NOT NULL,
BACKUP_PWRMOD_STATE_STCNT varchar(32) NOT NULL,
BACKUP_ADMCNT_STATE_MIN DECIMAL(20,4) NOT NULL,
BACKUP_ADMCNT_STATE_MAX DECIMAL(20,4) NOT NULL,
BACKUP_ADMCNT_STATE_STCNT varchar(32) NOT NULL,
BACKUP_DISK_STATE_MIN DECIMAL(20,4) NOT NULL,
BACKUP_DISK_STATE_MAX DECIMAL(20,4) NOT NULL,
BACKUP_DISK_STATE_STCNT varchar(32) NOT NULL,
BACKUP_DISKCNT_STATE_MIN DECIMAL(20,4) NOT NULL,
BACKUP_DISKCNT_STATE_MAX DECIMAL(20,4) NOT NULL,
BACKUP_DISKCNT_STATE_STCNT varchar(32) NOT NULL,
BACKUP_DB_SYNC_MIN DECIMAL(20,4) NOT NULL,
BACKUP_DB_SYNC_MAX DECIMAL(20,4) NOT NULL,
BACKUP_DB_SYNC_STCNT varchar(32) NOT NULL,
BACKUP_DB_BUILD_MIN DECIMAL(20,4) NOT NULL,
BACKUP_DB_BUILD_MAX DECIMAL(20,4) NOT NULL,
BACKUP_DB_BUILD_STCNT varchar(32) NOT NULL,
BACKUP_DB_BUILD_PCT_MIN DECIMAL(20,4) NOT NULL,
BACKUP_DB_BUILD_PCT_MAX DECIMAL(20,4) NOT NULL,
BACKUP_DB_BUILD_PCT_STCNT varchar(32) NOT NULL,
HAS_SWITCHOVER_OCCURRED_MIN DECIMAL(20,4) NOT NULL,
HAS_SWITCHOVER_OCCURRED_MAX DECIMAL(20,4) NOT NULL,
HAS_SWITCHOVER_OCCURRED_STCNT varchar(32) NOT NULL,
NODE_STATUS_MIN DECIMAL(20,4) NOT NULL,
NODE_STATUS_MAX DECIMAL(20,4) NOT NULL,
NODE_STATUS_STCNT varchar(32) NOT NULL);
ALTER TABLE SolaceCluNodeTest_TREND ADD constraint PK_SolaceCluNodeTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE SolaceCluNodeTest_THRESH;
CREATE TABLE SolaceCluNodeTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
CONFIG_STATUS_MIN VARCHAR(256) NOT NULL,
CONFIG_STATUS_MAX VARCHAR(256) NOT NULL,
REDUNDANCY_STATUS_MIN VARCHAR(256) NOT NULL,
REDUNDANCY_STATUS_MAX VARCHAR(256) NOT NULL,
AUTO_REVERT_ENABLED_MIN VARCHAR(256) NOT NULL,
AUTO_REVERT_ENABLED_MAX VARCHAR(256) NOT NULL,
ACTIVE_STANDBY_ROLE_MIN VARCHAR(256) NOT NULL,
ACTIVE_STANDBY_ROLE_MAX VARCHAR(256) NOT NULL,
ADB_LINK_STATE_MIN VARCHAR(256) NOT NULL,
ADB_LINK_STATE_MAX VARCHAR(256) NOT NULL,
ADB_HELLO_STATE_MIN VARCHAR(256) NOT NULL,
ADB_HELLO_STATE_MAX VARCHAR(256) NOT NULL,
ADB_HELLO_AVGLATENCY_MIN VARCHAR(256) NOT NULL,
ADB_HELLO_AVGLATENCY_MAX VARCHAR(256) NOT NULL,
ADB_HELLO_MAXLATENCY_MIN VARCHAR(256) NOT NULL,
ADB_HELLO_MAXLATENCY_MAX VARCHAR(256) NOT NULL,
PRIMARY_ACTIVITY_MIN VARCHAR(256) NOT NULL,
PRIMARY_ACTIVITY_MAX VARCHAR(256) NOT NULL,
PRIMARY_ROUTE_IFSTATE_MIN VARCHAR(256) NOT NULL,
PRIMARY_ROUTE_IFSTATE_MAX VARCHAR(256) NOT NULL,
PRIMARY_MSGSPOOL_STATE_MIN VARCHAR(256) NOT NULL,
PRIMARY_MSGSPOOL_STATE_MAX VARCHAR(256) NOT NULL,
PRIMARY_SMRP_STATE_MIN VARCHAR(256) NOT NULL,
PRIMARY_SMRP_STATE_MAX VARCHAR(256) NOT NULL,
PRIMARY_ADMSTATE_MIN VARCHAR(256) NOT NULL,
PRIMARY_ADMSTATE_MAX VARCHAR(256) NOT NULL,
PRIMARY_ADMDPATH_STATE_MIN VARCHAR(256) NOT NULL,
PRIMARY_ADMDPATH_STATE_MAX VARCHAR(256) NOT NULL,
PRIMARY_FLASHMOD_STATE_MIN VARCHAR(256) NOT NULL,
PRIMARY_FLASHMOD_STATE_MAX VARCHAR(256) NOT NULL,
PRIMARY_PWRMOD_STATE_MIN VARCHAR(256) NOT NULL,
PRIMARY_PWRMOD_STATE_MAX VARCHAR(256) NOT NULL,
PRIMARY_ADMCNT_STATE_MIN VARCHAR(256) NOT NULL,
PRIMARY_ADMCNT_STATE_MAX VARCHAR(256) NOT NULL,
PRIMARY_DISK_STATE_MIN VARCHAR(256) NOT NULL,
PRIMARY_DISK_STATE_MAX VARCHAR(256) NOT NULL,
PRIMARY_DISKCNT_STATE_MIN VARCHAR(256) NOT NULL,
PRIMARY_DISKCNT_STATE_MAX VARCHAR(256) NOT NULL,
PRIMARY_DB_SYNC_MIN VARCHAR(256) NOT NULL,
PRIMARY_DB_SYNC_MAX VARCHAR(256) NOT NULL,
PRIMARY_DB_BUILD_MIN VARCHAR(256) NOT NULL,
PRIMARY_DB_BUILD_MAX VARCHAR(256) NOT NULL,
PRIMARY_DB_BUILD_PCT_MIN VARCHAR(256) NOT NULL,
PRIMARY_DB_BUILD_PCT_MAX VARCHAR(256) NOT NULL,
BACKUP_ACTIVITY_MIN VARCHAR(256) NOT NULL,
BACKUP_ACTIVITY_MAX VARCHAR(256) NOT NULL,
BACKUP_ROUTE_IFSTATE_MIN VARCHAR(256) NOT NULL,
BACKUP_ROUTE_IFSTATE_MAX VARCHAR(256) NOT NULL,
BACKUP_MSGSPOOL_STATE_MIN VARCHAR(256) NOT NULL,
BACKUP_MSGSPOOL_STATE_MAX VARCHAR(256) NOT NULL,
BACKUP_SMRP_STATE_MIN VARCHAR(256) NOT NULL,
BACKUP_SMRP_STATE_MAX VARCHAR(256) NOT NULL,
BACKUP_ADMSTATE_MIN VARCHAR(256) NOT NULL,
BACKUP_ADMSTATE_MAX VARCHAR(256) NOT NULL,
BACKUP_ADMDPATH_STATE_MIN VARCHAR(256) NOT NULL,
BACKUP_ADMDPATH_STATE_MAX VARCHAR(256) NOT NULL,
BACKUP_FLASHMOD_STATE_MIN VARCHAR(256) NOT NULL,
BACKUP_FLASHMOD_STATE_MAX VARCHAR(256) NOT NULL,
BACKUP_PWRMOD_STATE_MIN VARCHAR(256) NOT NULL,
BACKUP_PWRMOD_STATE_MAX VARCHAR(256) NOT NULL,
BACKUP_ADMCNT_STATE_MIN VARCHAR(256) NOT NULL,
BACKUP_ADMCNT_STATE_MAX VARCHAR(256) NOT NULL,
BACKUP_DISK_STATE_MIN VARCHAR(256) NOT NULL,
BACKUP_DISK_STATE_MAX VARCHAR(256) NOT NULL,
BACKUP_DISKCNT_STATE_MIN VARCHAR(256) NOT NULL,
BACKUP_DISKCNT_STATE_MAX VARCHAR(256) NOT NULL,
BACKUP_DB_SYNC_MIN VARCHAR(256) NOT NULL,
BACKUP_DB_SYNC_MAX VARCHAR(256) NOT NULL,
BACKUP_DB_BUILD_MIN VARCHAR(256) NOT NULL,
BACKUP_DB_BUILD_MAX VARCHAR(256) NOT NULL,
BACKUP_DB_BUILD_PCT_MIN VARCHAR(256) NOT NULL,
BACKUP_DB_BUILD_PCT_MAX VARCHAR(256) NOT NULL,
HAS_SWITCHOVER_OCCURRED_MIN VARCHAR(256) NOT NULL,
HAS_SWITCHOVER_OCCURRED_MAX VARCHAR(256) NOT NULL,
NODE_STATUS_MIN VARCHAR(256) NOT NULL,
NODE_STATUS_MAX VARCHAR(256) NOT NULL);
ALTER TABLE SolaceCluNodeTest_THRESH ADD constraint PK_SolaceCluNodeTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_SolaceCluNodeTest_THRESH ON SolaceCluNodeTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_SolaceCluNodeTest ON SolaceCluNodeTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_SolaceCluNodeTest ON SolaceCluNodeTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE RedisClstrStatusTest;
CREATE TABLE RedisClstrStatusTest(
TRGT_HOST VARCHAR(32) NOT NULL,
PORT_NO VARCHAR(32) NOT NULL,
SITE_NAME VARCHAR(64) NOT NULL,
INFO VARCHAR(128) NOT NULL,
MSMT_HOST VARCHAR(32) NOT NULL,
MSMT_TIME datetime NOT NULL,
CLST_ENABLED DECIMAL(20,4) NOT NULL,
CLST_ENABLED_ST VARCHAR(32) NOT NULL,
CLST_SLTS_OK DECIMAL(20,4) NOT NULL,
CLST_SLTS_OK_ST VARCHAR(32) NOT NULL,
CLST_SLTS_PFAIL DECIMAL(20,4) NOT NULL,
CLST_SLTS_PFAIL_ST VARCHAR(32) NOT NULL,
CLST_STA_MSG_SENT DECIMAL(20,4) NOT NULL,
CLST_STA_MSG_SENT_ST VARCHAR(32) NOT NULL,
CLST_STAS DECIMAL(20,4) NOT NULL,
CLST_STAS_ST VARCHAR(32) NOT NULL,
CLST_KNW_NODES DECIMAL(20,4) NOT NULL,
CLST_KNW_NODES_ST VARCHAR(32) NOT NULL,
CLST_SLT_ASIGN DECIMAL(20,4) NOT NULL,
CLST_SLT_ASIGN_ST VARCHAR(32) NOT NULL,
CLST_SIZE DECIMAL(20,4) NOT NULL,
CLST_SIZE_ST VARCHAR(32) NOT NULL,
CLST_SLTS_FAIL DECIMAL(20,4) NOT NULL,
CLST_SLTS_FAIL_ST VARCHAR(32) NOT NULL,
CLST_STA_MSG_RX DECIMAL(20,4) NOT NULL,
CLST_STA_MSG_RX_ST VARCHAR(32) NOT NULL,
CLST_ADD_NODES DECIMAL(20,4) NOT NULL,
CLST_ADD_NODES_ST VARCHAR(32) NOT NULL,
CLST_DEL_NODES DECIMAL(20,4) NOT NULL,
CLST_DEL_NODES_ST VARCHAR(32) NOT NULL,
CLST_SLAVE_NODES DECIMAL(20,4) NOT NULL,
CLST_SLAVE_NODES_ST VARCHAR(32) NOT NULL);

CREATE INDEX IDX_RedisClstrStatusTest ON RedisClstrStatusTest(MSMT_TIME);
ALTER TABLE RedisClstrStatusTest ADD constraint PK_RedisClstrStatusTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);

DROP TABLE RedisClstrStatusTest_TREND;
CREATE TABLE RedisClstrStatusTest_TREND(
TRGT_HOST VARCHAR(32) NOT NULL,
PORT_NO VARCHAR(32) NOT NULL,
SITE_NAME VARCHAR(64) NOT NULL,
INFO VARCHAR(128) NOT NULL,
MSMT_HOST VARCHAR(32) NOT NULL,
MSMT_TIME datetime NOT NULL,
PERIOD VARCHAR(32) NOT NULL,
CLST_ENABLED_MIN DECIMAL(20,4) NOT NULL,
CLST_ENABLED_MAX DECIMAL(20,4) NOT NULL,
CLST_ENABLED_STCNT VARCHAR(32) NOT NULL,
CLST_SLTS_OK_MIN DECIMAL(20,4) NOT NULL,
CLST_SLTS_OK_MAX DECIMAL(20,4) NOT NULL,
CLST_SLTS_OK_STCNT VARCHAR(32) NOT NULL,
CLST_SLTS_PFAIL_MIN DECIMAL(20,4) NOT NULL,
CLST_SLTS_PFAIL_MAX DECIMAL(20,4) NOT NULL,
CLST_SLTS_PFAIL_STCNT VARCHAR(32) NOT NULL,
CLST_STA_MSG_SENT_MIN DECIMAL(20,4) NOT NULL,
CLST_STA_MSG_SENT_MAX DECIMAL(20,4) NOT NULL,
CLST_STA_MSG_SENT_STCNT VARCHAR(32) NOT NULL,
CLST_STAS_MIN DECIMAL(20,4) NOT NULL,
CLST_STAS_MAX DECIMAL(20,4) NOT NULL,
CLST_STAS_STCNT VARCHAR(32) NOT NULL,
CLST_KNW_NODES_MIN DECIMAL(20,4) NOT NULL,
CLST_KNW_NODES_MAX DECIMAL(20,4) NOT NULL,
CLST_KNW_NODES_STCNT VARCHAR(32) NOT NULL,
CLST_SLT_ASIGN_MIN DECIMAL(20,4) NOT NULL,
CLST_SLT_ASIGN_MAX DECIMAL(20,4) NOT NULL,
CLST_SLT_ASIGN_STCNT VARCHAR(32) NOT NULL,
CLST_SIZE_MIN DECIMAL(20,4) NOT NULL,
CLST_SIZE_MAX DECIMAL(20,4) NOT NULL,
CLST_SIZE_STCNT VARCHAR(32) NOT NULL,
CLST_SLTS_FAIL_MIN DECIMAL(20,4) NOT NULL,
CLST_SLTS_FAIL_MAX DECIMAL(20,4) NOT NULL,
CLST_SLTS_FAIL_STCNT VARCHAR(32) NOT NULL,
CLST_STA_MSG_RX_MIN DECIMAL(20,4) NOT NULL,
CLST_STA_MSG_RX_MAX DECIMAL(20,4) NOT NULL,
CLST_STA_MSG_RX_STCNT VARCHAR(32) NOT NULL,
CLST_ADD_NODES_MIN DECIMAL(20,4) NOT NULL,
CLST_ADD_NODES_MAX DECIMAL(20,4) NOT NULL,
CLST_ADD_NODES_STCNT VARCHAR(32) NOT NULL,
CLST_DEL_NODES_MIN DECIMAL(20,4) NOT NULL,
CLST_DEL_NODES_MAX DECIMAL(20,4) NOT NULL,
CLST_DEL_NODES_STCNT VARCHAR(32) NOT NULL,
CLST_SLAVE_NODES_MIN DECIMAL(20,4) NOT NULL,
CLST_SLAVE_NODES_MAX DECIMAL(20,4) NOT NULL,
CLST_SLAVE_NODES_STCNT VARCHAR(32) NOT NULL);

ALTER TABLE RedisClstrStatusTest_TREND ADD constraint PK_RedisClstrStatusTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);

DROP TABLE RedisClstrStatusTest_THRESH;
CREATE TABLE RedisClstrStatusTest_THRESH(
TRGT_HOST VARCHAR(32) NOT NULL,
PORT_NO VARCHAR(32) NOT NULL,
SITE_NAME VARCHAR(64) NOT NULL,
INFO VARCHAR(128) NOT NULL,
MSMT_HOST VARCHAR(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END datetime NOT NULL,
CLST_ENABLED_MIN VARCHAR(256) NOT NULL,
CLST_ENABLED_MAX VARCHAR(256) NOT NULL,
CLST_SLTS_OK_MIN VARCHAR(256) NOT NULL,
CLST_SLTS_OK_MAX VARCHAR(256) NOT NULL,
CLST_SLTS_PFAIL_MIN VARCHAR(256) NOT NULL,
CLST_SLTS_PFAIL_MAX VARCHAR(256) NOT NULL,
CLST_STA_MSG_SENT_MIN VARCHAR(256) NOT NULL,
CLST_STA_MSG_SENT_MAX VARCHAR(256) NOT NULL,
CLST_STAS_MIN VARCHAR(256) NOT NULL,
CLST_STAS_MAX VARCHAR(256) NOT NULL,
CLST_KNW_NODES_MIN VARCHAR(256) NOT NULL,
CLST_KNW_NODES_MAX VARCHAR(256) NOT NULL,
CLST_SLT_ASIGN_MIN VARCHAR(256) NOT NULL,
CLST_SLT_ASIGN_MAX VARCHAR(256) NOT NULL,
CLST_SIZE_MIN VARCHAR(256) NOT NULL,
CLST_SIZE_MAX VARCHAR(256) NOT NULL,
CLST_SLTS_FAIL_MIN VARCHAR(256) NOT NULL,
CLST_SLTS_FAIL_MAX VARCHAR(256) NOT NULL,
CLST_STA_MSG_RX_MIN VARCHAR(256) NOT NULL,
CLST_STA_MSG_RX_MAX VARCHAR(256) NOT NULL,
CLST_ADD_NODES_MIN VARCHAR(256) NOT NULL,
CLST_ADD_NODES_MAX VARCHAR(256) NOT NULL,
CLST_DEL_NODES_MIN VARCHAR(256) NOT NULL,
CLST_DEL_NODES_MAX VARCHAR(256) NOT NULL,
CLST_SLAVE_NODES_MIN VARCHAR(256) NOT NULL,
CLST_SLAVE_NODES_MAX VARCHAR(256) NOT NULL);

ALTER TABLE RedisClstrStatusTest_THRESH ADD constraint PK_RedClstStatusTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_RedClstStatusTest_THRESH ON RedisClstrStatusTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_RedisClstrStatusTest ON RedisClstrStatusTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_RedisClstrStatusTest ON RedisClstrStatusTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE RedisClstrReplicaTest;
CREATE TABLE RedisClstrReplicaTest(
TRGT_HOST VARCHAR(32) NOT NULL,
PORT_NO VARCHAR(32) NOT NULL,
SITE_NAME VARCHAR(64) NOT NULL,
INFO VARCHAR(128) NOT NULL,
MSMT_HOST VARCHAR(32) NOT NULL,
MSMT_TIME datetime NOT NULL,
ROLE DECIMAL(20,4) NOT NULL,
ROLE_ST VARCHAR(32) NOT NULL,
CONNECTED_SLV DECIMAL(20,4) NOT NULL,
CONNECTED_SLV_ST VARCHAR(32) NOT NULL,
MAST_LNK_STAT DECIMAL(20,4) NOT NULL,
MAST_LNK_STAT_ST VARCHAR(32) NOT NULL,
MAST_LNK_DN_SNC_SEC DECIMAL(20,4) NOT NULL,
MAST_LNK_DN_SNC_SEC_ST VARCHAR(32) NOT NULL,
MAST_LST_IO_SEC_AGO DECIMAL(20,4) NOT NULL,
MAST_LST_IO_SEC_AGO_ST VARCHAR(32) NOT NULL,
MAST_SYNC_IN_PROGS DECIMAL(20,4) NOT NULL,
MAST_SYNC_IN_PROGS_ST VARCHAR(32) NOT NULL,
MAST_SYNC_LFT_BT DECIMAL(20,4) NOT NULL,
MAST_SYNC_LFT_BT_ST VARCHAR(32) NOT NULL,
MAST_REPL_OFST DECIMAL(20,4) NOT NULL,
MAST_REPL_OFST_ST VARCHAR(32) NOT NULL,
SLV_REPL_OFST DECIMAL(20,4) NOT NULL,
SLV_REPL_OFST_ST VARCHAR(32) NOT NULL,
REPL_BAKLOG_ACTIVE DECIMAL(20,4) NOT NULL,
REPL_BAKLOG_ACTIVE_ST VARCHAR(32) NOT NULL,
REPL_BAKLOG_SIZE DECIMAL(20,4) NOT NULL,
REPL_BAKLOG_SIZE_ST VARCHAR(32) NOT NULL,
REPL_BAKLOG_FST_BT_OFST DECIMAL(20,4) NOT NULL,
REPL_BAKLOG_FST_BT_OFST_ST VARCHAR(32) NOT NULL,
REPL_BAKLOG_HISTLEN DECIMAL(20,4) NOT NULL,
REPL_BAKLOG_HISTLEN_ST VARCHAR(32) NOT NULL,
ROLE_CHANGED DECIMAL(20,4) NOT NULL,
ROLE_CHANGED_ST VARCHAR(32) NOT NULL,
REPLICA_LAG DECIMAL(20,4) NOT NULL,
REPLICA_LAG_ST VARCHAR(32) NOT NULL);

CREATE INDEX IDX_RedisClstrReplicaTest ON RedisClstrReplicaTest(MSMT_TIME);
ALTER TABLE RedisClstrReplicaTest ADD CONSTRAINT PK_RedisClstrReplicaTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);

DROP TABLE RedisClstrReplicaTest_TREND;
CREATE TABLE RedisClstrReplicaTest_TREND(
TRGT_HOST VARCHAR(32) NOT NULL,
PORT_NO VARCHAR(32) NOT NULL,
SITE_NAME VARCHAR(64) NOT NULL,
INFO VARCHAR(128) NOT NULL,
MSMT_HOST VARCHAR(32) NOT NULL,
MSMT_TIME datetime NOT NULL,
PERIOD VARCHAR(32) NOT NULL,
ROLE_MIN DECIMAL(20,4) NOT NULL,
ROLE_MAX DECIMAL(20,4) NOT NULL,
ROLE_STCNT VARCHAR(32) NOT NULL,
CONNECTED_SLV_MIN DECIMAL(20,4) NOT NULL,
CONNECTED_SLV_MAX DECIMAL(20,4) NOT NULL,
CONNECTED_SLV_STCNT VARCHAR(32) NOT NULL,
MAST_LNK_STAT_MIN DECIMAL(20,4) NOT NULL,
MAST_LNK_STAT_MAX DECIMAL(20,4) NOT NULL,
MAST_LNK_STAT_STCNT VARCHAR(32) NOT NULL,
MAST_LNK_DN_SNC_SEC_MIN DECIMAL(20,4) NOT NULL,
MAST_LNK_DN_SNC_SEC_MAX DECIMAL(20,4) NOT NULL,
MAST_LNK_DN_SNC_SEC_STCNT VARCHAR(32) NOT NULL,
MAST_LST_IO_SEC_AGO_MIN DECIMAL(20,4) NOT NULL,
MAST_LST_IO_SEC_AGO_MAX DECIMAL(20,4) NOT NULL,
MAST_LST_IO_SEC_AGO_STCNT VARCHAR(32) NOT NULL,
MAST_SYNC_IN_PROGS_MIN DECIMAL(20,4) NOT NULL,
MAST_SYNC_IN_PROGS_MAX DECIMAL(20,4) NOT NULL,
MAST_SYNC_IN_PROGS_STCNT VARCHAR(32) NOT NULL,
MAST_SYNC_LFT_BT_MIN DECIMAL(20,4) NOT NULL,
MAST_SYNC_LFT_BT_MAX DECIMAL(20,4) NOT NULL,
MAST_SYNC_LFT_BT_STCNT VARCHAR(32) NOT NULL,
MAST_REPL_OFST_MIN DECIMAL(20,4) NOT NULL,
MAST_REPL_OFST_MAX DECIMAL(20,4) NOT NULL,
MAST_REPL_OFST_STCNT VARCHAR(32) NOT NULL,
SLV_REPL_OFST_MIN DECIMAL(20,4) NOT NULL,
SLV_REPL_OFST_MAX DECIMAL(20,4) NOT NULL,
SLV_REPL_OFST_STCNT VARCHAR(32) NOT NULL,
REPL_BAKLOG_ACTIVE_MIN DECIMAL(20,4) NOT NULL,
REPL_BAKLOG_ACTIVE_MAX DECIMAL(20,4) NOT NULL,
REPL_BAKLOG_ACTIVE_STCNT VARCHAR(32) NOT NULL,
REPL_BAKLOG_SIZE_MIN DECIMAL(20,4) NOT NULL,
REPL_BAKLOG_SIZE_MAX DECIMAL(20,4) NOT NULL,
REPL_BAKLOG_SIZE_STCNT VARCHAR(32) NOT NULL,
REPL_BAKLOG_FST_BT_OFST_MIN DECIMAL(20,4) NOT NULL,
REPL_BAKLOG_FST_BT_OFST_MAX DECIMAL(20,4) NOT NULL,
REPL_BAKLOG_FST_BT_OFST_STCNT VARCHAR(32) NOT NULL,
REPL_BAKLOG_HISTLEN_MIN DECIMAL(20,4) NOT NULL,
REPL_BAKLOG_HISTLEN_MAX DECIMAL(20,4) NOT NULL,
REPL_BAKLOG_HISTLEN_STCNT VARCHAR(32) NOT NULL,
ROLE_CHANGED_MIN DECIMAL(20,4) NOT NULL,
ROLE_CHANGED_MAX DECIMAL(20,4) NOT NULL,
ROLE_CHANGED_STCNT VARCHAR(32) NOT NULL,
REPLICA_LAG_MIN DECIMAL(20,4) NOT NULL,
REPLICA_LAG_MAX DECIMAL(20,4) NOT NULL,
REPLICA_LAG_STCNT VARCHAR(32) NOT NULL);

ALTER TABLE RedisClstrReplicaTest_TREND ADD CONSTRAINT PK_RedisClstrReplicaTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);

DROP TABLE RedisClstrReplicaTest_THRESH;
CREATE TABLE RedisClstrReplicaTest_THRESH(
TRGT_HOST VARCHAR(32) NOT NULL,
PORT_NO VARCHAR(32) NOT NULL,
SITE_NAME VARCHAR(64) NOT NULL,
INFO VARCHAR(128) NOT NULL,
MSMT_HOST VARCHAR(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END datetime NOT NULL,
ROLE_MIN VARCHAR(256) NOT NULL,
ROLE_MAX VARCHAR(256) NOT NULL,
CONNECTED_SLV_MIN VARCHAR(256) NOT NULL,
CONNECTED_SLV_MAX VARCHAR(256) NOT NULL,
MAST_LNK_STAT_MIN VARCHAR(256) NOT NULL,
MAST_LNK_STAT_MAX VARCHAR(256) NOT NULL,
MAST_LNK_DN_SNC_SEC_MIN VARCHAR(256) NOT NULL,
MAST_LNK_DN_SNC_SEC_MAX VARCHAR(256) NOT NULL,
MAST_LST_IO_SEC_AGO_MIN VARCHAR(256) NOT NULL,
MAST_LST_IO_SEC_AGO_MAX VARCHAR(256) NOT NULL,
MAST_SYNC_IN_PROGS_MIN VARCHAR(256) NOT NULL,
MAST_SYNC_IN_PROGS_MAX VARCHAR(256) NOT NULL,
MAST_SYNC_LFT_BT_MIN VARCHAR(256) NOT NULL,
MAST_SYNC_LFT_BT_MAX VARCHAR(256) NOT NULL,
MAST_REPL_OFST_MIN VARCHAR(256) NOT NULL,
MAST_REPL_OFST_MAX VARCHAR(256) NOT NULL,
SLV_REPL_OFST_MIN VARCHAR(256) NOT NULL,
SLV_REPL_OFST_MAX VARCHAR(256) NOT NULL,
REPL_BAKLOG_ACTIVE_MIN VARCHAR(256) NOT NULL,
REPL_BAKLOG_ACTIVE_MAX VARCHAR(256) NOT NULL,
REPL_BAKLOG_SIZE_MIN VARCHAR(256) NOT NULL,
REPL_BAKLOG_SIZE_MAX VARCHAR(256) NOT NULL,
REPL_BAKLOG_FST_BT_OFST_MIN VARCHAR(256) NOT NULL,
REPL_BAKLOG_FST_BT_OFST_MAX VARCHAR(256) NOT NULL,
REPL_BAKLOG_HISTLEN_MIN VARCHAR(256) NOT NULL,
REPL_BAKLOG_HISTLEN_MAX VARCHAR(256) NOT NULL,
ROLE_CHANGED_MIN VARCHAR(256) NOT NULL,
ROLE_CHANGED_MAX VARCHAR(256) NOT NULL,
REPLICA_LAG_MIN VARCHAR(256) NOT NULL,
REPLICA_LAG_MAX VARCHAR(256) NOT NULL);

ALTER TABLE RedisClstrReplicaTest_THRESH ADD CONSTRAINT PK_RedClstReplicaTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_RedClstReplicaTest_THRESH ON RedisClstrReplicaTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_RedisClstrReplicaTest ON RedisClstrReplicaTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_RedisClstrReplicaTest ON RedisClstrReplicaTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE RedisClsNdeStTest;
CREATE TABLE RedisClsNdeStTest(
TRGT_HOST VARCHAR(32) NOT NULL,
PORT_NO VARCHAR(32) NOT NULL,
SITE_NAME VARCHAR(64) NOT NULL,
INFO VARCHAR(128) NOT NULL,
MSMT_HOST VARCHAR(32) NOT NULL,
MSMT_TIME datetime NOT NULL,
SERVER_STATUS DECIMAL(20,4) NOT NULL,
SERVER_STATUS_ST VARCHAR(32) NOT NULL,
PING_STATUS DECIMAL(20,4) NOT NULL,
PING_STATUS_ST VARCHAR(32) NOT NULL);

CREATE INDEX IDX_RedisClsNdeStTest ON RedisClsNdeStTest(MSMT_TIME);
ALTER TABLE RedisClsNdeStTest ADD CONSTRAINT PK_RedisClsNdeStTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);

DROP TABLE RedisClsNdeStTest_TREND;
CREATE TABLE RedisClsNdeStTest_TREND(
TRGT_HOST VARCHAR(32) NOT NULL,
PORT_NO VARCHAR(32) NOT NULL,
SITE_NAME VARCHAR(64) NOT NULL,
INFO VARCHAR(128) NOT NULL,
MSMT_HOST VARCHAR(32) NOT NULL,
MSMT_TIME datetime NOT NULL,
PERIOD VARCHAR(32) NOT NULL,
SERVER_STATUS_MIN DECIMAL(20,4) NOT NULL,
SERVER_STATUS_MAX DECIMAL(20,4) NOT NULL,
SERVER_STATUS_STCNT VARCHAR(32) NOT NULL,
PING_STATUS_MIN DECIMAL(20,4) NOT NULL,
PING_STATUS_MAX DECIMAL(20,4) NOT NULL,
PING_STATUS_STCNT VARCHAR(32) NOT NULL);

ALTER TABLE RedisClsNdeStTest_TREND ADD CONSTRAINT PK_RedisClsNdeStTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);

DROP TABLE RedisClsNdeStTest_THRESH;
CREATE TABLE RedisClsNdeStTest_THRESH(
TRGT_HOST VARCHAR(32) NOT NULL,
PORT_NO VARCHAR(32) NOT NULL,
SITE_NAME VARCHAR(64) NOT NULL,
INFO VARCHAR(128) NOT NULL,
MSMT_HOST VARCHAR(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END datetime NOT NULL,
SERVER_STATUS_MIN VARCHAR(256) NOT NULL,
SERVER_STATUS_MAX VARCHAR(256) NOT NULL,
PING_STATUS_MIN VARCHAR(256) NOT NULL,
PING_STATUS_MAX VARCHAR(256) NOT NULL);

ALTER TABLE RedisClsNdeStTest_THRESH ADD CONSTRAINT PK_RedisClsNdeStTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_RedisClsNdeStTest_THRESH ON RedisClsNdeStTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_RedisClsNdeStTest ON RedisClsNdeStTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_RedisClsNdeStTest ON RedisClsNdeStTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE RedisClstrFailoverTest;
CREATE TABLE RedisClstrFailoverTest(
TRGT_HOST VARCHAR(32) NOT NULL,
PORT_NO VARCHAR(32) NOT NULL,
SITE_NAME VARCHAR(64) NOT NULL,
INFO VARCHAR(128) NOT NULL,
MSMT_HOST VARCHAR(32) NOT NULL,
MSMT_TIME datetime NOT NULL,
FAILOVER_HAPPENED DECIMAL(20,4) NOT NULL,
FAILOVER_HAPPENED_ST VARCHAR(32) NOT NULL);

CREATE INDEX IDX_RedisClstrFailoverTest ON RedisClstrFailoverTest(MSMT_TIME);
ALTER TABLE RedisClstrFailoverTest ADD constraint PK_RedisClstrFailoverTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);

DROP TABLE RedisClstrFailoverTest_TREND;
CREATE TABLE RedisClstrFailoverTest_TREND(
TRGT_HOST VARCHAR(32) NOT NULL,
PORT_NO VARCHAR(32) NOT NULL,
SITE_NAME VARCHAR(64) NOT NULL,
INFO VARCHAR(128) NOT NULL,
MSMT_HOST VARCHAR(32) NOT NULL,
MSMT_TIME datetime NOT NULL,
PERIOD VARCHAR(32) NOT NULL,
FAILOVER_HAPPENED_MIN DECIMAL(20,4) NOT NULL,
FAILOVER_HAPPENED_MAX DECIMAL(20,4) NOT NULL,
FAILOVER_HAPPENED_STCNT VARCHAR(32) NOT NULL);

ALTER TABLE RedisClstrFailoverTest_TREND ADD constraint PK_RedClstFailoverTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);

DROP TABLE RedisClstrFailoverTest_THRESH;
CREATE TABLE RedisClstrFailoverTest_THRESH(
TRGT_HOST VARCHAR(32) NOT NULL,
PORT_NO VARCHAR(32) NOT NULL,
SITE_NAME VARCHAR(64) NOT NULL,
INFO VARCHAR(128) NOT NULL,
MSMT_HOST VARCHAR(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END datetime NOT NULL,
FAILOVER_HAPPENED_MIN VARCHAR(256) NOT NULL,
FAILOVER_HAPPENED_MAX VARCHAR(256) NOT NULL);

ALTER TABLE RedisClstrFailoverTest_THRESH ADD constraint PK_RedClstFailoverTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_RedClstFiloverTest_THRESH ON RedisClstrFailoverTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_RedisClstrFailoverTest ON RedisClstrFailoverTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_RedisClstrFailoverTest ON RedisClstrFailoverTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE FSLogixLogonTest;
CREATE TABLE FSLogixLogonTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
ATTACH_STATUS DECIMAL(20,4) NOT NULL,
ATTACH_STATUS_ST varchar(32) NOT NULL,
ATTACH_REASON DECIMAL(20,4) NOT NULL,
ATTACH_REASON_ST varchar(32) NOT NULL,
LOGON_DURATION DECIMAL(20,4) NOT NULL,
LOGON_DURATION_ST varchar(32) NOT NULL,
LOGON_NOTIFY_DURATION DECIMAL(20,4) NOT NULL,
LOGON_NOTIFY_DURATION_ST varchar(32) NOT NULL,
TOTAL_DISK_SIZE DECIMAL(20,4) NOT NULL,
TOTAL_DISK_SIZE_ST varchar(32) NOT NULL,
FREE_DISK_SIZE DECIMAL(20,4) NOT NULL,
FREE_DISK_SIZE_ST varchar(32) NOT NULL,
USED_DISK_SIZE DECIMAL(20,4) NOT NULL,
USED_DISK_SIZE_ST varchar(32) NOT NULL,
USAGE_OF_DISK DECIMAL(20,4) NOT NULL,
USAGE_OF_DISK_ST varchar(32) NOT NULL,
IS_CONTAINER_ENABLED DECIMAL(20,4) NOT NULL,
IS_CONTAINER_ENABLED_ST varchar(32) NOT NULL,
IS_FSLOGIX_SVC_RUNNING DECIMAL(20,4) NOT NULL,
IS_FSLOGIX_SVC_RUNNING_ST varchar(32) NOT NULL,
PROFILE_TYPE DECIMAL(20,4) NOT NULL,
PROFILE_TYPE_ST varchar(32) NOT NULL,
IS_DYNAMIC DECIMAL(20,4) NOT NULL,
IS_DYNAMIC_ST varchar(32) NOT NULL,
IS_ALLOW_CONCURRENT_USR DECIMAL(20,4) NOT NULL,
IS_ALLOW_CONCURRENT_USR_ST varchar(32) NOT NULL,
IS_CLOUD_CACHE_CONNECTED DECIMAL(20,4) NOT NULL,
IS_CLOUD_CACHE_CONNECTED_ST varchar(32) NOT NULL);

CREATE INDEX IDX_FSLogixLogonTest ON FSLogixLogonTest(MSMT_TIME);
ALTER TABLE FSLogixLogonTest ADD constraint PK_FSLogixLogonTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE FSLogixLogonTest_TREND;
CREATE TABLE FSLogixLogonTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
ATTACH_STATUS_MIN DECIMAL(20,4) NOT NULL,
ATTACH_STATUS_MAX DECIMAL(20,4) NOT NULL,
ATTACH_STATUS_STCNT varchar(32) NOT NULL,
ATTACH_REASON_MIN DECIMAL(20,4) NOT NULL,
ATTACH_REASON_MAX DECIMAL(20,4) NOT NULL,
ATTACH_REASON_STCNT varchar(32) NOT NULL,
LOGON_DURATION_MIN DECIMAL(20,4) NOT NULL,
LOGON_DURATION_MAX DECIMAL(20,4) NOT NULL,
LOGON_DURATION_STCNT varchar(32) NOT NULL,
LOGON_NOTIFY_DURATION_MIN DECIMAL(20,4) NOT NULL,
LOGON_NOTIFY_DURATION_MAX DECIMAL(20,4) NOT NULL,
LOGON_NOTIFY_DURATION_STCNT varchar(32) NOT NULL,
TOTAL_DISK_SIZE_MIN DECIMAL(20,4) NOT NULL,
TOTAL_DISK_SIZE_MAX DECIMAL(20,4) NOT NULL,
TOTAL_DISK_SIZE_STCNT varchar(32) NOT NULL,
FREE_DISK_SIZE_MIN DECIMAL(20,4) NOT NULL,
FREE_DISK_SIZE_MAX DECIMAL(20,4) NOT NULL,
FREE_DISK_SIZE_STCNT varchar(32) NOT NULL,
USED_DISK_SIZE_MIN DECIMAL(20,4) NOT NULL,
USED_DISK_SIZE_MAX DECIMAL(20,4) NOT NULL,
USED_DISK_SIZE_STCNT varchar(32) NOT NULL,
USAGE_OF_DISK_MIN DECIMAL(20,4) NOT NULL,
USAGE_OF_DISK_MAX DECIMAL(20,4) NOT NULL,
USAGE_OF_DISK_STCNT varchar(32) NOT NULL,
IS_CONTAINER_ENABLED_MIN DECIMAL(20,4) NOT NULL,
IS_CONTAINER_ENABLED_MAX DECIMAL(20,4) NOT NULL,
IS_CONTAINER_ENABLED_STCNT varchar(32) NOT NULL,
IS_FSLOGIX_SVC_RUNNING_MIN DECIMAL(20,4) NOT NULL,
IS_FSLOGIX_SVC_RUNNING_MAX DECIMAL(20,4) NOT NULL,
IS_FSLOGIX_SVC_RUNNING_STCNT varchar(32) NOT NULL,
PROFILE_TYPE_MIN DECIMAL(20,4) NOT NULL,
PROFILE_TYPE_MAX DECIMAL(20,4) NOT NULL,
PROFILE_TYPE_STCNT varchar(32) NOT NULL,
IS_DYNAMIC_MIN DECIMAL(20,4) NOT NULL,
IS_DYNAMIC_MAX DECIMAL(20,4) NOT NULL,
IS_DYNAMIC_STCNT varchar(32) NOT NULL,
IS_ALLOW_CONCURRENT_USR_MIN DECIMAL(20,4) NOT NULL,
IS_ALLOW_CONCURRENT_USR_MAX DECIMAL(20,4) NOT NULL,
IS_ALLOW_CONCURRENT_USR_STCNT varchar(32) NOT NULL,
IS_CLOUD_CACHE_CONNECTED_MIN	DECIMAL(20,4) NOT NULL,
IS_CLOUD_CACHE_CONNECTED_MAX	DECIMAL(20,4) NOT NULL,
IS_CLOUD_CACHE_CONNECTED_STCNT	varchar(32) NOT NULL);

ALTER TABLE FSLogixLogonTest_TREND ADD constraint PK_FSLogixLogonTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE FSLogixLogonTest_THRESH;
CREATE TABLE FSLogixLogonTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
ATTACH_STATUS_MIN VARCHAR(256) NOT NULL,
ATTACH_STATUS_MAX VARCHAR(256) NOT NULL,
ATTACH_REASON_MIN VARCHAR(256) NOT NULL,
ATTACH_REASON_MAX VARCHAR(256) NOT NULL,
LOGON_DURATION_MIN VARCHAR(256) NOT NULL,
LOGON_DURATION_MAX VARCHAR(256) NOT NULL,
LOGON_NOTIFY_DURATION_MIN VARCHAR(256) NOT NULL,
LOGON_NOTIFY_DURATION_MAX VARCHAR(256) NOT NULL,
TOTAL_DISK_SIZE_MIN VARCHAR(256) NOT NULL,
TOTAL_DISK_SIZE_MAX VARCHAR(256) NOT NULL,
FREE_DISK_SIZE_MIN VARCHAR(256) NOT NULL,
FREE_DISK_SIZE_MAX VARCHAR(256) NOT NULL,
USED_DISK_SIZE_MIN VARCHAR(256) NOT NULL,
USED_DISK_SIZE_MAX VARCHAR(256) NOT NULL,
USAGE_OF_DISK_MIN VARCHAR(256) NOT NULL,
USAGE_OF_DISK_MAX VARCHAR(256) NOT NULL,
IS_CONTAINER_ENABLED_MIN VARCHAR(256) NOT NULL,
IS_CONTAINER_ENABLED_MAX VARCHAR(256) NOT NULL,
IS_FSLOGIX_SVC_RUNNING_MIN VARCHAR(256) NOT NULL,
IS_FSLOGIX_SVC_RUNNING_MAX VARCHAR(256) NOT NULL,
PROFILE_TYPE_MIN VARCHAR(256) NOT NULL,
PROFILE_TYPE_MAX VARCHAR(256) NOT NULL,
IS_DYNAMIC_MIN VARCHAR(256) NOT NULL,
IS_DYNAMIC_MAX VARCHAR(256) NOT NULL,
IS_ALLOW_CONCURRENT_USR_MIN VARCHAR(256) NOT NULL,
IS_ALLOW_CONCURRENT_USR_MAX VARCHAR(256) NOT NULL,
IS_CLOUD_CACHE_CONNECTED_MIN	VARCHAR(256) NOT NULL,
IS_CLOUD_CACHE_CONNECTED_MAX	VARCHAR(256) NOT NULL);

ALTER TABLE FSLogixLogonTest_THRESH ADD constraint PK_FSLogixLogonTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_FSLogixLogonTest_THRESH ON FSLogixLogonTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_FSLogixLogonTest ON FSLogixLogonTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_FSLogixLogonTest ON FSLogixLogonTest_TREND (MSMT_TIME,PERIOD);


DROP TABLE WVDFSLogixLogonTest;
CREATE TABLE WVDFSLogixLogonTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
ATTACH_STATUS DECIMAL(20,4) NOT NULL,
ATTACH_STATUS_ST varchar(32) NOT NULL,
ATTACH_REASON DECIMAL(20,4) NOT NULL,
ATTACH_REASON_ST varchar(32) NOT NULL,
LOGON_DURATION DECIMAL(20,4) NOT NULL,
LOGON_DURATION_ST varchar(32) NOT NULL,
LOGON_NOTIFY_DURATION DECIMAL(20,4) NOT NULL,
LOGON_NOTIFY_DURATION_ST varchar(32) NOT NULL,
TOTAL_DISK_SIZE DECIMAL(20,4) NOT NULL,
TOTAL_DISK_SIZE_ST varchar(32) NOT NULL,
FREE_DISK_SIZE DECIMAL(20,4) NOT NULL,
FREE_DISK_SIZE_ST varchar(32) NOT NULL,
USED_DISK_SIZE DECIMAL(20,4) NOT NULL,
USED_DISK_SIZE_ST varchar(32) NOT NULL,
USAGE_OF_DISK DECIMAL(20,4) NOT NULL,
USAGE_OF_DISK_ST varchar(32) NOT NULL,
IS_CONTAINER_ENABLED DECIMAL(20,4) NOT NULL,
IS_CONTAINER_ENABLED_ST varchar(32) NOT NULL,
IS_FSLOGIX_SVC_RUNNING DECIMAL(20,4) NOT NULL,
IS_FSLOGIX_SVC_RUNNING_ST varchar(32) NOT NULL,
PROFILE_TYPE DECIMAL(20,4) NOT NULL,
PROFILE_TYPE_ST varchar(32) NOT NULL,
IS_DYNAMIC DECIMAL(20,4) NOT NULL,
IS_DYNAMIC_ST varchar(32) NOT NULL,
IS_ALLOW_CONCURRENT_USR DECIMAL(20,4) NOT NULL,
IS_ALLOW_CONCURRENT_USR_ST varchar(32) NOT NULL,
IS_CLOUD_CACHE_CONNECTED DECIMAL(20,4) NOT NULL,
IS_CLOUD_CACHE_CONNECTED_ST varchar(32) NOT NULL);

CREATE INDEX IDX_WVDFSLogixLogonTest ON WVDFSLogixLogonTest(MSMT_TIME);
ALTER TABLE WVDFSLogixLogonTest ADD constraint PK_WVDFSLogixLogonTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE WVDFSLogixLogonTest_TREND;
CREATE TABLE WVDFSLogixLogonTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
ATTACH_STATUS_MIN DECIMAL(20,4) NOT NULL,
ATTACH_STATUS_MAX DECIMAL(20,4) NOT NULL,
ATTACH_STATUS_STCNT varchar(32) NOT NULL,
ATTACH_REASON_MIN DECIMAL(20,4) NOT NULL,
ATTACH_REASON_MAX DECIMAL(20,4) NOT NULL,
ATTACH_REASON_STCNT varchar(32) NOT NULL,
LOGON_DURATION_MIN DECIMAL(20,4) NOT NULL,
LOGON_DURATION_MAX DECIMAL(20,4) NOT NULL,
LOGON_DURATION_STCNT varchar(32) NOT NULL,
LOGON_NOTIFY_DURATION_MIN DECIMAL(20,4) NOT NULL,
LOGON_NOTIFY_DURATION_MAX DECIMAL(20,4) NOT NULL,
LOGON_NOTIFY_DURATION_STCNT varchar(32) NOT NULL,
TOTAL_DISK_SIZE_MIN DECIMAL(20,4) NOT NULL,
TOTAL_DISK_SIZE_MAX DECIMAL(20,4) NOT NULL,
TOTAL_DISK_SIZE_STCNT varchar(32) NOT NULL,
FREE_DISK_SIZE_MIN DECIMAL(20,4) NOT NULL,
FREE_DISK_SIZE_MAX DECIMAL(20,4) NOT NULL,
FREE_DISK_SIZE_STCNT varchar(32) NOT NULL,
USED_DISK_SIZE_MIN DECIMAL(20,4) NOT NULL,
USED_DISK_SIZE_MAX DECIMAL(20,4) NOT NULL,
USED_DISK_SIZE_STCNT varchar(32) NOT NULL,
USAGE_OF_DISK_MIN DECIMAL(20,4) NOT NULL,
USAGE_OF_DISK_MAX DECIMAL(20,4) NOT NULL,
USAGE_OF_DISK_STCNT varchar(32) NOT NULL,
IS_CONTAINER_ENABLED_MIN DECIMAL(20,4) NOT NULL,
IS_CONTAINER_ENABLED_MAX DECIMAL(20,4) NOT NULL,
IS_CONTAINER_ENABLED_STCNT varchar(32) NOT NULL,
IS_FSLOGIX_SVC_RUNNING_MIN DECIMAL(20,4) NOT NULL,
IS_FSLOGIX_SVC_RUNNING_MAX DECIMAL(20,4) NOT NULL,
IS_FSLOGIX_SVC_RUNNING_STCNT varchar(32) NOT NULL,
PROFILE_TYPE_MIN DECIMAL(20,4) NOT NULL,
PROFILE_TYPE_MAX DECIMAL(20,4) NOT NULL,
PROFILE_TYPE_STCNT varchar(32) NOT NULL,
IS_DYNAMIC_MIN DECIMAL(20,4) NOT NULL,
IS_DYNAMIC_MAX DECIMAL(20,4) NOT NULL,
IS_DYNAMIC_STCNT varchar(32) NOT NULL,
IS_ALLOW_CONCURRENT_USR_MIN DECIMAL(20,4) NOT NULL,
IS_ALLOW_CONCURRENT_USR_MAX DECIMAL(20,4) NOT NULL,
IS_ALLOW_CONCURRENT_USR_STCNT varchar(32) NOT NULL,
IS_CLOUD_CACHE_CONNECTED_MIN	DECIMAL(20,4) NOT NULL,
IS_CLOUD_CACHE_CONNECTED_MAX	DECIMAL(20,4) NOT NULL,
IS_CLOUD_CACHE_CONNECTED_STCNT	varchar(32) NOT NULL);

ALTER TABLE WVDFSLogixLogonTest_TREND ADD constraint PK_WVDFSLogixLogonTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE WVDFSLogixLogonTest_THRESH;
CREATE TABLE WVDFSLogixLogonTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
ATTACH_STATUS_MIN VARCHAR(256) NOT NULL,
ATTACH_STATUS_MAX VARCHAR(256) NOT NULL,
ATTACH_REASON_MIN VARCHAR(256) NOT NULL,
ATTACH_REASON_MAX VARCHAR(256) NOT NULL,
LOGON_DURATION_MIN VARCHAR(256) NOT NULL,
LOGON_DURATION_MAX VARCHAR(256) NOT NULL,
LOGON_NOTIFY_DURATION_MIN VARCHAR(256) NOT NULL,
LOGON_NOTIFY_DURATION_MAX VARCHAR(256) NOT NULL,
TOTAL_DISK_SIZE_MIN VARCHAR(256) NOT NULL,
TOTAL_DISK_SIZE_MAX VARCHAR(256) NOT NULL,
FREE_DISK_SIZE_MIN VARCHAR(256) NOT NULL,
FREE_DISK_SIZE_MAX VARCHAR(256) NOT NULL,
USED_DISK_SIZE_MIN VARCHAR(256) NOT NULL,
USED_DISK_SIZE_MAX VARCHAR(256) NOT NULL,
USAGE_OF_DISK_MIN VARCHAR(256) NOT NULL,
USAGE_OF_DISK_MAX VARCHAR(256) NOT NULL,
IS_CONTAINER_ENABLED_MIN VARCHAR(256) NOT NULL,
IS_CONTAINER_ENABLED_MAX VARCHAR(256) NOT NULL,
IS_FSLOGIX_SVC_RUNNING_MIN VARCHAR(256) NOT NULL,
IS_FSLOGIX_SVC_RUNNING_MAX VARCHAR(256) NOT NULL,
PROFILE_TYPE_MIN VARCHAR(256) NOT NULL,
PROFILE_TYPE_MAX VARCHAR(256) NOT NULL,
IS_DYNAMIC_MIN VARCHAR(256) NOT NULL,
IS_DYNAMIC_MAX VARCHAR(256) NOT NULL,
IS_ALLOW_CONCURRENT_USR_MIN VARCHAR(256) NOT NULL,
IS_ALLOW_CONCURRENT_USR_MAX VARCHAR(256) NOT NULL,
IS_CLOUD_CACHE_CONNECTED_MIN	VARCHAR(256) NOT NULL,
IS_CLOUD_CACHE_CONNECTED_MAX	VARCHAR(256) NOT NULL);

ALTER TABLE WVDFSLogixLogonTest_THRESH ADD constraint PK_WVDFSLogixLogonTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_WVDFSLogixLogonTest_THRESH ON WVDFSLogixLogonTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_WVDFSLogixLogonTest ON WVDFSLogixLogonTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_WVDFSLogixLogonTest ON WVDFSLogixLogonTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE VmgFSLogixTest;
CREATE TABLE VmgFSLogixTest(
TRGT_HOST			varchar(32) NOT NULL,
PORT_NO				varchar(32) NOT NULL,
SITE_NAME			varchar(64) NOT NULL,
INFO				varchar(128) NOT NULL,
MSMT_HOST			varchar(32) NOT NULL,
MSMT_TIME			datetime NOT NULL,
ATTACH_STATUS			DECIMAL(20,4) NOT NULL,
ATTACH_STATUS_ST		varchar(32) NOT NULL,
ATTACH_REASON			DECIMAL(20,4) NOT NULL,
ATTACH_REASON_ST		varchar(32) NOT NULL,
LOGON_DURATION			DECIMAL(20,4) NOT NULL,
LOGON_DURATION_ST		varchar(32) NOT NULL,
LOGON_NOTIFY_DURATION		DECIMAL(20,4) NOT NULL,
LOGON_NOTIFY_DURATION_ST	varchar(32) NOT NULL,
TOTAL_DISK_SIZE			DECIMAL(20,4) NOT NULL,
TOTAL_DISK_SIZE_ST		varchar(32) NOT NULL,
FREE_DISK_SIZE			DECIMAL(20,4) NOT NULL,
FREE_DISK_SIZE_ST		varchar(32) NOT NULL,
USED_DISK_SIZE			DECIMAL(20,4) NOT NULL,
USED_DISK_SIZE_ST		varchar(32) NOT NULL,
USAGE_OF_DISK			DECIMAL(20,4) NOT NULL,
USAGE_OF_DISK_ST		varchar(32) NOT NULL,
IS_CONTAINER_ENABLED		DECIMAL(20,4) NOT NULL,
IS_CONTAINER_ENABLED_ST		varchar(32) NOT NULL,
IS_FSLOGIX_SVC_RUNNING		DECIMAL(20,4) NOT NULL,
IS_FSLOGIX_SVC_RUNNING_ST	varchar(32) NOT NULL,
PROFILE_TYPE			DECIMAL(20,4) NOT NULL,
PROFILE_TYPE_ST			varchar(32) NOT NULL,
IS_DYNAMIC			DECIMAL(20,4) NOT NULL,
IS_DYNAMIC_ST			varchar(32) NOT NULL,
IS_ALLOW_CONCURRENT_USR		DECIMAL(20,4) NOT NULL,
IS_ALLOW_CONCURRENT_USR_ST	varchar(32) NOT NULL,
IS_CLOUD_CACHE_CONNECTED		DECIMAL(20,4) NOT NULL,
IS_CLOUD_CACHE_CONNECTED_ST	varchar(32) NOT NULL);

CREATE INDEX IDX_VmgFSLogixTest ON VmgFSLogixTest(MSMT_TIME);
ALTER TABLE VmgFSLogixTest ADD constraint PK_VmgFSLogixTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE VmgFSLogixTest_TREND;
CREATE TABLE VmgFSLogixTest_TREND(
TRGT_HOST			varchar(32) NOT NULL,
PORT_NO				varchar(32) NOT NULL,
SITE_NAME			varchar(64) NOT NULL,
INFO				varchar(128) NOT NULL,
MSMT_HOST			varchar(32) NOT NULL,
MSMT_TIME			datetime NOT NULL,
PERIOD       			varchar(32) NOT NULL,
ATTACH_STATUS_MIN		DECIMAL(20,4) NOT NULL,
ATTACH_STATUS_MAX		DECIMAL(20,4) NOT NULL,
ATTACH_STATUS_STCNT		varchar(32) NOT NULL,
ATTACH_REASON_MIN		DECIMAL(20,4) NOT NULL,
ATTACH_REASON_MAX		DECIMAL(20,4) NOT NULL,
ATTACH_REASON_STCNT		varchar(32) NOT NULL,
LOGON_DURATION_MIN		DECIMAL(20,4) NOT NULL,
LOGON_DURATION_MAX		DECIMAL(20,4) NOT NULL,
LOGON_DURATION_STCNT		varchar(32) NOT NULL,
LOGON_NOTIFY_DURATION_MIN	DECIMAL(20,4) NOT NULL,
LOGON_NOTIFY_DURATION_MAX	DECIMAL(20,4) NOT NULL,
LOGON_NOTIFY_DURATION_STCNT	varchar(32) NOT NULL,
TOTAL_DISK_SIZE_MIN		DECIMAL(20,4) NOT NULL,
TOTAL_DISK_SIZE_MAX		DECIMAL(20,4) NOT NULL,
TOTAL_DISK_SIZE_STCNT		varchar(32) NOT NULL,
FREE_DISK_SIZE_MIN		DECIMAL(20,4) NOT NULL,
FREE_DISK_SIZE_MAX		DECIMAL(20,4) NOT NULL,
FREE_DISK_SIZE_STCNT		varchar(32) NOT NULL,
USED_DISK_SIZE_MIN		DECIMAL(20,4) NOT NULL,
USED_DISK_SIZE_MAX		DECIMAL(20,4) NOT NULL,
USED_DISK_SIZE_STCNT		varchar(32) NOT NULL,
USAGE_OF_DISK_MIN		DECIMAL(20,4) NOT NULL,
USAGE_OF_DISK_MAX		DECIMAL(20,4) NOT NULL,
USAGE_OF_DISK_STCNT		varchar(32) NOT NULL,
IS_CONTAINER_ENABLED_MIN	DECIMAL(20,4) NOT NULL,
IS_CONTAINER_ENABLED_MAX	DECIMAL(20,4) NOT NULL,
IS_CONTAINER_ENABLED_STCNT	varchar(32) NOT NULL,
IS_FSLOGIX_SVC_RUNNING_MIN	DECIMAL(20,4) NOT NULL,
IS_FSLOGIX_SVC_RUNNING_MAX	DECIMAL(20,4) NOT NULL,
IS_FSLOGIX_SVC_RUNNING_STCNT	varchar(32) NOT NULL,
PROFILE_TYPE_MIN		DECIMAL(20,4) NOT NULL,
PROFILE_TYPE_MAX		DECIMAL(20,4) NOT NULL,
PROFILE_TYPE_STCNT		varchar(32) NOT NULL,
IS_DYNAMIC_MIN			DECIMAL(20,4) NOT NULL,
IS_DYNAMIC_MAX			DECIMAL(20,4) NOT NULL,
IS_DYNAMIC_STCNT		varchar(32) NOT NULL,
IS_ALLOW_CONCURRENT_USR_MIN	DECIMAL(20,4) NOT NULL,
IS_ALLOW_CONCURRENT_USR_MAX	DECIMAL(20,4) NOT NULL,
IS_ALLOW_CONCURRENT_USR_STCNT	varchar(32) NOT NULL,
IS_CLOUD_CACHE_CONNECTED_MIN	DECIMAL(20,4) NOT NULL,
IS_CLOUD_CACHE_CONNECTED_MAX	DECIMAL(20,4) NOT NULL,
IS_CLOUD_CACHE_CONNECTED_STCNT	varchar(32) NOT NULL);

ALTER TABLE VmgFSLogixTest_TREND ADD constraint PK_VmgFSLogixTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE VmgFSLogixTest_THRESH;
CREATE TABLE VmgFSLogixTest_THRESH(
TRGT_HOST			varchar(32) NOT NULL,
PORT_NO				varchar(32) NOT NULL,
SITE_NAME			varchar(64) NOT NULL,
INFO				varchar(128) NOT NULL,
MSMT_HOST			varchar(32) NOT NULL,
MSMT_TIME_START			datetime NOT NULL,
MSMT_TIME_END			datetime NOT NULL,
ATTACH_STATUS_MIN		VARCHAR(256) NOT NULL,
ATTACH_STATUS_MAX		VARCHAR(256) NOT NULL,
ATTACH_REASON_MIN		VARCHAR(256) NOT NULL,
ATTACH_REASON_MAX		VARCHAR(256) NOT NULL,
LOGON_DURATION_MIN		VARCHAR(256) NOT NULL,
LOGON_DURATION_MAX		VARCHAR(256) NOT NULL,
LOGON_NOTIFY_DURATION_MIN	VARCHAR(256) NOT NULL,
LOGON_NOTIFY_DURATION_MAX	VARCHAR(256) NOT NULL,
TOTAL_DISK_SIZE_MIN		VARCHAR(256) NOT NULL,
TOTAL_DISK_SIZE_MAX		VARCHAR(256) NOT NULL,
FREE_DISK_SIZE_MIN		VARCHAR(256) NOT NULL,
FREE_DISK_SIZE_MAX		VARCHAR(256) NOT NULL,
USED_DISK_SIZE_MIN		VARCHAR(256) NOT NULL,
USED_DISK_SIZE_MAX		VARCHAR(256) NOT NULL,
USAGE_OF_DISK_MIN		VARCHAR(256) NOT NULL,
USAGE_OF_DISK_MAX		VARCHAR(256) NOT NULL,
IS_CONTAINER_ENABLED_MIN	VARCHAR(256) NOT NULL,
IS_CONTAINER_ENABLED_MAX	VARCHAR(256) NOT NULL,
IS_FSLOGIX_SVC_RUNNING_MIN	VARCHAR(256) NOT NULL,
IS_FSLOGIX_SVC_RUNNING_MAX	VARCHAR(256) NOT NULL,
PROFILE_TYPE_MIN		VARCHAR(256) NOT NULL,
PROFILE_TYPE_MAX		VARCHAR(256) NOT NULL,
IS_DYNAMIC_MIN			VARCHAR(256) NOT NULL,
IS_DYNAMIC_MAX			VARCHAR(256) NOT NULL,
IS_ALLOW_CONCURRENT_USR_MIN	VARCHAR(256) NOT NULL,
IS_ALLOW_CONCURRENT_USR_MAX	VARCHAR(256) NOT NULL,
IS_CLOUD_CACHE_CONNECTED_MIN	VARCHAR(256) NOT NULL,
IS_CLOUD_CACHE_CONNECTED_MAX	VARCHAR(256) NOT NULL);

ALTER TABLE VmgFSLogixTest_THRESH ADD constraint PK_VmgFSLogixTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_VmgFSLogixTest_THRESH ON VmgFSLogixTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_VmgFSLogixTest ON VmgFSLogixTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_VmgFSLogixTest ON VmgFSLogixTest_TREND (MSMT_TIME,PERIOD);


DROP TABLE AzrIntCertTest;
CREATE TABLE AzrIntCertTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
certStatus DECIMAL(20,4) NOT NULL,
certStatus_ST varchar(32) NOT NULL,
differenceDates DECIMAL(20,4) NOT NULL,
differenceDates_ST varchar(32) NOT NULL);

CREATE INDEX IDX_AzrIntCertTest ON AzrIntCertTest(MSMT_TIME);
ALTER TABLE AzrIntCertTest ADD constraint PK_AzrIntCertTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE AzrIntCertTest_TREND;
CREATE TABLE AzrIntCertTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
certStatus_MIN DECIMAL(20,4) NOT NULL,
certStatus_MAX DECIMAL(20,4) NOT NULL,
certStatus_STCNT varchar(32) NOT NULL,
differenceDates_MIN DECIMAL(20,4) NOT NULL,
differenceDates_MAX DECIMAL(20,4) NOT NULL,
differenceDates_STCNT varchar(32) NOT NULL);

ALTER TABLE AzrIntCertTest_TREND ADD constraint PK_AzrIntCertTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE AzrIntCertTest_THRESH;
CREATE TABLE AzrIntCertTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
certStatus_MIN VARCHAR(256) NOT NULL,
certStatus_MAX VARCHAR(256) NOT NULL,
differenceDates_MIN VARCHAR(256) NOT NULL,
differenceDates_MAX VARCHAR(256) NOT NULL);

ALTER TABLE AzrIntCertTest_THRESH ADD constraint PK_AzrIntCertTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_AzrIntCertTest_THRESH ON AzrIntCertTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_AzrIntCertTest ON AzrIntCertTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_AzrIntCertTest ON AzrIntCertTest_TREND (MSMT_TIME,PERIOD);



DROP TABLE AzrIntConnTest;
CREATE TABLE AzrIntConnTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
status DECIMAL(20,4) NOT NULL,
status_ST varchar(32) NOT NULL);

CREATE INDEX IDX_AzrIntConnTest ON AzrIntConnTest(MSMT_TIME);
ALTER TABLE AzrIntConnTest ADD constraint PK_AzrIntConnTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE AzrIntConnTest_TREND;
CREATE TABLE AzrIntConnTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
status_MIN DECIMAL(20,4) NOT NULL,
status_MAX DECIMAL(20,4) NOT NULL,
status_STCNT varchar(32) NOT NULL);

ALTER TABLE AzrIntConnTest_TREND ADD constraint PK_AzrIntConnTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE AzrIntConnTest_THRESH;
CREATE TABLE AzrIntConnTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
status_MIN VARCHAR(256) NOT NULL,
status_MAX VARCHAR(256) NOT NULL);

ALTER TABLE AzrIntConnTest_THRESH ADD constraint PK_AzrIntConnTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_AzrIntConnTest_THRESH ON AzrIntConnTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_AzrIntConnTest ON AzrIntConnTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_AzrIntConnTest ON AzrIntConnTest_TREND (MSMT_TIME,PERIOD);


DROP TABLE AzrIntApCertTest;
CREATE TABLE AzrIntApCertTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
certStatus DECIMAL(20,4) NOT NULL,
certStatus_ST varchar(32) NOT NULL,
differenceDates DECIMAL(20,4) NOT NULL,
differenceDates_ST varchar(32) NOT NULL);

CREATE INDEX IDX_AzrIntApCertTest ON AzrIntApCertTest(MSMT_TIME);
ALTER TABLE AzrIntApCertTest ADD constraint PK_AzrIntApCertTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE AzrIntApCertTest_TREND;
CREATE TABLE AzrIntApCertTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
certStatus_MIN DECIMAL(20,4) NOT NULL,
certStatus_MAX DECIMAL(20,4) NOT NULL,
certStatus_STCNT varchar(32) NOT NULL,
differenceDates_MIN DECIMAL(20,4) NOT NULL,
differenceDates_MAX DECIMAL(20,4) NOT NULL,
differenceDates_STCNT varchar(32) NOT NULL);

ALTER TABLE AzrIntApCertTest_TREND ADD constraint PK_AzrIntApCertTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE AzrIntApCertTest_THRESH;
CREATE TABLE AzrIntApCertTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
certStatus_MIN VARCHAR(256) NOT NULL,
certStatus_MAX VARCHAR(256) NOT NULL,
differenceDates_MIN VARCHAR(256) NOT NULL,
differenceDates_MAX VARCHAR(256) NOT NULL);

ALTER TABLE AzrIntApCertTest_THRESH ADD constraint PK_AzrIntApCertTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_AzrIntApCertTest_THRESH ON AzrIntApCertTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_AzrIntApCertTest ON AzrIntApCertTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_AzrIntApCertTest ON AzrIntApCertTest_TREND (MSMT_TIME,PERIOD);


DROP TABLE AzrIntAndroidTest;
CREATE TABLE AzrIntAndroidTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
tokenStatus DECIMAL(20,4) NOT NULL,
tokenStatus_ST varchar(32) NOT NULL,
differenceDates DECIMAL(20,4) NOT NULL,
differenceDates_ST varchar(32) NOT NULL,
enrollMode DECIMAL(20,4) NOT NULL,
enrollMode_ST varchar(32) NOT NULL,
enrollType DECIMAL(20,4) NOT NULL,
enrollType_ST varchar(32) NOT NULL,
deviceCount DECIMAL(20,4) NOT NULL,
deviceCount_ST varchar(32) NOT NULL);

CREATE INDEX IDX_AzrIntAndroidTest ON AzrIntAndroidTest(MSMT_TIME);
ALTER TABLE AzrIntAndroidTest ADD constraint PK_AzrIntAndroidTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE AzrIntAndroidTest_TREND;
CREATE TABLE AzrIntAndroidTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
tokenStatus_MIN DECIMAL(20,4) NOT NULL,
tokenStatus_MAX DECIMAL(20,4) NOT NULL,
tokenStatus_STCNT varchar(32) NOT NULL,
differenceDates_MIN DECIMAL(20,4) NOT NULL,
differenceDates_MAX DECIMAL(20,4) NOT NULL,
differenceDates_STCNT varchar(32) NOT NULL,
enrollMode_MIN DECIMAL(20,4) NOT NULL,
enrollMode_MAX DECIMAL(20,4) NOT NULL,
enrollMode_STCNT varchar(32) NOT NULL,
enrollType_MIN DECIMAL(20,4) NOT NULL,
enrollType_MAX DECIMAL(20,4) NOT NULL,
enrollType_STCNT varchar(32) NOT NULL,
deviceCount_MIN DECIMAL(20,4) NOT NULL,
deviceCount_MAX DECIMAL(20,4) NOT NULL,
deviceCount_STCNT varchar(32) NOT NULL);

ALTER TABLE AzrIntAndroidTest_TREND ADD constraint PK_AzrIntAndroidTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE AzrIntAndroidTest_THRESH;
CREATE TABLE AzrIntAndroidTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
tokenStatus_MIN VARCHAR(256) NOT NULL,
tokenStatus_MAX VARCHAR(256) NOT NULL,
differenceDates_MIN VARCHAR(256) NOT NULL,
differenceDates_MAX VARCHAR(256) NOT NULL,
enrollMode_MIN VARCHAR(256) NOT NULL,
enrollMode_MAX VARCHAR(256) NOT NULL,
enrollType_MIN VARCHAR(256) NOT NULL,
enrollType_MAX VARCHAR(256) NOT NULL,
deviceCount_MIN VARCHAR(256) NOT NULL,
deviceCount_MAX VARCHAR(256) NOT NULL);

ALTER TABLE AzrIntAndroidTest_THRESH ADD constraint PK_AzrIntAndroidTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_AzrIntAndroidTest_THRESH ON AzrIntAndroidTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_AzrIntAndroidTest ON AzrIntAndroidTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_AzrIntAndroidTest ON AzrIntAndroidTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE AzrIntApVPPTest;
CREATE TABLE AzrIntApVPPTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
tokenStatus DECIMAL(20,4) NOT NULL,
tokenStatus_ST varchar(32) NOT NULL,
differenceDates DECIMAL(20,4) NOT NULL,
differenceDates_ST varchar(32) NOT NULL,
tokState DECIMAL(20,4) NOT NULL,
tokState_ST varchar(32) NOT NULL,
syncStatus DECIMAL(20,4) NOT NULL,
syncStatus_ST varchar(32) NOT NULL,
accountType DECIMAL(20,4) NOT NULL,
accountType_ST varchar(32) NOT NULL);

CREATE INDEX IDX_AzrIntApVPPTest ON AzrIntApVPPTest(MSMT_TIME);
ALTER TABLE AzrIntApVPPTest ADD constraint PK_AzrIntApVPPTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE AzrIntApVPPTest_TREND;
CREATE TABLE AzrIntApVPPTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
tokenStatus_MIN DECIMAL(20,4) NOT NULL,
tokenStatus_MAX DECIMAL(20,4) NOT NULL,
tokenStatus_STCNT varchar(32) NOT NULL,
differenceDates_MIN DECIMAL(20,4) NOT NULL,
differenceDates_MAX DECIMAL(20,4) NOT NULL,
differenceDates_STCNT varchar(32) NOT NULL,
tokState_MIN DECIMAL(20,4) NOT NULL,
tokState_MAX DECIMAL(20,4) NOT NULL,
tokState_STCNT varchar(32) NOT NULL,
syncStatus_MIN DECIMAL(20,4) NOT NULL,
syncStatus_MAX DECIMAL(20,4) NOT NULL,
syncStatus_STCNT varchar(32) NOT NULL,
accountType_MIN DECIMAL(20,4) NOT NULL,
accountType_MAX DECIMAL(20,4) NOT NULL,
accountType_STCNT varchar(32) NOT NULL);

ALTER TABLE AzrIntApVPPTest_TREND ADD constraint PK_AzrIntApVPPTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE AzrIntApVPPTest_THRESH;
CREATE TABLE AzrIntApVPPTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
tokenStatus_MIN VARCHAR(256) NOT NULL,
tokenStatus_MAX VARCHAR(256) NOT NULL,
differenceDates_MIN VARCHAR(256) NOT NULL,
differenceDates_MAX VARCHAR(256) NOT NULL,
tokState_MIN VARCHAR(256) NOT NULL,
tokState_MAX VARCHAR(256) NOT NULL,
syncStatus_MIN VARCHAR(256) NOT NULL,
syncStatus_MAX VARCHAR(256) NOT NULL,
accountType_MIN VARCHAR(256) NOT NULL,
accountType_MAX VARCHAR(256) NOT NULL);

ALTER TABLE AzrIntApVPPTest_THRESH ADD constraint PK_AzrIntApVPPTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_AzrIntApVPPTest_THRESH ON AzrIntApVPPTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_AzrIntApVPPTest ON AzrIntApVPPTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_AzrIntApVPPTest ON AzrIntApVPPTest_TREND (MSMT_TIME,PERIOD);


DROP TABLE AzrIntApEnrolTest;
CREATE TABLE AzrIntApEnrolTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
tokenStatus DECIMAL(20,4) NOT NULL,
tokenStatus_ST varchar(32) NOT NULL,
differenceDates DECIMAL(20,4) NOT NULL,
differenceDates_ST varchar(32) NOT NULL,
tokType DECIMAL(20,4) NOT NULL,
tokType_ST varchar(32) NOT NULL,
syncdeviceCount DECIMAL(20,4) NOT NULL,
syncdeviceCount_ST varchar(32) NOT NULL,
errorCode DECIMAL(20,4) NOT NULL,
errorCode_ST varchar(32) NOT NULL);

CREATE INDEX IDX_AzrIntApEnrolTest ON AzrIntApEnrolTest(MSMT_TIME);
ALTER TABLE AzrIntApEnrolTest ADD constraint PK_AzrIntApEnrolTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE AzrIntApEnrolTest_TREND;
CREATE TABLE AzrIntApEnrolTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
tokenStatus_MIN DECIMAL(20,4) NOT NULL,
tokenStatus_MAX DECIMAL(20,4) NOT NULL,
tokenStatus_STCNT varchar(32) NOT NULL,
differenceDates_MIN DECIMAL(20,4) NOT NULL,
differenceDates_MAX DECIMAL(20,4) NOT NULL,
differenceDates_STCNT varchar(32) NOT NULL,
tokType_MIN DECIMAL(20,4) NOT NULL,
tokType_MAX DECIMAL(20,4) NOT NULL,
tokType_STCNT varchar(32) NOT NULL,
syncdeviceCount_MIN DECIMAL(20,4) NOT NULL,
syncdeviceCount_MAX DECIMAL(20,4) NOT NULL,
syncdeviceCount_STCNT varchar(32) NOT NULL,
errorCode_MIN DECIMAL(20,4) NOT NULL,
errorCode_MAX DECIMAL(20,4) NOT NULL,
errorCode_STCNT varchar(32) NOT NULL);

ALTER TABLE AzrIntApEnrolTest_TREND ADD constraint PK_AzrIntApEnrolTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE AzrIntApEnrolTest_THRESH;
CREATE TABLE AzrIntApEnrolTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
tokenStatus_MIN VARCHAR(256) NOT NULL,
tokenStatus_MAX VARCHAR(256) NOT NULL,
differenceDates_MIN VARCHAR(256) NOT NULL,
differenceDates_MAX VARCHAR(256) NOT NULL,
tokType_MIN VARCHAR(256) NOT NULL,
tokType_MAX VARCHAR(256) NOT NULL,
syncdeviceCount_MIN VARCHAR(256) NOT NULL,
syncdeviceCount_MAX VARCHAR(256) NOT NULL,
errorCode_MIN VARCHAR(256) NOT NULL,
errorCode_MAX VARCHAR(256) NOT NULL);

ALTER TABLE AzrIntApEnrolTest_THRESH ADD constraint PK_AzrIntApEnrolTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_AzrIntApEnrolTest_THRESH ON AzrIntApEnrolTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_AzrIntApEnrolTest ON AzrIntApEnrolTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_AzrIntApEnrolTest ON AzrIntApEnrolTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE AzrIntAdmCtrTest;
CREATE TABLE AzrIntAdmCtrTest(
TRGT_HOST		varchar(32) NOT NULL,
PORT_NO			varchar(32) NOT NULL,
SITE_NAME		varchar(64) NOT NULL,
INFO			varchar(128) NOT NULL,
MSMT_HOST 		varchar(32) NOT NULL, 
MSMT_TIME		datetime NOT NULL,
AVAILABLE		decimal(3) NOT NULL,
AVAILABLE_ST		varchar(32) NOT NULL,
RESP_TIME		decimal(20,4) NOT NULL,
RESP_TIME_ST		varchar(32) NOT NULL,
TCP_CONN_AVAIL		decimal(3) NOT NULL,
TCP_CONN_AVAIL_ST	varchar(32) NOT NULL,
TCP_CONN_TIME		decimal(20,4) NOT NULL,
TCP_CONN_TIME_ST	varchar(32) NOT NULL,
SVR_RESP_TIME		decimal(20,4) NOT NULL,
SVR_RESP_TIME_ST	varchar(32) NOT NULL,
CONTENT_VAL		decimal(3) NOT NULL,
CONTENT_VAL_ST		varchar(32) NOT NULL,
RESP_CODE		decimal(3) NOT NULL,
RESP_CODE_ST		varchar(32) NOT NULL,
CONTENT_LEN		decimal(20,4) NOT NULL,
CONTENT_LEN_ST		varchar(32) NOT NULL,
DATA_XFER_TIME		decimal(20,4) NOT NULL,
DATA_XFER_TIME_ST	varchar(32) NOT NULL,
DNS_AVAILABILITY	decimal(20,4) NOT NULL,
DNS_AVAILABILITY_ST	varchar(32) NOT NULL,
DNS_RESP_TIME   	decimal(20,4)  	NOT NULL,
DNS_RESP_TIME_ST   	varchar(32)  	NOT NULL,
COMPRESSION	       decimal(20,4)  	NOT NULL,
COMPRESSION_ST   	varchar(32)  	NOT NULL);

CREATE INDEX IDX_AzrIntAdmCtrTest ON AzrIntAdmCtrTest(MSMT_TIME);
alter table AzrIntAdmCtrTest add constraint PK_AzrIntAdmCtrTest
PRIMARY KEY (TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE AzrIntAdmCtrTest_TREND;
CREATE TABLE AzrIntAdmCtrTest_TREND
(
TRGT_HOST 		varchar(32) NOT NULL,
PORT_NO			varchar(32) NOT NULL,
SITE_NAME		varchar(64) NOT NULL,
INFO			varchar(128) NOT NULL,
MSMT_HOST		varchar(32) NOT NULL, 
MSMT_TIME		datetime NOT NULL,
PERIOD			varchar(32) NOT NULL, 
AVAILABLE_MIN		decimal(20,4) NOT NULL,
AVAILABLE_MAX		decimal(20,4) NOT NULL,
AVAILABLE_STCNT		varchar(32) NOT NULL,
RESP_TIME_MIN		decimal(20,4) NOT NULL,
RESP_TIME_MAX		decimal(20,4) NOT NULL,
RESP_TIME_STCNT		varchar(32) NOT NULL,
TCP_CONN_AVAIL_MIN	decimal(20,4) NOT NULL,
TCP_CONN_AVAIL_MAX	decimal(20,4) NOT NULL,
TCP_CONN_AVAIL_STCNT	varchar(32) NOT NULL,
TCP_CONN_TIME_MIN	decimal(20,4) NOT NULL,
TCP_CONN_TIME_MAX	decimal(20,4) NOT NULL,
TCP_CONN_TIME_STCNT	varchar(32) NOT NULL,
SVR_RESP_TIME_MIN	decimal(20,4) NOT NULL,
SVR_RESP_TIME_MAX	decimal(20,4) NOT NULL,
SVR_RESP_TIME_STCNT	varchar(32) NOT NULL,
CONTENT_VAL_MIN		decimal(20,4) NOT NULL,
CONTENT_VAL_MAX		decimal(20,4) NOT NULL,
CONTENT_VAL_STCNT	varchar(32) NOT NULL,
RESP_CODE_MIN		decimal(20,4) NOT NULL,
RESP_CODE_MAX		decimal(20,4) NOT NULL,
RESP_CODE_STCNT		varchar(32) NOT NULL,
CONTENT_LEN_MIN		decimal(20,4) NOT NULL,
CONTENT_LEN_MAX		decimal(20,4) NOT NULL,
CONTENT_LEN_STCNT	varchar(32) NOT NULL,
DATA_XFER_TIME_MIN	decimal(20,4) NOT NULL,
DATA_XFER_TIME_MAX	decimal(20,4) NOT NULL,
DATA_XFER_TIME_STCNT	varchar(32) NOT NULL,
DNS_AVAILABILITY_MIN	decimal(20,4) NOT NULL,
DNS_AVAILABILITY_MAX	decimal(20,4) NOT NULL,
DNS_AVAILABILITY_STCNT	varchar(32) NOT NULL,
DNS_RESP_TIME_MIN   		decimal(20,4)  	NOT NULL,
DNS_RESP_TIME_MAX   		decimal(20,4)  	NOT NULL,
DNS_RESP_TIME_STCNT   		varchar(32)  	NOT NULL,
COMPRESSION_MIN   		decimal(20,4)  	NOT NULL,
COMPRESSION_MAX   		decimal(20,4)  	NOT NULL,
COMPRESSION_STCNT   	varchar(32)  	NOT NULL);

alter table AzrIntAdmCtrTest_TREND add constraint PK_AzrIntAdmCtrTest_TREND
PRIMARY KEY (TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME,PERIOD);
DROP TABLE AzrIntAdmCtrTest_THRESH;
CREATE TABLE AzrIntAdmCtrTest_THRESH(
TRGT_HOST		varchar(32) NOT NULL,
PORT_NO			varchar(32) NOT NULL,
SITE_NAME		varchar(64) NOT NULL,
INFO			varchar(128) NOT NULL,
MSMT_HOST		varchar(32) NOT NULL, 
MSMT_TIME_START		datetime NOT NULL,
MSMT_TIME_END		datetime NOT NULL,
AVAILABLE_MIN		VARCHAR(256) NOT NULL,
AVAILABLE_MAX		VARCHAR(256) NOT NULL,
RESP_TIME_MIN		VARCHAR(256) NOT NULL,
RESP_TIME_MAX		VARCHAR(256) NOT NULL,
TCP_CONN_AVAIL_MIN	VARCHAR(256) NOT NULL,
TCP_CONN_AVAIL_MAX	VARCHAR(256) NOT NULL,
TCP_CONN_TIME_MIN	VARCHAR(256) NOT NULL,
TCP_CONN_TIME_MAX	VARCHAR(256) NOT NULL,
SVR_RESP_TIME_MIN	VARCHAR(256) NOT NULL,
SVR_RESP_TIME_MAX	VARCHAR(256) NOT NULL,
CONTENT_VAL_MIN		VARCHAR(256) NOT NULL,
CONTENT_VAL_MAX		VARCHAR(256) NOT NULL,
RESP_CODE_MIN		VARCHAR(256) NOT NULL,
RESP_CODE_MAX		VARCHAR(256) NOT NULL,
CONTENT_LEN_MIN		VARCHAR(256) NOT NULL,
CONTENT_LEN_MAX		VARCHAR(256) NOT NULL,
DATA_XFER_TIME_MIN	VARCHAR(256) NOT NULL,
DATA_XFER_TIME_MAX	VARCHAR(256) NOT NULL,
DNS_AVAILABILITY_MIN	VARCHAR(256) NOT NULL,
DNS_AVAILABILITY_MAX	VARCHAR(256) NOT NULL,
DNS_RESP_TIME_MIN	VARCHAR(256) NOT NULL,
DNS_RESP_TIME_MAX	VARCHAR(256) NOT NULL,
COMPRESSION_MIN		VARCHAR(256)	  NOT NULL,
COMPRESSION_MAX		VARCHAR(256)	  NOT NULL);
alter table AzrIntAdmCtrTest_THRESH add constraint PK_AzrIntAdmCtrTest_THRESH
PRIMARY KEY (TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START) ;
CREATE INDEX IDX_AzrIntAdmCtrTest_THRESH ON AzrIntAdmCtrTest_THRESH(MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_AzrIntAdmCtrTest ON AzrIntAdmCtrTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_AzrIntAdmCtrTest ON AzrIntAdmCtrTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE SolaceCluNdHlthTest;
CREATE TABLE SolaceCluNdHlthTest(
TRGT_HOST                     varchar(32) NOT NULL, 
PORT_NO                       varchar(32) NOT NULL, 
SITE_NAME                     varchar(64) NOT NULL, 
INFO                          varchar(128) NOT NULL, 
MSMT_HOST                     varchar(32) NOT NULL, 
MSMT_TIME                     datetime NOT NULL, 
NODE_STATUS             DECIMAL(20,4) NOT NULL, 
NODE_STATUS_ST          varchar(32) NOT NULL, 
NODE_HEALTH             DECIMAL(20,4) NOT NULL, 
NODE_HEALTH_ST          varchar(32) NOT NULL, 
MSGSPOOL_STATUS            DECIMAL(20,4) NOT NULL, 
MSGSPOOL_STATUS_ST         varchar(32) NOT NULL, 
CONFIGSYNC_STATUS               DECIMAL(20,4) NOT NULL, 
CONFIGSYNC_STATUS_ST            varchar(32) NOT NULL); 
CREATE INDEX IDX_SolaceCluNdHlthTest ON SolaceCluNdHlthTest(MSMT_TIME);
ALTER TABLE SolaceCluNdHlthTest ADD constraint PK_SolaceCluNdHlthTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);

DROP TABLE SolaceCluNdHlthTest_TREND;
CREATE TABLE SolaceCluNdHlthTest_TREND(
TRGT_HOST                     varchar(32) NOT NULL, 
PORT_NO                       varchar(32) NOT NULL, 
SITE_NAME                     varchar(64) NOT NULL, 
INFO                          varchar(128) NOT NULL, 
MSMT_HOST                     varchar(32) NOT NULL, 
MSMT_TIME                     datetime NOT NULL, 
PERIOD                        varchar(32) NOT NULL, 
NODE_STATUS_MIN         DECIMAL(20,4) NOT NULL, 
NODE_STATUS_MAX         DECIMAL(20,4) NOT NULL, 
NODE_STATUS_STCNT       varchar(32) NOT NULL, 
NODE_HEALTH_MIN         DECIMAL(20,4) NOT NULL, 
NODE_HEALTH_MAX         DECIMAL(20,4) NOT NULL, 
NODE_HEALTH_STCNT       varchar(32) NOT NULL, 
MSGSPOOL_STATUS_MIN        DECIMAL(20,4) NOT NULL, 
MSGSPOOL_STATUS_MAX        DECIMAL(20,4) NOT NULL, 
MSGSPOOL_STATUS_STCNT      varchar(32) NOT NULL, 
CONFIGSYNC_STATUS_MIN           DECIMAL(20,4) NOT NULL, 
CONFIGSYNC_STATUS_MAX           DECIMAL(20,4) NOT NULL, 
CONFIGSYNC_STATUS_STCNT         varchar(32) NOT NULL); 
ALTER TABLE SolaceCluNdHlthTest_TREND ADD constraint PK_SolaceCluNdHlthTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);

DROP TABLE SolaceCluNdHlthTest_THRESH;
CREATE TABLE SolaceCluNdHlthTest_THRESH(
TRGT_HOST                     varchar(32) NOT NULL, 
PORT_NO                       varchar(32) NOT NULL, 
SITE_NAME                     varchar(64) NOT NULL, 
INFO                          varchar(128) NOT NULL, 
MSMT_HOST                     varchar(32) NOT NULL, 
MSMT_TIME_START               datetime NOT NULL, 
MSMT_TIME_END                 datetime NOT NULL, 
NODE_STATUS_MIN        		  VARCHAR(256) NOT NULL, 
NODE_STATUS_MAX         	  VARCHAR(256) NOT NULL, 
NODE_HEALTH_MIN          VARCHAR(256) NOT NULL, 
NODE_HEALTH_MAX          VARCHAR(256) NOT NULL, 
MSGSPOOL_STATUS_MIN        	  VARCHAR(256) NOT NULL, 
MSGSPOOL_STATUS_MAX            VARCHAR(256) NOT NULL, 
CONFIGSYNC_STATUS_MIN           VARCHAR(256) NOT NULL, 
CONFIGSYNC_STATUS_MAX           VARCHAR(256) NOT NULL); 
ALTER TABLE SolaceCluNdHlthTest_THRESH ADD constraint PK_SolaceCluNdHlthTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_SolaceCluNdHlthTest_THRESH ON SolaceCluNdHlthTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_SolaceCluNdHlthTest ON SolaceCluNdHlthTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_SolaceCluNdHlthTest ON SolaceCluNdHlthTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE SolaceCluHealthTest;
CREATE TABLE SolaceCluHealthTest(
TRGT_HOST                       varchar(32) NOT NULL, 
PORT_NO                         varchar(32) NOT NULL, 
SITE_NAME                       varchar(64) NOT NULL, 
INFO                            varchar(128) NOT NULL, 
MSMT_HOST                       varchar(32) NOT NULL, 
MSMT_TIME                       datetime NOT NULL, 
NODE_AVAIL             			DECIMAL(20,4) NOT NULL, 
NODE_AVAIL_ST          			varchar(32) NOT NULL, 
CLUSTER_REDUNCY_HEALTH          DECIMAL(20,4) NOT NULL, 
CLUSTER_REDUNCY_HEALTH_ST       varchar(32) NOT NULL, 
CLUSTER_MSGSPOOL_STATUS         DECIMAL(20,4) NOT NULL, 
CLUSTER_MSGSPOOL_STATUS_ST      varchar(32) NOT NULL, 
CLUSTER_CONFIGSYNC_STATUS       DECIMAL(20,4) NOT NULL, 
CLUSTER_CONFIGSYNC_STATUS_ST    varchar(32) NOT NULL);
 
CREATE INDEX IDX_SolaceCluHealthTest ON SolaceCluHealthTest(MSMT_TIME);
ALTER TABLE SolaceCluHealthTest ADD constraint PK_SolaceCluHealthTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);

DROP TABLE SolaceCluHealthTest_TREND;
CREATE TABLE SolaceCluHealthTest_TREND(
TRGT_HOST                       varchar(32) NOT NULL, 
PORT_NO                         varchar(32) NOT NULL, 
SITE_NAME                       varchar(64) NOT NULL, 
INFO                            varchar(128) NOT NULL, 
MSMT_HOST                       varchar(32) NOT NULL, 
MSMT_TIME                       datetime NOT NULL, 
PERIOD                          varchar(32) NOT NULL, 
NODE_AVAIL_MIN         			DECIMAL(20,4) NOT NULL, 
NODE_AVAIL_MAX         			DECIMAL(20,4) NOT NULL, 
NODE_AVAIL_STCNT       			varchar(32) NOT NULL, 
CLUSTER_REDUNCY_HEALTH_MIN      DECIMAL(20,4) NOT NULL, 
CLUSTER_REDUNCY_HEALTH_MAX      DECIMAL(20,4) NOT NULL, 
CLUSTER_REDUNCY_HEALTH_STCNT    varchar(32) NOT NULL, 
CLUSTER_MSGSPOOL_STATUS_MIN     DECIMAL(20,4) NOT NULL, 
CLUSTER_MSGSPOOL_STATUS_MAX     DECIMAL(20,4) NOT NULL, 
CLUSTER_MSGSPOOL_STATUS_STCNT   varchar(32) NOT NULL, 
CLUSTER_CONFIGSYNC_STATUS_MIN     DECIMAL(20,4) NOT NULL, 
CLUSTER_CONFIGSYNC_STATUS_MAX     DECIMAL(20,4) NOT NULL, 
CLUSTER_CONFIGSYNC_STATUS_STCNT   varchar(32) NOT NULL); 

ALTER TABLE SolaceCluHealthTest_TREND ADD constraint PK_SolaceCluHealthTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);

DROP TABLE SolaceCluHealthTest_THRESH;
CREATE TABLE SolaceCluHealthTest_THRESH(
TRGT_HOST                       varchar(32) NOT NULL, 
PORT_NO                         varchar(32) NOT NULL, 
SITE_NAME                       varchar(64) NOT NULL, 
INFO                            varchar(128) NOT NULL, 
MSMT_HOST                       varchar(32) NOT NULL, 
MSMT_TIME_START                 datetime NOT NULL, 
MSMT_TIME_END                   datetime NOT NULL, 
NODE_AVAIL_MIN        		    VARCHAR(256) NOT NULL, 
NODE_AVAIL_MAX         	        VARCHAR(256) NOT NULL, 
CLUSTER_REDUNCY_HEALTH_MIN          VARCHAR(256) NOT NULL, 
CLUSTER_REDUNCY_HEALTH_MAX          VARCHAR(256) NOT NULL, 
CLUSTER_MSGSPOOL_STATUS_MIN        	  VARCHAR(256) NOT NULL, 
CLUSTER_MSGSPOOL_STATUS_MAX            VARCHAR(256) NOT NULL, 
CLUSTER_CONFIGSYNC_STATUS_MIN           VARCHAR(256) NOT NULL, 
CLUSTER_CONFIGSYNC_STATUS_MAX           VARCHAR(256) NOT NULL); 
ALTER TABLE SolaceCluHealthTest_THRESH ADD constraint PK_SolaceCluHealthTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_SolaceCluHealthTest_THRESH ON SolaceCluHealthTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_SolaceCluHealthTest ON SolaceCluHealthTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_SolaceCluHealthTest ON SolaceCluHealthTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE CtxNsTrapTest;
CREATE TABLE CtxNsTrapTest(
TRGT_HOST       			varchar(32) NOT NULL,
PORT_NO         			varchar(32) NOT NULL,
SITE_NAME       			varchar(64) NOT NULL,
INFO            			varchar(128) NOT NULL,
MSMT_HOST       			varchar(32) NOT NULL,
MSMT_TIME       			datetime NOT NULL,
NUM_MESSAGES 				DECIMAL(20,4) NOT NULL,
NUM_MESSAGES_ST 			varchar(32) NOT NULL);
CREATE INDEX IDX_CtxNsTrapTest ON CtxNsTrapTest(MSMT_TIME);
ALTER TABLE CtxNsTrapTest ADD constraint PK_CtxNsTrapTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);

DROP TABLE CtxNsTrapTest_TREND;
CREATE TABLE CtxNsTrapTest_TREND(
TRGT_HOST       			varchar(32) NOT NULL,
PORT_NO         			varchar(32) NOT NULL,
SITE_NAME       			varchar(64) NOT NULL,
INFO            			varchar(128) NOT NULL,
MSMT_HOST       			varchar(32) NOT NULL,
MSMT_TIME       			datetime NOT NULL,
PERIOD       				varchar(32) NOT NULL,
NUM_MESSAGES_MIN 			DECIMAL(20,4) NOT NULL,
NUM_MESSAGES_MAX 			DECIMAL(20,4) NOT NULL,
NUM_MESSAGES_STCNT varchar(32) NOT NULL);
ALTER TABLE CtxNsTrapTest_TREND ADD constraint PK_CtxNsTrapTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);

DROP TABLE CtxNsTrapTest_THRESH;
CREATE TABLE CtxNsTrapTest_THRESH(
TRGT_HOST       			varchar(32) NOT NULL,
PORT_NO         			varchar(32) NOT NULL,
SITE_NAME       			varchar(64) NOT NULL,
INFO            			varchar(128) NOT NULL,
MSMT_HOST       			varchar(32) NOT NULL,
MSMT_TIME_START 			datetime NOT NULL,
MSMT_TIME_END   			datetime NOT NULL,
NUM_MESSAGES_MIN 			VARCHAR(256) NOT NULL,
NUM_MESSAGES_MAX 			VARCHAR(256) NOT NULL);
ALTER TABLE CtxNsTrapTest_THRESH ADD constraint PK_CtxNsTrapTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_CtxNsTrapTest_THRESH ON CtxNsTrapTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_CtxNsTrapTest ON CtxNsTrapTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_CtxNsTrapTest ON CtxNsTrapTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE MySQLInstanceStTest;
CREATE TABLE MySQLInstanceStTest(
TRGT_HOST	varchar(32) NOT NULL,
PORT_NO	varchar(32) NOT NULL,
SITE_NAME	varchar(64) NOT NULL,
INFO		varchar(128) NOT NULL,
MSMT_HOST	varchar(32) NOT NULL,
MSMT_TIME	datetime NOT NULL,
InstanceNodeStatus DECIMAL(20,4) NOT NULL,
InstanceNodeStatus_ST varchar(32) NOT NULL);
ALTER TABLE MySQLInstanceStTest ADD constraint PK_MySQLInstanceStTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
CREATE  INDEX IDX_MySQLInstanceStTest ON MySQLInstanceStTest(MSMT_TIME);
DROP TABLE MySQLInstanceStTest_TREND;
CREATE TABLE MySQLInstanceStTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
InstanceNodeStatus_MIN DECIMAL(20,4) NOT NULL,
InstanceNodeStatus_MAX DECIMAL(20,4) NOT NULL,
InstanceNodeStatus_STCNT varchar(32) NOT NULL);
ALTER TABLE MySQLInstanceStTest_TREND ADD constraint PK_MySQLInstanceStTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE MySQLInstanceStTest_THRESH;
CREATE TABLE MySQLInstanceStTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
InstanceNodeStatus_MIN	VARCHAR(256)	 NOT NULL,
InstanceNodeStatus_MAX	VARCHAR(256)	 NOT NULL);
ALTER TABLE MySQLInstanceStTest_THRESH ADD constraint PK_MySQLInstanceStTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_MySQLInstanceStTest_THRESH ON MySQLInstanceStTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TR_MySQLInstanceStTest on MySQLInstanceStTest_TREND(msmt_time,period);
CREATE INDEX IDX_TH_MySQLInstanceStTest on MySQLInstanceStTest_THRESH(msmt_time_start);

DROP TABLE MySQLFileIOTest;
CREATE TABLE MySQLFileIOTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
WAITCOUNT DECIMAL(20,4) NOT NULL,
WAITCOUNT_ST varchar(32) NOT NULL,
AVERAGEWAITTIME DECIMAL(20,4) NOT NULL,
AVERAGEWAITTIME_ST varchar(32) NOT NULL,
MINWAITTIME DECIMAL(20,4) NOT NULL,
MINWAITTIME_ST varchar(32) NOT NULL,
MAXWAITTIME DECIMAL(20,4) NOT NULL,
MAXWAITTIME_ST varchar(32) NOT NULL,
AVERAGEREADLATENCY DECIMAL(20,4) NOT NULL,
AVERAGEREADLATENCY_ST varchar(32) NOT NULL,
MINREADLATENCY DECIMAL(20,4) NOT NULL,
MINREADLATENCY_ST varchar(32) NOT NULL,
MAXREADLATENCY DECIMAL(20,4) NOT NULL,
MAXREADLATENCY_ST varchar(32) NOT NULL,
AVERAGEWRITELATENCY DECIMAL(20,4) NOT NULL,
AVERAGEWRITELATENCY_ST varchar(32) NOT NULL,
MINWRITELATENCY DECIMAL(20,4) NOT NULL,
MINWRITELATENCY_ST varchar(32) NOT NULL,
MAXWRITELATENCY DECIMAL(20,4) NOT NULL,
MAXWRITELATENCY_ST varchar(32) NOT NULL);
CREATE INDEX IDX_MySQLFileIOTest ON MySQLFileIOTest(MSMT_TIME);
ALTER TABLE MySQLFileIOTest ADD constraint PK_MySQLFileIOTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE MySQLFileIOTest_TREND;
CREATE TABLE MySQLFileIOTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
WAITCOUNT_MIN DECIMAL(20,4) NOT NULL,
WAITCOUNT_MAX DECIMAL(20,4) NOT NULL,
WAITCOUNT_STCNT varchar(32) NOT NULL,
AVERAGEWAITTIME_MIN DECIMAL(20,4) NOT NULL,
AVERAGEWAITTIME_MAX DECIMAL(20,4) NOT NULL,
AVERAGEWAITTIME_STCNT varchar(32) NOT NULL,
MINWAITTIME_MIN DECIMAL(20,4) NOT NULL,
MINWAITTIME_MAX DECIMAL(20,4) NOT NULL,
MINWAITTIME_STCNT varchar(32) NOT NULL,
MAXWAITTIME_MIN DECIMAL(20,4) NOT NULL,
MAXWAITTIME_MAX DECIMAL(20,4) NOT NULL,
MAXWAITTIME_STCNT varchar(32) NOT NULL,
AVERAGEREADLATENCY_MIN DECIMAL(20,4) NOT NULL,
AVERAGEREADLATENCY_MAX DECIMAL(20,4) NOT NULL,
AVERAGEREADLATENCY_STCNT varchar(32) NOT NULL,
MINREADLATENCY_MIN DECIMAL(20,4) NOT NULL,
MINREADLATENCY_MAX DECIMAL(20,4) NOT NULL,
MINREADLATENCY_STCNT varchar(32) NOT NULL,
MAXREADLATENCY_MIN DECIMAL(20,4) NOT NULL,
MAXREADLATENCY_MAX DECIMAL(20,4) NOT NULL,
MAXREADLATENCY_STCNT varchar(32) NOT NULL,
AVERAGEWRITELATENCY_MIN DECIMAL(20,4) NOT NULL,
AVERAGEWRITELATENCY_MAX DECIMAL(20,4) NOT NULL,
AVERAGEWRITELATENCY_STCNT varchar(32) NOT NULL,
MINWRITELATENCY_MIN DECIMAL(20,4) NOT NULL,
MINWRITELATENCY_MAX DECIMAL(20,4) NOT NULL,
MINWRITELATENCY_STCNT varchar(32) NOT NULL,
MAXWRITELATENCY_MIN DECIMAL(20,4) NOT NULL,
MAXWRITELATENCY_MAX DECIMAL(20,4) NOT NULL,
MAXWRITELATENCY_STCNT varchar(32) NOT NULL);
ALTER TABLE MySQLFileIOTest_TREND ADD constraint PK_MySQLFileIOTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE MySQLFileIOTest_THRESH;
CREATE TABLE MySQLFileIOTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
WAITCOUNT_MIN VARCHAR(256) NOT NULL,
WAITCOUNT_MAX VARCHAR(256) NOT NULL,
AVERAGEWAITTIME_MIN VARCHAR(256) NOT NULL,
AVERAGEWAITTIME_MAX VARCHAR(256) NOT NULL,
MINWAITTIME_MIN VARCHAR(256) NOT NULL,
MINWAITTIME_MAX VARCHAR(256) NOT NULL,
MAXWAITTIME_MIN VARCHAR(256) NOT NULL,
MAXWAITTIME_MAX VARCHAR(256) NOT NULL,
AVERAGEREADLATENCY_MIN VARCHAR(256) NOT NULL,
AVERAGEREADLATENCY_MAX VARCHAR(256) NOT NULL,
MINREADLATENCY_MIN VARCHAR(256) NOT NULL,
MINREADLATENCY_MAX VARCHAR(256) NOT NULL,
MAXREADLATENCY_MIN VARCHAR(256) NOT NULL,
MAXREADLATENCY_MAX VARCHAR(256) NOT NULL,
AVERAGEWRITELATENCY_MIN VARCHAR(256) NOT NULL,
AVERAGEWRITELATENCY_MAX VARCHAR(256) NOT NULL,
MINWRITELATENCY_MIN VARCHAR(256) NOT NULL,
MINWRITELATENCY_MAX VARCHAR(256) NOT NULL,
MAXWRITELATENCY_MIN VARCHAR(256) NOT NULL,
MAXWRITELATENCY_MAX VARCHAR(256) NOT NULL);
ALTER TABLE MySQLFileIOTest_THRESH ADD constraint PK_MySQLFileIOTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_MySQLFileIOTest_THRESH ON MySQLFileIOTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_MySQLFileIOTest ON MySQLFileIOTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_MySQLFileIOTest ON MySQLFileIOTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE MySQLTabIOTest;
CREATE TABLE MySQLTabIOTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
WAITCOUNT DECIMAL(20,4) NOT NULL,
WAITCOUNT_ST varchar(32) NOT NULL,
AVERAGEWAITTIME DECIMAL(20,4) NOT NULL,
AVERAGEWAITTIME_ST varchar(32) NOT NULL,
MINWAITTIME DECIMAL(20,4) NOT NULL,
MINWAITTIME_ST varchar(32) NOT NULL,
MAXWAITTIME DECIMAL(20,4) NOT NULL,
MAXWAITTIME_ST varchar(32) NOT NULL,
AVERAGEREADLATENCY DECIMAL(20,4) NOT NULL,
AVERAGEREADLATENCY_ST varchar(32) NOT NULL,
MINREADLATENCY DECIMAL(20,4) NOT NULL,
MINREADLATENCY_ST varchar(32) NOT NULL,
MAXREADLATENCY DECIMAL(20,4) NOT NULL,
MAXREADLATENCY_ST varchar(32) NOT NULL,
AVERAGEWRITELATENCY DECIMAL(20,4) NOT NULL,
AVERAGEWRITELATENCY_ST varchar(32) NOT NULL,
MINWRITELATENCY DECIMAL(20,4) NOT NULL,
MINWRITELATENCY_ST varchar(32) NOT NULL,
MAXWRITELATENCY DECIMAL(20,4) NOT NULL,
MAXWRITELATENCY_ST varchar(32) NOT NULL,
AVERAGEFETCHLATENCY DECIMAL(20,4) NOT NULL,
AVERAGEFETCHLATENCY_ST varchar(32) NOT NULL,
MINFETCHLATENCY DECIMAL(20,4) NOT NULL,
MINFETCHLATENCY_ST varchar(32) NOT NULL,
MAXFETCHLATENCY DECIMAL(20,4) NOT NULL,
MAXFETCHLATENCY_ST varchar(32) NOT NULL,
AVERAGEINSERTLATENCY DECIMAL(20,4) NOT NULL,
AVERAGEINSERTLATENCY_ST varchar(32) NOT NULL,
MININSERTLATENCY DECIMAL(20,4) NOT NULL,
MININSERTLATENCY_ST varchar(32) NOT NULL,
MAXINSERTLATENCY DECIMAL(20,4) NOT NULL,
MAXINSERTLATENCY_ST varchar(32) NOT NULL,
AVERAGEUPDATELATENCY DECIMAL(20,4) NOT NULL,
AVERAGEUPDATELATENCY_ST varchar(32) NOT NULL,
MINUPDATELATENCY DECIMAL(20,4) NOT NULL,
MINUPDATELATENCY_ST varchar(32) NOT NULL,
MAXUPDATELATENCY DECIMAL(20,4) NOT NULL,
MAXUPDATELATENCY_ST varchar(32) NOT NULL,
AVERAGEDELETELATENCY DECIMAL(20,4) NOT NULL,
AVERAGEDELETELATENCY_ST varchar(32) NOT NULL,
MINDELETELATENCY DECIMAL(20,4) NOT NULL,
MINDELETELATENCY_ST varchar(32) NOT NULL,
MAXDELETELATENCY DECIMAL(20,4) NOT NULL,
MAXDELETELATENCY_ST varchar(32) NOT NULL
);
CREATE  INDEX IDX_MySQLTabIOTest ON MySQLTabIOTest
(
	 MSMT_TIME
);
ALTER TABLE MySQLTabIOTest ADD constraint PK_MySQLTabIOTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE MySQLTabIOTest_TREND;
CREATE TABLE MySQLTabIOTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
WAITCOUNT_MIN DECIMAL(20,4) NOT NULL,
WAITCOUNT_MAX DECIMAL(20,4) NOT NULL,
WAITCOUNT_STCNT varchar(32) NOT NULL,
AVERAGEWAITTIME_MIN DECIMAL(20,4) NOT NULL,
AVERAGEWAITTIME_MAX DECIMAL(20,4) NOT NULL,
AVERAGEWAITTIME_STCNT varchar(32) NOT NULL,
MINWAITTIME_MIN DECIMAL(20,4) NOT NULL,
MINWAITTIME_MAX DECIMAL(20,4) NOT NULL,
MINWAITTIME_STCNT varchar(32) NOT NULL,
MAXWAITTIME_MIN DECIMAL(20,4) NOT NULL,
MAXWAITTIME_MAX DECIMAL(20,4) NOT NULL,
MAXWAITTIME_STCNT varchar(32) NOT NULL,
AVERAGEREADLATENCY_MIN DECIMAL(20,4) NOT NULL,
AVERAGEREADLATENCY_MAX DECIMAL(20,4) NOT NULL,
AVERAGEREADLATENCY_STCNT varchar(32) NOT NULL,
MINREADLATENCY_MIN DECIMAL(20,4) NOT NULL,
MINREADLATENCY_MAX DECIMAL(20,4) NOT NULL,
MINREADLATENCY_STCNT varchar(32) NOT NULL,
MAXREADLATENCY_MIN DECIMAL(20,4) NOT NULL,
MAXREADLATENCY_MAX DECIMAL(20,4) NOT NULL,
MAXREADLATENCY_STCNT varchar(32) NOT NULL,
AVERAGEWRITELATENCY_MIN DECIMAL(20,4) NOT NULL,
AVERAGEWRITELATENCY_MAX DECIMAL(20,4) NOT NULL,
AVERAGEWRITELATENCY_STCNT varchar(32) NOT NULL,
MINWRITELATENCY_MIN DECIMAL(20,4) NOT NULL,
MINWRITELATENCY_MAX DECIMAL(20,4) NOT NULL,
MINWRITELATENCY_STCNT varchar(32) NOT NULL,
MAXWRITELATENCY_MIN DECIMAL(20,4) NOT NULL,
MAXWRITELATENCY_MAX DECIMAL(20,4) NOT NULL,
MAXWRITELATENCY_STCNT varchar(32) NOT NULL,
AVERAGEFETCHLATENCY_MIN DECIMAL(20,4) NOT NULL,
AVERAGEFETCHLATENCY_MAX DECIMAL(20,4) NOT NULL,
AVERAGEFETCHLATENCY_STCNT varchar(32) NOT NULL,
MINFETCHLATENCY_MIN DECIMAL(20,4) NOT NULL,
MINFETCHLATENCY_MAX DECIMAL(20,4) NOT NULL,
MINFETCHLATENCY_STCNT varchar(32) NOT NULL,
MAXFETCHLATENCY_MIN DECIMAL(20,4) NOT NULL,
MAXFETCHLATENCY_MAX DECIMAL(20,4) NOT NULL,
MAXFETCHLATENCY_STCNT varchar(32) NOT NULL,
AVERAGEINSERTLATENCY_MIN DECIMAL(20,4) NOT NULL,
AVERAGEINSERTLATENCY_MAX DECIMAL(20,4) NOT NULL,
AVERAGEINSERTLATENCY_STCNT varchar(32) NOT NULL,
MININSERTLATENCY_MIN DECIMAL(20,4) NOT NULL,
MININSERTLATENCY_MAX DECIMAL(20,4) NOT NULL,
MININSERTLATENCY_STCNT varchar(32) NOT NULL,
MAXINSERTLATENCY_MIN DECIMAL(20,4) NOT NULL,
MAXINSERTLATENCY_MAX DECIMAL(20,4) NOT NULL,
MAXINSERTLATENCY_STCNT varchar(32) NOT NULL,
AVERAGEUPDATELATENCY_MIN DECIMAL(20,4) NOT NULL,
AVERAGEUPDATELATENCY_MAX DECIMAL(20,4) NOT NULL,
AVERAGEUPDATELATENCY_STCNT varchar(32) NOT NULL,
MINUPDATELATENCY_MIN DECIMAL(20,4) NOT NULL,
MINUPDATELATENCY_MAX DECIMAL(20,4) NOT NULL,
MINUPDATELATENCY_STCNT varchar(32) NOT NULL,
MAXUPDATELATENCY_MIN DECIMAL(20,4) NOT NULL,
MAXUPDATELATENCY_MAX DECIMAL(20,4) NOT NULL,
MAXUPDATELATENCY_STCNT varchar(32) NOT NULL,
AVERAGEDELETELATENCY_MIN DECIMAL(20,4) NOT NULL,
AVERAGEDELETELATENCY_MAX DECIMAL(20,4) NOT NULL,
AVERAGEDELETELATENCY_STCNT varchar(32) NOT NULL,
MINDELETELATENCY_MIN DECIMAL(20,4) NOT NULL,
MINDELETELATENCY_MAX DECIMAL(20,4) NOT NULL,
MINDELETELATENCY_STCNT varchar(32) NOT NULL,
MAXDELETELATENCY_MIN DECIMAL(20,4) NOT NULL,
MAXDELETELATENCY_MAX DECIMAL(20,4) NOT NULL,
MAXDELETELATENCY_STCNT varchar(32) NOT NULL
);
ALTER TABLE MySQLTabIOTest_TREND ADD constraint PK_MySQLTabIOTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE MySQLTabIOTest_THRESH;
CREATE TABLE MySQLTabIOTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
WAITCOUNT_MIN VARCHAR(256) NOT NULL,
WAITCOUNT_MAX VARCHAR(256) NOT NULL,
AVERAGEWAITTIME_MIN VARCHAR(256) NOT NULL,
AVERAGEWAITTIME_MAX VARCHAR(256) NOT NULL,
MINWAITTIME_MIN VARCHAR(256) NOT NULL,
MINWAITTIME_MAX VARCHAR(256) NOT NULL,
MAXWAITTIME_MIN VARCHAR(256) NOT NULL,
MAXWAITTIME_MAX VARCHAR(256) NOT NULL,
AVERAGEREADLATENCY_MIN VARCHAR(256) NOT NULL,
AVERAGEREADLATENCY_MAX VARCHAR(256) NOT NULL,
MINREADLATENCY_MIN VARCHAR(256) NOT NULL,
MINREADLATENCY_MAX VARCHAR(256) NOT NULL,
MAXREADLATENCY_MIN VARCHAR(256) NOT NULL,
MAXREADLATENCY_MAX VARCHAR(256) NOT NULL,
AVERAGEWRITELATENCY_MIN VARCHAR(256) NOT NULL,
AVERAGEWRITELATENCY_MAX VARCHAR(256) NOT NULL,
MINWRITELATENCY_MIN VARCHAR(256) NOT NULL,
MINWRITELATENCY_MAX VARCHAR(256) NOT NULL,
MAXWRITELATENCY_MIN VARCHAR(256) NOT NULL,
MAXWRITELATENCY_MAX VARCHAR(256) NOT NULL,
AVERAGEFETCHLATENCY_MIN VARCHAR(256) NOT NULL,
AVERAGEFETCHLATENCY_MAX VARCHAR(256) NOT NULL,
MINFETCHLATENCY_MIN VARCHAR(256) NOT NULL,
MINFETCHLATENCY_MAX VARCHAR(256) NOT NULL,
MAXFETCHLATENCY_MIN VARCHAR(256) NOT NULL,
MAXFETCHLATENCY_MAX VARCHAR(256) NOT NULL,
AVERAGEINSERTLATENCY_MIN VARCHAR(256) NOT NULL,
AVERAGEINSERTLATENCY_MAX VARCHAR(256) NOT NULL,
MININSERTLATENCY_MIN VARCHAR(256) NOT NULL,
MININSERTLATENCY_MAX VARCHAR(256) NOT NULL,
MAXINSERTLATENCY_MIN VARCHAR(256) NOT NULL,
MAXINSERTLATENCY_MAX VARCHAR(256) NOT NULL,
AVERAGEUPDATELATENCY_MIN VARCHAR(256) NOT NULL,
AVERAGEUPDATELATENCY_MAX VARCHAR(256) NOT NULL,
MINUPDATELATENCY_MIN VARCHAR(256) NOT NULL,
MINUPDATELATENCY_MAX VARCHAR(256) NOT NULL,
MAXUPDATELATENCY_MIN VARCHAR(256) NOT NULL,
MAXUPDATELATENCY_MAX VARCHAR(256) NOT NULL,
AVERAGEDELETELATENCY_MIN VARCHAR(256) NOT NULL,
AVERAGEDELETELATENCY_MAX VARCHAR(256) NOT NULL,
MINDELETELATENCY_MIN VARCHAR(256) NOT NULL,
MINDELETELATENCY_MAX VARCHAR(256) NOT NULL,
MAXDELETELATENCY_MIN VARCHAR(256) NOT NULL,
MAXDELETELATENCY_MAX VARCHAR(256) NOT NULL
);
ALTER TABLE MySQLTabIOTest_THRESH ADD constraint PK_MySQLTabIOTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_MySQLTabIOTest_THRESH ON MySQLTabIOTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_MySQLTabIOTest ON MySQLTabIOTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_MySQLTabIOTest ON MySQLTabIOTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE MySQLIndexIOTest;
CREATE TABLE MySQLIndexIOTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
WAITCOUNT DECIMAL(20,4) NOT NULL,
WAITCOUNT_ST varchar(32) NOT NULL,
AVERAGEWAITTIME DECIMAL(20,4) NOT NULL,
AVERAGEWAITTIME_ST varchar(32) NOT NULL,
MINWAITTIME DECIMAL(20,4) NOT NULL,
MINWAITTIME_ST varchar(32) NOT NULL,
MAXWAITTIME DECIMAL(20,4) NOT NULL,
MAXWAITTIME_ST varchar(32) NOT NULL,
AVERAGEREADLATENCY DECIMAL(20,4) NOT NULL,
AVERAGEREADLATENCY_ST varchar(32) NOT NULL,
MINREADLATENCY DECIMAL(20,4) NOT NULL,
MINREADLATENCY_ST varchar(32) NOT NULL,
MAXREADLATENCY DECIMAL(20,4) NOT NULL,
MAXREADLATENCY_ST varchar(32) NOT NULL,
AVERAGEWRITELATENCY DECIMAL(20,4) NOT NULL,
AVERAGEWRITELATENCY_ST varchar(32) NOT NULL,
MINWRITELATENCY DECIMAL(20,4) NOT NULL,
MINWRITELATENCY_ST varchar(32) NOT NULL,
MAXWRITELATENCY DECIMAL(20,4) NOT NULL,
MAXWRITELATENCY_ST varchar(32) NOT NULL,
AVERAGEFETCHLATENCY DECIMAL(20,4) NOT NULL,
AVERAGEFETCHLATENCY_ST varchar(32) NOT NULL,
MINFETCHLATENCY DECIMAL(20,4) NOT NULL,
MINFETCHLATENCY_ST varchar(32) NOT NULL,
MAXFETCHLATENCY DECIMAL(20,4) NOT NULL,
MAXFETCHLATENCY_ST varchar(32) NOT NULL,
AVERAGEINSERTLATENCY DECIMAL(20,4) NOT NULL,
AVERAGEINSERTLATENCY_ST varchar(32) NOT NULL,
MININSERTLATENCY DECIMAL(20,4) NOT NULL,
MININSERTLATENCY_ST varchar(32) NOT NULL,
MAXINSERTLATENCY DECIMAL(20,4) NOT NULL,
MAXINSERTLATENCY_ST varchar(32) NOT NULL,
AVERAGEUPDATELATENCY DECIMAL(20,4) NOT NULL,
AVERAGEUPDATELATENCY_ST varchar(32) NOT NULL,
MINUPDATELATENCY DECIMAL(20,4) NOT NULL,
MINUPDATELATENCY_ST varchar(32) NOT NULL,
MAXUPDATELATENCY DECIMAL(20,4) NOT NULL,
MAXUPDATELATENCY_ST varchar(32) NOT NULL,
AVERAGEDELETELATENCY DECIMAL(20,4) NOT NULL,
AVERAGEDELETELATENCY_ST varchar(32) NOT NULL,
MINDELETELATENCY DECIMAL(20,4) NOT NULL,
MINDELETELATENCY_ST varchar(32) NOT NULL,
MAXDELETELATENCY DECIMAL(20,4) NOT NULL,
MAXDELETELATENCY_ST varchar(32) NOT NULL
);
CREATE  INDEX IDX_MySQLIndexIOTest ON MySQLIndexIOTest
(
	 MSMT_TIME
);
ALTER TABLE MySQLIndexIOTest ADD constraint PK_MySQLIndexIOTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE MySQLIndexIOTest_TREND;
CREATE TABLE MySQLIndexIOTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
WAITCOUNT_MIN DECIMAL(20,4) NOT NULL,
WAITCOUNT_MAX DECIMAL(20,4) NOT NULL,
WAITCOUNT_STCNT varchar(32) NOT NULL,
AVERAGEWAITTIME_MIN DECIMAL(20,4) NOT NULL,
AVERAGEWAITTIME_MAX DECIMAL(20,4) NOT NULL,
AVERAGEWAITTIME_STCNT varchar(32) NOT NULL,
MINWAITTIME_MIN DECIMAL(20,4) NOT NULL,
MINWAITTIME_MAX DECIMAL(20,4) NOT NULL,
MINWAITTIME_STCNT varchar(32) NOT NULL,
MAXWAITTIME_MIN DECIMAL(20,4) NOT NULL,
MAXWAITTIME_MAX DECIMAL(20,4) NOT NULL,
MAXWAITTIME_STCNT varchar(32) NOT NULL,
AVERAGEREADLATENCY_MIN DECIMAL(20,4) NOT NULL,
AVERAGEREADLATENCY_MAX DECIMAL(20,4) NOT NULL,
AVERAGEREADLATENCY_STCNT varchar(32) NOT NULL,
MINREADLATENCY_MIN DECIMAL(20,4) NOT NULL,
MINREADLATENCY_MAX DECIMAL(20,4) NOT NULL,
MINREADLATENCY_STCNT varchar(32) NOT NULL,
MAXREADLATENCY_MIN DECIMAL(20,4) NOT NULL,
MAXREADLATENCY_MAX DECIMAL(20,4) NOT NULL,
MAXREADLATENCY_STCNT varchar(32) NOT NULL,
AVERAGEWRITELATENCY_MIN DECIMAL(20,4) NOT NULL,
AVERAGEWRITELATENCY_MAX DECIMAL(20,4) NOT NULL,
AVERAGEWRITELATENCY_STCNT varchar(32) NOT NULL,
MINWRITELATENCY_MIN DECIMAL(20,4) NOT NULL,
MINWRITELATENCY_MAX DECIMAL(20,4) NOT NULL,
MINWRITELATENCY_STCNT varchar(32) NOT NULL,
MAXWRITELATENCY_MIN DECIMAL(20,4) NOT NULL,
MAXWRITELATENCY_MAX DECIMAL(20,4) NOT NULL,
MAXWRITELATENCY_STCNT varchar(32) NOT NULL,
AVERAGEFETCHLATENCY_MIN DECIMAL(20,4) NOT NULL,
AVERAGEFETCHLATENCY_MAX DECIMAL(20,4) NOT NULL,
AVERAGEFETCHLATENCY_STCNT varchar(32) NOT NULL,
MINFETCHLATENCY_MIN DECIMAL(20,4) NOT NULL,
MINFETCHLATENCY_MAX DECIMAL(20,4) NOT NULL,
MINFETCHLATENCY_STCNT varchar(32) NOT NULL,
MAXFETCHLATENCY_MIN DECIMAL(20,4) NOT NULL,
MAXFETCHLATENCY_MAX DECIMAL(20,4) NOT NULL,
MAXFETCHLATENCY_STCNT varchar(32) NOT NULL,
AVERAGEINSERTLATENCY_MIN DECIMAL(20,4) NOT NULL,
AVERAGEINSERTLATENCY_MAX DECIMAL(20,4) NOT NULL,
AVERAGEINSERTLATENCY_STCNT varchar(32) NOT NULL,
MININSERTLATENCY_MIN DECIMAL(20,4) NOT NULL,
MININSERTLATENCY_MAX DECIMAL(20,4) NOT NULL,
MININSERTLATENCY_STCNT varchar(32) NOT NULL,
MAXINSERTLATENCY_MIN DECIMAL(20,4) NOT NULL,
MAXINSERTLATENCY_MAX DECIMAL(20,4) NOT NULL,
MAXINSERTLATENCY_STCNT varchar(32) NOT NULL,
AVERAGEUPDATELATENCY_MIN DECIMAL(20,4) NOT NULL,
AVERAGEUPDATELATENCY_MAX DECIMAL(20,4) NOT NULL,
AVERAGEUPDATELATENCY_STCNT varchar(32) NOT NULL,
MINUPDATELATENCY_MIN DECIMAL(20,4) NOT NULL,
MINUPDATELATENCY_MAX DECIMAL(20,4) NOT NULL,
MINUPDATELATENCY_STCNT varchar(32) NOT NULL,
MAXUPDATELATENCY_MIN DECIMAL(20,4) NOT NULL,
MAXUPDATELATENCY_MAX DECIMAL(20,4) NOT NULL,
MAXUPDATELATENCY_STCNT varchar(32) NOT NULL,
AVERAGEDELETELATENCY_MIN DECIMAL(20,4) NOT NULL,
AVERAGEDELETELATENCY_MAX DECIMAL(20,4) NOT NULL,
AVERAGEDELETELATENCY_STCNT varchar(32) NOT NULL,
MINDELETELATENCY_MIN DECIMAL(20,4) NOT NULL,
MINDELETELATENCY_MAX DECIMAL(20,4) NOT NULL,
MINDELETELATENCY_STCNT varchar(32) NOT NULL,
MAXDELETELATENCY_MIN DECIMAL(20,4) NOT NULL,
MAXDELETELATENCY_MAX DECIMAL(20,4) NOT NULL,
MAXDELETELATENCY_STCNT varchar(32) NOT NULL
);
ALTER TABLE MySQLIndexIOTest_TREND ADD constraint PK_MySQLIndexIOTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE MySQLIndexIOTest_THRESH;
CREATE TABLE MySQLIndexIOTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
WAITCOUNT_MIN VARCHAR(256) NOT NULL,
WAITCOUNT_MAX VARCHAR(256) NOT NULL,
AVERAGEWAITTIME_MIN VARCHAR(256) NOT NULL,
AVERAGEWAITTIME_MAX VARCHAR(256) NOT NULL,
MINWAITTIME_MIN VARCHAR(256) NOT NULL,
MINWAITTIME_MAX VARCHAR(256) NOT NULL,
MAXWAITTIME_MIN VARCHAR(256) NOT NULL,
MAXWAITTIME_MAX VARCHAR(256) NOT NULL,
AVERAGEREADLATENCY_MIN VARCHAR(256) NOT NULL,
AVERAGEREADLATENCY_MAX VARCHAR(256) NOT NULL,
MINREADLATENCY_MIN VARCHAR(256) NOT NULL,
MINREADLATENCY_MAX VARCHAR(256) NOT NULL,
MAXREADLATENCY_MIN VARCHAR(256) NOT NULL,
MAXREADLATENCY_MAX VARCHAR(256) NOT NULL,
AVERAGEWRITELATENCY_MIN VARCHAR(256) NOT NULL,
AVERAGEWRITELATENCY_MAX VARCHAR(256) NOT NULL,
MINWRITELATENCY_MIN VARCHAR(256) NOT NULL,
MINWRITELATENCY_MAX VARCHAR(256) NOT NULL,
MAXWRITELATENCY_MIN VARCHAR(256) NOT NULL,
MAXWRITELATENCY_MAX VARCHAR(256) NOT NULL,
AVERAGEFETCHLATENCY_MIN VARCHAR(256) NOT NULL,
AVERAGEFETCHLATENCY_MAX VARCHAR(256) NOT NULL,
MINFETCHLATENCY_MIN VARCHAR(256) NOT NULL,
MINFETCHLATENCY_MAX VARCHAR(256) NOT NULL,
MAXFETCHLATENCY_MIN VARCHAR(256) NOT NULL,
MAXFETCHLATENCY_MAX VARCHAR(256) NOT NULL,
AVERAGEINSERTLATENCY_MIN VARCHAR(256) NOT NULL,
AVERAGEINSERTLATENCY_MAX VARCHAR(256) NOT NULL,
MININSERTLATENCY_MIN VARCHAR(256) NOT NULL,
MININSERTLATENCY_MAX VARCHAR(256) NOT NULL,
MAXINSERTLATENCY_MIN VARCHAR(256) NOT NULL,
MAXINSERTLATENCY_MAX VARCHAR(256) NOT NULL,
AVERAGEUPDATELATENCY_MIN VARCHAR(256) NOT NULL,
AVERAGEUPDATELATENCY_MAX VARCHAR(256) NOT NULL,
MINUPDATELATENCY_MIN VARCHAR(256) NOT NULL,
MINUPDATELATENCY_MAX VARCHAR(256) NOT NULL,
MAXUPDATELATENCY_MIN VARCHAR(256) NOT NULL,
MAXUPDATELATENCY_MAX VARCHAR(256) NOT NULL,
AVERAGEDELETELATENCY_MIN VARCHAR(256) NOT NULL,
AVERAGEDELETELATENCY_MAX VARCHAR(256) NOT NULL,
MINDELETELATENCY_MIN VARCHAR(256) NOT NULL,
MINDELETELATENCY_MAX VARCHAR(256) NOT NULL,
MAXDELETELATENCY_MIN VARCHAR(256) NOT NULL,
MAXDELETELATENCY_MAX VARCHAR(256) NOT NULL
);
ALTER TABLE MySQLIndexIOTest_THRESH ADD constraint PK_MySQLIndexIOTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_MySQLIndexIOTest_THRESH ON MySQLIndexIOTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_MySQLIndexIOTest ON MySQLIndexIOTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_MySQLIndexIOTest ON MySQLIndexIOTest_TREND (MSMT_TIME,PERIOD);



DROP TABLE MySQLCluNodAvlTest;
 CREATE TABLE MySQLCluNodAvlTest(
 TRGT_HOST       varchar(32) NOT NULL,
 PORT_NO         varchar(32) NOT NULL,
 SITE_NAME       varchar(64) NOT NULL,
 INFO            varchar(128) NOT NULL,
 MSMT_HOST       varchar(32) NOT NULL,
 MSMT_TIME       datetime NOT NULL,
 CONNAVAILABLE Decimal(20,4) NOT NULL,
 CONNAVAILABLE_ST varchar(32) NOT NULL,
 DBCONNRESTIME Decimal(20,4) NOT NULL,
 DBCONNRESTIME_ST varchar(32) NOT NULL,
 QURYPRCSAVALBTY Decimal(20,4) NOT NULL,
 QURYPRCSAVALBTY_ST varchar(32) NOT NULL,
 QURYEXETIME Decimal(20,4) NOT NULL,
 QURYEXETIME_ST varchar(32) NOT NULL,
 NOOFRECORDS Decimal(20,4) NOT NULL, 
 NOOFRECORDS_ST varchar(32) NOT NULL,
 AVERAGERESTIME Decimal(20,4) NOT NULL, 
 AVERAGERESTIME_ST varchar(32) NOT NULL);
 CREATE INDEX IDX_MySQLCluNodAvlTest ON MySQLCluNodAvlTest(MSMT_TIME);
 ALTER TABLE MySQLCluNodAvlTest ADD constraint PK_MySQLCluNodAvlTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
 
 DROP TABLE MySQLCluNodAvlTest_TREND ;
 CREATE TABLE MySQLCluNodAvlTest_TREND(
 TRGT_HOST       varchar(32)NOT NULL,
 PORT_NO         varchar(32)NOT NULL,
 SITE_NAME       varchar(64)NOT NULL,
 INFO            varchar(128)NOT NULL,
 MSMT_HOST       varchar(32)NOT NULL,
 MSMT_TIME       datetime NOT NULL,
 PERIOD       	varchar(32) NOT NULL,
 CONNAVAILABLE_MIN Decimal(20,4) NOT NULL,
 CONNAVAILABLE_MAX Decimal(20,4) NOT NULL,
 CONNAVAILABLE_STCNT varchar(32) NOT NULL,
 DBCONNRESTIME_MIN Decimal(20,4) NOT NULL,
 DBCONNRESTIME_MAX Decimal(20,4) NOT NULL,
 DBCONNRESTIME_STCNT varchar(32) NOT NULL,
 QURYPRCSAVALBTY_MIN Decimal(20,4) NOT NULL,
 QURYPRCSAVALBTY_MAX Decimal(20,4) NOT NULL,
 QURYPRCSAVALBTY_STCNT varchar(32) NOT NULL,
 QURYEXETIME_MIN Decimal(20,4) NOT NULL,
 QURYEXETIME_MAX Decimal(20,4) NOT NULL,
 QURYEXETIME_STCNT varchar(32) NOT NULL,
 NOOFRECORDS_MIN Decimal(20,4) NOT NULL,
 NOOFRECORDS_MAX Decimal(20,4) NOT NULL, 
 NOOFRECORDS_STCNT varchar(32) NOT NULL,
 AVERAGERESTIME_MIN Decimal(20,4) NOT NULL,
 AVERAGERESTIME_MAX Decimal(20,4) NOT NULL, 
 AVERAGERESTIME_STCNT varchar(32) NOT NULL);
 ALTER TABLE MySQLCluNodAvlTest_TREND ADD constraint PK_MySQLCluNodAvlTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
 DROP TABLE MySQLCluNodAvlTest_THRESH ;
 CREATE TABLE MySQLCluNodAvlTest_THRESH(
 TRGT_HOST       varchar(32) NOT NULL,
 PORT_NO         varchar(32) NOT NULL,
 SITE_NAME       varchar(64) NOT NULL,
 INFO            varchar(128) NOT NULL, 
 MSMT_HOST       varchar(32) NOT NULL,
 MSMT_TIME_START datetime NOT NULL,
 MSMT_TIME_END   datetime NOT NULL,
 CONNAVAILABLE_MIN varchar(256) NOT NULL,
 CONNAVAILABLE_MAX varchar(256) NOT NULL,
 DBCONNRESTIME_MIN varchar(256) NOT NULL,
 DBCONNRESTIME_MAX varchar(256) NOT NULL,
 QURYPRCSAVALBTY_MIN varchar(256) NOT NULL,
 QURYPRCSAVALBTY_MAX varchar(256) NOT NULL,
 QURYEXETIME_MIN varchar(256) NOT NULL,
 QURYEXETIME_MAX varchar(256) NOT NULL,
 NOOFRECORDS_MIN varchar(256) NOT NULL,
 NOOFRECORDS_MAX varchar(256) NOT NULL, 
 AVERAGERESTIME_MIN varchar(256) NOT NULL, 
 AVERAGERESTIME_MAX varchar(256) NOT NULL);
 ALTER TABLE MySQLCluNodAvlTest_THRESH ADD constraint PK_MySQLCluNodAvlTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
 CREATE INDEX IDX_MySQLCluNodAvlTest_THRESH ON MySQLCluNodAvlTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
 CREATE INDEX IDX_TH_MySQLCluNodAvlTest ON MySQLCluNodAvlTest_THRESH (MSMT_TIME_START);
 CREATE INDEX IDX_TR_MySQLCluNodAvlTest ON MySQLCluNodAvlTest_TREND (MSMT_TIME,PERIOD);
 
 DROP TABLE MySQLCluRepStTest;
 CREATE TABLE MySQLCluRepStTest(
 TRGT_HOST       varchar(32) NOT NULL,
 PORT_NO         varchar(32) NOT NULL,
 SITE_NAME       varchar(64) NOT NULL,
 INFO            varchar(128) NOT NULL,
 MSMT_HOST       varchar(32) NOT NULL,
 MSMT_TIME       datetime NOT NULL,
 NoOfTransactions Decimal(20,4) NOT NULL,
 NoOfTransactions_ST varchar(32) NOT NULL,
 MaxRepLagTime Decimal(20,4) NOT NULL,
 MaxRepLagTime_ST varchar(32) NOT NULL,
 NoOfTransactionErrors Decimal(20,4) NOT NULL,
 NoOfTransactionErrors_ST varchar(32) NOT NULL,
 MinRepLagTime Decimal(20,4) NOT NULL, 
 MinRepLagTime_ST varchar(32) NOT NULL,
 RepLagTime Decimal(20,4) NOT NULL, 
 RepLagTime_ST varchar(32) NOT NULL);
 CREATE INDEX IDX_MySQLCluRepStTest ON MySQLCluRepStTest(MSMT_TIME);
 ALTER TABLE MySQLCluRepStTest ADD constraint PK_MySQLCluRepStTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
 
 DROP TABLE MySQLCluRepStTest_TREND ;
 CREATE TABLE MySQLCluRepStTest_TREND(
 TRGT_HOST       varchar(32) NOT NULL,
 PORT_NO         varchar(32) NOT NULL,
 SITE_NAME       varchar(64) NOT NULL,
 INFO            varchar(128) NOT NULL,
 MSMT_HOST       varchar(32) NOT NULL,
 MSMT_TIME       datetime NOT NULL,
 PERIOD       	varchar(32) NOT NULL,
 NoOfTransactions_MIN Decimal(20,4) NOT NULL,
 NoOfTransactions_MAX Decimal(20,4) NOT NULL,
 NoOfTransactions_STCNT varchar(32) NOT NULL,
 MaxRepLagTime_MIN Decimal(20,4) NOT NULL,
 MaxRepLagTime_MAX Decimal(20,4) NOT NULL,
 MaxRepLagTime_STCNT varchar(32) NOT NULL,
 NoOfTransactionErrors_MIN Decimal(20,4) NOT NULL,
 NoOfTransactionErrors_MAX Decimal(20,4) NOT NULL, 
 NoOfTransactionErrors_STCNT varchar(32) NOT NULL,
 MinRepLagTime_MIN Decimal(20,4) NOT NULL,
 MinRepLagTime_MAX Decimal(20,4) NOT NULL, 
 MinRepLagTime_STCNT varchar(32) NOT NULL,
 RepLagTime_MIN Decimal(20,4) NOT NULL,
 RepLagTime_MAX Decimal(20,4) NOT NULL, 
 RepLagTime_STCNT varchar(32) NOT NULL);
 ALTER TABLE MySQLCluRepStTest_TREND ADD constraint PK_MySQLCluRepStTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
 
 DROP TABLE MySQLCluRepStTest_THRESH ;
 CREATE TABLE MySQLCluRepStTest_THRESH(
 TRGT_HOST       varchar(32) NOT NULL,
 PORT_NO         varchar(32) NOT NULL,
 SITE_NAME       varchar(64) NOT NULL,
 INFO            varchar(128) NOT NULL,
 MSMT_HOST       varchar(32) NOT NULL,
 MSMT_TIME_START datetime NOT NULL,
 MSMT_TIME_END   datetime NOT NULL,
 NoOfTransactions_MIN varchar(256) NOT NULL,
 NoOfTransactions_MAX varchar(256) NOT NULL,
 MaxRepLagTime_MIN varchar(256) NOT NULL,
 MaxRepLagTime_MAX varchar(256) NOT NULL,
 NoOfTransactionErrors_MIN varchar(256) NOT NULL, 
 NoOfTransactionErrors_MAX varchar(256) NOT NULL,
 MinRepLagTime_MIN varchar(256) NOT NULL, 
 MinRepLagTime_MAX varchar(256) NOT NULL,
 RepLagTime_MIN varchar(256) NOT NULL, 
 RepLagTime_MAX varchar(256) NOT NULL);
 ALTER TABLE MySQLCluRepStTest_THRESH ADD constraint PK_MySQLCluRepStTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
 CREATE INDEX IDX_MySQLCluRepStTest_THRESH ON MySQLCluRepStTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
 CREATE INDEX IDX_TH_MySQLCluRepStTest ON MySQLCluRepStTest_THRESH (MSMT_TIME_START);
 CREATE INDEX IDX_TR_MySQLCluRepStTest ON MySQLCluRepStTest_TREND (MSMT_TIME,PERIOD);
 DROP TABLE MySQLCluMembTest;
CREATE TABLE MySQLCluMembTest(TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
MEMBERSTATE Decimal(20,4) NOT NULL,
MEMBERSTATE_ST varchar(32) NOT NULL,
ISPRIMARY Decimal(20,4) NOT NULL,
ISPRIMARY_ST varchar(32) NOT NULL,
ISSWITCHED Decimal(20,4) NOT NULL,
ISSWITCHED_ST varchar(32) NOT NULL,
PRIMARYCOUNT Decimal(20,4) NOT NULL,
PRIMARYCOUNT_ST varchar(32) NOT NULL,
SECONDARYCOUNT Decimal(20,4) NOT NULL,
SECONDARYCOUNT_ST varchar(32) NOT NULL,
ISREADWRITE Decimal(20,4) NOT NULL,
ISREADWRITE_ST varchar(32) NOT NULL,NOOFREADWRITENODES Decimal(20,4) NOT NULL,
NOOFREADWRITENODES_ST varchar(32) NOT NULL,NOOFREADONLYNODES Decimal(20,4) NOT NULL,
NOOFREADONLYNODES_ST varchar(32) NOT NULL,NOOFONLINENODES Decimal(20,4) NOT NULL,
NOOFONLINENODES_ST varchar(32) NOT NULL,NOOFRECOVERINGNODES Decimal(20,4) NOT NULL,
NOOFRECOVERINGNODES_ST varchar(32) NOT NULL,NOOFOFFLINENODES Decimal(20,4) NOT NULL,
NOOFOFFLINENODES_ST varchar(32) NOT NULL,NOOFERRORNODES Decimal(20,4) NOT NULL,
NOOFERRORNODES_ST varchar(32) NOT NULL,NOOFUNREACHABLENODES Decimal(20,4) NOT NULL,
NOOFUNREACHABLENODES_ST varchar(32) NOT NULL,TOTALDecimalOFNODES Decimal(20,4) NOT NULL,
TOTALDecimalOFNODES_ST varchar(32) NOT NULL,HEALTHSTATE Decimal(20,4) NOT NULL, 
HEALTHSTATE_ST varchar(32) NOT NULL);
 CREATE INDEX IDX_MySQLCluMembTest ON MySQLCluMembTest(MSMT_TIME);
 ALTER TABLE MySQLCluMembTest ADD constraint PK_MySQLCluMembTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
 
 DROP TABLE MySQLCluMembTest_TREND ;
CREATE TABLE MySQLCluMembTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
MEMBERSTATE_MIN Decimal(20,4) NOT NULL,
MEMBERSTATE_MAX Decimal(20,4) NOT NULL,
MEMBERSTATE_STCNT varchar(32) NOT NULL,
ISPRIMARY_MIN Decimal(20,4) NOT NULL,
ISPRIMARY_MAX Decimal(20,4) NOT NULL,
ISPRIMARY_STCNT varchar(32) NOT NULL,
ISSWITCHED_MIN Decimal(20,4) NOT NULL,
ISSWITCHED_MAX Decimal(20,4) NOT NULL,
ISSWITCHED_STCNT varchar(32) NOT NULL,
PRIMARYCOUNT_MIN Decimal(20,4) NOT NULL,
PRIMARYCOUNT_MAX Decimal(20,4) NOT NULL,
PRIMARYCOUNT_STCNT varchar(32) NOT NULL,
SECONDARYCOUNT_MIN Decimal(20,4) NOT NULL,
SECONDARYCOUNT_MAX Decimal(20,4) NOT NULL,
SECONDARYCOUNT_STCNT varchar(32) NOT NULL,
ISREADWRITE_MIN Decimal(20,4) NOT NULL,
ISREADWRITE_MAX Decimal(20,4) NOT NULL,
ISREADWRITE_STCNT varchar(32) NOT NULL,
NOOFREADWRITENODES_MIN Decimal(20,4) NOT NULL,
NOOFREADWRITENODES_MAX Decimal(20,4) NOT NULL,
NOOFREADWRITENODES_STCNT varchar(32) NOT NULL,
NOOFREADONLYNODES_MIN Decimal(20,4) NOT NULL,
NOOFREADONLYNODES_MAX Decimal(20,4) NOT NULL,
NOOFREADONLYNODES_STCNT varchar(32) NOT NULL,
NOOFONLINENODES_MIN Decimal(20,4) NOT NULL,
NOOFONLINENODES_MAX Decimal(20,4) NOT NULL,
NOOFONLINENODES_STCNT varchar(32) NOT NULL,
NOOFRECOVERINGNODES_MIN Decimal(20,4) NOT NULL,
NOOFRECOVERINGNODES_MAX Decimal(20,4) NOT NULL,
NOOFRECOVERINGNODES_STCNT varchar(32) NOT NULL,
NOOFOFFLINENODES_MIN Decimal(20,4) NOT NULL,
NOOFOFFLINENODES_MAX Decimal(20,4) NOT NULL,
NOOFOFFLINENODES_STCNT varchar(32) NOT NULL,
NOOFERRORNODES_MIN Decimal(20,4) NOT NULL,
NOOFERRORNODES_MAX Decimal(20,4) NOT NULL,
NOOFERRORNODES_STCNT varchar(32) NOT NULL,
NOOFUNREACHABLENODES_MIN Decimal(20,4) NOT NULL,
NOOFUNREACHABLENODES_MAX Decimal(20,4) NOT NULL,
NOOFUNREACHABLENODES_STCNT varchar(32) NOT NULL,
TOTALDecimalOFNODES_MIN Decimal(20,4) NOT NULL,
TOTALDecimalOFNODES_MAX Decimal(20,4) NOT NULL,
TOTALDecimalOFNODES_STCNT varchar(32) NOT NULL,
HEALTHSTATE_MIN Decimal(20,4) NOT NULL,
HEALTHSTATE_MAX Decimal(20,4) NOT NULL, 
HEALTHSTATE_STCNT varchar(32) NOT NULL);
 ALTER TABLE MySQLCluMembTest_TREND ADD constraint PK_MySQLCluMembTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
 DROP TABLE MySQLCluMembTest_THRESH ;
CREATE TABLE MySQLCluMembTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
MEMBERSTATE_MIN varchar(256) NOT NULL,
MEMBERSTATE_MAX varchar(256) NOT NULL,
ISPRIMARY_MIN varchar(256) NOT NULL,
ISPRIMARY_MAX varchar(256) NOT NULL,
ISSWITCHED_MIN varchar(256) NOT NULL,
ISSWITCHED_MAX varchar(256) NOT NULL,
PRIMARYCOUNT_MIN varchar(256) NOT NULL,
PRIMARYCOUNT_MAX varchar(256) NOT NULL,
SECONDARYCOUNT_MIN varchar(256) NOT NULL,
SECONDARYCOUNT_MAX varchar(256) NOT NULL,
ISREADWRITE_MIN varchar(256) NOT NULL,
ISREADWRITE_MAX varchar(256) NOT NULL,
NOOFREADWRITENODES_MIN varchar(256) NOT NULL,
NOOFREADWRITENODES_MAX varchar(256) NOT NULL,
NOOFREADONLYNODES_MIN varchar(256) NOT NULL,
NOOFREADONLYNODES_MAX varchar(256) NOT NULL,
NOOFONLINENODES_MIN varchar(256) NOT NULL,
NOOFONLINENODES_MAX varchar(256) NOT NULL,
NOOFRECOVERINGNODES_MIN varchar(256) NOT NULL,
NOOFRECOVERINGNODES_MAX varchar(256) NOT NULL,
NOOFOFFLINENODES_MIN varchar(256) NOT NULL,
NOOFOFFLINENODES_MAX varchar(256) NOT NULL,
NOOFERRORNODES_MIN varchar(256) NOT NULL,
NOOFERRORNODES_MAX varchar(256) NOT NULL,
NOOFUNREACHABLENODES_MIN varchar(256) NOT NULL,
NOOFUNREACHABLENODES_MAX varchar(256) NOT NULL,
TOTALDecimalOFNODES_MIN varchar(256) NOT NULL,
TOTALDecimalOFNODES_MAX varchar(256) NOT NULL,
HEALTHSTATE_MIN varchar(256) NOT NULL, 
HEALTHSTATE_MAX varchar(256) NOT NULL);
 ALTER TABLE MySQLCluMembTest_THRESH ADD constraint PK_MySQLCluMembTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
 CREATE INDEX IDX_MySQLCluMembTest_THRESH ON MySQLCluMembTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
 CREATE INDEX IDX_TH_MySQLCluMembTest ON MySQLCluMembTest_THRESH (MSMT_TIME_START);
 CREATE INDEX IDX_TR_MySQLCluMembTest ON MySQLCluMembTest_TREND (MSMT_TIME,PERIOD);
 
  DROP TABLE MySQLCluConTest;
CREATE TABLE MySQLCluConTest(
TRGT_HOST	varchar(32) NOT NULL,
PORT_NO	varchar(32) NOT NULL,
SITE_NAME	varchar(64) NOT NULL,
INFO		varchar(128) NOT NULL,
MSMT_HOST	varchar(32) NOT NULL,
MSMT_TIME	datetime NOT NULL,
CONNS_CREATE_RATE Decimal(20,4) NOT NULL,
CONNS_CREATE_RATE_ST varchar(32) NOT NULL,
ACTIVE_CONNS Decimal(20,4) NOT NULL,
ACTIVE_CONNS_ST varchar(32) NOT NULL,
CONNS_ABORTED Decimal(20,4) NOT NULL,
CONNS_ABORTED_ST varchar(32) NOT NULL,
CONNS_FAILED Decimal(20,4) NOT NULL,
CONNS_FAILED_ST varchar(32) NOT NULL,
MAX_CONNS Decimal(20,4) NOT NULL,
MAX_CONNS_ST varchar(32) NOT NULL,
MAX_CONNS_LIMIT Decimal(20,4) NOT NULL,
MAX_CONNS_LIMIT_ST varchar(32) NOT NULL,
CONNECTION_USAGE Decimal(20,4) NOT NULL,
 CONNECTION_USAGE_ST varchar(32) NOT NULL);
 ALTER TABLE MySQLCluConTest ADD constraint PK_MySQLCluConTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
 CREATE  INDEX IDX_MySQLCluConTest ON MySQLCluConTest(MSMT_TIME);
 
 DROP TABLE MySQLCluConTest_TREND ;
CREATE TABLE MySQLCluConTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
CONNS_CREATE_RATE_MIN Decimal(20,4) NOT NULL,
CONNS_CREATE_RATE_MAX Decimal(20,4) NOT NULL,
CONNS_CREATE_RATE_STCNT varchar(32) NOT NULL,
ACTIVE_CONNS_MIN Decimal(20,4) NOT NULL,
ACTIVE_CONNS_MAX Decimal(20,4) NOT NULL,
ACTIVE_CONNS_STCNT varchar(32) NOT NULL,
CONNS_ABORTED_MIN Decimal(20,4) NOT NULL,
CONNS_ABORTED_MAX Decimal(20,4) NOT NULL,
CONNS_ABORTED_STCNT varchar(32) NOT NULL,
CONNS_FAILED_MIN Decimal(20,4) NOT NULL,
CONNS_FAILED_MAX Decimal(20,4) NOT NULL,
CONNS_FAILED_STCNT varchar(32) NOT NULL,
MAX_CONNS_MIN Decimal(20,4) NOT NULL,
MAX_CONNS_MAX Decimal(20,4) NOT NULL,
MAX_CONNS_STCNT varchar(32) NOT NULL,
MAX_CONNS_LIMIT_MIN Decimal(20,4) NOT NULL,
MAX_CONNS_LIMIT_MAX Decimal(20,4) NOT NULL,
MAX_CONNS_LIMIT_STCNT varchar(32) NOT NULL,
CONNECTION_USAGE_MIN Decimal(20,4) NOT NULL,
CONNECTION_USAGE_MAX Decimal(20,4) NOT NULL, 
CONNECTION_USAGE_STCNT varchar(32) NOT NULL);
ALTER TABLE MySQLCluConTest_TREND ADD constraint PK_MySQLCluConTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
 
 DROP TABLE MySQLCluConTest_THRESH ;
CREATE TABLE MySQLCluConTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
CONNS_CREATE_RATE_MIN	varchar(256)	 NOT NULL,
CONNS_CREATE_RATE_MAX	varchar(256)	 NOT NULL,
ACTIVE_CONNS_MIN	varchar(256)	 NOT NULL,
ACTIVE_CONNS_MAX	varchar(256)	 NOT NULL,
CONNS_ABORTED_MIN	varchar(256)	 NOT NULL,
CONNS_ABORTED_MAX	varchar(256)	 NOT NULL,
CONNS_FAILED_MIN	varchar(256)	 NOT NULL,
CONNS_FAILED_MAX	varchar(256)	 NOT NULL,
MAX_CONNS_MIN	varchar(256)	 NOT NULL,
MAX_CONNS_MAX	varchar(256)	 NOT NULL,
MAX_CONNS_LIMIT_MIN	varchar(256)	 NOT NULL,
MAX_CONNS_LIMIT_MAX	varchar(256)	 NOT NULL,
CONNECTION_USAGE_MIN	varchar(256)	 NOT NULL,
 CONNECTION_USAGE_MAX	varchar(256)	 NOT NULL);
 ALTER TABLE MySQLCluConTest_THRESH ADD constraint PK_MySQLCluConTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
 CREATE INDEX IDX_MySQLCluConTest_THRESH ON MySQLCluConTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
 CREATE INDEX IDX_TH_MySQLCluConTest ON MySQLCluConTest_THRESH (MSMT_TIME_START);
 CREATE INDEX IDX_TR_MySQLCluConTest ON MySQLCluConTest_TREND (MSMT_TIME,PERIOD);
 
 DROP TABLE OraRacDeKiPrTest;
CREATE TABLE OraRacDeKiPrTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PROCESS_STATE DECIMAL(20,4) NOT NULL,
PROCESS_STATE_ST varchar(32) NOT NULL,
DEAD_TIME DECIMAL(20,4) NOT NULL,
DEAD_TIME_ST varchar(32) NOT NULL,
NUM_BLOCKED DECIMAL(20,4) NOT NULL,
NUM_BLOCKED_ST varchar(32) NOT NULL);

CREATE INDEX IDX_OraRacDeKiPrTest ON OraRacDeKiPrTest(MSMT_TIME);
ALTER TABLE OraRacDeKiPrTest ADD constraint PK_OraRacDeKiPrTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE OraRacDeKiPrTest_TREND;
CREATE TABLE OraRacDeKiPrTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
PROCESS_STATE_MIN DECIMAL(20,4) NOT NULL,
PROCESS_STATE_MAX DECIMAL(20,4) NOT NULL,
PROCESS_STATE_STCNT varchar(32) NOT NULL,
DEAD_TIME_MIN DECIMAL(20,4) NOT NULL,
DEAD_TIME_MAX DECIMAL(20,4) NOT NULL,
DEAD_TIME_STCNT varchar(32) NOT NULL,
NUM_BLOCKED_MIN DECIMAL(20,4) NOT NULL,
NUM_BLOCKED_MAX DECIMAL(20,4) NOT NULL,
NUM_BLOCKED_STCNT varchar(32) NOT NULL);

ALTER TABLE OraRacDeKiPrTest_TREND ADD constraint PK_OraRacDeKiPrTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE OraRacDeKiPrTest_THRESH;
CREATE TABLE OraRacDeKiPrTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
PROCESS_STATE_MIN VARCHAR(256) NOT NULL,
PROCESS_STATE_MAX VARCHAR(256) NOT NULL,
DEAD_TIME_MIN VARCHAR(256) NOT NULL,
DEAD_TIME_MAX VARCHAR(256) NOT NULL,
NUM_BLOCKED_MIN VARCHAR(256) NOT NULL,
NUM_BLOCKED_MAX VARCHAR(256) NOT NULL);

ALTER TABLE OraRacDeKiPrTest_THRESH ADD constraint PK_OraRacDeKiPrTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_OraRacDeKiPrTest_THRESH ON OraRacDeKiPrTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_OraRacDeKiPrTest ON OraRacDeKiPrTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_OraRacDeKiPrTest ON OraRacDeKiPrTest_TREND (MSMT_TIME,PERIOD);



DROP TABLE OraRacOtFiIOTest;
CREATE TABLE OraRacOtFiIOTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
MULTIBLOCK_READTIME DECIMAL(20,4) NOT NULL,
MULTIBLOCK_READTIME_ST varchar(32) NOT NULL,
SINGLEBLOCK_READTIME DECIMAL(20,4) NOT NULL,
SINGLEBLOCK_READTIME_ST varchar(32) NOT NULL,
MULTIBLOCK_WRITETIME DECIMAL(20,4) NOT NULL,
MULTIBLOCK_WRITETIME_ST varchar(32) NOT NULL,
SINGLEBLOCK_WRITETIME DECIMAL(20,4) NOT NULL,
SINGLEBLOCK_WRITETIME_ST varchar(32) NOT NULL,
AVG_SYNCREADLATENCY DECIMAL(20,4) NOT NULL,
AVG_SYNCREADLATENCY_ST varchar(32) NOT NULL,
FILE_IO DECIMAL(20,4) NOT NULL,
FILE_IO_ST varchar(32) NOT NULL);

CREATE INDEX IDX_OraRacOtFiIOTest ON OraRacOtFiIOTest(MSMT_TIME);
ALTER TABLE OraRacOtFiIOTest ADD constraint PK_OraRacOtFiIOTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE OraRacOtFiIOTest_TREND;
CREATE TABLE OraRacOtFiIOTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
MULTIBLOCK_READTIME_MIN DECIMAL(20,4) NOT NULL,
MULTIBLOCK_READTIME_MAX DECIMAL(20,4) NOT NULL,
MULTIBLOCK_READTIME_STCNT varchar(32) NOT NULL,
SINGLEBLOCK_READTIME_MIN DECIMAL(20,4) NOT NULL,
SINGLEBLOCK_READTIME_MAX DECIMAL(20,4) NOT NULL,
SINGLEBLOCK_READTIME_STCNT varchar(32) NOT NULL,
MULTIBLOCK_WRITETIME_MIN DECIMAL(20,4) NOT NULL,
MULTIBLOCK_WRITETIME_MAX DECIMAL(20,4) NOT NULL,
MULTIBLOCK_WRITETIME_STCNT varchar(32) NOT NULL,
SINGLEBLOCK_WRITETIME_MIN DECIMAL(20,4) NOT NULL,
SINGLEBLOCK_WRITETIME_MAX DECIMAL(20,4) NOT NULL,
SINGLEBLOCK_WRITETIME_STCNT varchar(32) NOT NULL,
AVG_SYNCREADLATENCY_MIN DECIMAL(20,4) NOT NULL,
AVG_SYNCREADLATENCY_MAX DECIMAL(20,4) NOT NULL,
AVG_SYNCREADLATENCY_STCNT varchar(32) NOT NULL,
FILE_IO_MIN DECIMAL(20,4) NOT NULL,
FILE_IO_MAX DECIMAL(20,4) NOT NULL,
FILE_IO_STCNT varchar(32) NOT NULL);

ALTER TABLE OraRacOtFiIOTest_TREND ADD constraint PK_OraRacOtFiIOTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE OraRacOtFiIOTest_THRESH;
CREATE TABLE OraRacOtFiIOTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
MULTIBLOCK_READTIME_MIN VARCHAR(256) NOT NULL,
MULTIBLOCK_READTIME_MAX VARCHAR(256) NOT NULL,
SINGLEBLOCK_READTIME_MIN VARCHAR(256) NOT NULL,
SINGLEBLOCK_READTIME_MAX VARCHAR(256) NOT NULL,
MULTIBLOCK_WRITETIME_MIN VARCHAR(256) NOT NULL,
MULTIBLOCK_WRITETIME_MAX VARCHAR(256) NOT NULL,
SINGLEBLOCK_WRITETIME_MIN VARCHAR(256) NOT NULL,
SINGLEBLOCK_WRITETIME_MAX VARCHAR(256) NOT NULL,
AVG_SYNCREADLATENCY_MIN VARCHAR(256) NOT NULL,
AVG_SYNCREADLATENCY_MAX VARCHAR(256) NOT NULL,
FILE_IO_MIN VARCHAR(256) NOT NULL,
FILE_IO_MAX VARCHAR(256) NOT NULL);

ALTER TABLE OraRacOtFiIOTest_THRESH ADD constraint PK_OraRacOtFiIOTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_OraRacOtFiIOTest_THRESH ON OraRacOtFiIOTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_OraRacOtFiIOTest ON OraRacOtFiIOTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_OraRacOtFiIOTest ON OraRacOtFiIOTest_TREND (MSMT_TIME,PERIOD);







DROP TABLE OraRacSerResTest;
CREATE TABLE OraRacSerResTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
RESP_TIME_PER_TXN DECIMAL(20,4) NOT NULL,
RESP_TIME_PER_TXN_ST varchar(32) NOT NULL,
SQL_SERVICE_RESPONSE DECIMAL(20,4) NOT NULL,
SQL_SERVICE_RESPONSE_ST varchar(32) NOT NULL);

CREATE INDEX IDX_OraRacSerResTest ON OraRacSerResTest(MSMT_TIME);
ALTER TABLE OraRacSerResTest ADD constraint PK_OraRacSerResTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE OraRacSerResTest_TREND;
CREATE TABLE OraRacSerResTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
RESP_TIME_PER_TXN_MIN DECIMAL(20,4) NOT NULL,
RESP_TIME_PER_TXN_MAX DECIMAL(20,4) NOT NULL,
RESP_TIME_PER_TXN_STCNT varchar(32) NOT NULL,
SQL_SERVICE_RESPONSE_MIN DECIMAL(20,4) NOT NULL,
SQL_SERVICE_RESPONSE_MAX DECIMAL(20,4) NOT NULL,
SQL_SERVICE_RESPONSE_STCNT varchar(32) NOT NULL);

ALTER TABLE OraRacSerResTest_TREND ADD constraint PK_OraRacSerResTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE OraRacSerResTest_THRESH;
CREATE TABLE OraRacSerResTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
RESP_TIME_PER_TXN_MIN VARCHAR(256) NOT NULL,
RESP_TIME_PER_TXN_MAX VARCHAR(256) NOT NULL,
SQL_SERVICE_RESPONSE_MIN VARCHAR(256) NOT NULL,
SQL_SERVICE_RESPONSE_MAX VARCHAR(256) NOT NULL);

ALTER TABLE OraRacSerResTest_THRESH ADD constraint PK_OraRacSerResTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_OraRacSerResTest_THRESH ON OraRacSerResTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_OraRacSerResTest ON OraRacSerResTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_OraRacSerResTest ON OraRacSerResTest_TREND (MSMT_TIME,PERIOD);



DROP TABLE OraRacSqlConTest;
CREATE TABLE OraRacSqlConTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
KBYTESSENTRATE DECIMAL(20,4) NOT NULL,
KBYTESSENTRATE_ST varchar(32) NOT NULL,
KBYTESRECVDRATE DECIMAL(20,4) NOT NULL,
KBYTESRECVDRATE_ST varchar(32) NOT NULL);

CREATE INDEX IDX_OraRacSqlConTest ON OraRacSqlConTest(MSMT_TIME);
ALTER TABLE OraRacSqlConTest ADD constraint PK_OraRacSqlConTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE OraRacSqlConTest_TREND;
CREATE TABLE OraRacSqlConTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
KBYTESSENTRATE_MIN DECIMAL(20,4) NOT NULL,
KBYTESSENTRATE_MAX DECIMAL(20,4) NOT NULL,
KBYTESSENTRATE_STCNT varchar(32) NOT NULL,
KBYTESRECVDRATE_MIN DECIMAL(20,4) NOT NULL,
KBYTESRECVDRATE_MAX DECIMAL(20,4) NOT NULL,
KBYTESRECVDRATE_STCNT varchar(32) NOT NULL);

ALTER TABLE OraRacSqlConTest_TREND ADD constraint PK_OraRacSqlConTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE OraRacSqlConTest_THRESH;
CREATE TABLE OraRacSqlConTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
KBYTESSENTRATE_MIN VARCHAR(256) NOT NULL,
KBYTESSENTRATE_MAX VARCHAR(256) NOT NULL,
KBYTESRECVDRATE_MIN VARCHAR(256) NOT NULL,
KBYTESRECVDRATE_MAX VARCHAR(256) NOT NULL);

ALTER TABLE OraRacSqlConTest_THRESH ADD constraint PK_OraRacSqlConTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_OraRacSqlConTest_THRESH ON OraRacSqlConTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_OraRacSqlConTest ON OraRacSqlConTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_OraRacSqlConTest ON OraRacSqlConTest_TREND (MSMT_TIME,PERIOD);



DROP TABLE OraRacTeFiIOTest;
CREATE TABLE OraRacTeFiIOTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
MULTIBLOCK_READTIME DECIMAL(20,4) NOT NULL,
MULTIBLOCK_READTIME_ST varchar(32) NOT NULL,
SINGLEBLOCK_READTIME DECIMAL(20,4) NOT NULL,
SINGLEBLOCK_READTIME_ST varchar(32) NOT NULL,
MULTIBLOCK_WRITETIME DECIMAL(20,4) NOT NULL,
MULTIBLOCK_WRITETIME_ST varchar(32) NOT NULL,
SINGLEBLOCK_WRITETIME DECIMAL(20,4) NOT NULL,
SINGLEBLOCK_WRITETIME_ST varchar(32) NOT NULL,
AVG_SYNCREADLATENCY DECIMAL(20,4) NOT NULL,
AVG_SYNCREADLATENCY_ST varchar(32) NOT NULL,
FILE_IO DECIMAL(20,4) NOT NULL,
FILE_IO_ST varchar(32) NOT NULL);

CREATE INDEX IDX_OraRacTeFiIOTest ON OraRacTeFiIOTest(MSMT_TIME);
ALTER TABLE OraRacTeFiIOTest ADD constraint PK_OraRacTeFiIOTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE OraRacTeFiIOTest_TREND;
CREATE TABLE OraRacTeFiIOTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
MULTIBLOCK_READTIME_MIN DECIMAL(20,4) NOT NULL,
MULTIBLOCK_READTIME_MAX DECIMAL(20,4) NOT NULL,
MULTIBLOCK_READTIME_STCNT varchar(32) NOT NULL,
SINGLEBLOCK_READTIME_MIN DECIMAL(20,4) NOT NULL,
SINGLEBLOCK_READTIME_MAX DECIMAL(20,4) NOT NULL,
SINGLEBLOCK_READTIME_STCNT varchar(32) NOT NULL,
MULTIBLOCK_WRITETIME_MIN DECIMAL(20,4) NOT NULL,
MULTIBLOCK_WRITETIME_MAX DECIMAL(20,4) NOT NULL,
MULTIBLOCK_WRITETIME_STCNT varchar(32) NOT NULL,
SINGLEBLOCK_WRITETIME_MIN DECIMAL(20,4) NOT NULL,
SINGLEBLOCK_WRITETIME_MAX DECIMAL(20,4) NOT NULL,
SINGLEBLOCK_WRITETIME_STCNT varchar(32) NOT NULL,
AVG_SYNCREADLATENCY_MIN DECIMAL(20,4) NOT NULL,
AVG_SYNCREADLATENCY_MAX DECIMAL(20,4) NOT NULL,
AVG_SYNCREADLATENCY_STCNT varchar(32) NOT NULL,
FILE_IO_MIN DECIMAL(20,4) NOT NULL,
FILE_IO_MAX DECIMAL(20,4) NOT NULL,
FILE_IO_STCNT varchar(32) NOT NULL);

ALTER TABLE OraRacTeFiIOTest_TREND ADD constraint PK_OraRacTeFiIOTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE OraRacTeFiIOTest_THRESH;
CREATE TABLE OraRacTeFiIOTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
MULTIBLOCK_READTIME_MIN VARCHAR(256) NOT NULL,
MULTIBLOCK_READTIME_MAX VARCHAR(256) NOT NULL,
SINGLEBLOCK_READTIME_MIN VARCHAR(256) NOT NULL,
SINGLEBLOCK_READTIME_MAX VARCHAR(256) NOT NULL,
MULTIBLOCK_WRITETIME_MIN VARCHAR(256) NOT NULL,
MULTIBLOCK_WRITETIME_MAX VARCHAR(256) NOT NULL,
SINGLEBLOCK_WRITETIME_MIN VARCHAR(256) NOT NULL,
SINGLEBLOCK_WRITETIME_MAX VARCHAR(256) NOT NULL,
AVG_SYNCREADLATENCY_MIN VARCHAR(256) NOT NULL,
AVG_SYNCREADLATENCY_MAX VARCHAR(256) NOT NULL,
FILE_IO_MIN VARCHAR(256) NOT NULL,
FILE_IO_MAX VARCHAR(256) NOT NULL);

ALTER TABLE OraRacTeFiIOTest_THRESH ADD constraint PK_OraRacTeFiIOTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_OraRacTeFiIOTest_THRESH ON OraRacTeFiIOTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_OraRacTeFiIOTest ON OraRacTeFiIOTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_OraRacTeFiIOTest ON OraRacTeFiIOTest_TREND (MSMT_TIME,PERIOD);



DROP TABLE OraRacTransaTest;
CREATE TABLE OraRacTransaTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
USER_COMMITS DECIMAL(20,4) NOT NULL,
USER_COMMITS_ST varchar(32) NOT NULL,
USER_ROLLBACKS DECIMAL(20,4) NOT NULL,
USER_ROLLBACKS_ST varchar(32) NOT NULL,
PCT_ROLLBACKS DECIMAL(20,4) NOT NULL,
PCT_ROLLBACKS_ST varchar(32) NOT NULL);

CREATE INDEX IDX_OraRacTransaTest ON OraRacTransaTest(MSMT_TIME);
ALTER TABLE OraRacTransaTest ADD constraint PK_OraRacTransaTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE OraRacTransaTest_TREND;
CREATE TABLE OraRacTransaTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
USER_COMMITS_MIN DECIMAL(20,4) NOT NULL,
USER_COMMITS_MAX DECIMAL(20,4) NOT NULL,
USER_COMMITS_STCNT varchar(32) NOT NULL,
USER_ROLLBACKS_MIN DECIMAL(20,4) NOT NULL,
USER_ROLLBACKS_MAX DECIMAL(20,4) NOT NULL,
USER_ROLLBACKS_STCNT varchar(32) NOT NULL,
PCT_ROLLBACKS_MIN DECIMAL(20,4) NOT NULL,
PCT_ROLLBACKS_MAX DECIMAL(20,4) NOT NULL,
PCT_ROLLBACKS_STCNT varchar(32) NOT NULL);

ALTER TABLE OraRacTransaTest_TREND ADD constraint PK_OraRacTransaTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE OraRacTransaTest_THRESH;
CREATE TABLE OraRacTransaTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
USER_COMMITS_MIN VARCHAR(256) NOT NULL,
USER_COMMITS_MAX VARCHAR(256) NOT NULL,
USER_ROLLBACKS_MIN VARCHAR(256) NOT NULL,
USER_ROLLBACKS_MAX VARCHAR(256) NOT NULL,
PCT_ROLLBACKS_MIN VARCHAR(256) NOT NULL,
PCT_ROLLBACKS_MAX VARCHAR(256) NOT NULL);

ALTER TABLE OraRacTransaTest_THRESH ADD constraint PK_OraRacTransaTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_OraRacTransaTest_THRESH ON OraRacTransaTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_OraRacTransaTest ON OraRacTransaTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_OraRacTransaTest ON OraRacTransaTest_TREND (MSMT_TIME,PERIOD);



DROP TABLE OraRacUseAudTest;
CREATE TABLE OraRacUseAudTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
LOGIN_SESSIONS DECIMAL(20,4) NOT NULL,
LOGIN_SESSIONS_ST varchar(32) NOT NULL,
LOCKEDUSERS DECIMAL(20,4) NOT NULL,
LOCKEDUSERS_ST varchar(32) NOT NULL,
LOGOFF_SESSIONS DECIMAL(20,4) NOT NULL,
LOGOFF_SESSIONS_ST varchar(32) NOT NULL,
LOGIN_FAILED_SESSIONS DECIMAL(20,4) NOT NULL,
LOGIN_FAILED_SESSIONS_ST varchar(32) NOT NULL);

CREATE INDEX IDX_OraRacUseAudTest ON OraRacUseAudTest(MSMT_TIME);
ALTER TABLE OraRacUseAudTest ADD constraint PK_OraRacUseAudTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE OraRacUseAudTest_TREND;
CREATE TABLE OraRacUseAudTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
LOGIN_SESSIONS_MIN DECIMAL(20,4) NOT NULL,
LOGIN_SESSIONS_MAX DECIMAL(20,4) NOT NULL,
LOGIN_SESSIONS_STCNT varchar(32) NOT NULL,
LOCKEDUSERS_MIN DECIMAL(20,4) NOT NULL,
LOCKEDUSERS_MAX DECIMAL(20,4) NOT NULL,
LOCKEDUSERS_STCNT varchar(32) NOT NULL,
LOGOFF_SESSIONS_MIN DECIMAL(20,4) NOT NULL,
LOGOFF_SESSIONS_MAX DECIMAL(20,4) NOT NULL,
LOGOFF_SESSIONS_STCNT varchar(32) NOT NULL,
LOGIN_FAILED_SESSIONS_MIN DECIMAL(20,4) NOT NULL,
LOGIN_FAILED_SESSIONS_MAX DECIMAL(20,4) NOT NULL,
LOGIN_FAILED_SESSIONS_STCNT varchar(32) NOT NULL);

ALTER TABLE OraRacUseAudTest_TREND ADD constraint PK_OraRacUseAudTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE OraRacUseAudTest_THRESH;
CREATE TABLE OraRacUseAudTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
LOGIN_SESSIONS_MIN VARCHAR(256) NOT NULL,
LOGIN_SESSIONS_MAX VARCHAR(256) NOT NULL,
LOCKEDUSERS_MIN VARCHAR(256) NOT NULL,
LOCKEDUSERS_MAX VARCHAR(256) NOT NULL,
LOGOFF_SESSIONS_MIN VARCHAR(256) NOT NULL,
LOGOFF_SESSIONS_MAX VARCHAR(256) NOT NULL,
LOGIN_FAILED_SESSIONS_MIN VARCHAR(256) NOT NULL,
LOGIN_FAILED_SESSIONS_MAX VARCHAR(256) NOT NULL);

ALTER TABLE OraRacUseAudTest_THRESH ADD constraint PK_OraRacUseAudTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_OraRacUseAudTest_THRESH ON OraRacUseAudTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_OraRacUseAudTest ON OraRacUseAudTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_OraRacUseAudTest ON OraRacUseAudTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE OraRacUptimeTest;
CREATE TABLE OraRacUptimeTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
REBOOTED DECIMAL(20,4) NOT NULL,
REBOOTED_ST varchar(32) NOT NULL,
DIFFUPTIME DECIMAL(20,4) NOT NULL,
DIFFUPTIME_ST varchar(32) NOT NULL,
UPTIME DECIMAL(20,4) NOT NULL,
UPTIME_ST varchar(32) NOT NULL,
DB_OPEN_MODE DECIMAL(20,4) NOT NULL,
DB_OPEN_MODE_ST varchar(32) NOT NULL,
NOOFMOUNTEDNODES DECIMAL(20,4) NOT NULL,
NOOFMOUNTEDNODES_ST varchar(32) NOT NULL,
NOOFREADWRITENODES DECIMAL(20,4) NOT NULL,
NOOFREADWRITENODES_ST varchar(32) NOT NULL,
NOOFREADONLYNODES DECIMAL(20,4) NOT NULL,
NOOFREADONLYNODES_ST varchar(32) NOT NULL,
NOOFREADONLYAPPLYNODES DECIMAL(20,4) NOT NULL,
NOOFREADONLYAPPLYNODES_ST varchar(32) NOT NULL,
TOTALNOOFNODES DECIMAL(20,4) NOT NULL,
TOTALNOOFNODES_ST varchar(32) NOT NULL);

CREATE INDEX IDX_OraRacUptimeTest ON OraRacUptimeTest(MSMT_TIME);
ALTER TABLE OraRacUptimeTest ADD constraint PK_OraRacUptimeTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE OraRacUptimeTest_TREND;
CREATE TABLE OraRacUptimeTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
REBOOTED_MIN DECIMAL(20,4) NOT NULL,
REBOOTED_MAX DECIMAL(20,4) NOT NULL,
REBOOTED_STCNT varchar(32) NOT NULL,
DIFFUPTIME_MIN DECIMAL(20,4) NOT NULL,
DIFFUPTIME_MAX DECIMAL(20,4) NOT NULL,
DIFFUPTIME_STCNT varchar(32) NOT NULL,
UPTIME_MIN DECIMAL(20,4) NOT NULL,
UPTIME_MAX DECIMAL(20,4) NOT NULL,
UPTIME_STCNT varchar(32) NOT NULL,
DB_OPEN_MODE_MIN DECIMAL(20,4) NOT NULL,
DB_OPEN_MODE_MAX DECIMAL(20,4) NOT NULL,
DB_OPEN_MODE_STCNT varchar(32) NOT NULL,
NOOFMOUNTEDNODES_MIN DECIMAL(20,4) NOT NULL,
NOOFMOUNTEDNODES_MAX DECIMAL(20,4) NOT NULL,
NOOFMOUNTEDNODES_STCNT varchar(32) NOT NULL,
NOOFREADWRITENODES_MIN DECIMAL(20,4) NOT NULL,
NOOFREADWRITENODES_MAX DECIMAL(20,4) NOT NULL,
NOOFREADWRITENODES_STCNT varchar(32) NOT NULL,
NOOFREADONLYNODES_MIN DECIMAL(20,4) NOT NULL,
NOOFREADONLYNODES_MAX DECIMAL(20,4) NOT NULL,
NOOFREADONLYNODES_STCNT varchar(32) NOT NULL,
NOOFREADONLYAPPLYNODES_MIN DECIMAL(20,4) NOT NULL,
NOOFREADONLYAPPLYNODES_MAX DECIMAL(20,4) NOT NULL,
NOOFREADONLYAPPLYNODES_STCNT varchar(32) NOT NULL,
TOTALNOOFNODES_MIN DECIMAL(20,4) NOT NULL,
TOTALNOOFNODES_MAX DECIMAL(20,4) NOT NULL,
TOTALNOOFNODES_STCNT varchar(32) NOT NULL);

ALTER TABLE OraRacUptimeTest_TREND ADD constraint PK_OraRacUptimeTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE OraRacUptimeTest_THRESH;
CREATE TABLE OraRacUptimeTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
REBOOTED_MIN VARCHAR(256) NOT NULL,
REBOOTED_MAX VARCHAR(256) NOT NULL,
DIFFUPTIME_MIN VARCHAR(256) NOT NULL,
DIFFUPTIME_MAX VARCHAR(256) NOT NULL,
UPTIME_MIN VARCHAR(256) NOT NULL,
UPTIME_MAX VARCHAR(256) NOT NULL,
DB_OPEN_MODE_MIN VARCHAR(256) NOT NULL,
DB_OPEN_MODE_MAX VARCHAR(256) NOT NULL,
NOOFMOUNTEDNODES_MIN VARCHAR(256) NOT NULL,
NOOFMOUNTEDNODES_MAX VARCHAR(256) NOT NULL,
NOOFREADWRITENODES_MIN VARCHAR(256) NOT NULL,
NOOFREADWRITENODES_MAX VARCHAR(256) NOT NULL,
NOOFREADONLYNODES_MIN VARCHAR(256) NOT NULL,
NOOFREADONLYNODES_MAX VARCHAR(256) NOT NULL,
NOOFREADONLYAPPLYNODES_MIN VARCHAR(256) NOT NULL,
NOOFREADONLYAPPLYNODES_MAX VARCHAR(256) NOT NULL,
TOTALNOOFNODES_MIN VARCHAR(256) NOT NULL,
TOTALNOOFNODES_MAX VARCHAR(256) NOT NULL);

ALTER TABLE OraRacUptimeTest_THRESH ADD constraint PK_OraRacUptimeTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_OraRacUptimeTest_THRESH ON OraRacUptimeTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_OraRacUptimeTest ON OraRacUptimeTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_OraRacUptimeTest ON OraRacUptimeTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE MySQLBackupStTest;
CREATE TABLE MySQLBackupStTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
SUCCESSBACKUP DECIMAL(20,4) NOT NULL,
SUCCESSBACKUP_ST varchar(32) NOT NULL,
FAILEDBACKUP DECIMAL(20,4) NOT NULL,
FAILEDBACKUP_ST varchar(32) NOT NULL,
RUNNINGBACKUP DECIMAL(20,4) NOT NULL,
RUNNINGBACKUP_ST varchar(32) NOT NULL,
MAXSUCCESSBACKUPDURATION DECIMAL(20,4) NOT NULL,
MAXSUCCESSBACKUPDURATION_ST varchar(32) NOT NULL,
NUMBEROFBACKUPS DECIMAL(20,4) NOT NULL,
NUMBEROFBACKUPS_ST varchar(32) NOT NULL);
CREATE INDEX IDX_MySQLBackupStTest ON MySQLBackupStTest(MSMT_TIME);
ALTER TABLE MySQLBackupStTest ADD constraint PK_MySQLBackupStTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE MySQLBackupStTest_TREND;
CREATE TABLE MySQLBackupStTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
SUCCESSBACKUP_MIN DECIMAL(20,4) NOT NULL,
SUCCESSBACKUP_MAX DECIMAL(20,4) NOT NULL,
SUCCESSBACKUP_STCNT varchar(32) NOT NULL,
FAILEDBACKUP_MIN DECIMAL(20,4) NOT NULL,
FAILEDBACKUP_MAX DECIMAL(20,4) NOT NULL,
FAILEDBACKUP_STCNT varchar(32) NOT NULL,
RUNNINGBACKUP_MIN DECIMAL(20,4) NOT NULL,
RUNNINGBACKUP_MAX DECIMAL(20,4) NOT NULL,
RUNNINGBACKUP_STCNT varchar(32) NOT NULL,
MAXSUCCESSBACKUPDURATION_MIN DECIMAL(20,4) NOT NULL,
MAXSUCCESSBACKUPDURATION_MAX DECIMAL(20,4) NOT NULL,
MAXSUCCESSBACKUPDURATION_STCNT varchar(32) NOT NULL,
NUMBEROFBACKUPS_MIN DECIMAL(20,4) NOT NULL,
NUMBEROFBACKUPS_MAX DECIMAL(20,4) NOT NULL, 
NUMBEROFBACKUPS_STCNT varchar(32) NOT NULL);
ALTER TABLE MySQLBackupStTest_TREND ADD constraint PK_MySQLBackupStTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE MySQLBackupStTest_THRESH;
CREATE TABLE MySQLBackupStTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
SUCCESSBACKUP_MIN VARCHAR(256) NOT NULL,
SUCCESSBACKUP_MAX VARCHAR(256) NOT NULL,
FAILEDBACKUP_MIN VARCHAR(256) NOT NULL,
FAILEDBACKUP_MAX VARCHAR(256) NOT NULL,
RUNNINGBACKUP_MIN VARCHAR(256) NOT NULL,
RUNNINGBACKUP_MAX VARCHAR(256) NOT NULL,
MAXSUCCESSBACKUPDURATION_MIN VARCHAR(256) NOT NULL,
MAXSUCCESSBACKUPDURATION_MAX VARCHAR(256) NOT NULL,
NUMBEROFBACKUPS_MIN VARCHAR(256) NOT NULL, 
NUMBEROFBACKUPS_MAX VARCHAR(256) NOT NULL);
ALTER TABLE MySQLBackupStTest_THRESH ADD constraint PK_MySQLBackupStTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_MySQLBackupStTest_THRESH ON MySQLBackupStTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_MySQLBackupStTest ON MySQLBackupStTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_MySQLBackupStTest ON MySQLBackupStTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE MongoExtCluNdStTest;
CREATE TABLE MongoExtCluNdStTest(
	TRGT_HOST       varchar(32) NOT NULL,
	PORT_NO         varchar(32) NOT NULL,
	SITE_NAME       varchar(64) NOT NULL,
	INFO            varchar(128) NOT NULL,
	MSMT_HOST       varchar(32) NOT NULL,
	MSMT_TIME       datetime NOT NULL,
	IS_PRIMARY 		DECIMAL(20,4) NOT NULL,
	IS_PRIMARY_ST 	varchar(32) NOT NULL,
	NODE_HEALTH 	DECIMAL(20,4) NOT NULL,
	NODE_HEALTH_ST 	varchar(32) NOT NULL,
	NODE_STATE 		DECIMAL(20,4) NOT NULL,
	NODE_STATE_ST 	varchar(32) NOT NULL,
	TOT_NODE 		DECIMAL(20,4) NOT NULL,
	TOT_NODE_ST 	varchar(32) NOT NULL,
	PRIM_NODE 	DECIMAL(20,4) NOT NULL,
	PRIM_NODE_ST 	varchar(32) NOT NULL,
	SEC_NODE 		DECIMAL(20,4) NOT NULL,
	SEC_NODE_ST 	varchar(32) NOT NULL,
	AVA_NODE 		DECIMAL(20,4) NOT NULL,
	AVA_NODE_ST 	varchar(32) NOT NULL,
	UNAVA_NODE 		DECIMAL(20,4) NOT NULL,
	UNAVA_NODE_ST 	varchar(32) NOT NULL,
	IS_PRIMARY_SWITCHED 		DECIMAL(20,4) NOT NULL,
	IS_PRIMARY_SWITCHED_ST 	varchar(32) NOT NULL,
	READWRITE_NODE 	DECIMAL(20,4) NOT NULL,
	READWRITE_NODE_ST 	varchar(32) NOT NULL,
	STARTUP_NODE 		DECIMAL(20,4) NOT NULL,
	STARTUP_NODE_ST 	varchar(32) NOT NULL,
	REC_NODE 		DECIMAL(20,4) NOT NULL,
	REC_NODE_ST 	varchar(32) NOT NULL,
	STARTUP2_NODE 	DECIMAL(20,4) NOT NULL,
	STARTUP2_NODE_ST 	varchar(32) NOT NULL,
	UNKNOWN_NODE 		DECIMAL(20,4) NOT NULL,
	UNKNOWN_NODE_ST 	varchar(32) NOT NULL,
	ARB_NODE 	DECIMAL(20,4) NOT NULL,
	ARB_NODE_ST 	varchar(32) NOT NULL,
	DOWN_NODE 		DECIMAL(20,4) NOT NULL,
	DOWN_NODE_ST 	varchar(32) NOT NULL,
	ROLLBACK_NODE 		DECIMAL(20,4) NOT NULL,
	ROLLBACK_NODE_ST 	varchar(32) NOT NULL,
	REMOVE_NODE 	DECIMAL(20,4) NOT NULL,
	REMOVE_NODE_ST 	varchar(32) NOT NULL,
	NOREADWRITE_NODE DECIMAL(20,4) NOT NULL,
	NOREADWRITE_NODE_ST 	varchar(32) NOT NULL,
	NOREADONLY_NODE DECIMAL(20,4) NOT NULL,
	NOREADONLY_NODE_ST 	varchar(32) NOT NULL,
	HEALTHST DECIMAL(20,4) NOT NULL,
	HEALTHST_ST 	varchar(32) NOT NULL);
CREATE INDEX IDX_MongoExtCluNdStTest ON MongoExtCluNdStTest(MSMT_TIME);
ALTER TABLE MongoExtCluNdStTest ADD constraint PK_MongoExtCluNdStTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);

DROP TABLE MongoExtCluNdStTest_TREND;
CREATE TABLE MongoExtCluNdStTest_TREND(
	TRGT_HOST       	varchar(32) NOT NULL,
	PORT_NO         	varchar(32) NOT NULL,
	SITE_NAME       	varchar(64) NOT NULL,
	INFO            	varchar(128) NOT NULL,
	MSMT_HOST       	varchar(32) NOT NULL,
	MSMT_TIME       	datetime NOT NULL,
	PERIOD       		varchar(32) NOT NULL,
	IS_PRIMARY_MIN 		DECIMAL(20,4) NOT NULL,
	IS_PRIMARY_MAX 		DECIMAL(20,4) NOT NULL,
	IS_PRIMARY_STCNT 	varchar(32) NOT NULL,
	NODE_HEALTH_MIN 	DECIMAL(20,4) NOT NULL,
	NODE_HEALTH_MAX 	DECIMAL(20,4) NOT NULL,
	NODE_HEALTH_STCNT 	varchar(32) NOT NULL,
	NODE_STATE_MIN 		DECIMAL(20,4) NOT NULL,
	NODE_STATE_MAX 		DECIMAL(20,4) NOT NULL,
	NODE_STATE_STCNT 	varchar(32) NOT NULL,
	TOT_NODE_MIN 		DECIMAL(20,4) NOT NULL,
	TOT_NODE_MAX 		DECIMAL(20,4) NOT NULL,
	TOT_NODE_STCNT 	varchar(32) NOT NULL,
	PRIM_NODE_MIN 	DECIMAL(20,4) NOT NULL,
	PRIM_NODE_MAX 	DECIMAL(20,4) NOT NULL,
	PRIM_NODE_STCNT 	varchar(32) NOT NULL,
	SEC_NODE_MIN 		DECIMAL(20,4) NOT NULL,
	SEC_NODE_MAX 		DECIMAL(20,4) NOT NULL,
	SEC_NODE_STCNT 	varchar(32) NOT NULL,
	AVA_NODE_MIN 		DECIMAL(20,4) NOT NULL,
	AVA_NODE_MAX 		DECIMAL(20,4) NOT NULL,
	AVA_NODE_STCNT 	    varchar(32) NOT NULL,
	UNAVA_NODE_MIN 		DECIMAL(20,4) NOT NULL,
	UNAVA_NODE_MAX 		DECIMAL(20,4) NOT NULL,
	UNAVA_NODE_STCNT 	varchar(32) NOT NULL,
	IS_PRIMARY_SWITCHED_MIN 		DECIMAL(20,4) NOT NULL,
	IS_PRIMARY_SWITCHED_MAX 		DECIMAL(20,4) NOT NULL,
	IS_PRIMARY_SWITCHED_STCNT 	varchar(32) NOT NULL,
	READWRITE_NODE_MIN 	DECIMAL(20,4) NOT NULL,
	READWRITE_NODE_MAX 	DECIMAL(20,4) NOT NULL,
	READWRITE_NODE_STCNT 	varchar(32) NOT NULL,
	STARTUP_NODE_MIN 		DECIMAL(20,4) NOT NULL,
	STARTUP_NODE_MAX 		DECIMAL(20,4) NOT NULL,
	STARTUP_NODE_STCNT 	varchar(32) NOT NULL,
	REC_NODE_MIN 		DECIMAL(20,4) NOT NULL,
	REC_NODE_MAX 		DECIMAL(20,4) NOT NULL,
	REC_NODE_STCNT 	varchar(32) NOT NULL,
	STARTUP2_NODE_MIN 	DECIMAL(20,4) NOT NULL,
	STARTUP2_NODE_MAX 	DECIMAL(20,4) NOT NULL,
	STARTUP2_NODE_STCNT 	varchar(32) NOT NULL,
	UNKNOWN_NODE_MIN 		DECIMAL(20,4) NOT NULL,
	UNKNOWN_NODE_MAX 		DECIMAL(20,4) NOT NULL,
	UNKNOWN_NODE_STCNT 	varchar(32) NOT NULL,
	ARB_NODE_MIN 	DECIMAL(20,4) NOT NULL,
	ARB_NODE_MAX 	DECIMAL(20,4) NOT NULL,
	ARB_NODE_STCNT 	varchar(32) NOT NULL,
	DOWN_NODE_MIN 		DECIMAL(20,4) NOT NULL,
	DOWN_NODE_MAX 		DECIMAL(20,4) NOT NULL,
	DOWN_NODE_STCNT 	varchar(32) NOT NULL,
	ROLLBACK_NODE_MIN 		DECIMAL(20,4) NOT NULL,
	ROLLBACK_NODE_MAX 		DECIMAL(20,4) NOT NULL,
	ROLLBACK_NODE_STCNT 	varchar(32) NOT NULL,
	REMOVE_NODE_MIN 	DECIMAL(20,4) NOT NULL,
	REMOVE_NODE_MAX 	DECIMAL(20,4) NOT NULL,
	REMOVE_NODE_STCNT 	varchar(32) NOT NULL,
	NOREADWRITE_NODE_MIN    DECIMAL(20,4) NOT NULL,
	NOREADWRITE_NODE_MAX 	DECIMAL(20,4) NOT NULL,
	NOREADWRITE_NODE_STCNT 	varchar(32) NOT NULL,
	NOREADONLY_NODE_MIN     DECIMAL(20,4) NOT NULL,
	NOREADONLY_NODE_MAX 	DECIMAL(20,4) NOT NULL,
	NOREADONLY_NODE_STCNT 	varchar(32) NOT NULL,
	HEALTHST_MIN     DECIMAL(20,4) NOT NULL,
	HEALTHST_MAX 	DECIMAL(20,4) NOT NULL,
	HEALTHST_STCNT 	varchar(32) NOT NULL);
ALTER TABLE MongoExtCluNdStTest_TREND ADD constraint PK_MongoExtCluNdStTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);

DROP TABLE MongoExtCluNdStTest_THRESH;
CREATE TABLE MongoExtCluNdStTest_THRESH(
	TRGT_HOST       varchar(32) NOT NULL,
	PORT_NO         varchar(32) NOT NULL,
	SITE_NAME       varchar(64) NOT NULL,
	INFO            varchar(128) NOT NULL,
	MSMT_HOST       varchar(32) NOT NULL,
	MSMT_TIME_START datetime NOT NULL,
	MSMT_TIME_END   datetime NOT NULL,
	IS_PRIMARY_MIN 	varchar(256) NOT NULL,
	IS_PRIMARY_MAX 	varchar(256) NOT NULL,
	NODE_HEALTH_MIN varchar(256) NOT NULL,
	NODE_HEALTH_MAX varchar(256) NOT NULL,
	NODE_STATE_MIN 	varchar(256) NOT NULL,
	NODE_STATE_MAX 	varchar(256) NOT NULL,
	TOT_NODE_MIN 	varchar(256) NOT NULL,
	TOT_NODE_MAX 	varchar(256) NOT NULL,
	PRIM_NODE_MIN varchar(256) NOT NULL,
	PRIM_NODE_MAX varchar(256) NOT NULL,
	SEC_NODE_MIN 	varchar(256) NOT NULL,
	SEC_NODE_MAX 	varchar(256) NOT NULL,
	AVA_NODE_MIN 	varchar(256) NOT NULL,
	AVA_NODE_MAX 	varchar(256) NOT NULL,
	UNAVA_NODE_MIN 	varchar(256) NOT NULL,
	UNAVA_NODE_MAX 	varchar(256) NOT NULL,
	IS_PRIMARY_SWITCHED_MIN 	varchar(256) NOT NULL,
	IS_PRIMARY_SWITCHED_MAX 	varchar(256) NOT NULL,
	READWRITE_NODE_MIN varchar(256) NOT NULL,
	READWRITE_NODE_MAX varchar(256) NOT NULL,
	STARTUP_NODE_MIN 	varchar(256) NOT NULL,
	STARTUP_NODE_MAX 	varchar(256) NOT NULL,
	REC_NODE_MIN 	varchar(256) NOT NULL,
	REC_NODE_MAX 	varchar(256) NOT NULL,
	STARTUP2_NODE_MIN varchar(256) NOT NULL,
	STARTUP2_NODE_MAX varchar(256) NOT NULL,
	UNKNOWN_NODE_MIN 	varchar(256) NOT NULL,
	UNKNOWN_NODE_MAX 	varchar(256) NOT NULL,
	ARB_NODE_MIN varchar(256) NOT NULL,
	ARB_NODE_MAX varchar(256) NOT NULL,
	DOWN_NODE_MIN 	varchar(256) NOT NULL,
	DOWN_NODE_MAX 	varchar(256) NOT NULL,
	ROLLBACK_NODE_MIN 	varchar(256) NOT NULL,
	ROLLBACK_NODE_MAX 	varchar(256) NOT NULL,
	REMOVE_NODE_MIN varchar(256) NOT NULL,
	REMOVE_NODE_MAX varchar(256) NOT NULL,
	NOREADWRITE_NODE_MIN    varchar(256) NOT NULL,
	NOREADWRITE_NODE_MAX 	varchar(256) NOT NULL,
	NOREADONLY_NODE_MIN     varchar(256) NOT NULL,
	NOREADONLY_NODE_MAX 	varchar(256) NOT NULL,
	HEALTHST_MIN     varchar(256) NOT NULL,
	HEALTHST_MAX 	varchar(256) NOT NULL);
ALTER TABLE MongoExtCluNdStTest_THRESH ADD constraint PK_MongoExtCluNdStTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_MongoExtCluNdStTest_THRESH ON MongoExtCluNdStTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_MongoExtCluNdStTest ON MongoExtCluNdStTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_MongoExtCluNdStTest ON MongoExtCluNdStTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE MongoExtClRepStTest;
CREATE TABLE MongoExtClRepStTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
IS_NODE_RUNNING DECIMAL(20,4) NOT NULL,
IS_NODE_RUNNING_ST varchar(32) NOT NULL,
CURRENT_STATUS DECIMAL(20,4) NOT NULL,
CURRENT_STATUS_ST varchar(32) NOT NULL,
IS_PRIMARY_SWITCHED DECIMAL(20,4) NOT NULL,
IS_PRIMARY_SWITCHED_ST varchar(32) NOT NULL,
UPTIME DECIMAL(20,4) NOT NULL,
UPTIME_ST varchar(32) NOT NULL,
LAST_HEARTBEAT_TIME DECIMAL(20,4) NOT NULL,
LAST_HEARTBEAT_TIME_ST varchar(32) NOT NULL,
IS_PRIMARY DECIMAL(20,4) NOT NULL,
IS_PRIMARY_ST varchar(32) NOT NULL,
RepLag DECIMAL(20,4) NOT NULL,
RepLag_ST varchar(32) NOT NULL,
maxRepLag DECIMAL(20,4) NOT NULL,
maxRepLag_ST varchar(32) NOT NULL,
minRepLag DECIMAL(20,4) NOT NULL,
minRepLag_ST varchar(32) NOT NULL,
maxUPTIME DECIMAL(20,4) NOT NULL,
maxUPTIME_ST varchar(32) NOT NULL,
NoOper DECIMAL(20,4) NOT NULL,
NoOper_ST varchar(32) NOT NULL
);
CREATE INDEX IDX_MongoExtClRepStTest ON MongoExtClRepStTest(MSMT_TIME);
ALTER TABLE MongoExtClRepStTest ADD constraint PK_MongoExtClRepStTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE MongoExtClRepStTest_TREND;
CREATE TABLE MongoExtClRepStTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
IS_NODE_RUNNING_MIN DECIMAL(20,4) NOT NULL,
IS_NODE_RUNNING_MAX DECIMAL(20,4) NOT NULL,
IS_NODE_RUNNING_STCNT varchar(32) NOT NULL,
CURRENT_STATUS_MIN DECIMAL(20,4) NOT NULL,
CURRENT_STATUS_MAX DECIMAL(20,4) NOT NULL,
CURRENT_STATUS_STCNT varchar(32) NOT NULL,
IS_PRIMARY_SWITCHED_MIN DECIMAL(20,4) NOT NULL,
IS_PRIMARY_SWITCHED_MAX DECIMAL(20,4) NOT NULL,
IS_PRIMARY_SWITCHED_STCNT varchar(32) NOT NULL,
UPTIME_MIN DECIMAL(20,4) NOT NULL,
UPTIME_MAX DECIMAL(20,4) NOT NULL,
UPTIME_STCNT varchar(32) NOT NULL,
LAST_HEARTBEAT_TIME_MIN DECIMAL(20,4) NOT NULL,
LAST_HEARTBEAT_TIME_MAX DECIMAL(20,4) NOT NULL,
LAST_HEARTBEAT_TIME_STCNT varchar(32) NOT NULL,
IS_PRIMARY_MIN DECIMAL(20,4) NOT NULL,
IS_PRIMARY_MAX DECIMAL(20,4) NOT NULL,
IS_PRIMARY_STCNT varchar(32) NOT NULL,
RepLag_MIN DECIMAL(20,4) NOT NULL,
RepLag_MAX DECIMAL(20,4) NOT NULL,
RepLag_STCNT varchar(32) NOT NULL,
maxRepLag_MIN DECIMAL(20,4) NOT NULL,
maxRepLag_MAX DECIMAL(20,4) NOT NULL,
maxRepLag_STCNT varchar(32) NOT NULL,
minRepLag_MIN DECIMAL(20,4) NOT NULL,
minRepLag_MAX DECIMAL(20,4) NOT NULL,
minRepLag_STCNT varchar(32) NOT NULL,
maxUPTIME_MIN DECIMAL(20,4) NOT NULL,
maxUPTIME_MAX DECIMAL(20,4) NOT NULL,
maxUPTIME_STCNT varchar(32) NOT NULL,
NoOper_MIN DECIMAL(20,4) NOT NULL,
NoOper_MAX DECIMAL(20,4) NOT NULL,
NoOper_STCNT varchar(32) NOT NULL
);
ALTER TABLE MongoExtClRepStTest_TREND ADD constraint PK_MongoExtClRepStTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE MongoExtClRepStTest_THRESH;
CREATE TABLE MongoExtClRepStTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL
,MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
IS_NODE_RUNNING_MIN VARCHAR(256) NOT NULL,
IS_NODE_RUNNING_MAX VARCHAR(256) NOT NULL,
CURRENT_STATUS_MIN VARCHAR(256) NOT NULL,
CURRENT_STATUS_MAX VARCHAR(256) NOT NULL,
IS_PRIMARY_SWITCHED_MIN VARCHAR(256) NOT NULL,
IS_PRIMARY_SWITCHED_MAX VARCHAR(256) NOT NULL,
UPTIME_MIN VARCHAR(256) NOT NULL,
UPTIME_MAX VARCHAR(256) NOT NULL,
LAST_HEARTBEAT_TIME_MIN VARCHAR(256) NOT NULL,
LAST_HEARTBEAT_TIME_MAX VARCHAR(256) NOT NULL,
IS_PRIMARY_MIN VARCHAR(256) NOT NULL,
IS_PRIMARY_MAX VARCHAR(256) NOT NULL,
RepLag_MIN VARCHAR(256) NOT NULL,
RepLag_MAX VARCHAR(256) NOT NULL,
maxRepLag_MIN VARCHAR(256) NOT NULL,
maxRepLag_MAX VARCHAR(256) NOT NULL,
minRepLag_MIN VARCHAR(256) NOT NULL,
minRepLag_MAX VARCHAR(256) NOT NULL,
maxUPTIME_MIN VARCHAR(256) NOT NULL,
maxUPTIME_MAX VARCHAR(256) NOT NULL,
NoOper_MIN VARCHAR(256) NOT NULL,
NoOper_MAX VARCHAR(256) NOT NULL
);
ALTER TABLE MongoExtClRepStTest_THRESH ADD constraint PK_MongoExtClRepStTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_MongoExtClRepStTest_THRESH ON MongoExtClRepStTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_MongoExtClRepStTest ON MongoExtClRepStTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_MongoExtClRepStTest ON MongoExtClRepStTest_TREND (MSMT_TIME,PERIOD);



DROP TABLE MongoExtCluConnTest;
CREATE TABLE MongoExtCluConnTest(
	TRGT_HOST       		varchar(32) NOT NULL,
	PORT_NO        			varchar(32) NOT NULL,
	SITE_NAME       		varchar(64) NOT NULL,
	INFO            		varchar(128) NOT NULL,
	MSMT_HOST       		varchar(32) NOT NULL,
	MSMT_TIME       		datetime NOT NULL,
	TOTAL_CONNECTIONS 		DECIMAL(20,4) NOT NULL,
	TOTAL_CONNECTIONS_ST 	varchar(32) NOT NULL,
	USED_CONNECTIONS 		DECIMAL(20,4) NOT NULL,
	USED_CONNECTIONS_ST 	varchar(32) NOT NULL,
	FREE_CONNECTIONS 		DECIMAL(20,4) NOT NULL,
	FREE_CONNECTIONS_ST 	varchar(32) NOT NULL,
	CONNECTION_USAGE 		DECIMAL(20,4) NOT NULL,
	CONNECTION_USAGE_ST 	varchar(32) NOT NULL);
CREATE INDEX IDX_MongoExtCluConnTest ON MongoExtCluConnTest(MSMT_TIME);
ALTER TABLE MongoExtCluConnTest ADD constraint PK_MongoExtCluConnTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);

DROP TABLE MongoExtCluConnTest_TREND;
CREATE TABLE MongoExtCluConnTest_TREND(
	TRGT_HOST       			varchar(32) NOT NULL,
	PORT_NO         			varchar(32) NOT NULL,
	SITE_NAME       			varchar(64) NOT NULL,
	INFO            			varchar(128) NOT NULL,
	MSMT_HOST       			varchar(32) NOT NULL,
	MSMT_TIME       			datetime NOT NULL,
	PERIOD       				varchar(32) NOT NULL,
	TOTAL_CONNECTIONS_MIN 		DECIMAL(20,4) NOT NULL,
	TOTAL_CONNECTIONS_MAX 		DECIMAL(20,4) NOT NULL,
	TOTAL_CONNECTIONS_STCNT 	varchar(32) NOT NULL,
	USED_CONNECTIONS_MIN 		DECIMAL(20,4) NOT NULL,
	USED_CONNECTIONS_MAX 		DECIMAL(20,4) NOT NULL,
	USED_CONNECTIONS_STCNT 		varchar(32) NOT NULL,
	FREE_CONNECTIONS_MIN 		DECIMAL(20,4) NOT NULL,
	FREE_CONNECTIONS_MAX 		DECIMAL(20,4) NOT NULL,
	FREE_CONNECTIONS_STCNT 		varchar(32) NOT NULL,
	CONNECTION_USAGE_MIN 		DECIMAL(20,4) NOT NULL,
	CONNECTION_USAGE_MAX 		DECIMAL(20,4) NOT NULL,
	CONNECTION_USAGE_STCNT 		varchar(32) NOT NULL);
ALTER TABLE MongoExtCluConnTest_TREND ADD constraint PK_MongoExtCluConnTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);

DROP TABLE MongoExtCluConnTest_THRESH;
CREATE TABLE MongoExtCluConnTest_THRESH(
	TRGT_HOST       		varchar(32) NOT NULL,
	PORT_NO         		varchar(32) NOT NULL,
	SITE_NAME       		varchar(64) NOT NULL,
	INFO            		varchar(128) NOT NULL,
	MSMT_HOST       		varchar(32) NOT NULL,
	MSMT_TIME_START 		datetime NOT NULL,
	MSMT_TIME_END   		datetime NOT NULL,
	TOTAL_CONNECTIONS_MIN 	varchar(256) NOT NULL,
	TOTAL_CONNECTIONS_MAX 	varchar(256) NOT NULL,
	USED_CONNECTIONS_MIN 	varchar(256) NOT NULL,
	USED_CONNECTIONS_MAX 	varchar(256) NOT NULL,
	FREE_CONNECTIONS_MIN 	varchar(256) NOT NULL,
	FREE_CONNECTIONS_MAX 	varchar(256) NOT NULL,
	CONNECTION_USAGE_MIN 	varchar(256) NOT NULL,
	CONNECTION_USAGE_MAX 	varchar(256) NOT NULL);
ALTER TABLE MongoExtCluConnTest_THRESH ADD constraint PK_MongoExtCluConnTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_MongoExtCluConnTest_THRESH ON MongoExtCluConnTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_MongoExtCluConnTest ON MongoExtCluConnTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_MongoExtCluConnTest ON MongoExtCluConnTest_TREND (MSMT_TIME,PERIOD);




DROP TABLE MongoExtCluAvaTest;
CREATE TABLE MongoExtCluAvaTest(
	TRGT_HOST       			varchar(32) NOT NULL,
	PORT_NO         			varchar(32) NOT NULL,
	SITE_NAME       			varchar(64) NOT NULL,
	INFO            			varchar(128) NOT NULL,
	MSMT_HOST       			varchar(32) NOT NULL,
	MSMT_TIME       			datetime NOT NULL,
	IS_CLUSTER 					DECIMAL(20,4) NOT NULL,
	IS_CLUSTER_ST 				varchar(32) NOT NULL,
	CLUSTER_TYPE 				DECIMAL(20,4) NOT NULL,
	CLUSTER_TYPE_ST 			varchar(32) NOT NULL,
	IS_BALANCER_ENABLED 		DECIMAL(20,4) NOT NULL,
	IS_BALANCER_ENABLED_ST 		varchar(32) NOT NULL,
	IS_BALANCER_RUNNING 		DECIMAL(20,4) NOT NULL,
	IS_BALANCER_RUNNING_ST 		varchar(32) NOT NULL,
	FAIL_BALANCER_COUNT 		DECIMAL(20,4) NOT NULL,
	FAIL_BALANCER_COUNT_ST 		varchar(32) NOT NULL,
	SUCC_MIGRATION_COUNT 		DECIMAL(20,4) NOT NULL,
	SUCC_MIGRATION_COUNT_ST 	varchar(32) NOT NULL,
	FAILED_MIGRATION_COUNT 		DECIMAL(20,4) NOT NULL,
	FAILED_MIGRATION_COUNT_ST 	varchar(32) NOT NULL,
	SHARDS_COUNT 				DECIMAL(20,4) NOT NULL,
	SHARDS_COUNT_ST 			varchar(32) NOT NULL);
CREATE INDEX IDX_MongoExtCluAvaTest ON MongoExtCluAvaTest(MSMT_TIME);
ALTER TABLE MongoExtCluAvaTest ADD constraint PK_MongoExtCluAvaTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);

DROP TABLE MongoExtCluAvaTest_TREND;
CREATE TABLE MongoExtCluAvaTest_TREND(
	TRGT_HOST       				varchar(32) NOT NULL,
	PORT_NO         				varchar(32) NOT NULL,
	SITE_NAME       				varchar(64) NOT NULL,
	INFO            				varchar(128) NOT NULL,
	MSMT_HOST       				varchar(32) NOT NULL,
	MSMT_TIME       				datetime NOT NULL,
	PERIOD       					varchar(32) NOT NULL,
	IS_CLUSTER_MIN 					DECIMAL(20,4) NOT NULL,
	IS_CLUSTER_MAX 					DECIMAL(20,4) NOT NULL,
	IS_CLUSTER_STCNT 				varchar(32) NOT NULL,
	CLUSTER_TYPE_MIN 				DECIMAL(20,4) NOT NULL,
	CLUSTER_TYPE_MAX 				DECIMAL(20,4) NOT NULL,
	CLUSTER_TYPE_STCNT 				varchar(32) NOT NULL,
	IS_BALANCER_ENABLED_MIN 		DECIMAL(20,4) NOT NULL,
	IS_BALANCER_ENABLED_MAX 		DECIMAL(20,4) NOT NULL,
	IS_BALANCER_ENABLED_STCNT 		varchar(32) NOT NULL,
	IS_BALANCER_RUNNING_MIN 		DECIMAL(20,4) NOT NULL,
	IS_BALANCER_RUNNING_MAX 		DECIMAL(20,4) NOT NULL,
	IS_BALANCER_RUNNING_STCNT 		varchar(32) NOT NULL,
	FAIL_BALANCER_COUNT_MIN 		DECIMAL(20,4) NOT NULL,
	FAIL_BALANCER_COUNT_MAX 		DECIMAL(20,4) NOT NULL,
	FAIL_BALANCER_COUNT_STCNT		varchar(32) NOT NULL,
	SUCC_MIGRATION_COUNT_MIN 		DECIMAL(20,4) NOT NULL,
	SUCC_MIGRATION_COUNT_MAX 		DECIMAL(20,4) NOT NULL,
	SUCC_MIGRATION_COUNT_STCNT 		varchar(32) NOT NULL,
	FAILED_MIGRATION_COUNT_MIN 		DECIMAL(20,4) NOT NULL,
	FAILED_MIGRATION_COUNT_MAX 		DECIMAL(20,4) NOT NULL,
	FAILED_MIGRATION_COUNT_STCNT 	varchar(32) NOT NULL,
	SHARDS_COUNT_MIN 				DECIMAL(20,4) NOT NULL,
	SHARDS_COUNT_MAX 				DECIMAL(20,4) NOT NULL,
	SHARDS_COUNT_STCNT 				varchar(32) NOT NULL);
ALTER TABLE MongoExtCluAvaTest_TREND ADD constraint PK_MongoExtCluAvaTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);

DROP TABLE MongoExtCluAvaTest_THRESH;
CREATE TABLE MongoExtCluAvaTest_THRESH(
	TRGT_HOST       			varchar(32) NOT NULL,
	PORT_NO         			varchar(32) NOT NULL,
	SITE_NAME       			varchar(64) NOT NULL,
	INFO            			varchar(128) NOT NULL,
	MSMT_HOST       			varchar(32) NOT NULL,
	MSMT_TIME_START 			datetime NOT NULL,
	MSMT_TIME_END   			datetime NOT NULL,
	IS_CLUSTER_MIN 				varchar(256) NOT NULL,
	IS_CLUSTER_MAX 				varchar(256) NOT NULL,
	CLUSTER_TYPE_MIN 			varchar(256) NOT NULL,
	CLUSTER_TYPE_MAX 			varchar(256) NOT NULL,
	IS_BALANCER_ENABLED_MIN 	varchar(256) NOT NULL,
	IS_BALANCER_ENABLED_MAX 	varchar(256) NOT NULL,
	IS_BALANCER_RUNNING_MIN 	varchar(256) NOT NULL,
	IS_BALANCER_RUNNING_MAX 	varchar(256) NOT NULL,
	FAIL_BALANCER_COUNT_MIN 	varchar(256) NOT NULL,
	FAIL_BALANCER_COUNT_MAX 	varchar(256) NOT NULL,
	SUCC_MIGRATION_COUNT_MIN 	varchar(256) NOT NULL,
	SUCC_MIGRATION_COUNT_MAX 	varchar(256) NOT NULL,
	FAILED_MIGRATION_COUNT_MIN 	varchar(256) NOT NULL,
	FAILED_MIGRATION_COUNT_MAX 	varchar(256) NOT NULL,
	SHARDS_COUNT_MIN 			varchar(256) NOT NULL,
	SHARDS_COUNT_MAX 			varchar(256) NOT NULL);
ALTER TABLE MongoExtCluAvaTest_THRESH ADD constraint PK_MongoExtCluAvaTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_MongoExtCluAvaTest_THRESH ON MongoExtCluAvaTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_MongoExtCluAvaTest ON MongoExtCluAvaTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_MongoExtCluAvaTest ON MongoExtCluAvaTest_TREND (MSMT_TIME,PERIOD);


DROP TABLE MongoExtCluNetTest;
CREATE TABLE MongoExtCluNetTest(
	TRGT_HOST       			varchar(32) NOT NULL,
	PORT_NO         			varchar(32) NOT NULL,
	SITE_NAME       			varchar(64) NOT NULL,
	INFO            			varchar(128) NOT NULL,
	MSMT_HOST       			varchar(32) NOT NULL,
	MSMT_TIME       			datetime NOT NULL,
	AVAILABILITY 				DECIMAL(20,4) NOT NULL,
	AVAILABILITY_ST 			varchar(32) NOT NULL,
	RESPONSE_TIME 				DECIMAL(20,4) NOT NULL,
	RESPONSE_TIME_ST 			varchar(32) NOT NULL,
	DOCUMENT_AVAILABILITY 		DECIMAL(20,4) NOT NULL,
	DOCUMENT_AVAILABILITY_ST 	varchar(32) NOT NULL,
	DOC_RESPONSE_TIME 			DECIMAL(20,4) NOT NULL,
	DOC_RESPONSE_TIME_ST 		varchar(32) NOT NULL,
	NUMBER_OF_RECORDS 			DECIMAL(20,4) NOT NULL,
	NUMBER_OF_RECORDS_ST 		varchar(32) NOT NULL,
	CLUSTER_AVAILABILITY        DECIMAL(20,4) NOT NULL,
	CLUSTER_AVAILABILITY_ST 	varchar(32) NOT NULL);
CREATE INDEX IDX_MongoExtCluNetTest ON MongoExtCluNetTest(MSMT_TIME);
ALTER TABLE MongoExtCluNetTest ADD constraint PK_MongoExtCluNetTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);

DROP TABLE MongoExtCluNetTest_TREND;
CREATE TABLE MongoExtCluNetTest_TREND(
	TRGT_HOST       				varchar(32) NOT NULL,
	PORT_NO         				varchar(32) NOT NULL,
	SITE_NAME       				varchar(64) NOT NULL,
	INFO            				varchar(128) NOT NULL,
	MSMT_HOST       				varchar(32) NOT NULL,
	MSMT_TIME       				datetime NOT NULL,
	PERIOD       					varchar(32) NOT NULL,
	AVAILABILITY_MIN 				DECIMAL(20,4) NOT NULL,
	AVAILABILITY_MAX 				DECIMAL(20,4) NOT NULL,
	AVAILABILITY_STCNT 				varchar(32) NOT NULL,
	RESPONSE_TIME_MIN 				DECIMAL(20,4) NOT NULL,
	RESPONSE_TIME_MAX 				DECIMAL(20,4) NOT NULL,
	RESPONSE_TIME_STCNT 			varchar(32) NOT NULL,
	DOCUMENT_AVAILABILITY_MIN 		DECIMAL(20,4) NOT NULL,
	DOCUMENT_AVAILABILITY_MAX 		DECIMAL(20,4) NOT NULL,
	DOCUMENT_AVAILABILITY_STCNT 	varchar(32) NOT NULL,
	DOC_RESPONSE_TIME_MIN 			DECIMAL(20,4) NOT NULL,
	DOC_RESPONSE_TIME_MAX 			DECIMAL(20,4) NOT NULL,
	DOC_RESPONSE_TIME_STCNT 		varchar(32) NOT NULL,
	NUMBER_OF_RECORDS_MIN 			DECIMAL(20,4) NOT NULL,
	NUMBER_OF_RECORDS_MAX 			DECIMAL(20,4) NOT NULL,
	NUMBER_OF_RECORDS_STCNT 		varchar(32) NOT NULL,
	CLUSTER_AVAILABILITY_MIN 		DECIMAL(20,4) NOT NULL,
	CLUSTER_AVAILABILITY_MAX 		DECIMAL(20,4) NOT NULL,
	CLUSTER_AVAILABILITY_STCNT 		varchar(32) NOT NULL);
ALTER TABLE MongoExtCluNetTest_TREND ADD constraint PK_MongoExtCluNetTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);

DROP TABLE MongoExtCluNetTest_THRESH;
CREATE TABLE MongoExtCluNetTest_THRESH(
	TRGT_HOST       			varchar(32) NOT NULL,
	PORT_NO         			varchar(32) NOT NULL,
	SITE_NAME       			varchar(64) NOT NULL,
	INFO            			varchar(128) NOT NULL,
	MSMT_HOST       			varchar(32) NOT NULL,
	MSMT_TIME_START 			datetime NOT NULL,
	MSMT_TIME_END   			datetime NOT NULL,
	AVAILABILITY_MIN 			varchar(256) NOT NULL,
	AVAILABILITY_MAX 			varchar(256) NOT NULL,
	RESPONSE_TIME_MIN 			varchar(256) NOT NULL,
	RESPONSE_TIME_MAX 			varchar(256) NOT NULL,
	DOCUMENT_AVAILABILITY_MIN 	varchar(256) NOT NULL,
	DOCUMENT_AVAILABILITY_MAX 	varchar(256) NOT NULL,
	DOC_RESPONSE_TIME_MIN 		varchar(256) NOT NULL,
	DOC_RESPONSE_TIME_MAX 		varchar(256) NOT NULL,
	NUMBER_OF_RECORDS_MIN 		varchar(256) NOT NULL,
	NUMBER_OF_RECORDS_MAX 		varchar(256) NOT NULL,
	CLUSTER_AVAILABILITY_MIN 	varchar(256) NOT NULL,
	CLUSTER_AVAILABILITY_MAX 	varchar(256) NOT NULL);
ALTER TABLE MongoExtCluNetTest_THRESH ADD constraint PK_MongoExtCluNetTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_MongoExtCluNetTest_THRESH ON MongoExtCluNetTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_MongoExtCluNetTest ON MongoExtCluNetTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_MongoExtCluNetTest ON MongoExtCluNetTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE OraRacDgTest;
CREATE TABLE OraRacDgTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
IS_DG_ENABLED DECIMAL(20,4) NOT NULL,
IS_DG_ENABLED_ST varchar(32) NOT NULL,
DB_MODE DECIMAL(20,4) NOT NULL,
DB_MODE_ST varchar(32) NOT NULL,
DB_OPEN_MODE DECIMAL(20,4) NOT NULL,
DB_OPEN_MODE_ST varchar(32) NOT NULL,
IS_SWITCHED DECIMAL(20,4) NOT NULL,
IS_SWITCHED_ST varchar(32) NOT NULL,
NOOFPRIMARYNODES DECIMAL(20,4) NOT NULL,
NOOFPRIMARYNODES_ST varchar(32) NOT NULL,
NOOFPHYSICALSTANDBYNODES DECIMAL(20,4) NOT NULL,
NOOFPHYSICALSTANDBYNODES_ST varchar(32) NOT NULL,
NOOFLOGICALSTANDBYNODES DECIMAL(20,4) NOT NULL,
NOOFLOGICALSTANDBYNODES_ST varchar(32) NOT NULL,
NOOFSNAPSHOTSTANDBYNODES DECIMAL(20,4) NOT NULL,
NOOFSNAPSHOTSTANDBYNODES_ST varchar(32) NOT NULL,
TOTALNOOFNODES DECIMAL(20,4) NOT NULL,
TOTALNOOFNODES_ST varchar(32) NOT NULL);

CREATE INDEX IDX_OraRacDgTest ON OraRacDgTest(MSMT_TIME);
ALTER TABLE OraRacDgTest ADD constraint PK_OraRacDgTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE OraRacDgTest_TREND;
CREATE TABLE OraRacDgTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
IS_DG_ENABLED_MIN DECIMAL(20,4) NOT NULL,
IS_DG_ENABLED_MAX DECIMAL(20,4) NOT NULL,
IS_DG_ENABLED_STCNT varchar(32) NOT NULL,
DB_MODE_MIN DECIMAL(20,4) NOT NULL,
DB_MODE_MAX DECIMAL(20,4) NOT NULL,
DB_MODE_STCNT varchar(32) NOT NULL,
DB_OPEN_MODE_MIN DECIMAL(20,4) NOT NULL,
DB_OPEN_MODE_MAX DECIMAL(20,4) NOT NULL,
DB_OPEN_MODE_STCNT varchar(32) NOT NULL,
IS_SWITCHED_MIN DECIMAL(20,4) NOT NULL,
IS_SWITCHED_MAX DECIMAL(20,4) NOT NULL,
IS_SWITCHED_STCNT varchar(32) NOT NULL,
NOOFPRIMARYNODES_MIN DECIMAL(20,4) NOT NULL,
NOOFPRIMARYNODES_MAX DECIMAL(20,4) NOT NULL,
NOOFPRIMARYNODES_STCNT varchar(32) NOT NULL,
NOOFPHYSICALSTANDBYNODES_MIN DECIMAL(20,4) NOT NULL,
NOOFPHYSICALSTANDBYNODES_MAX DECIMAL(20,4) NOT NULL,
NOOFPHYSICALSTANDBYNODES_STCNT varchar(32) NOT NULL,
NOOFLOGICALSTANDBYNODES_MIN DECIMAL(20,4) NOT NULL,
NOOFLOGICALSTANDBYNODES_MAX DECIMAL(20,4) NOT NULL,
NOOFLOGICALSTANDBYNODES_STCNT varchar(32) NOT NULL,
NOOFSNAPSHOTSTANDBYNODES_MIN DECIMAL(20,4) NOT NULL,
NOOFSNAPSHOTSTANDBYNODES_MAX DECIMAL(20,4) NOT NULL,
NOOFSNAPSHOTSTANDBYNODES_STCNT varchar(32) NOT NULL,
TOTALNOOFNODES_MIN DECIMAL(20,4) NOT NULL,
TOTALNOOFNODES_MAX DECIMAL(20,4) NOT NULL,
TOTALNOOFNODES_STCNT varchar(32) NOT NULL);

ALTER TABLE OraRacDgTest_TREND ADD constraint PK_OraRacDgTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE OraRacDgTest_THRESH;
CREATE TABLE OraRacDgTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
IS_DG_ENABLED_MIN VARCHAR(256) NOT NULL,
IS_DG_ENABLED_MAX VARCHAR(256) NOT NULL,
DB_MODE_MIN VARCHAR(256) NOT NULL,
DB_MODE_MAX VARCHAR(256) NOT NULL,
DB_OPEN_MODE_MIN VARCHAR(256) NOT NULL,
DB_OPEN_MODE_MAX VARCHAR(256) NOT NULL,
IS_SWITCHED_MIN VARCHAR(256) NOT NULL,
IS_SWITCHED_MAX VARCHAR(256) NOT NULL,
NOOFPRIMARYNODES_MIN VARCHAR(256) NOT NULL,
NOOFPRIMARYNODES_MAX VARCHAR(256) NOT NULL,
NOOFPHYSICALSTANDBYNODES_MIN VARCHAR(256) NOT NULL,
NOOFPHYSICALSTANDBYNODES_MAX VARCHAR(256) NOT NULL,
NOOFLOGICALSTANDBYNODES_MIN VARCHAR(256) NOT NULL,
NOOFLOGICALSTANDBYNODES_MAX VARCHAR(256) NOT NULL,
NOOFSNAPSHOTSTANDBYNODES_MIN VARCHAR(256) NOT NULL,
NOOFSNAPSHOTSTANDBYNODES_MAX VARCHAR(256) NOT NULL,
TOTALNOOFNODES_MIN VARCHAR(256) NOT NULL,
TOTALNOOFNODES_MAX VARCHAR(256) NOT NULL);

ALTER TABLE OraRacDgTest_THRESH ADD constraint PK_OraRacDgTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_OraRacDgTest_THRESH ON OraRacDgTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_OraRacDgTest ON OraRacDgTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_OraRacDgTest ON OraRacDgTest_TREND (MSMT_TIME,PERIOD);

DROP TABLE COMPONENT_INFO;
CREATE TABLE COMPONENT_INFO(
	EG_UID VARCHAR(128) NOT NULL,
	COMP_TYPE VARCHAR(32) NOT NULL,
	COMP_NAME VARCHAR(64) NOT NULL,
	USER_NAME VARCHAR(256) NOT NULL,
	COMP_STATUS VARCHAR(16) NOT NULL,
	MSMT_TIME DATETIME NOT NULL
);

DROP TABLE NutLoginTest_REPORT_INSIDE;
CREATE TABLE NutLoginTest_REPORT_INSIDE ( 
SESSION_KEY VARCHAR(128), 
TRGT_HOST VARCHAR(32),  
PORT_NO VARCHAR(32),  
MSMT_TIME DATETIME NOT NULL,
USERNAME VARCHAR(128) NOT NULL,
GUESTNAME VARCHAR(128) NOT NULL,
LOGIN_TIME DATETIME NOT NULL,
DURATION DECIMAL (20,4) NOT NULL,
ACTIVE_TIME DECIMAL (20,4) NOT NULL,
IDLE_TIME DECIMAL (20,4) NOT NULL,
CLIENT_IP_ADDRESS VARCHAR(128),
CLIENT_NAME VARCHAR(128),
CLIENT_ID VARCHAR(128),
CLIENT_CATEGORY VARCHAR(128),
CTX_STATE VARCHAR(128),
HDX_DISPLAY_MODE VARCHAR(128),
HDX_ACTIVE_ENCODER VARCHAR(128),
HDX_PROTOCOL VARCHAR(128),
ENCRYPTION_LEVEL VARCHAR(128),
NETSCALER_RPTNAME VARCHAR(128),
NETSCALER_IP_ADDRESS VARCHAR(128),
XENAPP_IP_ADDRESS VARCHAR(128),
ENDPOINT_IP_ADDRESS VARCHAR(128),
COUNTRY_NAME VARCHAR(128),
COUNTRY_CODE VARCHAR(128),
REGION VARCHAR(128),
CITY VARCHAR(128),
LATITUDE VARCHAR(128),
LONGITUDE VARCHAR(128),
LOGON_DURATION DECIMAL (20,4) NOT NULL,
ACTUAL_LOGON_DURATION DECIMAL (20,4) NOT NULL,
CPU_UTIL DECIMAL (20,4) NOT NULL,
TOTAL_PHY_MEM DECIMAL (20,4) NOT NULL,
PHYSICAL_MEM_UTILZE DECIMAL (20,4) NOT NULL,
PERCENT_BUSY DECIMAL (20,4) NOT NULL,
PERCENT_DISK_READS DECIMAL (20,4) NOT NULL,
PERCENT_DISK_WRITES DECIMAL (20,4) NOT NULL,
INCOMING_TRAFFIC DECIMAL (20,4) NOT NULL,
OUTGOING_TRAFFIC DECIMAL (20,4) NOT NULL,
SESSION_AVG_LATENCY DECIMAL (20,4) NOT NULL,
LAST_RECD_LATENCY DECIMAL (20,4) NOT NULL,
ICA_NWLATENCY DECIMAL (20,4) NOT NULL,
INPUT_SESSION_BANDWIDTH DECIMAL (20,4) NOT NULL,
OUTPUT_SESSION_BANDWIDTH DECIMAL (20,4) NOT NULL,
BROWSER_COUNT DECIMAL (20,4) NOT NULL,
AVG_CPU_UTIL DECIMAL (20,4) NOT NULL,
MEM_USED DECIMAL (20,4) NOT NULL,
CLIENT_IPADDRESS VARCHAR(64) NOT NULL,
CLIENT_VERSION VARCHAR(32) NOT NULL,
INPUT_AUDIO_BANDWIDTH DECIMAL (20,4) NOT NULL,
OUTPUT_AUDIO_BANDWIDTH DECIMAL (20,4) NOT NULL,
INPUT_SE_LINE_SPEED DECIMAL (20,4) NOT NULL,
OUTPUT_SE_LINE_SPEED DECIMAL (20,4) NOT NULL,
SESSN_PCKT_LOSS DECIMAL (20,4) NOT NULL,
PKT_LOSS_PCT DECIMAL (20,4) NOT NULL
);
CREATE INDEX IDX_NutLoginTest_RPT_INSIDE ON NutLoginTest_REPORT_INSIDE(MSMT_TIME);


DROP TABLE NutLoginTest_REPORT;
CREATE TABLE NutLoginTest_REPORT ( 
SESSION_KEY VARCHAR(128), 
TRGT_HOST VARCHAR(32),  
PORT_NO VARCHAR(32),  
MSMT_TIME DATETIME NOT NULL,
USERNAME VARCHAR(128) NOT NULL,
GUESTNAME VARCHAR(128) NOT NULL,
LOGIN_TIME DATETIME NOT NULL,
DURATION DECIMAL (20,4) NOT NULL,
ACTIVE_TIME DECIMAL (20,4) NOT NULL,
IDLE_TIME DECIMAL (20,4) NOT NULL,
CLIENT_IP_ADDRESS VARCHAR(128),
CLIENT_NAME VARCHAR(128),
CLIENT_ID VARCHAR(128),
CLIENT_CATEGORY VARCHAR(128),
CTX_STATE VARCHAR(128),
HDX_DISPLAY_MODE VARCHAR(128),
HDX_ACTIVE_ENCODER VARCHAR(128),
HDX_PROTOCOL VARCHAR(128),
ENCRYPTION_LEVEL VARCHAR(128),
NETSCALER_RPTNAME VARCHAR(128),
NETSCALER_IP_ADDRESS VARCHAR(128),
XENAPP_IP_ADDRESS VARCHAR(128),
ENDPOINT_IP_ADDRESS VARCHAR(128),
COUNTRY_NAME VARCHAR(128),
COUNTRY_CODE VARCHAR(128),
REGION VARCHAR(128),
CITY VARCHAR(128),
LATITUDE VARCHAR(128),
LONGITUDE VARCHAR(128),
LOGON_DURATION DECIMAL (20,4) NOT NULL,
ACTUAL_LOGON_DURATION DECIMAL (20,4) NOT NULL,
PHYSICAL_CPU DECIMAL (20,4) NOT NULL,
MEM_USAGE DECIMAL (20,4) NOT NULL,
STORAGE_IOPS DECIMAL (20,4) NOT NULL,
IO_LATENCY DECIMAL (20,4) NOT NULL,
IO_BWIDTH DECIMAL (20,4) NOT NULL,
DISK_CAPACITY DECIMAL (20,4) NOT NULL,
NUM_RECEIVED DECIMAL (20,4) NOT NULL,
NUM_TRANSMITE DECIMAL (20,4) NOT NULL,
CLIENT_IPADDRESS VARCHAR(64) NOT NULL,
CLIENT_VERSION VARCHAR(32) NOT NULL
);
CREATE INDEX IDX_NutLoginTest_REPORT ON NutLoginTest_REPORT(MSMT_TIME);
CREATE INDEX IDX1_NutLoginTest_REPORT ON NutLoginTest_REPORT (SESSION_KEY, TRGT_HOST);


DROP TABLE COMPONENT_HISTORY;
CREATE TABLE COMPONENT_HISTORY(
	EG_UID VARCHAR(128) NOT NULL,
	COMP_TYPE VARCHAR(32) NOT NULL,
	COMP_NAME VARCHAR(128) NOT NULL,
	REM_AGENT VARCHAR(32) NOT NULL,
	EXT_AGENT VARCHAR(256) NOT NULL,
	MANAGED_TIME DATETIME NOT NULL,
	UNMANAGED_TIME DATETIME NOT NULL,
	MANAGED_BY VARCHAR(32) NOT NULL,
	UNMANAGED_BY VARCHAR(32) NOT NULL,
	USER_NAME VARBINARY(max) NOT NULL,
	ZONE_NAME VARBINARY(max) NOT NULL,
	SEGMENT_NAME VARBINARY(max) NOT NULL,
	SERVICE_NAME VARBINARY(max) NOT NULL,
	GROUP_NAME VARBINARY(max) NOT NULL,
	MSMT_TIME DATETIME NOT NULL
);


DROP TABLE ZoomServStatusTest;
CREATE TABLE ZoomServStatusTest( 
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
Status 			DECIMAL(20,4) NOT NULL,
Status_ST 		varchar(32) NOT NULL,
ScheduledMaintenance DECIMAL(20,4) NOT NULL,
ScheduledMaintenance_ST varchar(32) NOT NULL,
ResolvedIncidents DECIMAL(20,4) NOT NULL,
ResolvedIncidents_ST varchar(32) NOT NULL,
UnresolvedIncidents DECIMAL(20,4) NOT NULL,
UnresolvedIncidents_ST varchar(32) NOT NULL);

CREATE INDEX IDX_ZoomServStatusTest ON ZoomServStatusTest(MSMT_TIME);
ALTER TABLE ZoomServStatusTest ADD constraint PK_ZoomServStatusTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE ZoomServStatusTest_TREND;
CREATE TABLE ZoomServStatusTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
Status_MIN 		DECIMAL(20,4) NOT NULL,
Status_MAX 		DECIMAL(20,4) NOT NULL,
Status_STCNT 	varchar(32) NOT NULL,
ScheduledMaintenance_MIN DECIMAL(20,4) NOT NULL,
ScheduledMaintenance_MAX DECIMAL(20,4) NOT NULL,
ScheduledMaintenance_STCNT varchar(32) NOT NULL,
ResolvedIncidents_MIN DECIMAL(20,4) NOT NULL,
ResolvedIncidents_MAX DECIMAL(20,4) NOT NULL,
ResolvedIncidents_STCNT varchar(32) NOT NULL,
UnresolvedIncidents_MIN DECIMAL(20,4) NOT NULL,
UnresolvedIncidents_MAX DECIMAL(20,4) NOT NULL,
UnresolvedIncidents_STCNT varchar(32) NOT NULL);

ALTER TABLE ZoomServStatusTest_TREND ADD constraint PK_ZoomServStatusTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE ZoomServStatusTest_THRESH;
CREATE TABLE ZoomServStatusTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
Status_MIN 		VARCHAR(256) NOT NULL,
Status_MAX 		VARCHAR(256) NOT NULL,
ScheduledMaintenance_MIN VARCHAR(256) NOT NULL,
ScheduledMaintenance_MAX VARCHAR(256) NOT NULL,
ResolvedIncidents_MIN VARCHAR(256) NOT NULL,
ResolvedIncidents_MAX VARCHAR(256) NOT NULL,
UnresolvedIncidents_MIN VARCHAR(256) NOT NULL,
UnresolvedIncidents_MAX VARCHAR(256) NOT NULL);

ALTER TABLE ZoomServStatusTest_THRESH ADD constraint PK_ZoomServStatusTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_ZoomServStatusTest_THRESH ON ZoomServStatusTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_ZoomServStatusTest ON ZoomServStatusTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_ZoomServStatusTest ON ZoomServStatusTest_TREND (MSMT_TIME,PERIOD);


DROP TABLE GenericLogonSimTest;
CREATE TABLE GenericLogonSimTest(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
AVAILABILITY DECIMAL(20,4) NOT NULL,
AVAILABILITY_ST varchar(32) NOT NULL,
TOTAL_ACTIVITY_TIME DECIMAL(20,4) NOT NULL,
TOTAL_ACTIVITY_TIME_ST varchar(32) NOT NULL,
NO_OF_ACTIVITIES DECIMAL(20,4) NOT NULL,
NO_OF_ACTIVITIES_ST varchar(32) NOT NULL,
NO_OF_SUCCESS_ACTIVITIES DECIMAL(20,4) NOT NULL,
NO_OF_SUCCESS_ACTIVITIES_ST varchar(32) NOT NULL,
NO_OF_FAILURE_ACTIVITIES DECIMAL(20,4) NOT NULL,
NO_OF_FAILURE_ACTIVITIES_ST varchar(32) NOT NULL,
PCT_OF_SUCCESS_ACTIVITY DECIMAL(20,4) NOT NULL,
PCT_OF_SUCCESS_ACTIVITY_ST varchar(32) NOT NULL,
TOTAL_SIMULATION_TIME DECIMAL(20,4) NOT NULL,
TOTAL_SIMULATION_TIME_ST varchar(32) NOT NULL,
IS_SCRIPT_RUNNING DECIMAL(20,4) NOT NULL,
IS_SCRIPT_RUNNING_ST varchar(32) NOT NULL);

CREATE INDEX IDX_GenericLogonSimTest ON GenericLogonSimTest(MSMT_TIME);
ALTER TABLE GenericLogonSimTest ADD constraint PK_GenericLogonSimTest PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME);
DROP TABLE GenericLogonSimTest_TREND;
CREATE TABLE GenericLogonSimTest_TREND(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME       datetime NOT NULL,
PERIOD       	varchar(32) NOT NULL,
AVAILABILITY_MIN DECIMAL(20,4) NOT NULL,
AVAILABILITY_MAX DECIMAL(20,4) NOT NULL,
AVAILABILITY_STCNT varchar(32) NOT NULL,
TOTAL_ACTIVITY_TIME_MIN DECIMAL(20,4) NOT NULL,
TOTAL_ACTIVITY_TIME_MAX DECIMAL(20,4) NOT NULL,
TOTAL_ACTIVITY_TIME_STCNT varchar(32) NOT NULL,
NO_OF_ACTIVITIES_MIN DECIMAL(20,4) NOT NULL,
NO_OF_ACTIVITIES_MAX DECIMAL(20,4) NOT NULL,
NO_OF_ACTIVITIES_STCNT varchar(32) NOT NULL,
NO_OF_SUCCESS_ACTIVITIES_MIN DECIMAL(20,4) NOT NULL,
NO_OF_SUCCESS_ACTIVITIES_MAX DECIMAL(20,4) NOT NULL,
NO_OF_SUCCESS_ACTIVITIES_STCNT varchar(32) NOT NULL,
NO_OF_FAILURE_ACTIVITIES_MIN DECIMAL(20,4) NOT NULL,
NO_OF_FAILURE_ACTIVITIES_MAX DECIMAL(20,4) NOT NULL,
NO_OF_FAILURE_ACTIVITIES_STCNT varchar(32) NOT NULL,
PCT_OF_SUCCESS_ACTIVITY_MIN DECIMAL(20,4) NOT NULL,
PCT_OF_SUCCESS_ACTIVITY_MAX DECIMAL(20,4) NOT NULL,
PCT_OF_SUCCESS_ACTIVITY_STCNT varchar(32) NOT NULL,
TOTAL_SIMULATION_TIME_MIN DECIMAL(20,4) NOT NULL,
TOTAL_SIMULATION_TIME_MAX DECIMAL(20,4) NOT NULL,
TOTAL_SIMULATION_TIME_STCNT varchar(32) NOT NULL,
IS_SCRIPT_RUNNING_MIN DECIMAL(20,4) NOT NULL,
IS_SCRIPT_RUNNING_MAX DECIMAL(20,4) NOT NULL,
IS_SCRIPT_RUNNING_STCNT varchar(32) NOT NULL);

ALTER TABLE GenericLogonSimTest_TREND ADD constraint PK_GenericLogonSimTest_TREND PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST, MSMT_TIME,PERIOD);
DROP TABLE GenericLogonSimTest_THRESH;
CREATE TABLE GenericLogonSimTest_THRESH(
TRGT_HOST       varchar(32) NOT NULL,
PORT_NO         varchar(32) NOT NULL,
SITE_NAME       varchar(64) NOT NULL,
INFO            varchar(128) NOT NULL,
MSMT_HOST       varchar(32) NOT NULL,
MSMT_TIME_START datetime NOT NULL,
MSMT_TIME_END   datetime NOT NULL,
AVAILABILITY_MIN VARCHAR(256) NOT NULL,
AVAILABILITY_MAX VARCHAR(256) NOT NULL,
TOTAL_ACTIVITY_TIME_MIN VARCHAR(256) NOT NULL,
TOTAL_ACTIVITY_TIME_MAX VARCHAR(256) NOT NULL,
NO_OF_ACTIVITIES_MIN VARCHAR(256) NOT NULL,
NO_OF_ACTIVITIES_MAX VARCHAR(256) NOT NULL,
NO_OF_SUCCESS_ACTIVITIES_MIN VARCHAR(256) NOT NULL,
NO_OF_SUCCESS_ACTIVITIES_MAX VARCHAR(256) NOT NULL,
NO_OF_FAILURE_ACTIVITIES_MIN VARCHAR(256) NOT NULL,
NO_OF_FAILURE_ACTIVITIES_MAX VARCHAR(256) NOT NULL,
PCT_OF_SUCCESS_ACTIVITY_MIN VARCHAR(256) NOT NULL,
PCT_OF_SUCCESS_ACTIVITY_MAX VARCHAR(256) NOT NULL,
TOTAL_SIMULATION_TIME_MIN VARCHAR(256) NOT NULL,
TOTAL_SIMULATION_TIME_MAX VARCHAR(256) NOT NULL,
IS_SCRIPT_RUNNING_MIN VARCHAR(256) NOT NULL,
IS_SCRIPT_RUNNING_MAX VARCHAR(256) NOT NULL);

ALTER TABLE GenericLogonSimTest_THRESH ADD constraint PK_GenericLogonSimTest_THRESH PRIMARY KEY(TRGT_HOST,PORT_NO,SITE_NAME,INFO,MSMT_HOST,MSMT_TIME_START);
CREATE INDEX IDX_GenericLogonSimTest_THRESH ON GenericLogonSimTest_THRESH (MSMT_HOST,MSMT_TIME_START,MSMT_TIME_END);
CREATE INDEX IDX_TH_GenericLogonSimTest ON GenericLogonSimTest_THRESH (MSMT_TIME_START);
CREATE INDEX IDX_TR_GenericLogonSimTest ON GenericLogonSimTest_TREND (MSMT_TIME,PERIOD);


DROP TABLE ALARM_HISTORY_SUMMARY;
CREATE TABLE ALARM_HISTORY_SUMMARY
(
EVENT_ID varchar(128) not null,
SITE_NAME varchar(64) not null,
COMP_NAME varchar(1024) not null,
COMP_TYPE varchar(32) not null,
INFO varchar(128) not null,
TEST_NAME varchar(64) not null,
MEASURE varchar(64) not null,
MSMT_HOST varchar(32) not null,
EVENT_SEVERITY varchar(16) not null,
START_TIME datetime not null,
END_TIME datetime,
DURATION DECIMAL(16),
PCT_CRITICAL DECIMAL(16),
PCT_MAJOR DECIMAL(16),
PCT_MINOR DECIMAL(16)
);


alter table alarm_history_summary add constraint PK_alarm_history_summary 
primary key (event_id,site_name,comp_name,comp_type,info,test_name,measure,msmt_host,event_severity,start_time);
ALTER TABLE alarm_history_summary ADD ALARM_ID decimal(18) NOT NULL DEFAULT 1;
ALTER TABLE alarm_history_summary ADD ACCESS_EVENT_ID varchar(64);
CREATE NONCLUSTERED INDEX IDX2_ALARM_HISTORY_SUMMARY ON ALARM_HISTORY_SUMMARY(COMP_NAME,END_TIME) INCLUDE (EVENT_ID,SITE_NAME,COMP_TYPE,INFO,TEST_NAME,MEASURE,MSMT_HOST,EVENT_SEVERITY,START_TIME,DURATION);
CREATE INDEX IDX3_ALARM_HISTORY_SUMMARY ON ALARM_HISTORY_SUMMARY ( EVENT_ID); 
CREATE INDEX IDX4_ALARM_HISTORY_SUMMARY ON ALARM_HISTORY_SUMMARY (COMP_NAME, START_TIME, END_TIME);
CREATE INDEX IDX5_ALARM_HISTORY_SUMMARY ON ALARM_HISTORY_SUMMARY (START_TIME);
CREATE INDEX IDX6_ALARM_HISTORY_SUMMARY ON ALARM_HISTORY_SUMMARY (END_TIME);
CREATE INDEX IDX7_ALARM_HISTORY_SUMMARY ON ALARM_HISTORY_SUMMARY (TEST_NAME, MEASURE, END_TIME,COMP_TYPE);
create nonclustered index idx8_alarm_history_summary on alarm_history_summary (EVENT_SEVERITY,END_TIME,COMP_TYPE);
