简体   繁体   English

SQL Server 连接错误 - 未找到数据源名称且未指定默认驱动程序

[英]SQL Server connection error - Data source name not found and no default driver specified

When running a third party developed EXE located on the shared folder of Windows Server 2012 R2, which connects to SQL Server 2012 Express, the following error occurs:运行位于 Windows Server 2012 R2 共享文件夹中的第三方开发的 EXE 连接到 SQL Server 2012 Express 时,出现以下错误:

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified. [Microsoft][ODBC 驱动程序管理器] 未找到数据源名称且未指定默认驱动程序。

When the EXE is 'Run as Administrator' it works fine.当 EXE 为“以管理员身份运行”时,它工作正常。 But this application interfaces with Office and other programs, so running as administrator puts it into protected memory space that conflicts with other applications.但是这个应用程序与Office和其他程序接口,因此以管理员身份运行会将其放入与其他应用程序冲突的受保护内存空间。 I need it to open normally, as before.我需要它像以前一样正常打开。

This error has only occurred since client workstations had Windows 10 1803 and higher installed.此错误仅发生在客户端工作站安装了 Windows 10 1803 及更高版本之后。 Bizarrely, workstations that updated to 1803 and higher are unaffected.奇怪的是,更新到 1803 及更高版本的工作站不受影响。 Only on new installs has the problem occurred.只有在新安装时才会出现问题。

There was something about 1803 which changed the network stack, client side, that caused a lot of different problems for SQL connections and I have seen a hundred different solutions but none work in our case.有一些关于 1803 的东西改变了客户端的网络堆栈,这导致了 SQL 连接的许多不同的问题,我已经看到了一百种不同的解决方案,但在我们的案例中没有一个工作。

Client machines connect to Server 2012 using domain login accounts.客户端计算机使用域登录帐户连接到 Server 2012。 Each domain user account is given local admin rights and full administrator rights.每个域用户帐户都被授予本地管理员权限和完全管理员权限。 The client workstations are normal Windows 10 Pro install with ESET antivirus.客户端工作站是带有 ESET 防病毒软件的正常 Windows 10 专业版安装。 When testing the ODBC connection, it is successful and works.在测试 ODBC 连接时,它成功并工作。 Only when running the program does the error occur.只有在运行程序时才会发生错误。

On the Server side I have.... Enabled Named Pipes, Disabled and Removed SMB1.0在服务器端我....启用命名管道,禁用和删除 SMB1.0

So what is going on here?那么这里发生了什么? Why from 1803 on must we run as administrator to get a connection?为什么从 1803 开始​​我们必须以管理员身份运行才能获得连接?

Data source name not found未找到数据源名称

I would first check if the Data Source is defined below "User" or "System" .我会首先检查数据源是否在 "User" 或 "System" 下定义。 If it is User for the Administrator there is no way to access it except if the user previously run it by using the option "Run with administrative permission"如果它是管理员的用户,则无法访问它,除非用户之前使用“以管理权限运行”选项运行它

In case it is defined as System DSN likely the user after 1803 does not have enough permission to access the registry where it is stored, so this is the most probable case scenario.如果它被定义为系统 DSN,则 1803 之后的用户可能没有足够的权限访问存储它的注册表,因此这是最可能的情况。

The optimal is to see if you can modify your connection using OLE or something else rather than ODBC so it can be DNSless, eventually try to define a DSN with the same name below User with the same user who is running it that should be read before the framework is going to look for the same DSN name under the system / local machine registry section.最佳做法是查看您是否可以使用 OLE 或其他方式而不是 ODBC 修改您的连接,以便它可以是无 DNS 的,最终尝试在与运行它的用户相同的用户下面定义一个同名的 DSN,应该在之前阅读该框架将在系统/本地机器注册表部分下寻找相同的 DSN 名称。

To troubleshoot deeper registry permission issues you can use the former Sysinternals procmon downloadable from MS website, this must executed using "Run with administrative permission"要解决更深层次的注册表权限问题,您可以使用可从 MS 网站下载的以前的 Sysinternals procmon,这必须使用“以管理权限运行”来执行

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 SQL Server-找不到数据源名称,也未指定默认驱动程序 - SQL Server - data source name not found and no default driver specified R 与 SQL Server 2016 错误“[Microsoft][ODBC 驱动程序管理器] 未找到数据源名称且未指定默认驱动程序” - R with SQL server 2016 error “[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified” 链接服务器“未找到数据源名称且未指定默认驱动程序”错误 - Linked server “Data source name not found and no default driver specified” error ODBC错误-找不到数据源名称,并且未指定默认驱动程序 - ODBC Error - Data source name not found and no default driver specified Python 连接到 SQL 服务器 - PYODBC - SQLAlchemy:未找到数据源名称且未指定默认驱动程序 - Python connect to SQL Server - PYODBC - SQLAlchemy: Data source name not found and no default driver specified 未找到数据源名称,且未指定默认驱动程序 - Data source name not found, and no default driver specified 从C#通过ODBC访问Sql Server:错误[IM002] [Microsoft] [ODBC驱动程序管理器]找不到数据源名称,并且未指定默认驱动程序 - Access to Sql Server via ODBC from C# : ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified pyodbc 连接字符串不起作用 - “未找到数据源名称且未指定默认驱动程序” - pyodbc connection string isn't working - “Data source name not found and no default driver specified” sqlsrv_connect:找不到数据源名称,并且未指定默认驱动程序 - sqlsrv_connect: Data source name not found and no default driver specified 未找到数据源名称且未指定默认驱动程序 nodejs - Data source name not found and no default driver specified nodejs
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM