Topic: Snapshot isolation transaction failed accessing database ' tempdb'
In basis with included there is a procedure. In it there is a quantity @tables.
in this procedure there is such error:
Snapshot isolation transaction failed accessing database ' tempdb ' because snapshot isolation is not allowed in this database. Use ALTER DATABASE to allow snapshot isolation
I while in details did not dig, decided to ask, someone can faced and directs me to the necessary channel.
I while clarified that the similar error can be received in such cases:
use tempdb; CREATE TABLE T (id int); SET TRANSACTION ISOLATION LEVEL SNAPSHOT; select * from T;
use tempdb; - or the user basis where it is included CREATE TABLE ##A (id int); SET TRANSACTION ISOLATION LEVEL SNAPSHOT; select * from ##A;
With variables @table such error does not arise...
print @@ version Microsoft SQL Server 2008 (SP1) - 10.0.2766.0 (X64) Feb 25 2010 0:51:37 PM Copyright (c) 1988-2008 MICROSOFTS CORPORATION Enterprise Edition (64-bit) on Windows NT 6.0 <X64> (Build 6002: Service Pack 2)