SELECT request_session_id spid,
OBJECT_NAME(resource_associated_entity_id) tableName
FROM sys.dm_tran_locks
WHERE resource_type = 'OBJECT'

KILL spid

Such as :

kill 70

【 original text 】http://www.cnblogs.com/liqingwen/p/7158996.html

[Bug] solve Sql Server More articles on database deadlock

  1. solve SQL server2005 Experience of database deadlock

    Mentioned some time ago "sql server 2005 Deadlock solution ", Deadlock serious , On average, a deadlock occurs once a day , In solving and dealing with SQL server2005 I searched a lot of information and thought of many ways in deadlock , Then we ...

  2. solve SQL SERVER Database backup appears “ Operating system error 5( Access denied ).BACKUP DATABASE Terminating abnormally .” The wrong solution

    SQL SERVER Database backup appears “ Operating system error 5( Access denied ).BACKUP DATABASE Terminating abnormally .” error . How should we solve this problem ? Xiao Bian today recommends a solution for you . General backup file selection ...

  3. Rapid positioning MS Sql Server Database deadlock process

    I'm working on a big project recently , Because data design adopts discrete database design , To facilitate demand changes and user-defined process elements , Because the elements are user-defined , Data integrity becomes unrealistic by code constraints , You can only rely on the relationship between tables to constrain , As a result, data manipulation often results in ...

  4. SQL Server Analysis of deadlock in database

    SQL Server When the database is locked, it will not be like Oracle So automatically generate a trace file . Sometimes you can [ management ]->[ Current activities ] I see blocking messages in the library ( Sometimes SQL Server The enterprise manager will not respond because there are too many locks ). ...

  5. Reprint 50 There are two ways to optimize SQL Server Database query

    Original address http://www.cnblogs.com/zhycyq/articles/2636748.html 50 There are two ways to optimize SQL Server Database query There are many reasons for slow query speed , The common ones are as follows : 1 ...

  6. What you don't know SQL Server Database startup process , As well as the analysis and solution skills of various problems that cannot be started up

    at present SQL Server Database as a Microsoft excellent RDBMS, When it is started, it seldom has any problems , When we use it on a regular basis , Little attention is paid to the start-up process , Or rarely understand its underlying running process , Most processes focus only on their internal tables . stored procedure . ...

  7. Fix change rename sql Server Database name

    error : news 5030, Level 16, state 2, The first 1 Row cannot lock the database with an exclusive lock , To perform the operation . resolvent :( The principle is the same ) 1. Set the database to single user mode ( Single user mode specifies that only one user can access the database at a time , The ...

  8. solve SQL Server Manager cannot connect to the remote database Error: 1326 error

    solve SQL Server Manager cannot connect to the remote database Error: 1326 error We're using SQL Server You will encounter the use of SQL Server Management Studio Unable to connect to remote database instance ...

  9. Solve the Excel Table import to SQL Server Database Text was truncated or one or more characters had no match in the target code error

    To write python Crawler programs can be used in e-commerce . Travel and other websites to crawl the relevant review data , This data can be used for word cloud production . Analysis of emotional words . Extract keywords, etc , You can also display the data in your own way . After the comment data crawled down , We have to consider how to put it in the warehouse , ...

Random recommendation

  1. CCF 201612-1 Maximum fluctuation ( Water problem )

    Problem description Xiao Ming is using the volatility of stocks to study stocks . Xiao Ming gets the closing price of a stock every day , He wants to know , What is the maximum volatility of this stock for several days in a row , That is, in these days, what is the maximum absolute value of the difference between the closing price of one day and the closing price of the previous day . Input ...

  2. Nginx Module development - understand HTTP To configure

    understand HTTP To configure Relevant data structure Understand first Nginx The following data structure , Understand again HTTP The parsing and merging process of configuration ngx_module_t official API typedef struct{ NGX_MODULE_V1; ...

  3. Charging at the weekend WPF( Four ). Operation between multiple windows

    Multi window instance : 1. In the case of multiple windows, how to customize and specify the window program to start <Application x:Class="toolbar.App" xmlns="http:/ ...

  4. mysql Examples of specific statements

    Build table :(not null ,auto_increment, unique , primary key) create database balfish;use balfish;create table ...

  5. idiom - Initialization-on-demand holder Singleton mode of delayed loading

    Reference resources :https://en.wikipedia.org/wiki/Initialization-on-demand_holder_idiom idiom - A thread safe . There is no need to synchroniza ...

  6. for Cyclic output 9~0

    Example for(var i = 9; i>-1;i--){ println(i) } function println(a) { document.write(a+"<br> ...

  7. jenkins Remote connection linux Configuration testing

    The following error is caused by configuration : jenkins.plugins.publish_over.BapPublisherException: Failed to connect session for co ...

  8. python os Library learning notes

    os.getcwd(): Get current directory os.name: Get the current operating system eg: print os.name os.remove(): Delete the specified file eg: os.remove('test.t ...

  9. Qt localization ( translate )

    Qt localization ( translate ) The translation process is like this : First, source code generation ts file , And give it to Qt Linguist(Qt Linguist ) This Qt It comes with a small tool for processing qm Translate the document , Finally, load this in the source code qm ...

  10. JDBC: Database operation :BLOB Data processing

    CLOB It mainly saves a large amount of text , and BLOB It's dedicated to binary data : Include , picture , music , The film . etc. . stay MYSQL in ,BLOB Type used LONGBLOB Statement , Up to storage 4G Content . Create a table : create tabl ...