| CS 3540 |
Week 6 Lab Part 2
Complete in class |
This assignment is designed to help you to setup an environment to facilitate performance testing.
- Use SQL*Plus to connect to the database as SYSTEM.
- Begin spooling to file CS3540Lab6p2.txt
- Drop and/or Delete any tablespaces, users and/or objects left
over from prior labs.
- Create a new Tablespace named TBSizeTest.
Set the size to 100M.
Name the datafile TBSizeTest01.dbf and place it with the other
datafiles in your OFA tree.
(hint: Find CREATE TABLESPACE syntax in your text
page 79 and/or Internet resources)
- Check DBA_TABLESPACES and/or OFA tree to insure that the tablespace
was created correctly.
- Create a new user named SmallUser with a password of testing123
Set the user's default tablespace to be TBSizeTest.
Set the temporary tablespace to be temp
- Give the user a 1M quota on tablespace TBSizeTest.
- Give the new user privileges to create a session, connect,
create a cluster, create a table
create a sequence and to create a procedure.
- Connect as SmallUser.
- Ensure that you are connected as SmallUser by querying the
user_users table.
(note that you can also use the SQL*Plus command: show
user)
- Download and execute the script: CS3540PLSQL1.TXT
(note that the quota is exceeded)
- Query the table TESTTABLE to determine the number of rows that
were created by the procedure.
- Create a new user named BigUser with a password of testing123
Set the user's default tablespace to be TBSizeTest.
Set the temporary tablespace to be temp
- Give the user a 50M quota on tablespace TBSizeTest.
- Give the new user privileges to create a session, connect,
create a cluster, create a table
create a sequence and to create a procedure.
- Connect as BigUser.
(always ensure that you are connected as the correct
user)
- Execute the script CS3540PLSQL1.TXT
(this time it should run to completion)
- Query the table TESTTABLE to determine the number of rows that
were created by the procedure.
- Connect as system
- Query DBA_SEGMENTS to determine the size of TESTTABLE
- End Spooling
- Research: Why did the script fail the first time?
- Research: What is the difference between a segment and an extent?
- Research: When an object such as a table is dropped, what happens
to the space it was using?
Use Assignment Uploader to
submit