473,414 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

logs

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

DaveL

Aug 30 '08 #1
4 1163
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jean Hagen | last post by:
I'm trying to write a script to weekly remove MySQL logs, the general, error and binary log files. Following the MySQL documentation, I've written a script that moves all current log files, then...
2
by: Peter Sands | last post by:
Hi, I am testing out some restores to a stand-by server, by roll-forwading the logs. I have this setup. There is no user-exit, but logretain is on, for archive logging. I have 2 DB's on...
6
by: paul | last post by:
Hi, i made an attempt to restore a online backup made with include logs option. But when i rollforward the db, i can't pout it online because it always ned log file. I tried the option to...
2
by: dayjah | last post by:
Hi, We are in the process of setting my mysql replication on mysql ver 4.1.18. However we have noticed an odd bug that occurs every so often. Every hour we issue flush logs to mysql so that we...
8
by: Raj | last post by:
-Is it possible to recover a tablespace just from a full offline backup and offline incremental backup? If not possible -Can we recover tablespace from Full backup , Wednesdays incremental backup...
3
by: TG | last post by:
Coming from a (mostly) Oracle shop, I am unclear how SS transaction logs work as far as up to point of failure recovery goes. I have the few MSSQL databases I look after in full recovery mode,...
4
by: aj | last post by:
DB2 LUW v8.2 FP 14 RHAS 2.1 I have a DB2 online DB backup that was done w/ the INCLUDE LOGS option. I am interested in restoring that backup, and rolling forward ONLY the logs contained in the...
4
by: madzambonis | last post by:
Here is the situation.... We have Primary Server A linked to Standby Server B via HADR. Primary Server A has recently installed LOGARCHMETH1 to archive logs and a 2nd homegrown script that...
3
by: Kofa | last post by:
Hi, we have an application which uses online backups, so archive logging is a requirement. We have a small/moderate size database (a few hundred megabytes isn't much by today's standards) with...
0
by: shorti | last post by:
We are running DB2 UDB 8.1 fp 14 on AIX using archival logging and online backups. I was running some disaster tests and found my database restore was not restoring to the latest active log. ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.