Forum Discussion

ptepichin's avatar
ptepichin
Helper I
3 years ago

Prevent database locking using direct query in Power BI

I have a question regarding how to prevent locking a database if i'm using DirectQuery in PowerBI.

 

Steps: 

I select a server and database and click OK and don't enter sql syntax in the Advanced Options:

I select a table and click Load:

 

When I right click on the dataset and select edit query I get the following detail 

 

In order to prevent datalock when i entered sql i used  WITH(NOLOCK) after each table. If I select the table directly is there configuration i need to do to prevent data locks? I'm having to connect to a production database. I might possibly be able to get this data from a replicated database but i'm also concerned if i might get a dirty read if there is a conflict with pulling data during a replication.

 

 

 

  

3 Replies