Introduction to database options
156
Introduction to database options
Database options control many aspects of database behavior. For example,
you can use database options for the following purposes:
♦
Compatibility You can control how much like Adaptive Server
Enterprise your Adaptive Server Anywhere database operates, and
whether SQL that does not conform to SQL/92 generates errors.
♦
Error handling You can control what happens when errors such as
dividing by zero, or overflow errors, occur.
♦
Concurrency and transactions You can control the degree of
concurrency, and details of COMMIT behavior.
Setting options
You set options with the SET OPTION statement. It has the following
general syntax:
SET [ EXISTING ] [ TEMPORARY ] OPTION
... [
userid
. | PUBLIC. ]
option-name
= [
option-value
]
Specify a user ID or group name to set the option for that user or group only.
Every user belongs to the PUBLIC group. If no user ID or group is specified,
the option change is applied to the currently logged on user ID that issued the
SET OPTION statement.
For example, the following statement applies an option change to the user
DBA, if DBA is the user that issues it:
SET OPTION login_mode = mixed
The following statement applies a change to the PUBLIC user ID, a user
group to which all users belong.
SET OPTION Public.login_mode = standard
Caution
Changing option settings while fetching rows from a cursor is not
supported, because it can lead to ill-defined behavior. For example,
changing the DATE_FORMAT setting while fetching from a cursor would
lead to different date formats among the rows in the result set. Do not
change option settings while fetching rows.
$ For more information, see "SET OPTION statement" on page 612.