SQL Server不存在或访问被拒绝 [英] SQL Server does not exist or access denied

查看:207
本文介绍了SQL Server不存在或访问被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




您是否正在使用SQL Server的命名实例?

首先检查您是否可以连接到SQL Server

SQL Enterpraise经理

HTH

Ravikanth

Hi

Are you using named instances of SQL Server?
First check whether u r able to connect to SQL Server to
SQL Enterpraise manager
HTH
Ravikanth

-----原始消息-----
我在我的开发
机器(Win2K,.NET框架)上运行asp.net应用程序。这个编程连接到
aSQL服务器(在另一台机器上)。
当我运行以下代码时,它会出现
followmessage错误:SQL Server不存在或访问被拒绝

Dim strConnect As String = Application(CONN)
Dim cnIntranet As New SqlConnection(strConnect)
尝试
cnIntranet.Open()
Catch ex As SqlException
Response.Write(ex.Message&"< BR>")
返回
结束尝试

''在哪里
' '应用程序(CONN)
=" server = servername; database = dbname; uid = loginname; p wd = ab
cdefg"

但是如果我复制了项目直到生产
内联网服务器(Win2k)它工作正常(指向相同的SQL服务器,因为它不工作)。
我没有做任何事情允许$​​ b $ b从生产Intranet服务器访问的SQL服务器,但它在那里工作,但不在我的本地IIS。

我知道这可能是一个基本的安全措施问题但是搜索了互联网后我找不到了解决方案。

问候
-----Original Message-----
I am running an asp.net application on my development
machine (Win2K, .NET framework). This prog connects to aSQL Server (on another machine).
When I run the following code it errors with the followingmessage: "SQL Server does not exist or access denied"

Dim strConnect As String = Application("CONN")
Dim cnIntranet As New SqlConnection(strConnect)
Try
cnIntranet.Open()
Catch ex As SqlException
Response.Write(ex.Message & "<BR>")
Return
End Try

''Where
''Application("CONN")
= "server=servername;database=dbname;uid=loginname;p wd=ab cdefg"

However if I copy the project up to the production
Intranet server (Win2k) it works fine (pointing at the
same sql server as when it doesn''t work).
I haven''t done anything on the SQL server to allow accessfrom the production Intranet server but it works from
there, but not my local IIS.

I know this is probably a basic security problem but
having searched the internet I can''t find a soln.

Regards
.


推荐答案

感谢您的回复。我可以通过许多其他方式连接到这个sql server

(查询分析器,企业mgr和

从生产运行时也是相同的.net应用程序

服务器)。只有当我从LOCAL运行它时,它才会没有工作。

如果通过命名实例你的意思是使用与IP地址相对的实际名称

?然后是的,我正在使用服务器的实际名称


Thanks for reply. I am able to connect to this sql server
by many others means (query analyzer, enterprise mgr and
also the same .net app when running from production
server). It''s only when I run it from LOCAL iis it doesn''t
work.
If by "named instance" you mean using the actual name as
opposed to IP address? then yes, I''m using the actual name
of the server.
-----原始消息-----


您是否使用SQL Server的命名实例?
首先检查您是否能够连接到SQL Server以获得SQL Enterpraise管理器

HTH
Ravikanth
-----Original Message-----
Hi

Are you using named instances of SQL Server?
First check whether u r able to connect to SQL Server to
SQL Enterpraise manager
HTH
Ravikanth



感谢您的回复。我可以通过许多其他方式连接到这个sql server

(查询分析器,企业mgr和

从生产运行时也是相同的.net应用程序

服务器)。只有当我从LOCAL运行它时,它才会没有工作。

如果通过命名实例你的意思是使用与IP地址相对的实际名称

?然后是的,我正在使用服务器的实际名称


Thanks for reply. I am able to connect to this sql server
by many others means (query analyzer, enterprise mgr and
also the same .net app when running from production
server). It''s only when I run it from LOCAL iis it doesn''t
work.
If by "named instance" you mean using the actual name as
opposed to IP address? then yes, I''m using the actual name
of the server.
-----原始消息-----


您是否使用SQL Server的命名实例?
首先检查您是否能够连接到SQL Server以获得SQL Enterpraise管理器

HTH
Ravikanth
-----Original Message-----
Hi

Are you using named instances of SQL Server?
First check whether u r able to connect to SQL Server to
SQL Enterpraise manager
HTH
Ravikanth



这篇关于SQL Server不存在或访问被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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