Solved

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

Posted on 2010-08-19
2
416 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
get_systemdrive info from tsql? 1 23
Stored Proc - Rewrite 42 73
SSRS: Why is Visual Studio stripping these properties? 2 41
SQL profiler 3 19
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

730 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