Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Database renaming

Author  Topic 

vicki
Posting Yak Master

117 Posts

Posted - 2002-02-26 : 13:59:22
Hi,

I have all the permit in the datatabase role and I try to rename the datbase on my local machine by exec this

sp_renamedb 'phonebook', 'Mis'

but I got this error"
Server: Msg 5030, Level 16, State 2, Line 1
The database could not be exclusively locked to perform the operation.

What is that mean?
Thanks



Edited by - vicki on 02/26/2002 14:02:03

izaltsman
A custom title

1139 Posts

Posted - 2002-02-26 : 14:15:29
It means you have other processes connected to the database. Kill all processes, set db in single-user mode, rename db, set db in multi-user mode.

Go to Top of Page

vicki
Posting Yak Master

117 Posts

Posted - 2002-02-26 : 14:29:15
It's worked, thanks alot.

How do I set the db to SINGLE_USER/ SET MULTI_USER via wizard? inseated of excute 2 command below?

ALTER DATABASE database SET SINGLE_USER
ALTER DATABASE database SET MULTI_USER

Thanks

Go to Top of Page

chadmat
The Chadinator

1974 Posts

Posted - 2002-02-26 : 14:44:53
right click on the database in EM. select properties->Options tab.

-Chad

Go to Top of Page

vicki
Posting Yak Master

117 Posts

Posted - 2002-02-26 : 14:47:59
Thank you very much

Go to Top of Page
   

- Advertisement -