Forum Discussion

henryco88's avatar
henryco88
Helper II
5 years ago

Error change connection server from loclahost to server sql

Hi,

I have a report connected to a localhost server. Now I would like to change the connection to a sql server which contains the same data and metadata of localhost.
I clicked to "Transform Data" and in "Advanced Editor" I changed the server name.
I do "Close and Apply" and I get this error.

 

 

Why?

3 Replies

  • Create a new query that points to the SQL server. Then do the same transforms as you did originally. Make sure both queries return the same columns as their final step.

     

    If you can confirm that, grab the M code for the new query from Advanced Editor, and then replace the M code of the original query with the new code.

  • V-lianl-msft's avatar
    V-lianl-msft
    Community Support

    Hi henryco88 ,

     

    Open your Desktop file and go to File → Options and settings → Data source settings.

    Select the sql db and right-click and then edit permissions.

    You can connect to SQL Server in Power BI Desktop using SQL authentication credentials. Choose Database option in the following screenshot, then enter your username and password to connect to SQL Server.

     

    Best Regards,
    Liang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • V-lianl-msft's avatar
    V-lianl-msft
    Community Support

    Hi henryco88 ,

     

    Is this problem sloved?
    If not, please let me know.

     

    Best Regards,
    Liang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.