昨天
dataguard出了问题,查了半天,没有找出问题,最后是因为主库往备库的归档参数有问题,真是让人郁闷阿
S{xo9lMC
Z0A7k4a0^$ED#q0一:Data Guard Operational
Prerequisites
1:the 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;hE%}/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.QVq d]vnEm!VLu0由于本人水有限,望高手指导阿
ITPUB个人空间0Q/]"[qN(qITPUB个人空间"@J`.N he&Rg8s{如果哪位有dataguard的问题,可以铁上来,大家一起讨论 阿
^T,LC1TT02BTa,B#Zd&?0P:]\+| |D.|0U4{8^%@Z.p2S B]0ITPUB个人空间M8H*wIU J