Unix Technical Forum

Sybase transaction log gets full.

This is a discussion on Sybase transaction log gets full. within the Sybase forums, part of the Database Server Software category; --> Hi, I have a stored procedure that has 2 cursors. The first cursor updates roughly 72, 000 records. The ...


Go Back   Unix Technical Forum > Database Server Software > Sybase

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 06:04 PM
shilpa.pradhan@gmail.com
 
Posts: n/a
Default Sybase transaction log gets full.

Hi,

I have a stored procedure that has 2 cursors. The first cursor updates
roughly 72, 000 records. The second one should update roughly 750,000
records before it finishes.

we have a counter in each of these cursors and we have a commit at 100
records and then we reset the counter. The commit statement should
flush the log segment (aka transaction log) and create space,

but even though the commit happens (transaction state value =1) , the
log never flushes and eventually runs out of space.

Has anyone ever encountered this problem? I am not sure why this
problem is occurring. There is no special behavior of commits inside a
SP or a cursor as far as I know of.

The command "dump transaction <<database_name>> with truncate_only"
works but that is a DBA command and that is not available to the ID
that will launch this SP, so that is ruled out.

Any help will be highly appreciated.

Thanks,
Shilpa

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-08-2008, 06:04 PM
bret@sybase.com
 
Posts: n/a
Default Re: Sybase transaction log gets full.


shilpa.pradhan@gmail.com wrote:
> Hi,
>
> I have a stored procedure that has 2 cursors. The first cursor updates
> roughly 72, 000 records. The second one should update roughly 750,000
> records before it finishes.
>
> we have a counter in each of these cursors and we have a commit at 100
> records and then we reset the counter. The commit statement should
> flush the log segment (aka transaction log) and create space,
>
> but even though the commit happens (transaction state value =1) , the
> log never flushes and eventually runs out of space.
>
> Has anyone ever encountered this problem? I am not sure why this
> problem is occurring. There is no special behavior of commits inside a
> SP or a cursor as far as I know of.
>
> The command "dump transaction <<database_name>> with truncate_only"
> works but that is a DBA command and that is not available to the ID
> that will launch this SP, so that is ruled out.
>
> Any help will be highly appreciated.
>
> Thanks,
> Shilpa


A COMMIT by itself does not cause the log to be flushed. It allows
the records for that transaction to be flushable (if there are no other
open transactions that preceed it in the log). However, a DUMP TRAN
command must be run, or the "truncate log on ckpt" database option must
be set in order for the log to be truncated.

So is the "truncate log on ckpt" option set for this database?
Are there any threshold actions defined on the log segment (that might
issue a DUMP TRAN command)?

What does master..syslogshold say is the oldest open transaction for
this database?
-bret

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-08-2008, 06:04 PM
Shilpa
 
Posts: n/a
Default Re: Sybase transaction log gets full.

Thanks bret

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-08-2008, 06:04 PM
Shilpa
 
Posts: n/a
Default Re: Sybase transaction log gets full.

Thanks bret,

I will check these out a post a reply

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 12:26 AM.


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