Considerations For Grant Schema; Authorization And Availability Requirements; Schema Privileges And Synonyms; Examples Of Grant Schema - HP Neoview SQL Reference Manual

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

Considerations for GRANT SCHEMA

Authorization and Availability Requirements

To grant a privilege on a schema, you must have both that privilege and the right to grant that
privilege. That is, the privilege must have been issued to you WITH GRANT OPTION and not
revoked. If you lack authority to grant one or more of the specific privileges, the system returns
a warning (and does grant any of the specified privileges that you do have authority to grant).
If you have none of the specified privileges WITH GRANT OPTION, the system returns an error.

Schema Privileges and Synonyms

If you have a synonym that references an object in another schema, you must have the correct
schema privileges on the schema where the referenced object resides. For example:.
role.user1:
CREATE TABLE schema1.abc (col1 char not null primary key);
CREATE SYNONYM schema2.sabc FOR schema1.abc;
GRANT SELECT ON schema schema2 TO "role_user2";
role.user2:
SELECT * FROM mytestcat.schema.sabc;
The SELECT fails because role.user2 does not have select privileges on schema1.abc even though
role.user2 has select privileges on schema2.sabc.

Examples of GRANT SCHEMA

This example grants SELECT and DELETE privileges on the sales schema to the two specified
users.:
GRANT SELECT, DELETE ON SCHEMA sales
TO "role.role1", "role.role2" WITH GRANT OPTION;
120
SQL Statements

Advertisement

Table of Contents
loading

Table of Contents