-- Licensed Materials - Property of IBM
-- IBM Cognos Products: ccllogging
-- (C) Copyright IBM Corp. 2005, 2010
-- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. 

create table  COGIPF_EDITQUERY (
	 HOST_IPADDR    		varchar (15),
	 HOST_PORT      		integer,
	 PROC_ID        		integer,
	 LOCALTIMESTAMP         	timestamp,
	 TIMEZONE_OFFSET        	integer,
	 SESSIONID      		varchar (255),
	 REQUESTID      		varchar (255) not null,
	 STEPID         		varchar (255),
	 SUBREQUESTID   		varchar (255),
	 THREADID       		varchar (255),
	 COMPONENTID    		varchar (64),
	 BUILDNUMBER    		integer,
	 LOG_LEVEL  			integer,
	 TARGET_TYPE    		varchar (255),
	 QUERYPATH     			varchar (512),
	 STATUS         		varchar (255),
	 ERRORDETAILS   		varchar (2000),
	 RUNTIME        		integer,
	 QUERYNAME     			varchar (255),
	 PACKAGE        		varchar (255),
	 MODEL  			varchar (255)
)

rename COGIPF_NATIVEQUERY to COGIPF_NATIVEQUERY_OLD

create table COGIPF_NATIVEQUERY (
	 HOST_IPADDR    		varchar (15),
	 HOST_PORT      		integer,
	 PROC_ID        		integer,
	 LOCALTIMESTAMP         	timestamp,
	 TIMEZONE_OFFSET        	integer,
	 SESSIONID      		varchar (255),
	 REQUESTID      		varchar (255) not null,
	 STEPID         		varchar (255),
	 SUBREQUESTID   		varchar (255),
	 THREADID       		varchar (255),
	 COMPONENTID    		varchar (64),
	 BUILDNUMBER    		integer,
	 LOG_LEVEL  			integer,
	 OPERATION      		varchar (255),
	 REQUESTSTRING  		clob(1G)
)

insert into COGIPF_NATIVEQUERY select * from COGIPF_NATIVEQUERY_OLD

drop table COGIPF_NATIVEQUERY_OLD

