Showing posts with label Data Guard. Show all posts
Showing posts with label Data Guard. Show all posts

Tuesday, October 29, 2019

about data guard FAL setting

FAL_SERVER = Specifies one or more Oracle Net service names for the databases from which this standby database can fetch (request) missing archived redo log files.

FAL_CLIENT = This parameter is no longer required. If it is not set, the fetch archive log (FAL) server will obtain the client's network address from the LOG_ARCHIVE_DEST_n parameter that corresponds to the client's DB_UNIQUE_NAME.



With broker configured

Yes the broker handles it. FAL_CLIENT would not be set at all but FAL_SERVER would default itself to the primary db_unique_name. That´s the beauty of the Broker - it really sorts these things out for you, so in my experience the best setup with Broker is to not set anything before hand, but let the Broker sort all those parameters for you. And if you need to change something, always do it from the dgmgrl interface - not sql*plus - as that would cause inconsistencies with the Broker configuration.

Thursday, March 02, 2017

considerations to use logical standby to sync partial schema

Two points to highlight based on 12.2c document shared below.

1. application side to ensure prerequisites of logical standby database can be met.

http://docs.oracle.com/database/122/SBYDB/creating-oracle-data-guard-logical-standby.htm#SBYDB4731

4.1.1 Determine Support for Data Types and Storage Attributes for Tables

4.1.2 Ensure Table Rows in the Primary Database Can Be Uniquely Identified


2. As partial objects  within a schema, it can be achieved by oracle package dbms_logstdby.   For each new object creation after go-live and to be skipped from changing, the procedure should be executed.  Requires well documentation and maintenance effort.

http://docs.oracle.com/database/122/SBYDB/managing-oracle-data-guard-logical-standby-databases.htm#SBYDB4804

11.5.2 Using DBMS_LOGSTDBY.SKIP to Prevent Changes to Specific Schema Objects


Other relevant article

http://www.databasejournal.com/features/oracle/skipping-schema-dml-in-an-oracle-11.2-logical-standby-database.html


Friday, May 27, 2016

data guard SwitchOver using cloud control

When encounter this message in cloud control "You must reconnect to the current standby apply instance to perform the operation".

This means I have to connect to standby database as target, before the switch over can be performed. As currently I am connecting to primary database as target, which is not correct. 

Friday, August 22, 2014

impact of SYS password change to data guard

when SYS password is changed, password file changed accordingly.

If it is not sync to standby site, archived log transfer failed as shown below.

-- at primary site

Wed Aug 20 11:14:24 2014
Archived Log entry 2743 added for thread 1 sequence 5263 ID 0x69704abb dest 1:
Archived Log entry 2744 added for thread 1 sequence 5264 ID 0x69704abb dest 1:
Wed Aug 20 11:14:47 2014
Starting background process SMCO
Wed Aug 20 11:14:47 2014
SMCO started with pid=33, OS id=15785
Wed Aug 20 11:15:44 2014
Error 1017 received logging on to the standby
------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and that the SYS password is same in the password files.
      returning error ORA-16191
------------------------------------------------------------
PING[ARC1]: Heartbeat failed to connect to standby 'dg'. Error is 16191.
Wed Aug 20 11:16:45 2014
Error 1017 received logging on to the standby
------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and that the SYS password is same in the password files.
      returning error ORA-16191
------------------------------------------------------------
PING[ARC1]: Heartbeat failed to connect to standby 'dg'. Error is 16191.
Wed Aug 20 11:16:56 2014
Thread 1 advanced to log sequence 5266 (LGWR switch)
  Current log# 2 seq# 5266 mem# 0: /u01/oradata/DG/redo02.log
Wed Aug 20 11:16:56 2014
Archived Log entry 2745 added for thread 1 sequence 5265 ID 0x69704abb dest 1:
Wed Aug 20 11:16:57 2014
Error 1017 received logging on to the standby
------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and that the SYS password is same in the password files.
      returning error ORA-16191
------------------------------------------------------------
FAL[server, ARC3]: Error 16191 creating remote archivelog file 'dg'
FAL[server, ARC3]: FAL archive failed, see trace file.
ARCH: FAL archive failed. Archiver continuing
ORACLE Instance DGS - Archival Error. Archiver continuing.


--at standby site

ARC8: Becoming the 'no FAL' ARCH
ARC1: Becoming the heartbeat ARCH
ARC1: Becoming the active heartbeat ARCH
Error 1017 received logging on to the standby
------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and that the SYS password is same in the password files.
      returning error ORA-16191
------------------------------------------------------------
FAL[client, ARC9]: Error 16191 connecting to dgs for fetching gap sequence




Monday, April 15, 2013

data guard apply lag feature

to show the lag statistics while logical standby db is applying archived log to catch up the primary, after disk space issue is solved.

$ cat chk_dg_stats.sql
select name, value, time_computed from v$dataguard_stats
/


14:48:22 SYS@DGLOGI> @chk_dg_stats

NAME                             VALUE                                                            TIME_COMPUTED
-------------------------------- ---------------------------------------------------------------- ------------------------------
transport lag                    +00 00:00:00                                                     04/10/2013 14:48:26
apply lag                        +00 22:29:25                                                     04/10/2013 14:48:26
apply finish time                +00 00:00:27.008                                                 04/10/2013 14:48:26
estimated startup time           21                                                               04/10/2013 14:48:26

14:48:26 SYS@DGLOGI> @chk_dg_stats

NAME                             VALUE                                                            TIME_COMPUTED
-------------------------------- ---------------------------------------------------------------- ------------------------------
transport lag                    +00 00:00:00                                                     04/10/2013 14:48:35
apply lag                        +00 16:35:59                                                     04/10/2013 14:48:35
apply finish time                +00 00:00:18.451                                                 04/10/2013 14:48:35
estimated startup time           21                                                               04/10/2013 14:48:35

14:48:35 SYS@DGLOGI> @chk_dg_stats

NAME                             VALUE                                                            TIME_COMPUTED
-------------------------------- ---------------------------------------------------------------- ------------------------------
transport lag                    +00 00:00:00                                                     04/10/2013 14:48:37
apply lag                        +00 14:47:50                                                     04/10/2013 14:48:37
apply finish time                +00 00:00:17.303                                                 04/10/2013 14:48:37
estimated startup time           21                                                               04/10/2013 14:48:37

[A14:48:37 SYS@DGLOGI> @chk_dg_stats

NAME                             VALUE                                                            TIME_COMPUTED
-------------------------------- ---------------------------------------------------------------- ------------------------------
transport lag                    +00 00:00:00                                                     04/10/2013 14:48:39
apply lag                        +00 14:35:43                                                     04/10/2013 14:48:39
apply finish time                +00 00:00:12.345                                                 04/10/2013 14:48:39
estimated startup time           21                                                               04/10/2013 14:48:39

14:48:39 SYS@DGLOGI> @chk_dg_stats

NAME                             VALUE                                                            TIME_COMPUTED
-------------------------------- ---------------------------------------------------------------- ------------------------------
transport lag                    +00 00:00:00                                                     04/10/2013 14:48:46
apply lag                        +00 10:45:32                                                     04/10/2013 14:48:46
apply finish time                +00 00:00:06.826                                                 04/10/2013 14:48:46
estimated startup time           21                                                               04/10/2013 14:48:46

14:48:46 SYS@DGLOGI> @chk_dg_stats

NAME                             VALUE                                                            TIME_COMPUTED
-------------------------------- ---------------------------------------------------------------- ------------------------------
transport lag                    +00 00:00:00                                                     04/10/2013 14:48:49
apply lag                        +00 07:49:19                                                     04/10/2013 14:48:49
apply finish time                +00 00:00:05.111                                                 04/10/2013 14:48:49
estimated startup time           21                                                               04/10/2013 14:48:49

14:48:49 SYS@DGLOGI> @chk_dg_stats

NAME                             VALUE                                                            TIME_COMPUTED
-------------------------------- ---------------------------------------------------------------- ------------------------------
transport lag                    +00 00:00:00                                                     04/10/2013 14:50:13
apply lag                        +00 00:00:00                                                     04/10/2013 14:50:13
apply finish time                +00 00:00:00.000                                                 04/10/2013 14:50:13
estimated startup time           21                                                               04/10/2013 14:50:13

Thursday, January 24, 2013

How to corrupt a specific block

Continue to play with Amazing ABMR .

Table LIQY.T1 is the only VERY FIRST table in tablepsace USERS, and I was wrong to use dba_extents to find the block address due to rush time in evening .

SYS@DG> select file_id, file_name from dba_data_files;

   FILE_ID
----------
FILE_NAME
-------------------------------------------------------------------------------------------------------------------                      -----------------
         1
/u01/oradata/DG/system01.dbf

         2
/u01/oradata/DG/sysaux01.dbf

         3
/u01/oradata/DG/undotbs01.dbf

         4
/u01/oradata/DG/users01.dbf

         5
/u01/oradata/DG/dg1_tbs01.dbf

SYS@DG> select owner, segment_name from dba_segments where tablespace_name='USERS';

OWNER                          SEGMENT_NAME
------------------------------ ---------------------------------------------------------------------------------
LIQY                           T1


SYS@DG> select file_id, block_id from dba_extents where SEGMENT_NAME='T1';

   FILE_ID   BLOCK_ID
---------- ----------
         4        128

And I followed below command in "Active data guard hands on lab.pdf"  .

"dd if=/u01/app/oradata/SFO/example01.dbf of=/u01/app/oradata/SFO/example01.dbf count=1 bs=8192 skip=141 seek=140 conv=notrunc"

I thought  the (seek value) = (skip value)  - 1 ,  and come out  my command.
 dd if=/u01/oradata/DG/users01.dbf of=/u01/oradata/DG/users01.dbf count=1 bs=8192 skip=130 seek=129 conv=notrunc


Today, I spend some to "man dd"  and  thanks to "

Fix physically corrupt data blocks using PLSQL - DBMS_REPAIR"

which tells me to query dba_segments .

SYS@DG> select segment_name , header_file , header_block
  2  from dba_segments
  3  where segment_name = 'T1'
  4  and   owner = 'LIQY';

SEGMENT_NAME                                                                      HEADER_FILE HEADER_BLOCK
--------------------------------------------------------------------------------- ----------- ------------
T1                                                                                          4          130

Thus, I realized that :

1. I forgot that two blocks are used as data file header. So the table's header block should be 128 +2 =130. The first block of table LIQY.T1 is 131.
2. The value passed to the command in "Active data guard hands on lab.pdf"  is incorrect, reason being :

       seek=BLOCKS
              skip BLOCKS obs-sized blocks at start of output

       skip=BLOCKS
              skip BLOCKS ibs-sized blocks at start of input

so , we should skip130 blocks in input file and seek for 131st block in output file as target block.

The correct command should be :

orarac1poc:DG:/u01/oradata/DG> dd if=/u01/oradata/DG/users01.dbf of=/u01/oradata/DG/users01.dbf count=1 bs=8192 skip=130 seek=131 conv=notrunc
1+0 records in
1+0 records out
8192 bytes (8.2 kB) copied, 8.6e-05 seconds, 95.3 MB/s

With the help of active data guard and ABMR , the corrupt block is repaired transparently to front-end.



SYS@DG> alter system flush buffer_cache;

System altered.

SYS@DG> set time on
16:59:48 SYS@DG>  select * from liqy.t1;

        F1
----------
         1

16:59:55 SYS@DG> select file_id, block_id from dba_extents where SEGMENT_NAME='T1';

   FILE_ID   BLOCK_ID
---------- ----------
         4        128


Here are the corresponding alert.log .

Thu Jan 24 16:59:42 2013
ALTER SYSTEM: Flushing buffer cache

Thu Jan 24 16:59:54 2013
Hex dump of (file 4, block 131) in trace file /u01/app/oracle/diag/rdbms/dg/DG/trace/DG_ora_10205.trc
Corrupt block relative dba: 0x01000083 (file 4, block 131)
Bad header found during multiblock buffer read
Data in bad block:
 type: 35 format: 2 rdba: 0x01000082
 last change scn: 0x0000.000f3818 seq: 0x1 flg: 0x04
 spare1: 0x0 spare2: 0x0 spare3: 0x0
 consistency value in tail: 0x38182301
 check value in block header: 0x442e
 computed block checksum: 0x0
Reading datafile '/u01/oradata/DG/users01.dbf' for corruption at rdba: 0x01000083 (file 4, block 131)
Reread (file 4, block 131) found same corrupt data (no logical check)
Starting background process ABMR
Thu Jan 24 16:59:54 2013
ABMR started with pid=36, OS id=10244
Automatic block media recovery service is active.
Automatic block media recovery requested for (file# 4, block# 131)
Thu Jan 24 16:59:55 2013
Automatic block media recovery successful for (file# 4, block# 131)
Automatic block media recovery successful for (file# 4, block# 131)
WARNING: AutoBMR fixed mismatched on-disk block 1000082 with in-mem rdba 1000083.



Amazing Automatic Block Media Recovery by Active Data Guard



Oracle Database 11g Release 2 now has the capability to automatically repair corrupt data blocks in your production database as soon as the corruption is detected by using your Active Data Guard standby database to retrieve good copies of the corrupted blocks. Automatic Block Media Recovery will also automatically repair corrupted blocks that are discovered in your physical standby databases. This feature reduces the amount of time that data is inaccessible due to block corruption and will avoid returning errors to your application.

This reduces block recovery time by using up-to-date good blocks in real-time, as opposed to retrieving blocks from disk or tape backups, or from Flashback logs. The process is as follows:

If a corrupt data block is discovered on a Primary database.


If you have a physical standby database open read only with Active Data Guard, then the standby repairs corrupt data blocks in the primary database automatically. As result, any corrupt data block encountered when a primary database is accessed is automatically replaced with an uncorrupted copy of that block from the Active Data Guard physical standby database.



Below steps are my test.


1. Found a block to be to be corrupted.


SYS@DG> conn liqy/liqyliqy

Connected.

LIQY@DG> select * from t1;


F1

----------

1


SYS@DG> select segment_name , header_file , header_block

2 from dba_segments

3 where segment_name = 'T1'

4 and owner = 'LIQY';


SEGMENT_NAME HEADER_FILE HEADER_BLOCK

----------------------------------------------------------- ----------- ------------

T1 4 130


The header of the table is in block 130, so the only row should be in block 131, and we will get an error when we try to select data from the corrupted block.


SYS@DG> show parameter block


NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

db_block_buffers integer 0

db_block_checking string FALSE

db_block_checksum string TYPICAL

db_block_size integer 8192

db_file_multiblock_read_count integer 118


2.To show how this feature works we need to close our physical standby so that Automatic Block Media Recovery cannot happen , and we do see the error because it cannot automatically recover the block.


In standby node, ensure data is fine before our corruption.

orarac2poc:DGS:/home/oracle> sqlplus / as sysdba


SQL*Plus: Release 11.2.0.2.0 Production on Thu Jan 24 14:56:51 2013


Copyright (c) 1982, 2010, Oracle. All rights reserved.



Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production

With the Partitioning, Real Application Clusters, OLAP, Data Mining

and Real Application Testing options


SYS@DGS> conn liqy/liqyliqy

Connected.

LIQY@DGS> select * from t1;


F1

----------

1


orarac2poc:DGS:/home/oracle> dgmgrl

DGMGRL for Linux: Version 11.2.0.2.0 - 64bit Production


Copyright (c) 2000, 2009, Oracle. All rights reserved.


Welcome to DGMGRL, type "help" for information.

DGMGRL> connect sys/oracle123

Connected.

DGMGRL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

DGMGRL> startup

ORACLE instance started.

Database mounted.

Database opened.

DGMGRL> exit




3. Corrupt block 131 using the "dd" command in Linux.


orarac1poc:DG:/u01/oradata/DG> ls -lrt

total 2896464

...

-rw-r----- 1 oracle asmadmin 5251072 Jan 24 10:13 users01.dbf


orarac1poc:DG:/u01/oradata/DG> date

Thu Jan 24 14:53:26 SGT 2013

orarac1poc:DG:/u01/oradata/DG> cp -p users01.dbf users01.dbf.201301241454

orarac1poc:DG:/u01/oradata/DG> dd of=users01.dbf bs=8192 conv=notrunc seek=131 <> make it corrupted.
> EOF
0+1 records in
0+1 records out
19 bytes (19 B) copied, 7.4e-05 seconds, 257 kB/s
orarac1poc:DG:/u01/oradata/DG> ls -l users01.dbf
-rw-r----- 1 oracle asmadmin 5251072 Jan 24 15:01 users01.dbf

4. In primary node, access the table again.

orarac1poc:DG:/u01/oradata/DG> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Thu Jan 24 15:01:28 2013

Copyright (c) 1982, 2010, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SYS@DG> conn liqy/liqyliqy
Connected.
LIQY@DG> select * from t1;

F1
----------
1

LIQY@DG> exit

#still accessible, looks we forget one thing.
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
orarac1poc:DG:/u01/oradata/DG> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Thu Jan 24 15:01:54 2013

Copyright (c) 1982, 2010, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SYS@DG> alter system flush buffer_cache;

System altered.

-- in alert log
Thu Jan 24 15:02:24 2013
ALTER SYSTEM: Flushing buffer cache


SYS@DG> select * from liqy.t1;
select * from liqy.t1
*
ERROR at line 1:
ORA-01578: ORACLE data block corrupted (file # 4, block # 131)
ORA-01110: data file 4: '/u01/oradata/DG/users01.dbf'


-- information in alert.log

Thu Jan 24 15:02:26 2013


***********************************************************************

Fatal NI connect error 12514, connecting to:
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=orarac2poc)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=dgs_DGB.POC)(CID=(PROGRAM=oracle)(HOST=orarac1poc)(USER=oracle))))

VERSION INFORMATION:
TNS for Linux: Version 11.2.0.2.0 - Production
TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.2.0 - Production
Time: 24-JAN-2013 15:02:26
Tracing not turned on.
Tns error struct:
ns main err code: 12564

TNS-12564: TNS:connection refused
ns secondary err code: 0
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0


***********************************************************************

Fatal NI connect error 12514, connecting to:
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=orarac2poc)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=dgs_DGB.POC)(CID=(PROGRAM=oracle)(HOST=orarac1poc)(USER=oracle))))

