Neoview SQL Reference Manual (R2.3)
Can use UPDATE statement.UPDATE
All of the privileges above. Can have all privileges that apply to the object type.ALL PRIVILEGES
ON SCHEMA schema-name
specifies a schema on which to grant privileges.
TO {grantee [,grantee]... }
specifies one or more roles to whom you grant privileges.
grantee specifies an authorization ID to whom you grant privileges. Authorization IDs
identify roles during the processing of SQL statements. The authorization ID must be a valid
role name, enclosed in double quotes. grantee is not case-sensitive.
SQL:1999 specifies two special authorization IDs: PUBLIC and SYSTEM.
• PUBLIC specifies all present and future authorization IDs.
• SYSTEM specifies the implicit grantor of privileges to the creators of objects.
You cannot specify SYSTEM as an authid in a GRANT statement.
WITH GRANT OPTION
specifies that roles to whom privileges are granted have the right to grant the same privilege
to other roles.
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;
GRANT SCHEMA Statement 123