Knowledgebase

How to clean MS SQL 2008 transaction log file

Please login to Mylittleadmin in websitepanel and execute this acript against your database:

USE yourdatabasename_here;

GO

-- Truncate the log by changing the database recovery model to SIMPLE.

ALTER DATABASE yourdatabasename_here

SET RECOVERY SIMPLE;

GO

-- Shrink the truncated log file to 1 MB.

DBCC SHRINKFILE (2, 1);  -- 2 is the file ID for tr log file,you can also mention the log file name (FrigoBG_plovdiv_log)

GO

-- Reset the database recovery model.

ALTER DATABASE yourdatabasename_here

SET RECOVERY FULL;

GO

Was this answer helpful?

 Print this Article

Also Read

I get error when conneting to MS SQL 2008 server

If you get this error: The server principal " " is not able to access the database " " under the...

How to send email from your asp.net code?

' Visual Basic Sample - Sending SMTP Authenticated E-mail ' Please replace yourdomain.com in...

Conection String to MS SQL 2008 DB - example

In order to connect to SQL Server 2008 from Management Studio, Enterprise Manager, Query...

MS SQL 2008 and MySQL server addresses

MSSQL 2008 server addresses are: sql2008.aspnethosting.co.uk sql2008r2.aspnethosting.co.uk...

How to enable remote IIS management for my site?

Login to your hosting control panel here http://cp.aspnethosting.co.uk then click on Web - Web...