Ниже могут быть ошибки, неплохо бы перепроверить еще раз.
Еще хорошая статья. Не проверял, но у него всегда все по делу.
Еще хорошая статья. Не проверял, но у него всегда все по делу.
1. Настройка Listner на обоих серверах. Нужна статическая регистрация.
listener.ora
LISTENER
=
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = host1)(PORT = 1521))
)
)
SID_LIST_LISTENER
=
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = prd_DGMGRL) -- в 12c я обошелся без "_DGMGRL"
(ORACLE_HOME =
/u01/app/oracle/product/12.1.0/dbhome_1)
(SID_NAME = prd)
)
)
tnsnames.ora
prd=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = host1)(PORT = 1521))
)
(CONNECT_DATA =
(SID = prd)
)
)
std=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST =
host2)(PORT = 1521))
)
(CONNECT_DATA =
(SID = prd)
)
)
2. init файл для второй базы
--
обязательно
*.db_unique_name=std
*.db_file_name_convert='prd','std'
*.log_file_name_convert='prd','std'
*.db_file_name_convert='prd','std'
*.log_file_name_convert='prd','std'
-- Также может потребоваться
*.control_files='...'
*.diagnostic_dest='...'
Copy
pfile and the password file to the Standby host and go there into NOMOUNT
before the duplicate command
sqlplus
sys/oracle@physt as sysdba
startup
nomount
It is
most efficient to create the Standby Redo Logs (SRLs) at this point on the
Primary, because (from 11g on) RMAN will duplicate them onto the Standby then.
SRLs are recommended on either side and are required on the Standby for LGWR
Transport
SQL>
alter database add standby logfile '/home/oracle/prima/srl_g3.rdo' size 100m;
SQL>
alter database add standby logfile '/home/oracle/prima/srl_g4.rdo' size 100m;
SQL>
alter database add standby logfile '/home/oracle/prima/srl_g5.rdo' size 100m;
rman
target sys/oracle@prima auxiliary sys/oracle@physt
duplicate
target database for standby from active database; --add more options if needed (so far - nofilenamecheck)
So far no
DGMGRL involved. RMAN gave me a Physical Standby but did not configure Redo
Transport from Primary to Standby nor did it start Redo Apply on the Standby.
DGMGRL will now do that:
alter
system set dg_broker_start=true;
dgmgrl
sys/oracle@prima
CREATE
CONFIGURATION config AS PRIMARY DATABASE IS prd CONNECT IDENTIFIER IS prd;
ADD
DATABASE std AS CONNECT IDENTIFIER IS std MAINTAINED AS PHYSICAL;
enable
configuration;
You
should monitor the alert.log of the two databases while that enabling is in
progress – the Broker does a lot here, especially it configures Redo Transport
and Redo Apply.
2. Role Changes are
much easier with the Broker
Without
the Broker, Data Guard Role Changes require a complex sequence of steps
(versions before 12c) on both sides that differ between Logical and Physical
Standby. Not so with DGMGRL:
switchover
to physt;
failover
to physt;
convert
database physt to snapshot standby;
3. The Data Guard
Broker delivers basic monitoring of the Configuration
show
configuration;
show
database physt;
4. Fast-Start
Failover requires the Data Guard Broker
Пробовали делать Switchover?
ОтветитьУдалить