CREATE
[DATA] SERVICE statement enables you to create a data
service using the following syntax:
Specifies the name of the data service. The following rules apply:
Specifies the data service type. Here is a list of valid data service types:
DB2UNXPC
GENERIC
GENERIC_FED
GREENPLUM
MDS
NETEZZA
ODBC
ODBC_FED
ORACLE
POSTGRES
SAP
SAPHANA
SASHDAT
SQLSVR
TERADATA
Specifies the logical catalog name associated with the data service. The catalog name must be unique. If an identical catalog name is encountered, a warning message is issued. The default logical catalog name matches the data service name if omitted for data sources that do not support catalogs.
Specifies the Authentication Server domain name associated with the specified data service. If omitted, the default domain name matches the data service name. The domain is checked against the authentication server and if not valid, will return an error only if VALIDATE is specified for the data service. If VALIDATE is not specified, a warning is presented but the data service is still created.
REGISTER is an optional
catalog registration specification. Specify a list of catalogs to
register or use the ALL keyword to register
all catalogs visible to the connection.
register-options : :=
[ UID "userid" ]
[ PWD 'password' ]
[ VALIDATE [N[O]|F[ALSE]|OFF|0|Y[ES]|T[RUE]|ON|1]]
“userid” requires double
quotation marks and the ‘password’ requires
single quotation marks:
UID “userid” PWD 'password'[ VALIDATE [N[O]|F[ALSE]|OFF|0|Y[ES]|T[RUE]|ON|1]]
TKTS_ERROR if credentials
do not exist in the domain.
TKTS_ERROR. If VALIDATE
is TRUE but no catalogs are specified (including REGISTER ALL), then
only the connection itself is validated since the catalog list is
either empty or supplied by the connection. If an attempt is made
to register a catalog that has already been registered or associated
with a data service, then the statement returns TKTS_SUCCESS_WITH_INFO.
Specifies the list of data service options.
data-service-options ::= "{" OPTIONS ["(") data-service-option [{ "," data-service-option } ... ] [")"]"}"
Specifies the data service option.
data-service-option ::=
data-service-dependent-option | data-service-independent-option
Data service specific options. For details about the specific options for your data source, see Database Functionality and Driver Performance.
The following options apply for GENERIC data services:
LOCAL N[O]|F[ALSE]|OFF|0|Y[ES]|T[RUE]|ON|1
DOMAIN clause results in an error
if the LOCAL option is specified as one of
the true values. The default is NO. This
option is not persisted.
Any options that apply to multi-catalog data services will apply to GENERIC_FED data services.
GENERIC_FED-option ::= GENERIC-option
data-service-independent-option ::= conopts-configuration-list | case-sensitivity-option conopts-configuration-list ::= CONOPTS "(" [DRIVER driver-name] ["," driver-connection-string-option ...] ")" ...
If the driver-name option
is omitted, the default driver for the data service is assumed. Associated
options within the CONOPTS list are used
for connections using the appropriate driver. Some data services such
as ORACLE accept connections from the ODBC driver as well. For these
data services, two CONOPTS lists can be configured,
one per driver to accept connections for the two drivers. The ODBC
driver accepts a CONOPTS driver connection
string option. To configure this option and suboptions within it,
the configuration format is CONOPTS( driver ODBC, CONOPTS(
... ) ). The inner CONOPTS option,
within the parenthesis, is a list-valued driver connection string,
while the outer CONOPTS option groups arbitrary
driver connection string options configured for the service.
Specifies the connection
options that correspond to the driver which is specified in DRIVER driver-name.
The DATA_SERVICE and CATALOG connection
string options should not be specified here since they are implied
by the data service and its configured catalogs.
case-sensitivity-option ::=
CASE_SENSITIVITY "("
OBJECT N[O]|F[ALSE]|OFF|0|Y[ES]|T[RUE]|ON|1 ","
COLUMN N[O]|F[ALSE]|OFF|0|Y[ES]|T[RUE]|ON|1 ")"
TRUE (sensitive) for DB2, Oracle, and
GreenPlum, and FALSE (insensitive) for all
other data services. Both OBJECT and COLUMN are
required when specifying CASE_SENSITIVITY.
CREATE SERVICE ORASERV TYPE ORACLE domain ORA1 {OPTIONS ( conopts
( Driver odbc, conopts(DSN tktsora)), conopt (Driver oracle, PATH tktsora) ) }CREATE DATA SERVICE SQLServer1 TYPE SQLSVR domain SQLSERVER {OPTIONS
( conopts ( conopts(DSN tktssql)) ) }