RE: Db2 find last record inserted

RE: Db2 find last record inserted

 

  

hi all,
there are two type of information maintained in the catalog tables
1.information about DDL(or structure) of the objects.
2.information about data existing within the objects.

when you make changes to the structure of the objects it gets automatically
updated to the catalog tables but when you make changed to data within a
object you should do runstats to validate the changes.

wish you all merry christmas.
regards,
saravana.

-----Original Message-----
From: Thomas Erdenberger
[mailto:db2udbdba-ezmlmshield-x90187568.[Email address protected]
Sent: Thursday, December 23, 2004 8:31 PM
To: LazyDBA Discussion
Subject: RE: Db2 find last record inserted


Hi all,

why would there be a difference between "select count(*)..." and "select
card from syscat.tables" ? Shouldn't they be in sync? If not, how often
and when is syscat.tables being updated?

Cheers,
Thomas


> Subject: RE: Db2 find last record inserted
> From: "Saravana_Ganesan " <db2udbdba-ezmlmshield-x28005462.[Email address
protected]
> Date: Mon, 20 Dec 2004 16:27:55 +0530
> To: "LazyDBA Discussion" <[Email address protected]
>
>
> hi sachin,
> you can write a script with the following algorithm
> 1.do runstats on all the tables before your start of updation.
> 2.repeat step 3,4 for each table
> 3.find the difference between "select count(*) from table" and "select
card
> from syscat.tables"
> 4.if there is a difference then that table is updated
>
>
> regards,
> saravana.
>
>
> -----Original Message-----
> From: Sachin Kumar
> [mailto:db2udbdba-ezmlmshield-x29346911.[Email address protected]
> Sent: Monday, December 20, 2004 4:05 PM
> To: LazyDBA Discussion
> Subject: Db2 find last record inserted
>
>
> Hi All,
>
> I have a Db2 UDB 8.1 databse with around 180 tables. One of my user
> inserts a row in a certain table. How can i find out which table and
> which row has been updated ? Which table/view should be queried ??
>
> regards
> Sachin
>
>
> ---------------------------------------------------------------------
> PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
> website: http://www.LazyDBA.com
> To unsubscribe: http://www.lazydba.com/unsubscribe.html
> **************************************************************************

> This email (including any attachments) is intended for the sole use of the
> intended recipient/s and may contain material that is CONFIDENTIAL AND
> PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying
or
> distribution or forwarding of any or all of the contents in this message
is
> STRICTLY PROHIBITED. If you are not the intended recipient, please contact
> the sender by email and delete all copies; your cooperation in this regard
> is appreciated.
> **************************************************************************
>
>
>

--
"The Guide is definitive. Reality is frequently inaccurate."


---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
**************************************************************************
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**************************************************************************

DB2 & UDB email list listserv db2-l LazyDBA home page