Can connect using SQL Server Management Studio but cannot ping or via program 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?
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