1 / 9

ISYS366

Learn about Oracle database structures including tablespace, segments, and datafiles. Understand how to create tablespaces, manage segments, and work with data blocks and extents.

scherer
Download Presentation

ISYS366

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ISYS366 Oracle Disk Internals ISYS366, Oracle Disk Internals

  2. Oracle Database Structures • Tablespace • Logical, because the physical implementation is the datafile. • Corresponds not only to one or more tables but also to one or more datafiles. • BUT, a table cannot span more than one tablespace. • SYSTEM is the first tablespace. Holds data dictionary. • Can be taken off line or dropped (except SYSTEM).

  3. Oracle Database Structures • CREATE TABLESPACE tablespace_name DATAFILE datafile_name … • A word about raw files • UNIX and NT • Eliminates OS I/O • Backup Issues

  4. Creating a Tablespace: Example Create Tablespace bigtbs_01 Datafile ‘bigtbs_f1.dat’ Size 20M AUTOEXTEND ON;

  5. Oracle Database Structures • Segments: A unit of logical storage • One or more segments = Tablespace • Data segments • holds table data • one per table • Rollback segments • holds information used to make rollbacks • Index segment • holds data used in indexes • Temporary segment • used for executing certain SQL operations, such as sorting, that cannot be performed in memory

  6. Oracle Database Structures • Extents • One or more extents = Segment • Data blocks • One or more data blocks = Extent • Size depends on operating system for a default (may be overridden by changing DB_BLOCK_SIZE in INITX.ORA)

  7. Oracle Database Structures • Data blocks • Contains • Row data • Free space • Block information: block address (in datafile), segment • Type, tables and rows that use the block and other header information

  8. Oracle Database Structures • Datafiles • Operating system files • One or more per tablespace • Datafile = is made up of segments • Redo logfiles • Restore the database to last physical backup • Restore the database to point in time of failure (must be running in ARCHIVELOG mode)

  9. Oracle Database Structures • Initialization Parameter File (INIT<SID>.ORA) • D:\orawin\database\initorcl.ora • Only read at startup time • One per instance

More Related