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 Programming
 How to shrink SQL logs

Author  Topic 

manny.oliveros
Starting Member

4 Posts

Posted - 2008-02-08 : 09:54:03
Just want to inquire on how to shrink my sql logs.
My disk space is running and I suspect that sql logs is the cause
of the problem..
Kindly help

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2008-02-08 : 11:57:29
BACKUP LOG <database name> WITH TRUNCATE_ONLY will empty your log file (depending on recovery model) , but if you then want to make the log file smaller, you will have to use DBCC SHRINKFILE


Jack Vamvas
--------------------
Search IT jobs from multiple sources- http://www.ITjobfeed.com
Go to Top of Page

Qualis
Posting Yak Master

145 Posts

Posted - 2008-02-08 : 11:58:51
These links are for informational purposes:
http://support.microsoft.com/kb/873235
http://msdn2.microsoft.com/en-us/library/ms189085.aspx

This link will show you how to shrink your DB files:
http://technet.microsoft.com/en-us/library/ms189493.aspx
Go to Top of Page

manny.oliveros
Starting Member

4 Posts

Posted - 2008-02-11 : 04:40:31
Thank you for the info.
Just want to confirm if Shrinking a Database won't affect my
database and any related application.

My problem is that my server is running out of space. My suspect is that the log files
of SQL server is not properly configured.

I can perform this procedure but I'm afraid it might affect my database.
Currently, I'm still on gathering informaation about this procedure.

Any help will be greatly appreciated..



Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2008-02-11 : 05:49:25
Have you checked to see if there are any procedures or transactions that are having an adverse affect on your disk space?

Jack Vamvas
--------------------
Search IT jobs from multiple sources- http://www.ITjobfeed.com
Go to Top of Page
   

- Advertisement -