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

How to realize off-machine recovery of oracle database Rman backup under Linux environment

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

Share

Shulou(Shulou.com)05/31 Report--

Editor to share with you how to achieve off-machine recovery of oracle database Rman backup in Linux environment, I believe most people do not know much about it, so share this article for your reference. I hope you will gain a lot after reading this article. Let's learn about it together.

The backup database and the database to be restored are the same version of the OS and database, and the restored directories are the same!

Back up the database:

RMAN > backup format'/ home/oracle/scripts/full_prod.%U' database plus archivelog

Backup control files:

RMAN > backup current CONTROLFILE format'/ home/oracle/scripts/control.%U'

Confirm all folder paths. It is best to create the same path as the source database, otherwise you need to specify the path.

SYS@PROD > select name from v$datafile

SYS@PROD > select member from v$logfile

SYS@PROD > select name from v$controlfile

Transfer spfile to the server to be restored

[oracle@wangxx1 dbs] $scp spfilePROD.ora 172.16.12.117:/u01/app/oracle/product/11.2.0/dbhome_1/dbs

SYS@PROD > create pfile from spfile

Create the corresponding directory according to the location of the pfile file

[oracle@wangxx2] $mkdir-p / u01/app/oracle/oradata/PROD/

[oracle@wangxx2 dbs] $mkdir-p / u01/app/oracle/admin/PROD/adump

Transfer backup files to the same location

[oracle@wangxx1 scripts] $scp full 172.16.12.117:/home/oracle/scripts

[oracle@wangxx1 scripts] $scp control 172.16.12.117:/home/oracle/scripts

Restore control files from the specified backup set

[oracle@wangxx2 scripts] $rman target /

Recovery Manager: Release 11.2.0.4.0-Production on Mon Jan 8 10:14:24 2018

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

Connected to target database: PROD (not mounted)

RMAN > set DBID=358601116

RMAN > restore CONTROLFILE from'/ home/oracle/scripts/control.07so5c0l_1_1'

Starting restore at 08-JAN-18

Using target database control file instead of recovery catalog

Allocated channel: ORA_DISK_1

Channel ORA_DISK_1: SID=10 device type=DISK

Channel ORA_DISK_1: restoring control file

Channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

Output file name=/u01/app/oracle/oradata/PROD/control01.ctl

Output file name=/u01/app/oracle/oradata/PROD/control02.ctl

Finished restore at 08-JAN-18

RMAN > restore database

RMAN > recover database

Starting recover at 08-JAN-18

Using channel ORA_DISK_1

Using channel ORA_DISK_2

Starting media recovery

RMAN-00571: =

RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =

RMAN-00571: =

RMAN-03002: failure of recover command at 01/08/2018 11:23:34

RMAN-06053: unable to perform media recovery because of missing log

RMAN-06025: no backup of archived log for thread 1 with sequence 49 and starting SCN of 2002997 found to restore

It is normal to report an error because the online log has not been copied!

RMAN > alter database open resetlogs

Database opened

SYS@PROD > select status from v$instance

STATUS

OPEN

The above is all the contents of the article "how to achieve off-machine recovery of oracle database Rman backup in Linux environment". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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