Friday, March 30, 2012

How to rename a database?

hi

every time I try to rename my database I face an error

I want to rename the database file phisically not just changing logigal name with

Alter Database <database name> modify name command

please step by step tell me what to do

whether with TSql or Managment Studio

thanks

Workaround.

1. Deattach database files.
2. Rename physical files.
3. Attaching database files again and specify names you want.

you can do all this from SQL Management Studio 2005.

- Jignesh Desai

|||

Best way to do bit Your problem:

Use command:

sp_renamedb <old_name>, <new_name>

That's all. ;)

No comments:

Post a Comment