Database name change SQL Fails Sql Server 2008 -


i have database 'my database' rename there no white space. tried rename using

use master exec sp_renamedb 'i 3 sci study','i3scistudy' 

and greeted error

msg 5030, level 16, state 2, line 1 database not exclusively locked perform operation. 

this server local machine , have no other query windows open window in ran rename query. there sort of close connection command need run before can rename database?

try command, caution advised:

use master; alter database [dbname] set single_user rollback immediate; go  alter database [dbname] set multi_user; go 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -