Change name of mdf file

J

Jose Perdigao

Some times I need to change the mdf file name, but I can't.
How can I do it?
thanks,
Jose
 
N

Norman Yuan

*.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?
 
J

Jose Perdigao

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top