【SQL Server学习笔记】事务、锁定、阻塞、死锁 sys.sysprocesses
http://blog.csdn.net/sqlserverdiscovery/article/details/7712068
| Column name | Data type | Description |
|---|---|---|
| blocked | smallint | ID of the session that is blocking the request. If this column is NULL, the request is not blocked, or the session information of the blocking session is not available (or cannot be identified).
-2 = The blocking resource is owned by an orphaned distributed transaction. -3 = The blocking resource is owned by a deferred recovery transaction. -4 = Session ID of the blocking latch owner could not be determined due to internal latch state transitions. |
| waittype | binary(2) | Reserved. |
| waittime | bigint | Current wait time in milliseconds.
0 = Process is not waiting. |
| lastwaittype | nchar(32) | A string indicating the name of the last or current wait type. |
| waitresource | nchar(256) | Textual representation of a lock resource. |
| dbid | smallint | ID of the database currently being used by the process. |
| uid | smallint | ID of the user that executed the command. Overflows or returns NULL if the number of users and roles exceeds 32,767. |
| cpu | int | Cumulative CPU time for the process. The entry is updated for all processes, regardless of whether the SET STATISTICS TIME option is ON or OFF. |
| physical_io | bigint | Cumulative disk reads and writes for the process. |
| memusage | int | Number of pages in the procedure cache that are currently allocated to this process. A negative number indicates that the process is freeing memory allocated by another process. |
| login_time | datetime | Time at which a client process logged into the server. |
| last_batch | datetime | Last time a client process executed a remote stored procedure call or an EXECUTE statement. |
| ecid | smallint | Execution context ID used to uniquely identify the subthreads operating on behalf of a single process. |
| open_tran | smallint | Number of open transactions for the process. |
| status | nchar(30) | Process ID status. The possible values are:
dormant = SQL Server is resetting the session. running = The session is running one or more batches. When Multiple Active Result Sets (MARS) is enabled, a session can run multiple batches. For more information, see Using Multiple Active Result Sets (MARS). background = The session is running a background task, such as deadlock detection. rollback = The session has a transaction rollback in process. pending = The session is waiting for a worker thread to become available. runnable = The task in the session is in the runnable queue of a scheduler while waiting to get a time quantum. spinloop = The task in the session is waiting for a spinlock to become free. suspended = The session is waiting for an event, such as I/O, to complete. |
| sid | binary(86) | Globally unique identifier (GUID) for the user. |
| hostname | nchar(128) | Name of the workstation. |
| program_name | nchar(128) | Name of the application program. |
| hostprocess | nchar(10) | Workstation process ID number. |
| cmd | nchar(16) | Command currently being executed. |
| nt_domain | nchar(128) | Windows domain for the client, if using Windows Authentication, or a trusted connection. |
| nt_username | nchar(128) | Windows user name for the process, if using Windows Authentication, or a trusted connection. |
| net_address | nchar(12) | Assigned unique identifier for the network adapter on the workstation of each user. When a user logs in, this identifier is inserted in the net_address column. |
| net_library | nchar(12) | Column in which the client's network library is stored. Every client process comes in on a network connection. Network connections have a network library associated with them that enables them to make the connection. |
| loginame | nchar(128) | Login name. |
| context_info | binary(128) | Data stored in a batch by using the SET CONTEXT_INFO statement. |
| sql_handle | binary(20) | Represents the currently executing batch or object.
Note This value is derived from the batch or memory address of the object. This value is not calculated by using the SQL Server hash-based algorithm. |
| stmt_start | int | Starting offset of the current SQL statement for the specified sql_handle. |
| stmt_end | int | Ending offset of the current SQL statement for the specified sql_handle.
-1 = Current statement runs to the end of the results returned by the fn_get_sql function for the specified sql_handle. |
| request_id | int | ID of request. Used to identify requests running in a specific session. |
【SQL Server学习笔记】事务、锁定、阻塞、死锁 sys.sysprocesses的更多相关文章
- 【SQL Server学习笔记】Delete 语句、Output 子句、Merge语句
原文:[SQL Server学习笔记]Delete 语句.Output 子句.Merge语句 DELETE语句 --建表 select * into distribution from sys.obj ...
- sql server 学习笔记 (nested transaction 嵌套事务)
什么时候会用到嵌套事务 ? 为了代码复用,我们会写许多的储蓄过程,而中间如果需要使用到 transaction 难免就会发生嵌套了. sql server 并不直接支持嵌套事务. 但它可以用一些招式来 ...
- SQL server 学习笔记1
1.查询安装的排序规则选项喝当前的排序规则服务器属性 select * from fn_helpcollations(); 2.查看当前服务器的排序规则 select serverproperty(' ...
- sql server 学习笔记 ( backup 备份方案 )
做个记入就好 USE [master] SELECT bs.database_name AS 'Database Name', bs.backup_start_date AS 'Backup Star ...
- SQL SERVER学习笔记:临时表与表变量
本文主要摘自徐海蔚的<Microsoft SQL SERVER企业级平台管理实践> 表变量可以作为存储过程的返回参数,而临时表不行.(存疑?表值参数只在SQL SERVER2008才开始支 ...
- sql server 学习笔记 ( row_number, rank, dense_rank over partition by order by )
refer : https://blog.csdn.net/winer2008/article/details/4283539 https://www.cnblogs.com/linJie193090 ...
- Sql Server学习笔记
1.指定路径创建数据库 create database student on--创建库的时候必须写 ( name=student, filename='E:\database\student.mdf' ...
- sql server 学习笔记
1. 修改student表中sdept字段改为varchar类型,长度为30,并且不为空 ) not null 2. 删除student表中的address列 alter table student ...
- 【SQL SERVER学习笔记】Sqlserver游标的尝试
DECLARE @ProName NVARCHAR(50)DECLARE @CityName NVARCHAR(50)DECLARE @ProId INT DECLARE @CityId INT DE ...
随机推荐
- Java并发(8)- 读写锁中的性能之王:StampedLock
在上一篇<你真的懂ReentrantReadWriteLock吗?>中我给大家留了一个引子,一个更高效同时可以避免写饥饿的读写锁---StampedLock.StampedLock实现了不 ...
- 【洛谷 P4211】[LNOI2014]LCA(树链剖分,差分)
题目链接 看到题目肯定首先想到要求LCA(其实是我菜),可乍一看,n与q的规模为5W, 求LCA的复杂度为\(O(logN)\),那么总时间复杂度为\(O(nq\ log\ n)\). 怎么搞呢? 会 ...
- Linux 工作站安全加固规范
目标受众 这是一套 Linux 基金会为其系统管理员提供的推荐规范. 这个文档用于帮助那些使用 Linux 工作站来访问和管理项目的 IT 设施的系统管理员团队. 如果你的系统管理员是远程员工,你也许 ...
- cve-2012-5613 mysql本地提权
cve-2012-5613 是一个通过FILE权限写Trigger的TRG存储文件(即伪造Trigger),由root触发而导致权限提升的漏洞.不知道为什么这个漏洞一直没修,可能mysql认为这是一 ...
- Jmeter接口测试常见的乱码问题三种解决方法
使用Jmeter时经常遇到中文乱码问题,下面总结三种常用的解决方式. 1. 2.在Jmeter安装文件bin中找到jmeter.properties,打开jmeter.properties,搜索“IS ...
- classNotFound修复
万恶的这个bug,也是经常遇见,每一次都是在反复检查完代码之后并没有发现错误,然后开始上网百度,发现也并没有一个准确的解答.在此给出我的个人的修复bug的过程. 1.首先我是遇到了找不到entity中 ...
- times、 time、clock函数说明
sysconf( _SC_CLK_TCK ) 功能 获取系统的 时钟滴答的频率. clock_gettime() clock()返回的是各个线程运行cpu时间的和, 返回值一直都是0. 定义函数: ...
- 怎么将string list 转成有特殊字符分开字符串
https://stackoverflow.com/questions/4021851/join-string-list-elements-with-a-delimiter-in-one-step Y ...
- BMP文件组成
BMP文件组成 BMP文件由文件头.位图信息头.颜色信息和图形数据四部分组成. 如图: 位图文件头BITMAPFILEHEADER 位图信息头BITMAPINFOHEADER 调色板Palette 实 ...
- (十三)MySQL主从复制
(1)工作原理 (2)主从实现 1) 环境介绍 cat /etc/redhat-release CentOS Linux release 7.3.1611 (Core) MySQL版本:5.7 mys ...