How to query the value of a server parameter in Sybase?
Several session level options are available to you as varbinary using the @@ options variable. Some guidelines on bitmask interpretation are given
http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@Generic__BookTextView/41423;pt=42621
and
http://www.isug.com/Sybase_FAQ/ASE/code/sp_helpoptions.sql
For session parameters that are not documented (for example, quoted_identifier), you might have to experiment. I ran the following on a Solaris x86 Sybase 15 instance and saw a change in the "third bit from the right" (counting from zero)
This is an interesting question and one that did not happen to me in my seven or so years as a Sybase administrator.
pjjH
262: 1> set quoted_identifier off 262: 2> go 263: 1> select @@ options 263: 2> go -------------------------- 80210000800f0144030010 (1 row affected) 264: 1> set quoted_identifier on 264: 2> go 265: 1> select @@ options 265: 2> go -------------------------- 80210001800f0144030018 (1 row affected) select @@ options as options into #foo
source to share
sp_dboption can give you a list of configurable options, or actually set an option: -
Settings List
exec sp_dboption
set the option
sp_dboption pubs2, "unique auto_identity index", true
If you just want to specify the options set to db you can use sp_helpdb
sp_helpdb pubs2
This gives a multi-page result set, but the first set has a column named "status" which shows all the "true" parameters in the nominated database.
source to share