0% found this document useful (0 votes)
11 views13 pages

Configure Oracle Dataguard Primary ASM

Configure Oracle Dataguard Primary ASM

Uploaded by

okydokie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views13 pages

Configure Oracle Dataguard Primary ASM

Configure Oracle Dataguard Primary ASM

Uploaded by

okydokie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 13

The configuration documents of the Oracle physical standby database are compiled in

the foregoing. The data files are stored on the file system. In the production
environment, the DBA is often faced with tens of hundreds of G data, and may even
be a T-level file system. The I/O problems of storing data files in these occasions
will gradually be exposed. Therefore, the data storage in the production
environment generally uses ASM, or bare devices. Oracle 11g does not support the
storage of data by bare devices at first, so this lecture is mainly This section
describes how to configure the Data guard physical standby database in the ASM
environment.

Environmental introduction:
Main library IP: 192.168.227.20/24
Main library SID: orcl
Main library DB_NAME: orcl
Main library DB_UNIQUE_NAME: primary
Main librarySERVICES_NAME: primary.yang.com

Standby IP: 192.168.227.30/24


Standby SID: orcl
Standby DB_NAME: orcl
Standby DB_UNIQUE_NAME: physical
Ready store SERVICES_NAME: physical.yang.com

One: the main library preparation work

1: Configure the ASM environment


[root@primary ~]# /u01/app/oracle/product/10.2.0/db_1/bin/localconfig add
[root@primary ~]# ps -ef |grep css
root 4180 1 0 13:07 ? 00:00:00 /bin/su -l oracle -c sh -c 'cd
/u01/app/oracle/product/10.2.0/db_1/log/primary/cssd; ulimit -c unlimited;

exec /u01/app/oracle/product/10.2.0/db_1/bin/ocssd '


oracle 4332 4180 0 13:08 ? 00:00:00
/u01/app/oracle/product/10.2.0/db_1/bin/ocssd.bin
root 4682 4265 0 13:17 pts/1 00:00:00 grep css

[root@primary ~]# cd /u01/app/oracle/product/10.2.0/db_1/bin/


[root@primary bin]# ./crsctl check crs
CSS appears healthy
Cannot communicate with CRS
Cannot communicate with EVM

[oracle@primary ~]# ps -ef |grep -i asm


oracle 4459 1 0 13:10 ? 00:00:00 asm_pmon_+ASM
oracle 4461 1 0 13:10 ? 00:00:00 asm_psp0_+ASM
oracle 4463 1 0 13:10 ? 00:00:00 asm_mman_+ASM
oracle 4465 1 0 13:10 ? 00:00:00 asm_dbw0_+ASM
oracle 4467 1 0 13:10 ? 00:00:00 asm_lgwr_+ASM
oracle 4469 1 0 13:10 ? 00:00:00 asm_ckpt_+ASM
oracle 4471 1 0 13:10 ? 00:00:00 asm_smon_+ASM
oracle 4473 1 0 13:10 ? 00:00:00 asm_rbal_+ASM
oracle 4475 1 0 13:10 ? 00:00:00 asm_gmon_+ASM
oracle 4665 5702 0 13:16 pts/2 00:00:00 grep -i asm

[oracle@primary ~]$ export ORACLE_SID=+ASM


[oracle@primary ~]$ sqlplus /nolog
SQL> conn /as sysdba
SQL> select instance_name,status from v$instance;
INSTANCE_N STATUS
---------- ------------------------------------
+ASM STARTED

SQL> create diskgroup data normal redundancy


2 failgroup fg1 disk
3 '/dev/raw/raw1' name asmdisk1,
4 '/dev/raw/raw2' name asmdisk2
5 failgroup fg2 disk
6 '/dev/raw/raw3' name asmdisk3,
7 '/dev/raw/raw4' name asmdisk4;
Diskgroup created.

SQL> create diskgroup fra external redundancy


2 disk '/dev/raw/raw5' name asmdisk5;
Diskgroup created.

SQL> select name,path,failgroup from v$asm_disk;

NAME PATH FAILGROUP


---------- ---------------------------------------- --------------------
ASMDISK5 /dev/raw/raw5 ASMDISK5
ASMDISK4 /dev/raw/raw4 FG2
ASMDISK3 /dev/raw/raw3 FG2
ASMDISK2 /dev/raw/raw2 FG1
ASMDISK1 /dev/raw/raw1 FG1

SQL> select name,total_mb,free_mb,usable_file_mb from v$asm_diskgroup;

NAME TOTAL_MB FREE_MB USABLE_FILE_MB


---------- ---------- ---------- --------------
DATA 81920 81814 30667
FRA 58368 58318 58318

2 Building library
[oracle@primary ~]$ env |grep ORA
ORACLE_SID=orcl
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1

SQL> select file_name from dba_data_files;

FILE_NAME
------------------------------------------
+DATA/orcl/datafile/users.259.765985893
+DATA/orcl/datafile/sysaux.257.765985893
+DATA/orcl/datafile/undotbs1.258.765985893
+DATA/orcl/datafile/system.256.765985891
+DATA/orcl/datafile/example.265.765986057

SQL> select member from v$logfile;

MEMBER
--------------------------------------------
+DATA/orcl/onlinelog/group_3.263.765986013
+FRA/orcl/onlinelog/group_3.259.765986017
+DATA/orcl/onlinelog/group_2.262.765986005
+FRA/orcl/onlinelog/group_2.258.765986009
+DATA/orcl/onlinelog/group_1.261.765985997
+FRA/orcl/onlinelog/group_1.257.765986003

SQL> show parameter spfile;

NAME TYPE VALUE


------------------------------------ ----------- ------------------------------
spfile string +DATA/orcl/spfileorcl.ora
SQL> show parameter control;

NAME TYPE VALUE


------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string +DATA/orcl/controlfile/current
.260.765985991, +FRA/orcl/cont
rolfile/current.256.765985991

SQL> archive log list;


Database log mode Archive Mode
Automatic archival Enabled
Archive destination +FRA/orcl
Oldest online log sequence 3
Next log sequence to archive 5
Current log sequence 5

SQL> show parameter db_recovery_file_dest;

NAME TYPE VALUE


------------------------------------ ----------- ---------
db_recovery_file_dest string +FRA
db_recovery_file_dest_size big integer 50000M

3: Add standby log group


SQL> alter database add standby logfile group 4 size 50M;
SQL> alter database add standby logfile group 5 size 50M;
SQL> alter database add standby logfile group 6 size 50M;
SQL> alter database add standby logfile group 7 size 50M;

SQL> select member,type from v$logfile;

MEMBER TYPE
-------------------------------------------------- -------
+DATA/orcl/onlinelog/group_3.263.765986013 ONLINE
+FRA/orcl/onlinelog/group_3.259.765986017 ONLINE
+DATA/orcl/onlinelog/group_2.262.765986005 ONLINE
+FRA/orcl/onlinelog/group_2.258.765986009 ONLINE
+DATA/orcl/onlinelog/group_1.261.765985997 ONLINE
+FRA/orcl/onlinelog/group_1.257.765986003 ONLINE
+DATA/primary/onlinelog/group_4.268.765996737 STANDBY
+FRA/primary/onlinelog/group_4.264.765996743 STANDBY
+DATA/primary/onlinelog/group_5.269.765996751 STANDBY
+FRA/primary/onlinelog/group_5.265.765996757 STANDBY
+DATA/primary/onlinelog/group_6.270.765996763 STANDBY

MEMBER TYPE
-------------------------------------------------- -------
+FRA/primary/onlinelog/group_6.266.765996767 STANDBY
+DATA/primary/onlinelog/group_7.271.765996775 STANDBY
+FRA/primary/onlinelog/group_7.267.765996779 STANDBY
4: Configure Data guard related parameters
SQL> alter system set db_unique_name='primary' scope=spfile;
System altered.

SQL> alter system set log_archive_config='DG_CONFIG=(primary,physical)';


System altered.

SQL> show parameter remote_login;

NAME TYPE VALUE


------------------------------------ ----------- ------------------------------
remote_login_passwordfile string EXCLUSIVE

SQL> alter system set log_archive_dest_1='LOCATION=+FRA/orcl


valid_for=(all_logfiles,all_roles) db_unique_name=primary' scope=spfile;
System altered.

SQL> alter system set log_archive_dest_2='service=physical lgwr async


valid_for=(online_logfile,primary_role) db_unique_name=physical' scope=spfile;
System altered.
SQL> alter system set log_archive_dest_state_1=enable;
System altered.

SQL> alter system set log_archive_dest_state_2=enable;


System altered.

SQL> alter system set log_archive_format='%t_%s_%r.arc' scope=spfile;


System altered.

SQL> alter system set fal_server='physical';


System altered.

SQL> alter system set fal_client='primary';


System altered.

SQL> alter database force logging;


Database altered

5: Configure the listener.ora and tnsnames.ora files (you need to do the same
configuration on the standby), restart the listener and database to ensure the
database connection is normal.
[oracle@primary ~]$ cat $ORACLE_HOME/network/admin/listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(GLOBAL_DBNAME = primary_DGMGRL.yang.com)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.227.20)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)

[oracle@primary ~]$ cat $ORACLE_HOME/network/admin/tnsnames.ora


primary =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.227.20)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = primary.yang.com)
)
)
physical =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.227.30)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = physical.yang.com)
)
)

[oracle@primary ~]$ sqlplus /nolog


SQL> conn /as sysdba
Connected.
SQL> shutdown immediate;

[oracle@primary ~]$ lsnrctl stop


[oracle@primary ~]$ lsnrctl start

[oracle@primary ~]$ sqlplus /nolog


SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup

SQL> conn sys/123456@primary as sysdba


Connected.
SQL> show parameter name;

NAME TYPE VALUE


------------------------------------ ----------- ----------------------
db_file_name_convert string
db_name string orcl
db_unique_name string primary
global_names boolean FALSE
instance_name string orcl
lock_name_space string
log_file_name_convert string
service_names string primary.yang.com

6: Back up the main library related files


SQL> !mkdir -p /home/oracle/dg_backup
SQL> create pfile='/home/oracle/dg_backup/initorcl.ora' from spfile;
File created.

[oracle@primary ~]$ rman target /


RMAN> backup incremental level 0 format '/home/oracle/dg_backup/dg_%U'
2> tag 'dg_asm' database plus archivelog;
RMAN> backup format '/home/oracle/dg_backup/ctl_asm_%U' current controlfile for
standby;
[oracle@primary ~]$ ll -h /home/oracle/dg_backup/
total 670M
-rw-r----- 1 oracle oinstall 6.8M Oct 31 15:32 ctl_asm_05mqg6vt_1_1
-rw-r----- 1 oracle oinstall 64M Oct 31 15:28 dg_01mqg6o9_1_1
-rw-r----- 1 oracle oinstall 592M Oct 31 15:29 dg_02mqg6oj_1_1
-rw-r----- 1 oracle oinstall 6.9M Oct 31 15:29 dg_03mqg6qa_1_1
-rw-r----- 1 oracle oinstall 25K Oct 31 15:29 dg_04mqg6qh_1_1
-rw-r--r-- 1 oracle oinstall 1.5K Oct 31 15:24 initorcl.ora

Two: configuration on the standby database


1: Configure ASM
[oracle@physical ~]$ export ORACLE_SID=+ASM
[oracle@physical ~]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Oct 31 17:18:29 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> conn /as sysdba
Connected.
SQL> select name,path,failgroup from v$asm_disk;

NAME PATH FAILGROUP


---------- ---------------------------------------- ----------
ASMDISK5 /dev/raw/raw5 ASMDISK5
ASMDISK4 /dev/raw/raw4 FG2
ASMDISK3 /dev/raw/raw3 FG2
ASMDISK2 /dev/raw/raw2 FG1
ASMDISK1 /dev/raw/raw1 FG1

2: Copy the backup data on the main library


[oracle@physical ~]$ scp -rp primary:/home/oracle/dg_backup ./
[oracle@physical ~]$ cat dg_backup/initorcl.ora (??????)
*.db_unique_name='physical'
*.fal_client='physical'
*.fal_server='primary'
*.log_archive_dest_1='LOCATION=+FRA/orcl valid_for=(all_logfiles,all_roles)
db_unique_name=physical'
*.log_archive_dest_2='service=primary lgwr async
valid_for=(online_logfile,primary_role) db_unique_name=primary'

[oracle@physical ~]$ cp dg_backup/initorcl.ora $ORACLE_HOME/dbs


[oracle@physical ~]$ orapwd file=$ORACLE_HOME/dbs/orapworcl password=123456
entries=5
[oracle@physical ~]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Oct 31 17:33:30 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> conn /as sysdba
Connected.
SQL> select open_mode,name from v$database;

OPEN_MODE NAME
---------- ---------
MOUNTED ORCL

SQL> alter database recover managed standby database disconnect from session;
Database altered

Total System Global Area 167772160 bytes


Fixed Size 1218316 bytes
Variable Size 83888372 bytes
Database Buffers 79691776 bytes
Redo Buffers 2973696 bytes

[oracle@physical ~]$ rman target sys/123456@primary auxiliary /


Recovery Manager: Release 10.2.0.1.0 - Production on Mon Oct 31 17:26:18 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: ORCL (DBID=1293766727)
connected to auxiliary database: ORCL (not mounted)
RMAN> duplicate target database for standby nofilenamecheck;

SQL> alter database recover managed standby database disconnect from session;
Database altered

verification:
[oracle@physical ~]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Oct 31 17:43:16 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> conn /as sysdba
Connected.

SQL> select sequence#,first_time,next_time,applied from v$archived_log order by 1;

SEQUENCE# FIRST_TIME NEXT_TIME APP


---------- ------------------- ------------------- ---
2 2011-10-31:13:57:04 2011-10-31:14:02:38 NO
3 2011-10-31:14:02:38 2011-10-31:14:24:53 NO
4 2011-10-31:14:24:53 2011-10-31:14:25:57 NO
5 2011-10-31:14:25:57 2011-10-31:15:28:03 NO
6 2011-10-31:15:28:03 2011-10-31:15:29:17 NO
7 2011-10-31:15:29:17 2011-10-31:16:59:50 NO
8 2011-10-31:16:59:50 2011-10-31:17:01:33 YES
7 rows selected.

View log information:

[oracle@physical ~]$ cd /u01/app/oracle/admin/orcl/bdump/


[oracle@physical bdump]$ tail -f alert_orcl.log
Archivelog restore complete. Elapsed time: 0:00:01
Archivelog restore complete. Elapsed time: 0:00:00
Archivelog restore complete. Elapsed time: 0:00:01
Archivelog restore complete. Elapsed time: 0:00:02
Archivelog restore complete. Elapsed time: 0:00:03
Archivelog restore complete. Elapsed time: 0:00:06
Archivelog restore complete. Elapsed time: 0:00:00
Mon Oct 31 17:41:33 2011
Media Recovery Log +FRA/orcl/1_8_765985997.arc
Media Recovery Waiting for thread 1 sequence 9

Switch logs on the main library:


SQL> alter system switch logfile;
System altered.

SQL> alter system switch logfile;


System altered.

Query again on the standby database:


SQL> select sequence#,first_time,next_time,applied from v$archived_log where
sequence# >= 8 order by 1;

SEQUENCE# FIRST_TIME NEXT_TIME APP


---------- ------------------- ------------------- ---
8 2011-10-31:16:59:50 2011-10-31:17:01:33 YES
9 2011-10-31:17:01:33 2011-10-31:17:45:49 YES
10 2011-10-31:17:45:49 2011-10-31:17:49:26 YES
11 2011-10-31:17:49:26 2011-10-31:17:50:42 YES

View log information:


[oracle@physical admin]$ tail -f /u01/app/oracle/admin/orcl/bdump/alert_orcl.log
Fetching gap sequence in thread 1, gap sequence 9-10
Mon Oct 31 17:51:14 2011
RFS[1]: Archived Log: '+FRA/orcl/1_9_765985997.arc'
RFS[1]: Archived Log: '+FRA/orcl/1_10_765985997.arc'
RFS[1]: Archived Log: '+FRA/orcl/1_11_765985997.arc'
Mon Oct 31 17:51:48 2011
Media Recovery Log +FRA/orcl/1_9_765985997.arc
Media Recovery Log +FRA/orcl/1_10_765985997.arc
Media Recovery Log +FRA/orcl/1_11_765985997.arc
Media Recovery Waiting for thread 1 sequence 12

Three: troubleshooting
1: Data is out of sync problem is wrong
SQL> select sequence#,first_time,next_time,applied from v$archived_log;
no rows selected

SQL> archive log list;


Database log mode Archive Mode
Automatic archival Enabled
Archive destination +FRA/orcl
Oldest online log sequence 0
Next log sequence to archive 0
Current log sequence 0

SQL> select * from v$archive_gap;


no rows selected

[oracle@physical ~]$ cd /u01/app/oracle/admin/orcl/bdump/


[oracle@physical bdump]$ ls
alert_orcl.log orcl_arc1_18529.trc orcl_mrp0_18646.trc
[oracle@physical bdump]$ tail -f alert_orcl.log
FAL[client]: Failed to request gap sequence
GAP - thread 1 sequence 8-8
DBID 1293766727 branch 765985997
FAL[client]: All defined FAL servers have been attempted.
-------------------------------------------------------------
Check that the CONTROL_FILE_RECORD_KEEP_TIME initialization
parameter is defined to a value that is sufficiently large
enough to maintain adequate log switch information to resolve
archivelog gaps.

View archive log information on the main library

SQL> archive log list;


Database log mode Archive Mode
Automatic archival Enabled
Archive destination +FRA/orcl
Oldest online log sequence 7
Next log sequence to archive 9
Current log sequence 9

Restore archive logs on the standby database

RMAN> restore archivelog all;


channel ORA_DISK_1: reading from backup piece
/home/oracle/dg_backup/dg_09mqgc7f_1_1
ORA-19870: error reading backup piece /home/oracle/dg_backup/dg_09mqgc7f_1_1
ORA-19504: failed to create file "+FRA/orcl/1_8_765985997.arc"
ORA-17502: ksfdcre:4 Failed to create file +FRA/orcl/1_8_765985997.arc
ORA-15173: entry 'orcl' does not exist in directory '/'
failover to previous backup

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 10/31/2011 17:39:52
RMAN-06026: some targets not found - aborting restore
RMAN-06025: no backup of log thread 1 seq 8 lowscn 489318 found to restore
RMAN-06025: no backup of log thread 1 seq 7 lowscn 485345 found to restore
RMAN-06025: no backup of log thread 1 seq 6 lowscn 485300 found to restore
RMAN-06025: no backup of log thread 1 seq 5 lowscn 482789 found to restore
RMAN-06025: no backup of log thread 1 seq 4 lowscn 482752 found to restore
RMAN-06025: no backup of log thread 1 seq 3 lowscn 479773 found to restore
RMAN-06025: no backup of log thread 1 seq 2 lowscn 472799 found to restore

[oracle@physical dg_backup]$ export ORACLE_SID=+ASM


[oracle@physical dg_backup]$ asmcmd
ASMCMD> cd FRA
ASMCMD> ls
PHYSICAL/
ASMCMD> mkdir orcl
ASMCMD> ls
PHYSICAL/
orcl/

RMAN> restore archivelog all;


ASMCMD> cd orcl
ASMCMD> ls
1_2_765985997.arc
1_3_765985997.arc
1_4_765985997.arc
1_5_765985997.arc
1_6_765985997.arc
1_7_765985997.arc
1_8_765985997.arc

2: After closing the main library, restart the physical standby database, the error
is as follows, the control file is not found.

SQL> startup mount


ORA-00205: error in identifying control file, check alert log for more info
[oracle@physical dbs]$ grep -i control_files initorcl.ora //This path needs to be
the same as the control file path found by the asmcmd command
*.control_files='+DATA/physical/controlfile/Current.256.765999025','+FRA/physcial/
controlfile/backup.256.765999027'
SQL> conn /as sysdba
Connected.
SQL> shutdown abort
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 167772160 bytes


Fixed Size 1218316 bytes
Variable Size 83888372 bytes
Database Buffers 79691776 bytes
Redo Buffers 2973696 bytes
Database mounted.

SQL> alter database recover managed standby database disconnect from session;
Database altered.

Configure the physical standby database to start in spfile mode. Spfile does not
use ASM management.
SQL> create spfile from pfile;
File created.

SQL> alter database recover managed standby database cancel;


Database altered.

SQL> shutdown immediate


SQL> startup mount

SQL> alter database recover managed standby database disconnect from session;
Database altered.

SQL> show parameter spfile;

NAME TYPE VALUE


------------------------------------ ----------- ------------------------------
spfile string /u01/app/oracle/product/10.2.0
/db_1/dbs/spfileorcl.ora

3: Configure ASM error as follows


[root@physical ~]# /u01/app/oracle/product/10.2.0/db_1/bin/localconfig add
/etc/oracle does not exist. Creating it now.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Configuration for local CSS has been initialized

Adding to inittab
Startup will be queued to init within 90 seconds.
Checking the status of new Oracle init process...
Expecting the CRS daemons to be up within 600 seconds.
Giving up: Oracle CSS stack appears NOT to be running.
Oracle CSS service would not start as installed
Automatic Storage Management(ASM) cannot be used until Oracle CSS service is
started

[root@physical ~]# /etc/init.d/init.cssd run >/dev/null 2>&1 </dev/null &


[1] 16323
[root@physical ~]# ps -ef |grep css
root 16323 14445 0 16:22 pts/2 00:00:00 /bin/sh /etc/init.d/init.cssd run
root 16338 16323 0 16:22 pts/2 00:00:00 /bin/sh /etc/init.d/init.cssd
startcheck
root 16406 14445 0 16:22 pts/2 00:00:00 grep css

[root@physical ~]# cd /u01/app/oracle/product/10.2.0/db_1/bin/


[root@physical bin]# ./crsctl check crs
Failure 1 contacting CSS daemon
Cannot communicate with CRS
Cannot communicate with EVM
[root@physical bin]# ./crsctl start crs
Attempting to start CRS stack
The CRS stack will be started shortly

[root@physical bin]# ./crsctl check crs


CSS appears healthy
Cannot communicate with CRS
Cannot communicate with EVM

4: Physical standby database standby log group invalid problem is wrong


SQL> select member,type from v$logfile;

