Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Log size is Big Expand / Collapse
Author
Message
Posted Tuesday, January 8, 2013 12:27 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, March 6, 2013 12:28 AM
Points: 31, Visits: 156
i am new in DBA.
If in a database MDF file Size is 10 GB and LDF file size is 50 GB

What are the steps require to reduce to log file size.

Post #1403996
Posted Tuesday, January 8, 2013 1:03 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 2:36 AM
Points: 2,840, Visits: 3,970
DIB IN (1/8/2013)
If in a database MDF file Size is 10 GB and LDF file size is 50 GB.What are the steps require to reduce to log file size.
LDF will grow it should. it is its nature. but we need to manage the files ? whats the recovery model ? simple or full ? are you taking its regular backup ? see this link http://www.sqlservercentral.com/articles/Administration/64582/


-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done
Post #1404025
Posted Tuesday, January 8, 2013 1:15 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Monday, October 13, 2014 6:42 AM
Points: 5,216, Visits: 5,111
As you state that you are a new DBA, I would strongly recommend reading the Accidental DBA guide (link in my signature below) as it will cover some of the main issues which are faced in the world of SQL.

But as Bhuvnesh, what is the recovery model of the database? If FULL or BULKLOGGED do you have transaction log backups running?




Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1404029
Posted Tuesday, January 8, 2013 1:35 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, March 6, 2013 12:28 AM
Points: 31, Visits: 156
recovery model is full
Post #1404041
Posted Tuesday, January 8, 2013 1:37 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Monday, October 13, 2014 6:42 AM
Points: 5,216, Visits: 5,111
Do you do transaction log backups?

Do you need the databases to be in full recovery?

What is your acceptable amount of data loss? What is your recovery point objective? Can you loose a days worth of data with no affects to the business, or can you only loose minutes?

How often do you do full or differential backups?




Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1404043
Posted Tuesday, January 8, 2013 2:37 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 7:41 AM
Points: 40,187, Visits: 36,593
Please read through this - Managing Transaction Logs


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1404074
Posted Tuesday, January 8, 2013 3:38 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Wednesday, October 8, 2014 5:34 AM
Points: 1,608, Visits: 378
You should keep it to simple recovery model, untill u dont think your all transactions should logged in log file till the database backup process and it increses size of your log file..
OR you should take backup periodically..
Post #1404098
Posted Tuesday, January 8, 2013 3:46 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, March 6, 2013 12:28 AM
Points: 31, Visits: 156
Well i have gone through the articles mentioned above. Currently there is no transaction back up. database is in full recovery.

Will it be useful if we run the below query when there is no transaction active?

USE DBNAME;
GO
-- Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE DBNAME
SET RECOVERY SIMPLE;
GO
-- Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE (DBNAME_Log, 1);
GO
-- Reset the database recovery model.
ALTER DATABASE DBNAME
SET RECOVERY FULL;
GO

Post #1404105
Posted Tuesday, January 8, 2013 3:48 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Monday, October 13, 2014 6:42 AM
Points: 5,216, Visits: 5,111
Do you need the database to be in FULL recovery?

As I have said what is your acceptable amount of data loss? How much data can you afford to loose with this database?





Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1404106
Posted Tuesday, January 8, 2013 3:53 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, March 6, 2013 12:28 AM
Points: 31, Visits: 156
database to be Full recovery.
there will be no data loss or minimum data loss.
Post #1404113
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse