SQL/MX 3.1 Database and Application Migration Guide (H06.23+, J06.12+)

HP NonStop SQL/MX Release 3.1 Database and Application Migration Guide663853-001
B-1
B Identifying Tables That Contain
an IDENTITY Column
The following steps use queries to extract names of tables with an IDENTITY column.
These queries must be run against version 3100 metadata.
-- Execute all of the following from within mxci.
-- Set pattern $$SYSTEM$$ to the name of the system on which the queries are
-- executing.
set pattern $$SYSTEM$$ YOURSYS;
-- All of the following statements between the "--Begin Repeat" and
-- "--End Repeat" comments must be executed for every catalog on the system,
-- changing the following "set catalog" statement argument to match the next
-- catalog in sequence for each iteration.
-- Begin Repeat for every catalog on the system...
-- Set catalog to <catalog name>
set catalog YOURCAT;
Select
obj.object_name,schm.schema_name
from definition_schema_version_3100.objects obj,
definition_schema_version_3100.sg_usage sgu,
nonstop_sqlmx_$$SYSTEM$$.system_schema.schemata schm
where obj.object_uid = sgu.using_object_obj_uid and obj.schema_uid =
schm.schema.uid;
-- End Repeat for every catalog on the system...