Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago

Issue to login to the database

Hello,

 

I have  report connected to the database and when I am trying to get to the query editor I get the following message:

 

DataSource.Error: Microsoft SQL: Cannot open server "Server-name" requested by the login.  The login failed.

Details:

    DataSourceKind=SQL

    DataSourcePath=db1.windows.net;db1

    Message=Cannot open server &server1; requested by the login.  The login failed.

    Number=40532

    Class=20

 

Can you please suggest ways to resolve this?

 

Many thanks.

5 Replies

  • v-huizhn-msft's avatar
    v-huizhn-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi Anonymous,

    First,  please  check if you can connect to the server using SSMS, and if he uses correct connection string which contains server name, login name.

     Second, please click File->Options and Setting->Data source settings, please select the datasource your reported used, then click Edit permissions, type correct database credential. You will connect the database without any problem.

    From the error messsage, it means you can't login in the SQL Server, please resubmit it. In addition, I post a blog, hope it's useful for you.

    Power BI Desktop privacy levels

    Best Regards,
    Angelia

  • Anonymous's avatar
    Anonymous
    Not applicable

    For me, the solution was to go to Data Source Settings, then check Global Permissions. There were some connections that used old connection credentials. After removing them and adding a new connection, Power BI didn't auto-load them, but gave me the option to enter the correct credentials instead.

    • yousuf190's avatar
      yousuf190
      New Member

      This worked for me, thank you so much!
      Like you said, I simply cleared all my Azure SQL Data source permissions from Global Permissions and went to Get Data > Azure SQL > and tried again and worked. Thanks!!

  • v-huizhn-msft's avatar
    v-huizhn-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi Anonymous,

    If you have resolved your issue, welcome to share your own solution, and please mark the helpful/useful reply as answer if you have resolved it. More people will benefit from here.

    Best Regards,
    Angelia

    • TDwivedi's avatar
      TDwivedi
      Frequent Visitor

      Hi,

      I'm facing the same issue. I'm able to connect through SSMS but not able to do it through PowerBI.

      Through SSMS I select authentication option as "Active Directory - Password" and provide username and password.

       

      Any help is appreciated.