Use the CREATE SCHEMA
statement to create a schema and designate an owner. Here is the syntax:
CREATE SCHEMA [ "catalog"."schema"]
[ AUTHORIZATION|OWNER owner ]
[ create-schema-options ]
“catalog”
Specifies the optional
catalog name under which to create the schema. Useful for data services
defined for data sources that support catalog names. For those that
do not, the catalog name must be that logical catalog name which defaults
to the name of the data service.
“schema”
Specifies the schema
name.
owner
Authorization identifier
of the schema owner. If the AUTHORIZATION clause is not specified,
then the system owns the schema. The system should never own a schema
because this could cause residual problems with FedSQL views and data
cache.
create-schema-options
Specifies the options
to create the schema.
create-schema-options ::=
"{" OPTIONS ["("] schema-option[ { "," schema-option } ... ] [")"] "}"
schema-option
Specifies the syntax
for schema options. This option only applies to the BASE data service.
conopts-configuration-list
If DRIVER driver-name
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.
conopts-configuration-list ::=
CONOPTS "(" [DRIVER driver-name] [","driver-connection-string-option ...] ")"...
driver-name
Specifies the driver
name.
driver-connection-string-option
Specifies the connection
options that correspond to the driver which is specified in DRIVER
driver-name.
Advanced options are
valid to use as driver connection string options; connection options
are invalid. For more information about which advanced options are
supported for each data service, see the data service reference chapter
for your driver. For information specific to the data service you
are configuring, go to the section that corresponds to your data service.
PRIMARYPATH parh
Specifies the physical
location for the SAS library, which is a collection of one or more
SAS files. For example, in directory-based operating environments,
a SAS library is a group of SAS files that are stored in the same
directory. This option is required for BASE schemas.
path ::=
quoted-identifier
quoted-identifier
Specifies a single
quoted or double quoted name.
CREATE SCHEMA "catalog1_BASE"."schema1_BASE" {OPTIONS (primarypath
'C:\schema1_BASE')}
CREATE SCHEMA "ORACLE1"."TKTSTST1"
CREATE SCHEMA "catalog1"."schema1" {OPTIONS primarypath 'C:\my_schema',
conopts (LOCKTABLE EXCLUSIVE)}