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
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 check and reduce size of log file

Author  Topic 

imughal
Posting Yak Master

192 Posts

Posted - 2012-01-02 : 23:45:52
Hi,

how do i check size of sharepoint database log file and how do i reduce / shrink log file size.

thx

jeffw8713
Aged Yak Warrior

819 Posts

Posted - 2012-01-03 : 15:10:58
Why do you think you need to do this? The log file should be maintained at a steady size - as long as you are backing up the transaction log frequently (e.g. every 15 minutes). If your database is in simple recovery model, the transaction log can't be backed up - and it will grow out to the size it needs to be for daily operations.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2012-01-03 : 15:30:14
Let's say the decided to 900 trillion inserts all at once...ooops

What if they want to recover from a poor process or mistake

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2012-01-03 : 15:31:33
[code]
DBCC SHRINKFILE (<database>_Log, 250);
GO
DBCC SHRINKFILE (<database>, 250);
GO
DBCC SHRINKDATABASE (<database>, 10);
GO
[/code]



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2012-01-03 : 17:18:15
No, please no. That's just plain bad practice.

Log management: http://www.sqlservercentral.com/articles/64582/

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

- Advertisement -