我是靠谱客的博主 微笑音响,最近开发中收集的这篇文章主要介绍创建dataguard -- 使用备份创建 -- update 20201121,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

之前创建dg 一直都是使用duplicate创建的。前几天同事项目上碰到个问题,带宽问题,不能使用duplicate创建,只能使用备份创建。 昨晚试了试,套路都一样。记录下。

 

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

RDBMS 11.2.0.3.0
Primary : PROD1
$ORACLE_BASE : /u01/app/oracle
$ORACLE_HOME : /u01/app/oracle/product/11.2.0/dbhome_1
Standby : SBDB1
$ORACLE_BASE : /u01/app/oracle
$ORACLE_HOME : /u01/app/oracle/product/11.2.0/dbhome_1

参考文档: https://docs.oracle.com/cd/E11882_01/server.112/e41134/create_ps.htm#SBYDB4724

步骤:
1 主库启用归档模式,及启用Force logging ,启用flashback on(如果不配置broker,可以不启用)。添加standby logfile
2 创建主库备库的参数文件
3 创建密码文件,也可以把主库的scp一份到备库,更改名称即可
4 创建备库的控制文件,并scp到备库
5 配置Listener.ora, TNSNAMES.ora
6 对主库进行部分,并将备份传输到备库机器上并注册。(这里不需要传,一个主机上)
7 根据之前创建的备库的spfile,备库控制文件,启动备库到mount状态,进行restore
8 应用日志

 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

-- step 1

 

SYS@PROD1>archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     8
Next log sequence to archive   10
Current log sequence           10
SYS@PROD1>select flashback_on from v$database;

FLASHBACK_ON
------------------
NO

SYS@PROD1>alter database flashback on;

Database altered.

SYS@PROD1>alter database force logging;

Database altered.



SYS@PROD1>select group#,bytes/1024/1024 from v$log;

    GROUP# BYTES/1024/1024
---------- ---------------
         1              50
         3              50
         2              50

SYS@PROD1>alter database add standby logfile group 4 '/u01/app/oracle/oradata/PROD1/stdby01.log' size 50M;

Database altered.

SYS@PROD1>alter database add standby logfile group 5 '/u01/app/oracle/oradata/PROD1/stdby02.log' size 50M;

Database altered.

SYS@PROD1>alter database add standby logfile group 6 '/u01/app/oracle/oradata/PROD1/stdby03.log' size 50M;

Database altered.

SYS@PROD1>alter database add standby logfile group 7 '/u01/app/oracle/oradata/PROD1/stdby04.log' size 50M;

Database altered.

SYS@PROD1>


-- step 2 ,创建主库备库的参数文件,主库和备库里面的PROD1和SBDB1 对调,但是DB_NAME要设置成PROD1 。

 

 

## create pfile form spfile;
SYS@PROD1>create spfile from pfile='/home/oracle/pfile_prod1' ;

File created.

-- 编辑后,创建spfile,用spfile启动,并将备库的

SYS@PROD1>shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@PROD1>create pfile='/home/oracle/pfile_prod1' from spfile;


[oracle@edbjr2p1 ~]$ ls p*
pfile_prod1
[oracle@edbjr2p1 ~]$ cp pfile_prod1 pfile_sbdb1
/*

PROD1.__db_cache_size=247463936
PROD1.__java_pool_size=4194304
PROD1.__large_pool_size=4194304
PROD1.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
PROD1.__pga_aggregate_target=251658240
PROD1.__sga_target=377487360
PROD1.__shared_io_pool_size=0
PROD1.__shared_pool_size=113246208
PROD1.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/PROD1/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/u01/app/oracle/oradata/PROD1/control01.ctl','/u01/app/oracle/oradata/PROD1/control02.ctl'
*.db_block_size=8192
*.db_domain='us.oracle.com'
*.db_name='PROD1'
*.db_recovery_file_dest_size=6442450944
*.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=PROD1XDB)'
*.memory_max_target=629145600
*.memory_target=629145600
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_max_size=629145600
*.undo_tablespace='UNDOTBS1'

#
DB_NAME=PROD1
DB_UNIQUE_NAME=PROD1
LOG_ARCHIVE_CONFIG='DG_CONFIG=(PROD1,SBDB1)'
LOG_ARCHIVE_DEST_1=
 'LOCATION=USE_DB_RECOVERY_FILE_DEST
  VALID_FOR=(ALL_LOGFILES,ALL_ROLES)
  DB_UNIQUE_NAME=PROD1'
LOG_ARCHIVE_DEST_2=
 'SERVICE=SBDB1 ASYNC
  VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) 
  DB_UNIQUE_NAME=SBDB1'
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_DEST_STATE_2=ENABLE
REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
LOG_ARCHIVE_FORMAT=%t_%s_%r.arc



#

FAL_SERVER=SBDB1
DB_FILE_NAME_CONVERT='SBDB1','PROD1'
LOG_FILE_NAME_CONVERT='SBDB1','PROD1' 
STANDBY_FILE_MANAGEMENT=AUTO



---
SBDB1.__db_cache_size=247463936
SBDB1.__java_pool_size=4194304
SBDB1.__large_pool_size=4194304
SBDB1.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
SBDB1.__pga_aggregate_target=251658240
SBDB1.__sga_target=377487360
SBDB1.__shared_io_pool_size=0
SBDB1.__shared_pool_size=113246208
SBDB1.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/SBDB1/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
#*.control_files='/u01/app/oracle/oradata/SBDB1/control01.ctl','/u01/app/oracle/oradata/SBDB1/control02.ctl'
*.control_files='/home/oracle/sbdb1.ctl'
*.db_block_size=8192
*.db_domain='us.oracle.com'
*.db_name='PROD1'
*.db_recovery_file_dest_size=6442450944
*.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=SBDB1XDB)'
*.memory_max_target=629145600
*.memory_target=629145600
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_max_size=629145600
*.undo_tablespace='UNDOTBS1'

#
DB_NAME=PROD1
DB_UNIQUE_NAME=SBDB1
LOG_ARCHIVE_CONFIG='DG_CONFIG=(SBDB1,PROD1)'
LOG_ARCHIVE_DEST_1=
 'LOCATION=USE_DB_RECOVERY_FILE_DEST
  VALID_FOR=(ALL_LOGFILES,ALL_ROLES)
  DB_UNIQUE_NAME=SBDB1'
LOG_ARCHIVE_DEST_2=
 'SERVICE=PROD1 ASYNC
  VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) 
  DB_UNIQUE_NAME=PROD1'
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_DEST_STATE_2=ENABLE
REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
LOG_ARCHIVE_FORMAT=%t_%s_%r.arc



#

FAL_SERVER=PROD1
DB_FILE_NAME_CONVERT='PROD1','SBDB1'
LOG_FILE_NAME_CONVERT='PROD1','SBDB1' 
STANDBY_FILE_MANAGEMENT=AUTO


*/

/*

SYS@SBDB1>startup nomount pfile='/home/oracle/pfile_sbdb1'
ORACLE instance started.

Total System Global Area  627732480 bytes
Fixed Size                  1346756 bytes
Variable Size             373293884 bytes
Database Buffers          247463936 bytes
Redo Buffers                5627904 bytes
SYS@SBDB1>create spfile from pfile='/home/oracle/pfile_sbdb1';

File created.

*/


-- step 3 ,略

-- step 4 ,创建备库的控制文件

 

 

 

 

SYS@PROD1>startup mount;
ORACLE instance started.

Total System Global Area  627732480 bytes
Fixed Size                  1346756 bytes
Variable Size             373293884 bytes
Database Buffers          247463936 bytes
Redo Buffers                5627904 bytes
Database mounted.
SYS@PROD1>alter database create standby controlfile as '/home/oracle/sbdb1.ctl';

Database altered.

SYS@PROD1>alter database open;

Database altered.

SYS@PROD1>


-- step 5 ,配置监听器 ,并检验监听的连通性。

 

 

## restart listener
LSNRCTL> reload
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=edbjr2p1.example.com)(PORT=1521)))
The command completed successfully
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=edbjr2p1.example.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date                08-DEC-2017 20:10:51
Uptime                    0 days 0 hr. 41 min. 57 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/edbjr2p1/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=edbjr2p1.example.com)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "PROD1.us.oracle.com" has 1 instance(s).
  Instance "PROD1", status UNKNOWN, has 1 handler(s) for this service...
Service "SBDB1.us.oracle.com" has 1 instance(s).
  Instance "SBDB1", status UNKNOWN, has 1 handler(s) for this service...
Service "plsextproc" has 1 instance(s).
  Instance "plsextproc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL> 

## vi tnsnames.ora
/*
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = edbjr2p1.example.com)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

ADR_BASE_LISTENER = /u01/app/oracle

SID_LIST_LISTENER=
  (SID_LIST=
    (SID_DESC=
      (GLOBAL_DBNAME=PROD1.us.oracle.com)
      (ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)
      (SID_NAME=PROD1))
     (SID_DESC=
      (GLOBAL_DBNAME=SBDB1.us.oracle.com)
      (ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)
      (SID_NAME=SBDB1))
  
    (SID_DESC=
      (SID_NAME=plsextproc)
      (ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)
      (PROGRAM=extproc)))

	  
PROD1 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = edbjr2p1.example.com)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = PROD1.us.oracle.com)
    )
  )


SBDB1 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = edbjr2p1.example.com)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = SBDB1.us.oracle.com)
    )
  )


	  
*/
## tnsping 
[oracle@edbjr2p1 admin]$ tnsping sbdb1

TNS Ping Utility for Linux: Version 11.2.0.3.0 - Production on 08-DEC-2017 20:54:18

Copyright (c) 1997, 2011, Oracle.  All rights reserved.

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = edbjr2p1.example.com)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = SBDB1.us.oracle.com)))
OK (0 msec)
[oracle@edbjr2p1 admin]$ 


-- step 6, 对主库进行备份

 

 

[oracle@edbjr2p1 ~]$ export ORACLE_SID=PROD1
[oracle@edbjr2p1 ~]$ rman target /

Recovery Manager: Release 11.2.0.3.0 - Production on Fri Dec 8 21:05:55 2017

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

connected to target database: PROD1 (DBID=2082231315)

RMAN> backup format '/home/oracle/%U' database ;

Starting backup at 08-DEC-17
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/PROD1/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/PROD1/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/PROD1/example01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/PROD1/undotbs01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/PROD1/users01.dbf
channel ORA_DISK_1: starting piece 1 at 08-DEC-17
channel ORA_DISK_1: finished piece 1 at 08-DEC-17
piece handle=/home/oracle/01slkq9q_1_1 tag=TAG20171208T210810 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:05:47
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 08-DEC-17
channel ORA_DISK_1: finished piece 1 at 08-DEC-17
piece handle=/home/oracle/02slkqkp_1_1 tag=TAG20171208T210810 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:12
Finished backup at 08-DEC-17

RMAN> 


RMAN> list backup of database;


List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
1       Full    1.05G      DISK        00:05:44     08-DEC-17      
        BP Key: 1   Status: AVAILABLE  Compressed: NO  Tag: TAG20171208T210810
        Piece Name: /home/oracle/01slkq9q_1_1
  List of Datafiles in backup set 1
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 954749     08-DEC-17 /u01/app/oracle/oradata/PROD1/system01.dbf
  2       Full 954749     08-DEC-17 /u01/app/oracle/oradata/PROD1/sysaux01.dbf
  3       Full 954749     08-DEC-17 /u01/app/oracle/oradata/PROD1/undotbs01.dbf
  4       Full 954749     08-DEC-17 /u01/app/oracle/oradata/PROD1/users01.dbf
  5       Full 954749     08-DEC-17 /u01/app/oracle/oradata/PROD1/example01.dbf

RMAN> 


-- step 7, 创建备库的文件夹,启动到mount状态下,进行还原

 

 

-- create directory
[oracle@edbjr2p1 ~]$ mkdir -p /u01/app/oracle/admin/SBDB1/adump
[oracle@edbjr2p1 ~]$ mkdir -p /u01/app/oracle/oradata/SBDB1
[oracle@edbjr2p1 ~]$ 


-- startup nomount

SYS@SBDB1>shutdown immediate;
ORA-01507: database not mounted


ORACLE instance shut down.
SYS@SBDB1>startup mount;
ORACLE instance started.

Total System Global Area  627732480 bytes
Fixed Size                  1346756 bytes
Variable Size             373293884 bytes
Database Buffers          247463936 bytes
Redo Buffers                5627904 bytes
Database mounted.
SYS@SBDB1>

--- 查看备份的文件,发现没有的,需要注册进去
RMAN> list backup of database;

using target database control file instead of recovery catalog
specification does not match any backup in the repository

RMAN> restore database ;

Starting restore at 08-DEC-17
Starting implicit crosscheck backup at 08-DEC-17
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=14 device type=DISK
Finished implicit crosscheck backup at 08-DEC-17

Starting implicit crosscheck copy at 08-DEC-17
using channel ORA_DISK_1
Finished implicit crosscheck copy at 08-DEC-17

searching for all files in the recovery area
cataloging files...
no files cataloged

using channel ORA_DISK_1

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 12/08/2017 21:42:14
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 5 found to restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore

RMAN> 

-- 把备份注册进去
RMAN> catalog start with '/home/oracle/01slkq9q_1_1';

searching for all files that match the pattern /home/oracle/01slkq9q_1_1

List of Files Unknown to the Database
=====================================
File Name: /home/oracle/01slkq9q_1_1

Do you really want to catalog the above files (enter YES or NO)? yes
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: /home/oracle/01slkq9q_1_1

RMAN> catalog start with '/home/oracle/02slkqkp_1_1';

searching for all files that match the pattern /home/oracle/02slkqkp_1_1

List of Files Unknown to the Database
=====================================
File Name: /home/oracle/02slkqkp_1_1

Do you really want to catalog the above files (enter YES or NO)? yes
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: /home/oracle/02slkqkp_1_1

RMAN> 


-- 查看注册进去的备份
RMAN> list backup of database;


List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
1       Full    1.05G      DISK        00:00:00     08-DEC-17      
        BP Key: 1   Status: AVAILABLE  Compressed: NO  Tag: TAG20171208T210810
        Piece Name: /home/oracle/01slkq9q_1_1
  List of Datafiles in backup set 1
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 954749     08-DEC-17 /u01/app/oracle/oradata/SBDB1/system01.dbf
  2       Full 954749     08-DEC-17 /u01/app/oracle/oradata/SBDB1/sysaux01.dbf
  3       Full 954749     08-DEC-17 /u01/app/oracle/oradata/SBDB1/undotbs01.dbf
  4       Full 954749     08-DEC-17 /u01/app/oracle/oradata/SBDB1/users01.dbf
  5       Full 954749     08-DEC-17 /u01/app/oracle/oradata/SBDB1/example01.dbf

RMAN> 


--进行还原

RMAN> restore database;

Starting restore at 08-DEC-17
using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/SBDB1/system01.dbf
channel ORA_DISK_1: restoring datafile 00002 to /u01/app/oracle/oradata/SBDB1/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/SBDB1/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/SBDB1/users01.dbf
channel ORA_DISK_1: restoring datafile 00005 to /u01/app/oracle/oradata/SBDB1/example01.dbf
channel ORA_DISK_1: reading from backup piece /home/oracle/01slkq9q_1_1
channel ORA_DISK_1: piece handle=/home/oracle/01slkq9q_1_1 tag=TAG20171208T210810
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:01:16
Finished restore at 08-DEC-17

RMAN> 


-- step 8 ,应用日志,略。

 

 

 

---  查看日志应用情况

SYS@PROD1>select sequence#,applied from v$archived_log;

 SEQUENCE# APPLIED
---------- ---------
        10 NO
        11 NO
        12 NO
        13 NO

SYS@PROD1>/

 SEQUENCE# APPLIED
---------- ---------
        10 NO
        11 NO
        12 NO
        13 NO

SYS@PROD1>/

 SEQUENCE# APPLIED
---------- ---------
        10 NO
        11 NO
        12 NO
        13 NO
        12 YES
        14 NO
        14 YES
        13 YES
        15 NO
        15 NO

10 rows selected.

SYS@PROD1>

--  查看备库的归档
SYS@SBDB1>startup mount;
ORACLE instance started.

Total System Global Area  627732480 bytes
Fixed Size                  1346756 bytes
Variable Size             373293884 bytes
Database Buffers          247463936 bytes
Redo Buffers                5627904 bytes
Database mounted.
SYS@SBDB1>archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     14
Next log sequence to archive   0
Current log sequence           16
SYS@SBDB1>


end

 

 

++++++++++++++++++

 

-- 附件几个错误,原因,passwordfile没有的。copy主库的到备库就可以了。

 

