Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
1 answer
172 views

How can I verify that my query is causing no locks?

Suppose that I'm having a bad day and my confidence just isn't with me. Suppose also that I've written a query with set transaction isolation level read uncommitted. After it runs for a few minutes, I ...
J. Mini's user avatar
  • 1,642
1 vote
0 answers
143 views

Does Using a Linked Server Affect Isolation Levels

I have a query running on one server (let's call it Server B). It looks something like the below - using a linked server to query data from another server ('Server A') -- in SERVER B CREATE PROC [foo] ...
High Plains Grifter's user avatar
1 vote
1 answer
2k views

Does the delete operation block any insert into the same table?

I have table A and a stored procedure that deletes all data from that table periodically. All queries in the stored procedure are packed into 1 transaction. But sometimes the stored procedure ...
AlexMal's user avatar
  • 21
0 votes
1 answer
391 views

Best suitable transaction isolation level when business rules are not strict

Short version: I am trying to determine which is the best transaction isolation level for the SQL server in our premises. Long version: I am extracting data from API calls and loading it into staging ...
Erunaven's user avatar
1 vote
0 answers
2k views

Snapshot isolation transaction failed in database 'tempdb' because the object accessed by the statem

I have set allow_snapshot_isolation and READ_COMMITTED_SNAPSHOT on my application database. I have SP's which use temp tables. In case of concurrent access on of the SP throws below error. None of the ...
Sagar's user avatar
  • 720
1 vote
1 answer
937 views

Lost update in snapshot vs all the rest isolation levels

Let's suppose we use create new table and enable snapshot isolation for our database: alter database database_name set allow_snapshot_isolation on create table marbles (id int primary key, color ...
Rocket128's user avatar
  • 163
0 votes
1 answer
2k views

SSIS data flow task executing before previous task completes its SQL operation

In SSIS I have DataFlowTask1 which will insert the data into TABLE A. The following data flow task will pull the data from TABLE A. But unfortunately, DataFlowTask2 is getting fired before the ...
shockwave's user avatar
  • 3,302
12 votes
3 answers
43k views

How to Select UNCOMMITTED rows only in SQL Server?

I am working on DW project where I need to query live CRM system. The standard isolation level negatively influences performance. I am tempted to use no lock/transaction isolation level read ...
BI Dude's user avatar
  • 2,036
0 votes
1 answer
753 views

Scope of locks when using TRANSACTION ISOLATION LEVEL SERIALIZABLE

The following link describes the serializable transaction isolation level. http://blogs.msdn.com/b/sqlcat/archive/2011/02/20/concurrency-series-basics-of-transaction-isolation-levels.aspx Suppose ...
JustBeingHelpful's user avatar
4 votes
1 answer
4k views

SQL SERVER 2008 R2 Transaction Snapshot Isolation Level Not Working As Expected

I created a database called 'test_isolation' and created a table 'person' with data name age ---- --- test1 1 test2 2 test3 3 test4 4 test5 5 test6 6 Now the database is ...
Csharp_user's user avatar
17 votes
2 answers
25k views

Snapshot isolation transaction aborted due to update conflict

Following statement: INSERT INTO dbo.Changes([Content], [Date], [UserId], [CompanyId]) VALUES (@1, @2, @3, @4); SELECT @@identity; gives me this SQL error 3960: Snapshot isolation transaction ...
TN.'s user avatar
  • 20k
3 votes
3 answers
5k views

How to handle in an effective way duplicate key insertions w/out throwing an exception

My case scenario passes parameter to a procedure, that only does an insert. But two threads might try to pass the same value. How to handle this situation w/out throwing an exception and with least ...
Falcon's user avatar
  • 650
2 votes
3 answers
3k views

How is a T-SQL transaction not thread-safe?

The following (sanitized) code sometimes produces these errors: Cannot drop the table 'database.dbo.Table', because it does not exist or you do not have permission. There is already an object ...
Adam A's user avatar
  • 14.6k