91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》
  • 首頁 > 
  • 教程 > 
  • 數據庫 > 
  • Rman配置DataGuard 使用主庫未配置時備份 with filesystem

Rman配置DataGuard 使用主庫未配置時備份 with filesystem

發布時間:2020-07-21 16:22:31 來源:網絡 閱讀:828 作者:jason_125 欄目:數據庫

一、    環境

主機名

數據庫版本

dbname

db_unique_name

IP地址

系統版本

Jason1()

 

oracle11204

 

Jason

 

jason1

192.168.1.99

 

rhel6.6_x86_64

jason2()

jason2

192.168.1.100

 

二、    主庫配置

1.  確定主數據庫開啟強制LOGGING模式

[oracle@jason1 ~]$ sqlplus /nolog

 

SQL*Plus: Release 11.2.0.4.0 Production on Thu Jul 14 20:45:33 2016

 

Copyright (c) 1982, 2013, Oracle. All rights reserved.

 

SQL> conn /as sysdba

Connected.

 

SQL> ALTER DATABASE FORCE LOGGING;

 

Database altered.

 

SQL> select force_logging from v$database;

 

FOR

---

YES

2.  開啟歸檔

SQL> archive log list;

Database log mode             Archive Mode

Automatic archival            Enabled

Archive destination           USE_DB_RECOVERY_FILE_DEST

Oldest online log sequence     3

Next log sequence to archive   5

Current log sequence           5

SQL> select group#,bytes/1024/1024 from v$log;

 

    GROUP# BYTES/1024/1024

---------- ---------------

         1              50

         3              50

         2              50

3.  備份主庫

創建備份存放目錄,使用如下腳本備份主庫。

mkdir  /data

chown oracle:oinstall /data

 

run

{

backup database include current controlfile

format '/data/fulldb_%U.bak'

plus archivelog

format '/data/arch_%U.bak';

}

備份結束后手工切換產生歸檔日志,模擬一天的歸檔量然后開始配置主庫DG參數。

4.  創建standby日志組

1).standby redo log的文件大小與primary 數據庫online redo log 文件大小相同

2).standby redo log日志文件組的個數依照下面的原則進行計算

    Standby redo log組數公式>=(每個instance日志組個數+1)*instance個數

    例如在我的環境中,只有一個節點,這個節點有三組redo,所以

    Standby redo log組數公式>=(3+1)*1  == 4

    所以需要創建4組Standby redo log

3).每一日志組為了安全起見,可以包含多個成員文件。

查看主數據庫的日志組個數與大小,創建standy日志組,大小不能小于在線日志大小。

SQL> select member from v$logfile;

 

MEMBER

--------------------------------------------------------------------------------

/u01/app/oracle/oradata/JASON/redo03.log

/u01/app/oracle/oradata/JASON/redo02.log

/u01/app/oracle/oradata/JASON/redo01.log

 

在主數據庫創建standby日志組,位置與原日志組相同的路徑。

SQL> ALTER DATABASE ADD STANDBY LOGFILE('/u01/app/oracle/oradata/JASON/standby01.log') SIZE 50M;

 

Database altered.

 

SQL> ALTER DATABASE ADD STANDBY LOGFILE ('/u01/app/oracle/oradata/JASON/standby02.log')SIZE 50M;

 

Database altered.

 

SQL> ALTER DATABASE ADD STANDBY LOGFILE('/u01/app/oracle/oradata/JASON/standby03.log') SIZE 50M;

 

Database altered.

 

SQL> ALTER DATABASE ADD STANDBY LOGFILE ('/u01/app/oracle/oradata/JASON/standby04.log')SIZE 50M;

 

Database altered.

SQL> select group#,status,type,member from v$logfile;

 

    GROUP# STATUS  TYPE   MEMBER

------------------------------------------------------------------------------------------------------------------------------

         3         ONLINE /u01/app/oracle/oradata/JASON/redo03.log

         2         ONLINE /u01/app/oracle/oradata/JASON/redo02.log

         1         ONLINE /u01/app/oracle/oradata/JASON/redo01.log

         4         STANDBY /u01/app/oracle/oradata/JASON/standby01.log

         5         STANDBY/u01/app/oracle/oradata/JASON/standby02.log

         6         STANDBY/u01/app/oracle/oradata/JASON/standby03.log

         7         STANDBY/u01/app/oracle/oradata/JASON/standby04.log

7 rows selected.

5.  主庫參數文件配置

在主庫上修改dataguard配置相關的各個參數,各參數的具體含義可以參考oracle在線文檔。

SQL> alter system set LOG_ARCHIVE_CONFIG='DG_CONFIG=(JASON1,JASON2)'SCOPE=SPFILE;

 

System altered.

 

SQL> alter system set DB_UNIQUE_NAME='JASON1' SCOPE=SPFILE;

 

System altered.

 

SQL> alter system set STANDBY_FILE_MANAGEMENT='AUTO' SCOPE=SPFILE;

 

System altered.

 

SQL> alter system setLOG_ARCHIVE_DEST_1='LOCATION=/u01/app/oracle/archivelog/VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=JASON1' scope=spfile;

 

System altered.

 

SQL> alter system set LOG_ARCHIVE_DEST_2='SERVICE=JASON2 ASYNCVALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=JASON2' scope=spfile;

 

System altered.

 

SQL> alter system set LOG_ARCHIVE_DEST_STATE_1='ENABLE' scope=spfile;

 

System altered.

 

SQL> alter system set LOG_ARCHIVE_DEST_STATE_2='ENABLE' scope=spfile;

 

System altered.

SQL> alter system  setLOG_FILE_NAME_CONVERT= '/u01/app/oracle/oradata/JASON','/u01/app/oracle/oradata/JASON' scope=spfile;

 

System altered.

SQL> alter system set FAL_SERVER='JASON2' scope=spfile;

 

System altered.

 

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup

ORACLE instance started.

 

Total System Global Area 409194496 bytes

Fixed Size                 2253744 bytes

Variable Size            310381648 bytes

Database Buffers          92274688 bytes

Redo Buffers               4284416 bytes

Database mounted.

Database opened.

6.  配置監聽及tnsname

創建監聽及tnsname.ora,監聽必須使用靜態監聽,如下:

[oracle@jason1 admin]$ cat listener.ora

# listener.ora Network Configuration File:/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

# Generated by Oracle configuration tools.

 

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (GLOBAL_DBNAME = JASON1)

      (ORACLE_HOME =/u01/app/oracle/product/11.2.0/dbhome_1)

      (SID_NAME = JASON)

    )

  )

 

LISTENER =

  (DESCRIPTION =

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

  )

 

ADR_BASE_LISTENER = /u01/app/oracle

 

[oracle@jason1 admin]$ cat tnsnames.ora

# tnsnames.ora Network Configuration File:/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.

 

JASON1 =

  (DESCRIPTION =

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

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = JASON1)

    )

  )

JASON2 =

  (DESCRIPTION =

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

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = JASON2)

    )

  )

[oracle@jason1 admin]$lsnrctl status

 

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 20-JUL-201623:06:17

 

Copyright (c) 1991, 2013, Oracle. All rights reserved.

 

Connecting to(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=jason1)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNRfor Linux: Version 11.2.0.4.0 - Production

Start Date               20-JUL-2016 22:50:04

Uptime                    0 days 0hr. 16 min. 13 sec

Trace Level               off

Security                  ON:Local OS Authentication

SNMP                      OFF

Listener Parameter File  /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

Listener Log File        /u01/app/oracle/diag/tnslsnr/jason1/listener/alert/log.xml

Listening Endpoints Summary...

 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=jason1)(PORT=1521)))

Services Summary...

Service "JASON1" has 2 instance(s).

  Instance "JASON",status UNKNOWN, has 1 handler(s) for this service...

  Instance "JASON",status READY, has 1 handler(s) for this service...

Service "JASONXDB" has 1 instance(s).

  Instance "JASON",status READY, has 1 handler(s) for this service...

The command completed successfully

[oracle@jason1 admin]$

7.  生成pfile文件,同步相應文件至備庫

在主數據庫生成pfile文件。

SQL> create pfile from spfile;

File created.

把dbs下的內容同步到standby主機上面,

[oracle@jason1 dbs]$ pwd

/u01/app/oracle/product/11.2.0/dbhome_1/dbs

[oracle@jason1 dbs]$ scp initJASON.ora orapwJASON192.168.1.100:/u01/app/oracle/product/11.2.0/dbhome_1/dbs/

The authenticity of host '192.168.1.100 (192.168.1.100)' can't beestablished.

RSA key fingerprint is 25:ca:65:90:d3:30:fa:68:ed:11:64:b2:0e:b0:39:a7.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added '192.168.1.100' (RSA) to the list of knownhosts.

oracle@192.168.1.100's password:   

initJASON.ora                                                                                       100% 1415     1.4KB/s   00:00       

orapwJASON                                                                                          100% 1536     1.5KB/s   00:00   

[oracle@jason1 dbs]

三、    備庫配置

8.  創建對應目錄

備庫上創建相關目錄

[oracle@jason2 oracle]$ mkdir -p /u01/app/oracle/admin/JASON/adump

[oracle@jason2 oracle]$ mkdir -p /u01/app/oracle/admin/JASON/dpdump

[oracle@jason2 oracle]$ mkdir -p /u01/app/oracle/admin/JASON/pfile

[oracle@jason2 oracle]$ mkdir -p /u01/app/oracle/archivelog

[oracle@jason2 oracle]$ mkdir -p /u01/app/oracle/oradata/JASON

[oracle@jason2 oracle]$ mkdir -p /u01/app/oracle/fast_recovery_area

[oracle@jason2 oracle]$ mkdir -p /u01/app/oracle/cfgtoollogs/catbundle

[oracle@jason2 oracle]$ mkdir -p /u01/app/oracle/cfgtoollogs/dbca/JASON

[oracle@jason2 oracle]$ mkdir -p /u01/app/oracle/cfgtoollogs/emca

[oracle@jason2 oracle]$ mkdir -p /u01/app/oracle/cfgtoollogs/netca

[oracle@jason2 oracle]$ ll

total 32

drwxr-xr-x  3 oracle oinstall 4096Jul 14 22:27 admin

drwxr-xr-x  2 oracle oinstall 4096Jul 14 22:28 archivelog

drwxr-xr-x  6 oracle oinstall 4096Jul 14 22:32 cfgtoollogs

drwxr-xr-x  2 oracle oinstall 4096Jul 13 23:32 checkpoints

drwxrwxr-x 11 oracle oinstall 4096 Jul 13 23:06 diag

drwxr-xr-x  2 oracle oinstall 4096Jul 14 22:30 fast_recovery_area

drwxr-xr-x  3 oracle oinstall 4096Jul 14 22:28 oradata

drwxr-xr-x  3 oracle oinstall 4096Jul 13 21:37 product

[oracle@jason2 oracle]$

9.  拷貝數據庫備份

[oracle@jason2 oracle]#mkdir  /data

[oracle@jason2 oracle]#chownoracle:oinstall /data

在節點jason1上拷貝數據庫備份至備機。

[oracle@jason1 data]$ scp * 192.168.1.100:/data

oracle@192.168.1.100's password:

arch_01rbevvh_1_1.bak                                                                               100%   96MB  23.9MB/s  00:04   

arch_04rbf01l_1_1.bak                                                                               100%   31KB 31.0KB/s   00:00   

fulldb_02rbevvp_1_1.bak                                                                             100% 1035MB  16.4MB/s   01:03   

fulldb_03rbf01i_1_1.bak                                                                             100%9600KB   9.4MB/s   00:00   

[oracle@jason1 data]$

10.備庫參數文件配置

備庫上修改初始參數文件,配置DG所需參數如下。

JASON.__db_cache_size=75497472

JASON.__java_pool_size=4194304

JASON.__large_pool_size=71303168

JASON.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment

JASON.__pga_aggregate_target=155189248

JASON.__sga_target=255852544

JASON.__shared_io_pool_size=0

JASON.__shared_pool_size=96468992

JASON.__streams_pool_size=0

*.audit_file_dest='/u01/app/oracle/admin/JASON/adump'

*.audit_trail='db'

*.compatible='11.2.0.4.0'

*.control_files='/u01/app/oracle/oradata/JASON/control01.ctl','/u01/app/oracle/oradata/JASON/control02.ctl','/u01/app/oracle/oradata/JASON/control03.ctl'

*.db_block_size=8192

*.db_domain=''

*.db_name='JASON'

*.db_recovery_file_dest_size=4385144832

*.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'

*.log_file_name_convert='/u01/app/oracle/oradata/JASON','/u01/app/oracle/oradata/JASON'

*.db_unique_name='JASON2'

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

*.dispatchers='(PROTOCOL=TCP) (SERVICE=JASONXDB)'

*.fal_server='JASON1'

*.log_archive_config='DG_CONFIG=(JASON1,JASON2)'

*.log_archive_dest_1='LOCATION=/u01/app/oracle/archivelog/VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=JASON2'

*.log_archive_dest_2='SERVICE=JASON1 ASYNCVALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=JASON1'

*.log_archive_dest_state_1='ENABLE'

*.log_archive_dest_state_2='ENABLE'

*.log_archive_format='%t_%s_%r.dbf'

*.memory_target=411041792

*.open_cursors=300

*.processes=150

*.remote_login_passwordfile='EXCLUSIVE'

*.standby_file_management='AUTO'

*.undo_tablespace='UNDOTBS1

11.配置監聽

備庫監聽必須設置為靜態監聽

[oracle@jason2 admin]$ cat listener.ora

# listener.ora Network Configuration File:/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

# Generated by Oracle configuration tools.

 

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (GLOBAL_DBNAME = JASON2)

      (ORACLE_HOME =/u01/app/oracle/product/11.2.0/dbhome_1)

      (SID_NAME = JASON)

    )

  )

 

LISTENER =

  (DESCRIPTION =

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

  )

 

ADR_BASE_LISTENER = /u01/app/oracle

 

[oracle@jason2 admin]$ cat tnsnames.ora

# tnsnames.ora Network Configuration File:/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.

 

JASON1 =

  (DESCRIPTION =

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

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = JASON1)

    )

  )

JASON2 =

  (DESCRIPTION =

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

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = JASON2)

    )

  )

 

12.創建spfile文件                                                                               

[oracle@jason2 dbs]$ sqlplus /nolog

 

SQL*Plus: Release 11.2.0.4.0 Production on Thu Jul 14 23:07:22 2016

 

Copyright (c) 1982, 2013, Oracle. All rights reserved.

 

SQL> conn /as sysdba

Connected to an idle instance.

 

SQL> startup nomount

ORACLE instance started.

 

Total System Global Area 409194496 bytes

Fixed Size                 2253744 bytes

Variable Size            310381648 bytes

Database Buffers           92274688bytes

Redo Buffers               4284416 bytes

SQL> create spfile from pfile;

 

File created.

13.創建備庫

將備庫啟動到nomount狀態,然后在備機連接主庫進行duplicate操作。

SQL> shutdown immediate

ORA-01507: database not mounted

ORACLE instance shut down.

SQL> startup nomount;

ORACLE instance started.

 

Total System Global Area 409194496 bytes

Fixed Size                 2253744 bytes

Variable Size            310381648 bytes

Database Buffers          92274688 bytes

Redo Buffers               4284416 bytes

SQL> exit

Disconnected from Oracle Database 11g Enterprise Edition Release11.2.0.4.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testingoptions

[oracle@jason2 ~]$lsnrctl status

 

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 20-JUL-2016 23:04:56

 

Copyright (c) 1991, 2013, Oracle. All rights reserved.

 

Connecting to(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=jason2)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNRfor Linux: Version 11.2.0.4.0 - Production

Start Date               20-JUL-2016 22:50:42

Uptime                    0 days 0hr. 14 min. 14 sec

Trace Level               off

Security                  ON:Local OS Authentication

SNMP                      OFF

Listener Parameter File  /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

Listener Log File        /u01/app/oracle/diag/tnslsnr/jason2/listener/alert/log.xml

Listening Endpoints Summary...

 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=jason2)(PORT=1521)))

Services Summary...

Service "JASON2" has 2 instance(s).

  Instance "JASON",status UNKNOWN, has 1 handler(s) for this service...

  Instance "JASON",status BLOCKED, has 1 handler(s) for this service...

The command completed successfully

[oracle@jason2 ~]$ rman target sys/system@JASON1 auxiliarysys/system@JASON2

 

Recovery Manager: Release 11.2.0.4.0 - Production on Sat Jul 23 23:13:192016

 

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

 

connected to target database: JASON (DBID=2141348976)

connected to auxiliary database: JASON (not mounted)

 

RMAN> duplicate target database for standby nofilenamecheck;

 

Starting Duplicate Db at 23-JUL-16

using target database control file instead of recovery catalog

allocated channel: ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: SID=18 device type=DISK

 

contents of Memory Script:

{

   restore clone standbycontrolfile;

}

executing Memory Script

 

Starting restore at 23-JUL-16

using channel ORA_AUX_DISK_1

 

channel ORA_AUX_DISK_1: starting datafile backup set restore

channel ORA_AUX_DISK_1: restoring control file

channel ORA_AUX_DISK_1: reading from backup piece/data/fulldb_03rbf01i_1_1.bak

channel ORA_AUX_DISK_1: piece handle=/data/fulldb_03rbf01i_1_1.baktag=TAG20160723T224513

channel ORA_AUX_DISK_1: restored backup piece 1

channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03

output file name=/u01/app/oracle/oradata/JASON/control01.ctl

output file name=/u01/app/oracle/oradata/JASON/control02.ctl

output file name=/u01/app/oracle/oradata/JASON/control03.ctl

Finished restore at 23-JUL-16

 

contents of Memory Script:

{

   sql clone 'alter database mountstandby database';

}

executing Memory Script

 

sql statement: alter database mount standby database

 

contents of Memory Script:

{

   set newname for tempfile  1 to

 "/u01/app/oracle/oradata/JASON/temp01.dbf";

   switch clone tempfile all;

   set newname for datafile  1 to

 "/u01/app/oracle/oradata/JASON/system01.dbf";

   set newname for datafile  2 to

 "/u01/app/oracle/oradata/JASON/sysaux01.dbf";

   set newname for datafile  3 to

 "/u01/app/oracle/oradata/JASON/undotbs01.dbf";

   set newname for datafile  4 to

 "/u01/app/oracle/oradata/JASON/users01.dbf";

   restore

   clone database

   ;

}

executing Memory Script

 

executing command: SET NEWNAME

 

renamed tempfile 1 to /u01/app/oracle/oradata/JASON/temp01.dbf incontrol file

 

executing command: SET NEWNAME

 

executing command: SET NEWNAME

 

executing command: SET NEWNAME

 

executing command: SET NEWNAME

 

Starting restore at 23-JUL-16

using channel ORA_AUX_DISK_1

 

channel ORA_AUX_DISK_1: starting datafile backup set restore

channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backupset

channel ORA_AUX_DISK_1: restoring datafile 00001 to/u01/app/oracle/oradata/JASON/system01.dbf

channel ORA_AUX_DISK_1: restoring datafile 00002 to/u01/app/oracle/oradata/JASON/sysaux01.dbf

channel ORA_AUX_DISK_1: restoring datafile 00003 to/u01/app/oracle/oradata/JASON/undotbs01.dbf

channel ORA_AUX_DISK_1: restoring datafile 00004 to/u01/app/oracle/oradata/JASON/users01.dbf

channel ORA_AUX_DISK_1: reading from backup piece/data/fulldb_02rbevvp_1_1.bak

channel ORA_AUX_DISK_1: piece handle=/data/fulldb_02rbevvp_1_1.baktag=TAG20160723T224513

channel ORA_AUX_DISK_1: restored backup piece 1

channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:58

Finished restore at 23-JUL-16

 

contents of Memory Script:

{

   switch clone datafile all;

}

executing Memory Script

 

datafile 1 switched to datafile copy

input datafile copy RECID=1 STAMP=917998157 filename=/u01/app/oracle/oradata/JASON/system01.dbf

datafile 2 switched to datafile copy

input datafile copy RECID=2 STAMP=917998157 filename=/u01/app/oracle/oradata/JASON/sysaux01.dbf

datafile 3 switched to datafile copy

input datafile copy RECID=3 STAMP=917998157 filename=/u01/app/oracle/oradata/JASON/undotbs01.dbf

datafile 4 switched to datafile copy

input datafile copy RECID=4 STAMP=917998157 filename=/u01/app/oracle/oradata/JASON/users01.dbf

Finished Duplicate Db at 23-JUL-16

RMAN> exit

Recovery Manager complete.

[oracle@jason2 ~]$

14.創建standby日志組

查看主數據庫的日志組個數與大小,創建standy日志組,大小不能小于在線日志大小。

SQL> select member from v$logfile;

 

MEMBER

--------------------------------------------------------------------------------

/u01/app/oracle/oradata/JASON/redo03.log

/u01/app/oracle/oradata/JASON/redo02.log

/u01/app/oracle/oradata/JASON/redo01.log

 

在備數據庫創建standby日志組,位置與原日志組相同的路徑。

SQL> ALTER DATABASE ADD STANDBY LOGFILE('/u01/app/oracle/oradata/JASON/standby01.log') SIZE 50M;

 

Database altered.

 

SQL> ALTER DATABASE ADD STANDBY LOGFILE('/u01/app/oracle/oradata/JASON/standby02.log') SIZE 50M;

 

Database altered.

 

SQL> ALTER DATABASE ADD STANDBY LOGFILE('/u01/app/oracle/oradata/JASON/standby03.log') SIZE 50M;

 

Database altered.

 

SQL> ALTER DATABASE ADD STANDBY LOGFILE('/u01/app/oracle/oradata/JASON/standby04.log') SIZE 50M;

 

Database altered.

SQL>

備注:創建備庫后,數據庫處于mount狀態,因使用未配置的主庫創建備庫,需創建standby日志組后,打開數據庫。打開時將會初始化臨時表空間、在線日志、standby日志,接收未傳送的日志。

15.開啟ADG

將備庫置于active dataguard模式下,數據庫open時將會傳送所有自備份后產生的歸檔日志至備機。

[oracle@jason2 ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.4.0 Production on Thu Jul 14 23:42:40 2016

 

Copyright (c) 1982, 2013, Oracle. All rights reserved.

 

SQL> conn /as sysdba

Connected.

SQL> alter database open;

 

Database altered.

 

SQL> alter database recover managed standby database using currentlogfile disconnect from session;

 

Database altered.

 

SQL> select open_mode,database_role,db_unique_name from v$database;

 

OPEN_MODE           DATABASE_ROLE    DB_UNIQUE_NAME

-------------------- ---------------- ------------------------------

READ ONLY WITH APPLY PHYSICAL STANDBY JASON2

 

SQL> select protection_mode,protection_level from v$database;

 

PROTECTION_MODE     PROTECTION_LEVEL

-------------------- --------------------

MAXIMUM PERFORMANCE  MAXIMUMPERFORMANCE

SQL> select status from v$standby_log;

 

STATUS

----------

ACTIVE

UNASSIGNED

UNASSIGNED

UNASSIGNED

SQL> select group#,status,type,member from v$logfile;

  GROUP# STATUS  TYPE   MEMBER

-------------------------------------------------------------------------------

         3         ONLINE /u01/app/oracle/oradata/JASON/redo03.log

         2         ONLINE /u01/app/oracle/oradata/JASON/redo02.log

         1         ONLINE /u01/app/oracle/oradata/JASON/redo01.log

         4         STANDBY/u01/app/oracle/oradata/JASON/standby01.log

         5         STANDBY/u01/app/oracle/oradata/JASON/standby02.log

         6         STANDBY /u01/app/oracle/oradata/JASON/standby03.log

         7         STANDBY/u01/app/oracle/oradata/JASON/standby04.log

 

7 rows selected.

SQL>

查看備庫數據文件,如下:

[root@jason2 JASON]# ll

total 1744852

-rw-r----- 1 oracle oinstall  9748480 Jul 21 00:11 control01.ctl

-rw-r----- 1 oracle oinstall  9748480 Jul 21 00:11 control02.ctl

-rw-r----- 1 oracle oinstall  9748480 Jul 21 00:11 control03.ctl

-rw-r----- 1 oracle oinstall 52429312 Jul 21 00:06 redo01.log

-rw-r----- 1 oracle oinstall 52429312 Jul 21 00:06 redo02.log

-rw-r----- 1 oracle oinstall 52429312 Jul 21 00:06 redo03.log

-rw-r----- 1 oracle oinstall 52429312 Jul 21 00:11 standby01.log

-rw-r----- 1 oracle oinstall 52429312 Jul 21 00:09 standby02.log

-rw-r----- 1 oracle oinstall 52429312 Jul 21 00:07 standby03.log

-rw-r----- 1 oracle oinstall 52429312 Jul 21 00:07 standby04.log

-rw-r----- 1 oracle oinstall 534781952 Jul 21 00:09 sysaux01.dbf

-rw-r----- 1 oracle oinstall 775954432 Jul 21 00:09 system01.dbf

-rw-r----- 1 oracle oinstall 30416896 Jul 21 00:09 temp01.dbf

-rw-r----- 1 oracle oinstall 73408512 Jul 21 00:09 undotbs01.dbf

-rw-r----- 1 oracle oinstall  5251072 Jul 21 00:09 users01.dbf

[root@jason2 JASON]#

主庫查看數據庫狀態

SQL> select open_mode,database_role,db_unique_name from v$database;

 

OPEN_MODE            DATABASE_ROLE    DB_UNIQUE_NAME

-------------------- ---------------- ------------------------------

READ WRITE           PRIMARY          JASON1

 

SQL> select protection_mode,protection_level from v$database;

 

PROTECTION_MODE     PROTECTION_LEVEL

-------------------- --------------------

MAXIMUM PERFORMANCE  MAXIMUMPERFORMANCE

四、    測試

16.switch_over測試

主庫切換

SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;

 

SWITCHOVER_STATUS

--------------------

TO STANDBY

 

SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBYWITH SESSION SHUTDOWN;

 

Database altered.

 

SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;

SELECT SWITCHOVER_STATUS FROM V$DATABASE

*

ERROR at line 1:

ORA-01034: ORACLE not available

Process ID: 2849

Session ID: 44 Serial number: 27

 

SQL> startup

ORACLE instance started.

 

Total System Global Area 409194496 bytes

Fixed Size                 2253744 bytes

Variable Size            322964560 bytes

Database Buffers          79691776 bytes

Redo Buffers               4284416 bytes

Database mounted.

Database opened.

SQL> select open_mode,database_role,db_unique_name fromv$database;

 

OPEN_MODE           DATABASE_ROLE    DB_UNIQUE_NAME

-------------------- ----------------------------------------------

READ ONLY           PHYSICAL STANDBY JASON1

 

 

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USINGCURRENT LOGFILE DISCONNECT FROM SESSION;

 

Database altered.

 

SQL>                   

 

備庫切換

SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;

 

SWITCHOVER_STATUS

--------------------

TO PRIMARY

 

SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WITHSESSION SHUTDOWN;

 

Database altered.

 

SQL> select open_mode,database_role,db_unique_name fromv$database;

 

OPEN_MODE           DATABASE_ROLE    DB_UNIQUE_NAME

-------------------- ---------------- ------------------------------

MOUNTED             PRIMARY          JASON2

 

SQL> alter database open;

 

Database altered.

 

SQL> select open_mode,database_role,db_unique_name fromv$database;

 

OPEN_MODE           DATABASE_ROLE    DB_UNIQUE_NAME

-------------------- ----------------------------------------------

READ WRITE          PRIMARY          JASON2

 

SQL>

五、    報錯處理

17.  報錯

在備庫服務器, 添加靜態注冊信息到 $GRID_HOME/network/listener.ora文件,

這主要是由于AUXILIARY實例啟動到nomount狀態時,listener無法注冊AUXILIARY實例,listener會標志Auxiliary實例為'blocked'狀態,因此duplicate命令就無法通過TNS的方式連接到Auxiliary實例,為了解決這個問題,需要先手動靜態注冊數據庫實例到listener上。當Data Guard配置完成后,就可以刪除靜態注冊的配置信息

[oracle@jason2 dbs]$ rman target sys/system@JASON_PD auxiliarysys/system@JASON_SD

 

Recovery Manager: Release 11.2.0.4.0 - Production on Thu Jul 14 23:15:312016

 

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

 

connected to target database: JASON (DBID=2141348976)

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-00554: initialization of internal recovery manager package failed

RMAN-04006: error from auxiliary database: ORA-12528: TNS:listener: allappropriate instances are blocking new connections

設置靜態監聽后狀態

[oracle@jason2 dbs]$ lsnrctl status

 

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 14-JUL-201623:15:50

 

Copyright (c) 1991, 2013, Oracle. All rights reserved.

 

Connecting to(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.100)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNRfor Linux: Version 11.2.0.4.0 - Production

Start Date               14-JUL-2016 22:41:05

Uptime                    0 days 0hr. 34 min. 44 sec

Trace Level               off

Security                  ON:Local OS Authentication

SNMP                      OFF

Listener Parameter File  /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

Listener Log File        /u01/app/oracle/diag/tnslsnr/jason2/listener/alert/log.xml

Listening Endpoints Summary...

 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.100)(PORT=1521)))

 (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Services Summary...

Service "JASON2" has 1 instance(s).

  Instance "JASON",status BLOCKED, has 1 handler(s) for this service...

The command completed successfully

[oracle@jason2 dbs]$

六、    創建備庫時主備庫變化

本次實驗中使用主庫未配置前的rman備份進行創建DG。模擬備份為前一天的備份。數據庫備份結束日志序號為17.然后通過手工切換模擬備份后一天產生的歸檔日志,最終日志序號為54。以下為主庫日志查詢結果。

SQL> SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG ORDER BYSEQUENCE#;

 

 SEQUENCE# APPLIED

---------- ---------

         7 NO

         8 NO

         9 NO

        10 NO

        11 NO

        12 NO

        13 NO

        14 NO

        15 NO

        16 NO

        17 NO

 

 SEQUENCE# APPLIED

---------- ---------

        18 NO

        19 NO

        20 NO

        21 NO

        22 NO

        23 NO

        24 NO

        25 NO

        26 NO

        27 NO

        28 NO

 

 SEQUENCE# APPLIED

---------- ---------

        29 NO

        30 NO

        31 NO

        32 NO

        33 NO

        34 NO

        35 NO

        36 NO

        37 NO

        38 NO

        39 NO

 

 SEQUENCE# APPLIED

---------- ---------

        40 NO

        41 NO

        42 NO

        43 NO

        44 NO

        45 NO

        46 NO

        47 NO

        48 NO

        49 NO

        50 NO

 

 SEQUENCE# APPLIED

---------- ---------

        51 NO

        52 NO

        53 NO

        54 NO

 

48 rows selected.

SQL>

在主庫傳送rman備份至備庫中,備份位置必須與主庫相同。然后在備庫進行恢復數據庫。恢復結束后,在備庫創建standby日志組,創建結束后執行alter database open命令打開備庫。這時從備庫日志中可以發現在備庫打開時,自備份結束后產生的所有歸檔日志文件(歸檔日志必須保證存在)自動傳送到備庫中。這時再主庫再次查看日志會發現日志中顯示歸檔日志已傳送,但未應用。

如下為日志變化過程:

SQL> /

 

 SEQUENCE# APPLIED

---------- ---------

         7 NO

         8 NO

         9 NO

        10 NO

        11 NO

        12 NO

        13 NO

        14 NO

        15 NO

        16 NO

        17 NO

 

 SEQUENCE# APPLIED

---------- ---------

        17 NO

        18 NO

        18 NO

        19 NO

        19 NO

        20 NO

        20 NO

        21 NO

        21 NO

        22 NO

        22 NO

 

 SEQUENCE# APPLIED

---------- ---------

        23 NO

        23 NO

        24 NO

        24 NO

        25 NO

        25 NO

        26 NO

        26 NO

        27 NO

        27 NO

        28 NO

 

 SEQUENCE# APPLIED

---------- ---------

        28 NO

        29 NO

        29 NO

        30 NO

        30 NO

        31 NO

        31 NO

        32 NO

        32 NO

        33 NO

        33 NO

 

 SEQUENCE# APPLIED

---------- ---------

        34 NO

        34 NO

        35 NO

        35 NO

        36 NO

        36 NO

        37 NO

        37 NO

        38 NO

        38 NO

        39 NO

 

 SEQUENCE# APPLIED

---------- ---------

        39 NO

        40 NO

        40 NO

        41 NO

        41 NO

        42 NO

        42 NO

        43 NO

        43 NO

        44 NO

        44 NO

 

 SEQUENCE# APPLIED

---------- ---------

        45 NO

        45 NO

        46 NO

        46 NO

        47 NO

        47 NO

        48 NO

        48 NO

        49 NO

        49 NO

        50 NO

 

 SEQUENCE# APPLIED

---------- ---------

        50 NO

        51 NO

        51 NO

        52 NO

        52 NO

        53 NO

        53 NO

        54 NO

        54 NO

        55 NO

        55 NO

 

 SEQUENCE# APPLIED

---------- ---------

        56 NO

        56 NO

90 rows selected.

SQL>

接著在備庫開啟日志實時應用,執行alter database recover managed standby database using current logfiledisconnect from session;

該命令執行時,在備庫日志中可以發現MRP0開始應用所有歸檔日志進行數據恢復,直到最新日志。具體變化可以查看如下主庫與備庫的日志。

備注:也可以在數據庫處于掛載狀態下執行日志恢復,追平并應用日志之后再打開數據庫。

ALTERDATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROMSESSION;

alterdatabase recover managed standby database cancel;

alterdatabase open

ALTERDATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROMSESSION;

 

主庫日志

[root@jason1 trace]# tail -f alert_JASON.log

Sat Jul 23 23:27:56 2016

PING[ARC2]: Heartbeat failed to connect to standby 'JASON2'. Error is16058.

Sat Jul 23 23:28:31 2016

Using STANDBY_ARCHIVE_DEST parameter default value as/u01/app/oracle/archivelog/

ALTER SYSTEM SET log_archive_dest_state_2='ENABLE' SCOPE=MEMORY SID='*';

Sat Jul 23 23:28:31 2016

PING[ARC2]: Heartbeat failed to connect to standby 'JASON2'. Error is16058.

Sat Jul 23 23:28:36 2016

Thread 1 advanced to log sequence 56 (LGWR switch)

  Current log# 2 seq# 56 mem# 0:/u01/app/oracle/oradata/JASON/redo02.log

Sat Jul 23 23:28:36 2016

Archived Log entry 52 added for thread 1 sequence 55 ID 0x7fa28a70 dest1:

Sat Jul 23 23:31:57 2016

ALTER SYSTEM SET log_archive_dest_state_2='ENABLE' SCOPE=MEMORY SID='*';

Sat Jul 23 23:31:58 2016

ARC3: Archive log rejected (thread 1 sequence 17) at host 'JASON2'

FAL[server, ARC3]: FAL archive failed, see trace file.

ARCH: FAL archive failed. Archiver continuing

ORACLE Instance JASON - Archival Error. Archiver continuing.

Sat Jul 23 23:32:00 2016

Thread 1 advanced to log sequence 57 (LGWR switch)

  Current log# 3 seq# 57 mem# 0:/u01/app/oracle/oradata/JASON/redo03.log

Sat Jul 23 23:32:00 2016

******************************************************************

LGWR: Setting 'active' archival for destination LOG_ARCHIVE_DEST_2

******************************************************************

LNS: Standby redo logfile selected for thread 1 sequence 57 fordestination LOG_ARCHIVE_DEST_2

Sat Jul 23 23:32:01 2016

Expanded controlfile section 11 from 66 to 153 records

Requested to grow by 87 records; added 3 blocks of records

Sat Jul 23 23:32:01 2016

Archived Log entry 73 added for thread 1 sequence 56 ID 0x7fa28a70 dest1:

備庫日志

[root@jason2 trace]# tail -f alert_JASON.log

Sat Jul 23 23:11:43 2016

Using STANDBY_ARCHIVE_DEST parameter default value as /u01/app/oracle/archivelog/

Sat Jul 23 23:27:44 2016

destination database instance is 'started' not 'mounted'

Sat Jul 23 23:28:08 2016

Conversion to standby controlfile pending for restored file

No controlfile conversion

Sat Jul 23 23:28:11 2016

RFS connections have been disallowed

alter database mount standby database

Converting controlfile to standby

If db_file_name_convert or log_file_name_convert parameters

are not used, then RMAN intervention is required to fix the

file names in the converted control file. Refer to RMAN

documentation for how to fix all file names.

Clearing standby activation ID 2141358704 (0x7fa28a70)

The primary database controlfile was created using the

'MAXLOGFILES 16' clause.

There is space for up to 13 standby redo logfiles

Use the following SQL commands on the standby database to create

standby redo logfiles that match the primary database:

ALTER DATABASE ADD STANDBY LOGFILE 'srl1.f' SIZE 52428800;

ALTER DATABASE ADD STANDBY LOGFILE 'srl2.f' SIZE 52428800;

ALTER DATABASE ADD STANDBY LOGFILE 'srl3.f' SIZE 52428800;

ALTER DATABASE ADD STANDBY LOGFILE 'srl4.f' SIZE 52428800;

Set as converted control file due to db_unique_name mismatch

Changing di2dbun from JASON1 to JASON2

ARCH: STARTING ARCH PROCESSES

Sat Jul 23 23:28:16 2016

ARC0 started with pid=22, OS id=2774

ARC0: Archival started

ARCH: STARTING ARCH PROCESSES COMPLETE

ARC0: STARTING ARCH PROCESSES

Sat Jul 23 23:28:17 2016

Successful mount of redo thread 1, with mount id 2142218252

Physical Standby Database mounted.

Lost write protection disabled

Sat Jul 23 23:28:17 2016

ARC1 started with pid=23, OS id=2776

Sat Jul 23 23:28:17 2016

ARC2 started with pid=24, OS id=2778

ARC1: Archival started

ARC2: Archival started

ARC1: Becoming the 'no FAL' ARCH

ARC2: Becoming the heartbeat ARCH

ARC2: Becoming the active heartbeat ARCH

Sat Jul 23 23:28:17 2016

ARC3 started with pid=25, OS id=2780

Completed: alter database mount standby database

ARC3: Archival started

ARC0: STARTING ARCH PROCESSES COMPLETE

Sat Jul 23 23:28:19 2016

Full restore complete of datafile 4/u01/app/oracle/oradata/JASON/users01.dbf. Elapsed time: 0:00:00

  checkpoint is 1024819

  last deallocation scn is 3

Errors in file/u01/app/oracle/diag/rdbms/jason2/JASON/trace/JASON_lgwr_2557.trc:

ORA-00313: open failed for members of log group 1 of thread 1

ORA-00312: online log 1 thread 1:'/u01/app/oracle/oradata/JASON/redo01.log'

ORA-27037: unable to obtain file status

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3

Errors in file /u01/app/oracle/diag/rdbms/jason2/JASON/trace/JASON_lgwr_2557.trc:

ORA-00313: open failed for members of log group 1 of thread 1

ORA-00312: online log 1 thread 1:'/u01/app/oracle/oradata/JASON/redo01.log'

ORA-27037: unable to obtain file status

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3

Errors in file/u01/app/oracle/diag/rdbms/jason2/JASON/trace/JASON_lgwr_2557.trc:

ORA-00313: open failed for members of log group 2 of thread 1

ORA-00312: online log 2 thread 1: '/u01/app/oracle/oradata/JASON/redo02.log'

ORA-27037: unable to obtain file status

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3

Errors in file/u01/app/oracle/diag/rdbms/jason2/JASON/trace/JASON_lgwr_2557.trc:

ORA-00313: open failed for members of log group 2 of thread 1

ORA-00312: online log 2 thread 1:'/u01/app/oracle/oradata/JASON/redo02.log'

ORA-27037: unable to obtain file status

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3

Errors in file /u01/app/oracle/diag/rdbms/jason2/JASON/trace/JASON_lgwr_2557.trc:

ORA-00313: open failed for members of log group 3 of thread 1

ORA-00312: online log 3 thread 1:'/u01/app/oracle/oradata/JASON/redo03.log'

ORA-27037: unable to obtain file status

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3

Errors in file/u01/app/oracle/diag/rdbms/jason2/JASON/trace/JASON_lgwr_2557.trc:

ORA-00313: open failed for members of log group 3 of thread 1

ORA-00312: online log 3 thread 1: '/u01/app/oracle/oradata/JASON/redo03.log'

ORA-27037: unable to obtain file status

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3

Sat Jul 23 23:28:24 2016

Warning: VKTM detected a time drift.

Time drifts can result in an unexpected behavior such as time-outs.Please check trace file for more details.

Full restore complete of datafile 3/u01/app/oracle/oradata/JASON/undotbs01.dbf. Elapsed time: 0:00:02

  checkpoint is 1024819

  last deallocation scn is 968786

  Undo Optimization current scn is967371

Sat Jul 23 23:28:59 2016

Full restore complete of datafile 2/u01/app/oracle/oradata/JASON/sysaux01.dbf. Elapsed time: 0:00:38

  checkpoint is 1024819

  last deallocation scn is 964749

Sat Jul 23 23:29:11 2016

Full restore complete of datafile 1/u01/app/oracle/oradata/JASON/system01.dbf. Elapsed time: 0:00:49

  checkpoint is 1024819

  last deallocation scn is 963928

  Undo Optimization current scn is967371

Sat Jul 23 23:29:17 2016

Switch of datafile 1 complete to datafile copy

  checkpoint is 1024819

Switch of datafile 2 complete to datafile copy

  checkpoint is 1024819

Switch of datafile 3 complete to datafile copy

  checkpoint is 1024819

Switch of datafile 4 complete to datafile copy

  checkpoint is 1024819

alter database clear logfile group 1

Clearing online log 1 of thread 1 sequence number 16

Errors in file/u01/app/oracle/diag/rdbms/jason2/JASON/trace/JASON_ora_2710.trc:

ORA-00313: open failed for members of log group 1 of thread 1

ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/JASON/redo01.log'

ORA-27037: unable to obtain file status

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3

Errors in file/u01/app/oracle/diag/rdbms/jason2/JASON/trace/JASON_ora_2710.trc:

ORA-00313: open failed for members of log group 1 of thread 1

ORA-00312: online log 1 thread 1:'/u01/app/oracle/oradata/JASON/redo01.log'

ORA-27037: unable to obtain file status

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3

Completed: alter database clear logfile group 1

alter database clear logfile group 2

Clearing online log 2 of thread 1 sequence number 17

Errors in file/u01/app/oracle/diag/rdbms/jason2/JASON/trace/JASON_ora_2710.trc:

ORA-00313: open failed for members of log group 2 of thread 1

ORA-00312: online log 2 thread 1:'/u01/app/oracle/oradata/JASON/redo02.log'

ORA-27037: unable to obtain file status

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3

Errors in file/u01/app/oracle/diag/rdbms/jason2/JASON/trace/JASON_ora_2710.trc:

ORA-00313: open failed for members of log group 2 of thread 1

ORA-00312: online log 2 thread 1:'/u01/app/oracle/oradata/JASON/redo02.log'

ORA-27037: unable to obtain file status

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3

Completed: alter database clear logfile group 2

alter database clear logfile group 3

Clearing online log 3 of thread 1 sequence number 15

Errors in file/u01/app/oracle/diag/rdbms/jason2/JASON/trace/JASON_ora_2710.trc:

ORA-00313: open failed for members of log group 3 of thread 1

ORA-00312: online log 3 thread 1:'/u01/app/oracle/oradata/JASON/redo03.log'

ORA-27037: unable to obtain file status

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3

Errors in file /u01/app/oracle/diag/rdbms/jason2/JASON/trace/JASON_ora_2710.trc:

ORA-00313: open failed for members of log group 3 of thread 1

ORA-00312: online log 3 thread 1:'/u01/app/oracle/oradata/JASON/redo03.log'

ORA-27037: unable to obtain file status

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3

Completed: alter database clear logfile group 3

RFS connections are allowed

Sat Jul 23 23:30:29 2016

ALTER DATABASE ADD STANDBY LOGFILE('/u01/app/oracle/oradata/JASON/standby01.log') SIZE 50M

Completed: ALTER DATABASE ADD STANDBY LOGFILE('/u01/app/oracle/oradata/JASON/standby01.log') SIZE 50M

Sat Jul 23 23:30:48 2016

ALTER DATABASE ADD STANDBY LOGFILE('/u01/app/oracle/oradata/JASON/standby02.log') SIZE 50M

Completed: ALTER DATABASE ADD STANDBY LOGFILE ('/u01/app/oracle/oradata/JASON/standby02.log')SIZE 50M

Sat Jul 23 23:31:02 2016

ALTER DATABASE ADD STANDBY LOGFILE('/u01/app/oracle/oradata/JASON/standby03.log') SIZE 50M

Completed: ALTER DATABASE ADD STANDBY LOGFILE('/u01/app/oracle/oradata/JASON/standby03.log') SIZE 50M

Sat Jul 23 23:31:17 2016

ALTER DATABASE ADD STANDBY LOGFILE('/u01/app/oracle/oradata/JASON/standby04.log') SIZE 50M

Completed: ALTER DATABASE ADD STANDBY LOGFILE('/u01/app/oracle/oradata/JASON/standby04.log') SIZE 50M

Sat Jul 23 23:31:45 2016

alter database open

AUDIT_TRAIL initialization parameter is changed to OS, as DB is NOTcompatible for database opened with read-only access

Signalling error 1152 for datafile 1!

Beginning Standby Crash Recovery.

Serial Media Recovery started

Managed Standby Recovery starting Real Time Apply

Media Recovery Waiting for thread 1 sequence 17

Sat Jul 23 23:31:45 2016

RFS[1]: Assigned to RFS process 2810

RFS[1]: Opened log for thread 1 sequence 17 dbid 2141348976 branch917134706

Archived Log entry 1 added for thread 1 sequence 17 rlc 917134706 ID0x7fa28a70 dest 2:

Media Recovery Log /u01/app/oracle/archivelog/1_17_917134706.dbf

Incomplete Recovery applied until change 1024865 time 07/23/201622:46:10

Completed Standby Crash Recovery.

Sat Jul 23 23:31:46 2016

SMON: enabling cache recovery

Sat Jul 23 23:31:47 2016

RFS[2]: Assigned to RFS process 2808

RFS[2]: Opened log for thread 1 sequence 19 dbid 2141348976 branch917134706

RFS[1]: Opened log for thread 1 sequence 20 dbid 2141348976 branch917134706

Archived Log entry 2 added for thread 1 sequence 19 rlc 917134706 ID0x7fa28a70 dest 2:

Sat Jul 23 23:31:47 2016

RFS[3]: Assigned to RFS process 2812

RFS[3]: Opened log for thread 1 sequence 18 dbid 2141348976 branch917134706

Archived Log entry 3 added for thread 1 sequence 20 rlc 917134706 ID0x7fa28a70 dest 2:

RFS[2]: Opened log for thread 1 sequence 21 dbid 2141348976 branch917134706

RFS[1]: Opened log for thread 1 sequence 22 dbid 2141348976 branch917134706

Archived Log entry 4 added for thread 1 sequence 22 rlc 917134706 ID0x7fa28a70 dest 2:

Archived Log entry 5 added for thread 1 sequence 21 rlc 917134706 ID0x7fa28a70 dest 2:

Archived Log entry 6 added for thread 1 sequence 18 rlc 917134706 ID0x7fa28a70 dest 2:

RFS[1]: Opened log for thread 1 sequence 23 dbid 2141348976 branch917134706

RFS[2]: Opened log for thread 1 sequence 25 dbid 2141348976 branch917134706

Archived Log entry 7 added for thread 1 sequence 23 rlc 917134706 ID0x7fa28a70 dest 2:

RFS[3]: Opened log for thread 1 sequence 24 dbid 2141348976 branch917134706

Archived Log entry 8 added for thread 1 sequence 25 rlc 917134706 ID0x7fa28a70 dest 2:

Archived Log entry 9 added for thread 1 sequence 24 rlc 917134706 ID0x7fa28a70 dest 2:

RFS[1]: Opened log for thread 1 sequence 26 dbid 2141348976 branch917134706

RFS[3]: Opened log for thread 1 sequence 27 dbid 2141348976 branch917134706

Archived Log entry 10 added for thread 1 sequence 26 rlc 917134706 ID0x7fa28a70 dest 2:

RFS[2]: Opened log for thread 1 sequence 28 dbid 2141348976 branch917134706

Archived Log entry 11 added for thread 1 sequence 27 rlc 917134706 ID0x7fa28a70 dest 2:

Archived Log entry 12 added for thread 1 sequence 28 rlc 917134706 ID0x7fa28a70 dest 2:

RFS[1]: Opened log for thread 1 sequence 29 dbid 2141348976 branch917134706

RFS[3]: Opened log for thread 1 sequence 30 dbid 2141348976 branch917134706

Archived Log entry 13 added for thread 1 sequence 29 rlc 917134706 ID0x7fa28a70 dest 2:

RFS[2]: Opened log for thread 1 sequence 31 dbid 2141348976 branch917134706

Archived Log entry 14 added for thread 1 sequence 30 rlc 917134706 ID0x7fa28a70 dest 2:

RFS[1]: Opened log for thread 1 sequence 32 dbid 2141348976 branch917134706

Archived Log entry 15 added for thread 1 sequence 31 rlc 917134706 ID0x7fa28a70 dest 2:

RFS[3]: Opened log for thread 1 sequence 33 dbid 2141348976 branch917134706

Archived Log entry 16 added for thread 1 sequence 32 rlc 917134706 ID0x7fa28a70 dest 2:

Archived Log entry 17 added for thread 1 sequence 33 rlc 917134706 ID0x7fa28a70 dest 2:

RFS[2]: Opened log for thread 1 sequence 34 dbid 2141348976 branch917134706

RFS[1]: Opened log for thread 1 sequence 35 dbid 2141348976 branch917134706

Archived Log entry 18 added for thread 1 sequence 34 rlc 917134706 ID0x7fa28a70 dest 2:

RFS[3]: Opened log for thread 1 sequence 36 dbid 2141348976 branch917134706

Archived Log entry 19 added for thread 1 sequence 35 rlc 917134706 ID0x7fa28a70 dest 2:

Archived Log entry 20 added for thread 1 sequence 36 rlc 917134706 ID0x7fa28a70 dest 2:

Sat Jul 23 23:31:48 2016

Primary database is in MAXIMUM PERFORMANCE mode

RFS[4]: Assigned to RFS process 2814

RFS[4]: Selected log 4 for thread 1 sequence 57 dbid 2141348976 branch917134706

Sat Jul 23 23:31:50 2016

RFS[5]: Assigned to RFS process 2816

RFS[5]: Opened log for thread 1 sequence 38 dbid 2141348976 branch917134706

Sat Jul 23 23:31:50 2016

RFS[6]: Assigned to RFS process 2820

RFS[6]: Opened log for thread 1 sequence 39 dbid 2141348976 branch917134706

Archived Log entry 21 added for thread 1 sequence 38 rlc 917134706 ID0x7fa28a70 dest 2:

Sat Jul 23 23:31:50 2016

RFS[7]: Assigned to RFS process 2818

RFS[7]: Opened log for thread 1 sequence 37 dbid 2141348976 branch917134706

Archived Log entry 22 added for thread 1 sequence 39 rlc 917134706 ID0x7fa28a70 dest 2:

Archived Log entry 23 added for thread 1 sequence 37 rlc 917134706 ID0x7fa28a70 dest 2:

RFS[5]: Opened log for thread 1 sequence 40 dbid 2141348976 branch917134706

Dictionary check beginning

RFS[6]: Opened log for thread 1 sequence 41 dbid 2141348976 branch917134706

Archived Log entry 24 added for thread 1 sequence 40 rlc 917134706 ID0x7fa28a70 dest 2:

RFS[7]: Opened log for thread 1 sequence 42 dbid 2141348976 branch917134706

Archived Log entry 25 added for thread 1 sequence 41 rlc 917134706 ID0x7fa28a70 dest 2:

RFS[5]: Opened log for thread 1 sequence 43 dbid 2141348976 branch917134706

Archived Log entry 26 added for thread 1 sequence 42 rlc 917134706 ID0x7fa28a70 dest 2:

Archived Log entry 27 added for thread 1 sequence 43 rlc 917134706 ID0x7fa28a70 dest 2:

RFS[6]: Opened log for thread 1 sequence 44 dbid 2141348976 branch917134706

RFS[7]: Opened log for thread 1 sequence 45 dbid 2141348976 branch917134706

RFS[5]: Opened log for thread 1 sequence 46 dbid 2141348976 branch917134706

Archived Log entry 28 added for thread 1 sequence 44 rlc 917134706 ID0x7fa28a70 dest 2:

Expanded controlfile section 11 from 28 to 280 records

Requested to grow by 252 records; added 9 blocks of records

Archived Log entry 29 added for thread 1 sequence 45 rlc 917134706 ID0x7fa28a70 dest 2:

Archived Log entry 30 added for thread 1 sequence 46 rlc 917134706 ID0x7fa28a70 dest 2:

RFS[6]: Opened log for thread 1 sequence 47 dbid 2141348976 branch917134706

RFS[7]: Opened log for thread 1 sequence 48 dbid 2141348976 branch917134706

Archived Log entry 31 added for thread 1 sequence 47 rlc 917134706 ID0x7fa28a70 dest 2:

Archived Log entry 32 added for thread 1 sequence 48 rlc 917134706 ID0x7fa28a70 dest 2:

RFS[5]: Opened log for thread 1 sequence 49 dbid 2141348976 branch917134706

Sat Jul 23 23:31:52 2016

Errors in file/u01/app/oracle/diag/rdbms/jason2/JASON/trace/JASON_dbw0_2555.trc:

ORA-01157: cannot identify/lock data file 201 - see DBWR trace file

ORA-01110: data file 201: '/u01/app/oracle/oradata/JASON/temp01.dbf'

ORA-27037: unable to obtain file status

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3

Errors in file/u01/app/oracle/diag/rdbms/jason2/JASON/trace/JASON_dbw0_2555.trc:

ORA-01186: file 201 failed verification tests

ORA-01157: cannot identify/lock data file 201 - see DBWR trace file

ORA-01110: data file 201: '/u01/app/oracle/oradata/JASON/temp01.dbf'

File 201 not verified due to error ORA-01157

Archived Log entry 33 added for thread 1 sequence 49 rlc 917134706 ID0x7fa28a70 dest 2:

Dictionary check complete

Re-creating tempfile /u01/app/oracle/oradata/JASON/temp01.dbf

RFS[6]: Opened log for thread 1 sequence 50 dbid 2141348976 branch917134706

Archived Log entry 34 added for thread 1 sequence 50 rlc 917134706 ID0x7fa28a70 dest 2:

Database Characterset is ZHS16GBK

RFS[6]: Opened log for thread 1 sequence 53 dbid 2141348976 branch917134706

Archived Log entry 35 added for thread 1 sequence 53 rlc 917134706 ID0x7fa28a70 dest 2:

RFS[7]: Opened log for thread 1 sequence 51 dbid 2141348976 branch917134706

Archived Log entry 36 added for thread 1 sequence 51 rlc 917134706 ID0x7fa28a70 dest 2:

RFS[6]: Opened log for thread 1 sequence 54 dbid 2141348976 branch917134706

RFS[5]: Opened log for thread 1 sequence 52 dbid 2141348976 branch917134706

Archived Log entry 37 added for thread 1 sequence 54 rlc 917134706 ID0x7fa28a70 dest 2:

RFS[7]: Opened log for thread 1 sequence 55 dbid 2141348976 branch917134706

Archived Log entry 38 added for thread 1 sequence 52 rlc 917134706 ID0x7fa28a70 dest 2:

Archived Log entry 39 added for thread 1 sequence 55 rlc 917134706 ID0x7fa28a70 dest 2:

RFS[6]: Opened log for thread 1 sequence 56 dbid 2141348976 branch917134706

Archived Log entry 40 added for thread 1 sequence 56 rlc 917134706 ID0x7fa28a70 dest 2:

Sat Jul 23 23:31:56 2016

No Resource Manager plan active

**********************************************************

WARNING: Files may exists in db_recovery_file_dest

that are not known to the database. Use the RMAN command

CATALOG RECOVERY AREA to re-catalog any such files.

If files cannot be cataloged, then manually delete them

using OS command.

One of the following events caused this:

1. A backup controlfile was restored.

2. A standby controlfile was restored.

3. The controlfile was re-created.

4. db_recovery_file_dest had previously been enabled and

   then disabled.

**********************************************************

replication_dependency_tracking turned off (no async multimasterreplication found)

Physical standby database opened for read only access.

Sat Jul 23 23:32:01 2016

db_recovery_file_dest_size of 4182 MB is 0.00% used. This is a

user-specified limit on the amount of space that will be used by this

database for recovery-related files, and does not reflect the amount of

space available in the underlying filesystem or ASM diskgroup.

Completed: alter database open

Sat Jul 23 23:32:25 2016

alter database recover managed standby database using current logfiledisconnect from session

Attempt to start background Managed Standby Recovery process (JASON)

Sat Jul 23 23:32:25 2016

MRP0 started with pid=28, OS id=2824

MRP0: Background Managed Standby Recovery process started (JASON)

Serial Media Recovery started

Managed Standby Recovery starting Real Time Apply

Waiting for all non-current ORLs to be archived...

All non-current ORLs have been archived.

Media Recovery Log /u01/app/oracle/archivelog/1_17_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_18_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_19_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_20_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_21_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_22_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_23_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_24_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_25_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_26_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_27_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_28_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_29_917134706.dbf

Completed: alter database recover managed standby database using currentlogfile disconnect from session

Media Recovery Log /u01/app/oracle/archivelog/1_30_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_31_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_32_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_33_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_34_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_35_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_36_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_37_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_38_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_39_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_40_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_41_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_42_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_43_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_44_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_45_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_46_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_47_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_48_917134706.dbf

Sat Jul 23 23:32:35 2016

Media Recovery Log /u01/app/oracle/archivelog/1_49_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_50_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_51_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_52_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_53_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_54_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_55_917134706.dbf

Media Recovery Log /u01/app/oracle/archivelog/1_56_917134706.dbf

Media Recovery Waiting for thread 1 sequence 57 (in transit)

Recovery of Online Redo Log: Thread 1 Group 4 Seq 57 Reading mem 0

  Mem# 0:/u01/app/oracle/oradata/JASON/standby01.log

 

 

備注:11g數據庫如果不開啟ADG,那么備庫mount狀態時,開啟日志實時應用alter database recovermanaged standby database using current logfile disconnect from session時。未傳送的歸檔日志在開啟日志實時應用時,開始傳送,傳送結束后開始應用日志。

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

张家口市| 湘潭县| 呼玛县| 鄂温| 静安区| 汉寿县| 大关县| 阳城县| 西峡县| 犍为县| 黔西县| 桐柏县| 武强县| 阜康市| 苏州市| 仁怀市| 疏附县| 仙游县| 来宾市| 吉木乃县| 辽中县| 错那县| 白玉县| 车险| 新巴尔虎左旗| 榆林市| 新竹县| 繁昌县| 枣阳市| 五原县| 瑞金市| 贵溪市| 阿巴嘎旗| 东平县| 景东| 大埔县| 安阳县| 乌审旗| 宜宾市| 集安市| 旺苍县|