Enable the snapshot transaction isolation level in SQL Server 2005 Analysis Services
This article describes the steps that you must follow to enable the snapshot transaction isolation level in Analysis Services.
Original product version: SQL Server
Original KB number: 919160
Introduction
This article describes how to enable the snapshot transaction isolation level in Microsoft SQL Server Analysis Services. Additionally, this article describes how to test whether the snapshot transaction isolation level is enabled.
Enable the snapshot transaction isolation level
In Analysis Services, you can use the snapshot transaction isolation level to connect to the SQL Server data source. To enable the snapshot transaction isolation level, follow these steps:
In SQL Server Management Studio, run the following statements.
ALTER DATABASE <DatabaseName> SET READ_COMMITTED_SNAPSHOT ON GO ALTER DATABASE <DatabaseName> SET ALLOW_SNAPSHOT_ISOLATION ON GO
Note
In these statements,
<DatabaseName>
is a placeholder for a database in the data source that you want to use in Analysis Services.In Business Intelligence Development Studio, create a new Analysis Services project.
Alternatively, open an existing Analysis Services project.
If you created a new Analysis Services project in step 2, follow these steps:
- In Solution Explorer, right-click Data Sources, and then click New Data Source.
- In the Select how to define the connection dialog box, click New. The Connection Manager dialog box appears.
If you opened an existing Analysis Services project in step 2, follow these steps:
- Under the Data Sources folder, double-click the existing data source.
- In the Data Source Designer dialog box, click Edit. The Connection Manager dialog box appears.
In the Connection Manager dialog box, click Native OLE DB\SQL Native Client in the Provider list.
Specify the server name and the authentication.
To test the connection, click Test Connection.
In the left pane, click All.
In the right pane, click True in the MARS Connection list, and then click OK.
In the Data Source Designer dialog box, click Snapshot in the Isolation list, and then click OK.
Test whether the snapshot transaction isolation level is enabled
To test whether the snapshot transaction isolation level is enabled, follow these steps:
Start SQL Server Profiler.
Create a new trace to connect to the data source that you specified in the Analysis Services project.
In the Trace Properties dialog box, click the Events Selection tab.
In the TransactionID column, click to select the check boxes in the row for the
SQL:BatchCompleted
event and in the row for theSQL:BatchStarting
event.Note
To display the TransactionID column, click to select the Show all columns check box.
Click Run to start the trace.
In Business Intelligence Development Studio, process the Analysis Services project.
In SQL Server Profiler, look for the
SQL:BatchCompleted
events and for theSQL:BatchStarting
events that have the same value in the TransactionID column. Typically, these events contain theSELECT
statement in the TextData column. For these events, obtain the session ID in the SPID column.To connect to the data source, start SQL Server Management Studio.
Create a new query, and then run the following Transact-SQL statement.
select session_id,Transaction_Isolation_Level from sys.dm_exec_sessions where session_id=<SPID>
Note
In this statement, <SPID> is a placeholder for the session ID that you obtained in step 7.
On the Results tab, note the value in the Transaction_Isolation_Level column. This value indicates the transaction isolation level that you are using in the Analysis Services project. When the snapshot transaction isolation level is enabled, the value in the Transaction_Isolation_Level column is 5. The following table shows the values in the Transaction_Isolation_Level column and the corresponding transaction isolation levels.
Value Transaction isolation level 0 Unspecified 1 ReadUncommitted 2 ReadCommitted 3 Repeatable 4 Serializable 5 Snapshot
References
For more information about the snapshot transaction isolation level, see the following topics in SQL Server 2005 Books Online:
- SET TRANSACTION ISOLATION LEVEL (Transact-SQL)
- Enabling row versioning-based isolation levels
- Isolation levels in the Database Engine
Váš názor
https://aka.ms/ContentUserFeedback.
Připravujeme: V průběhu roku 2024 budeme postupně vyřazovat problémy z GitHub coby mechanismus zpětné vazby pro obsah a nahrazovat ho novým systémem zpětné vazby. Další informace naleznete v tématu:Odeslat a zobrazit názory pro