Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
v-sadadi
Employee
Employee

Connect to sql server (OnPrem) in a domain other than FAREAST using power bi desktop

Hi Team,

 

I have a requirement to connect to a SQL Server (OnPrem) from a different domain other than FAREAST using power bi desktop to generate reports in power bi. Please suggest the possible options and steps to do the same. I got the attached error when trying to do the same.

Error.jpg

 

 

Immediate  help on this requirement is highly appreciated. 

 

Thanks
Satya

5 REPLIES 5
v-yuezhe-msft
Employee
Employee

Hi @v-sadadi,

Firstly, please ensure that you are able to ping the target server from the machine that is running Power BI Desktop.

Secondly, do you have to use Windows credentials to connect to the target SQL Server from Power BI Desktop? If not, just use SQL login to connect to SQL Server, choose Database authentication in Power BI Desktop, enter user name and password as shown in the following screenshot. Also ensure that you have followed the steps in this similar blog to configure SQL Server to allow remote connections in advance.
1.PNG

However, if you have to use Windows credentials to connect to the target SQL Server from Power BI Desktop, have you established a trust relationship between the two different domains? If yes, you are able to connect to SQL Server using Windows Authentication from Power BI Desktop, just make sure you have followed steps in the above blog to configure SQL Server to allow remote connections .

If there is no trust relationship between the two domains. You can use runas /netonly command to connect to SQL Server using Windows credentials, for detailed steps, please review this similar thread: http://community.powerbi.com/t5/Desktop/Connecting-to-SQL-Server-using-Windows-Authentication-from-a... .


Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Phil/Zhang,

 

The domain account (Example: gdodc/XXXXX) have access to the SQL Server I want to connect to, I am able to ping the target server from the machine I have installed Power BI Desktop and when I did the below steps, 

 

1. Open command prompt and run the following command, enter the password of domain user when prompted.

runas /netonly /user: Domain\username "C:\Program Files\Microsoft Power BI Desktop\bin\PBIDesktop.exe"

 

it opened Power BI Desktop but I could not sign in with the domain account (Example: gdodc/XXXXX). Also when I tried to connect to the SQL server, it gave me the above error.

 

So please help me on

1. How I can sign in to Power BI Desktop/ PowerBI.com with this domain account (Example: gdodc/XXXXX)?

2. How to connect to SQL server in Get Data with this domain account (Example: gdodc/XXXXX)? in Power BI Desktop.

 

Any help on this is highly appreciated.


Thanks

Satya

Hi @v-sadadi,

Have you created a saved Windows credential following the instructions in the blog below?

https://www.mssqltips.com/sqlservertip/3250/connect-to-sql-servers-in-another-domain-using-windows-a...

Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Zhang, 

 

I have created a saved windows credential as per the blog. But still no luck to connect to the server. Please help on further steps.

 

Thanks

Satya

Phil_Seamark
Employee
Employee

The data gateway has the ability to map domains for you. If you Google for "guy in a cube" and userprinciename mapping you should find what you need. We do it.

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.