MSSQLSM 2008奇数登录在选择语句上失败 [英] MSSQLSM 2008 odd login failed on select statement
问题描述
我的SQL服务器上有很多用户,所有用户都可以登录到该服务器;但是,一个用户一旦登录,便无法在特定视图上运行任何内容(选择,更改,编辑),但可以在其余所有视图上运行.
I have a variety of users on my SQL server, all of which CAN login to the server; however one user, once logged in cannot run anything (select, alter, edit) on a specific view - but can on all the rest.
用户设置与具有完全访问权限的另一个帐户相同(严重的是,它们完全相同).对于无法从其视图中选择等的用户,我会收到此错误:
The user settings are the same as another account that has full access (seriously they are identical). For the user that cannot select etc fromt his view i get this error:
SELECT Top 1 * From View
Msg 18456, Level 14, State 1, Line 1
Login failed for user 'some user'.
但是,当我尝试执行此操作
however when i try and do this
select top 1 * from view2
我收到此错误:
Msg 2809, Level 18, State 1, Line 1
The request for procedure 'View2' failed because 'view2' is a view object.
但是当我删除前1个并完美运行时,它又消失了:
but again this disappears when i remove the top 1 and works perfectly:
select * from View2
所以我遇到了三个冲突的问题..当我在第一个视图中执行select * from every view
条时,当我从相同的视图中执行select top 1 *
时,它将不起作用,并且当我尝试任何操作时(选择,更改,编辑)从第一个视图开始,即使我已经登录,我仍然遇到登录错误.
So im having three conflicting problems.. when i do a select * from every view
bar the first view it works, when i do select top 1 *
from those same views it doesn't work, and when i try anything (select, alter, edit) from the first view i get a login error even though i'm already logged in.
我已经尝试删除并重新创建用户-祝您好运.我也尝试在事件查看器中查找,但找不到与登录错误有关的任何日志消息.
I have already tried to drop and recreate the user - no luck. I have also tried looking in the event viewer and cannot find any log messages relating to the login error.
我在对象资源管理器中找不到安全>审核文件夹以进行检查,但是当我检查管理> SQL Server日志时,也没有找到任何内容.
I cannot find the security > audit folder in object explorer to check there, but when i check the management > SQL Server Logs i find nothing in there either..
任何帮助都非常感谢,因为到目前为止我发现的所有事情都与无法实际登录服务器句号有关.
Any help is much appreciated as everything i have found so far is relating to not being able to actually log into the server full stop..
推荐答案
您可能也有
-
链接的服务器问题.也就是说,视图访问登录映射不正确的链接服务器
linked server issues. That is, the views access a linked server where the login mapping is incorrect
您在不同的架构中有2个视图.您使用select * from view
还是select * from dbo.view
:您是否一致?
You have 2 views in different schemas. Do you use select * from view
or select * from dbo.view
: are you consistent?
这篇关于MSSQLSM 2008奇数登录在选择语句上失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!