Oracle dataguardÅäÖÃStep by Step
Ò»¡¢×¼±¸¹¤×÷
1.1 ÉèÖÃÖ÷¿âµÄforce loggingģʽ
SQL> alter database force logging;
Database altered.
1.2 ´´½¨Ö÷¿âÃÜÂëÎļþ
$ orapwd file=orapw$ORACLE_SID password=thunis entries=4
1.3 ÅäÖÃÖ÷¿âstandby redo log£¬²¢ÑéÖ¤½á¹û
SQL> alter database add standby logfile group 4('/u01/app/oradata/guard1/redo04.log') size 50m;
Database altered.
SQL> select group#, thread#, sequence#, archived, status from v$standby_log;
GROUP# THREAD# SEQUENCE# ARC STATUS
---------- ---------- ---------- --- ----------
4 0 0 YES UNASSIGNED
1.4 ÅäÖÃÖ÷¿â³õʼ»¯²ÎÊýÎļþ
DB_NAME=guard1
DB_UNIQUE_NAME=guard1
LOG_ARCHIVE_CONFIG='DG_CONFIG=(guard1,guard2)'
LOG_ARCHIVE_DEST_1='LOCATION=/u01/app/flash_recovery_area/GUARD1/arch VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=guard1'
LOG_ARCHIVE_DEST_2='SERVICE=guard2 LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=guard2'
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_DEST_STATE_2=ENABLE
REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
LOG_ARCHIVE_FORMAT=%t_%s_%r.arc
LOG_ARCHIVE_MAX_PROCESSES=30
/*ÒÔϲ¿·ÖΪÖ÷»úÇл»Îª±¸¿âʹÓÃ*/
FAL_SERVER=guard2
FAL_CLIENT=guard1
DB_FILE_NAME_CONVERT='guard2','guard1'
LOG_FILE_NAME_CONVERT='/u01/app/oradata/guard2','/u01/app/oradata/guard1'
STANDBY_FILE_MANAGEMENT=AUTO
1.5 È·ÈÏÖ÷¿âµÄ¹éµµÄ£Ê½
SQL> startup mount
ORACLE instance started.
Total System Global Area 104857600 bytes
Fixed Size &n
Ïà¹ØÎĵµ£º
ËäȻѧϰJavaºÜ¾ÃÁË£¬×Ô¼ºÒ²Á¬½Ó¹ýһЩÊý¾Ý¿â£¬±ÈÈçmysqlÖ®ÀàµÄ£¬Èç½ñÄØ£¬Ò²Ñ§Ï°ÁËÒ»¶Îʱ¼äµÄOracle£¬È»¶øÄØ£¬½ñÌìÊÇÎÒµÚÒ»´ÎÁ¬½ÓOracle£¬ºÙºÙ£¬Ó¦¸Ã»¹²»ËãÌ«³Ù°É¡£
½ñÌìÄØ£¬Óе㱿׾£¬´ó¼ÒĪЦ£¡
ÎÒÕâÊÇÒ»¸ö²éѯÀý×Ó
Ê×ÏÈ£¬Ô ......
oracle ÖÐ TO_DATE º¯ÊýµÄʱ¼ä¸ñʽ£¬ÒÔ 2008-09-10 23:45:56 ΪÀý
¸ñʽ
˵Ã÷
ÏÔʾֵ
±¸×¢
Year(Äê):
yy
two digits(Á½Î»Äê)
08
yyy
three digits(ÈýλÄê)
008
yyyy
four digits(ËÄλÄê)
2008
Month(ÔÂ):
mm
number(Á½Î»ÔÂ)
09
mon
abbre ......
2008Äê06ÔÂ01ÈÕ ÐÇÆÚÈÕ 14:52
OracleµÄÊý¾Ý¿â¶ÔÏó·ÖΪÎåÖÖ£º±í£¬ÊÓͼ£¬ÐòÁУ¬Ë÷ÒýºÍͬÒå´Ê¡£
ÊÓͼÊÇ»ùÓÚÒ»¸ö±í»ò¶à¸ö±í»òÊÓͼµÄÂß¼±í£¬±¾Éí²»°üº¬Êý¾Ý£¬Í¨¹ýËü¿ÉÒÔ¶Ô±íÀïÃæµÄÊý¾Ý½øÐвéѯºÍÐ޸ġ£ÊÓͼ»ùÓڵıí³ÆΪ»ù±í¡£
ÊÓͼÊÇ´æ´¢ÔÚÊý¾Ý×ÖµäÀïµÄÒ»ÌõselectÓï¾ä¡£ ͨ¹ý´´½¨ÊÓͼ¿ÉÒÔÌáÈ¡Êý¾ÝµÄÂß¼Éϵļ¯ ......
1.ÊÂÎñ¸ÅÊö
ÊÂÎñ£¨Transaction£©ÊÇÊý¾Ý¿âÇø±ðÓÚÎļþϵͳµÄÌØÐÔÖ®Ò»¡£ÔÚÎļþϵͳÖУ¬Èç¹ûÄãÕý°ÑÎļþдµ½Ò»
°ë£¬²Ù×÷ϵͳͻȻ±ÀÀ£ÁË£¬Õâ¸öÎļþ¾ÍºÜ¿ÉÄܻᱻÆÆ»µ¡£²»´í£¬È·Êµ»¹ÓÐһЩ“ÈÕ±¨Ê½”£¨journaled£©Ö®
ÀàµÄÎļþϵͳ£¬ËüÃÇÄÜ°ÑÎļþ»Ö¸´µ½Ä³¸öʱ¼äµã¡£²»¹ý£¬Èç¹ûÐèÒª±£Ö¤Á½¸öÎļþͬ²½£¬ÕâЩÎļþϵͳ ......
ÀûÓÃÐòÁвúÉúÖ÷¼üÖµ¡£
ÐòÁУ¨Sequence£©ÊÇÒ»ÖÖ¿ÉÒÔ±»¶à¸öÓû§Ê¹ÓõÄÓÃÓÚ²úÉúһϵÁÐΨһÊý×ÖµÄÊý¾Ý¿â¶ÔÏó¡£ÐòÁж¨Òå´æ´¢ÔÚÊý¾Ý×ÖµäÖУ¬Í¨¹ýÌṩΨһÊýÖµµÄ˳Ðò±íÀ´¼ò»¯³ÌÐòÉè¼Æ¹¤×÷£¬¿ÉÒÔʹÓÃÐòÁÐ×Ô¶¯²úÉúÖ÷¼üµÄ¼üÖµ¡£µ±Ò»¸öÐòÁеÚÒ»´Î±»²éѯµ÷ÓÃʱ£¬Ëü½«·µ»ØÒ»¸öÔ¤¶¨Öµ¡£ÔÚËæºóµÄÿ´Î²éѯÖУ¬ÐòÁн«²úÉúÒ»¸ö°´Ö¸¶¨µÄÔöÁ¿Ô ......