ARC2: Becoming the heartbeat ARCH
ARC2: Becoming the active heartbeat ARCH
Errors in file /u01/app/oracle/diag/rdbms/sbdb1/SBDB1/trace/SBDB1_lgwr_6766.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/SBDB1/redo01.log'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sbdb1/SBDB1/trace/SBDB1_lgwr_6766.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/SBDB1/redo01.log'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sbdb1/SBDB1/trace/SBDB1_lgwr_6766.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/SBDB1/redo02.log'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sbdb1/SBDB1/trace/SBDB1_lgwr_6766.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/SBDB1/redo02.log'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sbdb1/SBDB1/trace/SBDB1_lgwr_6766.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/SBDB1/redo03.log'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sbdb1/SBDB1/trace/SBDB1_lgwr_6766.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/SBDB1/redo03.log'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sbdb1/SBDB1/trace/SBDB1_lgwr_6766.trc:
ORA-00313: open failed for members of log group 4 of thread 0
ORA-00312: online log 4 thread 0: '/u01/app/oracle/oradata/SBDB1/stdby01.log'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sbdb1/SBDB1/trace/SBDB1_lgwr_6766.trc:
ORA-00313: open failed for members of log group 4 of thread 0
ORA-00312: online log 4 thread 0: '/u01/app/oracle/oradata/SBDB1/stdby01.log'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sbdb1/SBDB1/trace/SBDB1_lgwr_6766.trc:
ORA-00313: open failed for members of log group 5 of thread 0
ORA-00312: online log 5 thread 0: '/u01/app/oracle/oradata/SBDB1/stdby02.log'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sbdb1/SBDB1/trace/SBDB1_lgwr_6766.trc:
ORA-00313: open failed for members of log group 5 of thread 0
ORA-00312: online log 5 thread 0: '/u01/app/oracle/oradata/SBDB1/stdby02.log'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sbdb1/SBDB1/trace/SBDB1_lgwr_6766.trc:
ORA-00313: open failed for members of log group 6 of thread 0
ORA-00312: online log 6 thread 0: '/u01/app/oracle/oradata/SBDB1/stdby03.log'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Errors in file :
ORA-00313: open failed for members of log group 6 of thread 0
ORA-00312: online log 6 thread 0: '/u01/app/oracle/oradata/SBDB1/stdby03.log'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sbdb1/SBDB1/trace/SBDB1_lgwr_6766.trc:
ORA-00313: open failed for members of log group 7 of thread 0
ORA-00312: online log 7 thread 0: '/u01/app/oracle/oradata/SBDB1/stdby04.log'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sbdb1/SBDB1/trace/SBDB1_lgwr_6766.trc:
ORA-00313: open failed for members of log group 7 of thread 0
ORA-00312: online log 7 thread 0: '/u01/app/oracle/oradata/SBDB1/stdby04.log'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Create Relation IPS_PACKAGE_UNPACK_HISTORY
ARC3: Archival started
ARC0: STARTING ARCH PROCESSES COMPLETE
Completed: ALTER DATABASE   MOUNT
Error 1017 received logging on to the standby
------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE, 
and that the SYS password is same in the password files.
      returning error ORA-16191


--给备库增加控制文件。因为创建的时候,只有一个控制文件。在创建备库的时候,多创建几个控制文件也是可以的。创建过程略,语句如下:

 

 

alter system set control_files='/home/oracle/sbdb1.ctl','/u01/app/oracle/oradata/SBDB1/control02.ctl','/u01/app/oracle/oradata/SBDB1/control03.ctl' scope=spfile;

 

 

 

 

 

END

 

-- 20201121 add

补充一个问题,官方文档没有提到的,就是要recover database。

前几天碰到一个项目,因为是生产环境,数据一直在变化,所以导致resotre完毕备库的时候,打开提示ORA-10458、ORA-01152、ORA-01110。其实也就是备份太旧,缺少归档,应用了归档日志后,问题解决。

修复备库的时候,和修复主库是一样的过程。就把主备当作一样就可以了。

另外,在使用备库的备份(将备库备份一份),进行异机还原出一份数据库(单独的一个主库,而不是和现有的备库有关系的那种主库)的时候,是可以的。目前某一个项目已经做过这种方式。

END

 

 

 

 

最后

以上就是微笑音响为你收集整理的创建dataguard -- 使用备份创建 -- update 20201121的全部内容,希望文章能够帮你解决创建dataguard -- 使用备份创建 -- update 20201121所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(32)

评论列表共有 0 条评论

立即
投稿
返回
顶部