Wednesday, November 3, 2010

"Error: ORA-16541: site is not enabled" after ENABLE CONFIGURATION command in Data Guard Brocker

If you see something like that:

DGMGRL> connect /
Connected.
DGMGRL> DISABLE CONFIGURATION;
Disabled.
DGMGRL> edit database "dbXX" set property 'LocalListenerAddress'='(ADDRESS=(PROTOCOL=tcp)(HOST=XXX.XX.au)(PORT=1521))';
Error: ORA-16541: site is not enabled

Configuration details cannot be determined by DGMGRL
DGMGRL> ENABLE CONFIGURATION;
Error: ORA-16541: site is not enabled

Configuration details cannot be determined by DGMGRL
DGMGRL> exit

It may well happen after switchover operation.
 solution is to recreate configuration.


SHOW CONFIGURATION;

Configuration
  Name:                dbXX.XXX.au
  Enabled:             NO
  Protection Mode:     MaxPerformance
  Fast-Start Failover: DISABLED
  Databases:
    dbXX   - Physical standby database
    dbXXsb - Primary database
Current status for "dbXX.XXX.au":
DISABLED

DGMGRL> DISABLE CONFIGURATION;
Disabled.
DGMGRL> REMOVE DATABASE dbXX
Removed database "dbXX" from the configuration
DGMGRL> SHOW CONFIGURATION;
Configuration
  Name:                dbXX.XXX.au
  Enabled:             NO
  Protection Mode:     MaxPerformance
  Fast-Start Failover: DISABLED
  Databases:
    dbXXsb - Primary database

Current status for "dbXX.XXX.au":
DISABLED

--at primary(dbXXsb)
[oracle@XXX zone:YYY]~$ dgmgrl
DGMGRL for Solaris: Version 10.2.0.4.0 - 64bit Production

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

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

Configuration
  Name:                dbXX.XXX.au
  Enabled:             NO
  Protection Mode:     MaxPerformance
  Fast-Start Failover: DISABLED
  Databases:
    dbXXsb - Primary database

Current status for "dbXX.XXX.au":
DISABLED

DGMGRL> REMOVE CONFIGURATION
Removed configuration
DGMGRL>
DGMGRL> show configuration
Error: ORA-16532: Data Guard broker configuration does not exist

Configuration details cannot be determined by DGMGRL

--#Primary
ALTER SYSTEM SET fal_client="standby" SCOPE=BOTH SID='dbXX';
ALTER SYSTEM SET fal_server="primary" SCOPE=BOTH SID='dbXX';
ALTER SYSTEM SET log_archive_dest_2='service="standby" ARCH SYNC NOAFFIRM delay=0 OPTIONAL max_failure=0 max_connections=1 reopen=300 db_unique_name="dbXX" register net_timeout=180  valid_for=(online_logfile,primary_role)' SCOPE=BOTH SID='dbXX';

--#SB
ALTER SYSTEM SET fal_client="standby" SCOPE=BOTH SID='dbXX';
ALTER SYSTEM SET fal_server="primary" SCOPE=BOTH SID='dbXX';
ALTER SYSTEM SET log_archive_dest_2='service="standby" ARCH SYNC NOAFFIRM delay=0 OPTIONAL max_failure=0 max_connections=1 reopen=300 db_unique_name="dbXXsb" register net_timeout=180  valid_for=(online_logfile,primary_role)' SCOPE=BOTH SID='dbXX';

--#on both
--LOG_ARCHIVE_CONFIG=’DG_CONFIG=(dbs1,dbs2)’ —  using the DB_UNIQUE_NAME of both databases
alter system set LOG_ARCHIVE_CONFIG='DG_CONFIG=(dbXX,dbXXsb)';

-- at primary
CREATE CONFIGURATION 'dbXX' AS PRIMARY DATABASE IS 'dbXXsb' CONNECT IDENTIFIER IS primary;
--DGMGRL> CREATE CONFIGURATION 'dbXX' AS PRIMARY DATABASE IS 'dbXXsb' CONNECT IDENTIFIER IS primary;
--Configuration "dbXX" created with primary database "dbXXsb"
DGMGRL> show configuration

Configuration
  Name:                dbXX
  Enabled:             NO
  Protection Mode:     MaxPerformance
  Fast-Start Failover: DISABLED
  Databases:
    dbXXsb - Primary database

Current status for "dbXX":
DISABLED

ADD DATABASE 'dbXX' AS CONNECT IDENTIFIER IS standby MAINTAINED AS PHYSICAL;
--DGMGRL> ADD DATABASE 'dbXX' AS CONNECT IDENTIFIER IS standby MAINTAINED AS PHYSICAL;
--Database "dbXX" added
ENABLE CONFIGURATION;

No comments:

Post a Comment