0% found this document useful (0 votes)
210 views

SQL Server 2000 System Tables and Their Equivalent DMV in SQL Server 2005 MSSQLFUN

Dynamic Management Views (DMV) in SQL Server 2005 provide information about the server configuration and performance that was previously available through system tables in SQL Server 2000. The document lists the SQL Server 2000 system tables and their equivalent DMV in 2005, including sysdatabases mapping to sys.databases, sysprocesses mapping to sys.dm_exec_connections, and sysmessages mapping to sys.messages. DMV simplify management tasks by providing live views of the server without the need to query multiple system tables.

Uploaded by

Henrique Pereira
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
210 views

SQL Server 2000 System Tables and Their Equivalent DMV in SQL Server 2005 MSSQLFUN

Dynamic Management Views (DMV) in SQL Server 2005 provide information about the server configuration and performance that was previously available through system tables in SQL Server 2000. The document lists the SQL Server 2000 system tables and their equivalent DMV in 2005, including sysdatabases mapping to sys.databases, sysprocesses mapping to sys.dm_exec_connections, and sysmessages mapping to sys.messages. DMV simplify management tasks by providing live views of the server without the need to query multiple system tables.

Uploaded by

Henrique Pereira
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

» SQL Server 2000 system tables and their equivalent DMV in SQL S... https://mssqlfun.com/2012/08/02/sql-server-2000-system-tables-and-th...

Home Repository Disclaimer About

MSSQLFUN search

EXPLORE & EXPERIENCE THE MSSQL

HOME » SQL SERVER » SQL SERVER 2000 SYSTEM TABLES AND THEIR EQUIVALENT DMV IN SQL SERVER 2005

SQL Server 2000 system tables and their equivalent


DMV in SQL Server 2005
Those who have been working with SQL Server administration for a while now undoubtedly have at times referred to the old SQL Server system tables in
order to automate some processes, or document their tables by for example combining the sysobjects and syscolumns tables. As per SQL Server 2005
and onwards, Microsoft added a number of Dynamic Management Views (DMV) that take simplify all kinds of management tasks.

List of SQL Server 2000 system tables and their 2005 equivalent management views, as well as a brief description what kind of information to find in the
views.

Dynamic Management Views existing in the Master database

SQL Server 2000 SQL Server2005 Description

Contains a row per file of a database as stored in the master


sysaltfiles sys.master_files
database.

Returns a row for each query plan that is cached by SQL Server
syscacheobjects sys.dm_exec_cached_plans
for faster query execution.

Returns one row per plan attribute for the plan specified by the
sys.dm_exec_plan_attributes
plan handle.

Returns the text of the SQL batch that is identified by the specified
sys.dm_exec_sql_text
sql_handle.

Returns a row for each Transact-SQL execution plan, common


sys.dm_exec_cached_plan_dependent_objects language runtime (CLR) execution plan, and cursor associated
with a plan.

Contains one row for each character set and sort order defined
syscharsets sys.syscharsets
for use by the SQL Server Database Engine.

Contains a row per server-wide configuration option value in the


sysconfigures sys.configurations
system.

Contains a row per server-wide configuration option value in the


syscurconfigs sys.configurations
system.

Contains one row per database in the instance of Microsoft SQL


sysdatabases sys.databases
Server.

Contains a row for each backup-device registered by using


sysdevices sys.backup_devices
sp_addumpdevice or created in SQL Server Management Studio.

Contains one row for each language present in the instance of


syslanguages sys.syslanguages
SQL Server.

Returns information about currently active lock manager


syslockinfo sys.dm_tran_locks
resources

Returns information about currently active lock manager


syslocks[ sys.dm_tran_locks
resources

syslogins sys.server_principals Contains a row for every server-level principal.

sys.sql_logins Returns one row for every SQL login.

Contains a row for each message_id or language_id of the error


sysmessages sys.messages messages in the system, for both system-defined and
user-defined messages.

Returns a row per linked-server-login mapping, for use by RPC


sysoledbusers sys.linked_logins and distributed queries from local server to the corresponding
linked server.

Returns the list of tape devices and the status of mount requests
sysopentapes sys.dm_io_backup_tapes
for backups.

sysperfinfo sys.dm_os_performance_counters Returns a row per performance counter maintained by the server.

1 de 3 15/02/2017 10:38
» SQL Server 2000 system tables and their equivalent DMV in SQL S... https://mssqlfun.com/2012/08/02/sql-server-2000-system-tables-and-th...

Returns information about the connections established to this


sysprocesses sys.dm_exec_connections
instance of SQL Server and the details of each connection.

sys.dm_exec_sessions Returns one row per authenticated session on SQL Server.

Returns information about each request that is executing within


sys.dm_exec_requests
SQL Server.

Returns a row per remote-login mapping. This catalog view is


sysremotelogins sys.remote_logins used to map incoming local logins that claim to be coming from a
corresponding server to an actual local login.

Contains a row per linked or remote server registered, and a row


sysservers sys.servers
for the local server that has server_id = 0.

Dynamic Management Views existing in every database.

SQL Server 2000 SQL Server 2005 Description

fn_virtualfilestats sys.dm_io_virtual_file_stats Returns I/O statistics for data and log files.

Returns a row for each column of an object that has columns, such as
syscolumns sys.columns
views or tables.

Returnsa row for each object that is an SQL language-defined module.


syscomments sys.sql_modules Objectsof type ‘P’, ‘RF’, ‘V’, ‘TR’, ‘FN’, ‘IF’, ‘TF’, and ‘R’ have an associated
SQL module.

Contains a row for each object that is a CHECK constraint, with


sysconstraints sys.check_constraints
sys.objects.type = ‘C’.

Contains a row for each object that is a default definition (created as part of a
sys.default_constraints CREATE TABLE or ALTER TABLE statement instead of a CREATE DEFAULT
statement), with sys.objects.type = ‘D’.

Contains a row for each object that is a primary key or unique constraint.
sys.key_constraints
Includes sys.objects.type ‘PK’ and ‘UQ’.

Contains a row per object that is a FOREIGN KEY constraint, with


sys.foreign_keys
sys.object.type = ‘F’.

Contains one row for each by-name dependency on a user-defined entity in


the current database. A dependency between two entities is created when
sysdepends sys.sql_expression_dependencies
one entity, called the referenced entity, appears by name in a persisted SQL
expression of another entity, called the referencing entity.

sysfilegroups sys.filegroups Contains a row for each data space that is a filegroup.

Contains a row per file of a database as stored in the database itself. This
sysfiles sys.database_files
is a per-database view.

Contains a row for each column, or set of columns, that comprise a foreign
sysforeignkeys sys.foreign_key_columns
key.

Contains a row per index or heap of a tabular object, such as a table, view,
sysindexes sys.indexes
or table-valued function.

Contains a row for each partition of all the tables and most types of indexes in
the database. Special index types like Fulltext, Spatial, and XML are not
sys.partitions
included in this view. All tables and indexes in SQL Server contain at least
one partition, whether or not they are explicitly partitioned.

sys.allocation_units Contains a row for each allocation unit in the database.

Returns page and row-count information for every partition in the current
sys.dm_db_partition_stats
database.

Contains one row per column that is part of a sys.indexes index or


sysindexkeys sys.index_columns
unordered table (heap).

sysmembers sys.database_role_members Returns one row for each member of each database role.

Contains a row for each user-defined, schema-scoped object that is created


sysobjects sys.objects
within a database.

Returns a row for every permission or column-exception permission in the


database. For columns, there is a row for every permission that is different
syspermissions sys.database_permissions from the corresponding object-level permission. If the column permission is
the same as the corresponding object permission, there will be no row for it
and the actual permission used will be that of the object.

sys.server_permissions Returns one row for each server-level permission.

Returns a row for every permission or column-exception permission in the


database. For columns, there is a row for every permission that is different
sysprotects sys.database_permissions from the corresponding object-level permission. If the column permission is
the same as the corresponding object permission, there will be no row for it
and the actual permission used will be that of the object.

2 de 3 15/02/2017 10:38
» SQL Server 2000 system tables and their equivalent DMV in SQL S... https://mssqlfun.com/2012/08/02/sql-server-2000-system-tables-and-th...

sys.server_permissions Returns one row for each server-level permission.

Contains a row per object that is a FOREIGN KEY constraint, with


sysreferences sys.foreign_keys
sys.object.type = ‘F’.

systypes sys.types Contains a row for each system and user-defined type.

sysusers sys.database_principals Returns a row for each principal in a database.

sysfulltextcatalogs sys.fulltext_catalogs Contains a row for each full-text catalog.

Share this:

Like this:

Be the first to like this.

BY ROHITMSSQLFUN IN SQL SERVER ON AUGUST 2, 2012.

← SQL SERVER 2008 R2 SP2 IS NOW AVAILABLE ! SQL SERVER 2012 – T-SQL CODE SNIPPETS →

1 Comment

Pinujte, jer sto zanima vas zanima i druge! REPLY


AUGUST 8, 2012 AT 3:12 AM

Leave a Reply

Proudly powered by WordPress / Theme: Academica by WPZOOM.

3 de 3 15/02/2017 10:38

You might also like