建立与SQL Server的连接时发生与网络相关或特定于实例的错误! [英] A network-related or instance-specific error occured while establishing a connection to SQL server !!!!

查看:83
本文介绍了建立与SQL Server的连接时发生与网络相关或特定于实例的错误!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我正在使用VS2010 SQL2008开展项目,我看到了ODD行为,

首先让我说说你在我开发的电脑上运行该应用程序没有任何问题(Windows Xp sp3 32位)



但是当我在另一台电脑上试用该应用程序时(Windows 7 32位)



我得到了这个例外:



网络相关或实例建立与SQL Server的连接时发生了特定错误。找不到服务器或无法访问服务器。确实实例名称正确,并且SQl服务器配置为允许远程连接。





现在这个例外很奇怪;当应用程序到达DataAdpater.Fill(数据集)行时,我得到了这个异常但是当

应用程序到达DataAdpter.Insert(....)它运行没有任何问题。



更奇怪的是,我注意到之前的插入过程中使用的数据集以后可以用dataAdapter.Fill(...)程序填充它给出的我个例外。





现在我希望你能理解我的问题



我尝试了这些东西作为解决方案:



1)检查SQlBrowser正在运行..

2)Sql server根本没有别名删除...

3)远程区域连接 - 确定

4)防火墙中的TCP和UDP端口1433,1434异常

5) Unistalled我唯一的防病毒软件诺顿

6)在Sql协议中添加了Tcp / IP端口

7)我的连接字符串是:onnectionString =Data Source = ALI \ SQLEXPRESS; Initial目录= PALMSDATABASE;集成安全性=真

8)还尝试使用Sql Server身份验证(用户ID和密码)





我的问题是填充和填充之间的区别是什么插入?

我的连接有问题吗?

我的应用程序。在原版电脑上运行顺畅,我该怎么办?

如果有人知道有什么帮助我,我非常绝望。

解决方案

这里有更多理由,所以也尝试这些。在这里你去

SQL Server 2005连接问题疑难解答 [ ^ ]


HI,







GO START - >所有程序 - > SQL SERVER 2008/2005/2008 R2

- > CONFIGURATION TOOLS->

- > SELECT SQL SERVER CONFIGURATION MANAGER

- > ; SELECT SQL SERVER NETWORK CONFIGURATION

- > MSSQLSERVER的选择协议(你的即时名称)

- >在正确的任务面板中

- >请确认以下内容:



禁用共享内存和VIA

启用命名管道和TCP / IP



- 同样的事情

- > SQL NATIVE CLIENT 10.0(服务器版本)配置 - 客户端协议



RESTART SQL SERVER(MSSQLSERVER [你的即时名称])服务


hi


参考此链接

网络相关和实例指定错误的解决方案 [< a href =http://www.aspdotnet-sharepoint.com/2012/04/network-related-or-instance-specific.htmltarget =_ blanktitle =新的Wi ndow> ^ ]

Hello everyone,

I am working on a project using VS2010 SQL2008 and I saw an ODD behaviour ,
First let me tell you that the app runs without any problem in my developing pc (Windows Xp sp3 32bit)

But when I was trying the application in another pc (Windows 7 32bit)

I got this exception:

A network-related or instance-specific error occured while establishing a connection to SQL server.The server was not found or was not accessible.Verfiy that the instance name is correct and that SQl server is configured to allow remote connections.



Now what is weird in this exception; Is when the application reaches the DataAdpater.Fill(dataset) line I got this exception but when
the app reaches the DataAdpter.Insert(....) It runs without any problem .

And what is more weird is that I noticed that the dataset that is used in the previous insert procedure can later be filled with dataAdapter.Fill(...) procedure which it was giving me an exception .


Now I hope you understand my problem

I tried these things as a solution:

1)Checked SQlBrowser running..
2)No aliases to Sql server at all to remove...
3)remote area connection--OK
4)TCP and UDP port 1433,1434 exception in firewall
5)Unistalled my only antivirus Norton
6)Added Tcp/IP ports in Sql protocols
7)My connection String is : onnectionString="Data Source=ALI\SQLEXPRESS;Initial Catalog=PALMSDATABASE;Integrated Security=True"
8)Also tried using Sql Server authentication (user Id and password)


My question is what is the difference between fill and insert?
Is there a problem with my connection?
My app. runs smoothly on the original pc ,What should I do?
Please If anyone knows anything help me, I am very desperate.

解决方案

Here more reasons so try those too. Here you go
SQL Server 2005 Connectivity Issue Troubleshoot[^]


HI,



GO START -> ALL PROGRAMS -> SQL SERVER 2008/2005/2008 R2
->CONFIGURATION TOOLS->
->SELECT SQL SERVER CONFIGURATION MANAGER
->SELECT SQL SERVER NETWORK CONFIGURATION
->SELECT PROTOCOLS FOR MSSQLSERVER(YOUR INSTANT NAME)
->IN RIGHT TASK PANEL
->MAKE SURE MENTION BELOW:

DISABLE SHARED MEMORY AND VIA
ENABLE NAMED PIPE AND TCP/IP

—-MAKE SAME THING IN
->SQL NATIVE CLIENT 10.0(SERVER VERSION) CONFIGURATION – CLIENT PROTOCOLS

RESTART SQL SERVER(MSSQLSERVER [YOUR INSTANT NAME]) SERVICE


hi
refer this link
Solution for a network related and instance specified error[^]


这篇关于建立与SQL Server的连接时发生与网络相关或特定于实例的错误!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