How to rename database in multi-user mode

后端 未结 3 1632
后悔当初
后悔当初 2021-02-01 08:30

I am working on SQL SERVER 2008 & 2008 R2. How can I rename a database in multi-user mode? I am using sp_rename but it returns this error:

Msg 15225,

3条回答
  •  渐次进展
    2021-02-01 09:09

    You can open sql server configuration manager and stop and start the service, this works for me with sql server 2008 and 2012 just fine.

    Then rename the database right in the sql server management studio.

    "Works for me"

    Not really a "caveat" but say you want to restore the exact same database, you go into options and change the name of the mdf and ldf

提交回复
热议问题