Oracle Rman¿çresetlogs°æ±¾»Ö¸´
RMAN> startup nomount;
RMAN> sql 'alter session set nls_date_format=''yyyy-mm-dd hh24:mi:ss''";
--ÒòΪrmanĬÈÏÒÔ»·¾³±äÁ¿À´¶Áȡʱ¼ä¸ñʽ£¬ÓësqlplusµÄ¹Ì¶¨¸ñʽ²»Í¬£¬ËùÒÔ£¬´Ë´¦ÒªÉ趨ʱ¼ä¸ñʽ±äÁ¿¡£
RMAN> restore controlfile from autobackup until time '2009-03-10 18:15:00';
×¢Ò⣬ÈÔÈ»ÐèÒªÊʵ±µÄ»¹Ô¿ØÖÆÎļþ¡£
RMAN> alter database mount;
RMAN> restore database;
RMAN> sql "alter session set nls_date_format=''yyyy-mm-dd hh24:mi:ss''";
RMAN> recover database until time '2009-03-10 18:15:00';
´Ëʱ£¬³öÏÖÒÔÏ´íÎó£º
RMAN-03002: recover ÃüÁî (ÔÚ 03/10/2009 19:21:19 ÉÏ) ʧ°Ü
RMAN-20207: UNTIL TIME »ò RECOVERY WINDOW ÔÚ RESETLOGS ʱ¼ä֮ǰ
20207´íÎó£ºÄ¬ÈϵÄÈÏΪuntil time»òRECOVERY WINDOWµÄʱ¼ä²»ÄÜÔçÓÚresetlogsµÄʱ¼ä. ¼ÈÈ»resetlogsÁË£¬¾Í²»ÈÏʶ֮ǰµÄ¹éµµÈÕÖ¾ÐÅÏ¢ÁË¡£°Ñ֮ǰµÄ¹éµµÈÕÖ¾ÅųýÔڿɹ©»Ö¸´µÄÑ¡ÔñÖ®ÍâÁË¡£ÕâÖ»ÊÇĬÈϵÄÐÐΪ£¬¿ÉÄÜ´¦ÓÚ½Úʡϵͳ×ÊÔ´µÄ¿¼ÂÇ£¬±Ï¾¹resetlogs֮ǰµÄÊý¾ÝÔÙÀûÓÿÉÄܺÜС¡£
Æä½â¾ö¿É°´ÒÔÏ·½·¨´¦Àí£º
1.ÕÒµ½Êý¾Ý¿âµÄµ±Ç°incarnationºÅ£º
RMAN> list incarnation of database "test";
Êý¾Ý¿âÔÐÍÁбí
DB ¹Ø¼ü×Ö Inc ¹Ø¼ü×Ö DB Ãû DB ID STATUS ÖØÖà SCN ÖØÖÃʱ¼ä
------- ------- -------- ---------------- --- ---------- ----------
1 1 TEST 1978860036 PARENT 1 30-8ÔÂ -05
2 2 TEST 1978860036 PARENT 534907 05-3ÔÂ -09
3 3 TEST 1978860036 PARENT 762990 10-3ÔÂ -09
4 4 TEST  
Ïà¹ØÎĵµ£º
Ïȹ¹ÔìÒ»¸ö±í:
create table emp2(
id number(2),
name varchar(10),
currdate date,
action varchar2(1)
)
´´½¨´¥·¢Æ÷£º
create or replace trigger d_i_u_emp2
after insert or update or delete on mysort
begin
if inserting then
insert into emp2 values (12,'dog',sysdate,'i');
elsif deleting then ......
ÎҵĻúÆ÷¸ÄÁ˼ÆËã»úÃû³Æ£¬ÔÙ¿ª»úʱ£¬oracle³öÏÖÎÊÌ⣬¿ª»úʱÀÏÊDZ¨“agntsrvc.exe³ö´í”£¬¾¹ýËÑË÷·¢ÏÖÊÇÏÂÁÐÎÊÌ⣺
1.agntsrvc.exeÊÇOracle Intelligent Agent·þÎñ¶ÔÓ¦µÄ³ÌÐò¡£
2.Òò´Ë·þÎñÊÇ×Ô¶¯Æô¶¯µÄ£¬ËùÒÔÒ»°ã¶àÔÚµçÄÔÆô¶¯Ê±µ¯³öϵͳ´íÎó¡£
3.ÎÊÌâ´¦Àí£º£¨±¾±¸·ÝÑø³Éϰ¹ßŶ£©
¡¡É¾³ýÁË %ORACLE_HOME%/ora ......
OracleϵÁУºÍ¼Æ¬µÄ´æ´¢
Ò»£ºÊ²Ã´ÊÇ´ó¶ÔÏ󣬴ó¶ÔÏó»ù±¾²Ù×÷£¿
²Î¼ûÎÒµÄBLOG£ºOracleϵÁУºLOB´ó¶ÔÏó´¦Àí
http://blog.csdn.net/qfs_v/archive/2008/05/21/2464599.aspx
¶þ£¬Í¼Æ¬µÄ´æ´¢»ò¶þ½øÖÆÎļþµÄ´æ´¢
1£¬ÏȲåÈëÆÕͨÊý¾Ý£¬Óöµ½´ó¶ÔÏóÁÐʹÓÃempty_blob()¹¹Ôì¿ÕµÄÖ¸Õë¡£
Àý× ......
1. ²éѯÊý¾Ý¿âÏÖÔڵıí¿Õ¼ä
select tablespace_name, file_name, sum(bytes)/1024/1024 table_size from dba_data_files group by tablespace_name,file_name;
2. ½¨Á¢±í¿Õ¼ä
CREATE TABLESPACE data01 DATAFILE '/oracle/ ......
Oracle Database 10g ÌṩÁËÒ»¸öÏÔÖø¸Ä½øµÄ¹¤¾ß£º×Ô¶¯¹¤×÷¸ºÔØÐÅÏ¢¿â (AWR:Automatic Workload Repository)¡£Oracle ½¨ÒéÓû§ÓÃÕâ¸öÈ¡´ú Statspack¡£AWR ʵÖÊÉÏÊÇÒ»¸ö Oracle µÄÄÚÖù¤¾ß£¬Ëü²É¼¯ÓëÐÔÄÜÏà¹ØµÄͳ¼ÆÊý¾Ý£¬²¢´ÓÄÇЩͳ¼ÆÊý¾ÝÖе¼³öÐÔÄÜÁ¿¶È£¬ÒÔ¸ú×ÙDZÔÚµÄÎÊÌâ¡£Óë Statspack ²»Í¬£¬¿ìÕÕÓÉÒ»¸ö³ÆÎª MMON µÄеĺó ......