TransWikia.com

Can connect using SQL Server Management Studio but cannot ping or via program

Database Administrators Asked by Leona on February 3, 2021

I have a remote SQL Server: myremotedb.myremotedomain.gbl.

I could connect to it from another server myserver.myareadomain (not in the same domain) using SQL Server Management Studio without problem.

But I couldn’t ping it from my server (myserver.myareadomain), nor connect to it via the program that we developed.

PS: I don’t have admin right on the remote server.

Do you have any ideas?

2 Answers

If SQL Studio can connect and your custom app cannot, there's probably some difference in the connection strings. Try forcing a TCP connection (e.g., Server=tcp:myremotedb.myremotedomain.gbl; Database=...).

This is a shot in the dark; I hesitate to even offer it as an answer, but I have seen it fix this problem before. If you've already validated that the server name, credentials, and port are the same between the two, this is what I'd try next.

Answered by Jon of All Trades on February 3, 2021

If you can situationally access SQL Server over the network, this sounds like a firewall issue. To quickly test, simply turn the firewall off on myremotedb.myremotedomain.gbl first. Then, retest the application connectivity. If that doesn't work, turn the firewall of on your app server and retry connecting.

Baring that, I'd start testing ports using nmap to see which ports are able to get through to the target server. nmap is like ping but allows you to test port numbers as well. Test to see whether you can nmap port 1433 (the default sql port) from the app server to myremotedb.myremotedomain.gbl.

https://nmap.org/book/inst-windows.html

Answered by Sting on February 3, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP