我之前在XP上有一个应用程序,我必须在Win7、SQL Server2008Express和VSC#上重新启动它。
我有一个可以执行以下命令的用户
SELECT * INTO dbo.[CARD DEF GENERAL POINT]
FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0',
'C:\Users\E151624\Documents\TagConversionRefFiles\Card Def.accdb';'admin';'',[CARD DEF GENERAL POINT])用户从VSC#应用程序连接,可以运行上面的查询。在重新创建用户时,它没有从程序或SQL查询窗口运行此查询的权限。当前用户是具有dbo权限的SQL身份验证用户,但此用户显然没有访问C:驱动器上的文件的权限。我尝试创建一个windows用户,但即使拥有该用户的管理员权限,它仍然无法工作,所以我一定是做错了什么(我不记得XP中的用户配置是什么了)。
顺便说一句,启用即席查询:
name minimum maximum config_value run_value
access check cache bucket count 0 16384 0 0
access check cache quota 0 2147483647 0 0
Ad Hoc Distributed Queries 0 1 1 1
affinity I/O mask -2147483648 2147483647 0 0
affinity mask -2147483648 2147483647 0 0
Agent XPs 0 1 0 0
allow updates 0 1 0 0
awe enabled 0 1 0 0
blocked process threshold (s) 0 86400 0 0
c2 audit mode 0 1 0 0
clr enabled 0 1 0 0
cost threshold for parallelism 0 32767 5 5
cross db ownership chaining 0 1 0 0
cursor threshold -1 2147483647 -1 -1
Database Mail XPs 0 1 0 0
default full-text language 0 2147483647 1033 1033
default language 0 9999 0 0
default trace enabled 0 1 1 1
disallow results from triggers 0 1 0 0
filestream access level 0 2 0 0
fill factor (%) 0 100 0 0
ft crawl bandwidth (max) 0 32767 100 100
ft crawl bandwidth (min) 0 32767 0 0
ft notify bandwidth (max) 0 32767 100 100
ft notify bandwidth (min) 0 32767 0 0
index create memory (KB) 704 2147483647 0 0
in-doubt xact resolution 0 2 0 0
lightweight pooling 0 1 0 0
locks 5000 2147483647 0 0
max degree of parallelism 0 64 0 0
max full-text crawl range 0 256 4 4
max server memory (MB) 16 2147483647 2147483647 2147483647
max text repl size (B) -1 2147483647 65536 65536
max worker threads 128 32767 0 0
media retention 0 365 0 0
min memory per query (KB) 512 2147483647 1024 1024
min server memory (MB) 0 2147483647 0 8
nested triggers 0 1 1 1
network packet size (B) 512 32767 4096 4096
Ole Automation Procedures 0 1 0 0
open objects 0 2147483647 0 0
optimize for ad hoc workloads 0 1 0 0
PH timeout (s) 1 3600 60 60
precompute rank 0 1 0 0
priority boost 0 1 0 0
query governor cost limit 0 2147483647 0 0
query wait (s) -1 2147483647 -1 -1
recovery interval (min) 0 32767 0 0
remote access 0 1 1 1
remote admin connections 0 1 0 0
remote login timeout (s) 0 2147483647 20 20
remote proc trans 0 1 0 0
remote query timeout (s) 0 2147483647 600 600
Replication XPs 0 1 0 0
scan for startup procs 0 1 0 0
server trigger recursion 0 1 1 1
set working set size 0 1 0 0
show advanced options 0 1 1 1
SMO and DMO XPs 0 1 1 1
SQL Mail XPs 0 1 0 0
transform noise words 0 1 0 0
two digit year cutoff 1753 9999 2049 2049
user connections 0 32767 0 0
user instance timeout 5 65535 60 60
user instances enabled 0 1 1 1
user options 0 32767 0 0
xp_cmdshell 0 1 1 1发布于 2012-08-29 00:21:01
SQL Server的权限设置相当复杂。
我可能弄错了,但我认为访问本地或网络驱动器的权限是基于SQL Server进程本身的所有者的。如果转到“控制面板”-->“管理工具”-->“服务”,请查找MSSQL作为服务。这是数据库的监听进程。
其中一列是“登录身份”。即需要文件系统权限的用户。
发布于 2016-04-26 02:00:49
这个问题和this question一样。
但是,请注意,如果您使用的不是Jet提供程序,而是ACE提供程序(就像我一样),则必须将该值放在该提供程序的键下。
https://stackoverflow.com/questions/12163161
复制相似问题