You are on page 1of 13

6

Storage Structures

Copyright © 2004, Oracle. All rights reserved.


Objectives

After completing this lesson, you should be able to do


the following:
• Define the purpose of tablespaces and data files
• Create tablespaces
• Manage tablespaces
• Obtain tablespace information

6-2 Copyright © 2004, Oracle. All rights reserved.


Tablespaces and Data Files

Oracle stores data logically in tablespaces and


physically in data files.
• Tablespaces:
– Can belong to only one database at a time
– Consist of one or more data files
– Are further divided into logical units of storage
• Data files:
Database
– Can belong to only one
tablespace and one database Tablespace
– Are a repository for schema
object data
Data files

6-3 Copyright © 2004, Oracle. All rights reserved.


Space Management in Tablespaces

• Locally managed tablespace:


– Free extents are managed in the tablespace.
– Bitmap is used to record free extents.
– Each bit corresponds to a block or group of blocks.
– Bit value indicates free or used.
• Dictionary-managed tablespace:
– Free extents are managed by the data dictionary.
– Appropriate tables are updated when extents are
allocated or deallocated.

6-4 Copyright © 2004, Oracle. All rights reserved.


Creating a New Tablespace

6-5 Copyright © 2004, Oracle. All rights reserved.


Storage for Locally Managed Tablespaces

6-7 Copyright © 2004, Oracle. All rights reserved.


Tablespaces in the
Preconfigured Database

• SYSTEM • UNDOTBS1
• SYSAUX • USERS
• TEMP • EXAMPLE

6-9 Copyright © 2004, Oracle. All rights reserved.


Altering a Tablespace

6-11 Copyright © 2004, Oracle. All rights reserved.


Actions with Tablespaces

6-13 Copyright © 2004, Oracle. All rights reserved.


Dropping Tablespaces

6-15 Copyright © 2004, Oracle. All rights reserved.


Viewing Tablespace Information

6-16 Copyright © 2004, Oracle. All rights reserved.


Summary

In this lesson, you should have learned how to:


• Use tablespaces to separate data
• Create various types of tablespaces
• Manage tablespaces
• Obtain tablespace information

6-17 Copyright © 2004, Oracle. All rights reserved.


Practice 6:
Working with Tablespaces

This practice covers the following topics:


• Creating tablespaces
• Gathering information about tablespaces

6-18 Copyright © 2004, Oracle. All rights reserved.

You might also like