Introductory data:
- SQL Server 12.0.6329 (read-only rights)
- Microsoft SQL Server Management Studio on the server machine
- The server is located in a local network behind a router
- Router with a white IP address
- Client in the external network
- VNC access to the server machine is available from the external network
- Non-standard SQL port – 15000
The server, among other things, is a server for a specific software. The client part of this software can be used from outside by specifying the white IP address of the router. (The port is presumably hardcoded inside.) Port forwarding is set up on the router to redirect to the server machine. There are no rights to change anything in SQL Server, as the software is third-party and technical support has provided read only access to SQL.
Initially, I implemented SQL work from a remote machine in the external network using pyodbc, but encountered a tangle of errors and decided to debug the connection, first, through a UDL file.
To do this, Microsoft OLE DB Driver 19 for SQL Server has been installed.
In the settings: SQL Server Authentication –> Login, Pass
Encryption –> Optional
ُ
A file has been set up on the server – successful connection with SERVERDB_ADDRESS and tcp: local IP
Setup file on a computer in the local network – successful connection with tcp: local IP,port
Setup file on a computer in the local network – successful connection with tcp: white router IP, port
Setup file on a client in the external network – error with tcp: white router IP, port:
“Logon attempt failed for login ‘login_name’ due to a trigger execution.” (17892)
The firewall on the server was checked and the port has been excluded from the whitelist in all variations.
Test-NetConnection white router IP -Port ##### establishes a connection
Ping white router IP –> exceeds interval
Python has been tried with various libraries and ODBC Driver 17 for SQL Server with the same result.
Please advise on the direction for further investigation, taking into account the absence of the ability to make changes to the server, but at the same time its operability in the local network and in the external network through its client software.
Lord Scout is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1