Category Archives: Security

SQL Agent jobs, linked servers and minimal privileges

Basically, this issue is all described here… https://support.microsoft.com/en-us/kb/2492477 In a nutshell, a T-SQL job executes in the context of the job owner. If the job owner is sa or another member of the sysadmin role is is able to make … Continue reading

Posted in Security, T-SQL, Tips | Comments Off on SQL Agent jobs, linked servers and minimal privileges

generate permissions for a role

This script will generate all the permissions that a role or all roles have… SELECT state_desc COLLATE Latin1_General_CI_AS + ‘ ‘ + permission_name COLLATE Latin1_General_CI_AS + ‘ ON ‘ + ‘[‘ + SCHEMA_NAME(schema_id) + ‘].’ + ‘[‘ + OBJECT_NAME(object_id) + … Continue reading

Posted in Security | Comments Off on generate permissions for a role

role based security

I’m a strong believer of role based security and today proved my point. In a server migration that we have underway, I migrated what I thought was all the permissions for this particular login. As it turned out, someone in … Continue reading

Posted in Security | Comments Off on role based security