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»»

Clearing LOD file (126 GB) Expand / Collapse
Author
Message
Posted Thursday, August 21, 2008 2:31 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 4:01 AM
Points: 1,557, Visits: 2,613
Dear All,
One of our client's server is in Germany. We have made a project for them recently. It got crashed today.When I checked I found that MDF size is hardly 256MB and LDF is 126GB (huuuge)...

How can I clear the LOG..? Wot are the things need to be done before clearing LOG...? Please guide me..Very urgent..

Thanks in advance...

Dear freind Marsh -- I expect an ealry reply from you especialy...

Santhos Nahir (India)
Post #556344
Posted Thursday, August 21, 2008 2:47 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, October 15, 2014 12:30 PM
Points: 1,238, Visits: 2,957
hello
first dbcc loginfo and check status column may be 0 or 2 ,if 0 you can


backup log dn_name with truncate _only
go
dbcc shrinkfile(log_file_id or file_name,size you want to shrink)
go



Post #556351
Posted Thursday, August 21, 2008 2:54 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, January 26, 2012 5:26 AM
Points: 1,367, Visits: 1,585
And after you follow Hadrian's advice, take a full backup. Then find out if that database had any periodic full/log backups. If yes, try to find the reason for the large transaction log. If no, then set up periodic database and log backups (or if the recovery requirements permit it set it to simple recovery mode)

Regards,
Andras




Andras Belokosztolszki, MCPD, PhD
GoldenGate Software
Post #556355
Posted Thursday, August 21, 2008 3:04 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 4:01 AM
Points: 1,557, Visits: 2,613
Thanks a lot. will try the same...
Post #556358
Posted Thursday, August 21, 2008 3:08 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 4:01 AM
Points: 1,557, Visits: 2,613
Hello,

The problem is that SSMS itself is not opening....Without query analyzer how will I fire the command..?





Post #556359
Posted Thursday, August 21, 2008 3:21 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, January 26, 2012 5:26 AM
Points: 1,367, Visits: 1,585
nairsanthu1977 (8/21/2008)
Hello,

The problem is that SSMS itself is not opening....Without query analyzer how will I fire the command..?








You can use sqlcmd from command line for example. Or run SSMS on a remote computer.

Regards,
Andras




Andras Belokosztolszki, MCPD, PhD
GoldenGate Software
Post #556363
Posted Thursday, August 21, 2008 3:59 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 @ 3:09 PM
Points: 40,172, Visits: 36,560
Some background info on what's happened - http://sqlinthewild.co.za/index.php/2008/07/23/recovery-model-and-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 #556372
Posted Thursday, August 21, 2008 6:50 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, September 26, 2014 12:57 AM
Points: 343, Visits: 1,520
1 -stay calm.

2 - what is your database's recovery model? If it's simple, see 3). For full and bulk-logged, see 4).

3 - two possibilities
3a. you have an old transaction that's still active, that's preventing the log from being truncated, causing indefinite growth. Use DBCC OPENTRAN to determine if this is the case. Take steps to end that transaction (commit, rollback, kill etc). Then use DBCC SHRINKFILE to shrink the log file. May need to do it a couple of times, see here for reasons.

3b. there were large transactions that caused the transaction log to grow to such a huge size. If this is going to be common, shrinking the file may not be a good option. If not, run DBCC SHRINKFILE to shrink the log.

4. see 3a) and 3b) for possible reasons (but not the suggested resolutions), also
4a. you have not been backing up your transaction log, hence causing the transaction log to grow indefinitely.

Do you need to make a backup of the current transaction log, perhaps for log shipping purposes, or to be able to perform a point-in-time recovery (note that this would still be impossible if there are minimally logged transactions in the current transaction log)? If yes, you'll need to back it up to disk. Run a BACKUP LOG ... command, folowed by DBCC SHRINKFILE.

If not (and you're very sure of this), run a BACKUP LOG with the TRUNCATE_ONLY option, then follow the suggestions by Hadrian and Andras, especially the part on performing a full database backup.


Ray Mond
Yohz Software
Providing SQL Server database tools for 9 years and counting.
http://www.yohz.com
Post #557013
Posted Friday, August 22, 2008 3:01 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Monday, August 5, 2013 7:41 AM
Points: 1,146, Visits: 230
your log size is in GB while Data file size is in MB, it seems you are not taking backup of log.
if log backup is not necessry for you then use command TRUNATE_ONLY and truncate the log.

hope this will work.


Manoj



Post #557132
Posted Monday, August 25, 2008 7:01 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Sunday, May 4, 2014 10:21 PM
Points: 199, Visits: 307
Just curious, not criticizing at all but...

Wouldn't a question like this be best suited for the administration forum?

I'm seeing a lot of these types of questions being posted in the performance forum.

I know we're all trying to help... Guess its just me being the picky "classification" type of anal retentive DBA again... :D



Post #558098
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse