ISYS366, Oracle Disk Internals 4/30/2019 ISYS366, Oracle Disk Internals
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). 4/30/2019
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/30/2019
Creating a Tablespace: Example Create Tablespace bigtbs_01 Datafile ‘bigtbs_f1.dat’ Size 20M AUTOEXTEND ON; 4/30/2019
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 4/30/2019
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) 4/30/2019
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 4/30/2019
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) 4/30/2019
Oracle Database Structures Initialization Parameter File (INIT<SID>.ORA) D:\orawin\database\initorcl.ora Only read at startup time One per instance 4/30/2019