Oracle Data Gurad Physical Standby Ïà¹Ø˵Ã÷
Oracle Data Guard, ·ÖÂß¼StandbyºÍÎïÀíStandby¡£ ÏÂÃæ½²µÄÊÇÎïÀíStandby »·¾³µÄ´î½¨²½Öè¡£ ÓйØData GuardµÄһЩ¸ÅÄîÐÔµÄÀíÂÛ֪ʶ£¬Çë²Î¿¼ÎÒµÄblog£¬ ÕâÀï²»×ö¹ý¶àµÄ˵Ã÷¡£
Oracle Data Gurad ÀíÂÛ֪ʶ
http://blog.csdn.net/tianlesoftware/archive/2010/04/22/5514082.aspx
Ò»£® ÆôÓÃForce Logging
½«PrimaryÊý¾Ý¿âÖÃΪForce Loggingģʽ¡£Í¨¹ýÏÂÁÐÓï¾ä£º
²é¿´×´Ì¬£º
SQL> SELECT DATABASE_ROLE,FORCE_LOGGING from V$DATABASE;
DATABASE_ROLE FORCE_LOGGING
---------------- ---------------
PRIMARY NO
ÐÞ¸Äģʽ
SQL> alter database force logging;
Database altered.
È¡ÏûForce logging ģʽ£º
SQL> alter database no force logging;
Database altered.
˵Ã÷£ºÎªÊ²Ã´Òª¸Ä³ÉForce Logging
ÓÐһЩDDLÓï¾ä¿ÉÒÔͨ¹ýÖ¸¶¨NOLOGGING×Ó¾äµÄ·½Ê½±ÜÃâдREDO£¨Ä¿µÄÊÇÌá¸ßËٶȣ¬Ä³Ð©Ê±ºòȷʵÓÐЧ£©¡£Ö¸¶¨Êý¾Ý¿âΪForce Loggingģʽºó£¬Êý¾Ý¿â½«»á¼Ç¼³ýÁÙʱ±í¿Õ¼ä»òÁÙʱ»Ø¹ö¶ÎÍâËùÓеIJÙ×÷£¬¶øºöÂÔÀàËÆNOLOGGINGÖ®ÀàµÄÖ¸¶¨²ÎÊý¡£Èç¹ûÔÚÖ´ÐÐForce LoggingʱÓÐNOLOGGINGÖ®ÀàµÄÓï¾äÔÚÖ´ÐУ¬ÄÇôForce Logging»áµÈ´ý£¬Ö±µ½ÕâÀàÓï¾äÈ«²¿Ö´ÐС£
Force LoggingÊÇ×÷Ϊ¹Ì¶¨²ÎÊý±£´æÔÚ¿ØÖÆÎļþÖУ¬Òò´ËÆä²»ÊÜÖØÆôÖ®Àà²Ù×÷µÄÓ°Ï죨ִֻÐÐÒ»´Î¼´¿É£©£¬Èç¹ûÏëÈ¡Ïû£¬¿ÉÒÔͨ¹ýALTER DATABASE NO FORCE LOGGINGÓï¾ä¹Ø±ÕÇ¿ÖƼǼ¡£
¶þ£® ´´½¨ÃÜÔ¿Îļþ£¨Èç¹û²»´æÔڵĻ°£©
ͬһ¸öData GuardÅäÖÃÖÐËùÓÐÊý¾Ý¿â±ØÐ붼ӵÓжÀÁ¢µÄÃÜÔ¿Îļþ£¬²¢ÇÒ±ØÐ뱣֤ͬһ¸öData GuardÅäÖÃÖУ¬ËùÓÐÊý¾Ý¿â·þÎñÆ÷µÄSYSÓû§ÓµÓÐÏàͬÃÜÂ룬ÒÔ±£Ö¤REDOÊý¾ÝµÄ˳Àû´«Ê䣬ÒòΪREDO´«Êä·þÎñÊÇͨ¹ýÈÏÖ¤µÄÍøÂç»á»°À´´«ÊäREDOÊý¾Ý£¬¶ø»á»°Ê¹Óðüº¬ÔÚÃÜÔ¿ÎļþÖеÄSYSÓû§ÃÜÂëÀ´ÈÏÖ¤¡£
Èç¹ûʹÓÃDBCA½¨¿âÔòOracle»á×Ô¶¯´´½¨ÃÜÔ¿Îļþ£¬¸ÃÎļþĬÈÏ·¾¶ÔÚ%ORACLE_HOME%\databaseĿ¼Ï£¬Èç¹ûÔÚ¸ÃĿ¼ûÄÜÕÒµ½¶ÔÓ¦µÄÃÜÔ¿ÎļþҲû¹Øϵ£¬OracleÌṩÁËÒ»¸ö´´½¨ÃÜÔ¿ÎļþµÄÃüÁorapwd£¬Î»ÓÚ%ORACLE_HOME%\binĿ¼Ï£¬¸ÃÃüÁîÓÐÁ½ÖÖµ÷Ó÷½Ê½£º´ø²Îµ÷ÓúͲ»´ø
Ïà¹ØÎĵµ£º
ÈÏʶ´æ´¢¹ý³ÌºÍº¯Êý
´æ´¢¹ý³ÌºÍº¯ÊýÒ²ÊÇÒ»ÖÖPL/SQL¿é£¬ÊÇ´æÈëÊý¾Ý¿âµÄPL/SQL¿é¡£µ«´æ´¢¹ý³ÌºÍº¯Êý²»Í¬ÓÚÒѾ½éÉܹýµÄPL/SQL³ÌÐò£¬ÎÒÃÇͨ³£°ÑPL/SQL³ÌÐò³ÆΪÎÞÃû¿é£¬¶ø´æ´¢¹ý³ÌºÍº¯ÊýÊÇÒÔÃüÃûµÄ·½Ê½´æ´¢ÓÚÊý¾Ý¿âÖеġ£ºÍPL/SQL³ÌÐòÏà±È£¬´æ´¢¹ý³ÌÓкܶàÓŵ㣬¾ßÌå¹éÄÉÈçÏ£º
* ´æ´¢¹ý³ÌºÍº¯ÊýÒÔÃüÃûµÄÊý¾Ý¿â¶ÔÏóÐÎʽ´æ´¢ ......
Êý¾Ý¿âʵÀý½á¹¹ ÊÂÎñÒ»ÖÂÐÔ(Transactional Consistency)ºÍ»ùÓÚʱ¼äµãµÄ»Ö¸´(Point-in-time Recovery) ϵͳԪÊý¾Ý
topÊý¾Ý¿âʵÀý½á¹¹
µ±OracleʵÀýÆô¶¯Ö®ºó£¬Ëù¿´µ½µÄ¾ÍÊÇÔÚ·þÎñÆ÷ÄÚ´æÉϵÄÒ»¸ö¸ö²»Í¬ÄÚ´æ¿é¼ÓÉϲúÉúµÄÓëÕâЩÄÚ´æ½»»¥µÄºǫ́½ø³Ì¡£OracleÎĵµ½«ÕâЩÄÚ´æ½á¹¹ºÍ½ø³ÌÊյĺÜÏêϸ¡£
ÓÉOracleʵÀýËùÕ¼ÓõÄÄÚ´æ¿é³ ......
ʹÊÔÒò:
1.ÓÉÓÚÎó²Ù×÷ÓÃhp unix ÃüÁî rm -f datafilename ɾ³ý±í¿Õ¼äµÄÊý¾ÝÎļþ
2.alter tablespace tablespacenaem drop datafile datafile ;
3.drop tablespace tablespacename including content and datafiles;
ÉÏÊöÁ½¸ö²½ÖèÎÒÓÃÁ˽üÈý¸öСʱ¶¼Ã»ÓÐÖ´ÐÐÍ꣬×îºóµ¼ÖÂÊý¾Ý¿âå´»ú¡£ÏÂÃæ°ÑÎÒµ±Ê±Æô¶¯Êý¾ÝµÄºóÌ¨Ò ......
²é¿´µ±Ç°Óû§µÄȱʡ±í¿Õ¼ä
SQL>select username,default_tablespace from user_users;
²é¿´µ±Ç°Óû§µÄ½ÇÉ«
SQL>select * from user_role_privs;
²é¿´µ±Ç°Óû§µÄÏµÍ³È ......
1¡¢Ä¬ÈÏÊÂÀý£º
Óû§Ãû£ºscottÃÜÂ룺tiger Ö÷»ú×Ö·û´®£º±¾»ú¿ÉÒÔΪ¿Õ
2¡¢Æô¶¯·½·¨£º
ÔËÐУºsqlplus scott/tiger@lhd
3¡¢SQLPLUS»ù±¾ÃüÁ
Desc£ºÏÔʾ±í¡¢ÊÓͼ½á¹¹ desc ±íÃû£¬ÊÓͼ
List£ºÁгöSQL»º³åÇøÇøÖеÄÒ»Ðлò¶àÐÐÃüÁîÓï¾ä
Exit£ºÍ˳ö
4¡¢³£ÓõÄÊý¾Ý×Öµä(ÈýÖÖǰ׺£ºUSER£¬ALL£¬DBA)
USER_TABL ......