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

Restore oracle single instance to single instance on NBU Linux

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Note: the operating system environment of this document is mainly Linux. Suppose you want to restore the financial database.

This article mainly focuses on database recovery, while operating system installation, database installation configuration and NBU client installation configuration are ignored.

Database information to recover:

1. Determine the database information to recover. If the database and the operating system can be accessed normally, you can log in to the database and the operating system to view the information related to the recovery information. If the database or even the operating system is not accessible, you can refer to the "oracle database information collection" document, which records the information related to the recovery of the oracle database.

two。 In order to ensure that the restored database can be used as soon as possible and minimize the modification of the application program, the modified host IP address is consistent with the original database address after recovery.

Prepare the environment:

1. According to the "oracle Database Information Collection" document, install the operating system and database software, in which the version of the operating system should be the same as possible, and the database version should be consistent.

two。 According to the "oracle Database Information Collection" document, mount the appropriate storage, mainly the storage size, the mounted storage must not be less than the total capacity of the database to be recovered, and configure the appropriate ASM disk group. The size and name of the disk group are the same, and the capacity of the disk group can be larger than that of the original disk group.

3. Install NBU client on the client side and ensure that backup files can be accessed properly through NBU client

Restore steps: restore file instructions:

Execute the following command on the operating system:

/ usr/openv/netbackup/bin/bplist-C fxzmd-t 4-l-R /

List the database backup information, some of which are as follows:

-rw-rw---- oracle oinstall 12058624 Aug 26 2014 / C Murray 1492422082-20140826-02

-rw-rw---- oracle oinstall 11796480 Aug 26 2014 / cntrl_365_1_856616015

-rw-rw---- oracle oinstall 12058624 Aug 26 2014 / c Murray 1492422082-20140826-01

-rw-rw---- oracle oinstall 262144 Aug 26 2014 / al_363_1_856615969

-rw-rw---- oracle oinstall 45088768 Aug 26 2014 / al_362_1_856615942

-rw-rw---- oracle oinstall 52166656 Aug 26 2014 / al_361_1_856615942

-rw-rw---- oracle oinstall 12058624 Aug 26 2014 / c Murray 1492422082-20140826-00

-rw-rw---- oracle oinstall 10640128K Aug 26 2014 / bk_358_1_856615605

-rw-rw---- oracle oinstall 9893632K Aug 26 2014 / bk_359_1_856615605

-rw-rw---- oracle oinstall 12058624 Aug 25 19:19 / Cmur1492422082-20140825-02

Information description:

Cntrl_365_1_856616015 stands for control file

Cmur1492422082-20140826-01 indicates a parameter file

Al_362_1_856615942 stands for archived file

Bk_359_1_856615605 represents a data file

Cmur1492422082-20140826-01 means dbid

Restore the spfile file:

This document selects cMel 1492422082-20140826-02 as the recovery object, sets the database DBID, and starts the database to nomount state:

[oracle@FXZMD ~] $rman target /

Recovery Manager: Release 10.2.0.5.0-Production on Tue Aug 26 12:47:21 2014

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

Connected to target database (not started)

RMAN > set DBID=1492422082

Executing command: SET DBID

RMAN > startup nomount

Startup failed: ORA-01078: failure in processing system parameters

LRM-00109: could not open parameter file'/ app/oracle/product/10.2/db_1/dbs/initREPORT.ora'

Starting Oracle instance without parameter file for retrival of spfile

Oracle instance started

Total System Global Area 159383552 bytes

Fixed Size 2094736 bytes

Variable Size 71305584 bytes

Database Buffers 79691776 bytes

Redo Buffers 6291456 bytes

RMAN > run {

2 > allocate channel C1 type 'SBT_TAPE'

3 > send 'NB_ORA_SERV=NBUServer,NB_ORA_CLIENT= FXZMD'

4 > restore spfile from 'cmur1492422082-20140826-02'

5 > release channel C1

6 >}

Using target database control file instead of recovery catalog

Allocated channel: c1

Channel c1: sid=35 devtype=SBT_TAPE

Channel C1: Veritas NetBackup for Oracle-Release 7.5 (2012020801)

Sent command to channel: c1

Starting restore at 27-AUG-14

Channel C1: autobackup found: Cmur1492422082-20140826-02

Channel c1: SPFILE restore from autobackup complete

Finished restore at 27-AUG-14

Released channel: c1

RMAN >

Spfile

Create a pfile and modify the pfile file:

SQL > create pfile='/home/oracle/initfxzmd.ora' from spfile

File created.

Edit pfile:

Create the corresponding directory based on $ORACLE_BASE and $ORACLE_HOME:

Mkdir-p / app/oracle/admin/fxzmd/adump

Mkdir-p / app/oracle/admin/fxzmd/bdump

Mkdir-p / app/oracle/admin/fxzmd/cdump

Mkdir-p / app/oracle/admin/fxzmd/udump

Create a spfile with the modified pfile:

Shut down the database:

SQL > shutdown immediate

ORA-01507: database not mounted

ORACLE instance shut down.

Start the database to nomount with the new pfile:

SQL > startup nomount pfile='/home/oracle/initfxzmd.ora'

ORACLE instance started.

Total System Global Area 4.2446E+10 bytes

Fixed Size 2174824 bytes

Variable Size 3422552216 bytes

Database Buffers 3.9007E+10 bytes

Redo Buffers 14602240 bytes

SQL >

Create a spfile:

SQL > create spfile from pfile='/home/oracle/initfxzmd.ora'

File created.

Close the database and start the database to the nomount state:

SQL > shutdown immediate

ORA-01507: database not mounted

ORACLE instance shut down.

SQL > startup nomount

ORACLE instance started.

Total System Global Area 4.2446E+10 bytes

Fixed Size 2174824 bytes

Variable Size 3422552216 bytes

Database Buffers 3.9007E+10 bytes

Redo Buffers 14602240 bytes

SQL >

Restore the control file:

[oracle@bridge ~] $rman target /

Recovery Manager: Release 10.2.0.5.0-Production on Wed Aug 27 14:40:44 2014

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

Connected to target database: fxzmd (not mounted)

RMAN > run

2 > {

3 > allocate channel C1 type 'SBT_TAPE'

4 > send 'NB_ORA_SERV=NBUServer,NB_ORA_CLIENT=FXZMD'

5 > restore controlfile from 'cntrl_365_1_856616015'

6 > release channel C1

7 >}

Using target database control file instead of recovery catalog

Allocated channel: c1

Channel c1: sid=870 devtype=SBT_TAPE

Channel C1: Veritas NetBackup for Oracle-Release 7.5 (2012020801)

Sent command to channel: c1

Starting restore at 27-AUG-14

Channel c1: restoring control file

Channel c1: restore complete, elapsed time: 00:00:52

Output filename=+DGROUP1/fxzmd/controlfile/current.256.856708891

Finished restore at 27-AUG-14

Released channel: c1

RMAN >

Restore database files:

Start the database to the mount status:

RMAN > alter database mount

Database mounted

Restore the data file:

RMAN > run

2 > {

3 > allocate channel C1 type 'SBT_TAPE'

4 > allocate channel c2 type 'SBT_TAPE'

5 > allocate channel c3 type 'SBT_TAPE'

6 > send 'NB_ORA_SERV=NBUServer,NB_ORA_CLIENT=FXZMD'

7 > restore database

8 > recover database

9 > release channel C1

10 > release channel c2

11 > release channel c3

12 >}

Allocated channel: c1

Channel c1: sid=870 devtype=SBT_TAPE

Channel C1: Veritas NetBackup for Oracle-Release 7.5 (2012020801)

Allocated channel: c2

Channel c2: sid=866 devtype=SBT_TAPE

Channel c2: Veritas NetBackup for Oracle-Release 7.5 (2012020801)

Allocated channel: c3

Channel c3: sid=865 devtype=SBT_TAPE

Channel c3: Veritas NetBackup for Oracle-Release 7.5 (2012020801)

Sent command to channel: c1

Sent command to channel: c2

Sent command to channel: c3

Starting restore at 27-AUG-14

Channel c1: starting datafile backupset restore

Channel C1: specifying datafile (s) to restore from backup set

Restoring datafile 00001 to + DGROUP1/fxzmd/datafile/system.260.851643721

Restoring datafile 00004 to + DGROUP1/fxzmd/datafile/users.264.851643735

Restoring datafile 00005 to + DGROUP1/fxzmd/datafile/fxzmd_data.266.851768783

Restoring datafile 00007 to + DGROUP1/fxzmd/datafile/fxzmd_data.268.851768825

Restoring datafile 00010 to + DGROUP1/fxzmd/datafile/tbs_ogg.276.852039351

Channel c1: reading from backup piece bk_359_1_856615605

Channel c2: starting datafile backupset restore

Channel c2: specifying datafile (s) to restore from backup set

Restoring datafile 00002 to + DGROUP1/fxzmd/datafile/undotbs1.261.851643729

Restoring datafile 00003 to + DGROUP1/fxzmd/datafile/sysaux.262.851643729

Restoring datafile 00006 to + DGROUP1/fxzmd/datafile/fxzmd_data.267.851768799

Restoring datafile 00008 to + DGROUP1/fxzmd/datafile/fxzmd_ndx.269.851768923

Restoring datafile 00009 to + DGROUP1/fxzmd/datafile/fxzmd_ndx.270.851768943

Channel c2: reading from backup piece bk_358_1_856615605

Channel c1: restored backup piece 1

Piece handle=bk_359_1_856615605 tag=HOT_DB_BK_LEVEL0

Channel c1: restore complete, elapsed time: 00:02:35

Channel c2: restored backup piece 1

Piece handle=bk_358_1_856615605 tag=HOT_DB_BK_LEVEL0

Channel c2: restore complete, elapsed time: 00:05:20

Finished restore at 27-AUG-14

Starting recover at 27-AUG-14

Starting media recovery

Channel c1: starting archive log restore to default destination

Channel c1: restoring archive log

Archive log thread=1 sequence=1221

Channel c1: restoring archive log

Archive log thread=1 sequence=1222

Channel c1: reading from backup piece al_363_1_856615969

Channel c1: restored backup piece 1

Piece handle=al_363_1_856615969 tag=TAG20140826 × × 25222

Channel c1: restore complete, elapsed time: 00:00:26

Archivelog filename=+DGROUP1/fxzmd/archivelog/2014_08_27/thread_1_seq_1221.264.856710143 thread=1 sequence=1221

Archivelog filename=+DGROUP1/fxzmd/archivelog/2014_08_27/thread_1_seq_1222.258.856710143 thread=1 sequence=1222

Unable to find archive log

Archive log thread=1 sequence=1223

Released channel: c1

Released channel: c2

Released channel: c3

RMAN-00571: =

RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =

RMAN-00571: =

RMAN-03002: failure of recover command at 08/27/2014 15:02:36

RMAN-06054: media recovery requesting unknown log: thread 1 seq 1223 lowscn 64299772758

RMAN > alter database open

RMAN-00571: =

RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =

RMAN-00571: =

RMAN-03002: failure of alter db command at 08/27/2014 15:03:57

ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

RMAN > alter database open resetlogs

Database opened

Finally, restart the database, and the recovery is complete

Configuration after database recovery: modify the IP address of the host: start listening:

Lsnrctl start

Put spfile from the file system into the ASM disk group:

1. Create a pfile:

SQL > create pfile='/home/oracle/initfxzmd.ora' from spfile

two。 Create a spfile:

SQL > create spfile='+DGROUP1' from pfile='/home/oracle/initfxzmd.ora'

3. Modify pfile:

Create the initfxzmd.ora file under $ORACLE_HOME/dbs, as follows:

SPFILE='+DGROUP1/FXZMD/PARAMETERFILE/spfile.259.856714109'

4. Delete the spfile under $ORACLE_HOME/dbs and restart the database:

SQL > show parameter spfile

NAME TYPE VALUE

-

Spfile string + DGROUP1/fxzmd/parameterfile/spfile.259.856714109

Modified successfully, spfile is successfully placed in the ASM disk group

5. In order to see the recovered database properly in dbca, you need to use the

Add the following at the end of the / etc/oratab file:

Fxzmd:/app/oracle/product/10.2/db_1:N

6. Finally, make a complete database!

# # end of recovery 20140827 #

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