SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Clearing LOD file (126 GB)


Clearing LOD file (126 GB)

Author
Message
Joy Smith San
Joy Smith San
Hall of Fame
Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)

Group: General Forum Members
Points: 3184 Visits: 3200
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)
Hadrian
Hadrian
UDP Broadcaster
UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)

Group: General Forum Members
Points: 1463 Visits: 3754
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



Andras Belokosztolszki
Andras Belokosztolszki
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2237 Visits: 1585
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
Joy Smith San
Joy Smith San
Hall of Fame
Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)

Group: General Forum Members
Points: 3184 Visits: 3200
Thanks a lot. will try the same...
Joy Smith San
Joy Smith San
Hall of Fame
Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)

Group: General Forum Members
Points: 3184 Visits: 3200
Hello,

The problem is that SSMS itself is not opening....Without query analyzer how will I fire the command..?
Andras Belokosztolszki
Andras Belokosztolszki
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2237 Visits: 1585
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
GilaMonster
GilaMonster
SSC Guru
SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)

Group: General Forum Members
Points: 86905 Visits: 45266
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, MVP, M.Sc (Comp Sci)
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


Ray Mond
Ray Mond
SSChasing Mays
SSChasing Mays (633 reputation)SSChasing Mays (633 reputation)SSChasing Mays (633 reputation)SSChasing Mays (633 reputation)SSChasing Mays (633 reputation)SSChasing Mays (633 reputation)SSChasing Mays (633 reputation)SSChasing Mays (633 reputation)

Group: General Forum Members
Points: 633 Visits: 1542
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
Get a SQL Size 2.0 single-instance license for FREE
Claim one here!
manoj2001
manoj2001
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1193 Visits: 240
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



Jeremy Brown
Jeremy Brown
Old Hand
Old Hand (315 reputation)Old Hand (315 reputation)Old Hand (315 reputation)Old Hand (315 reputation)Old Hand (315 reputation)Old Hand (315 reputation)Old Hand (315 reputation)Old Hand (315 reputation)

Group: General Forum Members
Points: 315 Visits: 310
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... BigGrin



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search