Home » RDBMS Server » Backup & Recovery » Restore ControlFile to new host
Restore ControlFile to new host [message #250877] Wed, 11 July 2007 12:55 Go to next message
TLegend33
Messages: 203
Registered: March 2005
Senior Member
Linux RHEL4/Oracle 10.2
I'm testing out recovery scenarios. I successfully executed the below command in rman:

run {
allocate channel dev1 type disk;
backup incremental level 0
format '/d20/oradata/T_DEV/backup/t_dev_backup_%U'
database
include current controlfile;
release channel dev1;
}

When I attempt to restore my backup to the new host, how can I restore the controlfile I backed up in my command above? Do I need controlfile autobackup enabled?

Thanks.
Re: Restore ControlFile to new host [message #250884 is a reply to message #250877] Wed, 11 July 2007 13:49 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
"restore controlfile from backupset"

Regards
Michel
Re: Restore ControlFile to new host [message #250888 is a reply to message #250884] Wed, 11 July 2007 14:02 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
Quote:
Do I need controlfile autobackup enabled?

If you enable that then only this command

RMAN>restore spfile from autobackup.
RMAN>restore conrtrolfile from autobackup;
Re: Restore ControlFile to new host [message #250891 is a reply to message #250884] Wed, 11 July 2007 14:08 Go to previous messageGo to next message
TLegend33
Messages: 203
Registered: March 2005
Senior Member
The only syntax I can find is:
restore controlfile from autobackup

Re: Restore ControlFile to new host [message #250893 is a reply to message #250888] Wed, 11 July 2007 14:11 Go to previous messageGo to next message
TLegend33
Messages: 203
Registered: March 2005
Senior Member
What if I do not have controlfile autobackup enabled? But rather included the:
'include current controlfile;'
within my rman script as detailed in my initial message?
Re: Restore ControlFile to new host [message #250897 is a reply to message #250893] Wed, 11 July 2007 14:20 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
And does my answer not fit your question?

Regards
Michel
Re: Restore ControlFile to new host [message #250898 is a reply to message #250897] Wed, 11 July 2007 14:22 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
Michel Cadot wrote on Wed, 11 July 2007 13:20
And does my answer not fit your question?

Regards
Michel




He's being lazy .He don't try to read the whole concept... Razz

[Updated on: Wed, 11 July 2007 14:22]

Report message to a moderator

Re: Restore ControlFile to new host [message #250900 is a reply to message #250898] Wed, 11 July 2007 14:24 Go to previous messageGo to next message
TLegend33
Messages: 203
Registered: March 2005
Senior Member
I'm confused, I'm being lazy? Here's the output from your seggestion:

RMAN> run {
2> allocate channel dev1 device type disk;
3> restore controlfile from backupset;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "backupset": expecting one of: "autobackup, double-quoted-string, single-quoted-string, tag"
RMAN-01007: at line 3 column 26 file: standard input

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found ";": expecting one of: "allocate, alter, backup, beginline, blockrecover, catalog, change, connect, copy, convert, create, crosscheck, configure, duplicate, debug, delete, drop, exit, endinline, flashback, host, {, library, list, mount, open, print, quit, recover, register, release, replace, report, renormalize, reset, restore, resync, rman, run, rpctest, set, setlimit, sql, switch, spool, startup, shutdown, send, show, test, transport, upgrade, unregister, validate"
RMAN-01007: at line 3 column 35 file: standard input


What whole concept did I not read?
Re: Restore ControlFile to new host [message #250902 is a reply to message #250898] Wed, 11 July 2007 14:26 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
you can also use

RMAN> RESTORE CONTROLFILE from 'filename';

RESTORE CONTROLFILE FROM TAG 'monday_cf_backup'; 
Re: Restore ControlFile to new host [message #250903 is a reply to message #250902] Wed, 11 July 2007 14:29 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
RMAN> list backupset;
  Backup Set Copy #1 of backup set 76481
  Device Type Elapsed Time Completion Time     Compressed Tag
  ----------- ------------ ------------------- ---------- ---
  DISK        00:09:39     07-11-2007 06:29:15 NO         TAG20070711T181933

    List of Backup Pieces for backup set 76481 Copy #1
    BP Key  Pc# Status      Piece Name
    ------- --- ----------- ----------
    76519   1   AVAILABLE   /u101/oracle/ds/backup/al_9fimj4do_1_1.bck
    76520   2   AVAILABLE   /u101/oracle/ds/backup/al_9fimj4do_2_1.bck

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
76699   Full    13.58M     DISK        00:00:01     07-11-2007 06:29:30
        BP Key: 76734   Status: AVAILABLE  Compressed: NO  Tag: CF1
        Piece Name: /u101/oracle/ds/backup/cf_9limj509_1_1.bck
  Control File Included: Ckp SCN: 13390063757   Ckp time: 07-11-2007 06:29:29



RMAN>RESTORE CONTROLFILE FROM TAG 'TAG20070711T181933';

[Updated on: Wed, 11 July 2007 14:30]

Report message to a moderator

Re: Restore ControlFile to new host [message #250904 is a reply to message #250900] Wed, 11 July 2007 14:29 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You didn't read the page.
I didn't say I posted the full syntax, it is the way to use it.
You have to work a little bit.

Regards
Michel
Re: Restore ControlFile to new host [message #250908 is a reply to message #250877] Wed, 11 July 2007 15:12 Go to previous messageGo to next message
TLegend33
Messages: 203
Registered: March 2005
Senior Member
I am doing the work. I was confused by your answer.
Re: Restore ControlFile to new host [message #251856 is a reply to message #250877] Mon, 16 July 2007 23:54 Go to previous messageGo to next message
Arju
Messages: 1554
Registered: June 2007
Location: Dhaka,Bangladesh. Mobile:...
Senior Member

Copy the backupset into the new host. And in new host use file location and use .

As you are using OS command to copy backup set into a new host so RMAN does not know where the backup set is. So you manually specily filename clause to locate your backupset.

restore controlfile from 'filename' ;

[Updated on: Mon, 16 July 2007 23:56]

Report message to a moderator

Re: Restore ControlFile to new host [message #251985 is a reply to message #251856] Tue, 17 July 2007 10:53 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
Arju wrote on Mon, 16 July 2007 22:54
Copy the backupset into the new host. And in new host use file location and use .

As you are using OS command to copy backup set into a new host so RMAN does not know where the backup set is. So you manually specily filename clause to locate your backupset.

restore controlfile from 'filename' ;




not neceassry because backup information is in controlfile the oracle will read the controlfile
for backup only one thing matters
and that is the location if you gonna paste
the backup to same location then just enter the command

restore database;

[Updated on: Tue, 17 July 2007 10:54]

Report message to a moderator

icon14.gif  Re: Restore ControlFile to new host [message #618944 is a reply to message #251985] Wed, 16 July 2014 12:40 Go to previous messageGo to next message
sobennett@pa.gov
Messages: 1
Registered: July 2014
Junior Member
Thanks so much. I was going back and forth with error messages, but your simple, straight-forward explanation did the trick!
Re: Restore ControlFile to new host [message #618945 is a reply to message #251985] Wed, 16 July 2014 12:50 Go to previous messageGo to next message
EdStevens
Messages: 1376
Registered: September 2013
Senior Member
DreamzZ wrote on Tue, 17 July 2007 10:53


not neceassry because backup information is in controlfile the oracle will read the controlfile


Except that in this case, the control file itself is what is being recovered .... Shocked

Re: Restore ControlFile to new host [message #618946 is a reply to message #618945] Wed, 16 July 2014 12:54 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Ed, this is a 7 years old topic, no one is at the other end... Smile

Re: Restore ControlFile to new host [message #618960 is a reply to message #618946] Wed, 16 July 2014 22:23 Go to previous message
EdStevens
Messages: 1376
Registered: September 2013
Senior Member
Michael,

Oops! I got sucked in by the 7-year (almost to the day!) "thank you" and failed to notice the dates of the OP. Embarassed
Previous Topic: RMAN backups increase in size and don't delete
Next Topic: Flashback Database
Goto Forum:
  


Current Time: Thu Mar 28 07:01:05 CDT 2024