cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

connect to sql db

Hi 

 

I have tried to connect to our SQL server DB from Power Apps connect directly but i got an error. so please help me to fix this issue.

 

Thank you

Nader

4 REPLIES 4
Highlighted
Kudo Kingpin
Kudo Kingpin

Re: connect to sql db

Hi,

A few things to look into : 

  • Connectivity : if your DB is on-prem, the problem may come from the gateway. Make sure it's up and running, and ideally that another program (ex : power BI) can connect to it. If you DB is in the cloud (ex: Azure SQL DB), there may be firewalls rule preventing power apps to connect. Also be aware that firewall rules may exist independtly on the server level and on the DB level. Fun stuff ^^
  • Authentication : maybe you can reach the server but your identity is not recognized by the DB. Test your username/password in another client like SSMS or Azure Data Studio you are allowed on that database.
  • Authorization : maybe you can connect and are recognized by the server, but the owner of the data did not give you permission to read or write the data. If you can connect but don't see any tables, it probably points to that.

Also if possible, maybe choose the general help channel for this kind of topic rather than the News and Annoucements.

Good luck!

Frequent Visitor

Re: connect to sql db

Hi 

I can connect to SQL DB from excel, power Bi, crystal report. only power apps i can't. i think there is some thing in power apps. I have checked all what you mentioned but still can't connect.

 

Best regards;

Nad

Highlighted
Super User
Super User

Re: connect to sql db

Hi @nsaleh 

Is this the same problem that you posted here?

https://powerusers.microsoft.com/t5/Creating-Apps/Connect-to-SQL-DB/td-p/242431?attachment-id=5068

 

image.png

If you're using the on-premises gateway, here are some things to try.

  • From the computer where you installed the on-premises gateway, install Management Studio and try connecting to your SQL Server. The point of this exercise is to establish whether your internal gateway can connect to SQL Server, and that there aren't any firewall rules that are blocking the connection.
  • Is your SQL Server name setting correct? For example, if you're using a named instance, you would enter the value sqlsvr1\sqlexpress (or whatever instance name is correct in your setup)
  • If Windows authentication fails, try using SQL Authentication instead, if your SQL Server is set up for mixed mode authentication.
  • If you need to use Windows authentication and it still fails, try entering your username in the format YOURDOMAIN\Username.
  • If you still can't connect, try connecting by IP address rather than servername. Eg instead of entering sqlsvr1 as the servername, try using 192.168.0.10 (ie, the IP address that corresponds to your SQL Server).

Good luck!

 

Highlighted
Anonymous
Not applicable

Re: connect to sql db

Thanks for posting in the community @nsaleh - can you advise if you're still experiencing this issue and also review the above reply?

 

Thank you,

 

@Anonymous 

Helpful resources

Announcements
Check this Out

Announcing

Class of 2020- Season 2

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,006)