Link to home
Start Free TrialLog in
Avatar of BrianMc1958
BrianMc1958

asked on

Can I change internal names of .mdf and .ldf?

Dear Experts,

Is there a way to change the internal names of the data and log files on SQL Server?  (Like, change "my_db_data" to "my_other_db_data"?

Thanks!
BrianMc1958  
Avatar of matrix_aash
matrix_aash
Flag of United Kingdom of Great Britain and Northern Ireland image

Yes you can change the name of the files but you will have to attach the db again. And its always a best practice to take a backup of your data incase something goes wrong.

Aash.
ASKER CERTIFIED SOLUTION
Avatar of Kevin Hill
Kevin Hill
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
matrix_aash proposes a solution for the physical files, mine is for the logical filenames.  Choose the appropriate path for your need
Avatar of BrianMc1958
BrianMc1958

ASKER

Thanks very much, folks.  It works!