# SQL help??? - Log_Reuse Setting



## erocktroll (Oct 6, 2003)

Hi. I'm desparately hoping someone will know how to help me with this...I'll try to keep it short. Basically, I've got a computer running MS SQL 2005. My transaction log was set to autogrowth, and has reached the maximum capacity of the drive it is on. I just got handed this pc, and told to fix the problem. In the event log, it says to check log_reuse_wait to find out why the transaction log is expanding rather then reusing space. I've googled that, and it indicates that I should be able to find it in sys.databases. My current issue is that I can't pull up that information. Since sys.databases is listed as a view, I assume I should be able to type "select * from sys.databases" and return all of the information, but when I try, I get a message that says an error occurred while executing b atch. Error message is: The directory name is invalid. Am I not using the right method to try to see this information?


** Some additional information: I don't appear to be able to issue any standard SQL statements - so I must have a much larger issue....I'm getting the same message trying to run a select statment against a table in the database.
Thanks.


----------



## Rockn (Jul 29, 2001)

If the log file is out of control just detach the main database, delete the transaction log file and reattach the database again using the attach single file database syntax. This will create a new transaction log with the minimum size default.

Be sure to back everything up prior to doing any of this.

http://www.mssqlcity.com/Articles/Adm/attach_database.htm


----------

