Antwort: [DB2-L] Identifying Tables with short rows

Roy Boxwell

Antwort: [DB2-L] Identifying Tables with short rows

Yes but it's pretty horrible...

First from SYSTABLES select all tables that have ALTEREDTS > CREATEDTS (This gives you all tables that have been ALTERed since creation)

and then add AND ALTEREDTS > REORGLASTTIME from the RTS (For the TS of course) and Bobs your Uncle! Note that the RTS Reorg column can be NULL

so really use a COALESCE(REORGLASTTIME, TIMESTAMP('0001.01.01-00.00.00.000000'))

As a secondary source you can use the STATSTIME in SYSCOLUMNS to find VARCHAR changed columns without runstats if the Date is 0001.01.02 then bingo!

Roy
Steve Schuering <[login to unmask email]>
Gesendet von: DB2 Data Base Discussion List <[login to unmask email]>
17.12.2007 04:46 PM GMT
Bitte antworten an DB2 Database Discussion list at IDUG

An: [login to unmask email]
Kopie:
Blindkopie:
Thema: [DB2-L] Identifying Tables with short rows
 

Is there a way to identify Tables that have had columns added via an Alter
Add Columns but have not been reorged or loaded yet?

We frequently refresh environments using DSN1COPY and we need to know if
any of the Tables have "short" rows and the other environment's version does
not.

The IDUG DB2-L Listserv is only part of your membership in IDUG.  DB2-L list archives, the FAQ, and delivery preferences are at http://www.idug.org/lsidug under the Listserv tab.  While at the site, you can also access the IDUG Online Learning Center, Tech Library and Code Place, see the latest IDUG conference information, and much more.  If you have not yet signed up for Basic Membership in IDUG, available at no cost, click on Member Services at http://www.idug.org/lsms


The IDUG DB2-L Listserv is only part of your membership in IDUG. DB2-L list archives, the FAQ, and delivery preferences are at www.idug.org under the Listserv tab. While at the site, you can also access the IDUG Online Learning Center, Tech Library and Code Place, see the latest IDUG conference information, and much more.
If you have not yet signed up for Basic Membership in IDUG, available at no cost, click on Member Services

Steve Schuering

Re: Identifying Tables with short rows
(in response to Roy Boxwell)
Unfortunately that won't work as we run Modifys against anything older than
30 days.

The IDUG DB2-L Listserv is only part of your membership in IDUG. DB2-L list archives, the FAQ, and delivery preferences are at http://www.idug.org/lsidug under the Listserv tab. While at the site, you can also access the IDUG Online Learning Center, Tech Library and Code Place, see the latest IDUG conference information, and much more. If you have not yet signed up for Basic Membership in IDUG, available at no cost, click on Member Services at http://www.idug.org/lsms