Forum Discussion

Tonizh's avatar
Tonizh
New Member
1 year ago
Solved

Unaable to connect to SQL Server On-premise

Hello,

 

I want to connect to my SQL Server (local) to my Power BI Desktop. when create new blank report, then Get Data - SQL Server, although I'm using Windows account which is Administrator, and did input the correct SQL Server name, it throw me an error like this :

Am pretty sure input the correct Server name (without DB which is optional). I have long time not using Power BI (almost 2.5 years) now just getting Power BI dekstop updated. If I remember correctly, we couls also just put "." or "localhost" during my time using this.

 

But not sure why, and now also don't know where to check what is the problem.

 

I can connect to the local SQL Server using SSMS, by using Windos login options or explicitely mentioned the account and password during SQL connect.

 

May I get some advise what to do ?

 

Thanks

 

 

 

 

 

 

  • Run Power BI Desktop as Administrator

    The issue occurs because Power BI Desktop may require elevated permissions when connecting to SQL Server with certain user accounts or impersonation scenarios.

    Steps:

    1. Close Power BI Desktop if it's currently open.
    2. Right-click on the Power BI Desktop shortcut and select "Run as Administrator".
    3. Open a new blank report and try connecting to your SQL Server again.

    Why this works:

    When running as Administrator, Power BI Desktop gains elevated permissions, allowing it to properly load necessary assemblies (like System.EnterpriseServices) and bypass potential restrictions related to impersonation or limited user rights.

    If this solution works for you, the problem is likely related to permission constraints when connecting with a separate user or service account. Using elevated permissions resolves this mismatch.

    Marking this as solved will help others encountering the same issue!

6 Replies

  • Run Power BI Desktop as Administrator

    The issue occurs because Power BI Desktop may require elevated permissions when connecting to SQL Server with certain user accounts or impersonation scenarios.

    Steps:

    1. Close Power BI Desktop if it's currently open.
    2. Right-click on the Power BI Desktop shortcut and select "Run as Administrator".
    3. Open a new blank report and try connecting to your SQL Server again.

    Why this works:

    When running as Administrator, Power BI Desktop gains elevated permissions, allowing it to properly load necessary assemblies (like System.EnterpriseServices) and bypass potential restrictions related to impersonation or limited user rights.

    If this solution works for you, the problem is likely related to permission constraints when connecting with a separate user or service account. Using elevated permissions resolves this mismatch.

    Marking this as solved will help others encountering the same issue!

    • Tonizh's avatar
      Tonizh
      New Member

      Thanks. I didn't realize although login as "Administrator", but turned out I am open Power BI Desktop which is not as Admin. 

      Changed the shortcut to "Run as administator" and now working fine.

       

      Thanks for all the help.

  • Hello Tonizh 

     

    Please have a look at this link : https://community.fabric.microsoft.com/t5/Desktop/Could-not-load-file-or-assembly-System-EnterpriseServices/td-p/1142188

     

    The are suggesting the few things:

    1. Check if you can connect with the SQL User Credentials. 

    2. Check the version of your Power BI Desktop, update it and check. 

    3. Check the version of SQL server as well. 

     

    Let me know if this helped. 

    I have a question that when you say Local, it is on the same machine in which you have Power BI desktop?

     

    Best regards,
    DivKlearnerA Bit Forward Daily
    Join us as we explore and learn IT together.
    Discover simplified IT learning on YouTube

     

  • Run Power BI Desktop as Administrator

    The issue occurs because Power BI Desktop may require elevated permissions when connecting to SQL Server with certain user accounts or impersonation scenarios.

    Steps:

    1. Close Power BI Desktop if it's currently open.
    2. Right-click on the Power BI Desktop shortcut and select "Run as Administrator".
    3. Open a new blank report and try connecting to your SQL Server again.

    Why this works:

    When running as Administrator, Power BI Desktop gains elevated permissions, allowing it to properly load necessary assemblies (like System.EnterpriseServices) and bypass potential restrictions related to impersonation or limited user rights.

    If this solution works for you, the problem is likely related to permission constraints when connecting with a separate user or service account. Using elevated permissions resolves this mismatch.

    Marking this as solved will help others encountering the same issue!

    • SacheeTh's avatar
      SacheeTh
      Icon for Resolver II rankResolver II

      try these as well

      Check Windows Authentication

      • Since you mentioned that you can connect via SSMS with Windows Authentication, ensure that Power BI Desktop is also configured to use the same authentication method:
        • In the connection dialog, select Windows Authentication under "Authentication Mode."

      4. Check Assembly Issues

      • The error indicates a problem with loading the System.EnterpriseServices assembly. This could be due to:
        • Corrupted .NET Framework installation
        • Missing system updates

      Steps to resolve:

      • Update .NET Framework:
        • Ensure your system has the latest .NET Framework installed. Download it from the Microsoft .NET site.
      • Repair .NET Framework:
        • Go to Control Panel > Programs > Programs and Features.
        • Find and repair the installed version of .NET Framework.

      5. Run Power BI Desktop as Administrator

      • Right-click on the Power BI Desktop shortcut and select Run as Administrator. This ensures that Power BI has sufficient permissions to load assemblies and connect to SQL Server.

      6. Check SQL Server Configuration

      • Ensure that the SQL Server instance allows remote connections (even for local connections):
        • Open SQL Server Configuration Manager.
        • Under SQL Server Network Configuration, verify that Shared Memory, TCP/IP, and Named Pipes are enabled.
  • v-prasare's avatar
    v-prasare
    Icon for Community Support rankCommunity Support

    Hi Tonizh 

    Thanks for reaching out to the Microsoft Fabric Community forum.

    vikram12sharmaSacheeTh,Thank you for the prompt response!

     

    from the screenshot looks like Issue with the sysytem.EnterpriseServices assembly when connecting to SQL Server are often related to problems with the .NET Framework and other services. This assembly is part of the .NET Framework and is used for handling other applications, transactions, and various enterprise-level features.

     

    here are some common troubleshooting steps:

    1. Ensure PBI application is targeting a compatible .NET Framework version for SQL Server and System.EnterpriseServices. Update to the latest version if needed.
    2. Confirm that the SQL Server version is compatible with your PBI application
    3. Review error messages and logs for more specific issues and check the SQL Server or Event Viewer logs.
    4. Check for missing or corrupted assemblies. Repair or reinstall .NET Framework and ensure required assemblies are located correctly.
    5. Verify the application's permissions to access SQL Server and required system resources.

     

    Additionally, take a look at thread with similar issue:

    Could not load file or assembly 'System.Enterprise... - Microsoft Fabric Community

     

     

    If this solution resolved your issue, please mark the item as solved. This way, others who encounter the same problem can benefit from the resolution.

     

    Thanks,

    Prashanth Are