sql server端口的更改方法
sql server端口如果出現(xiàn)問(wèn)題,會(huì)直接影響sql server的登錄,下面就教您sql server端口的更改方法,供您參考,讓您不再為sql server端口問(wèn)題而頭疼。
今天遇到一個(gè)問(wèn)題,sql server無(wú)法登陸,到Services里看,服務(wù)沒有起來(lái)。但是在啟動(dòng)Service時(shí)遇到問(wèn)題說(shuō)無(wú)法啟動(dòng)。去Administrative Tools->Event Viewer中查看了一下,發(fā)現(xiàn)如下錯(cuò)誤(該錯(cuò)誤在SQL Server日志中也可以查看到,目錄在C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Log):
Server TCP provider failed to listen on [ 'any' <ipv4> 1433]. Tcp port is already in use.
TDSSNIClient initialization failed with error 0x2740, status code 0xa. Reason: Unable to initialize the TCP/IP listener. Only one usage of each socket address (protocol/network address/port) is normally permitted.
知道可以用netstat -ano命令查看系統(tǒng)sql server端口的使用情況。檢查后沒有發(fā)現(xiàn)1433端口在使用。
所以直接改了SQL Server的TCP/IP端口。更改辦法如下:
In SQL Server Configuration Manager, expand SQL Server Network Configuration, and then click on the server instance you want to configure.
In the right pane, double-click TCP/IP.
In the TCP/IP Properties dialog box, click the IP Addresses tab.
In the TCP Port box of the IPAll section, type an available port number. For this tutorial, we will use 1500.
Click OK to close the dialog box, and click OK to the warning that the service must be restarted.
In the left pane, click SQL Server Services.
In the right pane, right-click the instance of SQL Server, and then click Restart. When the Database Engine restarts, it will listen on port 1500.
更改后終于可以訪問(wèn)了。
【編輯推薦】