Oracle10g RAC環境下 DataGuard備庫搭建例項-4-自己補

season0891發表於2010-06-13

補充說明:==oracle官方配置===lvlisong==

2006年 釋出的,應該是9版本的===

1.       tnsname.ora配置

 

CHICAGO1_SERV = (DESCRIPTION =  (ADDRESS =

   (PROTOCOL = TCP)

   (HOST =chicago_host1vip)

   (PORT = 1521))

  (CONNECT_DATA =

    (SERVER =DEDICATED)

    (SERVICE_NAME = CHICAGO)

    (INSTANCE_NAME =CHICAGO1)

  )

)

 

 

CHICAGO2_SERV =

(DESCRIPTION =

  (ADDRESS =

   (PROTOCOL = TCP)

   (HOST = chicago_host2vip)

   (PORT = 1521))

  (CONNECT_DATA =

    (SERVER = DEDICATED)

    (SERVICE_NAME = CHICAGO)

    (INSTANCE_NAME = CHICAGO2)

  )

 

 

BOSTON =

(DESCRIPTION =

  (ADDRESS =

   (PROTOCOL = TCP)

   (HOST =boston_host1)

   (PORT = 1521))

  (CONNECT_DATA =

    (SERVER = DEDICATED)

來源:(http://blog.sina.com.cn/s/blog_5ded2e5b0100f44h.html) - Oracle10g RAC環境下DataGuard備庫搭建例項-4-自己補_伊帆_新浪部落格

    (SERVICE_NAME = BOSTON)

  )

)   

 

 Primary Database======配置==

 

*.db_unique_name=CHICAGO
*.service_names=CHICAGO

 

*.log_archive_config='dg_config=(CHICAGO,BOSTON)'
*.log_archive_dest_2='service=BOSTON valid_for=(online_logfiles,primary_role)   db_unique_name=BOSTON'


*.db_file_name_convert='+DATA/BOSTON/',’+DATA/CHICAGO/', ’+RECOVERY/BOSTON’,’+RECOVERY/CHICAGO’
*.log_file_name_convert='+DATA/BOSTON/',’+DATA/CHICAGO/', ’+RECOVERY/BOSTON’,’+RECOVERY/CHICAGO’

=說明=下面引數是switch over用的,切換成standy時,fal_server='bosten'=
*.standby_file_management=auto
*.fal_server='BOSTON'    
CHICAGO1.fal_client='CHICAGO1_SERV'
CHICAGO2.fal_client='CHICAGO2_SERV'

 

Standby database==================配置============

 

*.service_names='BOSTON'

   *.db_unique_name='BOSTON'

*.log_archive_config='dg_config= (CHICAGO,BOSTON)'
*.log_archive_dest_2='service=CHICAGO1_SERV valid_for=(online_logfiles,primary_role)
  db_unique_name=CHICAGO'
*.db_file_name_convert='+DATA/CHICAGO/', '+DATA/BOSTON/','+RECOVERY/CHICAGO',
   '+RECOVERY/BOSTON'
*.log_file_name_convert='+DATA/CHICAGO/','+DATA/BOSTON/','+RECOVERY/CHICAGO',
   '+RECOVERY/BOSTON'


*.standby_file_management=auto
*.fal_server='CHICAGO1_SERV','CHICAGO2_SERV'
*.fal_client='BOSTON'

 

 

 

primary database create standby redo log========

 

2.             Create standby redo logs on the primary database to support the standby role. The standby redo logs are the same size as the primary database online logs. The recommended number of standby redo logs is one more than the number of online redo logs for each thread. Because this example has two online redo logs for each thread, three standby redo logs are required for each thread.

SQL> ALTER DATABASE ADD STANDBY LOGFILE THREAD 1
GROUP 5 SIZE 10M,
GROUP 6 SIZE 10M,
GROUP 7 SIZE 10M;

SQL> ALTER DATABASE ADD STANDBY LOGFILE THREAD 2
GROUP 8 SIZE 10M,
GROUP 9 SIZE 10M,
GROUP 10 SIZE 10M;

 

 

physical standby database-------------------------------

   (maximum # of logfiles +1) * maximum # of threads 

This example uses two online log files for each thread. Thus, the number of standby redo logs should be (2 + 1) * 2 = 6. That is, one more standby redo log file for each thread.

Thread 1, group 1 2

Thread 2,group 3, 4

SQL> ALTER DATABASE ADD STANDBY LOGFILE THREAD 1
GROUP 5 SIZE 10M,
GROUP 6 SIZE 10M,
GROUP 7 SIZE 10M;


SQL> ALTER DATABASE ADD STANDBY LOGFILETHREAD 2
GROUP 8 SIZE 10M,
GROUP 9 SIZE 10M,
GROUP 10 SIZE 10M;

查詢:

SQL> SELECT * FROM V$LOG;

SQL> SELECT * FROM V$STANDBY_LOG;

SQL> SELECT * FROM V$LOGFILE;

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/90618/viewspace-665296/,如需轉載,請註明出處,否則將追究法律責任。

相關文章