0% found this document useful (0 votes)
430 views3 pages

Laboratory Exercise 001 - Managing Users and Roles

This document provides directions for a database activity that involves managing roles and applying privileges. It outlines 20 steps to create users, grant them privileges, create roles, assign privileges to roles, and observe the effects of privileges on users' abilities. The key tasks include creating users and granting them CREATE SESSION, CREATE TABLE, and other privileges; creating a role with CREATE TABLE privilege and granting it to users; changing users' passwords; granting a user object privileges to manipulate a table; revoking and reassigning privileges; and deleting users after the activity.

Uploaded by

Teri Cula
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
430 views3 pages

Laboratory Exercise 001 - Managing Users and Roles

This document provides directions for a database activity that involves managing roles and applying privileges. It outlines 20 steps to create users, grant them privileges, create roles, assign privileges to roles, and observe the effects of privileges on users' abilities. The key tasks include creating users and granting them CREATE SESSION, CREATE TABLE, and other privileges; creating a role with CREATE TABLE privilege and granting it to users; changing users' passwords; granting a user object privileges to manipulate a table; revoking and reassigning privileges; and deleting users after the activity.

Uploaded by

Teri Cula
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

NAME: COURSE:

TITLE: Manage role and apply privileges USN ID:


MACHINE ACTIVITY NO. DATE:

Directions : Perform the following activity Managing roles by applying different type of privileges.
: Copy and paste the DEPARTMENTS table included in this activity.
: In each number add the PL/SQL used.
: Answer the questions ask in each number.
: Skipping a number would cause different output consider as incorrect answer.
1. What privilege should a user be given to log on to the Oracle server? Is this a system or an object
privilege?
__________________________________________________________________
2. What privilege should a user be given to create tables?
_____________________________________________________________________
3. If you create a table, who can pass along privileges to other users on your table?
_____________________________________________________________________
4. You are the DBA. You are creating many users who require the same system privileges.
What should you use to make your job easier?
_____________________________________________________________________
5. What command do you use to change your password?
_____________________________________________________________________
6. Connect
To iqlplus* using the following session:
Username: SYTEM
Password: oracle
7. Populate the given DEPARTMENTS table as shown below: Before proceedings to the next number
make sure to double check you should have 8 rows of values.

8. Create 3 different USERS with their corresponding password:


No. User_name Password
1 SUPERVISOR SPVR
2 MANAGER MGR
3 CLERK CLK

ADD THE PL/SQL used here:


9. From the created user grant a different system privilege for each user:
No. User_name Password Privilege

CS352-DBMS2-MAS Page 1
NAME: COURSE:
TITLE: Manage role and apply privileges USN ID:
MACHINE ACTIVITY NO. DATE:

1 SUPERVISOR SPVR CREATE SESSION


2 MANAGER MGR CREATE TABLE
3 CLERK CLK CREATE SESSION and CREATE TABLE

ADD THE PL/SQL used here:


10. Try to connect using the three (3) created users.
 Which of the following user successfully establish a connection to oracle server?
_________________________________________________________________________________
_________________________________________________________________________________
 Which of the following user was not able to connect to oracle server? What is the reason?
_________________________________________________________________________________
11. Establish again a connection using: username: SYSTEM / password: oracle.
After establishing a connection to SYSTEM/oracle. Create a role and grant privilege of creating a table.
Role Privileges
SUP_ADMIN CREATE TABLE

ADD THE PL/SQL used here:


 From the role created in No. 11 SUP_ADMIN grant this said role to all USERS who are able to
establish a session.
ADD THE PL/SQL used here:
12. Log-on as CLERK and change your password to open.
Log-on as SUPERVISOR and change your password to sup
ADD THE PL/SQL used here:
13. Log-on as SYSTEM/oracle
 Grant objects privilege to SUPERVISOR by allowing to use the UPDATE for column
(DEPARTNAME) only, and SELECT statement to the table DEPARTMENTS.
ADD THE PL/SQL used here:
14. After adding object privilege to SUPERVISOR.
 Log-on SUPERVISOR
 Manipulate the DEPARTMENTS table, UPDATE the department_name to IT whose manager_id is
Null.
ADD THE PL/SQL used here:
 Confirm the changes made to DEPARTMENTS table by using the SELECT statement
ADD THE PL/SQL used here:
15. Log-on as SYSTEM then modify the object privilege created to SUPERVISOR to UPDATE , INSERT
and SELECT to all columns,
Note that SUPERVISOR should have the capability to pass the privilege given to them to other
USERS.
ADD THE PL/SQL used here:
16. Log-on as SUPERVISOR, then pass the privilege to UPDATE INSERT and use SELECT to user
CLERK.

CS352-DBMS2-MAS Page 2
NAME: COURSE:
TITLE: Manage role and apply privileges USN ID:
MACHINE ACTIVITY NO. DATE:

ADD THE PL/SQL used here:


17. Confirm that the user CLERK can now perform insertion and update.
 Log-on as CLERK
 Insert a new Departments with the following values as shown below:
5 IT_DEPT 10 2500

Is adding the new values when log-on as CLERK is possible? Why and why not?
_________________________________________________________________________________
18. Log-on as System then revoke all the object privilege given to SUPERVISOR.
ADD THE PL/SQL used here:
19. Log-on as Supervisor.
 Create a report that will display all the DEPARTMENT_NAME whose location_id is equal to 1700.
 Is creating a report possible? Why and why not?
Log-on as Clerk.
 Create a report that will display all the manager_id whose location_id is equal to 2500.
 Is creating a report possible? Why and why not?
20. Log-on as SYSTEM then delete all the users created to free-up some memory space.
ADD THE PL/SQL used here:

CS352-DBMS2-MAS Page 3

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy