SQL Server knows two types of security principals: The login or server principal and the database user or database principal. Read on to learn more about the server principal.
The Principle of Least Privilege tells us to always grant only the minimal set of permissions to any user. Read on to see what this means in the context of SQL Server.
Abstract The APPLY operator was introduced with SQL Server 2005. It is an extension to the SQL Standard with the main purpose to allow us to join to a table valued function. But there is more to discover… In this [more…]
The MERGE statement was introduced into the SQL Standard with SQL2003 and into SQL Server with version 2008. SQL Server goes far beyond the standard and implements the MERGE statement as a very powerful combination of the three statements INSERT, UPDATE and DELETE.
In this talk I am going to show five use cases that you might not have thought of before. We will also cover some issues that you must be aware of to avoid problems when using the MERGE statement.
Even if you follow security best practices to minimize the risk when setting a database to TRUSTWORTHY, if you use it to allow assemblies external access you are opening up another security hole. Read on to learn more.
Why is the TRUSTWORTHY db option so dangerous? This second post on that topic shows how that “trust” can be misused to elevate a login to be a sysadmin.
Do you, like most people, think that a clustered index seek is always better than a clustered index scan? If so, you need to read this post. You might just be in for a big surprise.
Abstract You probably know that indexes make you queries faster. But do you know why? Knowing how the different index types work under the covers will help you make the right decisions when (re-)designing you indexing strategy. After attending this [more…]
Do you know what the TRUSTWORTHY database property does to your stored procedure security? Read on to learn more about the behavior of this commonly misunderstood database property.
One of the most often encountered concurrency problems in T-SQL code happens in the Insert or Use scenario in which a new row is inserted if it does not exist yet and afterwards the primary key of the existing or the new row is returned. One of the easiest and safest ways to get this right is provided by the MERGE statement.