您好,登錄后才能下訂單哦!
這篇文章主要介紹“Oracle搭建物理DG的方法是什么”,在日常操作中,相信很多人在Oracle搭建物理DG的方法是什么問(wèn)題上存在疑惑,小編查閱了各式資料,整理出簡(jiǎn)單好用的操作方法,希望對(duì)大家解答”O(jiān)racle搭建物理DG的方法是什么”的疑惑有所幫助!接下來(lái),請(qǐng)跟著小編一起來(lái)學(xué)習(xí)吧!
前提條件:
完成Oracle單機(jī)搭建,Oracle軟件和數(shù)據(jù)庫(kù)安裝完成。
完成Oracle備機(jī)的Oracle軟件安裝。
可以參考文章:
http://blog.itpub.net/22996654/viewspace-2149816/
完成上述安裝后開(kāi)始搭建物理DG:
主機(jī)IP:172.16.0.21
備機(jī)IP:172.16.0.75
把兩個(gè)主機(jī)都設(shè)置好/etc/hosts
[root@aa ~]# cat /etc/hosts
172.16.0.21 aa
172.16.0.75 bb
在從庫(kù)把對(duì)應(yīng)主庫(kù)的所有數(shù)據(jù)目錄、日志目錄、歸檔目錄都建立好。
[oracle@bb db_1]$ mkdir -p $ORACLE_BASE/admin/$ORACLE_SID/adump
[oracle@bb db_1]$ mkdir -p $ORACLE_BASE/oradata/WMSPROD
[oracle@bb db_1]$ mkdir -p $ORACLE_BASE/flash_recovery_area
[oracle@bb db_1]$ chown -R oracle:oinstall /usr/local/bin/*
[oracle@bb oradata]$ mkdir -p standbylog
[oracle@bb oradata]$ ll
total 8
drwxr-xr-x 2 oracle oinstall 4096 May 15 15:45 standbylog
drwxr-xr-x 2 oracle oinstall 4096 May 14 20:25 WMSPROD
設(shè)置監(jiān)聽(tīng):
主庫(kù):
[oracle@aa admin]$ cat listener.ora
# listener.ora Network Configuration File: /data/oracle/product/11.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = aa)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = /data/oracle
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME=wmsprod)
(ORACLE_HOME=/data/oracle/product/11.2.0/db_1)
(SID_NAME=wmsprod)
)
)
[oracle@aa admin]$ cat tnsnames.ora
WMSPROD =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = aa)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = WMSPROD)
)
)
WMSPRODDG =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = bb)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = WMSPRODDG)
)
)
備庫(kù):
[oracle@bb admin]$ cat listener.ora
# listener.ora Network Configuration File: /data/oracle/product/11.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = bb)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = /data/oracle
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME=wmsproddg)
(ORACLE_HOME=/data/oracle/product/11.2.0/db_1)
(SID_NAME=wmsproddg)
)
)
[oracle@bb admin]$ cat tnsnames.ora
WMSPRODDG =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = bb)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = WMSPRODDG)
)
)
WMSPROD =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = aa)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = WMSPROD)
)
)
重啟監(jiān)聽(tīng)。
在主庫(kù)加standby的日志文件:比redo日志文件多一組。
SQL> alter database add standby logfile
2 GROUP 7 ('/data/oracle/oradata/standbylog/standby01.log') SIZE 600m,
3 GROUP 8 ('/data/oracle/oradata/standbylog/standby02.log') size 600m,
4 GROUP 9 ('/data/oracle/oradata/standbylog/standby03.log') size 600m,
5 GROUP 10 ('/data/oracle/oradata/standbylog/standby04.log') size 600m,
6 GROUP 11 ('/data/oracle/oradata/standbylog/standby05.log') size 600m,
7 GROUP 12 ('/data/oracle/oradata/standbylog/standby06.log') size 600m,
8 GROUP 13 ('/data/oracle/oradata/standbylog/standby07.log') size 600m;
Database altered.
修改主從的init文件:
主庫(kù):
[oracle@aa dbs]$ cat initwmsprod.ora
*.db_name='WMSPROD'
*.memory_target=5G
*.processes = 2000
*.audit_file_dest='/data/oracle/admin/wmsprod/adump'
*.audit_trail ='db'
*.db_block_size=8192
*.db_domain=''
*.db_recovery_file_dest='/data/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=2G
*.diagnostic_dest='/data/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=WMSPRODXDB)'
*.open_cursors=300
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'
*.control_files = (/data/oracle/oradata/WMSPROD/ora_control01.ctl,/data/oracle/oradata/WMSPROD/ora_control02.ctl)
*.compatible ='11.2.0'
*.standby_file_management='AUTO'
*.LOG_ARCHIVE_CONFIG='DG_CONFIG=(wmsprod,wmsproddg)'
*.log_archive_dest_1='location=/data/oracle/oradata/WMSPROD/archivelog
VALID_FOR=(ALL_LOGFILES,ALL_ROLES)
DB_UNIQUE_NAME=wmsprod'
*.DB_UNIQUE_NAME=wmsprod
*.DB_FILE_NAME_CONVERT='/data/oracle/oradata/WMSPROD/','/data/oracle/oradata/WMSPROD/'
*.LOG_FILE_NAME_CONVERT='/data/oracle/oradata/WMSPROD/','/data/oracle/oradata/WMSPROD/'
*.log_archive_dest_2='SERVICE=wmsproddg LGWR ASYNC
valid_for=(online_logfiles,primary_role)
db_unique_name=wmsproddg'
*.LOG_ARCHIVE_DEST_STATE_1=ENABLE
*.LOG_ARCHIVE_DEST_STATE_2=ENABLE
*.FAL_SERVER=wmsproddg
*.fal_client=wmspro
備庫(kù):
[oracle@bb dbs]$ cat initwmsproddg.ora
*.db_name='WMSPROD'
*.memory_target=5G
*.processes = 2000
*.audit_file_dest='/data/oracle/admin/wmsprod/adump'
*.audit_trail ='db'
*.db_block_size=8192
*.db_domain=''
*.db_recovery_file_dest='/data/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=2G
*.diagnostic_dest='/data/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=WMSPRODXDB)'
*.open_cursors=300
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'
*.control_files = (/data/oracle/oradata/WMSPROD/ora_control01.ctl,/data/oracle/oradata/WMSPROD/ora_control02.ctl)
*.compatible ='11.2.0'
*.standby_file_management='AUTO'
*.LOG_ARCHIVE_CONFIG='DG_CONFIG=(wmsprod,wmsproddg)'
*.log_archive_dest_1='location=/data/oracle/oradata/WMSPROD/archivelog
VALID_FOR=(ALL_LOGFILES,ALL_ROLES)
DB_UNIQUE_NAME=wmsproddg'
*.DB_UNIQUE_NAME=wmsproddg
*.DB_FILE_NAME_CONVERT='/data/oracle/oradata/WMSPROD/','/data/oracle/oradata/WMSPROD/'
*.LOG_FILE_NAME_CONVERT='/data/oracle/oradata/WMSPROD/','/data/oracle/oradata/WMSPROD/'
*.log_archive_dest_2='SERVICE=wmsprod LGWR ASYNC
valid_for=(online_logfiles,primary_role)
db_unique_name=wmsprod'
*.LOG_ARCHIVE_DEST_STATE_1=ENABLE
*.LOG_ARCHIVE_DEST_STATE_2=ENABLE
*.FAL_SERVER=wmsprod
*.fal_client=wmsprodd
cp 主庫(kù)的密碼文件生成備庫(kù)的密碼文件并放到備庫(kù)對(duì)應(yīng)位置:
[oracle@aa dbs]$ cp orapwwmsprod orapwwmsproddg
創(chuàng)建備庫(kù)的spfile文件,啟動(dòng)備庫(kù)到nomount模式
SQL> shutdown immediate;
SQL> create spfile from pfile;
SQL> startup nomount;
RMAN復(fù)制主庫(kù)到備庫(kù)
首先從庫(kù)RMAN連接到目標(biāo)數(shù)據(jù)庫(kù)和輔助數(shù)據(jù)庫(kù)
rman target sys/password@wmsprod auxiliary sys/password@wmsproddg
使用RMAN的duplicate命令進(jìn)行復(fù)制,兩邊目錄結(jié)構(gòu)相同,需要添加nofilenamecheck參數(shù)
RMAN> duplicate target database for standby from active database nofilenamecheck;
復(fù)制成功后,備庫(kù)自動(dòng)被加載為mount模式,進(jìn)入sqlplus查看
SQL> select status from v$instance;
備庫(kù)執(zhí)行過(guò)程:
[oracle@bb admin]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Fri May 15 18:09:13 2020
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> create spfile from pfile;
File created.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 5344731136 bytes
Fixed Size 2262656 bytes
Variable Size 3724544384 bytes
Database Buffers 1593835520 bytes
Redo Buffers 24088576 bytes
SQL> !
[oracle@bb admin]$ rman target sys/oracle@wmsprod auxiliary sys/oracle@wmsproddg
Recovery Manager: Release 11.2.0.4.0 - Production on Fri May 15 18:10:47 2020
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: WMSPROD (DBID=1351169222)
connected to auxiliary database: WMSPROD (not mounted)
RMAN> duplicate target database for standby from active database nofilenamecheck;
Starting Duplicate Db at 15-MAY-20
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=2376 device type=DISK
contents of Memory Script:
{
backup as copy reuse
targetfile '/data/oracle/product/11.2.0/db_1/dbs/orapwwmsprod' auxiliary format
'/data/oracle/product/11.2.0/db_1/dbs/orapwwmsproddg' ;
}
executing Memory Script
Starting backup at 15-MAY-20
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=96 device type=DISK
Finished backup at 15-MAY-20
contents of Memory Script:
{
backup as copy current controlfile for standby auxiliary format '/data/oracle/oradata/WMSPROD/ora_control01.ctl';
restore clone controlfile to '/data/oracle/oradata/WMSPROD/ora_control02.ctl' from
'/data/oracle/oradata/WMSPROD/ora_control01.ctl';
}
executing Memory Script
Starting backup at 15-MAY-20
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
copying standby control file
output file name=/data/oracle/product/11.2.0/db_1/dbs/snapcf_wmsprod.f tag=TAG20200515T181846 RECID=1 STAMP=1040494726
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 15-MAY-20
Starting restore at 15-MAY-20
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: copied control file copy
Finished restore at 15-MAY-20
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
"/data/oracle/oradata/WMSPROD/temp01.dbf";
switch clone tempfile all;
set newname for datafile 1 to
"/data/oracle/oradata/WMSPROD/system01.dbf";
set newname for datafile 2 to
"/data/oracle/oradata/WMSPROD/sysaux01.dbf";
set newname for datafile 3 to
"/data/oracle/oradata/WMSPROD/undotbs01.dbf";
set newname for datafile 4 to
"/data/oracle/oradata/WMSPROD/users01.dbf";
backup as copy reuse
datafile 1 auxiliary format
"/data/oracle/oradata/WMSPROD/system01.dbf" datafile
2 auxiliary format
"/data/oracle/oradata/WMSPROD/sysaux01.dbf" datafile
3 auxiliary format
"/data/oracle/oradata/WMSPROD/undotbs01.dbf" datafile
4 auxiliary format
"/data/oracle/oradata/WMSPROD/users01.dbf" ;
sql 'alter system archive log current';
}
executing Memory Script
executing command: SET NEWNAME
renamed tempfile 1 to /data/oracle/oradata/WMSPROD/temp01.dbf in control file
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting backup at 15-MAY-20
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=/data/oracle/oradata/WMSPROD/users01.dbf
output file name=/data/oracle/oradata/WMSPROD/users01.dbf tag=TAG20200515T181853
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=/data/oracle/oradata/WMSPROD/system01.dbf
output file name=/data/oracle/oradata/WMSPROD/system01.dbf tag=TAG20200515T181853
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=/data/oracle/oradata/WMSPROD/sysaux01.dbf
output file name=/data/oracle/oradata/WMSPROD/sysaux01.dbf tag=TAG20200515T181853
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=/data/oracle/oradata/WMSPROD/undotbs01.dbf
output file name=/data/oracle/oradata/WMSPROD/undotbs01.dbf tag=TAG20200515T181853
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
Finished backup at 15-MAY-20
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=1040494790 file name=/data/oracle/oradata/WMSPROD/system01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=2 STAMP=1040494790 file name=/data/oracle/oradata/WMSPROD/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=3 STAMP=1040494790 file name=/data/oracle/oradata/WMSPROD/undotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=4 STAMP=1040494790 file name=/data/oracle/oradata/WMSPROD/users01.dbf
Finished Duplicate Db at 15-MAY-20
查看備庫(kù)歸檔模式:
[oracle@bb admin]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Fri May 15 18:32:46 2020
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /data/oracle/oradata/WMSPROD/archivelog
Oldest online log sequence 7
Next log sequence to archive 0
Current log sequence 8
如果沒(méi)有建這個(gè)archivelog目錄。
會(huì)在上級(jí)目錄生成同步的歸檔日志文件。
主庫(kù)切日志組:
切日志:
SQL> alter system switch logfile
2 ;
System altered.
[oracle@aa archivelog]$ ll
total 105956
-rw-r----- 1 oracle oinstall 56715776 May 14 20:50 1_2_1040413510.dbf
-rw-r----- 1 oracle oinstall 47865344 May 15 17:33 1_3_1040413510.dbf
-rw-r----- 1 oracle oinstall 44544 May 15 17:33 1_4_1040413510.dbf
-rw-r----- 1 oracle oinstall 2842624 May 15 18:18 1_5_1040413510.dbf
-rw-r----- 1 oracle oinstall 28160 May 15 18:19 1_6_1040413510.dbf
-rw-r----- 1 oracle oinstall 151040 May 15 18:24 1_7_1040413510.dbf
-rw-r----- 1 oracle oinstall 844800 May 15 18:50 1_8_1040413510.dbf
備庫(kù)日志同步:
[oracle@bb archivelog]$ ll
total 828
-rw-r----- 1 oracle oinstall 844800 May 15 18:50 1_8_1040413510.dbf
查備庫(kù):
SQL> select status from v$instance;
STATUS
------------
MOUNTED
SQL> select name from v$database;
NAME
---------
WMSPROD
關(guān)閉審計(jì):
第1步:查看審計(jì)功能是否開(kāi)啟?
SQL> show parameter audit;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
audit_file_dest string /u01/app/oracle/admin/ORCL/adump
audit_sys_operations boolean FALSE
audit_syslog_level string
audit_trail string NONE
audit_trail 的value值為NONE表示不開(kāi)啟;
audit_trail 的value值為FALSE表示不開(kāi)啟;
audit_trail 的value值為DB表示開(kāi)啟;
audit_trail 的value值為T(mén)URE表示開(kāi)啟;
audit_trail 的value值為OS表示審計(jì)記錄寫(xiě)入一個(gè)操作系統(tǒng)文件(不是特別理解);
第2步:開(kāi)啟審計(jì)功能
SQL> alter system set audit_sys_operations=TRUE scope=spfile;--審計(jì)管理用戶(hù)(以sysdba/sysoper角色登陸)
SQL> alter system set audit_trail=db,extended scope=spfile;
重啟實(shí)例
第3步:關(guān)閉審計(jì)功能
SQL> conn /as sysdba
SQL> show parameter audit
SQL> alter system set audit_trail = none scope=spfile;
重啟實(shí)例
OK。
SQL> show parameter audit;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
audit_file_dest string /data/oracle/admin/wmsprod/adu
mp
audit_sys_operations boolean FALSE
audit_syslog_level string
audit_trail string DB
SQL> alter system set audit_trail = none scope=spfile;
System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.
Total System Global Area 5344731136 bytes
Fixed Size 2262656 bytes
Variable Size 3724544384 bytes
Database Buffers 1593835520 bytes
Redo Buffers 24088576 bytes
Database mounted.
Database opened.
SQL> show parameter audit;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
audit_file_dest string /data/oracle/admin/wmsprod/adu
mp
audit_sys_operations boolean FALSE
audit_syslog_level string
audit_trail string NONE
在備庫(kù)開(kāi)啟實(shí)時(shí)日志應(yīng)用
SQL> alter database recover managed standby database using current logfile disconnect from session;
主備庫(kù)角色狀態(tài)查詢(xún)
SQL> select switchover_status,database_role from v$database;
--主庫(kù)顯示:TO STANDBY/PRIMARY,如果顯示SESSION ACTIVE表示還有活動(dòng)的會(huì)話(huà),需要關(guān)閉活動(dòng)的會(huì)話(huà)再檢查
--備庫(kù)顯示:NOT ALLOWED/PHYSICAL STANDBY
測(cè)試DG
執(zhí)行日志切換測(cè)試
在主庫(kù)端切換歸檔,在備庫(kù)檢查是否也發(fā)生了切換
主庫(kù)上執(zhí)行日志切換
SQL> archive log list;
SQL> alter system switch logfile;
SQL> archive log list;
備庫(kù)上查看,日志的sequence號(hào)也跟著變了
SQL> archive log list;
1
查看備庫(kù)啟動(dòng)的DG進(jìn)程
SQL> select PROCESS ,STATUS from v$managed_standby;
PROCESS STATUS
--------------------------- ------------------------------------
ARCH CONNECTED
ARCH CONNECTED
ARCH CONNECTED
ARCH CLOSING
RFS IDLE
RFS IDLE
RFS IDLE
MRP0 APPLYING_LOG
查看數(shù)據(jù)庫(kù)的保護(hù)模式
SQL> select database_role,protection_mode,protection_level,open_mode from v$database;
DATABASE_ROLE PROTECTION_MODE PROTECTION_LEVEL OPEN_MODE
------------------------------------------------ ------------------------------------------------------------ ------------------------------------------------------------ ------------------------------------------------------------
PRIMARY MAXIMUM PERFORMANCE MAXIMUM PERFORMANCE READ WRITE
查看DG的日志信息
SQL> select * from v$dataguard_status;
1
Open Read Only Standby數(shù)據(jù)庫(kù)
以只讀方式打開(kāi)備庫(kù),并開(kāi)啟實(shí)時(shí)日志應(yīng)用
SQL> shutdown immediate
SQL> startup
SQL> select database_role,protection_mode,protection_level,open_mode from v$database;
SQL> select process,client_process,sequence#,status from v$managed_standby;
SQL> alter database recover managed standby database using current logfile disconnect from session;
在DG上執(zhí)行:
SQL> select database_role from v$database;
DATABASE_ROLE
----------------
PHYSICAL STANDBY
物理備庫(kù)。
SQL> select status from v$instance;STATUS
------------
MOUNTED
原本DG是mount狀態(tài)。
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
Database altered.
斷應(yīng)用同步。
SQL> alter database open read only;
Database altered.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;
Database altered.
開(kāi)啟應(yīng)用同步。
SQL> select RECOVERY_MODE from v$archive_dest_status where rownum<5;
RECOVERY_MODE
-----------------------
MANAGED REAL TIME APPLY
IDLE
IDLE
IDLE
SQL> SELECT NAME,VALUE,UNIT,TIME_COMPUTED
2 FROM V$DATAGUARD_STATS
3 WHERE NAME IN ('transport lag','apply lag');
NAME VALUE UNIT TIME_COMPUTED
------------- -------------------- ------------------------------ ------------------------------
transport lag +00 00:00:00 day(2) to second(0) interval 05/15/2020 19:41:55
apply lag +00 00:00:00 day(2) to second(0) interval 05/15/2020 19:41:55
主庫(kù)日志信息:
SQL> select thread#, max(sequence#) from v$archived_log group by thread#;
THREAD# MAX(SEQUENCE#)
---------- --------------
1 14
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /data/oracle/oradata/WMSPROD/archivelog
Oldest online log sequence 10
Next log sequence to archive 15
Current log sequence 15
備庫(kù)日志信息:
SQL> select thread#, max(sequence#) from v$archived_log where applied='YES' group by thread#;
THREAD# MAX(SEQUENCE#)
---------- --------------
1 13
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /data/oracle/oradata/WMSPROD/archivelog
Oldest online log sequence 10
Next log sequence to archive 0
Current log sequence 15
主備同步正常。
到此,關(guān)于“Oracle搭建物理DG的方法是什么”的學(xué)習(xí)就結(jié)束了,希望能夠解決大家的疑惑。理論與實(shí)踐的搭配能更好的幫助大家學(xué)習(xí),快去試試吧!若想繼續(xù)學(xué)習(xí)更多相關(guān)知識(shí),請(qǐng)繼續(xù)關(guān)注億速云網(wǎng)站,小編會(huì)繼續(xù)努力為大家?guī)?lái)更多實(shí)用的文章!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。