Specifies the DSN name (required). Quotation marks surrounding the DSN name are optional.
CREATE DSN dsn-name
Specifies the data service name. This option only applies to a standard DSN and is required.
UNDER data-service-name
Description of the DSN surrounded in single quotation marks. Use for a standard or federated DSN (optional).
[DESC 'description text']
Specifies the connection string options.
[CONNECT driver-connection-string-options']
key=value pairs.
For more information about which connection options and advanced
options are supported for each data service, see the driver reference
topic for your
data source.
Specifies what options are included with the DSN.
Specifies the options to configure with the DSN.
dsn-config-options ::= "{" OPTIONS ["("] dsn-config-option [{"," dsn-config-option} ... ] [")"]"}"
Specifies the DSN configuration option as one of the following:
Specifies whether to use the FedSQL dialect. BASE DSN connections always use FedSQL. Therefore, FedSQL cannot be turned off for BASE DSNs. The FEDSQL option applies to both standard and federated DSNs.
YES is the default value. Specifies whether to secure SQL statements before processing them. For example, if a DSN is defined to use SECURITY NO, Federation Server security is bypassed. Therefore, when you connect with the DSN, you are connecting with the privileges granted at the data source level. If a DSN is defined to use SECURITY YES, privileges granted through the Federation Server will be enforced in addition to those of the underlying data source. Used in conjunction with CSO SHARED, this feature facilitates management of a more granular security policy in the Federation Server over a less granular one in the back-end database.
cso-value ::= PERSONAL |SHARED
Specifies whether to
use back-end credentials owned by the current user (PERSONAL)
or shared among many users (SHARED). The
DSN can be configured to search for either in the order specified.
If a search is not specified, the default is CSO (PERSONAL,SHARED).
Credentials Search Order applies to a standard DSN only.
[ AS ADMINISTRATOR ]
Creates the DSN using the ADMINISTRATOR role as the owner. With the ADMINISTRATOR role, the DSN is owned by the individual user. If the user is SYSTEM, the DSN is owned by SYSTEM. 'AS ADMINISTRATOR ' is optional and can be used in a standard or federated DSN.
CREATE DSN "DSN1" UNDER BASE DESCRIPTION 'creating DSN1' NOPROMPT
'DRIVER=BASE;CATALOG="catalog1_BASE";SCHEMA="schema1"' {OPTIONS (FEDSQL
NO,SECURITY NO)}CREATE DSN BASEDSN under BASE NOPROMPT '(CATALOG="catalog1_BASE"; LOCKTABLE=SHARE);(CATALOG="catalog2_BASE";LOCKTABLE=EXCLUSIVE)'
CREATE DSN BASEDSN under BASE NOPROMPT 'CATALOG="catalog1_BASE"; LOCKTABLE=SHARE;SCHEMA=(NAME="schema1_BASE";LOCKTABLE=EXCLUSIVE)'