01 Jul 2008 @ 8:46 PM 

 

We all have our weak moments and do stupid things. Just like I did with our virtual center database transaction log. I did not set a maximum growth limit to which the transaction log could grow and so it ran out of disc space. And our Virtual Center server stop running because of it. So I needed to trash the transaction log and fast. I made this little SQL script that can be run with SQL Query Analyzer.

itsme

 

The very simpel solution to this problem:

USE [YouVirtualCenterDB]

BACKUP LOG [YouVirtualCenterDB] WITH TRUNCATE_ONLY

DBCC SHRINKFILE([YouVirtualCenterDB]_log,2)

Remeber this will trash your transaction log. It will not be backuped to disc it will be written to dev NULL. This script is only to be used if your sure you don’t need the transaction log or you need the database running again in a very short time and there is no other way.

Hope it helps some of you.

Tags Tags: , ,
Categories: Microsoft, SQL server, VMWare
Posted By: Richard
Last Edit: 10 Jul 2009 @ 07 32 PM

EmailPermalinkComments (0)
\/ More Options ...
Change Theme...
  • Users » 62
  • Posts/Pages » 19
  • Comments » 1
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

About me



    No Child Pages.