VERSION INFORMATION:
TNS for Linux: Version 11.2.0.2.0 - Production
TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.2.0 - Production
Time: 24-JAN-2013 15:02:26
Tracing not turned on.
Tns error struct:
ns main err code: 12564

TNS-12564: TNS:connection refused
ns secondary err code: 0
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0


***********************************************************************

Fatal NI connect error 12514, connecting to:
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=orarac2poc)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=dgs_DGB.POC)(CID=(PROGRAM=oracle)(HOST=orarac1poc)(USER=oracle))))

VERSION INFORMATION:
TNS for Linux: Version 11.2.0.2.0 - Production
TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.2.0 - Production
Time: 24-JAN-2013 15:02:26
Tracing not turned on.
Tns error struct:
ns main err code: 12564

TNS-12564: TNS:connection refused
ns secondary err code: 0
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0


***********************************************************************

Fatal NI connect error 12514, connecting to:
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=orarac2poc)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=DGS.POC)(CID=(PROGRAM=oracle)(HOST=orarac1poc)(USER=oracle))))

VERSION INFORMATION:
TNS for Linux: Version 11.2.0.2.0 - Production
TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.2.0 - Production
Time: 24-JAN-2013 15:02:26
Tracing not turned on.
Tns error struct:
ns main err code: 12564

TNS-12564: TNS:connection refused
ns secondary err code: 0
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0


***********************************************************************

Fatal NI connect error 12514, connecting to:
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=orarac2poc)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=DGS.POC)(CID=(PROGRAM=oracle)(HOST=orarac1poc)(USER=oracle))))

VERSION INFORMATION:
TNS for Linux: Version 11.2.0.2.0 - Production
TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.2.0 - Production
Time: 24-JAN-2013 15:02:26
Tracing not turned on.
Tns error struct:
ns main err code: 12564

TNS-12564: TNS:connection refused
ns secondary err code: 0
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0


***********************************************************************

Fatal NI connect error 12514, connecting to:
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=orarac2poc)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=DGS.POC)(CID=(PROGRAM=oracle)(HOST=orarac1poc)(USER=oracle))))

VERSION INFORMATION:
TNS for Linux: Version 11.2.0.2.0 - Production
TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.2.0 - Production
Time: 24-JAN-2013 15:02:26
Tracing not turned on.
Tns error struct:
ns main err code: 12564

TNS-12564: TNS:connection refused
ns secondary err code: 0
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0
Hex dump of (file 4, block 131) in trace file /u01/app/oracle/diag/rdbms/dg/DG/trace/DG_ora_30281.trc
Corrupt block relative dba: 0x01000083 (file 4, block 131)
Bad header found during multiblock buffer read
Data in bad block:
type: 109 format: 1 rdba: 0x20746920
last change scn: 0x7075.72726f63 seq: 0x74 flg: 0x65
spare1: 0x6b spare2: 0x65 spare3: 0xa
consistency value in tail: 0x381f0601
check value in block header: 0x2e64
computed block checksum: 0x6675
Reading datafile '/u01/oradata/DG/users01.dbf' for corruption at rdba: 0x01000083 (file 4, block 131)
Reread (file 4, block 131) found same corrupt data (no logical check)
Starting background process ABMR
Thu Jan 24 15:02:31 2013
ABMR started with pid=28, OS id=30316
Automatic block media recovery service is active.
Automatic block media recovery requested for (file# 4, block# 131)
Thu Jan 24 15:02:31 2013


***********************************************************************

Fatal NI connect error 12514, connecting to:
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=orarac2poc)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=DGS.POC)(CID=(PROGRAM=oracle)(HOST=orarac1poc)(USER=oracle))))

VERSION INFORMATION:
TNS for Linux: Version 11.2.0.2.0 - Production
TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.2.0 - Production
Time: 24-JAN-2013 15:02:31
Tracing not turned on.
Tns error struct:
ns main err code: 12564

