Change name of mdf file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Some times I need to change the mdf file name, but I can't.
How can I do it?
thanks,
Jose
 
*.mdf (and *.ldf) file is totally comtrolled by SQL Server, you cannot
rename/copy/delete it. You need to detach it from the SQL Server first. When
it is attached to SQL Server, its name is not important, as long as SQL
Server knows which database it stands for. Why do you need to rename
sometimes?
 
I need rename because I'm developing the database, sometimes, I need to make
changes, testing.

I detach and tthen I rename but when I attach, the SQL Server gives the same
name and tell me, I can't attach, because it already exist.
Any Solution?
Thanks

Jose
 
Back
Top