mysterious database file

  • For one of my databases there is a 32GB database file in the MSSQL/Data folder. There is another 47GB database file of the same name under MSSQL/LOG folder. What would the huge file in the Log folder be from? Shouldn't a backup file be .bak if that were the case?

    Thanks for any help.

    Andy

  • The transaction log file?

    What are the extensions of the files in the data and log folders? If the 47GB file is .ldf, it's your database transaction log file.

    You can also run sp_helpdb database name to show you the file paths and also the file sizes.

    If it is your transaction log that size, you may want to check your transaction log backups to ensure you are doing them regularly enough to keep the file size in check. You can also manually shrink the file down by backing up the log and then issuing a DBCC SHRINKFILE command.

  • Also, with regards to the comment about backups being .bak. By default, yes, but you can call the backups any extension you want.

    You can also use DBCC SQLPERF(LOGSPACE) to view transaction logs size and the percentage used.

  • If that is your log file, then I would hazard a guess that your DB is in full recovery model and you have no log backups.

    Read this - 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

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply