Files
sql-snippets/opts-fd320b21-00b9-41dc-a72a-0c9a90d1e259.json
2025-07-07 09:09:23 +02:00

6 lines
1.1 KiB
JSON

{
"id": "fd320b21-00b9-41dc-a72a-0c9a90d1e259",
"prefix": "opts",
"description": "connection options set",
"body": "DECLARE @options INT\r\nSELECT @options = @@OPTIONS\r\n\r\nPRINT 'Current option value: '+CONVERT(VARCHAR(10), @options)\r\nIF ( (1 & @options) = 1 ) PRINT 'DISABLE_DEF_CNST_CHK'\r\nIF ( (2 & @options) = 2 ) PRINT 'IMPLICIT_TRANSACTIONS'\r\nIF ( (4 & @options) = 4 ) PRINT 'CURSOR_CLOSE_ON_COMMIT'\r\nIF ( (8 & @options) = 8 ) PRINT 'ANSI_WARNINGS'\r\nIF ( (16 & @options) = 16 ) PRINT 'ANSI_PADDING'\r\nIF ( (32 & @options) = 32 ) PRINT 'ANSI_NULLS'\r\nIF ( (64 & @options) = 64 ) PRINT 'ARITHABORT'\r\nIF ( (128 & @options) = 128 ) PRINT 'ARITHIGNORE'\r\nIF ( (256 & @options) = 256 ) PRINT 'QUOTED_IDENTIFIER'\r\nIF ( (512 & @options) = 512 ) PRINT 'NOCOUNT'\r\nIF ( (1024 & @options) = 1024 ) PRINT 'ANSI_NULL_DFLT_ON'\r\nIF ( (2048 & @options) = 2048 ) PRINT 'ANSI_NULL_DFLT_OFF'\r\nIF ( (4096 & @options) = 4096 ) PRINT 'CONCAT_NULL_YIELDS_NULL'\r\nIF ( (8192 & @options) = 8192 ) PRINT 'NUMERIC_ROUNDABORT'\r\nIF ( (16384 & @options) = 16384 ) PRINT 'XACT_ABORT' \r\n"
}