SQL/MX 3.1 Reference Manual (H06.23+, J06.12+)

SQL/MX Statements
HP NonStop SQL/MX Release 3.1 Reference Manual663850-001
2-197
Examples of GIVE Object
Object Feature Version (OFV) of the object is increased to 3100, if the schema owner
and object owner are different after the completion of the operation. However, after
completion of the operation, if the schema owner and the object owner happen to be
the same again, then the OFV is recomputed and set.
Authorization and Availability Requirements
The GIVE operation on Table, View, Procedure and Trigger can be performed by
schema owner or object owner or security administrator or the Super ID (if Super ID is
part of the Security Administrator’s group or if no Security Administrators group
exists). The ownership of an object cannot be transferred to PUBLIC. The ownership of
an object cannot be transferred to any member of the Security Administrators group
unless the GRANTOR is the owner of the object. After successful completion of this
operation, all the existing opens of the target object are invalidated. In case of VIEW
ownership change, the existing opens on the underlying tables are also invalidated.
Examples of GIVE Object
This example transfers the table ownership to “SQL.USER2”.
>>give table usertable to "sql.user2";
--- SQL operation complete.
This example transfers view ownership to “SQL.USER5”.
>>give view userview to "sql.user5";
--- SQL operation complete.
This example transfers procedure ownership to “SQL.USER3”.
>>give procedure userroutine to "sql.user3";
--- SQL operation complete.
This example transfers trigger ownership to “SQL.USER1”.
>>give trigger usertrigger to "sql.user1";
--- SQL operation complete.
GRANT Statement
Considerations for GRANT
Examples of GRANT