SQL Server port, we can use "Server network trial tool" and "client utility"
To set, the setting method is:
Use "server network trial tool" and "client utility" respectively"
Set the default port in "general options"-> "enabled protocol"-> "TCP/IP"-> "attribute", which is assumed to be 1455
Then test whether your port is valid. You can use
Telnet SQL server address 1455
Check whether telnet is available. If yes, perform the following test.
In the past, there was no port number in writing, so it is easy to write. But now the port number has been changed, and many friends are not very clear about how to write the connection statement. the following database connection statement is the form after the port is changed:
---------------------------------------------------------------------------------
Set oConn = Server. CreateObject ("ADODB. Connection ")
SConn = "Driver = {SQL Server}; Server = Server address, 1455; Database = Database; UID = user name; PWD = password ;"
OConn. Open sConn
Response. Write oConn
----------------------------------------------------------------------------------
Output result:
----------------------------------------------------------------------------------
Provider = MSDASQL.1; Extended Properties = "DRIVER = SQL Server; SERVER = Server address, 1455; UID = user name; PWD = password; APP = Internet Information Services; WSID = **; DATABASE = DATABASE"
------------------------------------------------------------------------
This indicates that we have successfully connected to the data!