有时候奇迹就发生在重启之后!!!

dataguard 配置

上一篇 / 下一篇  2008-06-04 14:10:09 / 个人分类:dataguard

查看( 13 ) / 评论( 4 )
    昨天 dataguard出了问题,查了半天,没有找出问题,最后是因为主库往备库的归档参数有问题,真是让人郁闷阿
S{xo9lMC Z0
A7k4a0^$ED#q0

一:Data Guard Operational Prerequisites

          1the same edition of Oracle Enterprise Edition

                 Operating ,system hardware,database

          2: Primary database must run in ARCHIVELOG mode

          3: Each primary database and standby database must have its own control file

          4: Priamry the database in FORCE LOGGING mode as long as the standby database is required

          5:standby Configuare

                 Primary database  /oracle/dbs

                 

                 Standby database /oracle/standby/dbs (on the same system)                              

                                             /oracle/dbs (on the different system)

                                             /oracle/FS3/oracle/dbs ( on the different system)

二:Create the Primary Database for standby Database Creation

          1:Preparing the Primary Database

                 a: Enable Force Logging

                        sql> alter database force logging

                 b: Enable Archiving and Define a Local Archiving Destinationg

                        sql>atler systemset log_archive_dest_1=

‘location=/disk/oracle/oradata/payroll mandatory’ scope=both;

             2:Start Create a Physical Standby Database

                    1):Identify the Primary Database Datafile           Primary

                                 SQL> select name from v$datafile;

                    2)Make a Copy of the Primary Database            Primary

                                  Step1: SQL>shutdown immediate

                                  Step2:cp

                                  Step3:sql>startup (in the Primary database)

                3)Create a Control File for the Standby DatabasePrimary

                              Sql>alter database create standby controlfile as ‘dest_file_path

                 4)Prepare the Initialization Parameter File to the Copied to the Standby Database

                                                                                       Primary

                       SQL>CREATE PFILE=’/disk1/oracle/dbs/initpayroll2.ora’

FROM SPFILE;

                 5)Copy Files from the Primary System to the Standby System  

                                                                                       Primary

                         Copy following file

                               cp   datafile

                                      controlfile

                                      Initialization parameter file

                 6)Set Initilization Praameter on a Physical Standby Database     

                                                                                       Standby

                             db_name=payroll

                               compatible=9.2.0.1.0(the same as primary database)

                               control_files=’standby_control_file_path’

                              log_archive_start=true

                               standby_archive_dest=’standby_archive_path’

                               db_file_name_convery=(on the different system is option)

                               log_file_name_convery=(on the different system is option)

                               log_archive_dest_1=(‘location=/disk1/oracle/oradata/payrol11/standby’)

                               standby_file_management=auto

                               remote_archive_enable=true

                               instance_name=payroll2

                               lock_name_space=payroll3(on the same system)

                 7)Create a Windows service                             Standby

                        If the standby system is running on a Windows system,Run the following command

                               WINNT>oradim –NEW –SID payroll2 –STARTMODE manual

                 8)Configure Listeners for the Primary and Standby Database

                                                                                       Standby and Primary

                        

                 9)Enable Dead Connection Detection on the Standby System

                                                                                       Standby

                        vi sqlnet.ora

                               SQLNET.EXPIPR_TIME=2

                 10)Create Oracle Net Service Names                 Standby and Primary

                 11)Create a Server Parameter File for the Standby Database

                                                                                       Standby

                        SQL> CREATE SPFILE FROM PFILE=’initpayroll2.ora’;

                 12)Start the Physical Standby Database                    Standby

                           SQL> STARTUP NOMOUNT;

SQL> ALTER DATABASEMOUNTSTANDBYDATABASE;

                 13)Initiate Log Apply Services                          Standby

                        SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

                 14)Enable Archiving to the Physical Standby Database

                                                                                       Primary

Step1: SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=payroll2’ SCOPE=BOTH;

SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=ENABLE SCOPE=BOTH;

Step2:use the SQLALTER SYSTEMstatement on the primary database. For example:

SQL> ALTER SYSTEM ARCHIVE LOG CURRENT;

                 三:Verifying the Physical Standby Database

这是我检查的文档,
;Vz8?`.~;m| q"j0其中我还有几个奇怪的问题,希望哪位达人帮忙解答
g;h E%}/T+d0
~/d;pA@ wQ0  1;oracle 里的compatible参数,我们的数据库是92080,而这个参数是92000,请问这回造成什么影响啊
|"RN ` P6zC)n0ITPUB个人空间nX4w k'j p-`"G
 2:我看文档时,备库比主库的日志多一组,但我实际看到的是一样,但dataguard可以正常工作,这是怎么回事啊
9F"_/DvALN0ITPUB个人空间3]Sk0w _y9T.QV q
 
d]vnEm!VLu0由于本人水有限,望高手指导阿ITPUB个人空间0Q/]"[qN(q
ITPUB个人空间"@J`.Nhe&Rg8s{
如果哪位有dataguard的问题,可以铁上来,大家一起讨论 阿
^T,L C1T T0
2BTa,B#Zd&?0
P:]\+| | D.|0
U4{8^%@Z.p2SB]0ITPUB个人空间M8H*wIU J

TAG:

cqubityj的个人空间 cqubityj 发布于2008-06-04 14:41:44
1. compatible是设置版本的兼容性的。space.itpub.net?u5}q        pd"|bq
2. 文档中是建议备库比主库日志多一组,这个需要你自己去加,系统不会自动加的。
君三思的学习轨迹~~~~ junsansi 发布于2008-06-04 14:48:53
2,主要针对primary存在多节点情况,standby建议至少比primary多一组online redo
Forrest Gump的个人空间 nmghailang 发布于2008-06-04 19:22:41
可是当我添加的
/D-c"?Q8Ualter database add group oracle,db2,sqlserver,sybase,mysql,erp,scm,sap,java,.netGRIgH-IRI"\.R
space.itpub.net*J+I"Z]!l8X)r8\8g        t
添加成功*\9C@6C        V
wV@        D,N

oracle,db2,sqlserver,sybase,mysql,erp,scm,sap,java,.net6X'J^Y(u`8j*M^
当我查询还是四组I~o#a7\9VZ9X4[U
ITPUB个人空间'V0J/O!i2kp/D7b
  sql>select * from v$log;'j ]#u8kQ5z
不知道为什么
_J%a2b[dITPUB个人空间oracle,db2,sqlserver,sybase,mysql,erp,scm,sap,java,.net4n9nL e%\F_L
2:compatible这个参数如果是9200,那么9208的补丁是否不会起作用阿
Forrest Gump的个人空间 nmghailang 发布于2008-06-04 19:29:13
我主库和备库都是双节点的rac,我想把compatible改成9208,是否会影响应用阿
我来说两句

(可选)

日历

« 2008-08-30  
     12
3456789
10111213141516
17181920212223
24252627282930
31      

数据统计

  • 访问量: 241
  • 日志数: 14
  • 书签数: 7
  • 建立时间: 2008-01-08
  • 更新时间: 2008-08-29

RSS订阅

Open Toolbar