DBCC USEROPTIONS returns the Set Option and Value for a variety of SET options, including implicit_transactions.If implicit_transactions is set to OFF, then it is not returned.Checking (but not setting) for this value programatically can be achieved byDECLARE @IMPLICIT_TRANSACTIONS VARCHAR(3) = 'OFF'IF ( (2 & @@OPTIONS) = 2 ) SET @IMPLICIT_TRANSACTIONS = 'ON';SELECT @IMPLICIT_TRANSACTIONS AS IMPLICIT_TRANSACTIONS
↧