| CS 3540 |
Week 5 Oracle Lab
Due Feb 8th before class |
This assignment uses the Oracle DBA and V$ views to obtain information about your database.
- Connect to your database as SYSTEM
- Start spooling to the file CS3540W5Spool.txt
- Query the V$DATABASE view to determine the name, creation date and open mode of your database
(hint: you can always use the DESC command to find the column names for views and tables)
- Query the V$DATAFILE view to list the file number, name, status and size of the database's files;
(use the syntax "column <column name> format <format specs>" to avoid column wrapping in queries)
(example: column name format a35 )
- Query the V$INSTANCE view to determine all of the information about your current instance.
- Query the V$SGA view to display the summary statistics for the allocation of space in the SGA.
-
Use the DBA_TABLESPACES view to list the names of the tablespaces in your database.
-
Use the DBA_USERS view to list the users in your database
- Create a user named TESTUSER with a password of testing123.
Assign TESTUSER to default to the USERS tablespace and to the temporary tablespace TEMP.
(hint: Chapter 10 )
- Query the DBA_USERS view to see that the TESTUSER was created correctly and is assigned to the specified tablespaces.
- Query the DBA_SYS_PRIVS view to see what privileges TESTUSER has
- Grant privileges to TESTUSER so that the user can create a session, create tables, create views, create indexes, create clusters and create sequences.
- Query DBA_SYS_PRIVS to insure that the specified privileges were correctly granted.
- Query DBA_TS_QUOTAS to determine TESTUSER's quota on USERS
- Assign TESTUSER a quota on USERS of 100M
- Check DBA_TS_QUOTAS to insure that the quota was placed correctly
Use "Spool Off" to stop spooling.
- Run your Dreamhome Rentals database script file to create the Dreamhome Rentals database.
(file can be downloaded from http://rbhilton.com/wsucs/cs3540/cs3540DreamHomeDBCR.sql)
- Research: How could you determine how much space is being used by the Dreamhome Tables?
- Research: How many DBA and V$ tables are available in Oracle 10g?
- Research: What formatting commands are available in SQL*Plus?
Submit your spool file along with a document (CS3540W5Research.doc) containing results to the research questions using the assignment uploader.
Use Assignment Uploader to
submit