0 / 0
Creating schemas for virtual objects in Data Virtualization
Last updated: Nov 26, 2024
Creating schemas for virtual objects in Data Virtualization

You can use schemas to group virtual objects. A virtual object can belong to only one schema. Use the CREATE SCHEMA SQL statement to create schemas.

About this task

If a schema does not exist in your Data Virtualization service, you must create a schema explicitly. Any user can create a schema with their own authorization name by using a CREATE SCHEMA statement. For example, user with user ID dv_ibmid_1001 can create a private schema named dv_ibmid_1001. To enable other users or roles to use the schema, dv_ibmid_1001 must grant CREATEIN, ALTERIN, or DROPIN schema permissions to these users or roles. Additionally, granting these permissions to PUBLIC enables the schema to be shared by all users.

Data Virtualization Managers can create schemas based on names other than the existing user’s authorization name. Data Virtualization Managers must grant appropriate permissions to other users or roles for them to use the schema to create virtual objects.

As Data Virtualization Manager, you can grant IMPLICIT_SCHEMA permissions to a user with the Data Virtualization Engineer role for each project. Data Virtualization Engineer can then create schemas to be used by other users in their project. When schemas are created by using the IMPLICIT_SCHEMA permission, PUBLIC is granted the CREATIN permission on these schemas.

Procedure

  • To create a schema while you create a virtualized table:
    • If you have the Data Virtualization Engineer or User role, leave the Schema field as default to create a schema with your user ID.
    • If you have the Data Virtualization Manager role, leave the Schema field as default to create a schema with your user ID or enter the new schema name in the Schema field.
    Note: Data Virtualization changes the schema name to uppercase even if it is entered in lowercase or mixed case.

    To learn more about creating virtualized tables, see Virtualizing data.

  • To create a schema from the SQL editor, enter the following statement:
    CREATE SCHEMA schema-name

    For more information, see Creating schemas in the Db2® product documentation.

Generative AI search and answer
These answers are generated by a large language model in watsonx.ai based on content from the product documentation. Learn more