Solved

forgot to change system databases path

Posted on 2009-12-21
5
230 Views
Last Modified: 2012-06-27
I forgot to change the path for system databases at the time of install. Is it possible to change the location of data files and log files of system datbases (master,model, msdb,tempdb). Currently they are in default location - program files.


0
Comment
Question by:sqlserverdba
  • 3
  • 2
5 Comments
 
LVL 26

Expert Comment

by:tigin44
ID: 26095517
sure you can move the system databases..
here is a link explaining the process in detatil

http://msdn.microsoft.com/en-us/library/ms345408.aspx
0
 
LVL 1

Author Comment

by:sqlserverdba
ID: 26095570
I dont want to move the system databases. can i just change the path of the data files and log files of the system databases like into d drive or e drive?

From the link you gave, is it enough to use this
ALTER DATABASE model MODIFY FILE ( NAME = model , FILENAME = 'd:\data\model.mdf' )

can you please explain?
0
 
LVL 26

Accepted Solution

by:
tigin44 earned 500 total points
ID: 26095599
you can not  copy directly the system databases from one location to another location. You should follow the procedures defined in that article..
by issuing the above command you tell the server that the database files will be in the specified path... when you stop the server and copy the files to the new location the server will use the files from the new location. You cannot move the system dtabase files by using simple detach, copy and attach process...
0
 
LVL 1

Author Comment

by:sqlserverdba
ID: 26095978
im working on it. can you please tell me which system databases (data, log files) do i need to move. Is it enough to move just master (mdf,ldf) and tempdb(mdf,ldf) from c drive to e drive?

or should i move all of them for all the system databases
0
 
LVL 26

Assisted Solution

by:tigin44
tigin44 earned 500 total points
ID: 26099954
you should move all the system databases... my advise will be moving data, log and tempdb files to different locations if available
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

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.
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
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.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

831 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