How to rename the physical names of the database files?
Hi, I was trying to rename a database and its files to make them look similar to each other,i was successful in renaming database name and logical names of the files but i was not able to rename the physical names of them,after a bit of reading i came to know that there are two ways 1. with XP_CMDSHELL and 2.DETACHING AND ATTACHING THE DB , XP_CMDSHELL is not available for me or i am not much aware dealing with it, I tried below mentioned steps but failed to rename physical names of the file. I renamed database and its logical file names from DB_CORE TO DB_ETL(New name of the database and its logical file name that i want to use further ). After renaming the logical names i have successfully detached and attached the database but the physical names of the files remained same (with old names) the changes i tried to make did not reflect on them, so i am wondering how can i rename the physical names of the files...just physical names of the files... i tried below mentioned way to attach the database after renaming logical files and detaching. USE [master] CREATE DATABASE [DB_ETL] ON ( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\DB_ETL.mdf'), ( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\DB_ETL_log.ldf') FOR ATTACH Query executed successfully but changes did not reflect on the physical names of the files.