TNS-12564: TNS:connection refused
ns secondary err code: 0
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0
Errors in file /u01/app/oracle/diag/rdbms/dg/DG/trace/DG_bmr0_30318.trc:
ORA-17627: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
ORA-17629: Cannot connect to the remote database server <
Automatic block media recovery failed for (file# 4, block# 131)
[No standby available]
Thu Jan 24 15:02:32 2013
Corrupt Block Found
TSN = 4, TSNAME = USERS
RFN = 4, BLK = 131, RDBA = 16777347
OBJN = 61354, OBJD = 61354, OBJECT = T1, SUBOBJECT =
SEGMENT OWNER = LIQY, SEGMENT TYPE = Table Segment
Errors in file /u01/app/oracle/diag/rdbms/dg/DG/trace/DG_ora_30281.trc (incident=61473):
ORA-01578: ORACLE data block corrupted (file # 4, block # 131)
ORA-01110: data file 4: '/u01/oradata/DG/users01.dbf'
Incident details in: /u01/app/oracle/diag/rdbms/dg/DG/incident/incdir_61473/DG_ora_30281_i61473.trc
Thu Jan 24 15:02:36 2013
Dumping diagnostic data in directory=[cdmp_20130124150236], requested by (instance=1, osid=30281), summary=[incident=61473].
Thu Jan 24 15:02:36 2013
Sweep [inc][61473]: completed
Hex dump of (file 4, block 131) in trace file /u01/app/oracle/diag/rdbms/dg/DG/incident/incdir_61473/DG_m000_30326_i61473_a.trc
Corrupt block relative dba: 0x01000083 (file 4, block 131)
Bad header found during validation
Data in bad block:
type: 109 format: 1 rdba: 0x20746920
last change scn: 0x7075.72726f63 seq: 0x74 flg: 0x65
spare1: 0x6b spare2: 0x65 spare3: 0xa
consistency value in tail: 0x381f0601
check value in block header: 0x2e64
computed block checksum: 0x6675
Reread of blocknum=131, file=/u01/oradata/DG/users01.dbf. found same corrupt data
Reread of blocknum=131, file=/u01/oradata/DG/users01.dbf. found same corrupt data
Reread of blocknum=131, file=/u01/oradata/DG/users01.dbf. found same corrupt data
Reread of blocknum=131, file=/u01/oradata/DG/users01.dbf. found same corrupt data
Reread of blocknum=131, file=/u01/oradata/DG/users01.dbf. found same corrupt data
Checker run found 1 new persistent data failures
Thu Jan 24 15:02:37 2013
Sweep [inc2][61473]: completed


5. Now let us start active physical standby and access the table to see what happens.

DGMGRL> startup
ORACLE instance started.
Database mounted.
Database opened.
DGMGRL> exit
orarac2poc:DGS:/home/oracle> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Thu Jan 24 15:03:44 2013

Copyright (c) 1982, 2010, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SYS@DGS> select * from liqy.t1;

F1
----------
1

-- in standby alert log, no info related ABMR.


Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE THROUGH ALL SWITCHOVER DISCONNECT USING CURRENT LOGFILE

Media Recovery Log /u01/oradata/DG/FRA/DGS/archivelog/2013_01_24/o1_mf_1_52_8j1q5vpm_.arc

Media Recovery Waiting for thread 1 sequence 53 (in transit)

Recovery of Online Redo Log: Thread 1 Group 5 Seq 53 Reading mem 0

Mem# 0: /u01/oradata/DG/stbredo05.rdo



6. but in physical database now.


SYS@DG> select * from liqy.t1;


F1

----------

1


-- in primary db's alert log.


******************************************************************

LGWR: Setting 'active' archival for destination LOG_ARCHIVE_DEST_2

******************************************************************

Thu Jan 24 15:03:23 2013

ARCd: Standby redo logfile selected for thread 1 sequence 52 for destination LOG_ARCHIVE_DEST_2

LNS: Standby redo logfile selected for thread 1 sequence 53 for destination LOG_ARCHIVE_DEST_2

Thu Jan 24 15:04:14 2013
Hex dump of (file 4, block 131) in trace file /u01/app/oracle/diag/rdbms/dg/DG/trace/DG_ora_30281.trc
Corrupt block relative dba: 0x01000083 (file 4, block 131)
Bad header found during multiblock buffer read

Data in bad block:

type: 109 format: 1 rdba: 0x20746920

last change scn: 0x7075.72726f63 seq: 0x74 flg: 0x65

spare1: 0x6b spare2: 0x65 spare3: 0xa

consistency value in tail: 0x381f0601

check value in block header: 0x2e64

computed block checksum: 0x6675

Reading datafile '/u01/oradata/DG/users01.dbf' for corruption at rdba: 0x01000083 (file 4, block 131)
Reread (file 4, block 131) found same corrupt data (no logical check)
Automatic block media recovery requested for (file# 4, block# 131)
Thu Jan 24 15:04:16 2013
Automatic block media recovery successful for (file# 4, block# 131)
Automatic block media recovery successful for (file# 4, block# 131)
WARNING: AutoBMR fixed mismatched on-disk block 20746920 with in-mem rdba 1000083.



Amazing!!! That is only what I can say. It is very help for media recovery!



References:


Fix physically corrupt data blocks using PLSQL - DBMS_REPAIR

Oracle's "Active Data Guard Hands On Lab.pdf"

Tuesday, January 22, 2013

Re-Configure data guard broker after re-create physical standby database

SYS@DGS> startup mount
ORACLE instance started.

Total System Global Area  680607744 bytes
Fixed Size                  2229600 bytes
Variable Size             197135008 bytes
Database Buffers          473956352 bytes
Redo Buffers                7286784 bytes
Database mounted.

SYS@DGS> show parameter name

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert                 string
db_name                              string      DG
db_unique_name                       string      DGS
global_names                         boolean     FALSE
instance_name                        string      DGS
lock_name_space                      string
log_file_name_convert                string      /u01/oradata/DG/, /u01/oradata
                                                 /DG/
service_names                        string      DGS.POC


orarac2poc:DGS:/u01/app/oracle/product/11.2.0/db_2/dbs> sqlplus sys/oracle123@DGS as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Tue Jan 22 13:39:37 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SYS@DGS> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options




orarac1poc:DG:/u01/app/oracle/product/11.2.0/db_2/network/admin> dgmgrl
DGMGRL for Linux: Version 11.2.0.2.0 - 64bit Production

Copyright (c) 2000, 2009, Oracle. All rights reserved.

Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys/oracle123
Connected.
DGMGRL> show configuration;

Configuration - DGConfig1

  Protection Mode: MaxPerformance
  Databases:
    dg - Primary database

Fast-Start Failover: DISABLED

Configuration Status:
DISABLED


DGMGRL> help

The following commands are available:

add            Adds a standby database to the broker configuration
connect        Connects to an Oracle database instance
convert        Converts a database from one type to another
create         Creates a broker configuration
disable        Disables a configuration, a database, or fast-start failover
edit           Edits a configuration, database, or instance
enable         Enables a configuration, a database, or fast-start failover
exit           Exits the program
failover       Changes a standby database to be the primary database
help           Displays description and syntax for a command
quit           Exits the program
reinstate      Changes a database marked for reinstatement into a viable standby
rem            Comment to be ignored by DGMGRL
remove         Removes a configuration, database, or instance
show           Displays information about a configuration, database, or instance
shutdown       Shuts down a currently running Oracle database instance
sql            Executes a SQL statement
start          Starts the fast-start failover observer
startup        Starts an Oracle database instance
stop           Stops the fast-start failover observer
switchover     Switches roles between a primary and standby database

Use "help " to see syntax for individual commands

DGMGRL> help add

Adds a standby database to the broker configuration

Syntax:

  ADD DATABASE
    [AS CONNECT IDENTIFIER IS ]
    [MAINTAINED AS {PHYSICAL|LOGICAL}];

DGMGRL> show configuration;

Configuration - DGConfig1

  Protection Mode: MaxPerformance
  Databases:
    dg - Primary database

Fast-Start Failover: DISABLED

Configuration Status:
DISABLED

DGMGRL> add database DGS as connect identifier is 'DGS';
Error: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

Failed.
DGMGRL> show configuration;

Configuration - DGConfig1

  Protection Mode: MaxPerformance
  Databases:
    dg - Primary database

Fast-Start Failover: DISABLED

Configuration Status:
DISABLED

DGMGRL> exit
orarac1poc:DG:/u01/app/oracle/product/11.2.0/db_2/network/admin> tnsping DGS

TNS Ping Utility for Linux: Version 11.2.0.2.0 - Production on 22-JAN-2013 13:48:27

Copyright (c) 1997, 2010, Oracle.  All rights reserved.

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = orarac2poc)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = DGS)))
OK (0 msec)
orarac1poc:DG:/u01/app/oracle/product/11.2.0/db_2/network/admin> vi tnsnames.ora

# changed SERVICE_NAME = DGS to SERVICE_NAME = DGS.POC in tnsnames.ora


orarac1poc:DG:/u01/app/oracle/product/11.2.0/db_2/network/admin> tnsping DGS

TNS Ping Utility for Linux: Version 11.2.0.2.0 - Production on 22-JAN-2013 13:48:47

Copyright (c) 1997, 2010, Oracle.  All rights reserved.

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = orarac2poc)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = DGS.POC)))
OK (10 msec)
orarac1poc:DG:/u01/app/oracle/product/11.2.0/db_2/network/admin> dgmgrl
DGMGRL for Linux: Version 11.2.0.2.0 - 64bit Production

Copyright (c) 2000, 2009, Oracle. All rights reserved.

Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys/oracle123
Connected.
DGMGRL> show configuration;

Configuration - DGConfig1

  Protection Mode: MaxPerformance
  Databases:
    dg - Primary database

Fast-Start Failover: DISABLED

Configuration Status:
DISABLED


DGMGRL> add database DGS as connect identifier is 'DGS';
Database "dgs" added
DGMGRL> show configuration;

Configuration - DGConfig1

  Protection Mode: MaxPerformance
  Databases:
    dg  - Primary database
    dgs - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
DISABLED

DGMGRL> enable configuration;
Enabled.
DGMGRL> show configuration;

Configuration - DGConfig1

  Protection Mode: MaxPerformance
  Databases:
    dg  - Primary database
      Error: ORA-16797: database is not using a server parameter file

    dgs - Physical standby database
      Error: ORA-16797: database is not using a server parameter file

