October 25, 2017 at 8:10 am
Hi Experts,
Need some infomrtion how to overcome this issue. I have a daily job which scans the user login info. i am getting the below error while the job is executing.
The SELECT permission was denied on the object 'syslogins', database 'mssqlsystemresource', schema 'sys'.
the view is in master and the db role is having select permission on the view. still it is routing to 'mssqlsystemresource' database not sure though why.I know that mssqlsystemresource is replaced by resource db which is hidden. but i can see the table/view in master and the db role is having select access to it and user login is tagged to the role. could any one help me on this how can i work on this table.
October 25, 2017 at 8:21 am
This is a SQL Server Agent job, right? What login does it run under?
The syslogins view has been deprecated for six versions now. You should use sys.server_principals instead. Maybe you could post the code?
John
October 25, 2017 at 9:58 am
Hi John,
thank you for the reply, i found the issue. the public role is having deny select checked in the create and grant script.
October 25, 2017 at 10:12 am
ksr39 - Wednesday, October 25, 2017 9:58 AMHi John,
thank you for the reply, i found the issue. the public role is having deny select checked in the create and grant script.
Doesn't change the fact you should consider a rewrite and start using sys.server_principles. The syslogins is provided for backward compatibility to SQL Server 2000. It also could disappear from SQL Server at anytime.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply