Unix Technical Forum

how to dump and comprehend a rollback block

This is a discussion on how to dump and comprehend a rollback block within the Oracle Database forums, part of the Database Server Software category; --> Can somebody point to official or unofficial documentation on how to dump and read info of a rollback segment ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-22-2008, 05:38 PM
NetComrade
 
Posts: n/a
Default how to dump and comprehend a rollback block

Can somebody point to official or unofficial documentation on how to
dump and read info of a rollback segment block? (based on info in
v$transaction)
I have some transactions that stay open for too long (usually
transactions last <1 second, it's a web app). They have TX
locks/transaction slots open. I have a suspicion it's due to sql over
the link.
Any other help would be appreciated as well.

Thanks.
........
We use Oracle 8.1.7.4 on Solaris 2.7 boxes
remove NSPAM to email
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-22-2008, 05:38 PM
Sybrand Bakker
 
Posts: n/a
Default Re: how to dump and comprehend a rollback block

On Tue, 01 Jul 2003 17:57:07 GMT, andreyNSPAM@bookexchange.net
(NetComrade) wrote:

>Can somebody point to official or unofficial documentation on how to
>dump and read info of a rollback segment block? (based on info in
>v$transaction)
>I have some transactions that stay open for too long (usually
>transactions last <1 second, it's a web app). They have TX
>locks/transaction slots open. I have a suspicion it's due to sql over
>the link.
>Any other help would be appreciated as well.
>
>Thanks.
>.......
>We use Oracle 8.1.7.4 on Solaris 2.7 boxes
>remove NSPAM to email



If you suspect it is sql, you can easily identify the sql by linking
the addr column of v$transaction back to the taddr column of
v$session. The sql_address and the sql_hash_value of v$session point
to the offending statement.
I have to look up the info to dump blocks, but I'm not sure it is
really useful. The lock info is maintained in data blocks.


Sybrand Bakker, Senior Oracle DBA

To reply remove -verwijderdit from my e-mail address
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-22-2008, 05:38 PM
NetComrade
 
Posts: n/a
Default Re: how to dump and comprehend a rollback block

What if there were other sql statements executed after the 'offending'
statement?

Anyway, unfortunately sql_address and hash_value show zeros, i've
already tried that, but thanks.

The only lock for the session is a TX lock, and nothing else. the id's
for TX locks containt rollback info, if I recall correctly, which is
already given in v$transaction table.

If there is any other way in identifying the TX lock source I could
use, it would be greatly appreciated.

Thanks,



On Tue, 01 Jul 2003 22:46:34 +0200, Sybrand Bakker
<gooiditweg@sybrandb.demon.nl> wrote:


>If you suspect it is sql, you can easily identify the sql by linking
>the addr column of v$transaction back to the taddr column of
>v$session. The sql_address and the sql_hash_value of v$session point
>to the offending statement.
>I have to look up the info to dump blocks, but I'm not sure it is
>really useful. The lock info is maintained in data blocks.


........
We use Oracle 8.1.7.4 on Solaris 2.7 boxes
remove NSPAM to email
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-22-2008, 05:39 PM
Pete Finnigan
 
Posts: n/a
Default Re: how to dump and comprehend a rollback block

Hi

Norman posted a link to the Oracle faq in 2002 as follows http://www.jlc
omp.demon.co.uk/faq/blockdump.html that shows how to dump a single block
or multiple blocks.

I also knew of an undocumented way to do it:

obtain a DBA (data block address) - you can use file number and block
number and dbms_utility for example:

exec dbms_output.put_line(dbms_utility.make_data_block_ address(1,7));

and then feed the number returned to

alter session set events 'immediate trace name blockdump level {address
from above}';

I am not sure that this will work on later versions of Oracle but you
can try it. It should create a trace in user_dump_dest. Remember that
block dumps are not too readable and considered internal information by
Oracle for use by support.

You could also use LogMiner (can be used on redo logs but much better on
archive logs) and dump out the transaction that way. See Toms book page
1097 for a section detailing how to use the packages. It is quite easy
really, create a dictionary, find the log you need and load it and start
log miner. Then you can query the contents from v$logmnr_contents.

You could also look at raw redo. There is a good paper at http://www.ora
faq.com/papers/redolog.pdf showing how to do this.

hth

kind regards

Pete

--
Pete Finnigan
emailete@petefinnigan.com
Web site: http://www.petefinnigan.com - Oracle security audit specialists
Book:Oracle security step-by-step Guide - see http://store.sans.org for details.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-22-2008, 05:41 PM
Yong Huang
 
Posts: n/a
Default Re: how to dump and comprehend a rollback block

Pete Finnigan <pete@petefinnigan.com> wrote in message news:<iZfQlYBgirA$EwxS@peterfinnigan.demon.co.uk>. ..
>
> alter session set events 'immediate trace name blockdump level {address
> from above}';
>
> I am not sure that this will work on later versions of Oracle but you
> can try it. It should create a trace in user_dump_dest. Remember that


