Oracle 9i. RMAN. How to restore standby controlfile using "from tag" clause
-bash-3.00$ rman target / catalog rman/rman@emgc
Recovery Manager: Release 9.2.0.8.0 - 64bit Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: crvs (not mounted)
connected to recovery catalog database
RMAN> list backup tag stby_ctrl;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
142851 Full 7M SBT_TAPE 00:01:44 02.02.11
BP Key: 142852 Status: AVAILABLE Tag: STBY_CTRL
Piece Name: CRVS_20110202.c7m3kbrd_1_1.stb
Controlfile Included: Ckp SCN: 67168490043 Ckp time: 02.02.11
RMAN> run
ALLOCATE CHANNEL ch1 DEVICE TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/oracle/apps/osb/lib/libobk.so';
RESTORE standby CONTROLFILE from tag stby_ctrl;
release channel ch1;
2> 3> 4>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01005: syntax error: found "from": expecting one of: "to"
RMAN-01007: at line 4 column 29 file: standard input
RMAN> run
ALLOCATE CHANNEL ch1 DEVICE TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/oracle/apps/osb/lib/libobk.so';
RESTORE CONTROLFILE from tag stby_ctrl;
release channel ch1;
2> 3> 4> 5> 6>
allocated channel: ch1
channel ch1: sid=13 devtype=SBT_TAPE
channel ch1: Oracle Secure Backup
Starting restore at 04.02.11
released channel: ch1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 02/04/2011 09:49:26
RMAN-06026: some targets not found - aborting restore
RMAN-06024: no backup or copy of the controlfile found to restore
RMAN> run
ALLOCATE CHANNEL ch1 DEVICE TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/oracle/apps/osb/lib/libobk.so';
RESTORE CONTROLFILE from 'CRVS_20110202.c7m3kbrd_1_1.stb';
release channel ch1;
2> 3> 4> 5> 6>
allocated channel: ch1
channel ch1: sid=13 devtype=SBT_TAPE
channel ch1: Oracle Secure Backup
Starting restore at 04.02.11
channel ch1: restoring controlfile
channel ch1: restore complete
replicating controlfile
input filename=/data02/crvs/ctrl/control01.ctl
output filename=/data02/crvs/ctrl/control02.ctl
Finished restore at 04.02.11
released channel: ch1
RMAN>
The error message states:
RMAN-01005: syntax error: found "from": expecting one of: "to"restore TO where?
Personally I'd never use RMAN to restore a control file. Takes less time to job copy an existing one.
Similar Messages
-
How to restore a table using RMAN with previous backup ?
Hi everyone,
we have to restore a table from 1 week previous backup using RMAN.
Could you show me how to restore a table using RMAN with previous full backup.
please Help me out.
Thanks
Info > oracle 10g, OS: AIX5LHi,
first of all you must have all the archivelogs since you want to recover your table from the previous backups.
anyways if you want to recover your table then you need to perform incomplete recovery to the point where you loss the table for that you need to restore and recover your database.you likely to loose all the transcation which occurs to the point where you you loose your table.
thanks.. -
Create a standby controlfile using cold backup
Hi All,
We have to setup a DR for a production database.
Here we have the coldbackup which backups all the datafiles and the control file from the production database.
For cloining we generally copy them to another instance and then create controlfile manually. But for setting up as a DR , we would be creating it for standby controlfile.
I tried to google but I am not able to find a way to create a standby controlfile from the existing controlfile cold backup.
OS version solaris 10 , database version 11.2.0.1
Regards
KK
Edited by: Kk on Feb 16, 2012 8:51 AMKk wrote:
Hi All,
We have to setup a DR for a production database.
Here we have the coldbackup which backups all the datafiles and the control file from the production database.
For cloining we generally copy them to another instance and then create controlfile manually. But for setting up as a DR , we would be creating it for standby controlfile.
I tried to google but I am not able to find a way to create a standby controlfile from the existing controlfile cold backup.
OS version solaris 10 , database version 11.2.0.1
Regards
KK
Edited by: Kk on Feb 16, 2012 8:51 AMTry as below
My version:
SQL> select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
SQL>1) Taken backup of current controlfile
2) Deleted Current controlfiles
3) Restored using standby clause from current controlfile
4) Mounted & now controlfile type is Standby
Try in this way when you have cold backup. :)
SQL> select controlfile_type from v$database;
CONTROL
CURRENT
RMAN> run
2> {
3> allocate channel ch1 device type disk format 'c:\oracle\control%U.bkp';
4> backup current controlfile;
5> release channel ch1;
6> }
using target database control file instead of recovery catalog
allocated channel: ch1
channel ch1: SID=63 device type=DISK
Starting backup at 16-FEB-12
channel ch1: starting full datafile backup set
channel ch1: specifying datafile(s) in backup set
including current control file in backup set
channel ch1: starting piece 1 at 16-FEB-12
channel ch1: finished piece 1 at 16-FEB-12
piece handle=C:\ORACLE\CONTROL08N3GEA6_1_1.BKP tag=TAG20120216T230334 comment=NONE
channel ch1: backup set complete, elapsed time: 00:00:01
Finished backup at 16-FEB-12
released channel: ch1
RMAN> exit
RMAN> restore standby controlfile from 'C:\ORACLE\CONTROL08N3GEA6_1_1.BKP';
Starting restore at 16-FEB-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=66 device type=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
output file name=C:\ORACLE\ORADATA\ORCL\CONTROL01.CTL
output file name=C:\ORACLE\FLASH_RECOVERY_AREA\ORCL\CONTROL02.CTL
Finished restore at 16-FEB-12
SQL> alter database mount;
Database altered.
SQL> select controlfile_type from v$database;
CONTROL
STANDBY
SQL>
Some More information:-
Even if your database backup is old, still you can create a new standby controlfile and restore new controlfile and restore database. Later after starting MRP all will be synchronized. No issues
SQL> select controlfile_type from v$database;
CONTROL
CURRENT
SQL> alter database create standby controlfile as 'c:\oracle\control_stby.ctl';
Database altered.
SQL> $dir c:\oracle\con*
Volume in drive C is System
Volume Serial Number is 1853-3E21
Directory of c:\oracle
02/16/2012 11:41 PM 9,748,480 CONTROL_STBY.CTL
1 File(s) 19,546,112 bytes
0 Dir(s) 177,185,570,816 bytes free
SQL>Now Just restore database. You already have backup.
Or
If you have opportunity you can go ahead for Duplicate/Duplicate from active database
Edited by: CKPT on Feb 16, 2012 11:41 PM -
How to restore my iPhone using a iPad?
How to restore my iPhone using a iPad?
You can't. You'll need a computer with iTunes installed.
-
How to restore a deleted file from the iCloud
How to restore a deleted file from the iCloud
first you right click on the ipad (on the left in itunes): restore from backup.
It will restore to factory ALL data anda apps
At some point it will offer restoration from itunes, but you will only see backups made on your computer.
If you wish to restore from icloud you forget itunes on your computer, go to the ipad and follow the instructions. At some point you will be asked to choose from icolud or confgiure it as a new ipad.
it works -
Why itunes failed to install apps on iphone after update to ios 6.0.1? And how to restore my purshased apps from itunes?
See:
Frequently asked questions about viewing and syncing video with iTunes and iPod
Why can't I transfer videos to my iPod?
iTunes: May be unable to transfer videos to iPhone, iPad, or iPod -
How to create standby controlfile from restored backup
Hi Techies,
I am re-building one of my DR server, Source and target DB is oracle 10g.
I have taken the source backup which is going to be restored on target, But I forgot to take a standby controlfile from source DB at the time (Pre/Post) backup.
Now the issue is I can create a standby controlfile on primary and copy the same to target, But so many datafiles are added after the backup which I have taken to restore and medias are already shipped.
I can send the other set of backup to DR site, but it takes a week time and I don't want to do that If I can regenerate it.
So any clue to create standby controlfile on target with restored datafiles?
Regards,
Nick LoyHmm... sounds like you perform this in a rather manual fashion...
Do you use RMAN for taking the backups?
Or maybe the BR*TOOLS?
With these tools you are usually safe from such mistakes - I can only recommend to use them!
However, since you don't have a control file at all on the target side, the only thing left to do would be to
ALTER DATABASE BACKUP CONTROLFILE TO TRACE NORESETLOGS;
on the primary side and manually remove the files that have been added since you took the backup from the control file script,
Afterwards you use the script on the standby side to create the control files.
regards,
Lars -
How to restore specific backup file from RMAN?
Hi,
I am just begginer with Oracle DB so I do not have a lot knowledge.
I created two backups at April the 8th and April the 10th.
I did following from RMAN.
shutdown immediate
startup mount
configure channel 1 device type disk format '/opt/oracle/backup/std_%U';
backup database
startup
output was:
including current control file in backupset
including current SPFILE in backupset
it created two files: std-0so6l0vn(2 GB) and std_0to6l106 (7 MB).
First question - first file is backup and what is the second file???
Today I created also backup and it also created two files: std_0uo6morg (2GB) and std_0vo6morv (7MB)
Now I want to return backup from 2 days ago (*std-0so6l0vn*) but can't;
I do the the following:
shutdown immediate
startup mount
restore database from '/opt/oracle/backup/std_0so6l0vn'
but getting error - only SPFILE or control file can be restored from autobackup.
How to restore my backup from two days ago? It looks to me so complicated and hardly understandable.
What command to execute from RMAN to succeed in restore?
Thank youI still can not restore database; I tried Honza method.
i try
startup nomount
restore controlfile from 'restore controlfile from /opt/oracle/backup/sss_11o7efd9_1_1';
And getting message:
no autobackup found or specified handle is not a valid copy or piece
list backup returns:
BS Key Type LV Size Device Type Elapsed Time Completion Time
19 Full 6.80M DISK 00:00:01 19-APR-13
BP Key: 19 Status: AVAILABLE Compressed: NO Tag: TAG20130419T025522
Piece Name: /opt/oracle/backup/sss_11o7efd9_1_1
Control File Included: Ckp SCN: 3178467 Ckp time: 19-APR-13
SPFILE Included: Modification time: 02-APR-13
show all returns:
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
configuration for DISK channel 2 is ignored
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/opt/oracle/backup/sss_%U';
CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT '/opt/oracle/backup/sss_%U';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/opt/oracle/product/10.2.0/dbs/snapcf_ctginst1.f'; # default
Please help I really must restore database but can't do it. -
How to restore Emails to Mail from Time Machine?
Does anyone know how I restore my Mail contents?
I have restored my User to a Mac mini from Time Machine.
But my Mail contents were not restored.
I have not been able to find any intructions to restore my Mail contents.Quit Mail. Force quit if necessary.
Back up all data. That means you know you can restore the Mail database, no matter what happens.
Triple-click the text on the line below to select it:
~/Library/Mail/V2/MailData/Envelope Index
Copy the selected text to the Clipboard (command-C). In the Finder, select
Go ▹ Go to Folder
from the menu bar. Paste into the box that opens (command-V), then press return.
A Finder window will open with a file selected. Move the selected file to the Desktop, leaving the window open. Other files in the folder may have names that begin with "Envelope Index". Move those files, if any, to the Trash.
Log out and log back in. Relaunch Mail. It should prompt you to re-import your messages. You may get a warning that the index is corrupt and that Mail has to quit. Click OK.
Test. If Mail now works as expected, you can delete the file you moved to the Desktop. Otherwise, post your results. -
How to restore a site deleted from SharePoint Designer 2010
Hi All,
I have opened a test server site in share point designer 2010, & deleted that particular site in SP designer 2010,can anyone let me know how to restore the site by using SharePoint Designer?
I followed below mentioned procedure to restore the site using SharePoint Designer
Open SharePoint Designer, File tab, Sites under File Tab, Open site, specified the URL of site,opened..
It is getting connected to the Organisation network & showing "path does not exist,check the path and try again".
Whether, Is it possible to restore the site deleted from share point designer in site collection recycle bin. or
Is it possible to copy the site from Production server to test server.
Waiting for an response at the earlier.
Thanks in Advance.
BadriHi Badri,
1.You could not restore site deleted from SharePoint designer in site collection, you can only restore the site deleted from
UI in site collection recycle bin, deleted from end user recycle bin.
2.You can export the site from production server, then import it to test server.
http://technet.microsoft.com/en-us/library/ff607895(v=office.14).aspx
Best Regards.
Kelly Chen
TechNet Community Support -
How to restore all aperture photos from Time Machine
My 2 main Aperture libraries are all messed up (cannot get photos back into their correct projects, some thumbnails are empty, etc. etc. I think it's time to just restore all the photos from TimeMachine/External hardrive back into one NEW single Aperture library. How do I do this?
I think it's time to just restore all the photos from TimeMachine/External hardrive back into one NEW single Aperture library. How do I do this?
That are two tasks that you want to do in one - restoring from Time Machine and creating a new, merged Aperture library. Ths cannot be done in one go.
You can use Time Machine to restore your two libraries from the backup. But since Time Machine does not do archival backups of photo libraries, you can only restore the last backup TM made. Depending on when you last ran TM, this may very well be the current versions of your Aperture libraries.
To restore a library from Time Machine:
Connect the backup drive.
In the Finder navigate to the folder with your Aperture Libraries (for example "Pictures") and open this folder as the front-most Finder Window.
With this window selected, go to the TM icon in the Finder's menu bar and "Enter Time Machine".
In the TM Time Line at the right of the TM Time Tunnel select the current backup and select the Aperture library in the Finder window. Select to "Restore to" this library to a different folder, so that you do not overwrite your current library.
Once you have restored both libraries, check, if the projects that you are concerned about are now separated again and are showing all thumbnails.
To help you to create a new, combined library from the restored library, we will need to know more. There are several options, e.g.:
Merging the two libraries by importing one into the other.
Exporting all your originals, project by project, and reimporting them.
What is your Aperture 3 version number? Do you have the latest version 3.4.5 or an earlier version?
How to proceed will depend on what you could recover from Time Machine.
Regards
Léonie -
How to restore iPhone 3G back from OS4 to previous version of the OS?
OS4 is PAINFULLY slow on our 3G phones. Anyone have instructions on how to restore the 3G phone back to the 3.x OS?
As there is no official way it cannot be talked about here...thus our suggestion for Google. If you cannot find info, try different search terms. Like rollback OS or something else.
-
How to restore library and iPod from external flash drive
I had trouble getting my iPod to load new music after I got a new PC. I reinstalled iTunes and the new music loaded but the old music in my library and iPod were deleted. How do I transfer my music from my flash drive back to my library and iPod classic?
did you ever find the answer to this question? I have the same problem
-
How to restore previous session using the control panel
I have tried all pathways through firefox with no results. There is a way to restore previous session using the control panel. I tried it before and it worked but I forgot to write down the pathway and lost this method. Does anyone know it?
thank youI can't think of anything useful in the Windows Control Panel, but perhaps you were using the System Restore feature? As a shortcut for that, you could try the Previous Versions tab of the Properties dialog for sessionstore.js or sessionstore.bak.
First, I recommend backing up your current sessionstore files.
Open your current Firefox settings (AKA Firefox profile) folder using
Help > Troubleshooting Information > "Show Folder" button
Leaving that window open, switch back to Firefox and Exit
Copy sessionstore.js and sessionstore.bak to a safe location (e.g., Documents folder). If you cannot see those file extensions, try this Microsoft support article: [http://support.microsoft.com/kb/865219].
Then right-click sessionstore.js, click the Previous Versions tab, and see what is available. -
How do I install and use JSP tags?
could some one show me how to use the tags that is available in http://www.servletsuite.com/jsp.htm? It comes with .jar and tld but I have no idea what to do with them. I am new to JSP so please forgive me if it is a dumb quesion, Thanks.
See my code below, I can use the sql and core but I cannot use the dbtag, it complains unable to connect. I am not sure if I enter the driver and URL correctly. Hopefully that is the right format.
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://www.servletsuite.com/servlets/dbtag" prefix="dbtag" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<sql:query var="rs" dataSource="jdbc/SangwebDB">
select name,username,email from sangweb_users
</sql:query>
<h2>Results</h2>
<c:forEach var="row" items="${rs.rows}">
name ${row.name}
email ${row.email}
</c:forEach>
<dbtag:openConnection driver="com.mysql.jdbc.Driver'" url="jdbc:mysql://localhost:3306/sangweb?autoReconnect=true" user="testuser" password="testuser" id="A"/>
<dbtag:ifError id="A">
<br>Could not connect to database
<br>Error is: <dbtag:getError id="A"/>
</dbtag:ifError>
<dbtag:setQuery id="A" query="select name,username,email from sangweb_users" res="B" />
Found <dbtag:getCount res="B"/> records
<dbtag:closeConnection id="A" />
</body>
</html>
Maybe you are looking for
-
My itunes songs won't sync to my ipod 4th generation,but my apps are fine. And the songs EVEN play on my laptop. How do i fix this? THANKS!
-
How to install html5 and css3 in my DW cs6 i cant download updates from adobe :/
how to install html5 and css3 in my DW cs6 i cant download updates from adobe :/
-
Just purchased Xcelsius Server 2008 and it will not open
I have been using the xcelsius 2008 server trial edition and decided to purchase the full product. After I paid, I received a product key and a link to download. When I open the trial version, it has a link to enter a product key, so I entered the
-
Dear sir, i`m using pavilion dv4-1241tx model laptop, i like to purchase adapter and battery....wat is the prices?????
-
Customizing Datagrid's HeaderColumn
I created a custom HeaderRenderer for a DataGrid. Looking at the attached image in the "Station" column, how can have the sort Arrow and it's background change to the same color(blue) as the the custom HeaderRenderer's? Also, is there anyway to edit/