Top Banner
7 Copyright © 2009, Oracle. All rights reserved. Managing Database Storage Structures
20

Less07 storage

Oct 30, 2014

Download

Documents

Amit Bhalla

ORACLE 11g
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Less07 storage

7Copyright © 2009, Oracle. All rights reserved.

Managing Database Storage Structures

Page 2: Less07 storage

Copyright © 2009, Oracle. All rights reserved.7 - 2

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

Page 3: Less07 storage

Copyright © 2009, Oracle. All rights reserved.7 - 3

How Table Data Is Stored

Tablespace

Table A Table B

SegmentSegment

Rows

Columns

Table

Blocks

Row piece Extent

Page 4: Less07 storage

Copyright © 2009, Oracle. All rights reserved.7 - 4

Database Block: Contents

Block header

Free space

Row data

Growth

Page 5: Less07 storage

Copyright © 2009, Oracle. All rights reserved.7 - 5

Exploring the Storage Structure

Click the links to view detailed information.

Page 6: Less07 storage

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

Creating a New Tablespace

Page 7: Less07 storage

Copyright © 2009, Oracle. All rights reserved.7 - 7

Creating a New Tablespace

Choose the appropriate Storage Type

Page 8: Less07 storage

Copyright © 2009, Oracle. All rights reserved.7 - 8

Storage for Tablespaces

Page 9: Less07 storage

Copyright © 2009, Oracle. All rights reserved.7 - 10

Tablespaces in the Preconfigured Database

• UNDOTBS1

• USERS

• EXAMPLE (optional)

• SYSTEM

• SYSAUX

• TEMP

Page 10: Less07 storage

Copyright © 2009, Oracle. All rights reserved.7 - 12

Altering a Tablespace

Page 11: Less07 storage

Copyright © 2009, Oracle. All rights reserved.7 - 14

Actions with Tablespaces

Page 12: Less07 storage

Copyright © 2009, Oracle. All rights reserved.7 - 16

Dropping Tablespaces

Page 13: Less07 storage

Copyright © 2009, Oracle. All rights reserved.7 - 17

Viewing Tablespace Information

Page 14: Less07 storage

Copyright © 2009, Oracle. All rights reserved.7 - 18

Viewing Tablespace Contents

Page 15: Less07 storage

Copyright © 2009, Oracle. All rights reserved.7 - 19

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;

Page 16: Less07 storage

Copyright © 2009, Oracle. All rights reserved.7 - 21

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

SYSTEM tablespace

INVENTORY tablespace

Database

Page 17: Less07 storage

Copyright © 2009, Oracle. All rights reserved.7 - 22

Quiz

A database can have a mixture of Oracle-managed and unmanaged files.

1. True

2. False

Page 18: Less07 storage

Copyright © 2009, Oracle. All rights reserved.7 - 23

Quiz

Bigfile Tablespaces must have 1 file of at least 100 MB.

1. True

2. False

Page 19: Less07 storage

Copyright © 2009, Oracle. All rights reserved.7 - 24

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

Page 20: Less07 storage

Copyright © 2009, Oracle. All rights reserved.7 - 25

Practice 7 Overview:Managing Database Storage Structures

This practice covers the following topics:

• Creating tablespaces

• Gathering information about tablespaces