Fast-Start Failover: DISABLED

Configuration Status:
ERROR

DGMGRL> disable configuration;
Disabled.
DGMGRL> show configuration;

Configuration - DGConfig1

  Protection Mode: MaxPerformance
  Databases:
    dg  - Primary database
    dgs - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
DISABLED

DGMGRL> exit
orarac1poc:DG:/u01/app/oracle/product/11.2.0/db_2/network/admin> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Tue Jan 22 13:51:26 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SYS@DG> create spfile from pfile;

File created.

SYS@DG> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

#crete spfile for standby database too .


orarac1poc:DG:/u01/app/oracle/product/11.2.0/db_2/network/admin> dgmgrl
DGMGRL for Linux: Version 11.2.0.2.0 - 64bit Production

Copyright (c) 2000, 2009, Oracle. All rights reserved.

Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys/oracle123
Connected.
DGMGRL> enable configuration;
Enabled.
DGMGRL> show configuration;

Configuration - DGConfig1

  Protection Mode: MaxPerformance
  Databases:
    dg  - Primary database
      Error: ORA-16797: database is not using a server parameter file

    dgs - Physical standby database
      Error: ORA-16797: database is not using a server parameter file

Fast-Start Failover: DISABLED

Configuration Status:
ERROR

DGMGRL> exit

orarac1poc:DG:/u01/app/oracle/product/11.2.0/db_2/network/admin> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Tue Jan 22 13:52:23 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SYS@DG> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@DG> startup
ORACLE instance started.

Total System Global Area  680607744 bytes
Fixed Size                  2229600 bytes
Variable Size             419433120 bytes
Database Buffers          251658240 bytes
Redo Buffers                7286784 bytes
Database mounted.
Database opened.
SYS@DG> alter system switch logfile;

System altered.

SYS@DG> select * from v$log;

    GROUP#    THREAD#  SEQUENCE#      BYTES  BLOCKSIZE    MEMBERS ARC STATUS           FIRST_CHANGE# FIRST_TIM NEXT_CHANGE#
---------- ---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- --------- ------------
NEXT_TIME
---------
         1          1         22   52428800        512          1 YES ACTIVE                 3653744 22-JAN-13      3653906
22-JAN-13

         2          1         23   52428800        512          1 YES ACTIVE                 3653906 22-JAN-13      3654034
22-JAN-13

         3          1         24   52428800        512          1 NO  CURRENT                3654034 22-JAN-13   2.8147E+14



SYS@DG> alter system switch logfile;

System altered.

SYS@DG> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

orarac1poc:DG:/u01/app/oracle/product/11.2.0/db_2/network/admin> dgmgrl
DGMGRL for Linux: Version 11.2.0.2.0 - 64bit Production

Copyright (c) 2000, 2009, Oracle. All rights reserved.

Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys/oracle123
Connected.
DGMGRL> show configuration;

Configuration - DGConfig1

  Protection Mode: MaxPerformance
  Databases:
    dg  - Primary database
    dgs - Physical standby database
      Error: ORA-16700: the standby database has diverged from the primary database

Fast-Start Failover: DISABLED

Configuration Status:
ERROR


#The ORA-16700 error disappeared after I start LOG APPLY in standby database.
SYS@DGS> alter database recover managed standby database using current logfile disconnect from session;



DGMGRL> enable configuration;
Enabled.
DGMGRL> show configuration;

Configuration - DGConfig1

  Protection Mode: MaxPerformance
  Databases:
    dg  - Primary database
    dgs - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS



DGMGRL> help  sql

Executes a SQL statement

Syntax:

  SQL "";

DGMGRL> sql "alter system switch logfile; "
ORA-00911: invalid character

Failed.
DGMGRL> sql "alter system switch logfile "
Succeeded.
DGMGRL> sql "alter system checkpoint"
Succeeded.

ORA-12528 before duplicate standby database from active database

verify the connectivity before rman DUPLICATE command, but hit below error. 

orarac2poc:DGS:/u01/app/oracle/product/11.2.0/db_2/dbs> sqlplus sys/oracle123@DGS as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Tue Jan 22 11:00:41 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

ERROR:
ORA-12528: TNS:listener: all appropriate instances are blocking new connections


Enter user-name:


Tried restart LISTENER, but still fail.

Here is the listener.ora. (was working fine with previous standby database, now re-create it)

[grid@orarac2poc admin]$ cat listener.ora
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1))))                # line added by Agent
#LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))           # line added by Agent
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY=LISTENER))
      (ADDRESS = (PROTOCOL = TCP)(HOST = orarac2poc)(PORT = 1521))
    )
  )


SID_LIST_LISTENER=
  (SID_LIST =
    (SID_DESC =
        (GLOBAL_DBNAME = DGS_DGMGRL.POC)
        (ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_2)
        (SID_NAME =DGS)
    )
  )

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON              # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON                # line added by Agent


#and tnsnames.ora

DGS =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = orarac2poc)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = DGS.POC)
    )
  )

and inside PFILE , db_domain is set to 'POC'.

2.  I removed the db_domain , GLOBAL_DBNAME info in PFILE , listener.ora and tnsnames.ora. As they were added for database guard broker, and remain static registration. After which it works. 
The followings are new setting.

[grid@orarac2poc admin]$ cat listener.ora
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1))))                # line added by Agent
#LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))           # line added by Agent
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY=LISTENER))
      (ADDRESS = (PROTOCOL = TCP)(HOST = orarac2poc)(PORT = 1521))
    )
  )


SID_LIST_LISTENER=
  (SID_LIST =
    (SID_DESC =
        (ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_2)
        (SID_NAME =DGS)
    )
  )

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON              # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON                # line added by Agent


[grid@orarac2poc admin]$ lsnrctl service LISTENER

LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 22-JAN-2013 11:02:41

Copyright (c) 1991, 2010, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
Services Summary...
Service "DGS" has 1 instance(s).
  Instance "DGS", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0
         LOCAL SERVER
The command completed successfully
[grid@orarac2poc admin]$ lsnrctl service LISTENER

LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 22-JAN-2013 11:05:03

Copyright (c) 1991, 2010, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
Services Summary...

Service "DGS" has 2 instance(s).
  Instance "DGS", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:1 refused:0
         LOCAL SERVER
  Instance "DGS", status BLOCKED, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER
...
The command completed successfully


DGS =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = orarac2poc)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = DGS)
#      (SERVICE_NAME = DGS.POC)
    )
  )
orarac2poc:DGS:/u01/app/oracle/product/11.2.0/db_2/dbs> tnsping DGS

TNS Ping Utility for Linux: Version 11.2.0.2.0 - Production on 22-JAN-2013 11:13:50

Copyright (c) 1997, 2010, Oracle.  All rights reserved.

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = orarac2poc)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = DGS)))
OK (0 msec)


orarac2poc:DGS:/u01/app/oracle/product/11.2.0/db_2/dbs> sqlplus sys/oracle123@DGS as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Tue Jan 22 11:10:43 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to an idle instance.

SYS@DGS> startup nomount
ORACLE instance started.

Total System Global Area  680607744 bytes
Fixed Size                  2229600 bytes
Variable Size             197135008 bytes
Database Buffers          473956352 bytes
Redo Buffers                7286784 bytes
SYS@DGS> exit



4. More research was done against metalink, and below docs provide more details.
Connection to Auxilary using connect string failed with ORA-12528 [ID 419440.1]
ORA-12528: TNS:listener: all appropriate instances are blocking new connections [ID
301099.1]

"Cause
The cause of the problem is that the Auxiliary Instance is started in NOMOUNT status, so it's not registered with listener. PMON process registers the instances with listener when they are in MOUNT status, while instances are in NOMOUNT status appear in listener as BLOCKED."

options to solve this problem:
a.) Start rman from Auxiliary environment.
b.) Create a static entry for the auxiliary database in the listener.ora file of the auxiliary database Oracle_home and restart the listener. (This is what I used.)
c.)  "Use the Oracle10G feature ( specify (UR=A) in connect data )".

Some info about URA=A . This is a new feature in 10g, but I can't find relevant info in both 10g and 11g Oracle® Database Net Services Reference


d.)  From my testing , it seems DB_DOMAIN also can cause the error.

