Previous Topic: Creating SQL ObjectsNext Topic: Naming the Schema


Creating a Schema

A schema defines a user's SQL environment. You establish the schema and identify the name for the schema with the CREATE SCHEMA statement. Enter the CREATE SCHEMA statement in the numbered area of an EDIT Source Member Panel. See How to Submit SQL Statements for the steps to obtain the panel and an explanation of the fields on the panel. The schema consists of:

If the CA Datacom/DB Security Facility is installed, you must be a global database owner to execute the CREATE SCHEMA statement.

Note: For information about global database owners, see the CA Datacom Security Reference Guide.

When you create a schema, CA Datacom Datadictionary defines the authorization ID as an AUTHORIZATION entity-occurrence. When the AUTHORIZATION occurrence is defined, the AUTH-USAGE attribute is assigned a value of S. This indicates that the occurrence is an SQL authorization ID. The AUTH-USAGE attribute is updateable by CA Datacom Datadictionary only, not by a user.

Only AUTHORIZATION occurrences created by a CREATE SCHEMA statement can be used as SQL authorization IDs.