[Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1572
  • Last Modified:

Can I move my SQL 2005 data folder to a different drive? Please recommend best practice.

I recently installed SQL 2005 Workgroup Edition on my Windows 2003 Small Business Server.  I have 2 drives mirroring each other as drive C: with my OS also installed on it.  I also have a RAID 5 setup with 3 disks as my D: drive.  I installed SQL Server on my C drive and I'm looking for some advice.  Is there anyway I can move my data folder to the D drive for more redundancy?  I am also going to have alot of data in the database eventually so it may grow to large to fit on the C drive.  When I installed it, it upgraded some other SQL desktop instances so I'm kinda of afraid to uninstall.  

Please recommend what I should do in this situation. I should also store my log files on seperate disks than the data correct?
2 Solutions
The standard way is to use detach/attach. This link will walk you through the steps:
MFredinAuthor Commented:
I haven't done anything with it yet... could I just unistall and reinstall?
yes you can move to a different drive, use attach/detach
I would detach/attach.

Or you can create the data folder on D: and then change the default location of the database when you create it to that folder.

Guy Hengel [angelIII / a3]Billing EngineerCommented:
>I haven't done anything with it yet... could I just unistall and reinstall?
yes, you could do that.

note that usually, with system databases, you don't need to move them (at least not for performance reasons).
user database should simply be BACKUPed and RESTOREd, during restore you can set new file locations.
the detach/attach method is also fine, but less "secure", although faster (as you copy the data only once)

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now