Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Two Log Files

Status
Not open for further replies.

Ed75

MIS
Joined
Sep 29, 2004
Messages
27
Location
US
I recently inherited a database which I am in the process of cleaning up.

The database currently has two transaction logs, one to the same drive as the data and one pointed to the root of the C:\ drive.

It looks like the one on the C:\ drive was added later for some reason.

Is it possible to get rid of the second log file and if so how?

Thanks,
 
You should be able to empty the file and the drop the file.

Code:
dbcc shrinkfile (LogFileName, EMPTYFILE)
go
alter database DatabaseName
remove file LogFileName
go

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top