Exam Prep Questions


1:

What information would you expect to find by querying the SESSION_ROLE view?

  • A. All the sessions in the database with their default roles

  • B. All roles granted to a session

  • C. Roles enabled for current user

  • D. All the roles currently active in the database

A1:

Answer C is correct; in this view, you find all the roles enabled for the currently logged-in user. Answer A is incorrect; no single view shows all the sessions in the database and their default roles. Answer B in incorrect; roles aren't granted to sessions. Answer D is incorrect; there is no single view that tells you all the roles active in the database.

2:

Which statements are true about a role? [select all that apply]

  • A. It is owned by DBA.

  • B. It is owned by the user who created it.

  • C. A role can be granted to itself.

  • D. It can either contain just object privileges or just system privileges but not both.

  • E. It can be granted to any user.

  • F. It can be granted to any role except itself.

  • G. It can be granted to itself if it is granted circularly.

A2:

Answers E and F are correct; a role can be granted to any user and to any role except to itself, even circularly (by means of inclusion in another role). Answers A and B are incorrect; no user owns a role. Answers C and G are incorrect; a role cannot ever be granted to itself either directly or indirectly through inclusion in another role. Answer D is incorrect; roles can combine system privileges and object privileges in the same role.

3:

What is the main reason to create a role?

  • A. To have named structures in the database to associate to users so that you can remember what those users do

  • B. So that you can group system privileges in one group and object privileges in another group so that you can grant them separately

  • C. So that users know what privileges they have

  • D. So that you can more easily grant, revoke, and manage the privileges that users have assigned to them

A3:

Answer D is correct; the main benefit to creating roles in the database is that you can more easily and centrally maintain privileges and the users to whom they are assigned. Answer A is incorrect; they are not built simply as a memory aid to map users to job descriptions. Answer B is incorrect; you can group all relevant privileges together in one role. Answer C is incorrect; users don't necessarily need to know what privileges have been granted to them.

4:

Which of the statements are true about a role that is password authenticated.

  • A. Passwords are mandatory for roles in Oracle.

  • B. Passwords are necessary to grant the role to the user.

  • C. Passwords are necessary to use the role.

  • D. Passwords are necessary to create the role.

A4:

Answer C is correct; when a role is password authenticated, it is necessary for the user to provide the password to use the role. Answer A is incorrect; passwords are optional for roles. Answer B is incorrect; you don't have to provide a password when you grant the role, only when the role is enabled by the user. Answer D is incorrect; you can provide a password for the role at creation time, but it is not necessary in order to create the role.

5:

Who has the ability to grant a role? [select all that apply]

  • A. The person who created the role

  • B. Users with SELECT ANY ROLE privilege

  • C. Users with GRANT ANY ROLE privilege

  • D. Users who have been granted the role WITH GRANT OPTION

  • E. Users who have been granted the role WITH ADMIN OPTION

A5:

Answers A, C, and E are correct. You can grant roles if you create the role, if you have been given the GRANT ANY ROLE system privilege, or if you have been granted the role WITH ADMIN OPTION. Answer B is incorrect; there is no SELECT ANY ROLE privilege, and if there were, it would not allow you to grant the role. Answer D is incorrect; the syntax for roles is the same as the syntax for system privileges, and WITH GRANT OPTION is an object privilege syntax.

6:

You create a role called developer and grant CREATE TABLE and SELECT ANY TABLE to that role. Then you grant the role to user Lynn. Lynn then logs in to the database. What is true about Lynn's ability to manipulate tables in the database?

  • A. She can create and select from tables immediately after she logs in.

  • B. She can create and select from tables after she logs out and back in.

  • C. She has to have developer deliberately set as her default role before she can manipulate tables.

  • D. She has to have the CREATE TABLE and SELECT ANY TABLE granted to her directly before she can manipulate tables.

A6:

Answer A is correct; because the role has been granted to Lynn before she logged in, as soon as she logs in she will be able to access those privileges. Answer B is incorrect; there is no need to log out for her to use the role's privilegesit was enabled when she logged in. Answer C is incorrect; unless otherwise specified, all roles are hers by default. Answer D is incorrect; the point of roles is so that you don't have to directly grant privileges to every user.

7:

What is the effect of the following statement?

 ALTER USER lonny DEFAULT ROLE ALL; 

  • A. Lonny has the ALL role set as his default role.

  • B. Lonny has all defined roles in the database set as his default roles.

  • C. Lonny has all of his granted roles set as his default roles.

  • D. The statement generates an error.

A7:

Answer C is correct; the ALL keyword means that all Lonny's granted roles become default roles. Answer A is incorrect; ALL is a keyword, not the name of a role. Answer B is incorrect; a user can have a role made default only if that role has been assigned to the user. Answer D is incorrect; the statement is syntactically correct.

8:

What is the effect of the following command?

 DELETE ROLE developer; 

[select all that apply]

  • A. The role developer is removed from all users to whom it has been granted.

  • B. The role developer is removed from the database.

  • C. The role developer is removed only from the data dictionary.

  • D. The statement creates an error.

A8:

Answer D is correct; the syntax to remove the role from the database is DROP ROLE, not DELETE ROLE. Answers A and B would be correct if the DROP ROLE command were issued but are incorrect because the DELETE keyword is used. Answer C is incorrect; nothing removes the role from the data dictionary and leaves it in the database.

9:

Which predefined role is useful for database administrators because it has all the administrative privileges needed to maintain the entire database?

  • A. DBA

  • B. SYSTEM

  • C. SYSOPER

  • D. RESOURCE

A9:

Answer A is correct; DBA is the role that gives a DBA all the privileges needed to maintain the database. Answer B is incorrect; SYSTEM is a username to which DBA has been granted. Answer C is incorrect; SYSOPER does not have all the needed privileges to maintain the database. Answer D is incorrect; RESOURCE has many privileges but not enough to maintain the database.

10:

To determine which roles are available in the database, use the __________ view, and to determine which system privileges have been granted to a role, use the ___________ view.

  • A. DBA_ROLES, DBA_SYS_PRIVS

  • B. DBA_ROLES, DBA_SYSTEM_PRIVS

  • C. SESSION_ROLES, DBA_SYS_PRIVS

  • D. DBA_ROLES, DBA_TAB_PRIVS

A10:

Answer A is correct; DBA_ROLES is used for determining the available roles in the database, and the DBA_SYS_PRIVS view is used to determine which of them have system privileges. Answer B is incorrect; DBA_SYSTEM_PRIVS is not a view in the database. Answer C is incorrect; SESSION_ROLES tells you only the roles assigned to the currently logged-in user. Answer D is incorrect; DBA_TAB_PRIVS tells you the object privileges assigned to roles, not system privileges.



    Oracle 9i Fundamentals I Exam Cram 2
    Oracle 9i Fundamentals I Exam Cram 2
    ISBN: 0789732653
    EAN: 2147483647
    Year: 2004
    Pages: 244
    Authors: April Wells

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net