Unix Technical Forum

Sql 2k Database Log file Full ... How to empty that

This is a discussion on Sql 2k Database Log file Full ... How to empty that within the SQL Server forums, part of the Microsoft SQL Server category; --> hi, my sql database log file has been fulled recently ..... becuase there are 55 millions records in main ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-29-2008, 02:56 AM
Abdul Salam
 
Posts: n/a
Default Sql 2k Database Log file Full ... How to empty that

hi,

my sql database log file has been fulled recently ..... becuase
there are 55 millions records in main 3 tables .... so how i can empty
log file ...
i don't want to attach new log file or save any pervious log info
.....

thanks for helping me ... and my company ..

Abdul Salam
Sr. DBA + Programmer
Xebec Groups of Business.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-29-2008, 02:56 AM
Hugo Kornelis
 
Posts: n/a
Default Re: Sql 2k Database Log file Full ... How to empty that

On 19 May 2004 22:11:30 -0700, Abdul Salam wrote:

>hi,
>
> my sql database log file has been fulled recently ..... becuase
>there are 55 millions records in main 3 tables .... so how i can empty
>log file ...
> i don't want to attach new log file or save any pervious log info
>....
>
>thanks for helping me ... and my company ..
>
>Abdul Salam
>Sr. DBA + Programmer
>Xebec Groups of Business.


Hi Abdul,

If you're talking MS SQL Server, there are various options:

1. Make a backup of the databse (either full or incremental). After that,
SQL Server can reuse old log space.
2.Set the recovery model to "simple". You probably have it set to "full"
now; this will cause the log file to grow until you take a new backup of
the database.
3. Execute BACKUP LOG databasename WITH TRUNCATE_ONLY. This will release
old log space.

I recommend that you read up on recovery model in Books Online to fully
understand the difference between the simple and full recovery models and
the implications of the TRUNCATE_ONLY option.

Best, Hugo
--

(Remove _NO_ and _SPAM_ to get 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-29-2008, 02:56 AM
Dan Guzman
 
Posts: n/a
Default Re: Sql 2k Database Log file Full ... How to empty that

To add to Hugo's response, you should choose a database recovery model based
on your recovery requirements. If your recovery plan is to simply restore
from your last full backup, use the SIMPLE recovery model. You can use DBCC
SHRINKFILE to release unused log space back to the OS after you've set the
recovery model and removed committed transactions from the log (truncate).

Your transaction log still needs to be sized to accommodate the largest
single transaction.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Abdul Salam" <whylanguages@yahoo.com> wrote in message
news:18a7dc26.0405192111.5b98bcef@posting.google.c om...
> hi,
>
> my sql database log file has been fulled recently ..... becuase
> there are 55 millions records in main 3 tables .... so how i can empty
> log file ...
> i don't want to attach new log file or save any pervious log info
> ....
>
> thanks for helping me ... and my company ..
>
> Abdul Salam
> Sr. DBA + Programmer
> Xebec Groups of Business.



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:50 PM.


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