Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
mitin
Yak Posting Veteran
81 Posts |
Posted - 2013-05-01 : 08:15:24
|
Hi, How do I find out the name of the transaction log for a particular db? and where it is stored on disk?I get a message when deleting from a large table that the transaction log is full, so ust need to truncate it, but I can't find out what its called or where it is....sure this is simple to find out, but im having difficulty!! any help greatly appreciated....many thanks! |
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2013-05-01 : 08:41:05
|
In SQL Server, by default the recovery mode is set to FULL. In FULL recovery mode and BULK LOGGED recovery model, the transaction log will keep on growing until you do something about it. See this thread on what you need to do about it: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=184962As to your question about how to find where the files are, use this query: SELECT DB_NAME(database_id) AS db,name, physical_name FROM sys.master_files But don't do anything to the physical file. That can be fatal to your database.If you can live with recovery only based on full backups, you could change the recovery model to simple. I assume you do take regular backups of the database. If you don't you should do that immediately. |
|
|
djj55
Constraint Violating Yak Guru
352 Posts |
Posted - 2013-05-01 : 13:40:14
|
Look at USE YourDatabase;GOsp_helpfile;GO also USE master;GODBCC sqlperf(logspace);GO djj |
|
|
|
|
|