Restoring oracle__oracle with TSM in a different machine

Source: Internet
Author: User

Original: http://space.itpub.net/189512/viewspace-701939

Background
Oracle 10.2.0.4 is running on a machine, and a full DB backup of Oracle is included with the TSM for database5.5.1, including an archive log.
The Oracle 10.2.0.4 code is installed on the B machine. You want to restore A's database to B because there is a problem with the a machine hardware. Install the TSM for database 5.5.1, using the same TSM nodename, for example, Dpo.

1, no spfile, no control files, the most typical is not to start the database
2, the use of TSM backup first restore SPFile.

Use this command to view Oracle control file names in TSM backup space

Dsmadmc> Select Node_name,ll_name from backups where node_name= ' Dpo '

Any instant control file beginning with C can find the highest number of files (most recent) files for recovery;

3, enter the Rman command line

Rman Target/
rman> shutdown immediate;
rman> startup Nomount;
Rman> Set dbid=1367687269

Note: dbid can be found from the A-machine v$database view

Rman> Run {
Allocate channel D1 type ' stb_tape ' parms ' env= (tdpo_optfile=/usr/tivoli/tsm/client/api/bin64/tdpo.opt) ';
SET controlfile autobackup FORMAT for DEVICE TYPE sbt_tape to '%F ';
Restore spfile from ' c-xxxxxx ';
}

rman> shutdown immediate;
Rman> quit

4, when the SPFile restore, with this spfile reboot

5, if it is on the new machine to do Level 1 recovery, it may be due to the lack of directory structure error.

The main 2 main directories need to be fully supplemented under $oracle_home

5.1 The Instance/xdump under the/u01/app/admin of the main catalogue

$CD/u01/app/admin

$ mkdir–pinstance_name/adumpinstance_name/bdumpinstance_name/cdumpinstance_name/udump

5.2 Another home directory is the datafile directory

/u01/app/oracle/dbs/under the

$ mkdirinstance_name

(Av$datafile view can be queried) select name from V$datafile;

6, now restore the control file
rman> startup Nomount;
Rman> Run {
Allocate channel D1 type ' stb_tape ' parms ' env= (tdpo_optfile=/usr/tivoli/tsm/client/api/bin64/tdpo.opt) ';
rman> restore Controlfile from ' cxxxxxxxxxxxxxx '
Rman>}
Rman> quit

7, restore the control file, Shudown, and then back to the Nomount state restore the database data files
sql> startup Nomount;

Restoring data files
Rman> Run {
Allocate channel D1 type ' stb_tape ' parms ' env= (tdpo_optfile=/usr/tivoli/tsm/client/api/bin64/tdpo.opt) ';
Restore database;
Release channel D1;
}

8, restore the database

Rman> Run {
Allocate channel D1 type ' stb_tape ' parms ' env= (tdpo_optfile=/usr/tivoli/tsm/client/api/bin64/tdpo.opt) ';
Recover database;
Release channel D1;
}
Rman> quit

(The recovery will be reported Rman-06054,media Recovery......unkown log...thread 1 sequence 33 ...)


9, Need Resetlog

sql> Recover database using Backup controlfile until cancel;

Prompt when you enter: Cancel

sql> ALTER DATABASE open resetlogs;

(You must do resetlogs if you are using a backup controlfile recovery)

b Machine Restore complete, you can use the normal.

Run
{
Allocate channel T1 device type ' SBT ' parms ' env= (tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt) ';
Restore Controlfile;
ALTER DATABASE Mount;
Restore database;
Recover database;
Release channel D1;
Release channel D2;
SQL "ALTER DATABASE open Resetlogs";
Release channel T1;
}

run{
Allocate channel T1 device type ' SBT ' parms ' env= (tdpo_optfile=c:\program files\tivoli\tsm\agentoba\tdpo.opt) ';
Restore database;
Release channel T1;
}

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.