I have following assigment and I am not sure how to do this. I have some steps d
ID: 3593537 • Letter: I
Question
I have following assigment and I am not sure how to do this.
I have some steps done to it already just need someone to see if this is actually correct and what goes into the section that says "
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
This is my 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'>; -------------------------------> what I should put as a host-name-here??
--login as SCOTT with pass set above;
SELECT * FROM QUOTE;
SPOOL OFF;
Explanation / Answer
I understand that you'd like to get the hostname that is to be used for oracle commands.
The host name is you computer name. If youre still having trouble in getting the username.
Kindly use the below SQL command in Oracle command window to get the hostname.
select SYS_CONTEXT('USERENV', 'HOST') host_name from dual;
using the output you can use the hostname in the various commands that require host name.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.