ISYS 366 Oracle Disk Internals 9232021 ISYS 366

  • Slides: 9
Download presentation
ISYS 366 Oracle Disk Internals 9/23/2021 ISYS 366, Oracle Disk Internals 1

ISYS 366 Oracle Disk Internals 9/23/2021 ISYS 366, Oracle Disk Internals 1

Oracle Database Structures n Tablespace n n n Logical, because the physical implementation is

Oracle Database Structures n Tablespace n n n 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). 9/23/2021 2

Oracle Database Structures n n CREATE TABLESPACE tablespace_name DATAFILE datafile_name … A word about

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

Creating a Tablespace: Example Create Tablespace bigtbs_01 Datafile ‘bigtbs_f 1. dat’ Size 20 M

Creating a Tablespace: Example Create Tablespace bigtbs_01 Datafile ‘bigtbs_f 1. dat’ Size 20 M AUTOEXTEND ON; 9/23/2021 4

Oracle Database Structures n Segments: A unit of logical storage n n One or

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

Oracle Database Structures n Extents n n One or more extents = Segment Data

Oracle Database Structures n Extents n n One or more extents = Segment Data blocks n n 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) 9/23/2021 6

Oracle Database Structures n Data blocks n Contains n n Row data Free space

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

Oracle Database Structures n Datafiles n n Operating system files One or more per

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

Oracle Database Structures n Initialization Parameter File (INIT<SID>. ORA) n n n D: orawindatabaseinitorcl.

Oracle Database Structures n Initialization Parameter File (INIT<SID>. ORA) n n n D: orawindatabaseinitorcl. ora Only read at startup time One per instance 9/23/2021 9