Oracle Tips By Baptiste
Vous trouverez sur ce blog quelques astuces concernant l'administration et la maintenance d'une base de données Oracle (10
et 11g)
JEUDI 19 MARS 2015 ARTICLES
► 2016 (2)
Mise en place d'une standby physique avec Oracle Data Guard 11.2 ▼ 2015 (2)
► avril (1)
▼ mars (1)
Mise en place d'une standby
Dans cet article, nous allons voir comment configurer une standby en mode physical avec Oracle Data physique avec Oracle D...
Guard, en utilisant RMAN Duplicate. De plus, nous allons activer le Real Time Apply grâce aux standby
redo log. ► 2014 (3)
► 2013 (2)
Dans un précédent article, la mise en place d'une standby sans Data Guard est abordée. En effet,
► 2012 (4)
Oracle Data Guard n'est présent qu'avec la version Enterprise Edition, si vous n'avez Enterprise Edition,
il faut alors partir sur une standby manuelle, voir : article standby ► 2011 (3)
► 2009 (10)
Deux modes existent : Physique ou Logique.
MEMBRES
En mode Logique, les schemas de la standby ne correspondent pas forcement à la base primaire. La
logique utilise LogMiner pour transformer les redos logs en langage DML afin que la standby puisse les S'inscrire à ce site
rejouter. avec Google Friend Connect
Membres (2)
En mode Physique, les schemas correspondent exactement, les redos logs sont envoyés à la secondaire
depuis la primaire, et sont appliqués sur la secondaire qui tourne en mode Recover.
Environnement utilisé dans cet article : Vous êtes déjà membre ? Connexion
Red Hat 5.3, avec Oracle Database 11.2.0.3
Serveur primaire : primary
Base primaire : DBPRIM QUI ÊTESVOUS ?
Serveur secondaire : secondary Baptiste Sorrentino
Base secondaire : DBSEC Afficher mon profil complet
Créer la base primaire si ce n'est pas déjà fait :
dbca silent createDatabase templateName General_Purpose.dbc gdbname
DBPRIM sid DBPRIM responseFile NO_VALUE characterSet AL32UTF8
nationalCharacterSet AL16UTF16 totalMemory 1024 emConfiguration NONE
SysPassword oracle SystemPassword oracle redoLogFileSize 50
datafileDestination /u02/
Modifier le pfile :
Ajouter les valeur suivantes :
fal_client='DBPRIM'
fal_server='DBSEC'
log_archive_dest_1='location=use_db_recovery_file_dest valid_for=
(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=DBPRIM'
log_archive_dest_2='SERVICE=DBSEC ASYNC valid_for=
(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=DBSEC'
log_archive_dest_state_1='enable'
log_archive_dest_state_2='enable'
log_file_name_convert='/u03/fra/DBPRIM/onlinelog/','/u03/fra/DBSEC/online
log/'
db_file_name_convert='/u02/DBPRIM/','/u02/DBSEC/'
log_archive_config='DG_CONFIG=(DBPRIM,DBSEC)'
De mon côté, j'ajuste aussi le paramètre suivant :
db_recovery_file_dest='/u03/fra'
http://baptistesorrentino.blogspot.sn/2015/03/miseenplacedunestandbyphysique.html 1/10
9/5/2016 Oracle Tips By Baptiste: Mise en place d'une standby physique avec Oracle Data Guard 11.2
SQL> create pfile='/tmp/pfile_DBPRIM.ora' from spfile;
SQL>!vi /tmp/pfile_DBPRIM.ora
DBPRIM.__db_cache_size=402653184
DBPRIM.__java_pool_size=16777216
DBPRIM.__large_pool_size=16777216
DBPRIM.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
DBPRIM.__pga_aggregate_target=436207616
DBPRIM.__sga_target=637534208
DBPRIM.__shared_io_pool_size=0
DBPRIM.__shared_pool_size=184549376
DBPRIM.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/DBPRIM/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/u02/DBPRIM/control01.ctl','/u01/app/oracle/fast_recover
y_area/DBPRIM/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='DBPRIM'
*.db_recovery_file_dest='/u03/fra'
*.db_recovery_file_dest_size=4322230272
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=DBPRIMXDB)'
*.memory_max_target=2097152000
*.memory_target=1073741824
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'
fal_client='DBPRIM'
fal_server='DBSEC'
log_archive_dest_1='location=use_db_recovery_file_dest valid_for=
(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=DBPRIM'
log_archive_dest_2='SERVICE=DBSEC ASYNC valid_for=
(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=DBSEC'
log_archive_dest_state_1='enable'
log_archive_dest_state_2='enable'
log_file_name_convert='/u03/fra/DBPRIM/onlinelog/','/u03/fra/DBSEC/online
log/'
db_file_name_convert='/u02/DBPRIM/','/u02/DBSEC/'
log_archive_config='DG_CONFIG=(DBPRIM,DBSEC)'
Redémarrer en utilisant le pfile
SQL> startup mount pfile='/tmp/pfile_DBPRIM.ora';
ORACLE instance started.
Total System Global Area 2087780352 bytes
Fixed Size 2229944 bytes
Variable Size 1677723976 bytes
Database Buffers 402653184 bytes
Redo Buffers 5173248 bytes
Database mounted.
SQL> create spfile from pfile='/tmp/pfile_DBPRIM.ora';
Passer en mode Archivelog et Force logging
SQL> alter database archivelog;
Database altered.
SQL> alter database force logging;
Database altered.
SQL> alter database open;
http://baptistesorrentino.blogspot.sn/2015/03/miseenplacedunestandbyphysique.html 2/10
9/5/2016 Oracle Tips By Baptiste: Mise en place d'une standby physique avec Oracle Data Guard 11.2
Database altered.
Configurer les fichiers tnsnames.ora sur les deux serveurs :
vi $ORACLE_HOME/network/admin/tnsnames.ora
DBSEC =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(Host = secondary)(Port = 1521))
)
(CONNECT_DATA =
(SID = DBSEC)
)
)
DBPRIM =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(Host = primary)(Port = 1521))
)
(CONNECT_DATA =
(SID = DBPRIM)
)
)
Créer un password file et le copier sur la secondaire (respecter le nommage pour le fichier : orapwSID)
[oracle@primary tmp]$ orapwd file=orapwDBPRIM password=oracle entries=5
[oracle@primary tmp]$ scp orapwDBPRIM
oracle@secondary:/u01/app/oracle/product/11.2.0.3/dbhome_1/dbs/orapwDBSEC
Sur la secondaire, faire un NO MOUNT d'une instance avec le minimum de paramètre en créant un
nouveau pfile :
[oracle@secondary tmp]$ vi $ORACLE_HOME/dbs/initDBSEC.ora
DB_NAME=DBSEC
SHARED_POOL_SIZE=1G
[oracle@secondary dbs]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Thu Mar 19 15:39:37 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 1169227776 bytes
Fixed Size 2227704 bytes
Variable Size 1107296776 bytes
Database Buffers 50331648 bytes
Redo Buffers 9371648 bytes
Sur la secondaire, il faudra probablement ajouter une entrée statique dans le listener.ora puis faire un
reload du listener.
[oracle@secondary dbs]$ vi $ORACLE_HOME/network/admin/listener.ora
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME=DBSEC)
(ORACLE_HOME=/u01/app/oracle/product/11.2.0.3/db)
(SID_NAME=DBSEC))
(SID_DESC=
(SID_NAME=plsextproc)
(ORACLE_HOME=/u01/app/oracle/product/11.2.0.3/db)
(PROGRAM=extproc)))
Création des standbys redo logs, autant que de membre de redo :
SQL> select GROUP#, MEMBER from v$logfile
http://baptistesorrentino.blogspot.sn/2015/03/miseenplacedunestandbyphysique.html 3/10
9/5/2016 Oracle Tips By Baptiste: Mise en place d'une standby physique avec Oracle Data Guard 11.2
GROUP# MEMBER
3 /u02/DBPRIM/redo03.log
2 /u02/DBPRIM/redo02.log
1 /u02/DBPRIM/redo01.log
SQL> ALTER DATABASE ADD STANDBY LOGFILE
'/u03/fra/DBPRIM/onlinelog/standby01.log' SIZE 52428800;
Database altered.
SQL> ALTER DATABASE ADD STANDBY LOGFILE
'/u03/fra/DBPRIM/onlinelog/standby02.log' SIZE 52428800;
Database altered.
SQL> ALTER DATABASE ADD STANDBY LOGFILE
'/u03/fra/DBPRIM/onlinelog/standby03.log' SIZE 52428800;
Database altered.
SQL> select GROUP#, MEMBER from v$logfile;
GROUP# MEMBER
3 /u02/DBPRIM/redo03.log
2 /u02/DBPRIM/redo02.log
1 /u02/DBPRIM/redo01.log
4 /u03/fra/DBPRIM/onlinelog/standby01.log
5 /u03/fra/DBPRIM/onlinelog/standby02.log
6 /u03/fra/DBPRIM/onlinelog/standby03.log
Créer l'arborescence sur le serveur secondaire
=> /u01/app/oracle/admin/DBSEC/adump
=> /u02/DBSEC/
=> /u03/fra/DBSEC/onlinelog/
Créer un fichier rman avec les valeurs suivantes :
[oracle@primary tmp]$ vi /tmp/duplicate.rman
run {
allocate channel c1 type disk;
allocate auxiliary channel stby type disk;
duplicate target database
for standby
from active database
spfile
parameter_value_convert 'DBPRIM','DBSEC'
set db_unique_name='DBSEC'
set db_file_name_convert='/u02/DBPRIM/','/u02/DBSEC/'
set
log_file_name_convert='/u03/fra/DBSEC/onlinelog/','/u03/fra/DBSEC/onlinel
og/'
set
control_files='/u02/DBSEC/control01.ctl','/u03/fra/DBSEC/control02.ctl'
set log_archive_max_processes='10'
set fal_client='DBSEC'
set fal_server='DBPRIM'
set standby_file_management='AUTO'
set log_archive_config='dg_config=(DBPRIM,DBSEC)'
set log_archive_dest_2='service=DBPRIM ASYNC valid_for=
(ONLINE_LOGFILE,PRIMARY_ROLE) db_unique_name=DBPRIM'
;
}
Se connecter sur l'auxiliary via RMAN et lancer la commande duplicate :
[oracle@primary tmp]$ rman target / auxiliary sys/oracle@DBSEC
Recovery Manager: Release 11.2.0.3.0 Production on Thu Mar 19 16:19:23
2015
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights
http://baptistesorrentino.blogspot.sn/2015/03/miseenplacedunestandbyphysique.html 4/10
9/5/2016 Oracle Tips By Baptiste: Mise en place d'une standby physique avec Oracle Data Guard 11.2
reserved.
connected to target database: DBPRIM (DBID=636757780)
connected to auxiliary database: DBSEC (not mounted)
RMAN> @/tmp/duplicate.rman
RMAN> run {
2> allocate channel c1 type disk;
3> allocate auxiliary channel stby type disk;
4> duplicate target database
5> for standby
6> from active database
7> spfile
8> parameter_value_convert 'DBPRIM','DBSEC'
9> set db_unique_name='DBSEC'
10> set db_file_name_convert='/u02/DBPRIM/','/u02/DBSEC/'
11> set
log_file_name_convert='/u03/fra/DBSEC/onlinelog/','/u03/fra/DBSEC/onlinel
og/'
12> set
control_files='/u02/DBSEC/control01.ctl','/u03/fra/DBSEC/control02.ctl'
13> set log_archive_max_processes='10'
14> set fal_client='DBSEC'
15> set fal_server='DBPRIM'
16> set standby_file_management='AUTO'
17> set log_archive_config='dg_config=(DBPRIM,DBSEC)'
18> set log_archive_dest_2='service=DBPRIM ASYNC valid_for=
(ONLINE_LOGFILE,PRIMARY_ROLE) db_unique_name=DBPRIM'
19> ;
20> }
using target database control file instead of recovery catalog
allocated channel: c1
channel c1: SID=39 device type=DISK
allocated channel: stby
channel stby: SID=19 device type=DISK
Starting Duplicate Db at 19MAR15
contents of Memory Script:
{
backup as copy reuse
targetfile '/u01/app/oracle/product/11.2.0.3/dbhome_1/dbs/orapwDBPRIM'
auxiliary format
'/u01/app/oracle/product/11.2.0.3/db/dbs/orapwDBSEC' targetfile
'/u01/app/oracle/product/11.2.0.3/dbhome_1/dbs/spfileDBPRIM.ora'
auxiliary format
'/u01/app/oracle/product/11.2.0.3/db/dbs/spfileDBSEC.ora' ;
sql clone "alter system set spfile=
''/u01/app/oracle/product/11.2.0.3/db/dbs/spfileDBSEC.ora''";
}
executing Memory Script
Starting backup at 19MAR15
Finished backup at 19MAR15
sql statement: alter system set spfile=
''/u01/app/oracle/product/11.2.0.3/db/dbs/spfileDBSEC.ora''
contents of Memory Script:
{
sql clone "alter system set audit_file_dest =
''/u01/app/oracle/admin/DBSEC/adump'' comment=
'''' scope=spfile";
sql clone "alter system set dispatchers =
''(PROTOCOL=TCP) (SERVICE=DBSECXDB)'' comment=
'''' scope=spfile";
sql clone "alter system set db_unique_name =
''DBSEC'' comment=
'''' scope=spfile";
sql clone "alter system set db_file_name_convert =
''/u02/DBPRIM/'', ''/u02/DBSEC/'' comment=
http://baptistesorrentino.blogspot.sn/2015/03/miseenplacedunestandbyphysique.html 5/10
9/5/2016 Oracle Tips By Baptiste: Mise en place d'une standby physique avec Oracle Data Guard 11.2
'''' scope=spfile";
sql clone "alter system set log_file_name_convert =
''/u03/fra/DBSEC/onlinelog/'', ''/u03/fra/DBSEC/onlinelog/'' comment=
'''' scope=spfile";
sql clone "alter system set control_files =
''/u02/DBSEC/control01.ctl'', ''/u03/fra/DBSEC/control02.ctl'' comment=
'''' scope=spfile";
sql clone "alter system set log_archive_max_processes =
10 comment=
'''' scope=spfile";
sql clone "alter system set fal_client =
''DBSEC'' comment=
'''' scope=spfile";
sql clone "alter system set fal_server =
''DBPRIM'' comment=
'''' scope=spfile";
sql clone "alter system set standby_file_management =
''AUTO'' comment=
'''' scope=spfile";
sql clone "alter system set log_archive_config =
''dg_config=(DBPRIM,DBSEC)'' comment=
'''' scope=spfile";
sql clone "alter system set log_archive_dest_2 =
''service=DBPRIM ASYNC valid_for=(ONLINE_LOGFILE,PRIMARY_ROLE)
db_unique_name=DBPRIM'' comment=
'''' scope=spfile";
shutdown clone immediate;
startup clone nomount;
}
executing Memory Script
sql statement: alter system set audit_file_dest =
''/u01/app/oracle/admin/DBSEC/adump'' comment= '''' scope=spfile
sql statement: alter system set dispatchers = ''(PROTOCOL=TCP)
(SERVICE=DBSECXDB)'' comment= '''' scope=spfile
sql statement: alter system set db_unique_name = ''DBSEC'' comment= ''''
scope=spfile
sql statement: alter system set db_file_name_convert = ''/u02/DBPRIM/'',
''/u02/DBSEC/'' comment= '''' scope=spfile
sql statement: alter system set log_file_name_convert =
''/u03/fra/DBSEC/onlinelog/'', ''/u03/fra/DBSEC/onlinelog/'' comment=
'''' scope=spfile
sql statement: alter system set control_files =
''/u02/DBSEC/control01.ctl'', ''/u03/fra/DBSEC/control02.ctl'' comment=
'''' scope=spfile
sql statement: alter system set log_archive_max_processes = 10 comment=
'''' scope=spfile
sql statement: alter system set fal_client = ''DBSEC'' comment= ''''
scope=spfile
sql statement: alter system set fal_server = ''DBPRIM'' comment= ''''
scope=spfile
sql statement: alter system set standby_file_management = ''AUTO''
comment= '''' scope=spfile
sql statement: alter system set log_archive_config = ''dg_config=
(DBPRIM,DBSEC)'' comment= '''' scope=spfile
sql statement: alter system set log_archive_dest_2 = ''service=DBPRIM
ASYNC valid_for=(ONLINE_LOGFILE,PRIMARY_ROLE) db_unique_name=DBPRIM''
comment= '''' scope=spfile
Oracle instance shut down
http://baptistesorrentino.blogspot.sn/2015/03/miseenplacedunestandbyphysique.html 6/10
9/5/2016 Oracle Tips By Baptiste: Mise en place d'une standby physique avec Oracle Data Guard 11.2
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 2087780352 bytes
Fixed Size 2229944 bytes
Variable Size 1677723976 bytes
Database Buffers 402653184 bytes
Redo Buffers 5173248 bytes
allocated channel: stby
channel stby: SID=19 device type=DISK
contents of Memory Script:
{
backup as copy current controlfile for standby auxiliary format
'/u02/DBSEC/control01.ctl';
restore clone controlfile to '/u03/fra/DBSEC/control02.ctl' from
'/u02/DBSEC/control01.ctl';
}
executing Memory Script
Starting backup at 19MAR15
channel c1: starting datafile copy
copying standby control file
output file
name=/u01/app/oracle/product/11.2.0.3/dbhome_1/dbs/snapcf_DBPRIM.f
tag=TAG20150319T162326 RECID=1 STAMP=874772607
channel c1: datafile copy complete, elapsed time: 00:00:07
Finished backup at 19MAR15
Starting restore at 19MAR15
channel stby: copied control file copy
Finished restore at 19MAR15
contents of Memory Script:
{
sql clone 'alter database mount standby database';
}
executing Memory Script
sql statement: alter database mount standby database
contents of Memory Script:
{
set newname for tempfile 1 to
"/u02/DBSEC/temp01.dbf";
switch clone tempfile all;
set newname for datafile 1 to
"/u02/DBSEC/system01.dbf";
set newname for datafile 2 to
"/u02/DBSEC/sysaux01.dbf";
set newname for datafile 3 to
"/u02/DBSEC/undotbs01.dbf";
set newname for datafile 4 to
"/u02/DBSEC/users01.dbf";
backup as copy reuse
datafile 1 auxiliary format
"/u02/DBSEC/system01.dbf" datafile
2 auxiliary format
"/u02/DBSEC/sysaux01.dbf" datafile
3 auxiliary format
"/u02/DBSEC/undotbs01.dbf" datafile
4 auxiliary format
"/u02/DBSEC/users01.dbf" ;
sql 'alter system archive log current';
}
executing Memory Script
executing command: SET NEWNAME
renamed tempfile 1 to /u02/DBSEC/temp01.dbf in control file
http://baptistesorrentino.blogspot.sn/2015/03/miseenplacedunestandbyphysique.html 7/10
9/5/2016 Oracle Tips By Baptiste: Mise en place d'une standby physique avec Oracle Data Guard 11.2
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting backup at 19MAR15
channel c1: starting datafile copy
input datafile file number=00001 name=/u02/DBPRIM/system01.dbf
output file name=/u02/DBSEC/system01.dbf tag=TAG20150319T162340
channel c1: datafile copy complete, elapsed time: 00:00:45
channel c1: starting datafile copy
input datafile file number=00002 name=/u02/DBPRIM/sysaux01.dbf
output file name=/u02/DBSEC/sysaux01.dbf tag=TAG20150319T162340
channel c1: datafile copy complete, elapsed time: 00:00:35
channel c1: starting datafile copy
input datafile file number=00003 name=/u02/DBPRIM/undotbs01.dbf
output file name=/u02/DBSEC/undotbs01.dbf tag=TAG20150319T162340
channel c1: datafile copy complete, elapsed time: 00:00:15
channel c1: starting datafile copy
input datafile file number=00004 name=/u02/DBPRIM/users01.dbf
output file name=/u02/DBSEC/users01.dbf tag=TAG20150319T162340
channel c1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 19MAR15
sql statement: alter system archive log current
contents of Memory Script:
{
switch clone datafile all;
}
executing Memory Script
datafile 1 switched to datafile copy
input datafile copy RECID=1 STAMP=874772710 file
name=/u02/DBSEC/system01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=2 STAMP=874772710 file
name=/u02/DBSEC/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=3 STAMP=874772710 file
name=/u02/DBSEC/undotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=4 STAMP=874772710 file
name=/u02/DBSEC/users01.dbf
ORACLE error from auxiliary database: ORA01511: error in renaming
log/data files
ORA01275: Operation RENAME is not allowed if standby file management is
automatic.
RMAN05535: WARNING: All redo log files were not defined properly.
ORACLE error from auxiliary database: ORA01511: error in renaming
log/data files
ORA01275: Operation RENAME is not allowed if standby file management is
automatic.
RMAN05535: WARNING: All redo log files were not defined properly.
ORACLE error from auxiliary database: ORA01511: error in renaming
log/data files
ORA01275: Operation RENAME is not allowed if standby file management is
automatic.
RMAN05535: WARNING: All redo log files were not defined properly.
ORACLE error from auxiliary database: ORA01511: error in renaming
log/data files
ORA01275: Operation RENAME is not allowed if standby file management is
automatic.
RMAN05535: WARNING: All redo log files were not defined properly.
http://baptistesorrentino.blogspot.sn/2015/03/miseenplacedunestandbyphysique.html 8/10
9/5/2016 Oracle Tips By Baptiste: Mise en place d'une standby physique avec Oracle Data Guard 11.2
ORACLE error from auxiliary database: ORA01511: error in renaming
log/data files
ORA01275: Operation RENAME is not allowed if standby file management is
automatic.
RMAN05535: WARNING: All redo log files were not defined properly.
ORACLE error from auxiliary database: ORA01511: error in renaming
log/data files
ORA01275: Operation RENAME is not allowed if standby file management is
automatic.
RMAN05535: WARNING: All redo log files were not defined properly.
Finished Duplicate Db at 19MAR15
released channel: c1
released channel: stby
Les warnings peuvent être ignorés, ils sont dû à la commande standby_file_management='AUTO'
La standby est maintenant créée, nous pouvons démarrer le recover :
Pour utiliser le Real Time Apply
SQL> alter database recover managed standby database using current
logfile disconnect;
Database altered.
Sans utiliser le Real Time Apply
SQL>alter database recover managed standby database disconnect;
Database altered.
Attention à ne pas faire de ALTER DATABASE OPEN sur la secondaire, ce qui activerait l'option
Active Dataguard
Pour vérifier que la standby a correctement été créée, depuis la standby, se connecter en sql :
SQL> select protection_mode,protection_level,database_role,name from
v$database;
PROTECTION_MODE PROTECTION_LEVEL DATABASE_ROLE NAME
MAXIMUM PERFORMANCE MAXIMUM PERFORMANCE PHYSICAL STANDBY DBPRIM
Pour vérifier que les données sont bien appliquées sur la standby :
Sur la primaire :
SQL> SELECT MAX (sequence#) FROM v$archived_log WHERE dest_id = 1
MAX(SEQUENCE#)
23
SQL> alter system switch logfile;
SQL> SELECT MAX (sequence#) FROM v$archived_log WHERE dest_id = 1
MAX(SEQUENCE#)
24
Sur la secondaire
SQL> SELECT 'Last Received : ' Logs,
TO_CHAR(next_time,'DDMONYY:HH24:MI:SS') TIME,thread#,sequence#
FROM v$archived_log
WHERE sequence# =
(SELECT MAX(sequence#) FROM v$archived_log );
LOGS TIME THREAD# SEQUENCE#
Last Received : 19MAR15:16:59:47 1 24
http://baptistesorrentino.blogspot.sn/2015/03/miseenplacedunestandbyphysique.html 9/10
9/5/2016 Oracle Tips By Baptiste: Mise en place d'une standby physique avec Oracle Data Guard 11.2
Notre dataguard fonctionne correctement, la prochaine étape sera de configurer le broker et de faire des
tests de basculer.
A voir dans les prochains articles...
Posted by Baptiste Sorrentino at 09:30
1 commentaire:
Anonyme 20 mars 2015 à 09:26
Merci pour ce tuto! :)
Répondre
Saisissez votre commentaire…
Commentaire : Compte Google
Publier
Aperçu
Links to this post
Créer un lien
Inscription à : Publier les commentaires (Atom)
Modèle Picture Window. Modèles d'images de johnwoodcock. Fourni par Blogger.
http://baptistesorrentino.blogspot.sn/2015/03/miseenplacedunestandbyphysique.html 10/10