在sql2005中重命名数据库 [英] rename database in sql2005

查看:95
本文介绍了在sql2005中重命名数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ALTER DATABASE hr_live修改名称= hr_test

错误消息:-无法独占锁定数据库以执行该操作.


我如何更改数据库名称

ALTER DATABASE hr_live MODIFY NAME = hr_test

error message :- The database could not be exclusively locked to perform the operation.


what i do for changing my database name

推荐答案

如果您收到奇怪的错误消息,请将其扔给Google!一个非常快速的搜索给了我这个:
If you get an odd error message, then throw it to Google! A very quick search gave me this: http://robbamforth.wordpress.com/2009/11/13/sql-get-exclusive-lock-fix-for-the-database-could-not-be-exclusively-locked-to-perform-the-operation-error/[^]


请参阅此命令
sp_renamedb``tt'',``LRMS''
您可以在此处更改数据库名称,但在此之前您应该对此具有必要的权限.
see this command
sp_renamedb ''tt'',''LRMS''
here u can change database name but before that u should have necessory permissions for that.


这篇关于在sql2005中重命名数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