I am not able to figure out where these system tables are stored, your help will be much appreciated.
Which database stores sys.tables or sys.indexes in SQL Server?
1.8k Views Asked by Shobhit At
2
I am not able to figure out where these system tables are stored, your help will be much appreciated.
These are views.
The view definitions are held in the hidden resource database but they access system base tables held in each individual database.
You can use
sp_helptextto see the definition ofsys.indexes(and that it accessessys.sysidxstats,sys.syssingleobjrefs,sys.syspalvalues) but attempting this withsys.objectsjust shows aSELECTagainstsys.objects$.If you view the execution plan for a select against
sys.objectsyou can see the objects accessed however.But the system base tables cannot be queried directly except via the DAC so this information is only rarely useful to know.