Oracel Recovery Structures and Processes
ÀÛ¼ºÀÚ °ü¸®ÀÚ ÀÛ¼º½Ã°£ 2003-07-31 16:39:07
 

1. Basic Oracle Architecture

  1) Oracle Instance
      ; SGA(System Global Area) + Backgroud Process(DBWR,LGWR,SMON,PMON,CKPT)
     
  2) Memory Structures
 
      - Data buffer cache : data file ·Î ºÎÅÍ ÀоîÁø ³»¿ëÀ» ÀúÀåÇÏ´Â memory °ø°£.
      - Log buffer : redo log file¿¡ ±â·ÏµÇ±â ÀüÀÇ data ÀúÀå °ø°£.
      - Large pool : UGA ´ë¿ëÀ¸·Î »ç¿ë, RMAN »ç¿ë½Ã I/O buffer·Î »ç¿ë.
      - Shared pool : ÇöÀç±îÁö »ç¿ëµÈ SQL ¹®ÀåÀ» ´Ù¸¥ userµµ »ç¿ë°¡´ÉÇÏ°Ô shared ÇÑ´Ù.
     
  3) Backgroud Processes
 
      - Database wirter(DBWR) : data buffer cache·Î ºÎÅÍ data file¿¡ dirty buffer¸¦ ±â·ÏÇÑ´Ù.
      - Log writer(LGWR) : log buffer·Î ºÎÅÍ redo log file¿¡ data¸¦ ±â·ÏÇÑ´Ù.
      - System monitor(SMON) : instance recovery¸¦ ÀÚµ¿À¸·Î ¼öÇàÇÑ´Ù.
      - Process monitor(PMON) : ºñÁ¤»óÀûÀ¸·Î Á¾·áµÈ user process¿¡ ÀÇÇØ »ý¼ºµÈ server process¸¦
                                cleanÇÑ´Ù.
      - Checkpoint(CKPT) : ÇöÀç redo log¿Í checkpoint ¹øÈ£·Î data file°ú control fileÀÇ
                          header¸¦ µ¿±âÈ­ÇÑ´Ù.
      - Archiver(ARCH) : redo log ¸¦ backup ÇÑ´Ù.
 
  4) User Process
      ; SQL*Plus, svrmgr, forms, reports, Enterprise Manager µîÀ» ½ÇÇà ½ÃÄ×À»¶§ »ý¼ºµÈ´Ù.
 
  5) Server Process
      ; User process°¡ ´øÁø ÁúÀÇ¿¡ ´ëÇÑ ÀÀ´äÀ» ÇØÁØ´Ù.
     
  6) Oracle Database
 
      - Data files : data ¹°¸®Àû ÀúÀå °ø°£. binary file
      - Redo logs : recovery¸¦ À§ÇÑ ÀúÀå°ø°£. binary file
      - Control files : databaseÀÇ ¹°¸®Àû ±¸Á¶ ÀúÀå °ø°£. binary file
      - Parameter file : instance config¸¦ ÇÒ ¼ö ÀÖ´Â file. text file
      - Password file : user°¡ database¸¦ start, stop, recover ÇÒ ¼ö ÀÖ´Â Á¤º¸¸¦ °®°í ÀÖ´Â °ø°£.
                        binary file
      - Archive logs : redo log file ÀÇ backup file. binary file
 
  7) Dynamic Views
 
      - V$SGA : shared pool, log buffer, data buffer cache ¿¡ ´ëÇÑ instance size Á¤º¸
      - V$INSTANCE : instance mode, instance name, startup time, host name µîÀÇ instance ¿¡
                    ´ëÇÑ Á¤º¸
      - V$PROCESS : instance¿¡ ÀÇÇØ »ý¼ºµÈ background ¿Í server process Á¤º¸
      - V$DATABASE : database ¿¡´ëÇÑ Á¤º¸.(database name, database identifier, creation date,
        control file creation date ¿Í time, last database checkpoint...)
      - V$DATAFILE : data file ÀÇ location °ú name ¿¡ ´ëÇÑ Á¤º¸.
     
2. ARCH process
  ; log°¡ switch µÇ¾úÀ»¶§ log¸¦ ´Ù¸¥°÷¿¡ copyÇÏ´Â ÀÏÀ» ÇÑ´Ù.
 
  - ARCH process¿Í ARCHIVE_LOG_MODE°¡ Á¶È­¸¦ À̷궧 ÀûÀýÇÑ »ç¿ë¹ýÀÌ´Ù.
  - LOG_ARCHIVER_DEST parameter : copyÇÒ¶§ µð·ºÅ丮 À§Ä¡ ÁöÁ¤.

