Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mkaec
New Member

SQL Server Snapshot Isolation

One of the data sets that the BI teams needs to report on is in an SQL database with SNAPSHOT ISOLATION enabled, but the READ COMMITTED SNAPSHOT option is not enabled.


This type of configuration results in SELECT statements taking locks, unless snapshot isolation is manually activated.  Other reporting solutions that access this database use stored procedures as the data source and the first line of the SP is always "SET TRANSACTION ISOLATION LEVEL SNAPSHOT".


Is there anyway to get PowerBI to activate snapshot isolation before it retrieves data from this database? This would be useful for both DirectQuery and import as snapshot isolation would avoid PowerBI from taking SQL locks.

3 REPLIES 3
daxer-almighty
Solution Sage
Solution Sage

Each connection to a database can set its own isolation level for reading. That's for sure. What you have to do is to get to know how to do it in your connection from PBI to the database. I'm sure there is a way.

daxer-almighty
Solution Sage
Solution Sage

If all your sprocs use the snapshot isolation level, then you should enable this isolation level on the whole database as the default. You can change the snapshot isolation on a database by executing this SET READ_COMMITTED_SNAPSHOT ON; If you want to read more about how it works, here's the SO page: sql server - ALLOW_SNAPSHOT_ISOLATION and READ_COMMITTED_SNAPSHOT - Database Administrators Stack Ex...

 

Also, when you make a connection to your data source from PBI or DAX Studio, you can specify additional options. Maybe you can set this option in there...

I can't turn on READ_COMMITTED_SNAPSHOT because the application code wasn't designed for that.  Years of development and testing was based on the application code taking locks.  And it's not my application or code.  So, I can't get the code tested and updated. 

 

If there is way to enable it with an additional option, I could use some help.  I'm not finding how to do it.  That's why I posted here. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.