Sunday, March 25, 2012

Can not delete database. Gives Error 21776. Suggestions please?

Hi,
I just installed MS SQL 2000 SE then SP3 on Windows 2000 Server. I
then backed-up a database from another MS SQL 2000 server and restored
it. After the restore, I noticed not all my tables were there, so I
decided to just do an import instead of restore. So I'm now trying to
delete the restored table, but I get the following error:
Microsoft SQL-DMO:
Error 21776:[SQL-DMO]The Name 'Accounting Database' was not found in
the Database collection. If the name is a qualified name, use [] to
seperate various parts of the name, and try again.
This is causing all sorts of problems now. Is there a script or
something I can run that will remove this database 100%? I want to
start clean, but use this same DB name. If I have to do this
manually, what tables in what database do I need to modify? And why
does Microsoft make this so difficult?
Thanks,
Alex.Hi Alex,
From Query Analyzer , Login as SA and execute the below command ,
sp_helpdb
From the result set , cut and past the Accounting database name along with
the below command,
drop database <paste the dbname>
Thanks
Hari
MCDBA
"Alex" <alex@.totallynerd.com> wrote in message
news:2ba4b4eb.0310270740.3be18d34@.posting.google.com...
> Hi,
> I just installed MS SQL 2000 SE then SP3 on Windows 2000 Server. I
> then backed-up a database from another MS SQL 2000 server and restored
> it. After the restore, I noticed not all my tables were there, so I
> decided to just do an import instead of restore. So I'm now trying to
> delete the restored table, but I get the following error:
> Microsoft SQL-DMO:
> Error 21776:[SQL-DMO]The Name 'Accounting Database' was not found in
> the Database collection. If the name is a qualified name, use [] to
> seperate various parts of the name, and try again.
> This is causing all sorts of problems now. Is there a script or
> something I can run that will remove this database 100%? I want to
> start clean, but use this same DB name. If I have to do this
> manually, what tables in what database do I need to modify? And why
> does Microsoft make this so difficult?
> Thanks,
> Alex.|||drop database [Accounting Database]
You need to wrap the database name in brackets since it has a space in the
name. Or you can right click on the database in QA and drop it, provided
that there are no connections.
-Morgan
"Alex" <alex@.totallynerd.com> wrote in message
news:2ba4b4eb.0310270740.3be18d34@.posting.google.com...
> Hi,
> I just installed MS SQL 2000 SE then SP3 on Windows 2000 Server. I
> then backed-up a database from another MS SQL 2000 server and restored
> it. After the restore, I noticed not all my tables were there, so I
> decided to just do an import instead of restore. So I'm now trying to
> delete the restored table, but I get the following error:
> Microsoft SQL-DMO:
> Error 21776:[SQL-DMO]The Name 'Accounting Database' was not found in
> the Database collection. If the name is a qualified name, use [] to
> seperate various parts of the name, and try again.
> This is causing all sorts of problems now. Is there a script or
> something I can run that will remove this database 100%? I want to
> start clean, but use this same DB name. If I have to do this
> manually, what tables in what database do I need to modify? And why
> does Microsoft make this so difficult?
> Thanks,
> Alex.|||Hi ,
Just issue this command ,
drop database [Accounting Database]
Thanks
Hari
MCDBA
"Morgan" <mfears@.spamcop.net> wrote in message
news:#5IV1sLnDHA.1764@.tk2msftngp13.phx.gbl...
> drop database [Accounting Database]
> You need to wrap the database name in brackets since it has a space in the
> name. Or you can right click on the database in QA and drop it, provided
> that there are no connections.
> -Morgan
> "Alex" <alex@.totallynerd.com> wrote in message
> news:2ba4b4eb.0310270740.3be18d34@.posting.google.com...
> > Hi,
> >
> > I just installed MS SQL 2000 SE then SP3 on Windows 2000 Server. I
> > then backed-up a database from another MS SQL 2000 server and restored
> > it. After the restore, I noticed not all my tables were there, so I
> > decided to just do an import instead of restore. So I'm now trying to
> > delete the restored table, but I get the following error:
> >
> > Microsoft SQL-DMO:
> > Error 21776:[SQL-DMO]The Name 'Accounting Database' was not found in
> > the Database collection. If the name is a qualified name, use [] to
> > seperate various parts of the name, and try again.
> >
> > This is causing all sorts of problems now. Is there a script or
> > something I can run that will remove this database 100%? I want to
> > start clean, but use this same DB name. If I have to do this
> > manually, what tables in what database do I need to modify? And why
> > does Microsoft make this so difficult?
> >
> > Thanks,
> >
> > Alex.
>

No comments:

Post a Comment