Home Database Mysql Tutorial 远程连接SQLSERVER 2000服务器方法

远程连接SQLSERVER 2000服务器方法

Jun 07, 2016 pm 05:58 PM
sqlserver remote connection

需求如下:需要远程连接外地的SQL Server 2000服务器。

测试条件:一个公网IP,两个静态IP。
  具体步骤:
  一、ping服务器IP能否ping通
  观察远程SQL Server 2000服务器的物理连接是否存在。如果不行,请检查,查看配置,当然得确保远程sql server 2000服务器的IP拼写正确。
  二 在Dos或命令行下输入telnet 服务器IP 端口,看能否连通
  如telnet 202.114.100.100 1433
  通常端口值是1433,因为1433是SQL Server 2000的对于Tcp/IP的默认侦听端口。如果有问题,通常这一步会出问题。通常的提示是“……无法打开连接,连接失败"。
  如果这一步有问题,应该检查以下选项。
  1.检查远程服务器是否启动了sql server 2000服务。如果没有,则启动。
  2.检查服务器端有没启用Tcp/IP协议,因为远程连接(通过因特网)需要靠这个协议。检查方法是,在服务器上打开 开始菜单->程序->Microsoft SQL Server->服务器网络实用工具,看启用的协议里是否有tcp/ip协议,如果没有,则启用它。
  3.检查服务器的tcp/ip端口是否配置为1433端口。仍然在服务器网络实用工具里查看启用协议里面的tcp/ip的属性,确保默认端口为1433,并且隐藏服务器复选框没有勾上。
  事实上,如果默认端口被修改,也是可以的,但是在客户端做telnet测试时,写服务器端口号时必须与服务器配置的端口号保持一致。如果隐藏服务器复选框被勾选,则意味着客户端无法通过枚举服务器来看到这台服务器,起到了保护的作用,但不影响连接,但是Tcp/ip协议的默认端口将被隐式修改为2433,在客户端连接时必须作相应的改变。
  4.如果服务器端打过sp2补丁,则要对windows作一定的配置,要对它开放1433端口,通常在测试时可以直接关掉windows防火墙(其他的防火墙也关掉最好)。
  5.检查服务器是否在1433端口侦听。如果服务器没有在tcp连接的1433端口侦听,则是连接不上的。检查方法是在服务器的dos或命令行下面输入netstat -a -n 或者是netstat -an,在结果列表里看是否有类似 tcp 127.0.0.1 1433 listening 的项。如果没有,则通常需要给sql server 2000打上至少sp3的补丁。其实在服务器端启动查询分析器,输入 select @@version 执行后可以看到版本号,版本号在8.0.2039以下的都需要打补丁。
  如果以上都没问题,这时你再做telnet 服务器ip 1433 测试,将会看到屏幕一闪之后光标在左上角不停闪动。恭喜你,你马上可以开始在企业管理器或查询分析器连接了。
  三、检查客户端设置
  程序->Microsoft SQL Server -> 客户端网络使用工具。像在服务器网络实用工具里一样,确保客户端tcp/ip协议启用,并且默认端口为1433(或其他端口,与服务器端保持一致就行)。
  四、在企业管理器里或查询那分析器连接测试
  企业管理器->右键SQlserver组->新建sqlserver注册->下一步->写入远程IP->下一步->选Sqlserver登陆->下一步->写入登陆名与密码(sa,password)->下一步->下一步->完成
  查询分析器->文件->连接->写入远程IP->写入登录名和密码(sa,password)->确定
  通常建议在查询分析器里做,因为默认情况下,通过企业管理器注册另外一台SQL Server的超时设置是4秒,而查询分析器是15秒。
  修改默认连接超时的方法:
  企业管理器->工具->选项->在弹出的"SQL Server企业管理器属性"窗口中,点击"高级"选项卡->连接设置->在 登录超时(秒) 后面的框里输入一个较大的数字
  查询分析器->工具->选项->连接->在 登录超时(秒) 后面的框里输入一个较大的数字
  通常就可以连通了,如果提示错误,则进入下一步。
  五、错误产生的原因通常是由于SQL Server使用了"仅 Windows"的身份验证方式,因此用户无法使用SQL Server的登录帐户(如 sa )进行连接。解决方法如下所示:
  1.在服务器端使用企业管理器,并且选择"使用 Windows 身份验证"连接上 SQL Server。
  2.展开"SQL Server组",右键点击SQL Server服务器的名称,选择"属性",再选择"安全性"选项卡。
  3.在"身份验证"下,选择"SQL Server和 Windows "。
  4.重新启动SQL Server服务。(在dos或命令行下面net stop mssqlserver停止服务,net start mssqlserver启动服务,也是一种快捷的方法)。
  注释:在连接本地服务器时,通常使用的是命名管道协议(在服务器网络实用工具里可以看到启用的协议有这个),默认端口是445,因此在本地能连通是不能说明什么问题的,连接远程服务器是完全不同的协议),再次连接,显示连接成功。
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to solve the problem that the object named already exists in the sqlserver database How to solve the problem that the object named already exists in the sqlserver database Apr 05, 2024 pm 09:42 PM

