Table of the statements run and whether the user Nia can read Books and Loans after each one, with 1 for yes and 0 for no: 0: Books 0 Loans 0, 1: Books 1 Loans 1, 2: Books 1 Loans 0, 3: Books 1 Loans 1, 4: Books 1 Loans 0, 5: Books 1 Loans 0, 6: Books 1 Loans 1, 7: Books 0 Loans 1, 8: Books 0 Loans 0

Effective Permissions in SQL Server: When GRANT, DENY and REVOKE Meet

Effective permissions are what a user can do after every GRANT, DENY and REVOKE has been added together. This post follows one user through eight statements, with a role, a direct DENY and a direct GRANT, and checks the result after each step with HAS_PERMS_BY_NAME. It then shows how to take away one ability from a user who holds CONTROL. Every result comes from SQL Server 2025.

Read More
Table of the five xml methods, what each returns and the result in this post: query() returns xml, value() returns an int you choose, exist() returns a bit, modify() changes the XML, and nodes() returns 5 rows from 2 documents

XML Data Type Methods in SQL Server: query, value, exist, modify and nodes

XML data type methods are the five functions you call on an xml column or variable: query(), value(), exist(), modify() and nodes(). Each gives back a different kind of answer: xml, a typed value, 1 or 0, a changed document or rows. This post runs all five on one small table of seeds, shows two common errors, and asks SQL Server what each method returns. Every result comes from SQL Server 2025.

Read More
Four SQL error actions shown as rows of steps: statement termination skips only the failing step, scope abortion skips the rest of one procedure, batch termination skips everything after the error, and connection termination drops the session

SQL Error Actions: What SQL Server Does After an Error

SQL error actions decide what runs after an error in SQL Server. This post shows statement termination, scope abortion, batch termination, connection termination and XACT_ABORT, with real results from three small stored procedures. It also covers what each reaction does to an open transaction and how TRY…CATCH changes the outcome.

Read More