homework1-guidancel - rem C:\oracle\ora92\bin rem you can...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Create you SQL as txt file with a suffix of sql. That way you can perfect them until they work and after they work you can turn in the script files (upload them into you assignment area). You can demonstrate that your grants work as intended by connecting as the user with the privilege in question. See the example below. /* Connect to DBA account michael */ connect michael/m spool homework1a; show user; drop user ABLE; create user ABLE identified by a; grant select on student to able; grant create session to able; /* Connect to User account able */ connect able/a show user; select count(name) from michael.student; select count(name) from michael.faculty; spool off /* if you don't turn spool off the spool file is not closed if the spool file is not closed you will not get anything */ rem the spool file will be in the oracle home directory. rem example if you install Oracle on your C drive
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: rem C:\oracle\ora92\bin rem you can find your spool file on Windows systems by searching for you file name rem for example *homework1a*.* rem use an editor and combine your sql file and the spool file rem and you have everything you need SQL> show user; USER is "MICHAEL" SQL> drop user ABLE; User dropped. SQL> create user ABLE identified by a; User created. SQL> grant select on student to able; Grant succeeded. SQL> grant create session to able; Grant succeeded. SQL> /* Connect to User account able */ SQL> connect able/a Connected. SQL> show user; USER is "ABLE" SQL> select count(name) from michael.student; COUNT(NAME) ----------- 5 SQL> select count(name) from michael.faculty; select count(name) from michael.faculty * ERROR at line 1: ORA-00942: table or view does not exist SQL> spool off...
View Full Document

Page1 / 2

homework1-guidancel - rem C:\oracle\ora92\bin rem you can...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online