SQL Server 2012 System Views Map

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

System Views

Objects, Types and Indexes


sys.dm_db_missing_index_details index_handle
index_handle index_handle P C , F S , F T , ) s ys . obje c ts . type in ( TA, AF , sys.indexes.type_desc=XML sys.column.is_identity=1

Trace and Eventing


sys.objects.type=P

sys.identity_columns object_id

object_id

sys.xml_indexes using_xml_index_id index_id


index_id

using_xml_index_id

object_id

sys.triggers object_id parent_id


parent_id

object_id object_id

sys.events object_id

sys.trigger_events object_id

Object Type
Dynamic Management View

sys.procedures sys.foreign_keys key_index_id object_id referenced_object_id

primary sys.indexes.type_desc=XML AND sys.indexes.secondary_type is NULL secondary sys.xml_indexes.type_desc=XML AND sys.indexes.secondary_type is not NULL

object_id

sys.plan_guides scope_object_id
index_handle scope_object_id

sys.computed_columns

sys.columns.is_computed=1

sys.sql_modules object_id execute_as_principal_id


object_id

sys.fn_trace_geteventinfo() sys.fn_trace_getfilterinfo() sys.fn_trace_getinfo()

sys.server_event_notifications sys.trace_categories sys.trace_columns sys.trace_event_bindings sys.trace_events sys.trace_subclass_values sys.traces Catalog View Dynamic Management Function ()

sys.dm_db_missing_index_group_stats group_handle
group_handle

sys.dm_db_missing_index_groups index_group_handle index_handle


index_group_handle

referenced_object_id, key_index_id

referenced_object_id

sys.plan_guides.scpe_type=1 and sys.objects.type in (P, RF, V, TR, FN, IF, TF, R)

object_id

object_id

sys.fn_trace_gettable()

sys.views

sys.synonyms

sys.parameters object_id system_type_id user_type_id xml_collection_id


object_id

system_type_id, user_type_id

xml_collection_id

System Administration sys.event_notifications

sys.dm_db_missing_index_columns() @handle sys.column_type_usages sys.column_xml_schema_collection_usages sys.extended_properties sys.internal_tables sys.parameter_type_usages sys.parameter_xml_schema_collection_usages sys.type_assembly_usages


parent_column_id sys.objects.type=D column_id column_id @handle

sys.objects.type=V sys.objects.type=D

sys.types sys.all_views
system_type_id

system_type_id, user_type_id default_object_id rule_object_id system_type_id user_type_id sys.objects.type=R

sys.extended_procedures
assembly_id

rule_object_id default_object_id system_type_id user_type_id schema_id


schema_id

s ys . obje c ts . type in ( U , V ) object_id object_id object_id object_id object_id object_id object_id

sys.stats object_id object_id stats_id


object_id, stats_id

object_id

sys.check_constraints parent_column_id
parent_column_id sys.objects.type=C

sys.server_events
object_id

sys.server_triggers

sys.assembly_types assembly_id

sys.all_objects

sys.columns column_id default_object_id object_id object_number rule_object_id system_type_id user_type_id xml_collection_id


column_id, object_id object_id, column_id object_id, column_id object_id, column_id object_id, column_id

column_id column_id object_id object_id sys.objects.type=R object_id rule_object_id object_id sys.objects.type=Dobject_id xml_collection_id object_id

sys.objects object_id parent_object_id principal_id schema_id

object_id object_id parent_object_id object_id object_id schema_id object_id object_id object_id sys.objects.type in (C, D, F, PK, R, TR, UQ)

s ys . obje c ts . type in ( U , V ) AND sys.triggers.parent_class=1

sys.server_trigger_events

Scope
Server scope objects have a shaded background column list
xml_collection_id

default_object_id

sys.default_constraints parent_column_id

system_type_id

user_type_id

object_id

ob

object_id

sys.all_columns sys.all_parameters sys.all_sql_modules sys.server_assembly_modules sys.server_sql_modules sys.system_columns sys.system_objects sys.system_parameters sys.system_sql_modules sys.system_views
sys.crypt_properties.class=1 s ys . obje c ts . type in ( U Q, P K ) AND sys.key_constraints.parent_object_id is not null

object_id

xml_collection_id object_id, stats_id

sys.xml_schema_collections
xml_collection_id schema_id

Database scope objects have a white background column list

ct je _id

object_id s ys . obje c ts . type in ( U , V , T F ) column_id, object_id

sys.sql_dependencies referenced_minor_id referenced_major_id object_id column_id


object_id, index_id column_id

sys.stats_columns stats_id object_id column_id sys.index_columns object_id column_id index_id

xml_collection_id

xml_collection_id schema_id

sys.key_constraints unique_index_id
unique_index_id sys.indexes.is_unique=1 index_id object_id index_id, object_id

sys.indexes data_space_id index_id object_id


object_id, index_id index_id

object_id object_id, index_id data_space_id object_id, index_id

referenced_minor_id, referenced_major_id

column_id

schema_id schema_id

schema_id

Relationship Type
Referential Integrity
0..many 0..1

sys.xml_schema_namespaces xml_namespace_id xml_collection_id


xml_collection_id

sys.indexes.type=6

sys.schemas schema_id principal_id

sys.objects.type in (U) AND sys.indexes.type_desc <> XML

object_id, index_id

sys.foreign_key_columns
constraint_object_id, constraint_column_id referenced_object_id, referenced_column_id parent_object_id, parent_column_id

principal_id

Linked Servers
sys.linked_logins server_id
server_id server_id

sys.dm_db_index_operational_stats() sys.tables filestream_data_space_id lob_data_space_id


lob_data_space_id

sys.dm_db_index_physical_stats() index_id object_id partition_number


object_id, index_id, partition_number

sys.dm_db_index_usage_stats object_id database_id index_id


s ys . obje c ts . type in ( U , V )

index_id object_id partition_number


object_id, index_id, partition_number object_id

constraint_column_id constraint_object_id parent_column_id parent_object_id referenced_column_id referenced_object_id

sys.servers server_id

server_id

server_id

sys.remote_logins server__id

sys.objects.type=U

Dependency
appdomain_address appdomain_address

sys.spatial_indexes object_id index_id


object_id, index_id

data_space_id assembly_id assembly_id

session_id
data_space_id

plan_handle

appdomain_address

object_id, index_id

assembly_id
assembly_id assembly_id assembly_id assembly_id referenced assembly

appdomain_address sos_task_address
sos_task_address

segment_id

segment_id segment_id object_id, index_id partition_number hobt_id hobt_id

object_id

referenced assembly

assembly_id

object_id, index_id

sys.assemblies

sys.dm_cir_tasks

partition_number

Column Store

sys.column_store_segments hobt_id segment_id


hobt_id

data_space_id data_space_id

session_id, request_id connection_id

Common Language Runtime

sys.dm_cir_loaded_assemblies appdomain_address assembly_id


assembly_id

sys.dm_cir_appdomains appdomain_address
appdomain_address

Spatial
sys.spatial_reference_systems

sys.destination_data_spaces data_space_id partition_scheme_id


partition_scheme_id

sys.filegroups
data_space_id data_space_id

data_space_id
data_space_id

sys.dm_tran_locks.request_type=OBJECT and sys.dm_tran_locks.database_id=db_id() session_id, request_id group_id

sys.dm_exec_requests connection_id group_id plan_handle request_id session_id sql_handle


session_id

plan_handle @handle

sys.dm_exec_plan_attributes() @handle
@handle

plan_handle @handle

sys.dm_exec_cached_plans plan_handle pool_id


plan_handle plan_handle pool_id

1..many

Defines a constraint between objects

sys.spatial_index_tessellations object_id index_id


data_space_id

sys.dm_db_session_space_usage

plan_handle

sys.data_spaces data_space_id

session_id

sql_handle

plan_handle

Inheritance
Base Object
plan_handle

Derived Object

sys.master_files file_id database_id data_space_id


data_space_id

All inheritance relationships are 1 to 0..1 cardinality


plan_handle

sys.column_store_dictionaries
segment_id

hobt_id segment_id

sys.partitions hobt_id index_id object_id partition_id partition_number


hobt_id

database_id

assembly_id

referenced_assembly_id, assembly_id

object_id

sys.assembly_references assembly_id referenced_assembly_id sys.dm_clr_properties sys.assembly_files sys.module_assembly_usages


assembly_id system_type_id file_id

sys.dm_db_partition_stats sys.assembly_modules
assembly_id object_id

hobt_id object_id, index_id partition_number object_id, index_id partition_number

hobt_id

sys.allocation_unit.type in (1, 3) container_id container_id sys.allocation_unit.type=2

sys.dm_db_file_space_usage file_id database_id

assembly_id object_id

index_id object_id partition_number


function_id

Databases and Storage


data_space_id session_id, request_id

sys.dm_exec_query_stats
object_id @handle @handle

sql_handle plan_handle
sql_handle object_id @handle plan_handle @handle

sys.dm_exec_sql_text() @handle objectid


@handle @handle sql_handle

Function Call
Function
@handle

partition_id

sys.dm_exec_query_plan() object_id @handle

sys.partition_parameters function_id parameter_id system_type_id


function_id, parameter_id function_id, parameter_id function_id

sys.allocation_units allocation_unit_id container_id data_space_id


allocation_unit_id

data_space_id

assembly_id file_id

sys.partition_functions function_id

function_id function_id

sys.partition_schemes data_space_id function_id

data_space_id

sys.dm_exec_cursors() session_id sql_handle

sys.database_files data_space_id file_id


session_id session_id

Execution Environment
sys.dm_exec_query_memory_grants

pool_id session_id session_id session_id session_id

AlwaysOn

sys.availability_group_listeners group_id listener_id


group_id

listener_id

sys.partition_range_values sys.availability_group_listener_ip_addresses listener_id function_id parameter_id

Partitioning

sys.database_recovery_status database_id family_guid


database_id

sys.dm_db_task_space_usage request_id session_id

session_id

sys.dm_exec_sessions endpoint_id group_id session_id


group_id

session_id

group_id

group_id pool_id sys.dm_exec_query_resource_semaphores pool_id

NOTE: NOT ALL OBJECTS OR POSSIBLE RELATIONSHIPS ARE SHOWN ON THIS POSTER.

family_guid

Availability Groups
sys.dm_hadr_availability_group_states sys.availability_groups sys.availability_groups_cluster group_id
group_id group_id

Availability Replicas
sys.dm_hadr_availability_replica_cluster_nodes sys.dm_hadr_availability_replica_cluster_states sys.dm_hadr_availability_replica_states sys.availability_replicas
group_id group_id

Endpoints
sys.endpoint_webmethods endpoint_id
endpoint_id endpoint_id endpoint_id sys.endpoints.type=1

sys.dm_io_virtual_file_stats() sys.change_tracking_databases database_id


database_id database_id

endpoint_id

session_id

file_id database_id

session_id

sys.dm_io_cluster_shared_drives sys.dm_io_pending_io_requests

sys.dm_exec_background_job_queue sys.dm_exec_background_job_queue_stats sys.dm_exec_cached_plan_dependent_objects() sys.dm_exec_procedure_stats

pool_id

Full Text Search


sys.fulltext_semantic_languages
parent_connection_id

sys.endpoints endpoint_id
endpoint_id object_id

sys.filetables object_id

sys.dm_filestream_non_transacted_handles database_id

sys.dm_exec_query_optimizer_info sys.dm_filestream_file_io_requests handle_id sys.dm_exec_text_query_plan() sys.dm_exec_trigger_stats


handle_id object_id

source_database_id

replica_id group_id

sys.soap_endpoints
database_id

sys.change_tracking_tables object_id

sys.dm_exec_xml_handles()

group_id

sys.http_endpoints
group_id

database_id database_id

sys.databases database_id owner_sid source_database_id


database_id

handle_id

sys.fulltext_index_fragments
connection_id session_id most_recent_sql_handle

sys.availability_databases_cluster group_database_id group_id

resource_associated_entity_id

sys.dm_hadr_database_replica_cluster_states sys.dm_hadr_database_replica_states group_id replica_id group_database_id database_id

sys.tcp_endpoints
sys.dm_tran_locks.request_type in ( HOB T , P a ge , R ID, K ey) a nd sys.dm_tran_locks.database_id=db_id()

owner_sid

database_id database_id database_id

sys.dm_filestream_file_io_handles sys.database_filestream_options database_id handle_id filestream_transaction_id


filestream_transaction_id

table_id sys.dm_exec_connections connection_id endpoint_id most_recent_sql_handle parent_connection_id session_id


table_id connection_id

group_database_id

Database Replicas LOGICAL PHYSICAL

database_id

request_session_id

Availability Databases

sys.via_endpoints

endpoint_id connection_id

sys.fulltext_indexes data_space_id
object_id

object_id unique_index_id
unique_index_id data_space_id

sys.dm_tran_locks.request_type=ALLOCATION UNIT and sys.dm_tran_locks.database_id=db_id() resource_associated_entity_id

sys.dm_tran_locks lock_owner_address resource_associated_entity_id request_owner_id request_owner_guid request_session_id


request_owner_id request_owner_guid sys.dm_tran_locks.request_owner_type=TRANSACTION lock_owner_address

sys.dm_os_tasks host_address request_id scheduler_id session_id task_address worker_address


task_address

session_id, request_id

Service Broker
sys.dm_broker_forwarded_messages conversation__id
conversation_id

sys.server_permissions grantee_principal_id grantor_principal_id

grantee_principal_id, grantor_principal_id

resource_associated_entity_id

scheduler_id scheduler_id

sys.dm_os_schedulers scheduler_id

sys.sql_logins principal_id

memory_object_ address

sys.dm_os_memory_objects memory_object_address page_allocator_address


page_allocator_address

connection_id

sys.dm_tran_transactions_snapshot transaction_sequence_num
transaction_sequence_num principal_id transaction_sequence_num principal_id principal_id

sys.dm_broker_connections sys.transmission_queue conversation_handle


conversation_handle

peer_certificate_id connection_id

task_address

sys.server_role_members member_principal_id role_principal_id


role_principal_id

principal_id principal_id

principal_id

sys.server_principals credential_id principal_id sid


sid sid

sys.database_principals default_schema_name principal_id sid


principal_id

transaction_id, transaction_uow transaction_id transaction_id transaction_id

conversation_id

conversation_handle conversation_group_id conversation_group_id

sys.conversation_groups conversation_group_id service_id


service_id family_guid

sys.dm_tran_active_snapshot_database_transactions transaction_id transaction_sequence_num

page_allocator_address

member_principal_id sys.server_principals.type=R

sys.dm_tran_active_transactions transaction_id transaction_uow


transaction_id waiting_task_address transaction_id blocking_task_address

Server-Wide Information
sys.dm_os_memory_cache_entries cache_address memory_object_address pool_id
pool_id memory_object_ address

Extended Events
sys.dm_xe_packages guid sys.dm_xe_session_targets event_session_address target_name target_package_guid
event_session_address name, package_guid target_name, target_package_guid name, package_guid guid

sys.dm_os_memory_pools memory_pool_address
memory_pool_address

credential_id

principal_id

sys.conversation_endpoints conversation_id conversation_handle conversation_group_id service_id service_contract_id


service_contract_id

sys.dm_os_waiting_tasks
resource_address

sys.master_key_passwords
service_id

credential_id credential_id credential_id

grantee_principal_id

grantee_principal_id

transaction_sequence_num transaction_id transaction_sequence_num

credential_id family_guid sys.asymmetric_keys assymetric_key_id principal_id sid thumbprint


thumbprint sys.crypt_properties.crypt_type=SPVA thumbprint

sys.credentials credential_id sys.database_permissions grantee_principal_id grantor_principal_id

blocking_task_address resource_address waiting_task_address

memory_clerk_address

sys.dm_os_memory_clerks memory_clerk_address page_allocator_address

package_guid

service_id

sys.services
service_id

sys.dm_tran_session_transactions session_id transaction_id


transaction_id session_id

sys.dm_xe_objects name package_guid


name, package_guid name, package_guid name, object_package_guid type_name, type_package_guid

service_queue_id service_id
service_id service_id

sys.dm_tran_current_transaction transaction_sequence_num

cache_address

memory_clerk_address

service_queue_id object_id

thumbprint

thumbprint

sys.key_encryptions thumbprint
thumbprint thumbprint

key_guid

sys.symmetric_keys key_guid principal_id symmetric_key_id sys.dm_tran_current_snapshot


principal_id

cache_address cache_address cache_address

sys.dm_os_memory_cache_clock_hands cache_address
address

sys.service_queues object_id

object_id object_id

Security
thumbprint sys.crypt_properties.crypt_type=CPVO

sys.dm_tran_top_version_generators sys.dm_tran_version_store
transaction_id

transaction_id

sys.dm_os_memory_cache_counters cache_address
cache_address

cache_address

sys.dm_xe_sessions sys.dm_os_buffer_descriptors sys.dm_os_child_instances sys.dm_os_cluster_nodes sys.dm_os_cluster_properties sys.dm_os_server_diagnostics_log_configurations sys.dm_os_hosts sys.dm_os_latch_stats sys.dm_os_loaded_modules


event_session_address

object_name, object_package_guid

symmetric_key_id

sys.dm_tran_database_transactions transaction_id

address sys.dm_xe_object_columns
address address

major_id

sys.crypt_properties major_id thumbprint

key_id cache_address

sys.service_contracts
service_contract_id

service_contract_id service_contract_id

sys.crypt_properties.class=5

sys.openkeys key_id

service_contract_id
service_contract_id

service_id

Transaction Information
member_principal_id role_principal_id sys.database_role_members=R

sys.dm_os_memory_cache_hash_tables cache_address

column_id object_name object_package_guid type_name type_package_guid

thumbprint

thumbprint

service_contract_id

service_id service_contract_id

service_id

sys.database_role_members member_ principal_id role_principal_id

sys.remote_service_bindings service_contract_id

sys.service_contract_usages service_contract_id service_id

Resource Governor
group_id group_id

sys.configurations sys.messages sys.syslanguages

sys.dm_server_memory_dumps sys.dm_os_memory_nodes sys.dm_os_nodes sys.dm_os_performance_counters sys.dm_os_process_memory sys.dm_os_ring_buffers sys.dm_os_stacks sys.dm_os_sys_info

sys.dm_xe_session_events event_session_address event_name event_package_guid


event_name, event_package_guid event_name, event_package_guid

sys.certificates certificate_id sid thumbprint sys.login_token

sys.securable_classes sys.server_audits sys.server_audit_specifications sys.server_audit_specifications_details sys.server_file_audits sys.system_components_surface_area_configuration sys.dm_resource_governor_workload_groups group_id

group_id group_id

action_name, action_package_guid

sys.dm_xe_session_event_actions action_name action_package_guid event_name event_package_guid


event_session_address column_id, object_name, object_package_guid

sys.service_broker_endpoints certificate_id sys.service_contract_message_usages


service_contract_id

queue_id

sys.user_token

pool_id

sys.dm_resource_governor_resource_pools_affinity

sys.dm_os_sys_memory sys.dm_server_registry sys.dm_server_services

sys.dm_broker_activated_tasks queue_id spid


queue_id message_type_id queue_id queue_id spid

sys.dm_os_threads sys.dm_os_virtual_address_dump
pool_id pool_id

message_type_id service_contract_id

sys.dm_xe_session_object_columns event_session_address column_id object_name object_package_guid

sys.database_audit_specifications sys.service_message_types xml_collection_id message_type_id


message_type_id xml_collection_id

sys.dm_audit_actions sys.dm_audit_class_type_map sys.dm_server_audit_status


group_id

pool_id pool_id pool_id pool_id

sys.database_audit_specifications_details

sys.dm_resource_governor_resource_pools group_id pool_id


pool_id

sys.dm_os_volume_stats sys.dm_os_memory_brokers pool_id sys.dm_os_wait_stats sys.dm_os_worker_local_storage sys.dm_os_workers

sys.dm_xe_map_values name object_package_guid

sys.message_type_xml_schema_collection_usages sys.routes

sys.dm_broker_queue_monitors queue_id

2013 Microsoft Corporation. All rights reser ved.

column_id, object_name, object_package_guid

sys.service_queue_usages

event_name, event_package_guid

You might also like