RID - which record? 
Author Message
 RID - which record?
Looking at the snapshot monitor output for locks, the list will show
the objects being locked and the type of lock hold by a particular
application.  For row, the object ID is actually the RID.  Is there a
way to know based on the RID, which record is being locked, for
instance, getting the value for the key columns based on the RID
will definitely help me to get what I want.

Regards.



Sat, 07 Sep 2002 03:00:00 GMT
 RID - which record?

Hi,
I don't think there is any supported way to get row from the object ID
in a lock snap.

Hope this helps,
David.

Quote:

> Looking at the snapshot monitor output for locks, the list will show
> the objects being locked and the type of lock hold by a particular
> application.  For row, the object ID is actually the RID.  Is there a
> way to know based on the RID, which record is being locked, for
> instance, getting the value for the key columns based on the RID
> will definitely help me to get what I want.

> Regards.



Sat, 07 Sep 2002 03:00:00 GMT
 RID - which record?

says...
Quote:
> Hi,
> I don't think there is any supported way to get row from the object ID
> in a lock snap.

> Hope this helps,
> David.


> > Looking at the snapshot monitor output for locks, the list will show
> > the objects being locked and the type of lock hold by a particular
> > application.  For row, the object ID is actually the RID.  Is there a
> > way to know based on the RID, which record is being locked, for
> > instance, getting the value for the key columns based on the RID
> > will definitely help me to get what I want.

> > Regards.

Hi,

On db2 2.1 (with only 4K pages) I found the actual data with:

pagenr = rowid \\ 256
slotnr = rowid %  256

I printed the data with db2dart

db2dart <dbname> /DD
then enter: {tableid},{tablespaceid},{pagenr}p,1,y

The page with the requested row was displayed which contains all
occupied slots. With the found slotnr I could get the data of the row
which causes the lock.

I never tried to get it to work with V5 or V6 but it should be possible.

Hope this helps.



Sat, 07 Sep 2002 03:00:00 GMT
 RID - which record?
I'm glad it worked for you.  RIDs are not constant in DB2 - a RID can be
reassigned by DB2 at any time.  This is why we don't expose them.  So, use
methods like this with caution. They are not formal programming interfaces
that will be the same with future versions of DB2.


Quote:

> says...
> > Hi,
> > I don't think there is any supported way to get row from the object ID
> > in a lock snap.

> > Hope this helps,
> > David.


> > > Looking at the snapshot monitor output for locks, the list will show
> > > the objects being locked and the type of lock hold by a particular
> > > application.  For row, the object ID is actually the RID.  Is there a
> > > way to know based on the RID, which record is being locked, for
> > > instance, getting the value for the key columns based on the RID
> > > will definitely help me to get what I want.

> > > Regards.

> Hi,

> On db2 2.1 (with only 4K pages) I found the actual data with:

> pagenr = rowid \\ 256
> slotnr = rowid %  256

> I printed the data with db2dart

> db2dart <dbname> /DD
> then enter: {tableid},{tablespaceid},{pagenr}p,1,y

> The page with the requested row was displayed which contains all
> occupied slots. With the found slotnr I could get the data of the row
> which causes the lock.

> I never tried to get it to work with V5 or V6 but it should be possible.

> Hope this helps.



Sat, 07 Sep 2002 03:00:00 GMT
 
 [ 4 post ] 

 Relevant Pages 

1. Getting rid off record's with identical fieldvalues ??

2. Getting rid of the IDENTITY property on a column withou getting rid of the column

3. How to get RID of just inserted record?

4. How do you get rid of duplicate records?

5. Getting rid of duplicate records

6. getting rid of double-appearing records after filtering

7. Help to get rid of Duplicate Records

8. Getting rid of duplicate records.

9. Get X records before and Y records after a specific record

10. Can't get rid of message

11. Getting unwanted data that I can't get rid of

12. RID Error msg 625


 
Powered by phpBB® Forum Software