Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Construction of oracle rac to stand-alone ADG environment of ADG series

2025-03-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Address Planning:

RAC: 1.1.1.62 rac5-vip

1.1.1.64 rac6-vip

Db_name hxzg

Db_unique_name hxzg

Rac5-dg 1.1.1.68

Db_name hxzg

Db_unique_name hxzgdg

Archive path: / archivelog

Data file path: / oradata/hxzg/

I. basic environmental preparation

1. Confirm that the machine is in archiving mode.

Archive log list

2. Open the force logging of the main database

Alter database force logging

Second, the operation of the main library

2.1 modify parameters

Alter database force logging

Alter system set log_archive_config='dg_config= (hxzg,hxzgdg) 'scope=both

Alter system set log_archive_dest_1='location=+archive VALID_FOR= (ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=hxzg'

Alter system set LOG_ARCHIVE_DEST_2='SERVICE=hxzgdg LGWR ASYNC VALID_FOR= (ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=hxzgdg' scope=both

Alter system set LOG_ARCHIVE_DEST_STATE_1=ENABLE scope=both

Alter system set LOG_ARCHIVE_DEST_STATE_2=ENABLE scope=both

Alter system set FAL_SERVER=hxzgdg scope=both

Alter system set FAL_CLIENT=hxzg1 scope=both

Alter system set STANDBY_FILE_MANAGEMENT=auto scope=both

2.2 synchronize password files

Slightly

Third, configure the network

Tns configuration

Add the following under the tnsnames.ora file of node 1move 2 / slave library:

Hxzg1 =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = 1.1.1.62) (PORT = 1521))

(ADDRESS = (PROTOCOL = TCP) (HOST = 1.1.1.63) (PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = hxzg)

)

)

Hxzgdg =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = 1.1.1.68) (PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = hxzgdg)

)

)

2. Configure listener of slave database

SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(GLOBAL_DBNAME = prod)

(ORACLE_HOME = / oracle/app/db)

(SID_NAME = hxzgdg)

)

)

LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = IPC) (KEY = LISTENER))

)

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = 1.1.1.68) (PORT = 1521))

)

)

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER = ON

IV. Configuration of database parameters

Get the parameters of the main library and modify them on this basis

* .audit_file_dest='/oracle/app/oracle/admin/hxzg/adump'

* .audit_trail='db'

* .cluster_database=false

* .compatible='11.2.0.4.0'

* .control_files='/oradata/hxzg/control01.ctl'

* .db_block_size=8192

* .db_create_file_dest='/oradata/hxzg/'

* .db_domain=''

* .db_name='hxzg'

Db_unique_name='hxzgdg'

* .db_recovery_file_dest_size=4621074432

* .diagnostic_dest='/oracle/app/oracle'

* .fal_client='HXZGDG'

* .fal_server='HXZG1'

* .log_archive_config='dg_config= (hxzg,hxzgdg)'

* .log_archive_dest_1='location=/archivelog VALID_FOR= (ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=hxzgdg'

* .log_archive_dest_2='SERVICE=hxzg1 LGWR ASYNC VALID_FOR= (ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=hxzg'

* .log_archive_dest_state_1='ENABLE'

* .log_archive_dest_state_2='ENABLE'

* .memory_target=1200m

* .open_cursors=300

* .processes=150

* .remote_login_passwordfile='exclusive'

* .standby_file_management='AUTO'

* .undo_tablespace='UNDOTBS1'

-- create a directory

Mkdir-p/oracle/ app/oracle/admin/hxzg/adump

Mkdir-p / oradata/hxzg

Initialize the database

Perform a backup action on the main library

Run

{

Allocate channel ch2 type disk maxpiecesize = 5120m

Allocate channel ch3 type disk maxpiecesize = 5120m

Allocate channel ch4 type disk maxpiecesize = 5120m

Allocate channel ch5 type disk maxpiecesize = 5120m

Backup

AS COMPRESSED BACKUPSET

Database filesperset 10 format'/ backup/%d_DF_%T_%s_%p.bak'

Backup AS COMPRESSED BACKUPSET

Archivelog all format'/ backup/%d_ARC_%T_%s_%p.bak'

Backup format'/ backup/ctrl_%d_%T_%s'

Current controlfile for standby

Backup spfile format'/ backup/spfile_%d_%T_%s'

Release channel ch2

Release channel ch3

Release channel ch4

Release channel ch5

}

2. Restore on the repository

RMAN > restore standby controlfile from'/ backup/ctrl_HXZG_20171108_40'

RMAN >

Run {

Set newname for database to'/ oradata/hxzg/%b'

Restore database

Switch datafile all

}

3. Create standbylogfile

Alter database add standby logfile thread 1 group 5 ('/ oradata/hxzg/st_1_logfile5') size 50m

Alter database add standby logfile thread 1 group 6 ('/ oradata/hxzg/st_1_logfile6') size 50m

Alter database add standby logfile thread 1 group 7 ('/ oradata/hxzg/st_1_logfile7') size 50m

Alter database add standby logfile thread 1 group 11 ('/ oradata/hxzg/st_1_logfile11') size 50m

Alter database add standby logfile thread 2 group 8 ('/ oradata/hxzg/st_2_logfile8') size 50m

Alter database add standby logfile thread 2 group 9 ('/ oradata/hxzg/st_2_logfile9') size 50m

Alter database add standby logfile thread 2 group 10 ('/ oradata/hxzg/st_2_logfile10') size 50m

Alter database add standby logfile thread 1 group 12 ('/ oradata/hxzg/st_2_logfile12') size 50m

Start mrp

Alter database recover mananged standby database using current logfile disconnect from session

VII. Related inspection

1 check whether the second archive end point is normal on the main database

Select name,status,error from v$archive_dest

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report