

--
--    Licensed Materials - Property of IBM
--    
--    BI and PM: JSM
--    
--    (c) Copyright IBM Corp. 2003, 2010.
--    
--    US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
--    


-------------------------------------------------------------------------------
-- NC830_UPDATE_MS.SQL	       *DO NOT EDIT*		Data Store Version: 830		 
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
--$100-- backup create begin
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
--$110-- backup inserts begin
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
--$130-- views drop begin
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
--$140-- tables drop begin
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
--$200-- recreate tables begin
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
--$202-- primary keys add begin
-------------------------------------------------------------------------------

CREATE NONCLUSTERED INDEX I_NC_TASKSCHEDULE ON NC_TASKSCHEDULE (FK_TASK_ID ASC, PK_TASKSCHEDULE_ID ASC)
go

CREATE NONCLUSTERED INDEX X_NC_TASK_QUEUE ON NC_TASK_QUEUE(TASK_ID ASC)
go

CREATE NONCLUSTERED INDEX XI_NC_TASK_QUEUE ON NC_TASK_QUEUE (PRIORITY ASC, DATE_ENTERED ASC, SERVICE_NAME ASC, SDS_INSTANCE_ID ASC, STATUS ASC,	SERVER_GROUP ASC)
go

CREATE NONCLUSTERED INDEX XII_NC_TASK_QUEUE ON NC_TASK_QUEUE (TASK_ID ASC, DATE_ENTERED ASC)
go

CREATE NONCLUSTERED INDEX X_NC_TSE_STATE_MAP ON NC_TSE_STATE_MAP (TASK_ID ASC) 
go

CREATE NONCLUSTERED INDEX XI_NC_TSE_STATE_MAP ON NC_TSE_STATE_MAP (PARENT_ID ASC, EXECUTING ASC, STATUS ASC, TASK_ID ASC)
go

CREATE NONCLUSTERED INDEX I_R_TASKSCHEDULE_SCHEDULE ON R_TASKSCHEDULE_SCHEDULE (FK_TASKSCHEDULE_ID ASC, FK_SCHEDULE_ID ASC)
go

CREATE NONCLUSTERED INDEX I_NC_TASK_HISTORY_DETAIL ON NC_TASK_HISTORY_DETAIL(TASK_ID ASC) 
go

-------------------------------------------------------------------------------
--$210-- views create begin
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
--$220-- server data inserts begin
-------------------------------------------------------------------------------

INSERT INTO NC_DB_VERSION (DB_VERSION_ID,BUILD) VALUES(830,'build no.')
go

 -------------------------------------------------------------------------------
 --$230-- restore inserts begin
 -------------------------------------------------------------------------------

 -------------------------------------------------------------------------------
 --$250-- backup drop begin
 -------------------------------------------------------------------------------

-------------------------------------------------------------------------------
--$260-- end sql by function
-------------------------------------------------------------------------------
--	END NC830_UPDATE_MS.SQL			*	DO NOT EDIT	 * 		 
-------------------------------------------------------------------------------
