SQL Server MVP
Erland Sommarskog is an independent consultant based in Stockholm. He has worked with SQL Server since 1991 and he was first awarded Microsoft MVP for SQL Server in 2001. He specialises in system development with SQL Server Database Engine and has a passion for making systems robust.
You probably know that with a stored procedure you can permit users to access or update data even if they have no direct permissions on the table. However, this does not work with dynamic SQL. Likewise, say that you for instance want power users be table to see who are connected to their database without seeing any other sessions. […]
In an ideal world, we would not need any error handling, because there would be no errors. But in the real world we need to have error handling in our stored procedures. Error handling in SQL Server is a most confusing topic, because there are such great inconsistencies. But that does not mean that we as database developers can hide […]