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

Posted on 2007-10-09
Last Modified: 2012-05-05
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?
Question by:MFredin
    LVL 27

    Accepted Solution

    The standard way is to use detach/attach. This link will walk you through the steps:

    Author Comment

    I haven't done anything with it yet... could I just unistall and reinstall?
    LVL 16

    Expert Comment

    yes you can move to a different drive, use attach/detach
    LVL 27

    Expert Comment

    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.

    LVL 142

    Assisted Solution

    by:Guy Hengel [angelIII / a3]
    >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

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    If you are a user of the discontinued Microsoft Office Accounting 2008 (MSOA) and have to move to a new computer running Windows 8, you will be unhappy to discover that it won't install.  In particular, Microsoft SQL Server 2005 Express Edition (SSE…
    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
    Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now