SQL/MX 3.2.1 Reference Manual (H06.26+, J06.15+)
SQL/MX Statements
HP NonStop SQL/MX Release 3.2.1 Reference Manual—691117-005
2-239
Examples of GIVE SCHEMA
Examples of GIVE SCHEMA
•
This example transfers the schema ownership to “SQL.USER5”:
>>give schema userschema1 to "sql.user5";
--- SQL operation complete.
•
This example transfers the schema and the objects within the schema ownership
to “SQL.USER5” :
>>give schema userschema1 to "sql.user5" cascade;
--- SQL operation complete.
DDL Locks
During GIVE SCHEMA operation, DDL lock is held to prevent any other concurrent
DDL or utility operation being performed on the schema. The lock is released on
successful completion of the GIVE SCHEMA operation.
If the GIVE SCHEMA operation fails unexpectedly, you must run the RECOVER
SCHEMA operation on that schema to recover from the failed GIVE SCHEMA
operation. After successful recovery, the DDL lock will be released.
GRANT Statement
Considerations for GRANT
Examples of GRANT
The GRANT statement grants access privileges for an SQL/MX table, view, sequence
generator, or stored procedure to specified users. For more information, see GRANT
EXECUTE Statement on page 2-245 .
GRANT {privilege [,privilege]... | ALL [PRIVILEGES]}
ON [TABLE | SEQUENCE] object
TO {grantee [,grantee ]...}
[WITH GRANT OPTION]
[BY authid-grantor]
grantee is:
authid | PUBLIC
privilege is:
SELECT
| DELETE
| INSERT
| UPDATE [(column [,column]...)]
| REFERENCES [(column [,column]...)]
| USAGE










