Microsoft KB Archive/919160

= How to enable the snapshot transaction isolation level in SQL Server 2005 Analysis Services =

Article ID: 919160

Article Last Modified on 5/24/2006

-

APPLIES TO


 * Microsoft SQL Server 2005 Analysis Services

-





INTRODUCTION
This article describes how to enable the snapshot transaction isolation level in Microsoft SQL Server 2005 Analysis Services. Additionally, this article describes how to test whether the snapshot transaction isolation level is enabled.



How to enable the snapshot transaction isolation level
In Analysis Services, you can use the snapshot transaction isolation level to connect to the SQL Server 2005 data source. To enable the snapshot transaction isolation level, follow these steps:   In SQL Server Management Studio, run the following statements. ALTER DATABASE  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.</li> In the Data Source Designer dialog box, click Edit. The Connection Manager dialog box appears.</li></ol> </li> In the Connection Manager dialog box, click Native OLE DB\SQL Native Client in the Provider list.</li> Specify the server name and the authentication.</li> To test the connection, click Test Connection.</li> In the left pane, click All.</li> In the right pane, click True in the MARS Connection list, and then click OK.</li> In the Data Source Designer dialog box, click Snapshot in the Isolation list, and then click OK.</li></ol>

How to 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.</li> Create a new trace to connect to the data source that you specified in the Analysis Services project.</li> In the Trace Properties dialog box, click the Events Selection tab.</li> In the TransactionID column, click to select the check boxes in the row for the SQL:BatchCompleted event and in the row for the SQL:BatchStarting event.

Note To display the TransactionID column, click to select the Show all columns check box.</li> Click Run to start the trace.</li> In Business Intelligence Development Studio, process the Analysis Services project.</li> In SQL Server Profiler, look for the SQL:BatchCompleted events and for the SQL:BatchStarting events that have the same value in the TransactionID column. Typically, these events contain the SELECT statement in the TextData column. For these events, obtain the session ID in the SPID column.</li> <li>To connect to the data source, start SQL Server Management Studio.</li> <li> 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,  is a placeholder for the session ID that you obtained in step 7. </li> <li>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.</li></ol>

The following table shows the values in the Transaction_Isolation_Level column and the corresponding transaction isolation levels.

<div class="references_section">