Friday, February 17, 2012

Error 21776

I am using SQL 2000 and must have corrupted a database file because I get the following error message:

Error 21776: [SQL-DMO] The name 'MyDatabaseName' was not found in the Databases collection. If the name is a qualified name, use [] to separate varios partes of the name, and try again.

I am not able to detach, open, or remove this database and continue to get this message everytime I try an do anything. I know the MDF is there because I can look at the drive and see it.

Some of the threads recommend using various sp_?, Would I put these in query analyzer? If so, what database should I select to write my T-SQL? Are these global sp_? or should they be specific to the code?

If anyone has the answers, please let me know. Thanks

Perhaps the database has been 'detached' from the server.

Refer to Books Online about using sp_attach_db, or sp_attach_single_file_db

|||

You could be getting the error from already having removed the database - right-click the Databases folder in
Enterprise Manager and select Refresh.

-Sue

No comments:

Post a Comment