Blog do EzequielSQL Server Insights
EDIT (20-09-2012) - Added several scripting options; does not use SQL Server 2000 system tables anymore.EDIT (11-01-2013) - Fixed issue with permission syntax depending on version (2005 vs. 2008/2012).EDIT (18-03-2013) - Fixed issue with undeclared variable in cursor; Added options for access.
Here is another posting focusing on SQL scripts that may help on everyday DBA tasks, following the series "SQL Swiss Army Knife". This is another example of a script I've been using as a "local machine" bit of a wider DR strategy, in this case generating all logins and their respective server roles. Note that this does not deal with CERTIFICATE_MAPPED_LOGIN and ASYMMETRIC_KEY_MAPPED_LOGIN types.These are the options available: