May 9, 2008 at 1:59 pm
Strange scenario: sysobjects has a record of a user table, however that table does not exist.
select * from SYSOBJECTS where name = 'table_name'
--(1 row(s) affected)
select * from dbo.table_name
--Server: Msg 208, Level 16, State 3, Line 1
--Invalid object name 'dbo.table_name'.
How did this happen?
SQL Server 2000 Enterprise Edition version 8.00.2039 (SP4)
Windows Server 2003 Enterprise Edition
May 9, 2008 at 2:13 pm
Owner is probably not dbo.
What is the owner/schema of the table?
__________________________________________________________________________________
SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
Persisting SQL Server Index-Usage Statistics with MERGE[/url]
Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]
May 9, 2008 at 2:45 pm
Or the object is not a table !
create procedure dbo.MissingTable
as
select 'hello world
go
select * from SYSOBJECTS where name = 'MissingTable'
go
select * from dbo.MissingTable
go
drop procedure dbo.MissingTable
SQL = Scarcely Qualifies as a Language
May 9, 2008 at 5:19 pm
HENRY DAVIS (5/9/2008)
Strange scenario: sysobjects has a record of a user table, however that table does not exist.select * from SYSOBJECTS where name = 'table_name'
--(1 row(s) affected)
select * from dbo.table_name
--Server: Msg 208, Level 16, State 3, Line 1
--Invalid object name 'dbo.table_name'.
How did this happen?
SQL Server 2000 Enterprise Edition version 8.00.2039 (SP4)
Windows Server 2003 Enterprise Edition
What does the "XType" column contain when you run the following?
select * from SYSOBJECTS where name = 'table_name'
--Jeff Moden
Change is inevitable... Change for the better is not.
May 9, 2008 at 5:41 pm
Definately not a missing table. Remember the * bring back all objects not just tables. My money is either a Stored Proc or ufn
Marvin Dillard
Senior Consultant
Claraview Inc
May 9, 2008 at 9:10 pm
both XType = 'U' and Type = 'U'
It is a table, not stored proc, not function, not view, not anything else.
I belong to sysadmin group.
Another thing, I found out the issue when updatestatistic failed.
May 10, 2008 at 5:57 am
I had the exact same issue yesterday. 🙂
Run the following. I bet your schema is not "dbo".
SELECT TABLE_SCHEMA
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = 'yourTableName'
AND TABLE_TYPE = 'BASE TABLE'
__________________________________________________________________________________
SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
Persisting SQL Server Index-Usage Statistics with MERGE[/url]
Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply