Change SQL Server Database files path

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.
yadavdepAsked:
Who is Participating?
 
Mandeep SinghConnect With a Mentor Database AdministratorCommented:
Default path is mentioned on installation time.

Safety is depend on configuration done: like RAID 0, RAID 1, RAID 5 or RAID 10.
0
 
yadavdepAuthor Commented:
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
 
becraigCommented:
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
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
yadavdepAuthor Commented:
I need to store only the database I create to store on E:  drive, not for system database
0
 
Mandeep SinghDatabase AdministratorCommented:
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
 
becraigConnect With a Mentor Commented:
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
 
yadavdepAuthor Commented:
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
 
Mandeep SinghDatabase AdministratorCommented:
After path change restart SQL Server Services will fix this.
0
 
yadavdepAuthor Commented:
Thanks Mandeep, your solution work perfectly.
0
All Courses

From novice to tech pro — start learning today.