How to query the value of a server parameter in Sybase?

For example, if I need to know the current value of the quoted_identifier

server parameter , is there a query that can give me this information?

+1


source to share


3 answers


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

+2


source


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.

+1


source


You can query the current value set for the selected parameter.

This is the code sp_helpdb

.

You can check sp_helptext

sp_helpdb

based on sybsystemprocs but it is very difficult.

0


source







All Articles