renaming database

From: dave (anonymous_at_discussions.microsoft.com)
Date: 07/09/04


Date: Thu, 8 Jul 2004 17:35:39 -0700

I tried to renaming database using query analyser of sql
server 2000 but I got this error msg.

Server: Msg 5030, Level 16, State 2, Line 1
The database could not be exclusively locked to perform
the operation.

My sysntax was
sp_renamedb 'old_dbname', 'new_dbname'

How to handle this? what could be the solution?
Thanx
Dave