3. CKPT process
  ; ÇöÀç redo log¿Í checkpoint ¹øÈ£·Î data file°ú control fileÀÇ header¸¦ µ¿±âÈ­ÇÑ´Ù.
 
  * Checkpoint´Â ¾ðÁ¦ ¹ß»ýÇϳª?
    - log switch ½Ã
    - shutdown abort¸¦ Á¦¿ÜÇÑ shutdown ½Ã
    - ALTER SYSTEM CHECKPOINT command¸¦ DBA°¡ ³¯·ÈÀ» ¶§
    - backup ÀÌ ½ÇÇàµÉ ¶§
    - LOG_CHECKPOINT_TIMEOUT parameter¿¡¼­ ¼³Á¤ÇÑ °ªÀÌ ¼öÇàµÉ ¶§.
    - LOG_CHECKPOINT_INTERVAL parameter¿¡¼­ ¼³Á¤ÇÑ °ªÀÌ ¼öÇàµÉ ¶§.

4. Data files
  ; system°ú user data¸¦ ÀúÀåÇÏ°í ÀÖ´Â file.
    commit µÈ data¸¦ °®°í ÀÖÁö¸¸, uncommitµÈ data µµ °®°í ÀÖÀ» ¼ö ÀÖ´Ù.
   
  * uncommit µÈ Á¤º¸¸¦ ÀúÀåÇÏ´Â ¿¹
    update data¸¦ commit ÇÏÁö ¾Ê°í Àå½Ã°£ wait»óÅ¿¡ ÀÖÀ¸¸é, ´Ù¸¥ userµéÀÌ °è¼Ó update¸¦
    ÇÏ°í Àֱ⠶§¹®¿¡ buffer°¡ ¹Ð·Á¼­ °á±¹¿¡´Â data file¿¡ ¾²°ÔµÈ´Ù.
    (À̶§, lock Á¤º¸¸¦ °®°í ÀúÀåµÈ´Ù.)
   
5. Configuring Tablespaces
  ; tablespace´Â 2°³ ÀÌ»óÀÇ data fileÀ» °®´Â´Ù.
 
  - SYSTEM : system °ú user data°¡ °°Àº tablespace¸¦ °®°í ÀÖ´Ù¸é backup°ú recoveryÇϱⰡ ´õ
              º¹ÀâÇØÁø´Ù.
  - TEMPORARY : sortÁ¤º¸¸¦ °®°í ÀÖ´Ù. º¹±¸½Ã recoveryÇÏ´Â °Íº¸´Ù, createÇÏ´Â°Ô ´õ ÁÁ´Ù.
  - ROLLBACK SEGMENTS
  - READ ONLY DATA : backuup ½Ã°£À» ÁÙÀÏ ¼ö ÀÖ´Ù.
  - HIGHLY VOLATILE DATA : recover ½Ã°£À» ÁÙÀÏ ¼ö ÀÖ´Ù.
  - INDEX DATA : recoveryÇÏ´Â °Íº¸´Ù, createÇÏ´Â°Ô ´õ ÁÁ´Ù.
 
6. Multiplexed Redo Log Files
  ; log file À» µ¿½Ã¿¡ ¿©·¯°³¿¡ ±â·ÏÇϱ⠶§¹®¿¡ file Çϳª°¡ ±úÁ®µµ Á¤»óÀûÀ¸·Î ÀÛµ¿µÈ´Ù.
 
  * Dynamic Views
    - V$LOG : group no, log sequence no, group size, mirror°¹¼ö, status(CURRENT or INACTIVE),
              ckpt change no..
    - V$LOGFILE : name, status(STALE or INVALID), log file member
    - V$LOG_HISTORY : control fileÀÇ log history Á¤º¸
   
7. Control file ¼Ó¼º

  - ¸ðµç database file °ú log fileÀº id¸¦ ÇÊ¿ä·Î ÇÑ´Ù.
  - database nameÀ» ÀúÀåÇÑ´Ù.
  - checkpoint ¿Í log sequence Á¤º¸¸¦ °®°í ÀÖ´Ù.
  - 2°³ ÀÌ»óÀÇ control fileÀº °¢°¢ ´Ù¸¥ disk¿¡ ÀúÀåÇÏ´Â°Ô ÁÁ´Ù.
  - databaseÀÇ Timestamp¸¦ ÀúÀåÇÑ´Ù.
  - Recovery Manager(RMAN) »ç¿ë½Ã backup Á¤º¸¸¦ °®°í ÀÖ´Ù.


¸ñ·Ï | ÀÔ·Â | ¼öÁ¤ | ´äº¯ | »èÁ¦