½Ã³ª¸®¿À04 - Closed Database Backup ¼öÇà
ÀÛ¼ºÀÚ °ü¸®ÀÚ ÀÛ¼º½Ã°£ 2003-06-13 15:34:55
 

Closed Database Backup ¼öÇà

1. ÇöÀç »ç¿ëÁßÀÎ database¸¦ ±¸¼ºÇÏ°í ÀÖ´Â files(Áï backupÀÇ ´ë»óÀÌ µÇ´Â files)À» È®ÀÎ

- Control FileÀÇ Á¤º¸¸¦ È®ÀÎ(V$CONTROLFILE, V$PARAMETER, init<SID>.ora, SHOW PARAMETER command)
  SVRMGR> select name from v$controlfile ;
 
- Log File Á¤º¸¸¦ È®ÀÎ(V$LOGFILE)
  SVRMGR> select member from v$logfile ;
 
- Data File Á¤º¸¸¦ È®ÀÎ(DBA_DATA_FIlES, V$DATAFILE)
  SVRMGR> select name from v$datafile ;
 
2. database¸¦ shutdown ½ÃŲ ÈÄ backupÀ» ¼öÇà(¸¸ÀÏÀÇ °æ¿ì¸¦ ´ëºñÇÏ¿© DONTOUCH¿Í BACKUP µð·ºÅ丮¿¡ °¢°¢ copy)

SVRMGR> shutdown immediate
$ cp -rp $HOME/DATA/* $HOME/DONTOUCH
$ cp $ORACLE_HOME/dbs/orapwSID $HOME/DONTOUCH
$ cp $ORACLE_HOME/dbs/initSID.ora $HOME/DONTOUCH
$ cp -rp $HOME/DATA/* $HOME/BACKUP
$ cp $ORACLE_HOME/dbs/orapwSID $HOME/BACKUP
$ cp $ORACLE_HOME/dbs/initSID.ora $HOME/BACKUP

3. Instance¸¦ ±âµ¿ ÈÄ, systemÀ» Á¤»óÀûÀ¸·Î ¿î¿ë

SVRMGR> startup
$ sqlplus scott/tiger
SQL> @ empdata.sql
SQL> @ deptdata.sql

4. USER_DATA tablespaceÀÇ open backup ¼öÇà

SQL> connect system/manager
SQL> alter tablespace user_data begin backup ;
SQL> ! cp $HOME/DATA/DISK2/user01.dbf $HOME/BACKUP/user01.bkp
SQL> alter tablespace user_data end backup ;

5. controlfileÀÇ backup ¼öÇà

SQL> alter database backup controlfile to trace ;
SQL> @ spid.sql  --> processÀÇ ¹øÈ£¸¦ È®ÀÎ
SQL> !
$ cp $HOME/TRACE
$ cp dba???_ora_xxxx.trc $HOME/BACKUP/cntrl1.trc
$ vi $HOME/BACKUP/cntrl1.trc
  -- comment lineÀ» ¸ðµÎ delete ÇÑ´Ù.
$ exit
SQL> alter database backup controlfile to '$HOME/BACKUP/cntrl1.bkp' ;


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