Vous êtes sur la page 1sur 20

7

Managing Database Storage Structures

Copyright 2009, Oracle. All rights reserved.

Objectives
After completing this lesson, you should be able to:
Describe the storage of table row data in blocks
Create and manage tablespaces
Obtain tablespace information

7-2

Copyright 2009, Oracle. All rights reserved.

How Table Data Is Stored


Columns

Table A

Blocks

Table B
Rows

Segment

Segment

Table
Tablespace

Row piece

7-3

Copyright 2009, Oracle. All rights reserved.

Extent

Database Block: Contents

Block header
Growth
Free space

Row data

7-4

Copyright 2009, Oracle. All rights reserved.

Exploring the Storage Structure

Click the links to view


detailed information.

7-5

Copyright 2009, Oracle. All rights reserved.

Creating a New Tablespace

7-6

Copyright 2009, Oracle. All rights reserved.

Creating a New Tablespace

Choose the appropriate


Storage Type

7-7

Copyright 2009, Oracle. All rights reserved.

Storage for Tablespaces

7-8

Copyright 2009, Oracle. All rights reserved.

Tablespaces in the Preconfigured Database

7 - 10

SYSTEM
SYSAUX
TEMP

UNDOTBS1
USERS
EXAMPLE (optional)

Copyright 2009, Oracle. All rights reserved.

Altering a Tablespace

7 - 12

Copyright 2009, Oracle. All rights reserved.

Actions with Tablespaces

7 - 14

Copyright 2009, Oracle. All rights reserved.

Dropping Tablespaces

7 - 16

Copyright 2009, Oracle. All rights reserved.

Viewing Tablespace Information

7 - 17

Copyright 2009, Oracle. All rights reserved.

Viewing Tablespace Contents

7 - 18

Copyright 2009, Oracle. All rights reserved.

Oracle-Managed Files (OMF)


Specify file operations in terms of database objects rather than
file names.
Parameter

Description

DB_CREATE_FILE_DEST

Defines the location of the default file


system directory for data files and
temporary files

DB_CREATE_ONLINE_LOG_DEST_n

Defines the location for redo log files and


control file creation

DB_RECOVERY_FILE_DEST

Default location for the fast recovery


area

Example:
SQL> ALTER SYSTEM SET DB_CREATE_FILE_DEST = '+DATA';
SQL> CREATE TABLESPACE tbs_1;
7 - 19

Copyright 2009, Oracle. All rights reserved.

Enlarging the Database


You can enlarge the database in the following ways:
Creating a new tablespace
Adding a data file to an existing smallfile tablespace
Increasing the size of a data file
Providing for the dynamic growth of a data file
Database

SYSTEM
tablespace

7 - 21

INVENTORY
tablespace

Copyright 2009, Oracle. All rights reserved.

Quiz
A database can have a mixture of Oracle-managed and
unmanaged files.
1. True
2. False

7 - 22

Copyright 2009, Oracle. All rights reserved.

Quiz
Bigfile Tablespaces must have 1 file of at least 100 MB.
1. True
2. False

7 - 23

Copyright 2009, Oracle. All rights reserved.

Summary
In this lesson, you should have learned how to:
Describe the storage of table row data in blocks
Create and manage tablespaces
Obtain tablespace information

7 - 24

Copyright 2009, Oracle. All rights reserved.

Practice 7 Overview:
Managing Database Storage Structures
This practice covers the following topics:
Creating tablespaces
Gathering information about tablespaces

7 - 25

Copyright 2009, Oracle. All rights reserved.

Vous aimerez peut-être aussi