1¡¢Çл»·þÎñÆ÷¹éµµÄ£Ê½£¬Èç¹ûÒѾÊǹ鵵ģʽ¿ÉÌø¹ý´Ë²½£º
%sqlplus /nolog £¨Æô¶¯sqlplus£©
SQL> conn / as sysdba £¨ÒÔDBAÉí·ÝÁ¬½ÓÊý¾Ý¿â£©
SQL> shutdown immediate£» £¨Á¢¼´¹Ø±ÕÊý¾Ý¿â£©
SQL> startup mount £¨Æô¶¯ÊµÀý²¢¼ÓÔØÊý¾Ý¿â£¬µ«²»´ò¿ª£©
SQL> alter database archivelog£» £¨¸ü¸ÄÊý¾Ý¿âΪ¹éµµÄ£Ê½£©
SQL> alter database open£» £¨´ò¿ªÊý¾Ý¿â£©
SQL> alter system archive log start£» £¨ÆôÓÃ×Ô¶¯¹éµµ£©
SQL> exit £¨Í˳ö£©
2¡¢Á¬½Órman
rman or /data/app/oracle/product/11.2.0/dbhome_1/bin/rman
RMAN> connect target sys/system@orcl ¨CÁ¬½Óµ½Ä¿±êÊý¾Ý¿â
3¡¢±¸·Ý±í¿Õ¼ä tpm
RMAN>backup tablespace tpm plus archivelog delete input;
4¡¢»Ö¸´±í¿Õ¼ä
SQL>alter tablespace tpm offline for recover; //ʹtpm offline
RMAN>restore tablespace tpm
RMAN>recover tablespace tpm
RMAN>alter tablespace tpm online; //tpm online
5¡¢±í¿Õ¼äµÄÔöÁ¿±¸·Ý
µÚÒ»ÌìµÄÔöÁ¿»ù±¾±¸·Ý£º
RMAN> backup incremental level=0 tablespace tpm plus archivelog delete input;
µÚ¶þÌìµÄÔöÁ¿²îÒ챸·Ý£º
RMAN> backup incremental level=2 tablespace tpm plus archivelog delete input;
µÚÈýÌìµÄÔöÁ¿²îÒ챸·Ý£º
RMAN> backup incremental level=2 tablespace tpm plus archivelog delete input;
µÚËÄÌìµÄÔöÁ¿²îÒ챸·Ý£º
RMAN> backup incremental level=1 tablespace tpm plus archivelog delete input;
µÚÎåÌìµÄÔöÁ¿²îÒ챸·Ý£º
RMAN> backup incremental level=2 tablespace tpm plus archivelog delete input;
µÚÁùÌìµÄÔöÁ¿²îÒ챸·Ý£º
RMAN> backup incremental level=2 tablespace tpm plus archivelog delete input;
µÚÆßÌìµÄÔöÁ¿²îÒ챸·Ý£º
RMAN> backup incremental level=0 tablespace tpm plus archivelog delete input;
×¢£ºÐèÒªÓÃlinux crontab À´Ã¿Ìì×Ô¶¯ÔËÐÐÉÏÃæµÄ´úÂë
¸½:´´½¨rman Ŀ¼±í¿Õ¼äºÍÓû§
1¡¢ create tablespace rman_ts datafile ¡®/data/app/oracle/oradata/rman/rman_ts.dbf¡¯ size20M;
2¡¢ create user rman identified by rman default tablespace rman_ts temporary tablespace temp quota unlimited on rman_ts£»
3¡¢ grant recovery_catalog_owner to rman£»
4¡¢ grant connect, resource to rman