ON PRIMARY
1) Прописать
на каждом из 3-х узлов
в
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
DOCSTB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = xxxxxxxxxx)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = docstb)
)
)
DOC =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = xxxxxxxxxxxxx)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = doc)
)
)
ON STANDBY
2) Прописать
тоже самое, что и в
пункте 1
3) Прописать статический листенер в
/u01/app/oracle/product/11.2.0/grid/network/admin/listener.ora , чтобы мы
могли удаленно подсоединиться к базе в состоянии nomount
SID_LIST_LISTENER
=
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME=docstb)
(ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = docstb)
)
)
ON PRIMARY
4) Скопировать файл паролей с одного из узлов на стендбай и
переименовать его в orapwdocstb
ON STANDBY
5) Создаём audit trail директорию в $ORACLE_BASE/admin
cd
/u01/app/oracle/admin
mkdir
docstb
cd docstb
mkdir adump
6) Создаём
файл параметров initdocstb.ora
в директории
/u01/app/oracle/product/11.2.0/dbhome_1/dbs/
db_name=docstb
7) Устанавливаем ORACLE_SID=docstb и
запускаем базу в режиме
nomount
startup
nomount
ON PRIMARY
8) Выполняем
команды
alter
system set log_archive_config='DG_CONFIG=(doc,docstby,docstb)';
alter
system set log_archive_dest_3='SERVICE=DOCSTB
VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=docstb';
alter
system set log_archive_dest_state_3=enable;
9) Создаем скрипт standby.sql
run {
allocate channel doc type disk;
allocate auxiliary channel docstb type disk;
duplicate target database for standby
from active database
spfile
set cluster_database='FALSE'
set user_dump_dest='/u01/app/oracle/diag/rdbms/docstb/trace'
set core_dump_dest='/u01/app/oracle/diag/rdbms/docstb/cdump'
set background_dump_dest='/u01/app/oracle/diag/rdbms/docstb/trace'
set audit_file_dest='/u01/app/oracle/admin/docstb/adump'
set db_create_file_dest='+STBY'
set db_recovery_file_dest='+STBY'
set db_recovery_file_dest_size='300G'
set local_listener=''
set remote_listener=''
set service_names='docstb'
set db_unique_name='docstb'
set db_file_name_convert='+DATA','+STBY'
set log_file_name_convert='+DATA','+STBY'
set control_files='+STBY/docstb/controlfile/docstb.ctl'
set log_archive_max_processes='5'
set fal_client='docstb'
set fal_server='doc'
set standby_file_management='AUTO'
set log_archive_config='DG_CONFIG=(doc,docstb)'
set log_archive_dest_2='SERVICE=DOC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
DB_UNIQUE_NAME=doc';
}
10) Запускаем скрипт на одном из узлов
rman target
sys/xxxxxxx
connect
auxiliary sys/xxxxxxxxxxx@docstb
@/u01/app/oracle/product/11.2.0/dbhome_1/dbs/standby.sql
ON STANDBY
11)
alter
database recover managed standby database using current logfile disconnect from
session;
ALTER
DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
alter
database open read only;
alter
database recover managed standby database using current logfile disconnect from
session;
alter
system set dg_broker_start=TRUE;
ON PRIMARY
12)
dgmgrl>
connect sys/******
dgmgrl>
add database docstb as connect identifier is docstb;
dgmgrl> enable configuration;
Комментариев нет:
Отправить комментарий