Oracle³£ÓÃÉÁ»Ø²Ù×÷
È·ÈÏÉÁ»ØÆôÓÃÖÐ
SHOW PARAMETER RECYCLEBIN; ÆôÓÃÉÁ»Ø
ALTER SYSTEM SET RECYCLEBIN = ON; ÉÁ»ØDROPµÄ±í
FLASHBACK TABLE xxx TO BEFORE DROP; ³¹µ×Çå³ýDROPµÄ±í,½«²»ÄÜÔÙÉÁ»Ø.
PURGE TABLE xxx; Ö±½Ó³¹µ×DROPµô±í
DROP TABLE xxx PURGE; Çå¿ÕËùÓÐDROPµÄ±í
PURGE RECYCLEBIN; È·ÈÏ×î´ó¿ÉÉÁ»Ø¶à¾Ã(ÃëÊý)֮ǰµÄDML²Ù×÷.(²»±£Ö¤)
SHOW PARAMETER undo_retention; ¸Ä±ä×î´ó¿ÉÉÁ»Ø¶à¾Ã֮ǰµÄDML²Ù×÷
ALTER SYSTEM SET undo_retention = 7200; ÉÁ»ØÎóDML²Ù×÷.ÒÔÎó²Ù×÷emp±íjob×Ö¶ÎΪÀý
a.)È·ÈÏÏàÓ¦µÄxid
SELECT versions_xid, job from emp VERSIONS BETWEEN SCN minvalue AND maxvalue;
b.)È·ÈÏÏàÓ¦ÐèÒªÖ´ÐеÄSQLÓï¾ä. ¼´ÊÇÏÂÃæ²éѯ½á¹û¼¯µÄUNDO_SQL×ֶεÄÄÚÈÝ
SELECT operation, start_scn, undo_sql from flashback_transaction_query WHERE xid = hextoraw('À´×ÔÉÏÒ»²éѯµÄxid');
c1.)Ö´ÐÐÏàÓ¦µÄSQLÓï¾ä. ±¾·½·¨±È½Ï׼ȷ,²»»áÓ°ÏìÖ®ºó·¢ÉúµÄÆäËû×ֶεı仯.
c2.)²»·½±ãÖ´ÐÐÉÏÒ»·½·¨Ê±,Ö´ÐÐÒÔÏÂÓï¾ä.×¢ÒâÔÚÏàÓ¦²Ù×÷Ö®ºó±íÖз¢ÉúµÄËùÓвÙ×÷¶¼½«±»»Ø¸´.
FLASHBACK TABLE emp TO SCN À´×ÔÉÏÒ»²éѯµÄSCNºÅ;
Èç¹ûÔÚÖ´ÐÐʱ³ö´í,²¢Ìáʾ¸Ã±íδÆôÓÃÐÐÒƹ¦ÄÜ(row movement),Ö´ÐÐÒÔÏÂÓï¾ä
ALTER TABLE emp ENABLE ROW MOVEMENT;
c3.)Ò²¿ÉÒÔ»Ö¸´µ½Ä³Ò»Ê±¼äµã,¸Ãʱ¼äµãÖ®ºóµÄËùÓвÙ×÷¶¼½«±»»Ø¸´.to_timestampÒ²¿ÉÒÔʹÓÃÍêÕû¸ñʽ('2009-12-04 22:16:20', 'YYYY-MM-DD HH:MI:SS');
FLASHBACK TABLE emp TO TIMESTAMP to_timestamp('17:35', 'hh23:mi');
Ïà¹ØÎĵµ£º
ËäȻѧϰJavaºÜ¾ÃÁË£¬×Ô¼ºÒ²Á¬½Ó¹ýһЩÊý¾Ý¿â£¬±ÈÈçmysqlÖ®ÀàµÄ£¬Èç½ñÄØ£¬Ò²Ñ§Ï°ÁËÒ»¶Îʱ¼äµÄOracle£¬È»¶øÄØ£¬½ñÌìÊÇÎÒµÚÒ»´ÎÁ¬½ÓOracle£¬ºÙºÙ£¬Ó¦¸Ã»¹²»ËãÌ«³Ù°É¡£
½ñÌìÄØ£¬Óе㱿׾£¬´ó¼ÒĪЦ£¡
ÎÒÕâÊÇÒ»¸ö²éѯÀý×Ó
Ê×ÏÈ£¬Ô ......
QQ:1156316388 Tel:010-51527259
Ò»¡¢Æô¶¯
Èý¸öÃüÁ
1¡¢sqlplux /nolog
2¡¢connect /as sysdba
3¡¢startup
¶þ¡¢¹Ø±Õ
1¡¢shutdown immediate;
[oracle@zhao ......
radhat 5.2Ï°²×°oracle10g
1¡¢ÏµÍ³ÐèÇó£º
Äڴ棺ÖÁÉÙ512mb£¬ÍƼöÓÃ1g£»
Ó²ÅÌ£º·þÎñÆ÷ÖÁÉÙ60g£»
£¨Ò»°ãÇé¿öÏÂÓ²¼þ¶¼ÄÜ·ûºÏÒªÇó£©
Èí¼þ°ü£ºglibc-2.3.2, libaio-0.3.96
½»»»¿Õ¼ä:
RAM: 0~256MB, SWAP: 3 ±¶ RAM ´óС
RAM: 256~512MB, SWAP: 2 ±¶ RAM ´óС
RAM: >=512MB, SWAP: 10 ......
sql loader ¹¤¾ßËü¿ÉÒÔ°ÑһЩÒÔÎı¾¸ñʽ´æ·ÅµÄÊý¾Ý˳ÀûµÄµ¼Èëµ½oracleÊý¾Ý¿âÖУ¬ÊÇÒ»ÖÖÔÚ²»Í¬Êý¾Ý¿âÖ®¼ä½øÐÐÊý¾ÝǨÒƵķdz£·½±ã¶øÇÒͨÓõŤ¾ß¡£È±µã¾ÍËٶȱȽÏÂý£¬ÁíÍâ¶ÔblobµÈÀàÐ͵ÄÊý¾ÝÓеãÂé·³¡£
ÔÚDOCÏÂÃæÊäÈ룺sqlldr userid=user/password@sid control=result.ctl
Àý×Ó:
SQLLDR USERID=zero/zero@ORACLE CONTROL ......
1.Èç¹ûÄãÎóɾ³ýÁËÊý¾Ý,²»Óú¦ÅÂ,¶Ìʱ¼äÄÚ»¹ÊÇ¿ÉÒÔ»Ö¸´µÄ.
select * from (select * from claim_monitor_dispatch as of timestamp to_date('20091203 08:30:00','yyyymmdd hh24:mi:ss')
)
where to_char(created_date,'yyyymmdd')='20090707'
2.Îóɾ³ý±íÖ®ºóµÄ»Ö¸´,»Ö¸´ÕûÕűí
flashback table name before dr ......