What is a deadlock and what is a live lock? How will you go
about resolving deadlocks?
Answer Posted / swapna
Deadlock is a situation when two processes, each having a
lock on one piece of data, attempt to acquire a lock on the
other's piece. Each process would wait indefinitely for
the other to release the lock, unless one of the user
processes is terminated. SQL Server detects deadlocks and
terminates one user's process.
A livelock is one, where a request for an exclusive lock
is repeatedly denied because a series of overlapping shared
locks keeps interfering. SQL Server detects the situation
after four denials and refuses further shared locks. A
livelock also occurs when read transactions monopolize a
table or page, forcing a write transaction to wait
indefinitely
| Is This Answer Correct ? | 87 Yes | 10 No |
Post New Answer View All Answers
How sql server executes a statement with nested subqueries?
This question asked during interview, 2) At the end of each month, a new table is created for each bank that contains monthly metrics consolidated at the account level. The table naming convention is bankX_YYYYMM where X represents the numeric designation of the bank and YYYYMM indicates the 4 digit year and 2 digit month. The tables contain the following fields: name data type description account text account number registered boolean indicates whether the account is registered num_trans integer number of transactions made during the time period spend numeric(9,2) total spend during the time period a) Write a SQL query that will display the total number of transactions and total spend for "Bank1" during the 4th quarter of 2009. b) Write a SQL query that will display the total number of transactions and total spend at "Bank1" and "Bank2", broken out by registered vs. non-registered accounts, during January 2010 not sure what is correct answer and how to solve?
How to change the ownership of a schema in ms sql server?
Are resultset updatable?
How can you transfer data from a text file to a database table? Or how can you export data from a table to a comma delimited (csv) file? Or how can you import data from ms access to a table in a database? Or how can you export data from a table to an excel file?
What is the report builder?
What structure can you implement for the database to speed up table reads?
how would you store your query in an SSRS report or a Database server?
What is mscorsvw.exe - process - microsoft .net framework ngen?
Can select statements be used on views in ms sql server?
How to create hyperlink from returned sql query ?
What will happen if a column containing char type data is changed to the nchar data type?
Differentiate between mongodb vs. Sql server?
What is the temp table?
What is tcl in sql server?