Generate Permission script for an object or all object

In the DBA world it’s necessary to pickup permissions for an object for all objects when he\she deploys the code. During deployment if the code has DROP and CREATE then it’s obvious that what ever permission you have assigned to that object will get lost so as a first step you need to script out… Continue reading Generate Permission script for an object or all object

Script to Retrieve Security Information – SQL Server 2012 (Denali) and above

SQL Server 2012 codenamed SQL Server Denali is on the way to market by 2012. As you all know SQL Server 2012 has new features related to security, we have contained database where you are allowed to create contained users and the next feature is server level roles, other security features are not related to… Continue reading Script to Retrieve Security Information – SQL Server 2012 (Denali) and above

What happens when permission is revoked in middle of work?

This is one of the question asked by my friend and it seems very simple. I had a discussion with him and said that whatever the transaction it has started it will succeeded, however what I told him is not correct. I told him I’ll test it out and the answer which I gave it… Continue reading What happens when permission is revoked in middle of work?

Change Transfer Schema for all Objects

In my working environment we will be using different schema for production and development environments. Our development apps are configured to Dev schema and Production apps are configured to Prod schema, so when we restore the db from production to development environment, all our dev apps stopped working since the objects securable will be using… Continue reading Change Transfer Schema for all Objects