用于给对象授权
=================================================================================================================================
ocp考题
1.sequence的操作只有select和alert
2.system privilege权限
execute any procedure
select any table
SQL> select grantee,privilege from dba_sys_privs where grantee='SYSTEM';
GRANTEE PRIVILEGE
-------------------- ----------------------------------------
SYSTEM CREATE MATERIALIZED VIEW
SYSTEM CREATE TABLE
SYSTEM UNLIMITED TABLESPACE
SYSTEM GLOBAL QUERY REWRITE
SYSTEM MANAGE ANY QUEUE
SYSTEM ENQUEUE ANY QUEUE
SYSTEM SELECT ANY TABLE
SYSTEM DEQUEUE ANY QUEUE
8 rows selected.
3.A table owner must grant the references privilege to allow other users to create FOREIGN KEY constraints using that table.
4.The owner of an object acquires all object privilege on that object by default.
5. Adding a foreign key constraint pointing to a table in another schema requires the REFERENCEs object privilege
6.Revoking an object privilege that was granted with the WITH GRANT OPTION clause has a cascading effect
with grant option级联,with admin option不级联
===============================================================================================================================
Which three are true about granting object privileges on tables, views, and sequences?
A) UPDATE can be granted only on tables and views.
B) DELETE can be granted on tables, views, and sequences.
C) REFERENCES can be granted only on tables and views.
D) INSERT can be granted on tables, views, and sequences.
E) SELECT can be granted only on tables and views.
F) ALTER can be granted only on tables and sequences.
Correct Answer: ACF
Choose three
Which three actions can you perform only with system privileges?
A) Truncate a table in another schema.
B) Access flat files via a database, which are stored in an operating system directory.
C) Log in to a database.
D) Query any table in a database.
E) Use the WITH GRANT OPTION clause.
F) Execute a procedure in another schema.
system privileges的权限:
execute any procedure
select any table
Correct Answer: CDF
Choose two.
·MANAGER is an existing role with no privileges or roles.
·EMP is an existing role containing the CREATE TABLE privilege.
·EMPLOYEES is an existing table in the HR schema.
Which two commands execute successfully?
A) GRANT CREATE SEQUENCE TO manager, emp;
B) GRANT SELECT, INSERT ON hr.employees TO manager WITH GRANT OPTION:
C) GRANT CREATE TABLE, emp TO manager;
D) GRANT CREATE TABLE, SELECT ON hr. employees TO manager ;
E) GRANT CREATE ANY SESSION, CREATE ANY TABLE TO manager;
Correct Answer: AC
create 所以只能赋create的权限
Which two are true about the WITH GRANT OPTION clause?
A) The grantee can grant the object privilege to any user in the database, with of without including this option,
B) The grantee must have the GRANT ANY OBJECT PRIVILEGE system prvilege to use this option.
C) It can be used when granting privileges to roles.
D) It can be used for system and object privileges.
E) It cannot be used to pass on privileges to PUBLIC by the grantee.
F) It can be used to pass on privileges to other users by the grantee.
Correct Answer:AF
Which two are true about granting privilege on objects?
A. The owner of an object acquires all object privilege on that object by default.
B. The WITH GRANT OPTION clause can be used only by DBA users.
C. A table owner must grant the references privilege to allow other users to create FOREIGN KEY constraints using that table.
D. An object privilege can be granted to a role only by the owner of that object.
E. An object privilege can be granted to other users only by the owner of object.
Correct Answer:AC
Which three are true about privileges and roles?
A. A role is owned by the user who created it.
B. System privileges always set privileges for an entire database.
C. All roles are owned by the SYS schema.
D. A role can contain a combination of several privileges and roles.
E. A user has all object privileges for every object in their schema by default.
F. PUBLIC can be revoked from a user.
G. PUBLIC acts as a default role granted to every user in a database
参考答案:DEG
Which two are true about granting privilege on objects?
A) An object privilege can be granted to a role only by the owner of that object
B) An object privilege can be granted to other users only by the owner of that object
C) The owner of an object acquires all object privilege on that object by default
D) A table owner must grant the REFERENCES privilege to allow other users to create FOREIGN KEY constraints using that table
E) The WITH GRANT OPTION clause can be used only by DBA users
Correct Answer:CD
Which three are true about system and object privileges
A. WITH GRANT OPTION can be used when granting an object privilege to both users and roles
B. WITH GRANT OPTION cannot be used when granting an object privilege to PUBLIC
C. Revoking a system privilege that was granted with the WITH ADMIN OPTION has a cascading effect.
D. Revoking an object privilege that was granted with the WITH GRANT OPTION clause has a cascading effect
E. Adding a primary key constraint to an existing table in another schema requires a system privilege
F. Adding a foreign key constraint pointing to a table in another schema requires the REFERENCEs object privilege