Direct query mode ON Error Message “Unable to save the file Model.bim. Reason: The file cannot be saved because it is marked as read only.”
Suppose you are creating tabular model using SSDT Tools in Visual Tools and you want to save or edit the model whenever the new data is updates. But to do so we have one option in the visual studio stating Direct Query Mode = ON/OFF to make this feature implemented in visual studio. Currently it is just supported for SQL Server auth and Data Base auth, if you use MFA Auth then the tabular solution explorer crash and will not be editable or make any changes.
My Environment Details:
- Tabular Compatibility Level Tried: 1200/1400/1500/1600.
- When we create new project solution, we get option to select Workspace “Integrated Workspace/Workspace server”. Tried both method but same result.
- Using the latest version of Visual Studio 2022.
- I am using Azure SQL Server for MFA and also tried with Azure Synapse Serverless SQL endpoint MFA.
- I have SQL Authentication enabled for both above mentioned SQL Servers.
Direct query mode ON Issue:
I am able to edit/save the model with Direct query mode set as OFF with no problem but getting below error message when we change Direct query mode is ON
When I set authentication method as Database I don’t have any issue with Direct Query mode value setting to ON/OFF.
Problem happens only if authentication method is set to MFA/Microsoft(2) in the Data source level as you can see in the below Image. Refer Below Image.
Buy when I set the authentication method for the same data source to “Data Base (1)” it works fine without issue. Refer Below Image.
Detailed:
In the below image/screenshot we can see in the model properties that DirectQueryMode is “OFF” in model.bim properties. So, I am able to save or edit the project/Solution/model without any issue.
In below image when I turned “ON” the DirectQurryMode and try to save or try to do any kind of modification in the Project/solution I am getting this below error.
What to do:
It is expected behavior for all the users. So, for time being we can use SQL Server authentication.
It is currently bug in Visual Studio.
Might be it is expected behavior in visual studio.
There might be some other workaround for this, but I am not aware how to enable.
Once this issue or workaround is fixed, we will post below.
For more details you can see this article referred by Microsoft: https://learn.microsoft.com/en-us/analysis-services/tabular-models/directquery-mode-ssas-tabular?view=asallproducts-allversions
SQL Bi Links:
- Port Number For Analysis Services – Find Ports For SSAS? (kingfishertechtips.in)
- SMTP Server In SSRS/PBIRS |Subscribe To Email Problem/Issue (kingfishertechtips.in)
- SQL Server 2022 Download, Install, Connect Using SSMS Tool (kingfishertechtips.in)
- Creating Tabular Project & Deploy Model To Analysis Service (kingfishertechtips.in)
- Deploy Tabular Project To Azure Analysis Service – SSDT Tool (kingfishertechtips.in)
- SSRS/PBIRS – Install And Configure The Report Server On-Prem (kingfishertechtips.in)
- Could Not Load Folder Contents In Portal URLs – SSRSPBIRS (kingfishertechtips.in)
- SSRS/PBIRS – Install And Configure The Report Server On-Prem (kingfishertechtips.in)
- SQL Server 2022 Download, Install, Connect Using SSMS Tool (kingfishertechtips.in)
- Capture Fiddler Trace for Debugging the Network Traffic (kingfishertechtips.in)
- On-Premises Gateway: Configure/Map SQL DB To Power Bi (kingfishertechtips.in)
- Fixed Column/Row Header Make Visible In Any Report (kingfishertechtips.in)
- Self-Signed Certificate: Configure SSRS/PBIRS With SSL (kingfishertechtips.in)
- Create Local User Account/Local Admin User In Windows 10/11 (kingfishertechtips.in)
- Login With AAD/Domain/Microsoft Account To Azure VM’s/RDP (kingfishertechtips.in)
I don’t think the title of your article matches the content lol. Just kidding, mainly because I had some doubts after reading the article.
Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me? https://www.binance.com/sv/join?ref=PORL8W0Z
Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me.