Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
unclesamis@cox.net
Starting Member
18 Posts |
Posted - 2010-07-26 : 12:47:13
|
Table exists in sysobjects yet object doesn't exist.I query the table name in sysobjects and it exists as a table. If I query the table to see the values in it, it doesn't exist.I recreated the table again with the same name. In sysobjects it shows two tables now with the same name. I am able to query the contents of the table. So then I dropped the table. And I can't find the table object anymore, but there shows that one that exists in the sysobjects.Didn't think it was possible to have two names that same of the same object in sysobjects.I need to get the illusionary table out of sysobjects. |
|
Kristen
Test
22859 Posts |
Posted - 2010-07-26 : 12:50:17
|
Table owned by a different schema? |
 |
|
unclesamis@cox.net
Starting Member
18 Posts |
Posted - 2010-07-26 : 12:57:47
|
Good thinking about the schema. But no it is not. |
 |
|
Kristen
Test
22859 Posts |
Posted - 2010-07-26 : 13:00:57
|
View? and again for a specific schema The Schema name's ID is in sysobjects tooDo you have SA permission? If not you may not be able to query the schema that the Table/View is in.Are Synonyms in sysobjects in that way too?Or maybe the TYPE column in sysobjects is "U" in which case it aint a view/etc. OK, what IS the value of TYPE column in sysobjects |
 |
|
unclesamis@cox.net
Starting Member
18 Posts |
Posted - 2010-07-26 : 13:14:06
|
It is a user table, type 'U'. But I just now noticed that the uid is different and is the only one of it kind in the table. I used the import wizard to create the table and don't know how it got that particular login. I can't seem to view or drop the table even logged in as SA. |
 |
|
unclesamis@cox.net
Starting Member
18 Posts |
Posted - 2010-07-26 : 13:43:51
|
Thanks Kristen for helping me identify that it was a different schema.I went back to the import wizard and was able to identify the schema as a name that doesn't appear to exist.I used that to drop the table.Thanks so much Kristen, you are awesome. |
 |
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2010-07-26 : 13:48:57
|
glad you got it sorted. for future reference:select name [table], schema_name(schema_id) [schema_name]from sys.tableswhere name = 'table name here' |
 |
|
unclesamis@cox.net
Starting Member
18 Posts |
Posted - 2010-07-26 : 14:10:25
|
Thanks Russell |
 |
|
|
|
|