Oracle Êý¾Ý¿âÔÚarchivelogģʽÏÂÎļþ¶ªÊ§µÄ»Ö¸´
step1
ÔÚÁª»úʱ×ö±¸·Ý(»ùÓÚ»Ö¸´Ä¿Â¼µÄ±¸·Ý£¬×öÁË¿ØÖÆÎļþµÄ×Ô¶¯±¸·Ý)£¬°üÀ¨ËùÓÐÊý¾ÝÎļþ¼°¹éµµµÄÈÕÖ¾Îļþ£º
rman>run{
backup format 'c:\bak\test_full_%u' database;
sql 'alter system archive log current';
backup format 'c:\bak\test_log_%u' archivelog all delete input;
}
step2
sql>insert into lsf.aa values('a','b');
sql>commit;
sql>alter system switch logfile;
rman>shutdown immediate;
ÊÖ¶¯É¾³ýËùÓÐÎļþ(¿ØÖÆÎļþ¡¢Êý¾ÝÎļþ¡¢Áª»úÈÕÖ¾Îļþ)
step3
RMAN> startup nomount;
RMAN> restore controlfile from autobackup;
RMAN> alter database mount;
step4
RMAN> list backup of archivelog from time='sysdate-2';
Ïà¹ØÎĵµ£º
ÎÊ£ºÊ²Ã´ÊÇNULL£¿
´ð£ºÔÚÎÒÃDz»ÖªµÀ¾ßÌåÓÐʲôÊý¾ÝµÄʱºò£¬Ò²¼´Î´Öª£¬¿ÉÒÔÓÃNULL£¬ÎÒÃdzÆËüΪ¿Õ£¬ORACLEÖУ¬º¬ÓпÕÖµµÄ±íÁ㤶ÈΪÁã¡£
ORACLEÔÊÐíÈκÎÒ»ÖÖÊý¾ÝÀàÐ͵Ä×Ö¶ÎΪ¿Õ£¬³ýÁËÒÔÏÂÁ½ÖÖÇé¿ö£º
1¡¢Ö÷¼ü×ֶΣ¨primary key£©£¬
2¡¢¶¨ÒåʱÒѾ¼ÓÁËNOT NULLÏÞÖÆÌõ¼þµÄ×Ö¶Î
˵Ã÷£º
1¡¢µÈ¼ÛÓÚûÓÐÈκÎÖµ¡¢ÊÇδ֪ ......
Êý¾Ý¿âÃû¡¢ÊµÀýÃû¡¢Êý¾Ý¿âÓòÃû¡¢È«¾ÖÊý¾Ý¿âÃû¡¢·þÎñÃû£¬
ÕâÊǼ¸¸öÁîºÜ¶à³õѧÕßÈÝÒ×»ìÏýµÄ¸ÅÄî¡£ÏàÐźܶà³õѧÕ߶¼ÓëÎÒÒ»Ñù±»±êÌâÉÏÕâЩ¸ö¸ÅÄî¸ãµÃһͷÎíË®¡£ÎÒÃÇÏÖÔÚ¾ÍÀ´°ÑËüÃÇŪ¸öÃ÷°×¡£
Ò»¡¢Êý¾Ý¿âÃû
ʲôÊÇÊý¾Ý¿âÃû£¿
Êý¾Ý¿âÃû¾ÍÊÇÒ»¸öÊý¾Ý¿âµÄ±êʶ£¬¾ÍÏñÈ˵ÄÉí·ÝÖ¤ºÅÒ»Ñù¡£ËûÓòÎÊýDB_NAME±íʾ£¬Èç¹ûһ̨»úÆ÷ÉÏ×°ÁË ......
Ñ¡Ôñ10gÊÇÒòΪ¶ÔÍø¸ñ¼¼Êõ±È½ÏºÃÆ棬ºÃÏñ»¹Ã»µÃµ½¹ã·ºÓ¦Óã¬Ò²¾ÍÎÞËùνÓëÇ°Ãæ°æ±¾ÓкܴóÇø±ðÁË¡£
ÔÚѸÀ×ÉÏÏÂÁ˸öÈí¼þ£¬ÔËÐÐsqlplusw£¬È»ºóÕÕ×ÅÊ飬¿ñÇÃÁËÒ»·£¬ÓÐÔÚÍøÉÏÏÂÁ˸öÊÓƵ½Ì³Ì£¨MLDNħÀֿƼ¼_Oracle¿ÎÌã©£¬½²µÃͦºÃµÄ£¬¾ÍÊÇʱ¼ä³¤Á˵㣬²»Èç¿´ÊéÀ´µÃ¿ì¡£·´ÕýÏÖÔÚÖ»ÊÇÏëÊìϤһÏ»ù±¾Óï¾ä¡£
¿´ÁËÁ½ÌìÊéÁË¡£Á˽âÁËÒ» ......
Oracle ¼ì²é¶ÔÏó
8.3. Oracle¶ÔÏóµÄ״̬
¹²·ÖÁù¸ö²¿·Ö£¬·Ö±ðΪ£º¼ì²éOracle¿ØÖÆÎļþ״̬£»¼ì²éOracleÔÚÏßÈÕ־״̬£»¼ì²éOracle±í¿Õ¼äµÄ״̬£»¼ì²éOracleËùÓÐÊý¾ÝÎļþ״̬£»¼ì²éOracleËùÓÐ±í¡¢Ë÷Òý¡¢´æ´¢¹ý³Ì¡¢´¥·¢Æ÷¡¢°üµÈ¶ÔÏóµÄ״̬£»¼ì²éOracleËùÓлعö¶ÎµÄ״̬¡£
8.3.1. Oracle¿ØÖÆÎļþ״̬
¼ì²é¿ØÖÆÎļþ×´Ì ......
ÏÔʾ±íÐÅÏ¢
1,ÏÔʾÌض¨Óû§µÄ±í
DAT_TABLES ¿ÉÒÔÏÔʾËùÓÐÊý¾Ý¿â±íµÄÏêϸÐÅÏ¢
ALL_TABLES ¿ÉÒÔÏÔʾÓû§¿ÉÒÔ·ÃÎʵÄËùÓбíÐÅÏ¢
USER_TABLES ¿ÉÒÔÏÔʾµ±Ç°Óû§ËùÓбíµÄÐÅÏ¢
SELECT table_name,num_rows,pct_free,blocks,chain_cnt
from dba_tables WHERE owner=’SCOTT’;
Table_nameÓÃÓÚ±êʶ±íÃû,n ......