Solved

Change SQL Server Database files path

Posted on 2014-09-16
9
205 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
Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

623 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