Uncategorized

Limiting permissions with “Execute as” when using dynamic SQL

When using dynamic SQL there is always the possibility that someone will inject SQL that does harm. They can put queries that can drop objects or can create sysadmin logins. Running the scripts as low permission users can reduce the potential harm. But that takes time to research and is easy to cut. You can

Limiting permissions with “Execute as” when using dynamic SQL Read More »

SSIS Token Function

Microsoft quietly added two functions to their SSIS expression language: Token and TokenCount. I think that these functions will find their way into any serious SSIS developer’s tool belt. Here I show how you can use this to solve a very common problem, interpreting dates. When importing data, frequently one column of data will need

SSIS Token Function Read More »

Deny select on table Grant select on columns

There is a little warning in books-on-line about the interaction of Deny and Grant (http://msdn.microsoft.com/en-us/library/ms173724.aspx).  “A table-level DENY does not take precedence over a column-level GRANT. This inconsistency in the permissions hierarchy has been preserved for backward compatibility.” However, I found a little caveat to this point.  The order in which you issue the GRANT and

Deny select on table Grant select on columns Read More »