@Liam Naude You said that you are using this in Azure. So is this SQL Server on Azure VM ? Where is SQL Server located. I Can see that you are connecting using public IP 40.121.XX.XX so in this case I would suggest you to disable firewall for sometime and check if you can connect. This happens most of the time. if you can connect then make a exception in firewall for his connection in inbound on machine having SQL Server
Cennection from Delphi to MSSQL server: Login Failed
So I'm Using delphi. Just created a free server account with MSSQL. I tried to login in on delphi side to my server. The error message Im getting is as follows: Cannot open server '40.121.158.30' requested by the login. The login failed. I think the problem is permission for clients. I would like to access the server from multiple devices via my application on delphi. Please assist if you can. Thank you.
3 additional answers
Sort by: Most helpful
-
m 4,271 Reputation points
2020-11-09T03:20:26.797+00:00 Hi @Liam Naude ,
Create one login in your server side and then grant the suitable permissions.
Error message is 18456?
Troubleshooting as this: mssqlserver-18456-database-engine-error
More information: troubleshooting-microsoft-sql-server-error-18456-login-failed-userMore information: sql-server-create-user
BR,
Mia
If the answer is helpful, please click "Accept Answer" and upvote it.
-
m 4,271 Reputation points
2020-11-10T01:34:16.697+00:00 Hi @Liam Naude ,
Delphi and SQL Server on same server or different? If different? Can they ping each other successfully?
"FireDAC][Phys][ODBC][Microsoft][SQL Server Native Client 11.0] Client unable to establish connection because an error was encountered during handshakes before login. Common causes include client attempting to connect to an unsupported version of SQL Server, server too busy to accept new connections or a resource limitation(memory or maximum allowed connections) on the server."This error includes many messages, it tells us the two server can not establish connection. And the causes are: 1. the SQL Server version is not supported by Delphi;2.too many connections in your server and there is no enough memory for one new connection;
So firstly make sure whether it is one supported version, and then firsly close some connections in your server and then test again.
More information: Connecting to Microsoft SQL Server Using FireDAC
BR,
Mia
If the answer is helpful, please click "Accept Answer" and upvote it.
-
m 4,271 Reputation points
2020-11-11T01:24:40.893+00:00 Hi @Liam Naude ,
Is the reply helpful?
BR,
Mia
If the answer is helpful, please click "Accept Answer" and upvote it.