neo (se*******@hotmail.com) writes:
I'm using "select [name] from sysobjects where OBJECTPROPERTY(id,
N'IsUserTable') = 1" to get all user-defined tables(about 17000
tables)
and found out there are tables missing in sysobjects.
How can I refresh/rebuild sysobjects table?
is there a better way to get a list of user-defined tables?
So how to you know they are missing? I'd say that if a table is not in
sysobjects it does not exist...
You can use DBCC CHECKCATALOG to check the system tables for inconsistency.
Mystery Man's suggestion that you might be looking for views seems worth
investigating. I'll add table-valued functions to the list.
--
Erland Sommarskog, SQL Server MVP,
so****@algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp