ۼ : 06-10-25 16:15
[oracle-ۿڷ]Oracle9i Dataguard |
۾ :
ȸ : 12,526
|
<P><FONT face=Tahoma size=2>Oracle9<EM>i</EM> Dataguard <A name=top></A><BR>2006 1 22<STRONG><BR></STRONG>οȫ(Oracle OCM), DBA LGī Ʈ </FONT><BR><BR><BR>̱ 911 ITý ȭδ, ڿ Ǵ ս 쿡 ̸ ִ Standby ý ϴ Ǿ. Ӹ ƴ϶ ũ սǵǾ 쿡 ٸ ⵿ ִ ý ް ̴. ̷ Standbyýۿ Ŭ dataguard ս ִ , ѱ ϰ ִ. ⼭ dataguard Ұ ؼ ˾ƺ.<SPAN class=parahead1><BR><BR>Part 1. dataguard Űó </SPAN><BR> 1) <A class=bodylink href="http://www.oracle.com/technology/global/kr/pub/columns/oracle_dataguard.html#one_1" s_oid="http://www.oracle.com/technology/global/kr/pub/columns/oracle_dataguard.html#one_1" s_oidt="0">dataguard ΰ? </A><BR> 2) <A class=bodylink href="http://www.oracle.com/technology/global/kr/pub/columns/oracle_dataguard.html#one_2">switchover and failover </A><BR> 3) <A class=bodylink href="http://www.oracle.com/technology/global/kr/pub/columns/oracle_dataguard.html#one_3">standby DB </A><BR> 4) <A class=bodylink href="http://www.oracle.com/technology/global/kr/pub/columns/oracle_dataguard.html#one_4">dataguard </A><BR> 5) <A class=bodylink href="http://www.oracle.com/technology/global/kr/pub/columns/oracle_dataguard.html#one_5">protection mode </A><BR> 6) <A class=bodylink href="http://www.oracle.com/technology/global/kr/pub/columns/oracle_dataguard.html#one_6">dataguard ý (2 ) </A></P>
<P></P>
<P><SPAN class=parahead1>Part 2. <A class=bodylink href="http://www.oracle.com/technology/global/kr/pub/columns/oracle_dataguard.html#two"><SPAN class=parahead1><U>standby DB ⵿</U></SPAN></A></SPAN></P>
<P><SPAN class=parahead1>Part 3. ý (ǽ)</SPAN><BR> 1) <A class=bodylink href="http://www.oracle.com/technology/global/kr/pub/columns/oracle_dataguard.html#three_1"> ⵿</A><BR> 2) <A class=bodylink href="http://www.oracle.com/technology/global/kr/pub/columns/oracle_dataguard.html#three_2">tnsnames.ora </A><BR> 3) <A class=bodylink href="http://www.oracle.com/technology/global/kr/pub/columns/oracle_dataguard.html#three_3">Ŭ ʱȭ Ķ </A><BR> 4) <A class=bodylink href="http://www.oracle.com/technology/global/kr/pub/columns/oracle_dataguard.html#three_4">primary DB online backup standby DB ġ restore</A><BR> 5) <A class=bodylink href="http://www.oracle.com/technology/global/kr/pub/columns/oracle_dataguard.html#three_5">primary DB standby control file ؼ standby DB </A><BR> 6) <A class=bodylink href="http://www.oracle.com/technology/global/kr/pub/columns/oracle_dataguard.html#three_6">standby DB control file ġ</A><BR> 7) <A class=bodylink href="http://www.oracle.com/technology/global/kr/pub/columns/oracle_dataguard.html#three_7">standby DB ⵿</A><BR> 8) <A class=bodylink href="http://www.oracle.com/technology/global/kr/pub/columns/oracle_dataguard.html#three_8">standby DB standby redo log file </A><BR> 9) <A class=bodylink href="http://www.oracle.com/technology/global/kr/pub/columns/oracle_dataguard.html#three_9">primary DB standby redo log file </A><BR> 10) <A class=bodylink href="http://www.oracle.com/technology/global/kr/pub/columns/oracle_dataguard.html#three_10">standby DB recovery managed mode ⵿</A><BR> 11) <A class=bodylink href="http://www.oracle.com/technology/global/kr/pub/columns/oracle_dataguard.html#three_11">log switch </A><BR> 12) <A class=bodylink href="http://www.oracle.com/technology/global/kr/pub/columns/oracle_dataguard.html#three_12">primary DB </A><BR> 13) <A class=bodylink href="http://www.oracle.com/technology/global/kr/pub/columns/oracle_dataguard.html#three_13">standby DB </A><BR> 14) <A class=bodylink href="http://www.oracle.com/technology/global/kr/pub/columns/oracle_dataguard.html#three_14">primary DB ̺̽ Է</A><BR> 15) <A class=bodylink href="http://www.oracle.com/technology/global/kr/pub/columns/oracle_dataguard.html#three_15">standby DB Է Ȯ</A><BR> 16) <A class=bodylink href="http://www.oracle.com/technology/global/kr/pub/columns/oracle_dataguard.html#three_16">takeover ϱ</A> <BR> 17) <A class=bodylink href="http://www.oracle.com/technology/global/kr/pub/columns/oracle_dataguard.html#three_17"> (takeover)</A><BR> 18) <A class=bodylink href="http://www.oracle.com/technology/global/kr/pub/columns/oracle_dataguard.html#three_18">failover ϱ</A><BR></P>
<P><SPAN class=parahead1><FONT color=#ff0000>Part. dataguard Űó</FONT></SPAN> </P>
<P><STRONG> <SPAN class=boldbodycopy>1) dataguard ΰ?</SPAN></STRONG><SPAN class=boldbodycopy><A name=one_1></A></SPAN></P>
<P><SPAN class=bodycopy> - primary DB standby DB ȭ, primary DB ϵ standby DB failover Ǵ<BR> switchover ų ִ ý Ѵ.<BR> - Oracle Net ؼ primary DB standby DB ȴ. <BR><BR> <IMG height=304 src="http://www.oracle.com/technology/global/kr/pub/columns/images/dataguard_img1.gif" width=491> <BR></SPAN></P>
<P><SPAN class=boldbodycopy><STRONG> 2) switchover and failover</STRONG></SPAN> <SPAN class=boldbodycopy><A id=one_2 name=one_2></A></SPAN></P>
<P><SPAN class=bodycopy> ڵ ƴ϶ DBA action ؾ Ѵ.<BR><BR> switchover <BR> - OS ۾ Ǵ PM۾ (primary -> standby , standby -> primary)<BR><BR> failover<BR> - ũ fail Ȳ , dataguard 籸 ʿ</SPAN></P>
<P><SPAN class=boldbodycopy><STRONG> 3) standby DB </STRONG></SPAN> <SPAN class=boldbodycopy><A id=one_3 name=one_3></A></SPAN></P>
<P><SPAN class=bodycopy> Physical standby database<BR> - block block primary DB redo log standby DB ȭ <BR><BR> Logical standby database<BR> - schema Ƿ <BR> - primary DB sql standby DB </SPAN></P>
<P><SPAN class=boldbodycopy><STRONG> 4) dataguard </STRONG></SPAN> <SPAN class=boldbodycopy><A id=one_4 name=one_4></A></SPAN></P>
<P><SPAN class=bodycopy> Log transport Services<BR> - primary DB standby DB redo log ڵ <BR><BR> Log Apply Services<BR> - redo log standby DB <BR><BR> Role Management Service<BR> - ͺ̽ primary/standby Ÿ role . <BR> Role Management Service log transport service log apply service failover Ǵ switchover Ȳ <BR> ִ.</SPAN></P>
<P><SPAN class=boldbodycopy><STRONG> 5) protection mode</STRONG></SPAN> <SPAN class=boldbodycopy><A id=one_5 name=one_5></A></SPAN></P>
<P><SPAN class=bodycopy> Maximum Protection - primary DB standby DB redo log ȭ Ų. <BR> standby DB Ʈũ ̻ standby ȵ primary DB haltŲ. <BR> ʹ ȭǾ primary DB commit ϰ Ǹ standby DB commit Ϸ primary DB commit ϷḦ ʴ´. <BR> ɿ failover Ȳ ս . physical standby DB ϴ. <BR><BR> Maximum availability - Maximum Protection primary DB standby DB ȭŲ. <BR> , standby DB Ʈũ ȵ halt ʴ´.<BR> ʹ maximum protection primary DB commit ϰ Ǹ standby DB commit Ϸ <BR> primary DB commit ϷḦ ʴ´. standby DB unavailable ӽ÷ ġ Ų. <BR> ٽ standby DB availableϸ ڵ ȭ Ų. ɿ failover Ȳ <BR> ս Ǿ. physical standby, logical standby DB ϴ.<BR><BR> Maximum Performance - default protection mode̴. primary data protection . <BR> primary database transaction Ǹ ̰ asynchronous ϰ standby DB Ѵ. <BR> , maximum protection, maximum availability 쿡 standby DB (commit) primary db transaction (commit) ʾ, <BR> Maximum Performance 忡 ȭ ŰǷ primary DB standby DB transaction <BR> ٸ ʴ´. standby db ؼ primary DB ɿ ʴ´.<BR> , failoverÿ ణ ս ִ.</SPAN></P>
<P><SPAN class=boldbodycopy><STRONG> 6) dataguard ý (2 )</STRONG></SPAN> <SPAN class=boldbodycopy><A id=one_6 name=one_6></A></SPAN></P>
<P><SPAN class=bodycopy> <STRONG> <FONT color=#666666> physical standby database (LGWR process Physical standby DB)</FONT></STRONG><BR><STRONG> <EM><FONT color=#666666>Archiving to a Physical standby Destination Using the Logwriter Proces </FONT></EM></STRONG><BR><BR><BR> <IMG height=396 src="http://www.oracle.com/technology/global/kr/pub/columns/images/dataguard_img2.gif" width=548> <BR><BR><BR> - primary db LGWR μ standby DB redo log , standby DB RFS μ redo log standby redo <BR> log Ų. archivingǸ archived redo logs ǰ ̰ MRP process standby DB Ų.<BR><BR> <STRONG><FONT color=#666666> logical standby DB </FONT></STRONG><BR> <STRONG><EM> <FONT color=#666666>Archiving to a Logical standby Destination Using the Logwriter Process </FONT></EM></STRONG><BR><BR> <IMG height=391 src="http://www.oracle.com/technology/global/kr/pub/columns/images/dataguard_img3.gif" width=547> <BR><BR> - logical standby DB primary DB SQL LGWRμ standby DB RFS μ Ƽ <BR> Archived redo logs . LSP (Logical standby process) standby DB Ų.<BR><BR> - primary DB log switch Ͼ Ǹ standby DB RFS μ ̸ ˷־ log switch ǵ Ѵ.</SPAN></P>
<P>
<TABLE cellSpacing=3 cellPadding=3 width="95%" border=0>
<TBODY>
<TR>
<TD align=right><A class=bodylink href="http://www.oracle.com/technology/global/kr/pub/columns/oracle_dataguard.html#top">TOP</A></TD></TR></TBODY></TABLE><SPAN class=parahead1><FONT color=#ff0000>Part. standby DB ⵿</FONT></SPAN> <SPAN class=boldbodycopy><A id=two name=two></A></SPAN></P>
<P></P>
<P><SPAN class=bodycopy> - standby db startup Ʒ . Ʒ صθ ϴ.<BR> <IMG src="http://www.oracle.com/technology/global/kr/pub/columns/images/dataguard_img4.gif"></SPAN></P>
<P><SPAN class=bodycopy> standby DB read only mode managed recovery mode <BR> - ״ Ǵ shutdown immediate ⵿<BR><BR> - ù° <BR><BR> SQL> alter database open read only;<BR> SQL> recover managed standby database disconnect; <BR><BR> - ι° <BR><BR> SQL> shutdown immediate <BR> SQL> startup nomount<BR> SQL> alter database mount standby database;<BR> SQL> recover managed standby database disconnect;<BR><BR> shutdown managed recovery mode <BR><BR> SQL> startup nomount<BR> SQL> alter database mount standby database;<BR> SQL> recover managed standby database disconnect;<BR><BR> managed recovery mode read only mode <BR><BR> SQL> recover managed standby database cancel;<BR> SQL> alter database open read only;<BR><BR> read only standby DB managed recovery mode <BR> ( standby DB ) <BR><BR> SQL> recover managed standby database disconnect;<BR><BR> - <BR><BR> SQL> shutdown immediate<BR> SQL> startup nomount<BR> SQL> alter database mount standby database;<BR> SQL> recover managed standby database disconnect;</SPAN>
<TABLE cellSpacing=3 cellPadding=3 width="95%" border=0>
<TBODY>
<TR>
<TD align=right><A class=bodylink href="http://www.oracle.com/technology/global/kr/pub/columns/oracle_dataguard.html#top">TOP</A></TD></TR></TBODY></TABLE><SPAN class=parahead1><FONT color=#ff0000>Part. ý (ǽ)</FONT></SPAN></P>
<P><SPAN class=bodycopy> - ǽ primary DB ̸ MIN ̰, standby DB ̸ STBY ̴.<BR> - ⼭ ϳ 2 DB ϴ Ѵ.<BR> - ٸ ִ.<BR> - primary DB /data1/oradata/MIN Ǿ ִ. <BR> - standby DB /data1/oradata/STBY Ǿ ִ. </SPAN></P>
<P><STRONG> <SPAN class=boldbodycopy>1) ⵿</SPAN></STRONG><SPAN class=boldbodycopy><A id=three_1 name=three_1></A></SPAN></P>
<P><SPAN class=bodycopy> </SPAN>Ʒ Ʈũ ش. ش.<BR><SPAN class=bodycopy> - MIN DB (primary DB)</SPAN> </P>
<BLOCKQUOTE>
<TABLE class=bodycopy cellSpacing=0 cellPadding=5 border=1>
<TBODY>
<TR>
<TD class=bodycopy vAlign=top width=580>
<P class=bodycopy>vi $ORACLE_HOME/network/admin/listener.ora</SPAN><BR>smsvr1_MIN =<BR> (ADDRESS_LIST =<BR> (ADDRESS= (PROTOCOL= TCP)(Host= smsvr1)(Port=2001))<BR> )<BR>SID_LIST_smsvr1_MIN =<BR> (SID_LIST =<BR> (SID_DESC =<BR> (ORACLE_HOME= /u/pkg/oracle/product/9.2.0)<BR> (SID_NAME = MIN)<BR> )<BR> )</SPAN><BR></P></TD></TR></TBODY></TABLE><BR><BR><SPAN class=bodycopy> -</SPAN>STBY DB (physical standby DB)
<TABLE class=bodycopy cellSpacing=0 cellPadding=5 border=1>
<TBODY>
<TR>
<TD class=bodycopy vAlign=top width=580>
<P class=bodycopy>vi $ORACLE_HOME/network/admin/listener.ora</SPAN><BR>smsvr1_STBY =<BR> (ADDRESS_LIST =<BR> (ADDRESS= (PROTOCOL= TCP)(Host= smsvr1)(Port=2002))<BR> )<BR>SID_LIST_smsvr1_STBY =<BR> (SID_LIST =<BR> (SID_DESC =<BR> (ORACLE_HOME= /u/pkg/oracle/product/9.2.0)<BR> (SID_NAME= STBY)<BR> )<BR> )</SPAN><BR></P></TD></TR></TBODY></TABLE></BLOCKQUOTE>
<P><STRONG> <SPAN class=boldbodycopy>2) tnsnames.ora </SPAN></STRONG><SPAN class=boldbodycopy><A id=three_2 name=three_2></A></SPAN></P>
<P><SPAN class=bodycopy> </SPAN>tnsnames.ora Ѵ. Ʈũ ϵ ϴµ ̸ Ѵ.<BR><SPAN class=bodycopy> </SPAN>ʱȭ ĶͿ log_archvie_dest_2='service=STBY LGWR SYNC AFFIRM' <BR><SPAN class=bodycopy> </SPAN>STBY tnsnames.ora ̸ Ѵ.</P>
<BLOCKQUOTE>- MIN DB primary DB ( standby DB Ʈũ )
<TABLE class=bodycopy cellSpacing=0 cellPadding=5 border=1>
<TBODY>
<TR>
<TD class=bodycopy vAlign=top width=580>
<P class=bodycopy>vi $ORACLE_HOME/network/admin/tnsnames.ora</SPAN><BR>STBY =<BR> (DESCRIPTION =<BR> (ADDRESS = (PROTOCOL= TCP)(Host= smsvr1)(Port= 2002))<BR> (CONNECT_DATA = (SID = STBY))<BR> ) </SPAN><BR></P></TD></TR></TBODY></TABLE><BR><BR>- STBY DB , standby DB (primary DB Ʈũ )
<TABLE class=bodycopy cellSpacing=0 cellPadding=5 border=1>
<TBODY>
<TR>
<TD class=bodycopy vAlign=top width=580>
<P class=bodycopy>vi $ORACLE_HOME/network/admin/tnsnames.ora</SPAN><BR>MIN=<BR> (DESCRIPTION =<BR> (ADDRESS = (PROTOCOL= TCP)(Host= smsvr1)(Port= 2001))<BR> (CONNECT_DATA = (SID = MIN))<BR> ) </SPAN></P></TD></TR></TBODY></TABLE></BLOCKQUOTE>
<P><STRONG> <SPAN class=boldbodycopy>3) Ŭ ʱȭ Ķ </SPAN></STRONG><SPAN class=boldbodycopy><A id=three_3 name=three_3></A></SPAN></P>
<BLOCKQUOTE>- MIN DB (primary DB)
<TABLE class=bodycopy cellSpacing=0 cellPadding=5 border=1>
<TBODY>
<TR>
<TD class=bodycopy vAlign=top width=580>
<P class=bodycopy1>vi $ORACLE_HOME/dbs/initMIN.ora</SPAN></P>
<P>db_name=MIN<BR>compatible=9.2.0<BR>control_files=('/data1/oradata/MIN/control01.ctl','/data1/oradata/MIN/control02.ctl')<BR>shared_pool_size=64M<BR>db_cache_size=16M<BR>undo_management=auto<BR>background_dump_dest=/data1/oradata/MIN/bdump<BR>user_dump_dest=/data1/oradata/MIN/udump<BR>core_dump_dest=/data1/oradata/MIN/cdump<BR>log_archive_start=true<BR>log_archive_dest_1="location=/data1/oradata/MIN/archive1"<BR>log_archive_format=%t_%s.arc</SPAN></P>
<P>#### </SPAN>Ͱ带</SPAN> </SPAN>ؼ </SPAN> </SPAN> </SPAN><BR>remote_archive_enable=true<BR>dg_broker_start=true<BR>log_archive_dest_state_1=enable<BR>log_archive_max_processes=3<BR>standby_file_management=auto<BR>db_file_name_convert='/data1/oradata/STBY','/data1/oradata/MIN'<BR>log_file_name_convert='/data1/oradata/STBY','/data1/oradata/MIN'<BR>standby_archive_dest='/data1/oradata/MIN/archive2'</SPAN></P>
<P>##### standby DB</SPAN≯ </SPAN>, primary DB</SPAN≯ </SPAN>ݴ´.<BR>#fal_server=STBY<BR>#fal_client=MIN<BR>#lock_name_space=STBY</SPAN></P>
<P>## primary DB</SPAN≯ </SPAN>, standby DB</SPAN≯ </SPAN>ݴ´.<BR>log_archive_dest_2='SERVICE=STBY LGWR SYNC'</SPAN><BR></P></TD></TR></TBODY></TABLE><BR><BR>- STBY DB (standby DB) - DB̸ MIN ̸ instance ̸ SID STBY ̴.<BR>, ⵿ ORACLE_SID=STBY Ͽ ⵿Ѵ.<BR><BR>
<TABLE class=bodycopy cellSpacing=0 cellPadding=5 border=1>
<TBODY>
<TR>
<TD class=bodycopy vAlign=top width=580>
<P class=bodycopy>vi $ORACLE_HOME/dbs/initSTBY.ora</P>
<P>db_name=MIN<BR>compatible=9.2.0<BR>control_files=('/data1/oradata/STBY/control01.ctl','/data1/oradata/STBY/control02.ctl')<BR>shared_pool_size=64M<BR>db_cache_size=16M<BR>undo_management=auto<BR>background_dump_dest=/data1/oradata/STBY/bdump<BR>user_dump_dest=/data1/oradata/STBY/udump<BR>core_dump_dest=/data1/oradata/STBY/cdump<BR>log_archive_start=true<BR>log_archive_dest_1="location=/data1/oradata/STBY/archive1"<BR>log_archive_format=%t_%s.arc</P>
<P>### Ͱ带 ؼ <BR>remote_archive_enable=true<BR>dg_broker_start=true<BR>log_archive_dest_state_1=enable<BR>log_archive_max_processes=3<BR>standby_file_management=auto<BR>db_file_name_convert='/data1/oradata/MIN','/data1/oradata/STBY'<BR>log_file_name_convert='/data1/oradata/MIN','/data1/oradata/STBY'<BR>standby_archive_dest='/data1/oradata/STBY/archive2'</P>
<P>## standby DB Ʒ , primary DB ݱ<BR>fal_server=MIN<BR>fal_client=STBY<BR>lock_name_space=STBY<BR><BR>##primary DB̸ , standby DB̸ ݴ´.<BR>#log_archive_dest_2='SERVICE=MIN LGWR SYNC'</P></TD></TR></TBODY></TABLE>
<P>-ʱȭ Ķ ؾ ,<BR>standby_file_management=auto Ǿ ־ primary DB ̺̽ ߰ standby DB ڵ ȴ.<BR><BR>standby_file_management=auto Ǿ <BR>db_file_name_convert='/data1/oradata/STBY','/data1/oradata/MIN'<BR><BR>log_file_name_convert='/data1/oradata/STBY','/data1/oradata/MIN'<BR> ĶͿ ' A κ','B κ' Bκ ڽ primary DB θ ϰ Aκ ȯ standby DB θ Ѵ. Ķ Ȯغ.<BR><BR>fal_server, fal_client standby DB Ѵ. fal_server primary DB ϰ fal_client standby DB صд. ̰ primary DB standby DB redo log gap ڵ ߾ִ Ѵ.<BR>fal_server=MIN<BR>fal_client=STBY <BR>lock_name_space primary, standby DB Ѵ. տ ٿ primary , standby DB<BR>db_name instance_name(SID) ٸ ̴. DB̸ instance ⵿ϱ ؼ<BR>lock_name_space ־ Ѵ. Ѵٸ lock_name_spaceĶʹ ʿ䰡 .<BR>̰ standby DB Ѵ.<BR>lock_name_space=STBY</P></BLOCKQUOTE>
<P> <SPAN class=boldbodycopy><STRONG>4) primary DB online backup standby DB ġ restore</STRONG><A id=three_4 name=three_4></A><BR><BR> </SPAN><MIN DB primary DB></P>
<BLOCKQUOTE>- primary DB 24ð ̹Ƿ shutdown Ұ Ͽ Ѵ. <BR>- primary DB online backup Ѵ.<BR>- online backup ϴ ̹Ƿ primary DB redo log standby DB ʴ´. standby DB ڵ <BR>standby DB redo log ȴ.</BLOCKQUOTE>
<BLOCKQUOTE><FONT color=#666666><STRONG>SQL> select tablespace_name, file_name, bytes/1024/1024 mega from dba_data_files;</STRONG></FONT>
<TABLE class=bodycopy cellSpacing=0 cellPadding=3 width=500 border=0>
<TBODY>
<TR vAlign=bottom>
<TD width=174 height=25>TABLESPACE_NAME </TD>
<TD width=274 height=25>FILE_NAME</TD>
<TD width=52 height=25>MEGA</TD></TR>
<TR>
<TD colSpan=3>------------------------------------------------------------------------------------------------------------</TD></TR>
<TR>
<TD>SYSTEM</TD>
<TD>/data1/oradata/MIN/system01.dbf</TD>
<TD>250</TD></TR>
<TR>
<TD>UNDOTBS</TD>
<TD>/data1/oradata/MIN/undotbs.dbf</TD>
<TD>100</TD></TR>
<TR>
<TD>USERS </TD>
<TD>/data1/oradata/MIN/users01.dbf</TD>
<TD>100</TD></TR></TBODY></TABLE></BLOCKQUOTE>
<BLOCKQUOTE><STRONG><FONT color=#666666>SQL> select name , bytes/1024/1024 mega from v$tempfile; </FONT></STRONG>
<TABLE class=bodycopy cellSpacing=0 cellPadding=3 width=251 border=0>
<TBODY>
<TR vAlign=bottom>
<TD height=25>NAME </TD>
<TD height=25>MEGA</TD></TR>
<TR>
<TD colSpan=2>------------------------------------------------------------</TD></TR>
<TR>
<TD>/data1/oradata/MIN/temp01.dbf</TD>
<TD>100</TD></TR></TBODY></TABLE>
<P>- ⼭ cp standby DB ϴ Ѵ. ftp primary db Ѵ.<BR> SQL> alter tablespace system begin backup;<BR> SQL> !cp /data1/oradata/MIN/system01.dbf /data1/oradata/STBY/system01.dbf<BR> SQL> alter tablespace system end backup;<BR> SQL> alter tablespace undotbs begin backup;<BR> SQL> !cp /data1/oradata/MIN/undotbs.dbf /data1/oradata/STBY/undotbs.dbf<BR> SQL> alter tablespace undotbs end backup;<BR> SQL> alter tablespace users begin backup;<BR> SQL> !cp /data1/oradata/MIN/users01.dbf /data1/oradata/STBY/users01.dbf<BR> SQL> alter tablespace users end backup;</P>
<P>- tempfile ״ 縦 Ѵ. begin backup, end backup ʿ . tempfile ̾ Ѵ.<BR> SQL> !cp /data1/oradata/MIN/temp01.dbf /data1/oradata/STBY/temp01.dbf </P></BLOCKQUOTE>
<P><STRONG> <SPAN class=boldbodycopy>5) primary DB standby control file ؼ standby DB </SPAN></STRONG><SPAN class=boldbodycopy><A id=three_5 name=three_5></A></SPAN><BR><BR> <MIN DB primary DB></P>
<BLOCKQUOTE>- primary DB standby control file ؼ standby DB Ѵ<BR> SQL> alter database create standby controlfile as '/data1/oradata/STBY/stbyctl.ctl'; </BLOCKQUOTE>
<P><STRONG> <SPAN class=boldbodycopy>6) standby DB control file ġ</SPAN></STRONG><SPAN class=boldbodycopy><A id=three_6 name=three_6></A></SPAN><BR><BR> <STBY DB standby DB control file></P>
<BLOCKQUOTE>- standby DB control file, standby DB ʱȭ ۶(initSTBY.ora)Ͽ ִ control file ġ ġѴ.<BR>SQL> !cp /data1/oradata/STBY/stbyctl.ctl /data1/oradata/STBY/control01.ctl<BR>SQL> !cp /data1/oradata/STBY/stbyctl.ctl /data1/oradata/STBY/control02.ctl</BLOCKQUOTE>
<P><STRONG> <SPAN class=boldbodycopy>7) standby DB ⵿</SPAN></STRONG><SPAN class=boldbodycopy><A id=three_7 name=three_7></A></SPAN><BR><BR> <STBY DB standby DB ></P>
<BLOCKQUOTE>- standby DB ⵿Ų. startup mount standby database . nomount ⵿ standby DB mount Ѵ.<BR><BR> SQL> startup nomount<BR> SQL> alter database mount standby database;</BLOCKQUOTE>
<P> <SPAN class=boldbodycopy><STRONG>8) standby DB standby redo log file </STRONG><A id=three_8 name=three_8></A></SPAN><BR><BR> <STBY DB standby DB ></P>
<BLOCKQUOTE>츮 ó standby DB ϿǷ standby redo log ߰ ־ Ѵ.<BR>⼭ ߿ primary redo log standby redo log ũ⸦ ־ Ѵ. <BR> ٸ 쿡 Ŀ ORA-16139 media recovery required <BR> ϸ鼭 takeover failover ִ. <BR><BR>SQL> select * from v$logfile;
<TABLE class=MsoNormalTable cellSpacing=0 cellPadding=0 width=400 border=0>
<TBODY>
<TR>
<TD class=bodycopy width=174>GROUP#</TD>
<TD class=bodycopy width=274>STATUS TYPE</TD>
<TD class=bodycopy width=52>MEMBER</SPAN></TD></TR>
<TR>
<TD colSpan=3>
<P class=MsoNormal><SPAN lang=EN-US>-----------------------------------------------------------------------</SPAN></P></TD></TR>
<TR>
<TD class=bodycopy align=middle>1</SPAN></TD>
<TD class=bodycopy>ONLINE</TD>
<TD class=bodycopy>/data1/oradata/STBY/log01a.log</TD></TR>
<TR>
<TD class=bodycopy align=middle>2</SPAN></TD>
<TD class=bodycopy>ONLINE</SPAN></TD>
<TD class=bodycopy>/data1/oradata/STBY/log02a.log</TD></TR>
<TR>
<TD class=bodycopy align=middle>3</SPAN>
<P></P></TD>
<TD class="bodycopyONLINE</span">
<P></P></TD>
<TD class=bodycopy>/data1/oradata/STBY/log03a.log<?XML:NAMESPACE PREFIX = O /><O:P></O:P></SPAN>
<P></P></TD></TR></TBODY></TABLE>SQL> alter database add standby logfile <BR> '/data1/oradata/STBY/stbylog01a.log' size 10M;<BR>SQL> alter database add standby logfile<BR> '/data1/oradata/STBY/stbylog02a.log' size 10M;<BR>SQL> alter database add standby logfile<BR> '/data1/oradata/STBY/stbylog03a.log' size 10M;<BR>SQL> select * from v$logfile;
<TABLE class=MsoNormalTable cellSpacing=2 cellPadding=0 width=400 border=0>
<TBODY>
<TR>
<TD class=bodycopy width=174>GROUP#STATUS</TD>
<TD class=bodycopy width=274>TYPE</SPAN></TD>
<TD class=bodycopy width=52>MEMBER</SPAN></TD></TR>
<TR>
<TD class=bodycopy colSpan=3>----------------------------------------------------------------------------</SPAN>------------</TD></TR>
<TR>
<TD class=bodycopy align=middle>1</TD>
<TD class=bodycopy>ONLINE</TD>
<TD class=bodycopy>/data1/oradata/STBY/log01a.log</TD></TR>
<TR>
<TD class=bodycopy align=middle>2</TD>
<TD class=bodycopy>ONLINE</TD>
<TD class=bodycopy>/data1/oradata/STBY/log02a.log</TD></TR>
<TR>
<TD class=bodycopy align=middle>3</TD>
<TD class=bodycopy>ONLINE</TD>
<TD class=bodycopy>/data1/oradata/STBY/log03a.log</TD></TR>
<TR>
<TD class=bodycopy align=middle>4</TD>
<TD class=bodycopy>STANDBY</TD>
<TD class=bodycopy>/data1/oradata/STBY/stbylog01a.log</TD></TR>
<TR>
<TD class=bodycopy align=middle>5</TD>
<TD class=bodycopy>STANDBY</TD>
<TD class=bodycopy>/data1/oradata/STBY/stbylog02a.log</TD></TR>
<TR>
<TD class=bodycopy align=middle>6</TD>
<TD class=bodycopy>STANDBY</TD>
<TD class=bodycopy>/data1/oradata/STBY/stbylog03a.log</TD></TR></TBODY></TABLE><BR><BR><STRONG><SPAN class=boldbodycopy>9) primary DB standby redo log file <A id=three_9 name=three_9></A></SPAN><BR></STRONG><BR> <MIN DB primary DB ></BLOCKQUOTE>
<BLOCKQUOTE> takeover ؾ ϹǷ primary DB standby DB ֱ <BR≯ standby redo log .<BR><BR>SQL> select * from v$logfile;
<TABLE class=MsoNormalTable cellSpacing=0 cellPadding=0 width=400 border=0>
<TBODY>
<TR>
<TD class=bodycopy width=174>GROUP#></TD>
<TD class=bodycopy width=274>STATUS TYPE</TD>
<TD class=bodycopy width=52>MEMBER</TD></TR>
<TR>
<TD class=bodycopy colSpan=3>------------------------------------------------------------------------------------------------</TD></TR>
<TR>
<TD class=bodycopy>1</TD>
<TD class=bodycopy>ONLINE</TD>
<TD class=bodycopy>/data1/oradata/MIN/log01a.log</TD></TR>
<TR>
<TD class=bodycopy>2</TD>
<TD class=bodycopy>ONLINE</TD>
<TD class=bodycopy>/data1/oradata/MIN/log02a.log</TD></TR>
<TR>
<TD class=bodycopy>3</TD>
<TD class=bodycopy>ONLINE</TD>
<TD class=bodycopy>/data1/oradata/MIN/log03a.log</TD></TR></TBODY></TABLE><BR>SQL> alter database add standby logfile<BR> '/data1/oradata/MIN/stbylog01a.log' size 10M;<BR>SQL> alter database add standby logfile<BR> '/data1/oradata/MIN/stbylog02a.log' size 10M;<BR>SQL> alter database add standby logfile<BR> '/data1/oradata/MIN/stbylog03a.log' size 10M;<BR><BR>SQL> select * from v$logfile;
<TABLE class=MsoNormalTable style="WIDTH: 300pt; mso-cellspacing: 0cm; mso-padding-alt: 2.25pt 2.25pt 2.25pt 2.25pt" cellSpacing=0 cellPadding=0 width=400 border=0>
<TBODY>
<TR style="HEIGHT: 18.75pt; mso-yfti-irow: 0; mso-yfti-firstrow: yes">
<TD class=bodycopy width=174>GROUP#</TD>
<TD class=bodycopy width=250>STATUS TYPE</TD>
<TD class=bodycopy>MEMBER</TD></TR>
<TR>
<TD colSpan=3><SPAN lang=EN-US>-----------------------------------------------------------------------------</SPAN></TD></TR>
<TR>
<TD class=bodycopy>1</TD>
<TD class=bodycopy>ONLINE</TD>
<TD class=bodycopy>/data1/oradata/MIN/log01a.log</TD></TR>
<TR>
<TD class=bodycopy>2</TD>
<TD class=bodycopy>ONLINE</TD>
<TD class=bodycopy>/data1/oradata/MIN/log02a.log</TD></TR>
<TR>
<TD class=bodycopy>3</TD>
<TD class=bodycopy>ONLINE</TD>
<TD class=bodycopy>/data1/oradata/MIN/log03a.log</TD></TR>
<TR>
<TD class=bodycopy>4</TD>
<TD class=bodycopy>STANDBY</TD>
<TD class=bodycopy>/data1/oradata/MIN/stbylog01a.log</TD></TR>
<TR>
<TD class=bodycopy>5</TD>
<TD class=bodycopy>STANDBY</TD>
<TD class=bodycopy>/data1/oradata/MIN/stbylog02a.log</TD></TR>
<TR>
<TD class=bodycopy>6</SPAN>
<P></P></TD>
<TD class=bodycopy>STANDBY</TD>
<TD class=bodycopy>/data1/oradata/MIN/stbylog03a.log</TD></TR></TBODY></TABLE></BLOCKQUOTE>
<P><STRONG> <SPAN class=boldbodycopy>10) standby DB recovery managed mode ⵿</SPAN></STRONG><SPAN class=boldbodycopy><A id=three_10 name=three_10></A></SPAN><BR><BR> <STBY DB standby DB ></P>
<BLOCKQUOTE>standby DB recovery managed mode Ѵ. <BR>standby DB MRP μ .<BR><BR> SQL> recover managed standby database disconnect;</BLOCKQUOTE>
<P><STRONG> <SPAN class=boldbodycopy>11) log switch </SPAN></STRONG><SPAN class=boldbodycopy><A id=three_11 name=three_11></A></SPAN><BR><BR> <MIN DB primary DB ></P>
<BLOCKQUOTE>standby DB ϴ primary DB gap ̴.<BR>current redo log Ų. <BR><BR> SQL> alter system archive log current;</BLOCKQUOTE>
<P><STRONG> 12) primary DB </STRONG> <SPAN class=boldbodycopy><A id=three_12 name=three_12></A></SPAN>
<P class=MsoNormal><IMG height=478 src="http://www.oracle.com/technology/global/kr/pub/columns/images/dataguard_source1.gif" width=868> </P>
<P class=MsoNormal><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN>PROCESS STATUS<BR></SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN> ------------- ---------------<BR></SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN> ARCH<SPAN style="mso-spacerun: yes"> </SPAN>CLOSING<BR></SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN> </SPAN>ARCH<SPAN style="mso-spacerun: yes"> </SPAN>CLOSING<BR></SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"></SPAN> </SPAN>LGWR<SPAN style="mso-spacerun: yes"> </SPAN>WRITING</SPAN> <PRE class=bodycopy> SQL> select dest_id "ID",destination,status,target,
schedule,process,mountid mid
from v$archive_dest order by dest_id;<BR>
<STRONG> <FONT color=#666666> => destination 2 츮 service=STBY Ͽ. STBY
tnsnames.ora ̸̾. STATUS=VALID ̰ STANDBY ̾ Ѵ.</FONT></STRONG><FONT color=#666666><BR></FONT><BR><IMG height=365 src="http://www.oracle.com/technology/global/kr/pub/columns/images/dataguard_source2.gif" width=689><BR>
<STRONG> <FONT color=#666666>=> ƹ ͼ ȵȴ. ٸ primary DB ⵿ϰ
standby DB ⵿ , standby ȵ Ƿ
ٸ ͵ Ȯ غƾ Ѵ. standby DB ⵿ϰ recovery managed mode
MRP μ primary DB ⵿״ٸ Ʒ ƹ
ͼ ȵȴ. primary DB ⵿Ƿ ̴.</FONT></STRONG><BR>
</PRE>
<P class=MsoNormal><STRONG><SPAN lang=EN-US style="COLOR: #666666; FONT-FAMILY: ; mso-bidi-font-family: "><SPAN style="mso-spacerun: yes"> </SPAN></SPAN></STRONG><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN>MESSAGE<SPAN style="mso-spacerun: yes"> </SPAN>TIMESTAMP<BR></SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN>--------------------------<BR></SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN>---------------------------</SPAN> <PRE class=bodycopy> SQL> select dest_id id,database_mode db_mode,recovery_mode,
protection_mode,standby_logfile_count "SRLs",
standby_logfile_active ACTIVE, archived_seq#
from v$archive_dest_status;<BR>
<STRONG> <FONT color=#666666> ==> db_mode MOUNTED_STANDBY ̾ Ѵ. recovery_mode managed Ǿ ־
primary DB ۵ redo log standby DB ų ִ.</FONT></STRONG><FONT color=#666666><BR></FONT></PRE>
<P class=MsoNormal><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN>ID DB_MODE<SPAN style="mso-spacerun: yes"> </SPAN>RECOVER PROTECTION_MODE<SPAN style="mso-spacerun: yes"> </SPAN><SPAN class=SpellE>SRLs</SPAN> ACTIVE ARCHIVED_SEQ#<BR></SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN>--- --------------- ------- -------------------- ---- ------ -------------<BR></SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN>1 OPEN<SPAN style="mso-spacerun: yes"> </SPAN>IDLE<SPAN style="mso-spacerun: yes"> </SPAN>MAXIMUM PERFORMANCE<SPAN style="mso-spacerun: yes"> </SPAN>0<SPAN style="mso-spacerun: yes"> </SPAN><SPAN class=SpellE>0</SPAN><SPAN style="mso-spacerun: yes"> </SPAN>45<BR></SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="mso-spacerun: yes"> </SPAN>2 MOUNTED-STANDBY MANAGED MAXIMUM AVAILABILITY<SPAN style="mso-spacerun: yes"> </SPAN>2<SPAN style="mso-spacerun: yes"> </SPAN>0<SPAN style="mso-spacerun: yes"> </SPAN>45 <BR></SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN>3 OPEN<SPAN style="mso-spacerun: yes"> </SPAN>IDLE<SPAN style="mso-spacerun: yes"> </SPAN>MAXIMUM PERFORMANCE<SPAN style="mso-spacerun: yes"> </SPAN>0<SPAN style="mso-spacerun: yes"> </SPAN><SPAN class=SpellE>0</SPAN><SPAN style="mso-spacerun: yes"> </SPAN><SPAN class=SpellE>0</SPAN></SPAN></P><PRE class=bodycopy><STRONG> 13) standby DB </STRONG><SPAN class=boldbodycopy><A id=three_13 name=three_13></A></SPAN><BR>
<IMG height=391 src="http://www.oracle.com/technology/global/kr/pub/columns/images/dataguard_source3.gif" width=871> </PRE><PRE class=bodycopy><STRONG> 14) primary DB ̺̽ Է</STRONG><SPAN class=boldbodycopy><A id=three_14 name=three_14></A></SPAN><BR><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">
</SPAN> <MIN DB primary DB></SPAN><BR>
test ̺̽ ̺ ־.
db_file_name_convert ó /data1/oradata/MIN ȿ
ؾ Ѵ. standby DB ڵ ȴ.
<BR> ĶͿ standby_file_management=auto Ǿ ־ standby DB ̺̽
.<BR>
SQL> create tablespace test
datafile '/data1/oradata/MIN/test01.dbf' size 10M;
SQL> select tablespace_name, file_name, bytes/1024/1024 mega from dba_data_files;<BR></PRE>
<P class=MsoNormal><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN><IMG height=308 src="http://www.oracle.com/technology/global/kr/pub/columns/images/dataguard_source4.gif" width=683><SPAN style="mso-spacerun: yes"> </SPAN></SPAN></P><PRE class=bodycopy><STRONG> 15) standby DB Է Ȯ</STRONG><SPAN class=boldbodycopy><A id=three_15 name=three_15></A></SPAN>
<STRONG> </STRONG><STBY DB standby DB><BR>
- primary DB ̺̽ ִ ʹ ȮѴ.<BR> recovery managed mode ϰ read only openѴ.<BR>
SQL> recover managed standby database cancel;
SQL> alter database open read only;<BR>
==> primary DB ̺̽ Ǿ, test ̺
insert Ȯ ִ.<BR>
<IMG height=226 src="http://www.oracle.com/technology/global/kr/pub/columns/images/dataguard_source5.gif" width=666> <BR> <BR> - ٽ recovery managed mode primary ۵ redo log standby DB
ǵ Ѵ. fal_server, fal_client ĶͰ Ǿ Ƿ ڵ gap κ ߾ ش. <BR> DB open ¿ recovery managed mode ϴ.<BR>
SQL> recover managed standby database disconnect;
<BR>
<STRONG> 16) takeover </STRONG><SPAN class=boldbodycopy><A id=three_16 name=three_16></A></SPAN><BR>
ý Ͽ. takeover Ѵ.<BR>
<STRONG> </STRONG><MIN DB primary DB><BR>
primary DB standby standby DB primary DB ؾѴ.
standby DB primary ϸ primary DB standby DBε ٸ ȴ.<BR> primary DB standby DB primary DBshutdown Ѵ.<BR>
SQL> alter database commit to switchover to physical standby with session shutdown wait;
SQL> shutdown immediate
<STRONG> </STRONG><BR><STRONG> </STRONG> <STBY DB standby DB><BR>
standby DB primary DB ٲٰ shutdown Ѵ.
Ƿ with session shutdown ȴ.<BR>
SQL> alter database commit to switchover to primary;
SQL> shutdown immediate<BR>
<STRONG> </STRONG> Ķ Ѵ. # ų ߰ؼ ش.<BR>
<MIN DB primary DB></PRE>
<P>
<TABLE cellSpacing=1 cellPadding=10 width=500 bgColor=#999999 border=0>
<TBODY>
<TR class=MsoNormalTable style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes">
<TD style="PADDING-RIGHT: 7.5pt; PADDING-LEFT: 7.5pt; BACKGROUND: white; PADDING-BOTTOM: 7.5pt; PADDING-TOP: 7.5pt">
<P><SPAN lang=EN-US>vi $ORACLE_HOME/<SPAN class=SpellE>dbs/initMIN.ora</SPAN><BR><</SPAN><SPAN class=SpellE></SPAN><SPAN lang=EN-US>><BR>#####standby DB</SPAN≯ <SPAN lang=EN-US>, primary DB</SPAN≯ ݴ´<SPAN lang=EN-US>.<BR>#<SPAN class=SpellE>fal_server</SPAN>=STBY<BR>#<SPAN class=SpellE>fal_client</SPAN>=MIN<BR>#<SPAN class=SpellE>lock_name_space</SPAN>=STBY<BR></SPAN><SPAN lang=EN-US><BR>##primary DB</SPAN≯ <SPAN lang=EN-US>, standby DB</SPAN≯ ݴ´<SPAN lang=EN-US>.<BR>log_archive_dest_2='SERVICE=STBY LGWR SYNC'</SPAN></P>
<P><SPAN lang=EN-US><</SPAN><SPAN class=SpellE></SPAN><SPAN lang=EN-US>><BR>#####standby DB</SPAN≯ <SPAN lang=EN-US>, primary DB</SPAN≯ ݴ´<SPAN lang=EN-US>.<BR><SPAN class=SpellE>fal_server</SPAN>=STBY<BR><SPAN class=SpellE>fal_client</SPAN>=MIN<BR><SPAN class=SpellE>lock_name_space</SPAN>=STBY</SPAN></P>
<P><SPAN lang=EN-US>##primary DB</SPAN≯ <SPAN lang=EN-US>, standby DB</SPAN≯ ݴ´<SPAN lang=EN-US>.<BR>#log_archive_dest_2='SERVICE=STBY LGWR SYNC' </SPAN></P></TD></TR></TBODY></TABLE><BR></P><PRE class=bodycopy> <STBY DB standby DB> <TABLE cellSpacing=1 cellPadding=10 width=500 bgColor=#999999 border=0><TBODY><TR><TD bgColor=#ffffff>>vi $ORACLE_HOME/<SPAN class=SpellE>dbs/initSTBY.ora</SPAN> <BR><</SPAN><SPAN class=SpellE></SPAN><SPAN lang=EN-US>><BR>##standby </SPAN≯ <SPAN lang=EN-US>, primary DB</SPAN≯ ݴ´<SPAN lang=EN-US>.<BR><SPAN class=SpellE>fal_server</SPAN>=MIN<BR><SPAN class=SpellE>fal_client</SPAN>=STBY<BR><SPAN class=SpellE>lock_name_space</SPAN>=STBY<BR>##primary DB</SPAN≯ <SPAN lang=EN-US>, standby DB</SPAN≯ ݴ´<SPAN lang=EN-US>.<BR>#log_archive_dest_2='SERVICE=MIN LGWR SYNC'</SPAN><P></P><P><SPAN lang=EN-US><</SPAN><SPAN class=SpellE></SPAN><SPAN lang=EN-US>><BR>##standby </SPAN≯ <SPAN lang=EN-US>, primary DB</SPAN≯ ݴ´<SPAN lang=EN-US>.<BR>#<SPAN class=SpellE>fal_server</SPAN>=MIN<BR>#<SPAN class=SpellE>fal_client</SPAN>=STBY<BR>#<SPAN class=SpellE>lock_name_space</SPAN>=STBY<BR></SPAN><SPAN lang=EN-US>##primary DB</SPAN≯ <SPAN lang=EN-US>, standby DB</SPAN≯ ݴ´<SPAN lang=EN-US>.<BR>log_archive_dest_2='SERVICE=MIN LGWR SYNC'</SPAN></P></TD></TR></TBODY></TABLE><BR><BR> <MIN DB , new standby DB>
- Ӱ standby DB MIN DB recovery managed mode Ѵ.
SQL> startup nomount
SQL> alter database mount standby database;
SQL> recover managed standby database disconnect;
SQL> select process, status from v$managed_standby;
==> MRP μ ⵿ Ȯ
</PRE>
<P class=MsoNormal><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN>PROCESS STATUS<BR></SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN>---------------- ------------<BR></SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN>ARCH<SPAN style="mso-spacerun: yes"> </SPAN>CONNECTED<BR></SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN>ARCH<SPAN style="mso-spacerun: yes"> </SPAN>CONNECTED<BR></SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN>MRP0<SPAN style="mso-spacerun: yes"> </SPAN>WAIT_FOR_LOG<BR></SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN>RFS<SPAN style="mso-spacerun: yes"> </SPAN>WRITING<BR></SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN>RFS<SPAN style="mso-spacerun: yes"> </SPAN>ATTACHED</SPAN></P><PRE class=bodycopy><STRONG> </STRONG> <STBY DB, new primary DB>
- new primary DB ⵿Ѵ.
SQL> startup<BR>
- Ȯϱ
SQL> select i.instance_name, i.status instance_status, d.name dbname, d.database_role db_role,
d.switchover_status switchover_status , d.protection_mode
from v$database d, v$instance i;<BR>
<FONT color=#666666><STRONG>=> ߿ Ʈ ̴. TO_STANDBY ȮѴ.</STRONG></FONT></PRE>
<P class=MsoNormal><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> <IMG height=282 src="http://www.oracle.com/technology/global/kr/pub/columns/images/dataguard_source6.gif" width=808></SPAN></SPAN></P><PRE class=bodycopy><STRONG> (17) (takeover)</STRONG><SPAN class=boldbodycopy><A id=three_17 name=three_17></A></SPAN>
ٽ Ų. STBY DB standby DB MIN DBprimary DB Ѵ.<BR>
<BR> <STBY DB, new primary DB>
- primary DB standby DB standby DB primary DB .<BR> .<BR>
SQL> alter database commit to switchover to physical standby with session shutdown wait;
SQL> shutdown immediate<BR>
<MIN DB new standby DB>
- MIN DB primary DB Ѵ.
SQL> alter database commit to switchover to primary ;
SQL> shutdown immediate<BR>
<MIN DB primary DB>
- ʱȭ Ķ Ѵ.
<TABLE cellSpacing=1 cellPadding=10 width=500 bgColor=#999999 border=0><TBODY><TR class=MsoNormalTable style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"><TD style="PADDING-RIGHT: 7.5pt; PADDING-LEFT: 7.5pt; BACKGROUND: white; PADDING-BOTTOM: 7.5pt; PADDING-TOP: 7.5pt"><P class=MsoNormal style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto">vi $ORACLE_HOME/dbs/initMIN.ora<BR><Ų><BR>#####standby DB̸ , primary DB̸ ݴ´.<BR>#fal_server=STBY<BR>#fal_client=MIN<BR>#lock_name_space=STBY</P><P>##primary DB̸ , standby DB̸ ݴ´.<BR>log_archive_dest_2='SERVICE=STBY LGWR SYNC'<BR></P></TD></TR></TBODY></TABLE><MIN standby new db> <BR>
<STBY DB standby DB> <BR><TABLE cellSpacing=1 cellPadding=10 width=500 bgColor=#999999 border=0><TBODY><TR><TD bgColor=#ffffff><PRE class=bodycopy><SPAN lang=EN-US style="FONT-SIZE: 10pt">vi $ORACLE_HOME/<SPAN class=SpellE>dbs/initSTBY.ora</SPAN>
<</SPAN><SPAN class=SpellE><SPAN style="FONT-SIZE: 10pt">Ų</SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt">>
##standby </SPAN><SPAN style="FONT-SIZE: 10pt"≯ <SPAN lang=EN-US>, primary DB</SPAN≯ ݴ´<SPAN lang=EN-US>.
<SPAN class=SpellE>fal_server</SPAN>=MIN
<SPAN class=SpellE>fal_client</SPAN>=STBY
<SPAN class=SpellE>lock_name_space</SPAN>=STBY<BR>
##primary DB</SPAN≯ <SPAN lang=EN-US>, standby DB</SPAN≯ ݴ</SPAN><SPAN lang=EN-US>. </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: ; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt; mso-hansi-font-family: 'Times New Roman'; mso-font-kerning: 1.0pt"><BR> #log_archive_dest_2='SERVICE=MIN<SPAN style="FONT-FAMILY: "> </SPAN>LGWR SYNC'</SPAN></PRE></TD></TR></TBODY></TABLE><BR><IMG height=192 src="http://www.oracle.com/technology/global/kr/pub/columns/images/dataguard_source7.gif" width=423><STRONG><BR><BR><BR>18) failover </STRONG><SPAN class=boldbodycopy><A id=three_18 name=three_18></A></SPAN><BR> - primary DB ִ ǹ ũ ̻ ؼ DB ջǾ. <BR> standby DB ϰ ⵿Ѿ Ѵ. MIN DB shutdown abort DownŰ(ũ fail ),<BR> standby DB primary DB ⵿Ų.<BR><BR> - failover Ŀ ý ؼ MIN DB primary DB, STBY DB standby DB Ϸ
Dataguard 籸 ؾ Ѵ.<BR><BR> , failover ߴٸ failoverĿ new primary DB STBY DB ؼ MIN DB standby DB ϰ <BR> takeover Ű ȴ.<BR><BR> <MIN DB primary DB><BR><SPAN class=bodycopy><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN>- </SPAN>ũֻȲ</SPAN><BR> SQL> shutdown abort<BR><BR> <STBY DB standby DB><BR> - recovery managed mode (cancel) ƴ (finish) Ѵ. primary DB Ѵ.<BR> SQL> recover managed standby database finish;<BR> SQL> alter database commit to switchover to primary;<BR> $ORACLE_HOME/dbs/initSTBY.ora Ͽ primary DB Ķ ϰ ⵿Ѵ.<BR> SQL> startup<BR><BR> <> standby DB STBY DB primary DB failoverϴ ORA-16139 media recovery required <BR> 鼭 recovery ϶ ´ٸ? <BR> <BR> ̷ 쿣 Ʒ ϵ Ѵ.<BR> Log stream standby DB 쿡 ִ.<BR> ̷ ؼ Ƿ ߴٸ Ŭ ؾѴ. <BR> Ʒ skipϸ skipϴ ŭ gap DB ؾ Ѵ.<BR>
SQL> alter database recover managed standby database finish skip wait;<BR> SQL> alter database commit to switchover to primary;<BR> $ORACLE_HOME/dbs/initSTBY.ora Ͽ primary DB Ķϰ ⵿Ѵ.<BR> SQL> startup</PRE></FONT>
|
|