|
|
The TRANSFER OWNERSHIP statement makes a different user or authorization
group or class name the owner of a table, view, procedure, or authorization
group.
ISQL or Application Programs
TRANSFER OWNERSHIP OF {[TABLE][Owner.]TableName
[VIEW][Owner.]ViewName
PROCEDURE [Owner.]ProcedureName
GROUP GroupName } TO NewOwnerName
- [TABLE][Owner.]TableName
is the name of a table to transfer. All indexes,
constraints and rules are also transferred.
- [VIEW] [Owner.]ViewName
is the name of a view to transfer.
- PROCEDURE [Owner.]ProcedureName
is the name of a procedure to transfer.
- GROUP GroupName
is the name of an authorization group to transfer.
- NewOwnerName
designates the new owner. The new owner can be a
user or an authorization group or a class name.
The TRANSFER OWNERSHIP statement may invalidate stored
sections. Refer to the ALLBASE/SQL Databast Administration
Guide for additional information on the validation of stored
sections.
You cannot use this statement on system tables or system
views.
Transferring ownership of a table changes the owner's grants to
have the new owner as grantor.
Transferring ownership of a table drops any views based on the
table as well as revoking all authorities related to the
views.
Indexes and rules are owned by the owner of the table with which
they are associated. When the owner of a table is transferred, then
the owner of the indexes and rules associated with it are
automatically transferred.
You can transfer ownership of a table, view, procedure, or
authorization group if you have OWNER authority for that table,
view, procedure, or group, or if you have DBA authority. Transfers
of ownership for tables involving referential constraints are subject
to the following additional considerations:
The new owner must have the REFERENCES or DBA authorities
necessary to allow ownership of a table containing such constraints.
If the new owner does not have the needed authorities, the transfer
is not allowed.
The name of any constraint or rule defined on the table must not
already be in use by the new owner.
The new owner is dependent on these authorizations for the
duration of the ownership (the old dependencies are dropped). The
authorities cannot be removed from the new owner by the REVOKE,
REMOVE FROM GROUP, or DROP GROUP statements.
CREATE PUBLIC TABLE Parts
(PartNumber CHAR(16) NOT NULL,
PartName CHAR(30),
SalesPrice DECIMAL(10,2))
IN WarehFS
The table is owned by the DBEUserID of its creator.
TRANSFER OWNERSHIP OF Parts TO PurchDB
Now the table is owned by the class named PurchDB.
|