I looked at the ObjectProperty list today and stumbled upon the TableIsFake property. The name amused me, so I looked that it checks:
The table is not real. It materializes at the request of SQL Server.
What exactly does this mean? For example, when I run the following query:
SELECT [name], xtype FROM dbo.sysobjects WHERE OBJECTPROPERTY(object_id([name]), N'TableIsFake') = 1 ORDER BY [name]
I get the following results:
name xtype -------------- ----- sysfiles S sysforeignkeys S sysindexkeys S sysmembers S sysprotects S
But if I query the database for system tables:
SELECT [name], xtype FROM dbo.sysobjects WHERE xtype = 'S' ORDER BY [name]
I get the following system tables:
name xtype ------------------- ----- syscolumns S syscomments S sysdepends S sysfilegroups S sysfiles S sysfiles1 S sysforeignkeys S sysfulltextcatalogs S sysfulltextnotify S sysindexes S sysindexkeys S sysmembers S sysobjects S syspermissions S sysproperties S sysprotects S sysreferences S systypes S sysusers S
What makes the sysfiles , sysforeignkeys , sysindexkeys , sysmembers , sysprotects system tables "fake"? Or else, what does it mean that they are "materialized internally at the request of SQL Server"? Does this mean that they are created only when the process needs it, or do I call something like SELECT * FROM sysfiles ?