Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 How to truncate data from database log file?

Author  Topic 

getur.srikanth@gmail.com
Yak Posting Veteran

77 Posts

Posted - 2010-02-18 : 09:26:33
Hi,

My database log file is growing like anything. I need to truncate immediatly.

SharePoint_Config_log 2 C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\SharePoint_Config_log.LDF NULL 6705472 KB 2147483648 KB 10% log only

How can I truncate data in this log file?.

DaleTurley
Yak Posting Veteran

76 Posts

Posted - 2010-02-18 : 09:39:56
Back it up.

[url]http://msdn.microsoft.com/en-us/library/ms186865.aspx[/url]

And then look at changing the recovery model of the database if the log isn't backed up regularly / isn't needed...

[url]http://msdn.microsoft.com/en-us/library/aa173678(SQL.80).aspx[/url]
Go to Top of Page

getur.srikanth@gmail.com
Yak Posting Veteran

77 Posts

Posted - 2010-02-18 : 10:06:54
I already have backup database. tell me how can I truncate this now?
Go to Top of Page

DaleTurley
Yak Posting Veteran

76 Posts

Posted - 2010-02-18 : 10:35:21
If you have already performed a log backup, do you mean shrink the physical file?

If so, try DBCC SHRINKFILE. [url]http://msdn.microsoft.com/en-us/library/ms189493.aspx[/url]
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2010-02-18 : 11:56:54
If won't be "growing like anything" if you have backed up the LOG.

You have probably only backed up the DATABASE.
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2010-02-18 : 12:14:10
Please read through this - [url]http://www.sqlservercentral.com/articles/64582/[/url]

--
Gail Shaw
SQL Server MVP
Go to Top of Page
   

- Advertisement -