You can obtain a list of all system-defined option values, for your own connection, by using one of the following methods. To obtain system-defined option values for other connections, you must have either the SERVER OPERATOR, MONITOR, or DROP CONNECTION system privilege.
sa_conn_options system procedure To list all current system-defined option settings, call the sa_conn_options system procedure:
CALL sa_conn_options; |
To order this list alphabetically, execute the following statement:
SELECT * FROM sa_conn_options( ) ORDER BY OptionName; |
To filter the result or order by anything other than name, use a WHERE clause:
SELECT * FROM sa_conn_options( ) WHERE OptionDescription LIKE '%date%' ORDER BY PropNum; |
sa_conn_properties system procedure Current system-defined option settings for your connection are also available as a subset of connection properties. List all connection properties by using the sa_conn_properties system procedure:
CALL sa_conn_properties; |
To order this list alphabetically, execute the following statement:
SELECT * FROM sa_conn_properties( ) ORDER BY PropName; |
SET statement In Interactive SQL, execute the SET statement with no arguments to list the current settings of system-defined connection, database, and Interactive SQL options.
SET; |
You can obtain the current value of a single system-defined option by using the CONNECTION_PROPERTY system function:
CONNECTION_PROPERTY system function Execute the following statement to report the value of the ansi_blanks option:
SELECT CONNECTION_PROPERTY ( 'ansi_blanks' ); |
The CONNECTION_PROPERTY system function cannot be used to obtain the values of user-defined options.
Within embedded SQL programs, you can use the GET OPTION statement to determine the value of an option (system- or user-defined) within your embedded SQL application.
You can obtain the value of user-defined options by querying the SYSOPTIONS system view:
SYSOPTIONS system view The results of the sa_conn_options and sa_conn_properties system procedures include connection-level settings for system-defined options which override user or PUBLIC settings.
The values of user-defined options are not returned by either the sa_conn_options or sa_conn_properties system procedures. You can instead query the SYSOPTION or SYSOPTIONS catalog views directly to determine the value of a specific user-defined option. The following query on the SYSOPTIONS system view displays all PUBLIC-level and user-level settings for all system- and user-defined options that have been permanently set:
SELECT * FROM SYSOPTIONS; |
Temporarily setting a server-defined option for a specific connection using the SET TEMPORARY OPTION statement does not cause the SYSOPTION (or SYSOPTIONS) system view to be updated. Temporary changes to option settings at the connection level are held only in server memory.
You can obtain the value of all options, except for temporary options, by using Sybase Central:
Sybase Central In Sybase Central, select a database, and then click File » Options.
![]() |
Discuter à propos de cette page dans DocCommentXchange.
|
Copyright © 2013, SAP AG ou société affiliée SAP - SAP Sybase SQL Anywhere 16.0 |