Hi!
Done extensive search but always getting results on how to change port on the actual SQL server, which isn't what I need to do. That port has already been changed from standard 1433 to other port number.
In a PowerShell script:
Can connect from Machine A to SQL server over standard port 1433 (tried opening it on the SQL server).
Can not connect from Machine B to SQL server over other port.
To check things out:
I can telnet:
Getting ESTABLISHED on [other_port]
and ODBC connect from Machine B to SQL server:
In "Microsoft SQL Server DSN Configuration" using driver "SQL Server" - System DSN -> Next - button Client Configuration, changed to other port. Getting"TESTS COMPLETED SUCCESSFULLY!"
Running netstat -bfo -n 10 -p TCP I can see that there is a connection ESTABLISHED from odbcad32.exe to remoteserver:[other port]. I verified the Process ID and it's indeed the ODBC.
Trying ODBC - Driver: SQL Server Native Client 11.0 -> Server: [SERVER_NAME],[other_port]
Seems to work. So it's "comma" to be used in that driver?
Third driver available is ODBC Driver 13 for SQL Server. During test I read "Microsoft ODBC Driver for SQL Server Version 14.00.1000". I used comma. Netstat showsESTABLISHED.
You have to wait a while for the connection to disappear in netstat which I did in the above tests, between the three ODBC drivers tested.
Which of these three drivers (SQL Server, SQL Server Native Client 11.0, ODBC Driver 13 for SQL Server) is PowerShell using?
Is PowerShell using any other ports behind the scenes (can't see any in Netstat?).
PowerShell 5.1.
Machine B to SQL Server, diving into the script:
Getting error:
Multiple ambiguous overloads found for "Fill" and the argument count: "1".
at line:20 char 1
+ `$SqlAdapter.Fill($Dataset)
...
Which is not very accurate? I suspect network errors, eventhough the error states differently.
Are there any implication not using standard port 1433 as it works from machine A to SQL Server?
Have a nice day!