| How to
set isolation to read committed snapshot? |
|
Execute the following
script in Query Editor to set the database transaction isolation level to read_committed_snapshot. This isolation level will reduce excessive blocking:
use AdventureWorks
go
DBCC useroptions
go
if (convert(varchar,serverproperty('ProductVersion'))) not like '[1-8].%'
begin
declare @SQLCommand varchar(8000)
select @SQLCommand = '
ALTER DATABASE ' + DB_NAME() + ' SET SINGLE_USER WITH ROLLBACK IMMEDIATE ;
ALTER DATABASE ' + DB_NAME() + ' SET READ_COMMITTED_SNAPSHOT ON;
ALTER DATABASE ' + DB_NAME() + ' SET MULTI_USER; '
print @SQLCommand
exec(@SQLCommand)
end
go
DBCC useroptions
go
|
| The Best SQL Server
2005 Training in the World |
|