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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing location of the Transaction Log 1

Status
Not open for further replies.

cricketer1

Technical User
Mar 15, 2001
76
US
I have a transaction log that is currently in a drive that is becoming full. I need to relocate this transaction log to another drive to where it's data file is. This is a production database and supports a website. What are my options. How would I do this.

Thanks
 
if you have to keep the site 'live' while you do this, you could just add the new location to the existing transaction log file. sql will automatically use the new space as needed or you can limit the size of the original file so that it uses it immediately. to do this, just right click on the database in em and select 'properties' and go to the transaction log tab.
 
to move the transaction log, or for that matter the database, you can.

1. exec sp_detach_db (look it up, but you can specify exactly what file).
2. move the file to the new drive.
3. exec sp_attach_db (specify the new location)

you have now moved the entire transaction log. Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top