467,910 Members | 1,772 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,910 developers. It's quick & easy.

logs

hi, i have some huge logs, how do u empty them , from time to time

DaveL

Aug 30 '08 #1
  • viewed: 1075
Share:
4 Replies
"daveL" <ve***********@yahoo.comwrote in message
news:9D******************@nlpi069.nbdc.sbc.com...
hi, i have some huge logs, how do u empty them , from time to time

DaveL
By backing them up (BACKUP LOG). If you don't require regular log backups
then select the simple recovery mode, but bear in mind that you will
generally be at greater risk of data loss under simple recovery.

--
David Portas
Aug 30 '08 #2
AC
if you don't need the log anymore or the data inside it, this will
shrink it to 10MB.
DBCC SHRINKFILE (DBNAME_log, 10)

replace DBName with your DB.

Amit Chandel
Aug 30 '08 #3
AC (am**@desiboy.com) writes:
if you don't need the log anymore or the data inside it, this will
shrink it to 10MB.
DBCC SHRINKFILE (DBNAME_log, 10)
But shrinking the log to 10 MB is bad, unless this is just a database
you fool around in. If you don't backup the log as it should, the log
may grow overly large, but even if you run with simple recovery of at
least 100 MB is to recommend, maybe 1GB unless the database is really
small. With a small log file it will only auto-grow and that will slow
down operations, and can also lead to fragmentation of the file.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

Aug 30 '08 #4
this is just a copy of production, for development
dont need the huge logs

thanks
i have set it to simple mode

Dave L

"David Portas" <RE****************************@acm.orgwrote in message
news:eb******************************@giganews.com ...
"daveL" <ve***********@yahoo.comwrote in message
news:9D******************@nlpi069.nbdc.sbc.com...
>hi, i have some huge logs, how do u empty them , from time to time

DaveL

By backing them up (BACKUP LOG). If you don't require regular log backups
then select the simple recovery mode, but bear in mind that you will
generally be at greater risk of data loss under simple recovery.

--
David Portas


Aug 30 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Jean Hagen | last post: by
2 posts views Thread by Peter Sands | last post: by
6 posts views Thread by paul | last post: by
2 posts views Thread by dayjah | last post: by
4 posts views Thread by madzambonis | last post: by
3 posts views Thread by Kofa | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.