database pl/sql Create three users : usr1, usr2 and usr3: a. Usr1 and usr2 belon
ID: 3701843 • Letter: D
Question
database pl/sql
Create three users : usr1, usr2 and usr3: a. Usr1 and usr2 belong to a role named hr. In this role, users can execute all procedures and functions in the package but cannot read and modify the content of the three tables.
Usr1 and usr2 belong to a role named hr. In this role, users can execute all procedures and functions in the package but cannot read and modify the content of the three tables.
b. Usr3 can only update the cust_mobile in the table customer. He can also give his privileges to other users
this is the tables
1-Account: account_id, cust_id,amount,creation_date ?
2-Customer:cust_id,cust_name,cust_mobile,cust_birthdate ?
3-Employee: emp_id,emp_name,emp_salary
Explanation / Answer
//now creating role hr.
> CREATE ROLE hr
// now granting privileges to execute procudures and function
>GRANT EXECUTE ON procedure_name/function_name TO hr;
//now assiging this role to users usr1 and usr2
>GRANT hr TO usr1
>GRANT hr TO usr2
Part B)
//now granting update on column cust_mobile in table customer to user usr3
>GRANT UPDATE (cust_mobile) on customer to usr3;
//now user usr3 to give his privileges to other users, he can execute the same query above this statement just by replacing the username at the last. i.e (GRANT UPDATE (cust_mobile) on customer to usr1)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.