Sqlserver 系统视图简单说明

1. 查看系统视图的sql语句

select * from sys.system_views

2. 查看所有的 dynamic management 视图的sql

select * from sys.system_views where name like 'dm%' order by name

3. 动态视图列表(SQLSERVER 2008R2 )

dm_audit_actions
dm_audit_class_type_map
dm_broker_activated_tasks
dm_broker_connections
dm_broker_forwarded_messages
dm_broker_queue_monitors
dm_cdc_errors
dm_cdc_log_scan_sessions
dm_clr_appdomains
dm_clr_loaded_assemblies
dm_clr_properties
dm_clr_tasks
dm_cryptographic_provider_properties
dm_database_encryption_keys
dm_db_file_space_usage
dm_db_index_usage_stats
dm_db_mirroring_auto_page_repair
dm_db_mirroring_connections
dm_db_mirroring_past_actions
dm_db_missing_index_details
dm_db_missing_index_group_stats
dm_db_missing_index_groups
dm_db_partition_stats
dm_db_persisted_sku_features
dm_db_script_level
dm_db_session_space_usage
dm_db_task_space_usage
dm_exec_background_job_queue
dm_exec_background_job_queue_stats
dm_exec_cached_plans
dm_exec_connections
dm_exec_procedure_stats
dm_exec_query_memory_grants
dm_exec_query_optimizer_info
dm_exec_query_resource_semaphores
dm_exec_query_stats
dm_exec_query_transformation_stats
dm_exec_requests
dm_exec_sessions
dm_exec_trigger_stats
dm_filestream_file_io_handles
dm_filestream_file_io_requests
dm_fts_active_catalogs
dm_fts_fdhosts
dm_fts_index_population
dm_fts_memory_buffers
dm_fts_memory_pools
dm_fts_outstanding_batches
dm_fts_population_ranges
dm_io_backup_tapes
dm_io_cluster_shared_drives
dm_io_pending_io_requests
dm_os_buffer_descriptors
dm_os_child_instances
dm_os_cluster_nodes
dm_os_dispatcher_pools
dm_os_dispatchers
dm_os_hosts
dm_os_latch_stats
dm_os_loaded_modules
dm_os_memory_allocations
dm_os_memory_brokers
dm_os_memory_cache_clock_hands
dm_os_memory_cache_counters
dm_os_memory_cache_entries
dm_os_memory_cache_hash_tables
dm_os_memory_clerks
dm_os_memory_node_access_stats
dm_os_memory_nodes
dm_os_memory_objects
dm_os_memory_pools
dm_os_nodes
dm_os_performance_counters
dm_os_process_memory
dm_os_ring_buffers
dm_os_schedulers
dm_os_spinlock_stats
dm_os_stacks
dm_os_sublatches
dm_os_sys_info
dm_os_sys_memory
dm_os_tasks
dm_os_threads
dm_os_virtual_address_dump
dm_os_wait_stats
dm_os_waiting_tasks
dm_os_windows_info
dm_os_worker_local_storage
dm_os_workers
dm_qn_subscriptions
dm_repl_articles
dm_repl_schemas
dm_repl_tranhash
dm_repl_traninfo
dm_resource_governor_configuration
dm_resource_governor_resource_pools
dm_resource_governor_workload_groups
dm_server_audit_status
dm_server_memory_dumps
dm_server_registry
dm_server_services
dm_tran_active_snapshot_database_transactions
dm_tran_active_transactions
dm_tran_commit_table
dm_tran_current_snapshot
dm_tran_current_transaction
dm_tran_database_transactions
dm_tran_locks
dm_tran_session_transactions
dm_tran_top_version_generators
dm_tran_transactions_snapshot
dm_tran_version_store
dm_xe_map_values
dm_xe_object_columns
dm_xe_objects
dm_xe_packages
dm_xe_session_event_actions
dm_xe_session_events
dm_xe_session_object_columns
dm_xe_session_targets
dm_xe_sessions

 

4. 查看的时候  根据选择查看即可

select * from sys.dm_tran_locks

 

转载于:https://www.cnblogs.com/jinanxiaolaohu/p/10364763.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
This book is an introduction and deep-dive into the many uses of dynamic SQL in Microsoft SQL Server. Dynamic SQL is key to large-scale searching based upon user-entered criteria. It’s also useful in generating value-lists, in dynamic pivoting of data for business intelligence reporting, and for customizing database objects and querying their structure. Executing dynamic SQL is at the heart of applications such as business intelligence dashboards that need to be fluid and respond instantly to changing user needs as those users explore their data and view the results. Yet dynamic SQL is feared by many due to concerns over SQL injection attacks. Reading Dynamic SQL: Applications, Performance, and Security is your opportunity to learn and master an often misunderstood feature, including security and SQL injection. All aspects of security relevant to dynamic SQL are discussed in this book. You will learn many ways to save time and develop code more efficiently, and you will practice directly with security scenarios that threaten companies around the world every day. Dynamic SQL: Applications, Performance, and Security helps you bring the productivity and user-satisfaction of flexible and responsive applications to your organization safely and securely. Your organization’s increased ability to respond to rapidly changing business scenarios will build competitive advantage in an increasingly crowded and competitive global marketplace. Discusses many applications of dynamic SQL, both simple and complex. Explains each example with demos that can be run at home and on your laptop. Helps you to identify when dynamic SQL can offer superior performance. Pays attention to security and best practices to ensure safety of your data. What You Will Learn Build flexible applications that respond fast to changing business needs. Take advantage of unconventional but productive uses of dynamic SQL. Protect your data from attack through best-practices in your implementations. Know about SQL Injection and be confident in your defenses against it Run at high performance by optimizing dynamic SQL in your applications. Troubleshoot and debug dynamic SQL to ensure correct results.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值