连接远程数据库时的问题,为什么老超时?

linuxuer 2003-09-07 02:24:11
sqlserver 2000
连接一个sql数据库webdb,其位于202.15*.14*.27
客户端网络设置为:202.112.149.27/webdb,有问题吗?\or /?
然后老超时,或者提示连接失败,请检查sqlserver的注册属性,
可是我的注册属性应该没有问题啊,什么用户名密码都有了.....是不是服务器段的设置有问题?
还有可能那里的问题?
谢了
...全文
149 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
happydreamer 2003-09-07
  • 打赏
  • 举报
回复
选中Microsoft SQL Servers-->工具栏,工具-->选项-->高级-->查询超时-->改为0

选中Microsoft SQL Servers-->工具栏,工具-->选项-->高级-->连接超时-->改为0


  ado的:
NonnectionTimeout 属性连接时间长一点;
CommandTimeout 属性执行时间长一点!
zjcxc 2003-09-07
  • 打赏
  • 举报
回复
贴出代码来看看
linuxuer 2003-09-07
  • 打赏
  • 举报
回复
to lionstar:我在客户段的输入有什么问题?
指教
linuxuer 2003-09-07
  • 打赏
  • 举报
回复
没有什么代码
就是用sql server连接数据库啊
哪里设置可能有问题,是不是服务器段的问题?
lionstar 2003-09-07
  • 打赏
  • 举报
回复
不管你使用什么方式连接数据库,你都需要在客户端确定数据库的地址:sql数据库webdb,其位于202.15*.14*.27,而不是像你在客户端的输入。
祝你好运!!!!
saucer 2003-09-07
  • 打赏
  • 举报
回复
show your connection or use something like (xxx.xxx.xxx.xxx is an IP address
, 1433 is the default port number for SQL Server, see
http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLEDBProviderForSQLServer
)

oConn.Open "Provider=sqloledb;" & _
"Network Library=DBMSSOCN;" & _
"Data Source=xxx.xxx.xxx.xxx,1433;" & _
"Initial Catalog=myDatabaseName;" & _
"User ID=myUsername;" & _
"Password=myPassword"


1. make sure the firewall on the server is properly configured
2. make sure you enabled the TCP/IP protocol on the server
3. try to connect to the remote server in SQL Analyzer to make sure you indeed can connect

27,579

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server 应用实例
社区管理员
  • 应用实例社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