访问DSN的访问限制是什么 [英] What are the access restrictions on accessing a DSN

查看:93
本文介绍了访问DSN的访问限制是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在将应用程序的一部分作为Windows服务运行,它需要能够访问DSN才能通过ODBC导入.但是,通过反复尝试,似乎可以访问哪些DSN受到很多限制.例如,似乎它不能 1.除非正在运行该服务的帐户具有管理员特权,否则请访问系统DSN. (尝试连接时出现访问被拒绝"错误) 2.访问由其他用户创建的用户DSN(这是可以理解的). 3.通过网络访问文件DSN

We are running part of our app as a windows service and it needs to b able to access DSNs in order to import through ODBC. However there seem to be a lot of restrictions found through trial and error on what DSNs it can access. For example it seems that it cannot 1. access a system DSN unless the account that is running the service has admin privileges. (I get an Access Denied error, when trying to connect) 2. access a user DSN that was created by a different user (this one is understandable). 3. access a file DSN across the network

我已经读过文件DSN的目的是允许其他计算机使用它来连接,但是我似乎无法使它工作.

I've read that the purpose of a file DSN is to allow other computers to use it to connect, however i can't seem to make that work.

任何人都知道,或者知道在哪里可以找到使用Windows服务时访问DSN的所有规则和限制. 谢谢

So does any know, or know where i can find out what all the rules and restrictions on accessing a DSN are when using a windows service. thanks

推荐答案

这在您的#1和#2之间:有时也需要正确的文件权限.我曾经在连接DB2 DSN的Vista机器上遇到麻烦,因为无论出于什么原因(也许写出临时文件;尽管我不知道为什么它会在此位置而不是用户特定的位置上执行这种操作) ,驱动程序需要对IBM安装了客户端二进制文件和库的目录的写访问权,该目录由管理员完成,并且位于C驱动器的根目录中.

This is somewhere between your #1 and #2: sometimes correct file permissions are also necessary. I once had troubles on a Vista machine connecting to a DB2 DSN because, for whatever reason (maybe to write out temp files; although I don't know why it would do such a thing in this location instead of a user-specific one), the driver needed write access to the directory where IBM had installed the client binaries and libs, which had been done by an Administrator and was in the root of the C drive.

这篇关于访问DSN的访问限制是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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