For objects with the same name that already exist in the SQL Server database, the following steps need to be taken: Confirm the object type (table, view, stored procedure). IF NOT EXISTS can be used to skip creation if the object is empty. If the object has data, use a different name or modify the structure. Use DROP to delete existing objects (use caution, backup recommended). Check for schema changes to make sure there are no references to deleted or renamed objects.

How to import mdf file into sqlserver How to import mdf file into sqlserver Apr 08, 2024 am 11:41 AM

The import steps are as follows: Copy the MDF file to SQL Server's data directory (usually C:\Program Files\Microsoft SQL Server\MSSQL\DATA). In SQL Server Management Studio (SSMS), open the database and select Attach. Click the Add button and select the MDF file. Confirm the database name and click the OK button.

What to do if the sqlserver service cannot be started What to do if the sqlserver service cannot be started Apr 05, 2024 pm 10:00 PM

When the SQL Server service fails to start, here are some steps to resolve: Check the error log to determine the root cause. Make sure the service account has permission to start the service. Check whether dependency services are running. Disable antivirus software. Repair SQL Server installation. If the repair does not work, reinstall SQL Server.

How to check sqlserver port number How to check sqlserver port number Apr 05, 2024 pm 09:57 PM

To view the SQL Server port number: Open SSMS and connect to the server. Find the server name in Object Explorer, right-click it and select Properties. In the Connection tab, view the TCP Port field.

How to recover accidentally deleted database in sqlserver How to recover accidentally deleted database in sqlserver Apr 05, 2024 pm 10:39 PM

If you accidentally delete a SQL Server database, you can take the following steps to recover: stop database activity; back up log files; check database logs; recovery options: restore from backup; restore from transaction log; use DBCC CHECKDB; use third-party tools. Please back up your database regularly and enable transaction logging to prevent data loss.

Where is the sqlserver database? Where is the sqlserver database? Apr 05, 2024 pm 08:21 PM

SQL Server database files are usually stored in the following default location: Windows: C:\Program Files\Microsoft SQL Server\MSSQL\DATALinux: /var/opt/mssql/data The database file location can be customized by modifying the database file path setting.

How to delete sqlserver if the installation fails? How to delete sqlserver if the installation fails? Apr 05, 2024 pm 11:27 PM

If the SQL Server installation fails, you can clean it up by following these steps: Uninstall SQL Server Delete registry keys Delete files and folders Restart the computer

How to create a win10 remote connection shortcut on the desktop How to create a win10 remote connection shortcut on the desktop Jan 02, 2024 pm 02:47 PM

When using the remote connection function of win10, many users said that it is too slow to open using commands or other methods. Why is this remote connection function placed on the desktop? Come and take a look at the detailed tutorial ~ How to place win10 remote connection on the desktop: 1. In the start menu, expand the folder and find it. 2. Then we hold down the mouse, drag it to a blank space on the desktop, and let go. 3. Then connect the remote desktop and it will be on the computer desktop. Related articles: win10 remote connection win7 cannot connect >>> win10 remote connection prompts function error >>>

See all articles