Manually create a standby database


"Notice the value (UR=A) in the CONNECT_DATA of the tns entry THTESTDG.WORLD.
This will allow the primary database to connect remotely to a database in nomount or mount mode. It’s a feature introduced in oracle 10g."

Thanks for the question regarding "Connecting sys as sysdba to database in restricted mode", version 10.2.0.1



"
Please note that the (UR=A) clause is intended to work with a dynamically registered handler so the 
use of SERVICE_NAME versus SID is preferred.  SID may connect to a statically configured handler.
"


ORA-12526: TNS:listener: all appropriate instances are in restricted mode
"The (UR=A) clause for TNS connect strings in TNSNAMES.ORA file. This clause insert into:
(CONNECT_DATA =
(UR=A)It allows a privileged or administrative user to connect via the listener even when the service handler is blocking connections for non-privileged users. "

remove physical standby database using 12c cloud control



1. a few click in EM1c.


2. The most important part is after removed standby. Now go back to primary and switch logfile, but it hangs in sql*plus.

TNS-12564: TNS:connection refused
    ns secondary err code: 0
    nt main err code: 0
    nt secondary err code: 0
    nt OS err code: 0
Error 12528 received logging on to the standby
PING[ARC1]: Heartbeat failed to connect to standby 'dgs'. Error is 12528.
Mon Jan 21 17:56:38 2013
Using STANDBY_ARCHIVE_DEST parameter default value as /u01/oradata/DG/arch
ALTER SYSTEM SET log_archive_dest_state_2='ENABLE' SCOPE=BOTH;
ALTER SYSTEM ARCHIVE LOG
ARCH: LGWR is actively archiving destination LOG_ARCHIVE_DEST_2
Mon Jan 21 17:57:16 2013
ARC0: Becoming the 'no SRL' ARCH
Mon Jan 21 17:57:17 2013
ARC2: Becoming the 'no SRL' ARCH
...
ARCa: Becoming the 'no SRL' ARCH
Mon Jan 21 18:01:07 2013
Starting background process SMCO
Mon Jan 21 18:01:07 2013
SMCO started with pid=64, OS id=16823
Mon Jan 21 18:02:16 2013
ARC0: LGWR is actively archiving destination LOG_ARCHIVE_DEST_2
ARCH: Archival stopped, error occurred. Will continue retrying
ORACLE Instance DG - Archival Error
ORA-16014: log 1 sequence# 183 not archived, no available destinations
ORA-00312: online log 1 thread 1: '/u01/oradata/DG/redo01.log'



When startup again, it crashes immediately.


SYS@DG> select * from v$log;

    GROUP#    THREAD#  SEQUENCE#      BYTES  BLOCKSIZE    MEMBERS ARC STATUS           FIRST_CHANGE# FIRST_TIM NEXT_CHANGE#
---------- ---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- --------- ------------
NEXT_TIME
---------
         1          1        183   52428800        512          1 NO  INACTIVE               3680301 21-JAN-13      3680304
21-JAN-13

         2          1        184   52428800        512          1 NO  INACTIVE               3680304 21-JAN-13      3680468
21-JAN-13

         3          1        185   52428800        512          1 NO  CURRENT                3680468 21-JAN-13   2.8147E+14



SYS@DG> alter system switch logfile;
alter system switch logfile
*
ERROR at line 1:
ORA-01013: user requested cancel of current operation



SYS@DG> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@DG> startup
ORACLE instance started.

Total System Global Area  680607744 bytes
Fixed Size                  2229600 bytes
Variable Size             419433120 bytes
Database Buffers          251658240 bytes
Redo Buffers                7286784 bytes
Database mounted.
ORA-03113: end-of-file on communication channel
Process ID: 18386
Session ID: 12 Serial number: 3



Starting background process RVWR
Tue Jan 22 09:47:37 2013
RVWR started with pid=26, OS id=16478
Database mounted in Exclusive Mode
Lost write protection disabled
WARNING: No local destinations have been defined for
         archival of the Redo Log.
Completed: ALTER DATABASE   MOUNT
Tue Jan 22 09:47:37 2013
ALTER DATABASE OPEN
LGWR: STARTING ARCH PROCESSES
Tue Jan 22 09:47:37 2013
ARC0 started with pid=27, OS id=16481
ARC0: Archival started
LGWR: STARTING ARCH PROCESSES COMPLETE
ARC0: STARTING ARCH PROCESSES
Tue Jan 22 09:47:38 2013
ARC1 started with pid=28, OS id=16485
Tue Jan 22 09:47:38 2013
ARC2 started with pid=29, OS id=16487
Errors in file /u01/app/oracle/diag/rdbms/dg/DG/trace/DG_ora_16479.trc:
ORA-16014: log 1 sequence# 1 not archived, no available destinations
ORA-00312: online log 1 thread 1: '/u01/oradata/DG/redo01.log'
USER (ospid: 16479): terminating the instance due to error 16014
System state dump requested by (instance=1, osid=16479), summary=[abnormal instance termination].
System State dumped to trace file /u01/app/oracle/diag/rdbms/dg/DG/trace/DG_diag_16422.trc
Tue Jan 22 09:47:39 2013
License high water mark = 2
Dumping diagnostic data in directory=[cdmp_20130122094739], requested by (instance=1, osid=16479), summary=[abnormal instance termination].
Instance terminated by USER, pid = 16479
USER (ospid: 16495): terminating the instance
Instance terminated by USER, pid = 16495

#trace file content

Trace file /u01/app/oracle/diag/rdbms/dg/DG/trace/DG_ora_16479.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_2
System name:    Linux
Node name:      orarac1poc
Release:        2.6.18-238.el5
Version:        #1 SMP Sun Dec 19 14:22:44 EST 2010
Machine:        x86_64
VM name:        VMWare Version: 6
Instance name: DG
Redo thread mounted by this instance: 1
Oracle process number: 25
Unix process pid: 16479, image: oracle@orarac1poc (TNS V1-V3)


*** 2013-01-22 09:47:38.586
*** SESSION ID:(125.5) 2013-01-22 09:47:38.586
*** CLIENT ID:() 2013-01-22 09:47:38.586
*** SERVICE NAME:() 2013-01-22 09:47:38.586
*** MODULE NAME:(sqlplus@orarac1poc (TNS V1-V3)) 2013-01-22 09:47:38.586
*** ACTION NAME:() 2013-01-22 09:47:38.586

Initial buffer sizes: read 1024K, overflow 832K, change 805K
Log read is SYNCHRONOUS though disk_asynch_io is enabled!
DDE rules only execution for: ORA 312
----- START Event Driven Actions Dump ----
---- END Event Driven Actions Dump ----
----- START DDE Actions Dump -----
Executing SYNC actions
----- START DDE Action: 'DB_STRUCTURE_INTEGRITY_CHECK' (Async) -----
Successfully dispatched
----- END DDE Action: 'DB_STRUCTURE_INTEGRITY_CHECK' (SUCCESS, 0 csec) -----
Executing ASYNC actions
----- END DDE Actions Dump (total 0 csec) -----
ORA-16014: log 1 sequence# 1 not archived, no available destinations
ORA-00312: online log 1 thread 1: '/u01/oradata/DG/redo01.log'
kjzduptcctx: Notifying DIAG for crash event
----- Abridged Call Stack Trace -----
ksedsts()+461<-kjzdssdmp adbdrv="" br="" kcfopd="" kjzdicrshnfy="" kjzduptcctx="" kpoal8="" kpooprx="" ksuitm="" opidrv="" opiexe="" opiino="" opiodr="" opiosq0="" opitsk="" ttcpip=""><-sou2o br="" opimai_real="" ssthrdmain="">----- End of Abridged Call Stack Trace -----

*** 2013-01-22 09:47:38.905
USER (ospid: 16479): terminating the instance due to error 16014
ksuitm: waiting up to [5] seconds before killing DIAG(16422)


3. The solution is to remove those parameters related to standby database.
orarac1poc:DG:/u01/app/oracle/product/11.2.0/db_2/dbs> diff initDG.ora initDG.ora.bak

 #*.LOG_ARCHIVE_CONFIG='DG_CONFIG=(DG,DGS)'
 #*.log_archive_dest_2='service="dgs"','LGWR ASYNC NOAFFIRM delay=0 optional compression=disable max_failure=0 max_connections=1 reopen=300 db_unique_name="dgs" net_timeout=30','valid_for=(all_logfiles,primary_role)'
 #DG.log_archive_dest_3='location="/u01/oradata/DG/arch"',' valid_for=(STANDBY_LOGFILE,STANDBY_ROLE)'
 #*.log_archive_dest_state_2='ENABLE'
 #DG.log_archive_dest_state_3='ENABLE'


SYS@DG> alter database open;

Database altered.

SYS@DG> alter system checkpoint;

System altered.

SYS@DG> show parameter log_archive_dest

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest                     string
log_archive_dest_1                   string      LOCATION=USE_DB_RECOVERY_FILE_
                                                 DEST VALID_FOR=(ALL_LOGFILES,A
                                                 LL_ROLES) DB_UNIQUE_NAME=DG
log_archive_dest_2                   string
log_archive_dest_3                   string
log_archive_dest_state_1             string      ENABLE
log_archive_dest_state_2             string      enable
log_archive_dest_state_3             string      enable
...

SYS@DG> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@DG> startup
ORACLE instance started.

Total System Global Area  680607744 bytes
Fixed Size                  2229600 bytes
Variable Size             419433120 bytes
Database Buffers          251658240 bytes
Redo Buffers                7286784 bytes
Database mounted.
Database opened.

Monday, January 21, 2013

Excessive cpu from physical standby database monitored by EM 12c

Added 11.2..0.2 data guard to EM 12c , but next day I always found the CPU utilization is almost 100%.
The load of uptime can be more than 20 for a two-core VM server.

Managed to check the MODULE name of active session, most of which are emagent_SQL_oracle_database and Oracle Enterprise Manager.Metric Engine.

Did quick check on metalink, found one similar case reported in 10.2.0.5. 
 Grid Control Agent Consumes High CPU when Monitoring Standby RAC Databases [ID 864829.1]

Anyone has similar experience with mine ? Hope it is not an old bug in 12.1.0.2 EM Cloud control.

As workaround, I have to remove the physical standby database from 12c Cloud control.

Monday, January 07, 2013

online redo log location when using RMAN duplication from active database

As I said in RMAN-05001 when using RMAN create physical standby

 the location of online redo log is strange to me, when I try to use same directory structure in different host , and I don't the following two parameters.

#DB_FILE_NAME_CONVERT='/u01/oradata/DG/','/u01/oradata/DGS/'
#LOG_FILE_NAME_CONVERT= '/u01/oradata/DG/','/u01/oradata/DGS/'

./FRA/DGS/onlinelog:
total 358820
-rw-r----- 1 oracle asmadmin 52429312 Jan  3 17:13 o1_mf_1_8gblynhm_.log
-rw-r----- 1 oracle asmadmin 52429312 Jan  3 17:13 o1_mf_2_8gblyntf_.log
-rw-r----- 1 oracle asmadmin 52429312 Jan  3 17:13 o1_mf_3_8gblyo4p_.log
-rw-r----- 1 oracle asmadmin 52429312 Jan  3 17:13 o1_mf_4_8gblyojf_.log
-rw-r----- 1 oracle asmadmin 52429312 Jan  3 17:13 o1_mf_5_8gblyqhv_.log
-rw-r----- 1 oracle asmadmin 52429312 Jan  3 17:14 o1_mf_6_8gblyqv7_.log
-rw-r----- 1 oracle asmadmin 52429312 Jan  3 17:14 o1_mf_7_8gblyr67_.log

SYS@DGS> select member, type from v$logfile;

MEMBER
--------------------------------------------------------------------------------------------------------------                                               ----------------------
TYPE
-------
/u01/oradata/DG/FRA/DGS/onlinelog/o1_mf_1_8gnhhx5m_.log
ONLINE

/u01/oradata/DG/FRA/DGS/onlinelog/o1_mf_2_8gnhhxny_.log
ONLINE

/u01/oradata/DG/FRA/DGS/onlinelog/o1_mf_3_8gnhhy4x_.log
ONLINE

/u01/oradata/DG/FRA/DGS/onlinelog/o1_mf_4_8gnhhynq_.log
STANDBY

/u01/oradata/DG/FRA/DGS/onlinelog/o1_mf_5_8gnhhzdp_.log
STANDBY

/u01/oradata/DG/FRA/DGS/onlinelog/o1_mf_6_8gnhj05j_.log
STANDBY

/u01/oradata/DG/FRA/DGS/onlinelog/o1_mf_7_8gnhj0vs_.log
STANDBY


7 rows selected.


from oracle doc, it says
"If you want the standby redo log file names on the standby database to be the same as the primary redo log file names, then you must specify the NOFILENAMECHECK clause of the DUPLICATE command. Otherwise, RMAN signals an error even if the standby database is created on a different host." , apparently it doesn't work to me, and it seems taking FRA location as default online & standby redo log location.

db_file_name_convert                 string
log_file_name_convert                string      /u01/oradata/DG/, /u01/oradata
                                                 /DG/

Luckily, I found set LOG_FILE_NAME_CONVERT to be same value in initDGS.ora and it works.

#DB_FILE_NAME_CONVERT='/u01/oradata/DG/','/u01/oradata/DGS/'
LOG_FILE_NAME_CONVERT= '/u01/oradata/DG/','/u01/oradata/DG/'

After RMAN duplicaiton ,

orarac1poc:DG:/u01/app/oracle/product/11.2.0/db_2/dbs>  rman target sys/oracle123@DG auxiliary sys/oracle123@DGS

Recovery Manager: Release 11.2.0.2.0 - Production on Mon Jan 7 11:20:40 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: DG (DBID=1716975309)
connected to auxiliary database: DG (not mounted)

RMAN> run {
2> allocate channel prmy1 type disk;
3> allocate auxiliary channel stby type disk;
4> duplicate target database for standby from active database NOFILENAMECHECK;
5> }

using target database control file instead of recovery catalog
allocated channel: prmy1
channel prmy1: SID=49 device type=DISK

allocated channel: stby
channel stby: SID=13 device type=DISK

Starting Duplicate Db at 07-JAN-13

contents of Memory Script:
{
   backup as copy reuse
   targetfile  '/u01/app/oracle/product/11.2.0/db_2/dbs/orapwDG' auxiliary format
 '/u01/app/oracle/product/11.2.0/db_2/dbs/orapwDGS'   ;
}
executing Memory Script

Starting backup at 07-JAN-13
Finished backup at 07-JAN-13

contents of Memory Script:
{
   backup as copy current controlfile for standby auxiliary format  '/u01/oradata/DG/control01.ctl';
   restore clone controlfile to  '/u01/oradata/DG/FRA/DG/control02.ctl' from
 '/u01/oradata/DG/control01.ctl';
}
executing Memory Script

Starting backup at 07-JAN-13
channel prmy1: starting datafile copy
copying standby control file
output file name=/u01/app/oracle/product/11.2.0/db_2/dbs/snapcf_DG.f tag=TAG20130107T112102 RECID=14 STAMP=80407926                                          2
channel prmy1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 07-JAN-13

Starting restore at 07-JAN-13

channel stby: copied control file copy
Finished restore at 07-JAN-13

contents of Memory Script:
{
   sql clone 'alter database mount standby database';
}
executing Memory Script

sql statement: alter database mount standby database

contents of Memory Script:
{
   set newname for tempfile  1 to
 "/u01/oradata/DG/temp01.dbf";
   switch clone tempfile all;
   set newname for datafile  1 to
 "/u01/oradata/DG/system01.dbf";
   set newname for datafile  2 to
 "/u01/oradata/DG/sysaux01.dbf";
   set newname for datafile  3 to
 "/u01/oradata/DG/undotbs01.dbf";
   set newname for datafile  4 to
 "/u01/oradata/DG/users01.dbf";
   set newname for datafile  5 to
 "/u01/oradata/DG/dg1_tbs01.dbf";
   backup as copy reuse
   datafile  1 auxiliary format
 "/u01/oradata/DG/system01.dbf"   datafile
 2 auxiliary format
 "/u01/oradata/DG/sysaux01.dbf"   datafile
 3 auxiliary format
 "/u01/oradata/DG/undotbs01.dbf"   datafile
 4 auxiliary format
 "/u01/oradata/DG/users01.dbf"   datafile
 5 auxiliary format
 "/u01/oradata/DG/dg1_tbs01.dbf"   ;
   sql 'alter system archive log current';
}
executing Memory Script

executing command: SET NEWNAME

renamed tempfile 1 to /u01/oradata/DG/temp01.dbf in control file

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting backup at 07-JAN-13
channel prmy1: starting datafile copy
input datafile file number=00001 name=/u01/oradata/DG/system01.dbf
output file name=/u01/oradata/DG/system01.dbf tag=TAG20130107T112110
channel prmy1: datafile copy complete, elapsed time: 00:00:15
channel prmy1: starting datafile copy
input datafile file number=00002 name=/u01/oradata/DG/sysaux01.dbf
output file name=/u01/oradata/DG/sysaux01.dbf tag=TAG20130107T112110
channel prmy1: datafile copy complete, elapsed time: 00:00:25
channel prmy1: starting datafile copy
input datafile file number=00003 name=/u01/oradata/DG/undotbs01.dbf
output file name=/u01/oradata/DG/undotbs01.dbf tag=TAG20130107T112110
channel prmy1: datafile copy complete, elapsed time: 00:00:07
channel prmy1: starting datafile copy
input datafile file number=00005 name=/u01/oradata/DG/dg1_tbs01.dbf
output file name=/u01/oradata/DG/dg1_tbs01.dbf tag=TAG20130107T112110
channel prmy1: datafile copy complete, elapsed time: 00:00:02
channel prmy1: starting datafile copy
input datafile file number=00004 name=/u01/oradata/DG/users01.dbf
output file name=/u01/oradata/DG/users01.dbf tag=TAG20130107T112110
channel prmy1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 07-JAN-13

sql statement: alter system archive log current

contents of Memory Script:
{
   switch clone datafile all;
}
executing Memory Script

datafile 1 switched to datafile copy
input datafile copy RECID=14 STAMP=804079320 file name=/u01/oradata/DG/system01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=15 STAMP=804079320 file name=/u01/oradata/DG/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=16 STAMP=804079320 file name=/u01/oradata/DG/undotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=17 STAMP=804079320 file name=/u01/oradata/DG/users01.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=18 STAMP=804079320 file name=/u01/oradata/DG/dg1_tbs01.dbf
Finished Duplicate Db at 07-JAN-13
released channel: prmy1
released channel: stby


it gives me the following result.

in primary db

SYS@DG> select member, type from v$logfile;

MEMBER
------------------------------------------------------------------------------------------------------------------------------------
TYPE
-------
/u01/oradata/DG/redo01.log
ONLINE

/u01/oradata/DG/redo02.log
ONLINE

/u01/oradata/DG/redo03.log
ONLINE

/u01/oradata/DG/stbredo04.rdo
STANDBY

/u01/oradata/DG/stbredo05.rdo
STANDBY

/u01/oradata/DG/stbredo06.rdo
STANDBY

/u01/oradata/DG/stbredo07.rdo
STANDBY


7 rows selected.

in standby db

SYS@DGS> select member, type from v$logfile;

MEMBER
--------------------------------------------------------------------------------------------------------------                                               ----------------------
TYPE
-------
/u01/oradata/DG/redo01.log
ONLINE

/u01/oradata/DG/redo02.log
ONLINE

/u01/oradata/DG/redo03.log
ONLINE

/u01/oradata/DG/stbredo04.rdo
STANDBY

/u01/oradata/DG/stbredo05.rdo
STANDBY

/u01/oradata/DG/stbredo06.rdo
STANDBY

/u01/oradata/DG/stbredo07.rdo
STANDBY


7 rows selected.


Here is my complete parameter files.


Primary DB PFILE

orarac1poc:DG:/u01/app/oracle/product/11.2.0/db_2/dbs> cat initDG.ora
DG.__db_cache_size=427819008
DG.__java_pool_size=4194304
DG.__large_pool_size=4194304
DG.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
DG.__pga_aggregate_target=209715200
DG.__sga_target=683671552
DG.__shared_io_pool_size=0
DG.__shared_pool_size=230686720
DG.__streams_pool_size=4194304
*.audit_file_dest='/u01/app/oracle/admin/DG/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/u01/oradata/DG/control01.ctl','/u01/oradata/DG/FRA/DG/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_recovery_file_dest='/u01/oradata/DG/FRA'
*.db_recovery_file_dest_size=5218762752
*.diagnostic_dest='/u01/app/oracle'
#*.dispatchers='(PROTOCOL=TCP) (SERVICE=DGPXDB)'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=DGXDB)'
*.open_cursors=300
*.pga_aggregate_target=209715200
*.processes=150
#*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=681574400
*.undo_tablespace='UNDOTBS1'

# Primary Database: Primary Role Initialization Parameters

*.db_name='DG'
DB_UNIQUE_NAME='DG'
LOG_ARCHIVE_CONFIG='DG_CONFIG=(DG,DGS)'
#*.log_archive_dest_1='LOCATION=/u01/oradata/DG/arch'
LOG_ARCHIVE_DEST_1= 'LOCATION=/u01/oradata/DG/arch VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=DG'
LOG_ARCHIVE_DEST_2= 'SERVICE=DGS ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=DGS'
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_DEST_STATE_2=ENABLE
REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
*.log_archive_format='DG_%t_%s_%r.arc'
LOG_ARCHIVE_MAX_PROCESSES=30


# Primary Database: Standby Role Initialization Parameters
FAL_SERVER='DGS'
#DB_FILE_NAME_CONVERT='DGS','DG'
DB_FILE_NAME_CONVERT='/u01/oradata/DGS/','/u01/oradata/DG'
LOG_FILE_NAME_CONVERT= '/u01/oradata/DGS/','/u01/oradata/DG'
STANDBY_FILE_MANAGEMENT=AUTO



Standby DB PFILE

orarac2poc:DGS:/u01/oradata/DG/FRA> cat /u01/app/oracle/product/11.2.0/db_2/dbs/initDGS.ora
#DG.__db_cache_size=427819008
#DG.__java_pool_size=4194304
#DG.__large_pool_size=4194304
#DG.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
#DG.__pga_aggregate_target=209715200
#DG.__sga_target=683671552
#DG.__shared_io_pool_size=0
#DG.__shared_pool_size=230686720
#DG.__streams_pool_size=4194304
*.audit_file_dest='/u01/app/oracle/admin/DGS/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.db_block_size=8192
*.db_domain=''
#*.db_recovery_file_dest='/u01/oradata/DGS/FRA'
*.db_recovery_file_dest='/u01/oradata/DG/FRA'
*.db_recovery_file_dest_size=5218762752
*.diagnostic_dest='/u01/app/oracle'
#*.dispatchers='(PROTOCOL=TCP) (SERVICE=DGPXDB)'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=DGXDB)'
*.open_cursors=300
*.pga_aggregate_target=209715200
*.processes=150
*.sga_target=681574400
*.undo_tablespace='UNDOTBS1'


#Initialization Parameters for a Physical Standby Database

DB_NAME=DG
DB_UNIQUE_NAME=DGS
LOG_ARCHIVE_CONFIG='DG_CONFIG=(DG,DGS)'
*.control_files='/u01/oradata/DG/control01.ctl','/u01/oradata/DG/FRA/DG/control02.ctl'
#DB_FILE_NAME_CONVERT='DG','DGS'
#LOG_FILE_NAME_CONVERT='DG','DGS'
#DB_FILE_NAME_CONVERT='/u01/oradata/DG/','/u01/oradata/DGS/'
LOG_FILE_NAME_CONVERT= '/u01/oradata/DG/','/u01/oradata/DG/'
*.log_archive_format='DG_%t_%s_%r.arc'
LOG_ARCHIVE_DEST_1= 'LOCATION=/u01/oradata/DG/arch VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=DGS'
LOG_ARCHIVE_DEST_2= 'SERVICE=DG ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=DG'
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_DEST_STATE_2=ENABLE
REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
STANDBY_FILE_MANAGEMENT=AUTO
FAL_SERVER=DG