If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Sybase > log segment full when deleting table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-06-12, 21:29
alfa_w alfa_w is offline
Registered User
 
Join Date: Dec 2011
Posts: 4
log segment full when deleting table

Hello,

I was deleting a table and got log segment full error. I know how to add new log segment and did it before. But is there any other way to solve the problem? Can I use dump tran to release the space?
Here is my operation.

1> use isi_tst_db
2> go
1> delete from Trade_Hist
2> go
Space available in the log segment has fallen critically low in database
'isi_tst_db'. All future modifications to this database will be suspended until
the log is successfully dumped and space becomes available.
The transaction log in database isi_tst_db is almost full. Your transaction is
being suspended until space is made available in the log.

Then I tried dump tran but it doesn't work.

1> dump tran isi_tst_db with truncate_only
2> go
DUMP TRANSACTION for database 'isi_tst_db' could not truncate the log. Either extend the log using ALTER DATABASE ... LOG ON command or eliminate the oldest active transaction in database 'isi_tst_db' shown in syslogshold table.

Can any one advise?
BTW: The DB is set to 'trunc log on chkpt'

Thanks,
Alfa
Reply With Quote
  #2 (permalink)  
Old 02-07-12, 00:01
AkhileshN AkhileshN is offline
Registered User
 
Join Date: Feb 2012
Location: DUBAI
Posts: 5
Sybase database logsegment full

You may try the following option

1) select * from master..syslogshold and kill the transactions of the database having issue.
2) dump tran dbname with no_log

If the above doesn't work

alter(increase the log size) the database logsegment then dump the transaction log.

--akhilesh
Reply With Quote
  #3 (permalink)  
Old 02-07-12, 09:21
pdreyer pdreyer is offline
Registered User
 
Join Date: May 2005
Location: South Africa
Posts: 1,268
Break your delete into smaller transactions (use set rowcount).
Or if you really want to delete the whole table use
truncate table Trade_Hist
Reply With Quote
Reply

Tags
log full, log space full

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On