cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
nsaleh
Level: Powered On

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

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!

nsaleh
Level: Powered On

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

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!

 

TopShelf-MSFT
Level 10

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,

 

@TopShelf-MSFT 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,888)