How to edit the path on a database in SQL 2012

Hi All,

Please see attached. I'm trying to edit the file location of a database path that was set to unc, we need to change it to the local drive of the server.  There is no option to edit the path, tried to take off line. Using SQL Server 2012

Thanks,
SQLDatabasePath.JPG
jaya31Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

65tdRetiredCommented:
The data base path is usually set at the DB server level not per DB.
0
yo_beeDirector of Information TechnologyCommented:
You are going to have to:
  1. Detach
  2. Move the MDF and LDF to the new location
  3. Attach

https://blog.sqlauthority.com/2012/10/28/sql-server-move-database-files-mdf-and-ldf-to-another-location/

How many databases?
You can scripted it, but it maybe easier to do the steps in the link per DB if it is only a hand full
0
jaya31Author Commented:
Hi,

The unc path is pointing to the right location however our backups are failing, backup vendor stating because its the unc path. I just need to change it to c:\
0
The Five Tenets of the Most Secure Backup

Data loss can hit a business in any number of ways. In reality, companies should expect to lose data at some point. The challenge is having a plan to recover from such an event.

Kyle AbrahamsSenior .Net DeveloperCommented:
You can backup to a UNC.  

It's more than likely a permissions issue when writing to the drive that's causing the error.

What account is the sql service running under?

Ensure that account has write permissions to the destination folder.
0
Kyle AbrahamsSenior .Net DeveloperCommented:
And to change it you would detach it and reattach it as yo_bee suggested.  Just re-attach the MDF using the local drive instead . . . assuming the UNC is the same server.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
yo_beeDirector of Information TechnologyCommented:
The path you are looking at is the location of the DB and Logs.  This is not the backup destination.  That setting is in the maintenance plans

Here are some screenshots that will help illustrate this.

 img1.png
img2.png
img3.png
img4.png
0
jaya31Author Commented:
Thanks all, I detached and re-attached to the local c: and backup is working now. Were using Data Protection Agent to back it didn't like the unc path.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Databases

From novice to tech pro — start learning today.