I have following assigment and I am not sure how to do this. I started database
ID: 3591286 • Letter: I
Question
I have following assigment and I am not sure how to do this. I started database and did spool command what are my next steps, please help!
Run sqlplus system/Oracle11 and SPOOL to c:cis421bS6spool.txt
User SCOTT, who had the password TIGER, changed it to something more secure, but has since forgotten it. If possible, demonstrate what you as a DBA can do to give SCOTT access to his account.
Other users need access to the tables belonging to IGGY. Create a role named CLERK that has SELECT privileges for tables PART, SUPPLIER, and QUOTE.
Assign the role CLERK to user SCOTT. Connect as user SCOTT and SELECT * FROM QUOTE.
Submit c:cis421bS6spool.txt
Explanation / Answer
Spool c:cis421bS6spool.txt
CREATE ROLE CLERK;
GRANT SELECT ON IGGY.PART TO CLERK;
GRANT SELECT ON IGGY.SUPPLIER TO CLERK;
GRANT SELECT ON IGGY.QUOTE TO CLERK;
GRANT CLERK TO SCOTT@'<hostname-name-here'>;
--login as SCOTT with pass set above;
SELECT * FROM QUOTE;
SPOOL OFF;