views:

14

answers:

1

Hi

The database files (mdf ldf) were taken from a crashed machine and loaded using the attach method. Since everything has been working fine, except when i try to truncate the transaction log the file size does not change and i now notice that it says Not Applicable against the filegroup entry for the transaction log in database properties.

Is the transaction log not active? Did i not attach it correctly? How can i check?

Regards

Gary

EDIT: There is no option to backup the transaction log in the Backup Window of management studio express either

+2  A: 

This is standard behaviour - log files are not part of any filegroup - I've just checked a couple of my databases to confirm this (I wasn't sure one way or another but I am now) - so nothing to fear.

Regarding not being able to truncate the log file, which recovery model are you using?

Will A
there is no option to backup the transaction log in the management studio backup window
g_g
Using full recovery model.
g_g
Have you performed a full backup of the database since restoring it onto the server?
Will A
yep, backup just before trying to truncate
g_g
And you can insert / update against the database? (A check that the transaction log is intact, which I'm sure it is anyway).
Will A
yes lots of inserts against it
g_g
Does this work?USE <yourdatabasename>GOBACKUP LOG <yourdatabasename> WITH TRUNCATE_ONLY
Will A
BTW - truncating the log will not change the file size - it'll merely free up space within the log file for future transactions.
Will A
Just checked and the recovery model is actually set to simple.
g_g