troubleshooting Question

Rename physical filenames of SQL Server 2017 database

Avatar of SpaceCoastLife
SpaceCoastLife asked on
DatabasesMicrosoft SQL ServerSQL
2 Comments1 Solution170 ViewsLast Modified:
I am looking for the correct way to rename physical file names for SQL Server 2017 database.  In 2008 R2 this was so easy to just detach, rename the mdf/ldf files, then reattach and point SSMS to the 'new' mdf/ldf files.  However, in 2017 I cannot figure it out.  I've found different postings when Googling, but they all seem to lead me to a dead end or are too complex for me to understand.  

I would like, for example, to take a database I have attached as Database_1234 - which has physical file names of Database.mdf and Database.ldf - to be renamed to Database_1234.mdf and Database_1234.ldf.

I need the simplest, easiest, non-advanced DB admin way to do this.  Thank you in advance.
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros