Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

ORACLE 10GR2 DATAGUARD ON RHEL 6

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

1. OS installs Red Hat Enterprise Linux Server release 6.4( Santiago)

64 bit

IP:10.56.1.204 10.55.1.204

2. Install the rpm package required by oracle 10Gr2

Configure the local yum source and use the yum repository on the system disk.

Related package installation

Yum-y install binutils compat-libstdc++-33 compat-libstdc++-33.i686 elfutils-libel

F elfutils-libelf-devel gcc gcc-c++ glibc glibc.i686 glibc-common glibc-devel glibc-devel.i686 glibc-headers ksh libaio libaio.i686 libaio-devel libaio-devel.i686 libgcc libgcc.i686 libstdc++ libstdc++.i686 libstdc++-devel make sysstat

Yum-y install libXp

Yum-y install libXp.so.6

Yum-y install libXt.i686 libXtst.i686

Oracle installation reference documentation

Please refer to the documentation:

Http://www.cnblogs.com/mchina/archive/2013/03/08/2934473.html

3. Create users and directories

~] # groupadd dba

~] # groupadd oinstall

~] # useradd oracle-g oinstall-G dba

~] # passwd oracle

~] # mkdir / u01/product/10.2.0/db_1-p

~] # chown-R oracle.oinstall / U01

~] # mkdir / oradata

~] # chown-R oracle.oinstall / oradata/

4. Set relevant kernel parameters and environment variables

~] # su-oracle

~] $vim .bash _ profile

Unset USERNAME

Umask 022

ORACLE_BASE=/u01; export ORACLE_BASE

ORACLE_HOME=/u01/product/10.2.0/db_1; export ORACLE_HOME

ORACLE_SID=wip; export ORACLE_SID

PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin; export PATH

~] $bash .bash _ profile

~] $echo $ORACLE_HOME

/ u01/product/10.2.0/db_1

~] $echo $ORACLE_BASE

/ u01

Root

Vim / etc/sysctl.conf

# Controls the maximum shared segment size, in bytes

Kernel.shmmax = 16000000000

# Controls the maximum number of shared memory segments, in pages

Kernel.shmall = 4194304

Kernel.shmmni = 4096

Kernel.sem = 250 32000 100 128

Fs.file-max = 65536

Net.ipv4.ip_local_port_range = 1024 65000

Net.core.rmem_default = 1048576

Net.core.rmem_max = 1048576

Net.core.wmem_default = 262144

Net.core.wmem_max = 262144

~] # sysctl-p

Net.ipv4.ip_forward = 0

Net.ipv4.conf.default.rp_filter = 1

Net.ipv4.conf.default.accept_source_route = 0

Kernel.sysrq = 0

Kernel.core_uses_pid = 1

Net.ipv4.tcp_syncookies = 1

Kernel.shmmax = 16000000000

Kernel.shmall = 4194304

Kernel.shmmni = 4096

Kernel.sem = 250 32000 100 128

Fs.file-max = 65536

Net.ipv4.ip_local_port_range = 1024 65000

Net.core.rmem_default = 1048576

Net.core.rmem_max = 1048576

Net.core.wmem_default = 262144

Net.core.wmem_max = 262144

Vim / etc/security/limits.conf

# use by oracle

Oracle soft nproc 2047

Oracle hard nproc 16384

Oracle soft nofile 1024

Oracle hard nofile 65536

Vim / etc/pam.d/login

# use by oracle

Session required / lib/security/pam_limits.so

Modify the release file

~] # vim / etc/redhat-release

Red Hat Enterprise Linux AS release 4 (Nahant Update 8)

5. Oracle software installation

Extract the file

Gunzip 10201_database_linux_x86_64.cpio.gz

Cpio-idmv backup database format'/ mnt/rman/%d_FULL_%T_%u_%p_%c'

Create pfile in the main library, password file

[oracle@LCM3RAC1 rman] $orapwd file=orapwwip password=oracle entries=5

[oracle@LCM3RAC1 rman] $ls

Orapwwip test WIP_FULL_20170109_0vrpjknq_1_1

[oracle@LCM3RAC1 rman] $slqplus / as sysdba

-bash: slqplus: command not found

[oracle@LCM3RAC1 rman] $sqlplus / as sysdba

SQL*Plus: Release 10.2.0.5.0-Production on Mon Jan 9 14:57:08 2017

Copyright (c) 1982, 2010, Oracle. All Rights Reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.5.0-64bit Production

With the Partitioning, Real Application Clusters, OLAP, Data Mining

And Real Application Testing options

SQL > create pfile='/mnt/rman/initorcl.ora' from spfile

File created.

Pfile file:

Wip1.__db_cache_size=6358564864

Wip3.__db_cache_size=3036676096

Wip2.__db_cache_size=6392119296

Wip3.__java_pool_size=16777216

Wip2.__java_pool_size=16777216

Wip1.__java_pool_size=16777216

Wip3.__large_pool_size=16777216

Wip2.__large_pool_size=16777216

Wip1.__large_pool_size=16777216

Wip1.__shared_pool_size=2164260864

Wip3.__shared_pool_size=1191182336

Wip2.__shared_pool_size=2130706432

Wip3.__streams_pool_size=16777216

Wip2.__streams_pool_size=16777216

Wip1.__streams_pool_size=16777216

*. _ undo_autotune=FALSE

* .audit_file_dest='/u01/admin/wip/adump'

* .background_dump_dest='/u01/admin/wip/bdump'

* .cluster_database_instances=3

* .cluster_database=true

* .compatible='10.2.0.5.0'

* .control_files='/oradata/wip/control01.ctl','/oradata/wip/control02.ctl','/oradata/wip/control03.ctl'

* .core_dump_dest='/u01/admin/wip/cdump'

* .db_block_size=8192

* .db_domain=''

* .db_file_multiblock_read_count=16

* .db_name='wip'

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

* .fal_client='STANDBY'

* .fal_server='WIP1','WIP2','WIP3'

Wip1.instance_number=1

Wip3.instance_number=3

Wip2.instance_number=2

* .job_queue_processes=10

Wip1.local_listener=' (ADDRESS = (PROTOCOL = TCP) (HOST = 10.56.1.101) (PORT = 1521))'

Wip2.local_listener=' (ADDRESS = (PROTOCOL = TCP) (HOST = 10.56.1.102) (PORT = 1521)'

Wip3.local_listener=' (ADDRESS = (PROTOCOL = TCP) (HOST = 10.56.1.103) (PORT = 1521))'

* .log_archive_dest_1='location=/oradata/archivelog'

* .log_archive_dest_2='service=standby optional reopen=60'

* .log_archive_dest_state_2='DEFER'

* .open_cursors=2000

* .pga_aggregate_target=1671430144

Wip1.pga_aggregate_target=3221225472

Wip2.pga_aggregate_target=3221225472

Wip3.pga_aggregate_target=1572864000

* .processes=2000

* .remote_listener='LISTENERS_WIP'

* .remote_login_passwordfile='exclusive'

Wip1.sga_max_size=8589934592

Wip2.sga_max_size=8589934592

Wip3.sga_max_size=4294967296

* .sga_target=1610612736

Wip1.sga_target=8589934592

Wip2.sga_target=8589934592

Wip3.sga_target=4294967296

* .standby_file_management='AUTO'

Wip2.thread=2

Wip3.thread=3

Wip1.thread=1

* .undo_management='AUTO'

* .undo_retention=10800

Wip2.undo_tablespace='UNDOTBS2'

Wip3.undo_tablespace='UNDOTBS3'

Wip1.undo_tablespace='UNDOTBS1'

* .user_dump_dest='/u01/admin/wip/udump'

Create the corresponding folder in the repository according to the pfile file

[oracle@DataGuard ~] $mkdir / u01/admin/wip/ {adump,bdump,cdump,udump}-pv

Mkdir: created directory `/ u01Compact admin`

Mkdir: created directory `/ u01Accord admin Wip'

Mkdir: created directory `/ u01Accord admin'wip '.

Mkdir: created directory `/ u01According to the BDump`

Mkdir: created directory `/ u01AccDump`

Mkdir: created directory `/ u01Accord admin Universe wipUnix Udump'

[oracle@DataGuard ~] $mkdir / oradata/archivelog-pv

Mkdir: created directory `/ oradata/archivelog'

Modify pfile parameter file

Wip.__db_cache_size=6358564864

Wip.__java_pool_size=16777216

Wip.__large_pool_size=16777216

Wip.__shared_pool_size=620756992

Wip.__streams_pool_size=0

* .audit_file_dest='/u01/admin/wip/adump'

* .background_dump_dest='/u01/admin/wip/bdump'

* .cluster_database=false

* .compatible='10.2.0.5.0'

* .control_files='/oradata/wip/control01.ctl','/oradata/wip/control02.ctl','/oradata/wip/control03.ctl'

* .core_dump_dest='/u01/admin/wip/cdump'

* .db_block_size=8192

* .db_domain=''

* .db_file_multiblock_read_count=16

* .db_name='wip'

* .db_unique_name='wip'

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

* .fal_client='standby'

* .fal_server='wip1','wip2','wip3'

* .instance_name='wip'

* .job_queue_processes=10

* .log_archive_dest_1='location=/oradata/archivelog'

* .open_cursors=2000

* .pga_aggregate_target=1671430144

* .processes=2000

* .remote_login_passwordfile='exclusive'

* .sga_max_size=3238002688

* .sga_target=3238002688

* .standby_file_management='AUTO'

* .thread=1

* .undo_management='AUTO'

* .undo_retention=10800

Configure standby snooping and tns,listener.ora/tnsnames.ora

Host snooping

# listener.ora.lcm3rac1 Network Configuration File: / u01/product/10.2.0/db_1/network/admin

/ listener.ora.lcm3rac1# Generated by Oracle configuration tools.

INBOUND_CONNECT_TIMEOUT_LISTENER_LCM3RAC1 = 0

LISTENER_LCM3RAC1 =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP) (HOST = lcm3rac1-vip) (PORT = 1521) (IP = FIRST))

)

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP) (HOST = 10.56.1.201) (PORT = 1521) (IP = FIRST))

)

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC))

)

)

)

Standby library monitoring

# listener.ora Network Configuration File: / u01/product/10.2.0/db_1/network/admin/listener

.ora # Generated by Oracle configuration tools.

SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(SID_NAME = PLSExtProc)

(ORACLE_HOME = / u01/product/10.2.0/db_1)

(PROGRAM = extproc)

)

)

LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

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

(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC0))

)

)

Tns

# tnsnames.ora Network Configuration File: / u01/product/10.2.0/db_1/network/admin/tnsnames

.ora # Generated by Oracle configuration tools.

WIP =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = lcm3rac1-vip) (PORT = 1521))

(ADDRESS = (PROTOCOL = TCP) (HOST = lcm3rac2-vip) (PORT = 1521))

(ADDRESS = (PROTOCOL = TCP) (HOST = lcm3rac3-vip) (PORT = 1521))

(LOAD_BALANCE = yes)

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = wip)

)

)

WIP3 =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = lcm3rac3-vip) (PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = wip)

(INSTANCE_NAME = wip3)

)

)

WIP2 =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = lcm3rac2-vip) (PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = wip)

(INSTANCE_NAME = wip2)

)

)

WIP1 =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = lcm3rac1-vip) (PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = wip)

(INSTANCE_NAME = wip1)

)

)

LISTENERS_WIP =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP) (HOST = lcm3rac1-vip) (PORT = 1521))

(ADDRESS = (PROTOCOL = TCP) (HOST = lcm3rac2-vip) (PORT = 1521))

(ADDRESS = (PROTOCOL = TCP) (HOST = lcm3rac3-vip) (PORT = 1521))

)

OTHERWIP =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = lcm3rac1-vip) (PORT = 1521))

(ADDRESS = (PROTOCOL = TCP) (HOST = lcm3rac2-vip) (PORT = 1521))

(ADDRESS = (PROTOCOL = TCP) (HOST = lcm3rac3-vip) (PORT = 1521))

(LOAD_BALANCE = yes)

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = wip)

)

)

STANDBY =

(DESCRIPTION =

(ADDRESS_LIST =

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

)

(CONNECT_DATA =

(SERVICE_NAME = wip)

)

)

Lcm2wip =

(DESCRIPTION =

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

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

(LOAD_BALANCE = on)

(FAILOVER = on)

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = wip)

(FAILOVER_MODE=

(TYPE=select)

(method=basic)

(retries = 200)

(delay = 5)

)

)

)

Lcm1his =

(DESCRIPTION =

(ADDRESS_LIST =

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

)

(CONNECT_DATA =

(SERVICE_NAME = history)

)

)

Lcm2his =

(DESCRIPTION =

(ADDRESS_LIST =

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

)

(CONNECT_DATA =

(SERVICE_NAME = history)

)

)

HISTORY =

(DESCRIPTION =

(ADDRESS_LIST =

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

)

(CONNECT_DATA =

(SERVICE_NAME = history)

)

)

OTHERHIS =

(DESCRIPTION =

(ADDRESS_LIST =

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

)

(CONNECT_DATA =

(SERVICE_NAME = history)

)

)

Report =

(DESCRIPTION =

(ADDRESS_LIST =

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

)

(CONNECT_DATA =

(SERVICE_NAME = wuinterdb)

)

)

INTEGRATE =

(DESCRIPTION =

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

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = integrate.cptt)

)

)

INTEGRATE_PRD =

(DESCRIPTION =

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

(CONNECT_DATA =

(SERVER = DEDICATED)

(SID = ltwb07)

)

)

# for db link

Lcm1WIP =

(DESCRIPTION =

(ADDRESS_LIST =

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

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

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

(LOAD_BALANCE = yes)

)

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = wip)

(FAILOVER_MODE =

(TYPE = select)

(method = basic)

(retries = 200)

(delay = 5)

)

)

)

Local host file plus parsing

/ etc/hosts

10.56.1.204 DataGuard

After the backup is completed, create a controlfile after several manual archives, and copy it to the standby database.

SQL > alter system archive log current

System altered.

SQL > alter database create standby controlfile as'/ tmp/control01.ctl'

Database altered.

[oracle@DataGuard rman] $mkdir-p / oradata/wip

[oracle@DataGuard rman] $cp control01.ctl / oradata/wip/control01.ctl

[oracle@DataGuard rman] $cp control01.ctl / oradata/wip/control02.ctl

[oracle@DataGuard rman] $cp control01.ctl / oradata/wip/control03.ctl

Copy password file

Cp orapwwip / u01/product/10.2.0/db_1/dbs/

The slave library starts to nomount state through pfile, and creates spfile according to pfile.

[oracle@DataGuard rman] $sqlplus / as sysdba

SQL*Plus: Release 10.2.0.5.0-Production on Mon Jan 9 17:47:38 2017

Copyright (c) 1982, 2010, Oracle. All Rights Reserved.

Connected to an idle instance.

SQL > startup nomount pfile='/mnt/rman/initorcl.ora'

ORACLE instance started.

Total System Global Area 3238002688 bytes

Fixed Size 2099784 bytes

Variable Size 654312888 bytes

Database Buffers 2566914048 bytes

Redo Buffers 14675968 bytes

SQL > create spfile from pfile='/mnt/rman/initorcl.ora'

File created.

SQL >

Start the database to the mount state

SQL > alter database mount

Database altered.

Restore the database to the standby database through rman

[oracle@DataGuard rman] $rman target/

Recovery Manager: Release 10.2.0.5.0-Production on Mon Jan 9 17:54:35 2017

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

Connected to target database: WIP (DBID=277772385, not open)

RMAN > restore database

The main library modifies the tns address for standby

Copy the archivelog of the primary library to the standby library

Scp * .dbf root@10.55.1.204:/oradata/archivelog/

Standby library to open listening

[root@DataGuard archivelog] # su-oracle

[oracle@DataGuard ~] $lsnrctl start

Prepare the archivelog copied from the main library of recover

[oracle@DataGuard ~] $sqlplus / as sysdba

SQL*Plus: Release 10.2.0.5.0-Production on Mon Jan 9 20:19:07 2017

Copyright (c) 1982, 2010, Oracle. All Rights Reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.5.0-64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL > recover standby database using backup controlfile until cancel

ORA-00279: change 13449706423844 generated at 01/09/2017 14:51:38 needed for

Thread 1

ORA-00289: suggestion: / oradata/archivelog/1_24855_751423971.dbf

ORA-00280: change 13449706423844 for thread 1 is in sequence # 24855

Specify log: {= suggested | filename | AUTO | CANCEL}

AUTO

ORA-00279: change 13449706423844 generated at 01/09/2017 10:39:34 needed for

Thread 2

ORA-00289: suggestion: / oradata/archivelog/2_14209_751423971.dbf

ORA-00280: change 13449706423844 for thread 2 is in sequence # 14209

ORA-00279: change 13449706423844 generated at 01/09/2017 13:45:09 needed for

Thread 3

ORA-00289: suggestion: / oradata/archivelog/3_13732_751423971.dbf

ORA-00280: change 13449706423844 for thread 3 is in sequence # 13732

ORA-00279: change 13449706456434 generated at 01/09/2017 15:00:13 needed for

Thread 2

ORA-00289: suggestion: / oradata/archivelog/2_14210_751423971.dbf

ORA-00280: change 13449706456434 for thread 2 is in sequence # 14210

ORA-00278: log file'/ oradata/archivelog/2_14209_751423971.dbf' no longer

Needed for this recovery

ORA-00279: change 13449708067563 generated at 01/09/2017 16:23:20 needed for

Thread 3

ORA-00289: suggestion: / oradata/archivelog/3_13733_751423971.dbf

ORA-00280: change 13449708067563 for thread 3 is in sequence # 13733

ORA-00278: log file'/ oradata/archivelog/3_13732_751423971.dbf' no longer

Needed for this recovery

ORA-00279: change 13449708406961 generated at 01/09/2017 16:57:01 needed for

Thread 1

ORA-00289: suggestion: / oradata/archivelog/1_24856_751423971.dbf

ORA-00280: change 13449708406961 for thread 1 is in sequence # 24856

ORA-00278: log file'/ oradata/archivelog/1_24855_751423971.dbf' no longer

Needed for this recovery

ORA-00279: change 13449709361975 generated at 01/09/2017 17:29:34 needed for

Thread 1

ORA-00289: suggestion: / oradata/archivelog/1_24857_751423971.dbf

ORA-00280: change 13449709361975 for thread 1 is in sequence # 24857

ORA-00278: log file'/ oradata/archivelog/1_24856_751423971.dbf' no longer

Needed for this recovery

ORA-00279: change 13449709362031 generated at 01/09/2017 17:29:37 needed for

Thread 3

ORA-00289: suggestion: / oradata/archivelog/3_13734_751423971.dbf

ORA-00280: change 13449709362031 for thread 3 is in sequence # 13734

ORA-00278: log file'/ oradata/archivelog/3_13733_751423971.dbf' no longer

Needed for this recovery

ORA-00279: change 13449709362034 generated at 01/09/2017 17:29:37 needed for

Thread 2

ORA-00289: suggestion: / oradata/archivelog/2_14211_751423971.dbf

ORA-00280: change 13449709362034 for thread 2 is in sequence # 14211

ORA-00278: log file'/ oradata/archivelog/2_14210_751423971.dbf' no longer

Needed for this recovery

ORA-00279: change 13449709411751 generated at 01/09/2017 17:30:51 needed for

Thread 2

ORA-00289: suggestion: / oradata/archivelog/2_14212_751423971.dbf

ORA-00280: change 13449709411751 for thread 2 is in sequence # 14212

ORA-00278: log file'/ oradata/archivelog/2_14211_751423971.dbf' no longer

Needed for this recovery

ORA-00279: change 13449709411858 generated at 01/09/2017 17:30:52 needed for

Thread 3

ORA-00289: suggestion: / oradata/archivelog/3_13735_751423971.dbf

ORA-00280: change 13449709411858 for thread 3 is in sequence # 13735

ORA-00278: log file'/ oradata/archivelog/3_13734_751423971.dbf' no longer

Needed for this recovery

ORA-00279: change 13449709411887 generated at 01/09/2017 17:30:52 needed for

Thread 1

ORA-00289: suggestion: / oradata/archivelog/1_24858_751423971.dbf

ORA-00280: change 13449709411887 for thread 1 is in sequence # 24858

ORA-00278: log file'/ oradata/archivelog/1_24857_751423971.dbf' no longer

Needed for this recovery

ORA-00279: change 13449709412924 generated at 01/09/2017 17:31:19 needed for

Thread 1

ORA-00289: suggestion: / oradata/archivelog/1_24859_751423971.dbf

ORA-00280: change 13449709412924 for thread 1 is in sequence # 24859

ORA-00278: log file'/ oradata/archivelog/1_24858_751423971.dbf' no longer

Needed for this recovery

ORA-00308: cannot open archived log'/ oradata/archivelog/1_24859_751423971.dbf'

ORA-27037: unable to obtain file status

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

Additional information: 3

ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below

ORA-01152: file 1 was not restored from a sufficiently old backup

ORA-01110: data file 1:'/ oradata/wip/system01.dbf'

Synchronization log

SQL > recover managed standby database disconnect from session

Media recovery complete.

Close the database and open the standby database

Startup nomount

Alter database mount standby database

Alter database recover managed standby database disconnect from session; enables MRP

7. Check whether the application is normal.

Confirm synchronization: standby library executes RFS remote file receiving process MRP0 log application process

SQL > select process,status from v$managed_standby

SQL > /

PROCESS STATUS

--

ARCH CONNECTED

ARCH CONNECTED

MRP0 APPLYING_LOG

RFS IDLE

RFS IDLE

RFS IDLE

6 rows selected.

SQL > /

PROCESS STATUS

--

ARCH CONNECTED

ARCH CONNECTED

MRP0 WAIT_FOR_LOG

RFS IDLE

RFS IDLE

RFS IDLE

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

SEQUENCE# APP

13735 YES

13736 YES

13737 YES

13738 YES

13739 YES

13740 YES

13741 YES

14212 YES

14213 YES

14214 YES

14215 YES

SEQUENCE# APP

14216 YES

14217 YES

14218 NO

24859 YES

24860 YES

24861 YES

24862 NO

18 rows selected.

SQL > select message from v$dataguard_status

MESSAGE

ARC0: Archival started

ARC1: Archival started

ARC0: Becoming the'no FAL' ARCH

ARC0: Becoming the'no SRL' ARCH

ARC1: Becoming the heartbeat ARCH

Attempt to start background Managed Standby Recovery process

MRP0: Background Managed Standby Recovery process started

Managed Standby Recovery not using Real Time Apply

Clearing online redo logfile 1 / oradata/wip/redo01.log

Clearing online redo logfile 1 complete

Media Recovery Waiting for thread 1 sequence 24859

MESSAGE

Redo Shipping Client Connected as PUBLIC

-- Connected User is Valid

RFS [1]: Assigned to RFS process 23716

RFS [1]: Identified database type as' physical standby'

Redo Shipping Client Connected as PUBLIC

-- Connected User is Valid

RFS [2]: Assigned to RFS process 23718

RFS [2]: Identified database type as' physical standby'

Redo Shipping Client Connected as PUBLIC

-- Connected User is Valid

RFS [3]: Assigned to RFS process 23720

MESSAGE

RFS [3]: Identified database type as' physical standby'

Media Recovery Log / oradata/archivelog/1_24859_751423971.dbf

Media Recovery Waiting for thread 2 sequence 14212

Fetching gap sequence in thread 2, gap sequence 14212-14212

Error 12545 received logging on to the standby

FAL [client, MRP0]: Error 12545 connecting to wip1 for fetching gap sequence

Error 12545 received logging on to the standby

FAL [client, MRP0]: Error 12545 connecting to wip1 for fetching gap sequence

Media Recovery Log / oradata/archivelog/2_14212_751423971.dbf

Media Recovery Waiting for thread 3 sequence 13735

Fetching gap sequence in thread 3, gap sequence 13735-13735

MESSAGE

Error 12545 received logging on to the standby

FAL [client, MRP0]: Error 12545 connecting to wip1 for fetching gap sequence

Redo Shipping Client Connected as PUBLIC

-- Connected User is Valid

RFS [4]: Assigned to RFS process 23729

RFS [4]: Identified database type as' physical standby'

Redo Shipping Client Connected as PUBLIC

-- Connected User is Valid

RFS [5]: Assigned to RFS process 23731

RFS [5]: Identified database type as' physical standby'

Error 12545 received logging on to the standby

MESSAGE

FAL [client, MRP0]: Error 12545 connecting to wip1 for fetching gap sequence

Redo Shipping Client Connected as PUBLIC

-- Connected User is Valid

RFS [6]: Assigned to RFS process 23734

RFS [6]: Identified database type as' physical standby'

Media Recovery Log / oradata/archivelog/3_13735_751423971.dbf

Media Recovery Log / oradata/archivelog/2_14213_751423971.dbf

Media Recovery Log / oradata/archivelog/3_13736_751423971.dbf

Media Recovery Waiting for thread 1 sequence 24860

Media Recovery Log / oradata/archivelog/1_24860_751423971.dbf

Media Recovery Log / oradata/archivelog/2_14214_751423971.dbf

MESSAGE

Media Recovery Log / oradata/archivelog/3_13737_751423971.dbf

Media Recovery Waiting for thread 2 sequence 14215

Media Recovery Log / oradata/archivelog/2_14215_751423971.dbf

Media Recovery Waiting for thread 3 sequence 13738

Media Recovery Log / oradata/archivelog/3_13738_751423971.dbf

Media Recovery Waiting for thread 1 sequence 24861

Media Recovery Log / oradata/archivelog/1_24861_751423971.dbf

Media Recovery Log / oradata/archivelog/2_14216_751423971.dbf

Media Recovery Log / oradata/archivelog/3_13739_751423971.dbf

Media Recovery Log / oradata/archivelog/3_13740_751423971.dbf

Media Recovery Waiting for thread 2 sequence 14217

MESSAGE

Media Recovery Log / oradata/archivelog/2_14217_751423971.dbf

Media Recovery Waiting for thread 3 sequence 13741

Media Recovery Log / oradata/archivelog/3_13741_751423971.dbf

Media Recovery Waiting for thread 1 sequence 24862

Media Recovery Log / oradata/archivelog/1_24862_751423971.dbf

Media Recovery Waiting for thread 2 sequence 14218

Media Recovery Log / oradata/archivelog/2_14218_751423971.dbf

Media Recovery Waiting for thread 3 sequence 13742

74 rows selected.

SQL > select switchover_status from v$database

SWITCHOVER_STATUS

-

SESSIONS ACTIVE

8. Open backup and make backup plan

Add script at the same time

[root@DataGuard ~] # crontab-l

# time

158 * / usr/sbin/ntpdate 10.53.1.9 & > / dev/null

Backup script

# dbbackup

200 * / OCS/script/removebackup.sh

15 4 * / OCS/script/rman.sql

168 * / OCS/script/removearchive.sh

[root@DataGuard script] # cat removearchive.sh

/ usr/bin/find / oradata/archivelog-name'* .dbf'- mtime + 6 > / OCS/script/rmlog

For i in `/ bin/cat / OCS/script/ rmlog`

Do

/ bin/rm-f $I

Done

[root@DataGuard script] # cat removebackup.sh

# / bin/ls

# / bin/rm

/ usr/bin/find / mnt/rman-name 'oradb1*' > / OCS/script/rmlog

For i in `/ bin/cat / OCS/script/ rmlog`

Do

/ bin/rm-rf $I

Done

[root@DataGuard script] # cat rman.sql

Su-oracle / mnt/rman/log/RmanBackup_ `date +% y% m% d`.log

/ bin/mv / mnt/rman/oradb / mnt/rman/ oradb`date +% y% m% d`

/ bin/mkdir-p / mnt/rman/oradb

Sqlplus / nolog @ / OCS/script/switch3.sql

Exit

EOF

[root@DataGuard script] # cat rman_full_backup.sql

Run {

Sql 'alter database backup controlfile to trace'

Backup database tag 'FULL' filesperset 1 format' / mnt/rman/oradb/%d_Full_%T_%u_%p_%c'

Crosscheck archivelog all

Delete noprompt expired archivelog all

Crosscheck backup

Delete noprompt expired backup

Backup archivelog all filesperset 5 format'/ mnt/rman/oradb/%d_LOG_%T_%u_%p_%c'

Delete archivelog until time 'sysdate-7'

# backup filesperset 20 format 'al_%s_%p_%t' archivelog all delete input

Copy current controlfile to'/ mnt/rman/oradb/CON_BACKUP.CTL'

Delete noprompt obsolete

}

Exit

[root@DataGuard script] # cat switch2.sql

Connect / as sysdba

Alter database recover managed standby database cancel

Alter database open read only

Exit

[root@DataGuard script] # cat switch3.sql

Connect / as sysdba

Alter database recover managed standby database disconnect from session

Exit

Install agent of CA software for tape backup

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report