0

I am currently working on replication using snapshot agent. I am using windows integrated security to connect to the db.

Within my c# application i need to check if the user has permissions to run the snapshot agent using their active directory permissions.

Is there a way to achieve this?

Cheers

tjhack
  • 1,022
  • 3
  • 20
  • 43
  • There's an answer about how to get all security permissions in SQL server here: http://stackoverflow.com/questions/7048839/sql-server-query-to-find-all-permissions-access-for-all-users-in-a-database . I'm sure you can study the query results and filter the one you want :-) – Jcl Jan 22 '15 at 16:00
  • Cheers will have a read but not sure how this works with windows authentication – tjhack Jan 22 '15 at 16:03
  • I'm admittedly no expert, but AFAIK, every windows user allowed to be authenticated should have a corresponding login account in the SQL Server database, wouldn't it? Permissions for that login is what you should be checking, if i'm not mistaken. There's T-SQL's `SUSER_NAME()` to find the current login – Jcl Jan 22 '15 at 16:06

0 Answers0