0% found this document useful (0 votes)
35 views7 pages

Full Tablespace Management Guide

This document provides a comprehensive guide to managing tablespaces in Oracle, including considerations for allocation, types of tablespaces, and methods for altering, dropping, and moving them. It outlines commands for adding datafiles, enabling autoextend, and retrieving tablespace information. Key tablespace types include permanent, temporary, undo, system, and bigfile, each serving distinct purposes in database management.

Uploaded by

ishababariya99
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views7 pages

Full Tablespace Management Guide

This document provides a comprehensive guide to managing tablespaces in Oracle, including considerations for allocation, types of tablespaces, and methods for altering, dropping, and moving them. It outlines commands for adding datafiles, enabling autoextend, and retrieving tablespace information. Key tablespace types include permanent, temporary, undo, system, and bigfile, each serving distinct purposes in database management.

Uploaded by

ishababariya99
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Comprehensive Guide to

Tablespaces in Oracle
Lecture Notes
Considerations for Managing
Tablespaces
• - Allocate sufficient space for anticipated data
growth.
• - Distribute tablespaces across storage devices
for performance.
• - Include in backup and recovery plans.
• - Enable/disable AUTOEXTEND as needed.
• - Use locally managed tablespaces for
efficiency.
Types of Tablespaces
• - Permanent: Store persistent database
objects.
• - Temporary: Temporary data during queries.
• - Undo: Maintain undo records for
transactions.
• - System: Stores Oracle's internal metadata.
• - Bigfile: Contains a single large datafile.
Altering Tablespaces
• - Adding Datafile:
• ALTER TABLESPACE mytsp ADD DATAFILE
'/path/mytsp02.dbf' SIZE 50M;
• - Enabling Autoextend:
• ALTER DATABASE DATAFILE '/path/mytsp.dbf'
AUTOEXTEND ON NEXT 10M;
• - Resizing Datafile:
• ALTER DATABASE DATAFILE '/path/mytsp.dbf'
RESIZE 100M;
Dropping Tablespaces
• - Remove tablespace and datafiles:
• DROP TABLESPACE mytsp INCLUDING
CONTENTS AND DATAFILES;
• - Ensure no objects use the tablespace before
dropping.
Moving Tablespaces Between
Databases
• - Export/Import Approach:
• 1. Export using expdp.
• 2. Import into target database.
• - Transportable Tablespaces:
• 1. Make tablespace read-only.
• 2. Export metadata and copy files.
• 3. Import into target database.
Retrieving Tablespace Information
• - Query Tablespace Usage:
• SELECT tablespace_name, free_space FROM
dba_tablespace_usage_metrics;
• - Datafile Information:
• SELECT file_name, size_mb FROM
dba_data_files;
• - Temporary Tablespace:
• SELECT tablespace_name, size_mb FROM
dba_temp_files;

You might also like