are tables used by SQL Server to store information about databases, users, and security.
System catalogs are sometimes said to store meta-data
because they store data that describes the data contained within
stored procedures, and
other database objects.
Each system catalog is a SQL Server table, which you can access by issuing a query against that table.
A Database Administrator (DBA) might use system catalogs when he/she is trying to retrieve information about the number of users, locks, or other system-related information.
There are over 200 system catalogs
located in various SQL Server databases, including user-created databases.
System catalogs are also referred to as system tables.
The Sysobjects table stores all objects in a database. If you wanted to identify the user-defined tables in your Timesheets
database, you could issue the statement shown in the following Slideshow:
You will receive an error if you query a system table that does not exist in the current database.
Therefore, always change to the desired database before issuing your query against a system table.
The Sysusers table stores information about users or roles of a database. The following statement will identify which users have access to the Timesheets database.
Before moving on to the next module, click the Quiz link below to check your knowledge of batch queries and system catalogs with
a short, multiple-choice quiz.
System Catalogs Quiz