Vb.net SQL数据库连接错误26 [英] Vb.net SQL database connection error 26

查看:80
本文介绍了Vb.net SQL数据库连接错误26的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

用户有一些测试代码连接到远程服务器上的非生产SQL Express数据库,它运行正常但现在却出现连接错误26



连接字符串很好



User had some test code connecting to a non production SQL Express database on a remote server, it was running fine but now they get a connection error 26

The connection string is fine

Dim SQLstr As String = "server=testserver\SQLEXPRESS;uid=testuser;pwd=testpassword;database=test"





什么我试过了:



经过大量测试后我确定用户是否在Domain Administrators组中,代码是否按预期工作并且连接正常是的,我甚至把数据库附加到一个新的SQL Express实例服务器



困惑这个



What I have tried:

After a lot of testing I've determined if the user is in the Domain Administrators group the code works as intended and the connection is made, I've even went as far as attaching the database to a new server with a new instance of SQL Express

Baffled with this one

推荐答案

你应该谷歌它。 LMGTFY [ ^ ]





有吨在那里有资源,这里有几个



无法连接到SQL Express错误:26错误查找指定的服务器/实例) - 堆栈溢出 [ ^ ]



SQL的原因服务器错误26并知道如何修复错误26 [ ^ ]



SQL网络接口,错误:26 - 查找服务器/实例时出错指定 - SQL协议 [ ^ ]
You should Google it. LMGTFY[^]


There are tons of resources out there, here are a few

Unable to connect to SQL Express "Error: 26-Error Locating Server/Instance Specified) - Stack Overflow[^]

Reasons of SQL Server Error 26 and know how to fix Error 26[^]

SQL Network Interfaces, error: 26 – Error Locating Server/Instance Specified – SQL Protocols[^]


我用Google搜索了它,就像我在OP中所说的那样,它运行时没有问题然后它刚停止工作,代码只适用于域管理员(代码运行给我)但不适用于域用户

我已经尝试删除GPO以查看是否是最近的更改但没有任何内容,没有任何更改据我所知,在SQL服务器实例上。



我甚至试过一台新服务器,也许这与未加入域名有关



端口查询说一切正常,所有服务都在运行 - 它处于混合模式,TCPIP是e nabled



不知道它是什么,因此我在这里发帖:)
I have Googled it, like I said in OP it was running without issues and then it just stopped working, the code only works for Domain admins (The code runs for me) But not for domain users
I've tried removing GPO's to see if was a recent change but nothing, nothing was changed as far as I know on the SQL server instance.

I even tried a new server, maybe it's something to do with not being domain joined

Port query says everything is fine, all services are running - it's in mixed mode, TCPIP is enabled

No idea what it is, hence me posting here :)


这篇关于Vb.net SQL数据库连接错误26的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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