Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

MS SQL Express How to make the Database on separate disk or separate partition

Posted on 2010-08-19
2
Medium Priority
?
443 Views
Last Modified: 2012-05-10
Hello Everyone;

I'm not really good at MS SQL, but I would like to install it on the C Drive and have all the database saved on the D Drive.

is there any way we can do it ? I already have installed MS SQL on the C:\ dive so what i'm most interested in, is how to make the DB be saved completely on another disk partition (in our case D:\).

Thanks  
0
Comment
Question by:atigris
2 Comments
 
LVL 16

Expert Comment

by:carsRST
ID: 33475248
When you create a database you should be able to specify where to store the database files.

You can also change the default location:

http://social.msdn.microsoft.com/forums/en-US/sqlsetupandupgrade/thread/c16a591f-86cc-4ce2-94ef-c8ad34054de8
0
 
LVL 2

Accepted Solution

by:
atigris earned 0 total points
ID: 33477171
This is how it is done;

1. you can change  SQL Server default DB and LOG location (this option is available on SQL Express 2005,2008)

 SQL Server Management Studio - right click on the Server - property - Database settings - Database default location

specify the new location of the DB and Log

2. You can do it at SQL DB level (This option is not available on SQL Express edition)  

http://www.psoft.net/HSdocumentation/sysadmin/mssqlchangehome.html

If you still want to do it on SQL Express edition (follow method 1# )

   1.  Create new MS SQL data location (E:\MSSQL\data\)
   2. Stop MS SQL server
   3. Move all databases to a new location (move *.mdf and *.ldf files)
   4. Create junction link between old and new MS SQL data folders. This can be done with Sysinternals Junction or any other utility of this kind
   5. Start MS SQL server

That is all there is to it.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

916 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