Home > Archive > MS SQL Server > May 2005 > MDF and LDF file locations









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author MDF and LDF file locations
coenzyme

2005-05-17, 9:23 am

Is it possible to relocate the data and/or the log files after they have been
assigned a location? Thanks everyone for your help.
Rick Sawtell

2005-05-17, 9:23 am


"coenzyme" < coenzyme@discussions
.microsoft.com> wrote in message
news:6827AE2A-BCDD-49BC-B98E- 4B14F414D465@microso
ft.com...
> Is it possible to relocate the data and/or the log files after they have

been
> assigned a location? Thanks everyone for your help.


There are several ways of doing this.

One method is to do a backup and restore.

Look at the MOVE TO option in RESTORE in the BOL.


Rick Sawtell
MCT, MCSD, MCDBA



Aleksandar Grbic

2005-05-17, 9:23 am

yes,
1. detach and attach
2. backup and restore

--
Aleksandar Grbic
MCDBA, Senior Database Administrator


"coenzyme" wrote:

> Is it possible to relocate the data and/or the log files after they have been
> assigned a location? Thanks everyone for your help.

Armando Prato

2005-05-17, 9:23 am

You could run sp_detach_db, move the files to the new location, and then
run sp_attach_db. Another method is to backup and then restore.

"coenzyme" < coenzyme@discussions
.microsoft.com> wrote in message
news:6827AE2A-BCDD-49BC-B98E- 4B14F414D465@microso
ft.com...
> Is it possible to relocate the data and/or the log files after they have

been
> assigned a location? Thanks everyone for your help.



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com