Tuesday, February 14, 2012

Blank Database Name

Somehow a database got created that has no name...not even a space. If you
look in the diagrams, tables, views, and etc there is nothing there. How can
I get rid of this bad db? If I try to delete I get the following:
Error 21776: [SQL-DMO] The name '' was not found in the Databases
collection...
Thanks!"Mat Powell" <MatPowell@.discussions.microsoft.com> wrote in message
news:52E877A4-B05C-4DF5-8A80-CFD7368B147C@.microsoft.com...
> Somehow a database got created that has no name...not even a space. If
you
> look in the diagrams, tables, views, and etc there is nothing there. How
can
> I get rid of this bad db? If I try to delete I get the following:
> Error 21776: [SQL-DMO] The name '' was not found in the Databases
> collection...
>
> Thanks!
Run the following query and see if you can find the database information in
the system tables.
If you can find it there, then you can probably update the sysdatabases
table and give the DB_ID in question a name that you can work with.
SELECT * FROM master.dbo.sysdatabases
Rick Sawtell
MCT, MCSD, MCDBA|||Rick...thanks for helping out. I was able to find the entry in the table you
specified. I updated the "Name" column, but the db still does not have a
name in the Database view. I would just delete the record, but I figured I
would check with you first to see what the possible consequences might be.
"Rick Sawtell" wrote:
> "Mat Powell" <MatPowell@.discussions.microsoft.com> wrote in message
> news:52E877A4-B05C-4DF5-8A80-CFD7368B147C@.microsoft.com...
> > Somehow a database got created that has no name...not even a space. If
> you
> > look in the diagrams, tables, views, and etc there is nothing there. How
> can
> > I get rid of this bad db? If I try to delete I get the following:
> >
> > Error 21776: [SQL-DMO] The name '' was not found in the Databases
> > collection...
> >
> >
> > Thanks!
> Run the following query and see if you can find the database information in
> the system tables.
> If you can find it there, then you can probably update the sysdatabases
> table and give the DB_ID in question a name that you can work with.
> SELECT * FROM master.dbo.sysdatabases
>
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>|||Rick...nevermind, your suggestion did work. I just didn't get it enough
time to refresh. I was able to delete the db using the menus.
Thanks again!!
"Rick Sawtell" wrote:
> "Mat Powell" <MatPowell@.discussions.microsoft.com> wrote in message
> news:52E877A4-B05C-4DF5-8A80-CFD7368B147C@.microsoft.com...
> > Somehow a database got created that has no name...not even a space. If
> you
> > look in the diagrams, tables, views, and etc there is nothing there. How
> can
> > I get rid of this bad db? If I try to delete I get the following:
> >
> > Error 21776: [SQL-DMO] The name '' was not found in the Databases
> > collection...
> >
> >
> > Thanks!
> Run the following query and see if you can find the database information in
> the system tables.
> If you can find it there, then you can probably update the sysdatabases
> table and give the DB_ID in question a name that you can work with.
> SELECT * FROM master.dbo.sysdatabases
>
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>|||then try sp_rename '', 'New-Name', 'Database'
--
best Regards,
Chandra
http://chanduas.blogspot.com/
---
"Mat Powell" wrote:
> Rick...thanks for helping out. I was able to find the entry in the table you
> specified. I updated the "Name" column, but the db still does not have a
> name in the Database view. I would just delete the record, but I figured I
> would check with you first to see what the possible consequences might be.
> "Rick Sawtell" wrote:
> >
> > "Mat Powell" <MatPowell@.discussions.microsoft.com> wrote in message
> > news:52E877A4-B05C-4DF5-8A80-CFD7368B147C@.microsoft.com...
> > > Somehow a database got created that has no name...not even a space. If
> > you
> > > look in the diagrams, tables, views, and etc there is nothing there. How
> > can
> > > I get rid of this bad db? If I try to delete I get the following:
> > >
> > > Error 21776: [SQL-DMO] The name '' was not found in the Databases
> > > collection...
> > >
> > >
> > > Thanks!
> >
> > Run the following query and see if you can find the database information in
> > the system tables.
> >
> > If you can find it there, then you can probably update the sysdatabases
> > table and give the DB_ID in question a name that you can work with.
> >
> > SELECT * FROM master.dbo.sysdatabases
> >
> >
> > Rick Sawtell
> > MCT, MCSD, MCDBA
> >
> >
> >
> >

No comments:

Post a Comment