CREATE DSN dsn-name
UNDER data-service
[DESCRIPTION ‘description text’]
DESCRIPTION
, except
to represent a literal backslash that should be escaped to parse correctly.
[CONNECT ‘driver-connection-string-options’]
[create-dsn-options]
[AS ADMINISTRATOR]
CREATE DSN dsn-name
[DESCRIPTION ‘description text’] [create-dsn-options] ADD "(" dsn-name ["," ...] ")" [AS ADMINISTRATOR]
DESCRIPTION
, except
to represent a literal backslash that should be escaped to parse correctly.
[create-dsn-options]
ADD "(" dsn-name ["," ...] ")"
[AS ADMINISTRATOR]
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']
DESCRIPTION
, except
to represent a literal backslash where the string should be escaped
to parse correctly.
Specifies connection string options for standard DSNs only. Use NOPROMPT to suppress dialog box messages.
[CONNECT | NOPROMPT driver-connection-string-options']
key=value
pairs.
For more information about connection options and advanced options
specific to your data source, see the Driver Reference chapter.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 FedSQL, DS2 or native dialect. The dialect defaults to FedSQL for BASE DSNs and all secured DSNs. The LANG (FEDSQL) option applies to both standard and federated DSNs. Note that you can execute only the language specified in the LANG setting. FedSQL and DS2 cannot be used together.
LANG=FEDSQL, LANG=DS2, LANG=NO
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 SAS 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 only to standard DSNs.
[ 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 CONNECT 'DATA_SERVICE=BASE; LOCKTABLE=EXCLUSIVE'
CREATE DSN BASEDSN under BASE CONNECT 'CATALOG="catalog1_BASE"; LOCKTABLE=EXCLUSIVE'
CREATE DSN BASEDSN under BASE CONNECT '(CATALOG="catalog1_BASE"; LOCKTABLE=SHARE);(CATALOG="catalog2_BASE";LOCKTABLE=EXCLUSIVE)'
CREATE DSN BASEDSN under BASE CONNECT 'CATALOG="catalog1_BASE"; LOCKTABLE=SHARE;SCHEMA=(NAME="schema1_BASE";LOCKTABLE=EXCLUSIVE)'
CREATE DSN BASEDSN under BASE CONNECT 'CATALOG="catalog1_BASE"; LOCKTABLE=SHARE;SCHEMA=(NAME="schema1_BASE";LOCKTABLE=EXCLUSIVE); SCHEMA=(NAME="schema2_BASE";ACCESS=TEMP)'
CREATE DSN MYDSN under MYSERV {OPTIONS CREDENTIALS_SEARCH_ORDER (PERSONAL)}
CREATE DSN MYDSN under MYSERV {OPTIONS CREDENTIALS_SEARCH_ORDER (PERSONAL, SHARED)}
CREATE DSN ORADSN UNDER ORASERVICE CONNECT 'ORA ENCODING=UNICODE; ORANUMERIC=YES'
CREATE DSN "DB2Users" UNDER "Oracle Service" CONNECT 'DRIVER=Oracle;GROUP=DB2Users' {OPTIONS CSO PERSONAL} AS ADMINISTRATOR
CREATE DSN MYFEDERATED_DSN ADD (mydsn1, mydsn2, mydsn3) AS ADMINISTRATOR
ALTER DSN dsn-name alter-dsn-options
ALTER DSN dsn-name RENAME TO new-dsn-name
ALTER DSN dsn-name ADD "(" dsn-name ["," ...] ")"
ALTER DSN dsn-name DROP "(" dsn-name ["," ...] ")"
Specifies the DSN name.
Specifies the options to alter.
alter-dsn-options
::= create-dsn-options
Specifies the new DSN name.
Description of the DSN surrounded in single quotation marks. Use for a standard or federated DSN (optional).
[DESC 'description text']
DESCRIPTION
, except
to represent a literal backslash where the string should be escaped
to parse correctly.
Specifies connection string options for standard DSNs only. Use NOPROMPT to suppress dialog box messages.
[CONNECT | NOPROMPT driver-connection-string-options']
key=value
pairs.
For more information about connection options and advanced options
specific to your data source, see the Driver Reference chapter.ALTER DSN "DSN1" DESC 'altering DSN1 description' NOPROMPT 'DRIVER=BASE;CATALOG="catalog1_BASE";SCHEMA=(name="schema1_BASE")'
ALTER DSN "DSN5" RENAME to DSN7
ALTER DSN "DSN7" {OPTIONS set (FEDSQL YES,SECURITY YES)}
ALTER DSN "DSN7" {OPTIONS xset CREDENTIALS_SEARCH_ORDER(SHARED), xset FEDSQL NO, xset SECURITY NO}
ALTER DSN "DSN7" {OPTIONS DROP FEDSQL, DROP SECURITY}
DROP DSN dsn-name [FORCE]
Specifies the name of the DSN.
FORCE | Use FORCE to suppress error messages when the DSN does not exist. |
DROP DSN "DSN1"
DROP DSN "DSN1" FORCE