Solved

Change SQL Server Database files path

Posted on 2014-09-16
9
203 Views
Last Modified: 2014-09-16
On one of the server  I have SQL Server 2012 and my client forced me to a different drive to store the database files (.ldf,.mdf...)

I need to know if I change the default path for these files and put the new path.
Would it be recommended or safe to do so.
0
Comment
Question by:yadavdep
[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
  • 4
  • 3
  • 2
9 Comments
 
LVL 6

Accepted Solution

by:
Mandeep Singh earned 250 total points
ID: 40327269
Default path is mentioned on installation time.

Safety is depend on configuration done: like RAID 0, RAID 1, RAID 5 or RAID 10.
0
 

Author Comment

by:yadavdep
ID: 40327270
Hi Mandeep,


yes my client has applied Raid 1 on E: drive (something like this only) and he wants me to use e: drive only for database.
0
 
LVL 29

Expert Comment

by:becraig
ID: 40327273
Are you referencing system databases or specific databases you will use for an application ?

If the latter, simply go to the management studio and select to attach a database and point to the log and database files.
0
Why You Need a DevOps Toolchain

IT needs to deliver services with more agility and velocity. IT must roll out application features and innovations faster to keep up with customer demands, which is where a DevOps toolchain steps in. View the infographic to see why you need a DevOps toolchain.

 

Author Comment

by:yadavdep
ID: 40327276
I need to store only the database I create to store on E:  drive, not for system database
0
 
LVL 6

Expert Comment

by:Mandeep Singh
ID: 40327282
Actually RAID 1 is used for Excellent redundancy and you also get a good performance on data read but data write may be a bit slow.

so i think you have to use E: drive because of Excellent redundancy
0
 
LVL 29

Assisted Solution

by:becraig
becraig earned 250 total points
ID: 40327289
Simply go to the management studio and select to attach a database and point to the log and database files you now have on the E drive.
0
 

Author Comment

by:yadavdep
ID: 40327350
One strange thing is happening.
In SQL server management studio, I right clicking Server name and going to Properties, then Database Settings.

When I change the default path, it only accepting the new path for Backup.
For Data and Log files path it keeps reverting my changes.

I change the path clicks on Ok, when I come come back and check it again it, both Data and log files path reverts back to previous values.
0
 
LVL 6

Expert Comment

by:Mandeep Singh
ID: 40327367
After path change restart SQL Server Services will fix this.
0
 

Author Comment

by:yadavdep
ID: 40327376
Thanks Mandeep, your solution work perfectly.
0

Featured Post

Is Your DevOps Pipeline Leaking?

Is your CI/CD pipeline a hodge-podge of randomly connected tools? You’ve likely got a tool to fix one problem & then a different tool to fix another, resulting in a cluster of tools with overlapping functionality. Learn how to optimize your pipeline with Gartner's recommendations

Question has a verified solution.

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

OfficeMate Freezes on login or does not load after login credentials are input.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

734 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