Hi
After renaming a sql db in the ssms, the data files are not affected. What is the best approach do rename also the data files. In our case, it wouldnt be a problem if the database is not online during the rename.
Thanks in advance
Thomas
Thanks Alain, this works. After detach/attach I also changed manually in ssms the name of the filegroups. After that db name, files and filegroups are consistent concerning the name again. Voilà
Regards
Thomas
Easier though is to just go to SSMS, right click on the Database and select COPY database. And use the Detach method. There is an option to move or copy. Basically it does the same as Alain is suggesting, except its all automatic and you don't have to think about it.
Easier though is to just go to SSMS, right click on the Database and select COPY database. And use the Detach method. There is an option to move or copy. Basically it does the same as Alain is suggesting, except its all automatic and you don't have to think about it.
SSMS keeps surprising me with its hidden treasures!
[Topic moved from 'SQL General' forum to 'SQL Tips & Tricks' forum]
Regards,Alain Krikilion No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Easier though is to just go to SSMS, right click on the Database and select COPY database. And use the Detach method. There is an option to move or copy. Basically it does the same as Alain is suggesting, except its all automatic and you don't have to think about it.
SSMS keeps surprising me with its hidden treasures!
[Topic moved from 'SQL General' forum to 'SQL Tips & Tricks' forum]
Answers
-detach DB
-rename files
-attach DB using new name (you will need to give the new names because SQL won't find them anymore).
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Regards
Thomas
[Topic moved from 'SQL General' forum to 'SQL Tips & Tricks' forum]
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
I found it out yesterday (Thanks Frank). \:D/