If the Integration Service does not drop the sequence or view objects, you can execute an SQL query on the database to identify all orphaned sequence or view objects created by the Integration Service. If the Integration Service ran multiple sessions or multiple Integration Services write to the same database account, the SQL query returns all orphaned objects from every session that ran and did not drop sequence or view objects.
When the Integration Service creates a sequence or view object in the database, it adds the prefix PM_S to the names of sequence objects and PM_V to the names of view objects. You can search for these objects based on the prefix to identify them.
The following queries show the syntax to search for sequence objects created by the Integration Service:
SELECT SEQNAME FROM SYSCAT.SEQUENCES
WHERE SEQSCHEMA = CURRENT SCHEMA
AND SEQNAME LIKE ‘PM\_S%’ ESCAPE ‘\’
SELECT SEQUENCE_NAME FROM USER_SEQUENCES
WHERE SEQUENCE_NAME LIKE ‘PM\_S%’ ESCAPE ‘\’
The following queries show the syntax to search for view objects created by the Integration Service:
SELECT VIEWNAME FROM SYSCAT.VIEWS
WHERE VIEWSCHEMA = CURRENT SCHEMA
AND VIEW_NAME LIKE ‘PM\_V%’ ESCAPE ‘\’
SELECT VIEW_NAME FROM USER_VIEWS
WHERE VIEW_NAME LIKE ‘PM\_V%’ ESCAPE ‘\’
Microsoft SQL Server or Sybase ASE:
SELECT NAME FROM SYSOBJECTS
WHERE TYPE=‘V’ AND NAME LIKE ‘PM\_V%’ ESCAPE ‘\’
SELECT TableName FROM DBC.Tables
WHERE CreatorName = USER
AND TableKind =‘V’
AND TableName LIKE ‘PM\_V%’ ESCAPE ‘\’