That's not available after Oracle 7. Beginning with Oracle 8, you have
to alter system to dump a block.

Yong Huang
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-22-2008, 05:41 PM
Joel Garry
 
Posts: n/a
Default Re: how to dump and comprehend a rollback block

andreyNSPAM@bookexchange.net (NetComrade) wrote in message news:<3f01ca60.2257970810@nyc.news.speakeasy.net>. ..
> Can somebody point to official or unofficial documentation on how to
> dump and read info of a rollback segment block? (based on info in
> v$transaction)
> I have some transactions that stay open for too long (usually
> transactions last <1 second, it's a web app). They have TX
> locks/transaction slots open. I have a suspicion it's due to sql over
> the link.
> Any other help would be appreciated as well.


I find Note:1039126.6 from metalink pretty helpful.

jg
--
@home.com is bogus. Remember pencil drops?
http://www.signonsandiego.com/news/c...rwarnings.html
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-22-2008, 05:42 PM
Pete Finnigan
 
Posts: n/a
Default Re: how to dump and comprehend a rollback block

Thanks Yong, I wasn't certain it was oracle 7 only.

cheers

Pete

In article <b3cb12d6.0307021315.5faedf6@posting.google.com> , Yong Huang
<yong321@yahoo.com> writes
>Pete Finnigan <pete@petefinnigan.com> wrote in message news:<iZfQlYBgirA$EwxS@pe
>terfinnigan.demon.co.uk>...
>>
>> alter session set events 'immediate trace name blockdump level {address
>> from above}';
>>
>> I am not sure that this will work on later versions of Oracle but you
>> can try it. It should create a trace in user_dump_dest. Remember that

>
>That's not available after Oracle 7. Beginning with Oracle 8, you have
>to alter system to dump a block.
>
>Yong Huang


--
Pete Finnigan
emailete@petefinnigan.com
Web site: http://www.petefinnigan.com - Oracle security audit specialists
Book:Oracle security step-by-step Guide - see http://store.sans.org for details.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-22-2008, 05:44 PM
Jaap W. van Dijk
 
Posts: n/a
Default Re: how to dump and comprehend a rollback block

On Tue, 01 Jul 2003 21:21:21 GMT, andreyNSPAM@bookexchange.net
(NetComrade) wrote:

>What if there were other sql statements executed after the 'offending'
>statement?
>
>Anyway, unfortunately sql_address and hash_value show zeros, i've
>already tried that, but thanks.
>
>The only lock for the session is a TX lock, and nothing else. the id's
>for TX locks containt rollback info, if I recall correctly, which is
>already given in v$transaction table.
>
>If there is any other way in identifying the TX lock source I could
>use, it would be greatly appreciated.
>
>Thanks,


There are issues involving distributed SELECT's causing TX locks on
rollback. Do you use these? Then maybe the following link can put you
on track:

http://www.jlcomp.demon.co.uk/faq/dblink_commit.html

HTH, Jaap.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:38 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com