您的位置:首页 > 数据库

更改 Sql Server 2005 默认端口方法

2009-08-20 16:51 543 查看
在SQL Server 配置管理器中,展开SQL Server 2005的网络配置,然后点击服务器实例如:MSSQLSERVER 的协议。
在右窗格中,双击TCP/IP协议。
在TCP/IP属性对话框中,单击IP地址选项卡。
在TCP端口框中的IPAll节,输入一个可用的端口号。我们将使用1800。
单击确定以关闭该对话框,然后单击确定的警告说,必须重新启动服务。
在左窗格中,单击SQL Server 2005的服务。
在右窗格中,右键单击SQL Server实例如:SQL Server (MSSQLSERVER),然后单击重新启动。当数据库引擎重新启动时,它将侦听端口1800 。

--------------------------------------------------------------------------------

In SQL Server Configuration Manager, expand SQL Server 2005 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 1800.
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 2005 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 1800.

在myeclipse里建数据库的时候就会出现"Network error IOException:Connection refused:connect"的错误,就去网上查找原因..大家说的最大的问题是SQL Server2005的端口1433没有设置,再就是,防火墙是否拦截。

设置默认端口的方法是:程序--SQL Server2005--配置工具--SQL Server Configuration Manager.

点进去会出现一个窗口,SQL Server 配置管理器--SQL Server 2005 网络配置--MSSQLSERVER的协议,将里面的TCP/IP,将他的状态设置为"已启用".再双击看看是不是端口为1433,就OK了.

然后重启一个SQL server服务就全部OK了.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: