Building and switching of Oracle 11gR2 physical standby Database

Source: Internet
Author: User

Steps for building a physical standby database on the same machine

Lab environment: LInux EnvironmentORacle 11.2.0.1

Master Database: orcl

Slave Database: stby


1 CheckSupervisionStart listening?

2. Configure the initialization parameter file for the master-slave Database
Sqlplus "/as sysdba"
Create pfile = '/home/Oracle/initprim. ora' from spfile;
Cp/home/oracle/initprim. ora/home/oracle/initstby. ora
Vi/home/oracle/initprim. ora

Orcl. _ db_cache_size = 104857600
Orcl. _ Java _pool_size = 4194304
Orcl. _ large_pool_size = 4194304
Orcl. _ oracle_base = '/oracle' # ORACLE_BASE set from environment
Orcl. _ pga_aggregate_target = 155189248
Orcl. _ sga_target = 268435456
Orcl. _ shared_io_pool_size = 0
Orcl. _ shared_pool_size = 142606336
Orcl. _ streams_pool_size = 4194304
*. Audit_file_dest = '/oracle/admin/orcl/adump'
*. Audit_trail = 'db'
*. Compatible = '11. 2.0.0.0'
*. Control_files = '/oradata/orcl/control01.ctl', '/oradata/flash_recovery_area/orcl/control02.ctl'
*. Db_block_size = 8192
*. Db_domain =''
*. Db_name = 'orcl'
*. Db_recovery_file_dest = '/oradata/flash_recovery_area'
*. Db_recovery_file_dest_size = 4039114752
*. Diagnostic_dest = '/oracle'
*. Dispatchers = '(PROTOCOL = TCP) (SERVICE = orclXDB )'
*. Memory_target = 422576128
*. Open_cursors = 300
*. Processses = 150
*. Remote_login_passwordfile = 'clusive'
*. Undo_tablespace = 'undotbs1'

 

*. Fal_client = 'prim'
*. Fal_server = 'stby'
*. Standby_file_management = auto
*. Log_archive_dest_1 = 'location =/oradata/arch/orcl Valid_for = (all_logfiles, all_roles) db_unique_name = prim'
*. Log_archive_dest_2 = 'service = stby valid_for = (online_logfiles, primary_role) db_unique_name = stby'
*. DB_UNIQUE_NAME = prim
*. Log_archive_config = 'dg _ config = (prim, stby )'

 

Edit the parameter file of the slave Database:
Vi/home/oracle/initstby. ora


Stby. _ db_cache_size = 104857600
Stby. _ java_pool_size = 4194304
Stby. _ large_pool_size = 4194304
Stby. _ oracle_base = '/oracle' # ORACLE_BASE set from environment
Stby. _ pga_aggregate_target = 155189248
Stby. _ sga_target = 268435456
Stby. _ shared_io_pool_size = 0
Stby. _ shared_pool_size = 142606336
Stby. _ streams_pool_size = 4194304
*. Audit_file_dest = '/oracle/admin/stby/adump'
*. Audit_trail = 'db'
*. Compatible = '11. 2.0.0.0'
*. Control_files = '/oradata/stby/control01.ctl', '/oradata/flash_recovery_area/stby/control02.ctl'
*. Db_block_size = 8192
*. Db_domain =''
*. Db_name = 'orcl'--Building dg on the same machine must be the same as that of the master database. OtherwiseORA-01103
*. Db_recovery_file_dest = '/oradata/flash_recovery_area'
*. Db_recovery_file_dest_size = 4039114752
*. Diagnostic_dest = '/oracle'
*. Dispatchers = '(PROTOCOL = TCP) (SERVICE = stbyXDB )'
*. Memory_target = 622576128
*. Open_cursors = 300
*. Processses = 150
*. Remote_login_passwordfile = 'clusive'
*. Undo_tablespace = 'undotbs1'


*. DB_FILE_NAME_CONVERT = '/oradata/orcl', '/oradata/stby'
*. LOG_FILE_NAME_CONVERT = '/oradata/orcl', '/oradata/stby'
*. Fal_client = 'stby'
*. Fal_server = 'prim'
*. Standby_file_management = auto
*. Log_archive_dest_1 = 'location =/oradata/arch/stby valid_for = (all_logfiles, all_roles) db_unique_name = stby'
*. Log_archive_dest_2 = 'service = prim valid_for = (online_logfiles, primary_role) db_unique_name = prim'
*. DB_UNIQUE_NAME = 'stby'
*. Log_archive_config = 'dg _ config = (prim, stby )'

Back up master database:
Rman target/
Backup database format'/u01/oradata/dbfull % U ';

  • 1
  • 2
  • Next Page

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.