Avatar of SpaceCoastLife
SpaceCoastLife
 asked on

Rename physical filenames of SQL Server 2017 database

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.
DatabasesMicrosoft SQL ServerSQL

Avatar of undefined
Last Comment
SpaceCoastLife

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Scott Pletcher

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SpaceCoastLife

ASKER
Thank you for the very straightforward and easy to follow instructions.  Works like a charm.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck