Your mission is to develop a single SQL script that will perform all the following tasks:
1. Create three (3) users (schema) as follows: (15 points)
User |
Password |
Other Parameters |
DBSEC_ADMIN |
tec5363admin |
Tablespace: USERS
Temporary tablespace: TEMP |
DBSEC_CLERK |
tec5363clerk |
Same as above |
DBSEC_DEV |
tec5363$dev |
Same as above |
2. Create three profiles as specified in the following table: (30 points)
Profile |
Resources |
Password |
DBSEC_ADMIN_PROF |
SESSIONS_PER_USER=5
CONNECT_TIME=8 hours
IDLE_TIME=1 hour |
PASSWORD_LIFE_TIME= 1 month
PASSWORD_GRACE_TIME=7 days |
DBSEC_DEV_PROF |
CONNECT_TIME=2 hours
IDLE_TIME=2 hours
CPU_PER_CALL=1 minute |
PASSWORD_LIFE_TIME= 1 month
PASSWORD_GRACE_TIME=14 days |
DBSEC_CLERK_PROF |
SESSIONS_PER_USER=1
CPU_PER_CALL=5 seconds
CONNECT_TIME=8 hours
IDLE_TIME=30 minutes
LOGICAL_READS_PER_CALL=10 0 Database Blocks
|
FAILED_LOGIN_ATTEMPTS=3
PASSWORD_LIFE_TIME= 1 month
PASSWORD_LOCK_TIME=3 days
PASSWORD_GRACE_TIME=14 days
|
3. Create roles with the following privileges: (30 points)
Role Name |
Privileges |
DBSEC_ADMIN_ROLE |
SELECT and ALTER on all DBSEC tables |
DBSEC_CLERK_ROLE |
SELECT, INSERT, and UPDATE on all DBSEC tables |
DBSEC_SUPERVISOR_ROLE |
SELECT, INSERT, UPDATE and DELETE on all DBSEC tables |
DBSEC_QUERY_ROLE |
SELECT only on CUSTOMER table owned by DBSEC |
4. Assign roles and profile to the users as in the following table: (15 points)
User Name |
Role |
Profile |
DBSEC_ADMIN |
DBSEC_ADMIN_ROLE |
DBSEC_ADMIN_PROF |
DBSEC_CLERK |
DBSEC_CLERK_ROLE |
DBSEC_CLERK_PROF |
DBSEC_DEV |
DBSEC_ADMIN_ROLE plus DBSEC_SUPERVISOR_ROLE |
DBSEC_DEV_PROF |
5. Connect as DBSEC_CLERK/tec5363clerk. (5 points)
6. Perform a simple query on SUPPLIER table owned by DBSEC. (5 points)
Tips: