Dot Net Questions: System Tables and Sql Server 2000 Query

By: Adam Sturo

System tables are the groups of table that helps sql server to track the information regarding users, databases, tables, replications tasks and so many task and also helps in sql query just like insert query, delete sql query, update sql query,. All information regarding database that is knows by sql server are in system tables. These system tables are break down into server groups.

1)The master databases contain information regarding databases, logins, server and some system wide information.

2)Each data base contains some table which holds information on objects, indexes, columns and some database information.

3)The MSDB database contains a set of tables that used by SQL SERVER Agent which store information on alerts, jobs and others items that manages by agents.

4)The MSDB contains information regarding backup and restore information.

5)The master database contains a set of tables that hold name of publishing and subscribing servers.

6)The distribution database contains information on replication schedules and transactions.

7)The databases that participate in replication objects with in those databases.

There are almost 100 of system tables and some examples of queries are here:

on systems tables:

1)To get name of primary files from system table database
Selectname, filename from sysdatabases

2)How t get name of all files used by database with the help of Sql Server 2000 queries
Select name, filename from sysfiles.

Some examples of system tables
Sysaltfiles
Syscolumns
Master database
To hold databases
In each database
Column information

If you want to know the entire database name then the query is:
Select * from sysobjects where xype = 'U' order by name

Top Searches on
Technology
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 

» More on Technology
 



Share this article :
Click to see more related articles