cancel
Showing results for 
Search instead for 
Did you mean: 

How to clear the database log file in mssql server

Former Member
0 Kudos

Hi,

In my CRM system the database is not working. i checked in mssql server 2005. The database present in folder where CRM installed. But it not showing in MSSQL server .It shows error like the database log file is full. How to clear that log file?? and how to fix this issue??? please give your suggestions...

Regards,

gopi

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi ,

Please perform the below

Either  Delete or Shrink the log

To Delete :

Expand Databases, right-click the database from which to delete the file, and then click Properties.->Select the Files page.->In the Database files grid, select the file to delete and then click Remove ->Click OK.

To Shrink :

Right click on your database ->Select Properties->Click on Options->Change the recovery model to Simple ->Click OK ->Right click on the database-> Select Tasks > Shrink > Database ->Click OK ->Right click on the database ->Select Properties->Click on Options->Change the recovery model to Full->Click OK.

Please let me know if this helps.

Former Member
0 Kudos

hi Ahamed,

if I delete or shrink the log file whether it ll affect the database. let me know whether the log file is like temp file for database ???

Regards,

gopi

Former Member
0 Kudos

Hi Gopi,

The  transaction log file contains unused space that you will not be needing, you can reclaim the excess space by reducing the size of the transaction log and this is shrinking the log file.

Shrinking can occur only while the database is online and, also, while at least one virtual log file is free. In some cases, shrinking the log may not be possible until after the next log truncation.

Please check this link for more info

http://technet.microsoft.com/en-us/library/ms178037(v=sql.105).aspx

Sriram2009
Active Contributor