A list of my best articles so far, from killing all processes in a database and shrinking the log file to deleting duplicate rows and UNION vs UNION ALL.
SQL SERVER – 2005 – Get Current User – Get Logged In User
How to get current user for a query in SQL Server 2005: SELECT SYSTEM_USER returns the name of the current context, which helps with debugging and security.
SQL SERVER – Get Permissions of My Username / Userlogin on Server / Database
Invited to review a big company’s schema, I wanted to know my own permissions without asking their DBA. fn_my_permissions shows them at server and database level.
SQL SERVER – 2005 – SQL Server Surface Area Configuration Tool Examples and Explanation
SQL Server 2005 ships with risky features off. The Surface Area Configuration tool turns them on or off, and here is what replaced it later.
SQL SERVER – Frequency of SQL Server Reboot and Restart
How often should you do a SQL Server reboot? From my experience there is no need, though our network team reboots all our servers every 15 days.
Orphaned Users After a Restore, and How to Fix Them
Find orphaned users after a SQL Server restore, compare user and login SIDs, and repair the intended mapping with ALTER USER.







