There are various statements and system procedures that can't be executed within a transaction, with an error message of "not allowed..." (e.g., create database
) or "cannot be executed..." (e.g., exec sp_addrole
).
Is there a rule or set of rules that would indicate whether a given procedure/statement isn't allowed in a transaction? Is there a listing thereof?