Home > database >  Oracle master-slave synchronization
Oracle master-slave synchronization

Time:10-03

Two oracle 11 g master-slave synchronization server how do match, standby method is not successful

CodePudding user response:

Never make, help top

CodePudding user response:

The building Lord your specific steps, to say help you analysis.

CodePudding user response:

11 support ADG, consult the official document
https://support.oracle.com/epmos/faces/DocumentDisplay? Id=1580796.1

CodePudding user response:

refer to the second floor wmxcn2000 response:
the original poster said your concrete steps, can help you analysis.


I am in document step by step, I never with oracle, specific steps is
2. Set the main library to archive mode:
SQL> Archive log list
SQL> Shutdown immediate
SQL> Startup the mount
SQL> The alter database archivelog;
SQL> Archive log list
3. Check the host whether there is a password file, if there is no need to establish
Orapwd file='/opt/oracle/product/10.2.0/DBS/orawdlottery ora' password=sys entries=5
4. The primary database to add "spare online log file
"SQL> The alter database add standby logfile group 4
('/opt/oracle/oradata/lottery/redo04 log ') 50 m size;
SQL> The alter database add standby logfile group 5
('/opt/oracle/oradata/lottery/redo05 log ') 50 m size;
SQL> The alter database add standby logfile group 6
('/opt/oracle/oradata/lottery/redo06 log ') 50 m size;
SQL> The alter database add standby logfile group 7
('/opt/oracle/oradata/lottery/redo07 log ') 50 m size;
5. Modify the master library parameter file
SQL> The create pfile='/opt/oracle/admin/lottery/pfile/init. Ora' from spfile.
Lottery. __db_cache_size=100663296
Lottery. __java_pool_size=4194304
Lottery. __large_pool_size=4194304
Lottery. __shared_pool_size=54525952
Lottery. __streams_pool_size=0
*. Audit_file_dest='/opt/oracle/admin/lottery/adump'
*. Background_dump_dest='/opt/oracle/admin/lottery/bdump'
*. Compatible='10.2.0.1.0'
*. Control_files='/opt/oracle/oradata/lottery/control01 CTL', '/opt/oracle/oradata/lottery/control02 CTL', '/opt/oracle/oradata/lottery/control03 CTL'
*. Core_dump_dest='/opt/oracle/admin/lottery/cdump'
*. Db_block_size=8192
*. Db_domain='
*. Db_file_multiblock_read_count=16
*. Db_name='lottery'
*. Db_recovery_file_dest='/opt/oracle/flash_recovery_area'
*. Db_recovery_file_dest_size=2147483648
*. Dispatchers='(TCP) PROTOCOL=(SERVICE=lotteryXDB)'
*. Job_queue_processes=10
T *. Log_archive_format='% % S % of state Richard armitage RC'
*. Log_archive_max_processes=3
*. Open_cursors=300
*. Pga_aggregate_target=16777216
*. The processes=150
*. Remote_login_passwordfile='EXCLUSIVE'
*. Sga_target=167772160
*. Undo_management='AUTO'
*. Undo_tablespace='UNDOTBS1'
*. User_dump_dest='/opt/oracle/admin/lottery/udump'
# add below parameter for standy database
*. DB_UNIQUE_NAME='primary'
*. Log_archive_config='DG_CONFIG=(primary and standby)
*. Log_archive_dest_1='location=/opt/oracle/oradata/lottery/archive/VALID_FOR=(ALL_LOGFILES, ALL_ROLES) DB_UNIQUE_NAME=primary'
='SERVICE=*. Log_archive_dest_2 standby arch ASYNC VALID_FOR=(ONLINE_LOGFILES, PRIMARY_ROLE) DB_UNIQUE_NAME=standby'
*. STANDBY_FILE_MANAGEMENT=AUTO
*. LOG_ARCHIVE_DEST_STATE_1=ENABLE
*. LOG_ARCHIVE_DEST_STATE_2=ENABLE
*. FAL_SERVER='standby'
*. FAL_CLIENT='primary'
6. The main library established by PFILE SPFILE
[oracle @ host127 pfile] $up sqlplus'/as sysdba '
SQL> The create spfile from pfile='/opt/oracle/admin/lottery/pfile/init. Ora';
7. Establish a backup library control file
SQL> The alter database create standby controlfile as'/TMP/standby_ctl01. CTL;
8. To configure the main database listener and tnsnames
[oracle @ host127 admin] $cat listener. Ora
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME=lottery)
(ORACLE_HOME=/opt/oracle/product/10.2.0)
(SID_NAME=lottery)
)
)
The LISTENER=
(DESCRIPTION_LIST=
(the DESCRIPTION=
(ADDRESS=(TCP) PROTOCOL=(HOST=host127) (1521) PORT=)
)
)
# 1522 port for later do switchover
SID_LIST_LISTENER1=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME=lottery)
(ORACLE_HOME=/opt/oracle/product/10.2.0)
(SID_NAME=lottery)
)
)
LISTENER1=
(DESCRIPTION_LIST=
(the DESCRIPTION=
(ADDRESS=(TCP) PROTOCOL=(HOST=host127) (1522) PORT=)
)
)
[oracle @ host127 admin] $cat tnsnames. Ora
# ports 1521 and 1522 can be connected to the host and the standby machine, so that when doing switchover don't need to change the Settings here
Primary=
(the DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=(TCP) PROTOCOL=(HOST=192.168.1.128) (1522) PORT=)
(ADDRESS=(TCP) PROTOCOL=(HOST=192.168.1.127) (1522) PORT=)
)
(CONNECT_DATA=
https://bbs.csdn.net/topics/(SID=lottery)
)
)
Standby=
(the DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=(TCP) PROTOCOL=(HOST=192.168.1.127) (1521) PORT=)
(ADDRESS=(TCP) PROTOCOL=(HOST=192.168.1.128) (1521) PORT=)
)
(CONNECT_DATA=
https://bbs.csdn.net/topics/(SID=lottery)
)
)
9. Copy the file to the standby
[oracle @ host128 ~] CD/opt/oracle/oradata/lottery
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related