Tragedy caused by fatal mistake of db_unique_name

Source: Internet
Author: User

Fault description: the following error is reported when the master database is started after the oracle dataguard environment is set up:
 
Wed Feb 8 23:12:38 2012
LGWR: Error 16047 creating archivelog file 'standby'
Wed Feb 8 23:12:38 2012
Errors in file/home/oracle/admin/port/bdump/port_lns1_1131.trc:
ORA-16047: DGID mismatch between destination setting and standby
Wed Feb 8 23:12:38 2012
FAL [server, ARC1]: Error 16047 creating remote archivelog file 'standby'
FAL [server, ARC1]: FAL archive failed, see trace file.
Wed Feb 8 23:12:38 2012
Errors in file/home/oracle/admin/port/bdump/port_arc1_1125.trc:
ORA-16055: FAL request rejected
ARCH: FAL archive failed. Archiver continuing
After analysis, the settings of the master database and slave database db_unique_name are inconsistent,
The show parameter name command shows that the db_unique_name of the slave database is inconsistent with the expected value of the master database,
The requirement is standby, but the actual requirement is port.
 
 
Parameter settings of the master database:
Alter database force logging;
Alter system set DB_UNIQUE_NAME = port scope = spfile;
Alter system set LOG_ARCHIVE_CONFIG = 'dg _ CONFIG = (port, standby) 'scope = both;
-- Archiving destination of the master database
Alter system set LOG_ARCHIVE_DEST_1 = 'location =/home/oracle/archivelog/VALID_FOR = (ALL_LOGFILES, ALL_ROLES) DB_UNIQUE_NAME = port' scope = both;
-- When the database acts as the master database, set the transmission destination of the physical standby database redo data
Alter system set LOG_ARCHIVE_DEST_2 = 'service = standby lgwr async VALID_FOR = (ONLINE_LOGFILES, PRIMARY_ROLE) DB_UNIQUE_NAME = standby 'scope = spfile;
-- The redo transmission service transfers data to the destination. The default value is enable.
Alter system set LOG_ARCHIVE_DEST_STATE_1 = ENABLE scope = spfile;
Alter system set LOG_ARCHIVE_DEST_STATE_2 = ENABLE scope = spfile;
-- Exclusive or shared. The system passwords of all databases must be consistent. The default value is exclusive.
Alter system set REMOTE_LOGIN_PASSWORDFILE = EXCLUSIVE scope = spfile;
--
Alter system set LOG_ARCHIVE_FORMAT = '% t _ % s _ % r. arc' scope = spfile;
Alter system set LOG_ARCHIVE_MAX_PROCESSES = 4 scope = spfile;
-- Configure the network service name and copy the lost archive file to fal_server.
Alter system set FAL_CLIENT = port SCOPE = SPFILE;
-- Configure the network service name. If it is converted to the standby database role, obtain the lost archive file from here.
Alter system set FAL_SERVER = standby scope = SPFILE;
-- After auto, when the datafiles files of the master database are added or deleted, the slave database also performs automatic operations and transfers the logs to the directory specified by the standby_archive_dest parameter of the slave database,
-- Make sure that the directory exists. If your storage adopts a file system, but you use a bare device, you must set this parameter to manual.
Alter system set STANDBY_FILE_MANAGEMENT = auto scope = SPFILE;
-- The path of the master database after the switchover and the path of the slave database after the switchover. If the directory structure of the master and slave databases is identical, no need to set
Alter system set DB_FILE_NAME_CONVERT = '/u01/oracle/oradata/port/', '/u01/oracle/oradata/port/' SCOPE = SPFILE;
-- Same as above, the two name conversion parameters are the path ing relationship between the master and slave databases, which may be the full name of the path, depending on the situation
Alter system set LOG_FILE_NAME_CONVERT = '/u01/oracle/oradata/port/', '/u01/oracle/oradata/port/' SCOPE = SPFILE;
-- Generally, the location of LOG_ARCHIVE_DEST_1 is the same as that of LOG_ARCHIVE_DEST_1. If the standby database uses ARCH transmission, the master database uploads the archived logs to this directory.
Alter system set STANDBY_ARCHIVE_DEST = '/home/oracle/archivelog/' scope = spfile;
 
 
Slave database PFILE settings
Port. _ db_cache_size = 1644167168
Port. _ java_pool_size = 167772160
Port. _ large_pool_size = 16777216
Port. _ shared_pool_size = 301989888
Port. _ streams_pool_size = 0
*. Audit_file_dest = '/home/oracle/admin/port/adump'
*. Background_dump_dest = '/home/oracle/admin/port/bdump'
*. Compatible = '10. 2.0.4.0'
*. Control_files = '/u01/oracle/oradata/port/control01.ctl', '/u01/oracle/oradata/port/control02.ctl', '/u01/oracle/oradata/port/control03.ctl'
*. Core_dump_dest = '/home/oracle/admin/port/cdump'
*. Db_block_size = 8192
*. Db_domain =''
*. Db_file_multiblock_read_count = 32
*. Db_file_name_convert = '/u01/oracle/oradata/port/', '/u01/oracle/oradata/port /'
*. Db_name = 'Port'
*. Db_unique_name = 'standby' ------------------------------ this sentence is missing, resulting in the default PORT
*. Db_recovery_file_dest = '/home/oracle/flash_recovery_area'
*. Db_recovery_file_dest_size = 2147483648
*. Dispatchers = '(PROTOCOL = TCP) (SERVICE = portXDB )'
*. Java_pool_size = 157286400
*. Job_queue_processes = 10
*. Log_archive_config = 'dg _ CONFIG = (port, standby )'
*. Log_archive_dest_1 = 'location =/home/oracle/archivelog valid_for = (all_logfiles, all_roles) db_unique_name = standby'
*. Log_archive_dest_2 = 'service = port lgwr async valid_for = (online_logfiles, primary_role) db_unique_name = port'
*. Log_archive_dest_state_1 = 'enable'
*. Log_archive_dest_state_2 = 'enable'
*. Log_archive_max_processes = 4
*. Log_file_name_convert = '/u01/oracle/oradata/port/', '/u01/oracle/oradata/port /'
*. Open_cursors = 450
*. Pga_aggregate_target = 823132160
*. Processses = 300
*. Remote_login_passwordfile = 'clusive'
*. Sga_target = 2147483648
*. Shared_pool_size = 157286400
*. Undo_management = 'auto'
*. Undo_tablespace = 'undotbs1'
*. User_dump_dest = '/home/oracle/admin/port/udump'
 
 
Because db_unique_name is set to 'Port', the master database and slave database cannot correspond. The master database reports the following error:
 
 
 
 
Solution:
After modifying the backup database parameter file/home/oracle/product/10.2.0/db_1/dbs/initport. ora
Create pfile = '/home/oracle/product/10.2.0/db_1/dbs/initport. ora' from spfile;
Then start DG
SQL> shutdown immediate;
SQL> startup nomount;
SQL> alter database mount standby database;
SQL> alter database recover managed standby database disconnect from session;
 
This article is from the "mgewu" blog

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.