MEMBER TYPE
------------------------------------------------------------ ----------
+DATA/orcl/onlinelog/group_3.263.765986013 ONLINE
+FRA/orcl/onlinelog/group_3.259.765986017 ONLINE
+DATA/orcl/onlinelog/group_2.262.765986005 ONLINE
+FRA/orcl/onlinelog/group_2.258.765986009 ONLINE
+DATA/orcl/onlinelog/group_1.261.765985997 ONLINE
+FRA/orcl/onlinelog/group_1.257.765986003 ONLINE
+DATA/primary/onlinelog/group_4.268.765996737 STANDBY
+FRA/primary/onlinelog/group_4.264.765996743 STANDBY
+DATA/primary/onlinelog/group_5.269.765996751 STANDBY
+FRA/primary/onlinelog/group_5.265.765996757 STANDBY
+DATA/primary/onlinelog/group_6.270.765996763 STANDBY

MEMBER TYPE
------------------------------------------------------------ ----------
+FRA/primary/onlinelog/group_6.266.765996767 STANDBY
+DATA/primary/onlinelog/group_7.271.765996775 STANDBY
+FRA/primary/onlinelog/group_7.267.765996779 STANDBY

Backup library:
SQL> select member,type from v$logfile;

MEMBER TYPE
------------------------------------------------------------ ----------
+DATA/physical/onlinelog/group_3.264.765999293 ONLINE
+FRA/physical/onlinelog/group_3.259.765999299 ONLINE
+DATA/physical/onlinelog/group_2.263.765999285 ONLINE
+FRA/physical/onlinelog/group_2.258.765999291 ONLINE
+DATA/physical/onlinelog/group_1.262.765999279 ONLINE
+FRA/physical/onlinelog/group_1.257.765999283 ONLINE
+DATA STANDBY
+FRA STANDBY
+DATA STANDBY
+FRA STANDBY
+DATA STANDBY

MEMBER TYPE
------------------------------------------------------------ ----------
+FRA STANDBY
+DATA STANDBY

+FRA STANDBY

Delete all standby log groups on the main library and switch log groups

SQL> alter database drop standby logfile group 4;


SQL> alter database drop standby logfile group 5;
SQL> alter database drop standby logfile group 6;
SQL> alter database drop standby logfile group 7;
SQL> alter system switch logfile;

Reserve database query:

SQL> select member,type from v$logfile;

MEMBER TYPE
------------------------------------------------------------ ----------
+DATA/physical/onlinelog/group_3.264.765999293 ONLINE
+FRA/physical/onlinelog/group_3.259.765999299 ONLINE
+DATA/physical/onlinelog/group_2.263.765999285 ONLINE
+FRA/physical/onlinelog/group_2.258.765999291 ONLINE
+DATA/physical/onlinelog/group_1.262.765999279 ONLINE
+FRA/physical/onlinelog/group_1.257.765999283 ONLINE

Add a new standby log group to the main library and switch logs. It is still not
possible to synchronize on the standby database.

SQL> alter database add standby logfile group 4 size 50M;


SQL> alter database add standby logfile group 5 size 50M;
SQL> alter database add standby logfile group 6 size 50M;
SQL> alter database add standby logfile group 7 size 50M;
SQL> alter system switch logfile;

[oracle@physical admin]$ tail -f /u01/app/oracle/admin/orcl/bdump/alert_orcl.log


Primary database is in MAXIMUM PERFORMANCE mode
RFS[2]: No standby redo logfiles created
Mon Oct 31 18:05:16 2011
Media Recovery Log +FRA/orcl/1_12_765985997.arc
Media Recovery Waiting for thread 1 sequence 13 (in transit)
Mon Oct 31 18:05:33 2011
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[3]: Assigned to RFS process 19621
RFS[3]: Identified database type as 'physical standby'

The guess may be that there is no primary directory under the ASM disk group.
Create a related directory under the ASM disk group, add a new log group after
deleting the standby log group on the primary library, and switch the log to find
that the standby log group cannot be synchronized. Later, I tried to put the
standby log group on the file system on the main library. After switching the log,
the standby database could not be created synchronously!
Later, after the problem was passed through the switchover, manually create the
standby log group on the original physical standby database!

You might also like