远程连接sql服务器的解决方案
远程 连接 sql server 2000 服务器 的 解决 方案 由于特定需求,最近实验室需要 远程 连接 外地的sql server 2000 服务器 ,最开始怎么连也连不上,出现了很多问题,但是在今天上午,借用实验室的测试条件(一个公网IP,两个教育网静态IP),终于调试通过,
远程连接sql server 2000服务器的解决方案
由于特定需求,最近实验室需要远程连接外地的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,因此在本地能连通是不能说明什么问题的,连接远程服务器是完全不同的协议)
再次连接,享受连接成功的喜悦吧,别忘了飞狐小屋哦。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

HQL and SQL are compared in the Hibernate framework: HQL (1. Object-oriented syntax, 2. Database-independent queries, 3. Type safety), while SQL directly operates the database (1. Database-independent standards, 2. Complex executable queries and data manipulation).

"Usage of Division Operation in OracleSQL" In OracleSQL, division operation is one of the common mathematical operations. During data query and processing, division operations can help us calculate the ratio between fields or derive the logical relationship between specific values. This article will introduce the usage of division operation in OracleSQL and provide specific code examples. 1. Two ways of division operations in OracleSQL In OracleSQL, division operations can be performed in two different ways.

Oracle and DB2 are two commonly used relational database management systems, each of which has its own unique SQL syntax and characteristics. This article will compare and differ between the SQL syntax of Oracle and DB2, and provide specific code examples. Database connection In Oracle, use the following statement to connect to the database: CONNECTusername/password@database. In DB2, the statement to connect to the database is as follows: CONNECTTOdataba

Common problems and solutions for OracleNVL function Oracle database is a widely used relational database system, and it is often necessary to deal with null values during data processing. In order to deal with the problems caused by null values, Oracle provides the NVL function to handle null values. This article will introduce common problems and solutions of NVL functions, and provide specific code examples. Question 1: Improper usage of NVL function. The basic syntax of NVL function is: NVL(expr1,default_value).

In network data transmission, IP proxy servers play an important role, helping users hide their real IP addresses, protect privacy, and improve access speeds. In this article, we will introduce the best practice guide on how to build an IP proxy server with PHP and provide specific code examples. What is an IP proxy server? An IP proxy server is an intermediate server located between the user and the target server. It acts as a transfer station between the user and the target server, forwarding the user's requests and responses. By using an IP proxy server

The role of a DHCP relay is to forward received DHCP packets to another DHCP server on the network, even if the two servers are on different subnets. By using a DHCP relay, you can deploy a centralized DHCP server in the network center and use it to dynamically assign IP addresses to all network subnets/VLANs. Dnsmasq is a commonly used DNS and DHCP protocol server that can be configured as a DHCP relay server to help manage dynamic host configurations in the network. In this article, we will show you how to configure dnsmasq as a DHCP relay server. Content Topics: Network Topology Configuring Static IP Addresses on a DHCP Relay D on a Centralized DHCP Server

Common challenges faced by machine learning algorithms in C++ include memory management, multi-threading, performance optimization, and maintainability. Solutions include using smart pointers, modern threading libraries, SIMD instructions and third-party libraries, as well as following coding style guidelines and using automation tools. Practical cases show how to use the Eigen library to implement linear regression algorithms, effectively manage memory and use high-performance matrix operations.

1. Place the earphones in the earphone box and keep the lid open. Press and hold the button on the box to enter the pairing state of the earphones. 2. Turn on the watch music function and select Bluetooth headphones, or select Bluetooth headphones in the watch settings function. 3. Select the headset on the watch to pair successfully.
