Friday, February 17, 2012

Error 21776:[SQL-DMO] The name 'databasename' was not found

I'm trying to delete a database but I get the error message
Error 21776:[SQL-DMO] The name 'databasename' was not found in the Databases
collection. How can I resolve this?
Any help appreciated.
Is it possible that the owner of the DB no longer exists? If so, then rename
it then drop it.
Thomas
"Joe" wrote:

> I'm trying to delete a database but I get the error message
> Error 21776:[SQL-DMO] The name 'databasename' was not found in the Databases
> collection. How can I resolve this?
> Any help appreciated.
|||I'm not sure why you are getting the error, unless the database collection
in the GUI needs to be refreshed. You might try deleting the database using
Query Analyzer:
DROP DATABASE MyDatabase
If the database name has some strangeness to it, like blank characters,
enclose the name in brackets:
DROP DATABASE [MyDatabase ]
Hope this helps.
Dan Guzman
SQL Server MVP
"Joe" <Joe@.discussions.microsoft.com> wrote in message
news:AF2A87F9-70C3-4E35-BE3E-7F5953AF2D49@.microsoft.com...
> I'm trying to delete a database but I get the error message
> Error 21776:[SQL-DMO] The name 'databasename' was not found in the
> Databases
> collection. How can I resolve this?
> Any help appreciated.

No comments:

Post a Comment