Question

How to restore archive logs from rman backup?

Asked by: NJDfan1711

Hi,

I have two servers, one with our production database, and another hosting a standby database.  Each also has its own catalog database as well.  I took a full rman backup this morning at 6:30am and used it to restore onto the standby server -- it included the spfile, controlfile, datafiles, etc.  The standby database is working great, and mirrors production as of 6:30am.  

At 12:30pm I did a backup of my archive logs from the prod database.  The file is PTMN_ARCH_K1KLU4EK_1_1.BKP and is roughly 700MB in size.  I am copying it to my standby server to my flash recovery area, but it doesn't seem like RMAN sees it.  I do a "list backup from 2009-08-05:12:35:00" and get no results.  

Can anyone tell me the proper command to use this particular file to "roll my database forward" so that it will mirror the prod database as of 12:30pm?

My flash recovery area is G:\oracle\product\10.2.0\flash_recovery_area\<SID> which is where the files for my spfile+controlfile in the form of .bkp files reside.  However, I also have the actual rman backup files database+archivelogs in this directory:  D:\rman_backup\database.

How do I know which directory this file belongs in?  

Many thanks!

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-08-05 at 12:01:27ID24629188
Tags

Oracle

,

RMAN

,

archive logs

,

backup

,

restore

Topics

Oracle CRM

,

Oracle Database

,

Oracle 10.x

Participating Experts
4
Points
500
Comments
49

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Error trying to backup archivelog in RMAN
    I ran a scenario where i removed a control file and then restored it with the following commands: RMAN> shutdown abort; RMAN> startup nomount; RMAN> restore controlfile; RMAN> alter database mount; RMAN> restore database; RMAN> recover database; RMA...
  2. RMAN -- ARCHIVE LOG FILE PROBLEM
    Hi, OS/windows 2003 Database/Oracle9i ----- I face this RAMN error this , but my database is working well there is no error on database base Rman is looking this archive log file ARC_69241.LOG but this file is too old(feb,2007) and no more in the system in the database t...
  3. Oracle - RMAN
    I am configuing RMAN to backup my database. I will be backing up the database every night. In the backups, I want to include the archive logs but delete them once they have been backed up. Can I use the following command? backup database plus archivelog delete input; Bel...
  4. Oracle RMAN backup of archivelogs
    Hi, I tend to do an RMAN coldback of my DB using a "backup database" command in RMAN and it works fine. I am trying to use RMAN to backup the archivelogs but it keeps spitting out the following errors: ORA-19715: invalid format c for generated name ORA-27302: fa...
  5. RMAN delete archivelog
    How could I implement this in RMAN i am not doing RMAN BACKUP but want to use RMAN TO DO THIS. 1) Delete archivelogs on my PRIMARY server only when these logs are successfully TRANSFERED to all my standby databases? 2) Delete archivelogs on my STANDBY server only when these l...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: NJDfan1711Posted on 2009-08-06 at 04:48:41ID: 25032147

Anyone?

 

by: rolutolaPosted on 2009-08-06 at 05:00:34ID: 25032213

If the file paths are the same on the production and the standby, then make sure the rman configuration settings are the same. Make sure the init.ora or spfile are identical for the archivelog locations.

I think you also need to crosscheck archivelogs so that the catalog can discover the existing archivelog(s).

Normally when you issue recover database with RMAN, it automatically looks for the required archivelogs inthe location specified.

R.

 

by: NJDfan1711Posted on 2009-08-06 at 05:24:23ID: 25032404

Yes, the directory structures are both servers are identical.  Also, the spfile does not seem to show any RMAN configuration settings.  When I do a "show all" from RMAN prompt, both servers configurations are also identical except for one setting:  "configure snapshot controlfile name" points to a different folder on the prod server than it does on the standby server... but I think that is irrelevant for this discussion, right?

When I issued crosscheck archivelog all from th standby server it crosschecked 13 objects, but again it still didn't use the .bkp file which I copied to the flash recovery area on the G: drive.  Instead it found archive logs with .arc extension in two locations.

The first:  G:\oracle\product\10.2.0\flash_recovery_area\PTMN\ARCHIVELOG\2009_08_05
The second: L:\archive_logs\ptmn\ptmn\autobackup\2009_08_05

Am I unable to restore my archive logs from a .bkp file? I'm sure there's a way since rman does the backup in that format to begin with, but I'm struggling with the syntax still....  I thought it was like this:  recover archivelog from backup 'insert path here' but obviously I am wrong.

Any more help would be much appreciated.

 

by: NJDfan1711Posted on 2009-08-06 at 05:26:53ID: 25032423

Actually, no I am wrong.  I have a .bkp file in:  L:\archive_logs\ptmn\ptmn\autobackup\2009_08_05 which I copied as part of the restore database operation that I did yesterday, but during the crosscheck RMAN says it found files here:  L:\archive_logs\ptmn\ptmn\archivelog\2009_08_05, but that directory does not exist!  So... where is it pulling that information from (the inventory of the prod database since that's the DB instance that was recently restored???), and how do I clear that and make it look in the right locations?

 

by: schwertnerPosted on 2009-08-06 at 07:38:22ID: 25033898

I can not understand your plan.

1. the primary db sends archived logs to the standby
2. the standby received the logs and applied them
3. the DMLs on the standby produce own archive logs (if the DB is in archivelog mode).

What is your intention?

I do not believe that RMAN will see archived logs from other DB.
Also this what you want the register already should exist on the standby due the functionality of the standby.

again - what is your intention?

 

by: NJDfan1711Posted on 2009-08-06 at 08:46:49ID: 25034775

1- Yes, this is a manual process at the moment just for testing purposes until we prove it works.  I copy the archive logs in the form of .bkp files from prod server to standby server.  Directories are identical.

2- It received them because I copied them, but no, it did not apply them.  That's my goal.  I have my database as of 6:30am yesterday.  I have two .bkp files (1 contains spfile and controlfile, the other contains just archive logs), and I want to "roll forward" the archive logs.

3- What is a DML?

Rigth now if I do list backup or crosscheck archivelog I get absolutely nothing.  It appears my catalog is not seeing anything, even though I restored the controlfile from the latest autobackup.  

Can you give me step by step instructions on how to restore archive logs?  I hope that's a little clearer.

Thanks for your help so far.

 

by: rolutolaPosted on 2009-08-06 at 08:58:04ID: 25034915

What are these .bkp files? Is that the format you've specified for naming backup in prod? If so, you must configure the standby to use the same format.

DMLs are INSERT, UPDATE, DELETE...

If the format is unknown to the standby, it would not find the archivelogs with these extensions.

R.

 

by: rolutolaPosted on 2009-08-06 at 09:46:28ID: 25035494

Compare the log_archive_format paramter in your prod and standby instances. Are they the same?

What about log_archive_dest_1 parameters? Are they the same?

R.

 

by: it-rexPosted on 2009-08-06 at 09:58:00ID: 25035588

use command

RMAN>catalog backuppiece < path/PTMN_ARCH_K1KLU4EK_1_1.BKP>;

this way your controlfile will known about this new piece.

 

by: NJDfan1711Posted on 2009-08-06 at 10:12:50ID: 25035741

After attempting to catalog the backuppiece, I get:  RMAN-20001: target database not found in recovery catalog.

 

by: it-rexPosted on 2009-08-06 at 10:23:48ID: 25035851

try to do this using the controlfile not connected to the catalog then sync;let me know

 

by: NJDfan1711Posted on 2009-08-06 at 10:28:19ID: 25035911

Ok, it looks like the manual catalog operation worked after disconnecting from the catalog, but then when I re-connect and do "resync catalog" I still get RMAN-20001: target database not found in recovery catalog.

 

by: it-rexPosted on 2009-08-06 at 10:29:26ID: 25035925

would you please also provide
select dbid from v$database from both prod and standby?

thnaks

 

by: mrjoltcolaPosted on 2009-08-06 at 10:31:03ID: 25035934

Clarification of it-rex's last 2 posts:

Run RMAN as:

rman target /

So it connects to the controlfile repository, not the catalog. Sounds like either you are using multiple catalogs, or that instance is not catalogued yet. So just use the controlfile, it is the ultimate source of the RMAN data.

Then use the catalog backuppiece command it-rex recommended (I've made a minor syntax change for clarity)

RMAN> catalog backuppiece /backups/foo.bkp;

 

by: mrjoltcolaPosted on 2009-08-06 at 10:36:38ID: 25035988

I strongly agree with schwertner:  http:#25033898

What you are doing is unusual. Once the standby is created, just turn on managed recovery and the logs will start shipping (if they are configured as a primary + standby pair properly).


Another option, if you are dealing with archivelog backups, you can use RMAN backup 'as copy' for the archivelogs, so they are not in a backupset, then they could simply be ftped / scped directly into the archive dest on the DB you want to recover, with no tricks.


 

by: NJDfan1711Posted on 2009-08-06 at 10:37:47ID: 25035998

Prod query:
SQL> select dbid from v$database;

      DBID
----------
3844150329

SQL>


Standby query:
SQL> select dbid from v$database;

      DBID
----------
3844150329

SQL>

I assume that's good since it knows which DB ID it's attempting to become.  

@mrjoltcola:  I already did the catalog operation you and it-rex mentioned while disconnected from the catalog, thus, using the control file.  However, you need to re-connect to the catalog in order to do the resync operation -- otherwise I get an error saying operation not permitted while not connected to a catalog.

 

by: it-rexPosted on 2009-08-06 at 10:45:27ID: 25036068

make sure you are connecting to the right caralog and using the right target database and then issue register database;
from rman

 

by: NJDfan1711Posted on 2009-08-06 at 10:48:33ID: 25036109

The target and catalog databases are definitely correct -- the standby server has no link back to the target server... the tnsnames has no entry to the SID on that server.

When I tried register db I get:

RMAN> register database;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of register command at 08/06/2009 13:47:25
RMAN-08040: full resync skipped, control file is not current or backup

RMAN>

 

by: it-rexPosted on 2009-08-06 at 10:56:05ID: 25036183

OOh this is a stand by DB..
you are not supposed to register stand bys to the catalog as the control file is flagged as differnet which confuses the catalog;

let me do some more research;and I will get back to you;
but I would say that  99% you will not be able to use a catalog with a standby controlfile.

 

by: it-rexPosted on 2009-08-06 at 10:57:42ID: 25036203

got it
you will need to switch over to the standby database, configure the recovery catalog, and then switch back.

it is areported bug

 

by: mrjoltcolaPosted on 2009-08-06 at 11:00:33ID: 25036230

1) Standby databases WILL have the same DBID

2) RMAN is standby aware, if you use it correctly

3) You should be using a recovery catalog doing the type of work you are doing. The catalog needs to be accessible from both primary and standby. When you take backups on the primary or standby, the backups will automatically be recorded in the central catalog. This is the only way to do this in a Dataguard cluster.


You are jumping through hoops when you don't need to, and I think the root problem goes back to the fact that may have taken the initial backups of the archivelogs without connecting to a catalog. If you always connect to the catalog, then you can take/restore backups from either primary or standby node, because it is all the same DBID.

 

by: NJDfan1711Posted on 2009-08-06 at 11:02:54ID: 25036253

I'm not sure I understand.  The assumption and purpose of this restore process is to emulate a disaster scenario where the prod server and db are DOWN and completley unavailable.  Assuming we have the FTP/transfer process complete and all necessary backup files exist on the standby server, what are the steps we need to take to use a backuppiece to roll forward the standby database using the archive logs?

 

by: it-rexPosted on 2009-08-06 at 11:06:42ID: 25036303

@mrjoltcola
2) RMAN is standby aware, if you use it correctly

3) You should be using a recovery catalog doing the type of work you are doing. The catalog needs to be accessible from both primary and standby. When you take backups on the primary or standby, the backups will automatically be recorded in the central catalog. This is the only way to do this in a Dataguard cluster.

this is a Bug 3298797 ;I am not making this up.

 

by: mrjoltcolaPosted on 2009-08-06 at 11:10:56ID: 25036349

@it-rex: I am looking now. Give me a sec.

@NJDfan1711: Can you clarify: Are you using an RMAN catalog when taking all backups, and even when duplicating the database for standby, or did you at some point do the backups only from the controlfile?

 

by: it-rexPosted on 2009-08-06 at 11:12:49ID: 25036367

do that

switch over to the standby database, configure the recovery catalog, and then switch back.

 

by: NJDfan1711Posted on 2009-08-06 at 11:18:27ID: 25036413

No no no...guys, assume the prod server/db is unavailable.  Disaster has struck, and I'm left with the backup files on the standby server/db -- it has its own catalog!  The two are not interconnected in any way.  

Here's what I am doing at this very moment:

- Restoring the standby database as of 6::30am yesterday using the backupsets created from the target db that I manually copied to the standby server.

-Then, the goal is to use the backuppiece created from the target server yesterday at 12:30pm to restore te archive logs to that point in time.  They have been manually copied to the standby server in the flash recovery area.  What is the command syntax or how do I do this?

 

by: it-rexPosted on 2009-08-06 at 11:27:04ID: 25036500

we come back to ID: 25036349. from mrjoltcola..
when you say standby do you mean standby as in data guard?r as restoring to a differnt host waiting as a spare?

show output of
show select * from v$database.
for both;
and your pfile from both ;if you have spfile
just create pfile from spfile;

I think there is a big miscommunication here.

 

by: mrjoltcolaPosted on 2009-08-06 at 11:32:21ID: 25036545

@it-rex:

1) It is not a public bug, and is specified for 10.1 so be careful about giving support here based on the Metalink info.
2) He is running 10.2
3) He is not using Grid Control to do this that I am aware of, and that is what the bugs refer to.
4) He is not trying to take a backup of his standby, he is trying to restore the standby which should already be properly registered in the catalog.

BUT he says he is not using a catalog, so we are mainly in a backup and recovery scenario. So lets regroup and understand what he really wants to do.

He cloned the primary, but I do not see that he ever activated it in the ROLE of standby, I do not see that he ever started managed recovery, etc. So is the database open? If so, then retrace all the way back to where you tried to catalog the backup piece while connected to some unknown RMAN catalog:

http:#25035741

When you performed that step, were you connected to a catalog or not?

Then here you tried to register the standby database:

http:#25036109

But you should not do that, the database should already be registered.

So lets get one thing clear before proceeding:


Do you want to do this with an RMAN catalog or not? If so, please give the history of the catalog.

rman target / catalog=rman/pass@CAT
RMAN> list incarnation;

 

by: NJDfan1711Posted on 2009-08-06 at 11:35:49ID: 25036581

I'm not using dataguard, but in the literal sense, yes, I mean standby as a different host server with a different database+catalog, simply sitting idle waiting to be used if disaster were to strike and a problem occurred with the main server/db.

The select * query is extremely long and I cannot capture it all in my command prompt.  

init.ora from "standby" server:
 
ptmn.__db_cache_size=436207616
ptmn.__java_pool_size=4194304
ptmn.__large_pool_size=4194304
ptmn.__shared_pool_size=159383552
ptmn.__streams_pool_size=0
*.audit_file_dest='G:\oracle\product\10.2.0\admin\PTMN\adump'
*.background_dump_dest='G:\oracle\product\10.2.0\admin\PTMN\bdump'
*.compatible='10.2.0.3.0'
*.control_files='G:\ORACLE\PRODUCT\10.2.0\ORADATA\PTMN\CONTROL01.CTL','G:\ORACLE\PRODUCT\10.2.0\ORADATA\PTMN\CONTROL02.CTL','G:\ORACLE\PRODUCT\10.2.0\ORADATA\PTMN\CONTROL03.CTL'#Restore Controlfile
*.core_dump_dest='G:\oracle\product\10.2.0\admin\PTMN\cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_name='PTMN'
*.db_recovery_file_dest='G:\oracle\product\10.2.0\flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.dispatchers='(PROTOCOL=TCP) (SERVICE=PTMNXDB)'
*.job_queue_processes=10
*.open_cursors=300
*.pga_aggregate_target=203423744
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=612368384
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS2'
*.user_dump_dest='G:\oracle\product\10.2.0\admin\PTMN\udump'
 
 
init.ora from "target" server:
 
ptmn.__db_cache_size=754974720
ptmn.__java_pool_size=8388608
ptmn.__large_pool_size=8388608
ptmn.__shared_pool_size=645922816
ptmn.__streams_pool_size=41943040
*.aq_tm_processes=0
*.audit_file_dest='G:\ORACLE\PRODUCT\10.2.0\ADMIN\PTMN\ADUMP'
*.background_dump_dest='G:\ORACLE\PRODUCT\10.2.0\ADMIN\PTMN\BDUMP'
*.compatible='10.2.0.1.0'
*.control_files='G:\ORACLE\PRODUCT\10.2.0\ORADATA\PTMN\CONTROL01.CTL','G:\ORACLE\PRODUCT\10.2.0\ORADATA\PTMN\CONTROL02.CTL','G:\ORACLE\PRODUCT\10.2.0\ORADATA\PTMN\CONTROL03.CTL'
*.core_dump_dest='G:\ORACLE\PRODUCT\10.2.0\ADMIN\PTMN\CDUMP'
*.db_block_size=8192
*.db_cache_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=32
*.db_name='PTMN'
*.db_recovery_file_dest='L:\Archive_Logs\PTMN'
*.db_recovery_file_dest_size=32212254720
*.dispatchers='(PROTOCOL=TCP) (SERVICE=PTMNXDB)'
*.fast_start_parallel_rollback='FALSE'
*.filesystemio_options='SETALL'
*.java_pool_size=0
*.job_queue_processes=10
*.large_pool_size=0
*.log_archive_dest=''
*.log_archive_start=FALSE
*.nls_length_semantics='BYTE'
*.open_cursors=3000
*.optimizer_index_cost_adj=40
*.optimizer_mode='ALL_ROWS'
*.pga_aggregate_target=681574400
*.processes=700
*.recyclebin='OFF'
*.remote_login_passwordfile='EXCLUSIVE'
*.resource_manager_plan=''
*.sga_max_size=1468006400
*.sga_target=1468006400
*.shared_pool_size=0
*.streams_pool_size=41943040
*.undo_management='AUTO'
*.undo_retention=900
*.undo_tablespace='UNDOTBS2'
*.user_dump_dest='G:\ORACLE\PRODUCT\10.2.0\ADMIN\PTMN\UDUMP'
*.utl_file_dir='d:\mapics\9_0\Server\PTMNLOGS'
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:

Select allOpen in new window

 

by: mrjoltcolaPosted on 2009-08-06 at 11:37:40ID: 25036607

Please answer my questions from my last two messages that keep getting ignored. Before I will give any more advice I will wait for those answers. Thanks.

 

by: NJDfan1711Posted on 2009-08-06 at 11:42:01ID: 25036659

@mrjoltcola:  I think you're starting to understand.  Most of what you said to it-rex is correct.  No dataguard, no grid control, no "standby role".  Just a backup server with a database and catalog, similar if not identical to the way the target server is setup.

I take a full RMAN backup with control file, spfile, archive logs, and datafiles.  I restore, recover, open resetlogs, and all is good.  Time goes by, data is changed, and archive logs are created from prod server.  I copy them to the backup or "standby" server.  My prod server crashes about an hour later.  I want to restore my archive logs that were just taken recently, to bring my backup/standby server to a current state, more current than the complete rman restore that was done several hours ago earlier in the day.

When I tried to catalog the backup piece WHILE connected to the catalog on the backup server, I got an error saying target database not in recovery catalog.  That's when, with the help of this topic, you guys told me to disconnect from the catalog and use just the control file.  I don't know if this is advised, but I am just following your guidance.  With that, it worked and was properly catalog in the CONTROL FILE.  Then, you guys suggested to do a resync.  I re-connected to the catalog since you have to he connected to do a sync, and when I issued the command, I got the same error. That's where I'm stuck, and I am still unsure of the proper syntax to say "restore archive log from backup piece..."

 

by: mrjoltcolaPosted on 2009-08-06 at 11:48:55ID: 25036745

Ok, we are getting somewhere.

1) The RMAN catalog, is it the same catalog that you were using for the backups of the primary?

2) Since you have opened with resetlogs, the bad news, you cannot recover with those archivelogs unless you use flashback or restore from the original backup image prior to the open resetlogs. You've created a new incarnation and a new log sequence. With 10g and 11g it is possible to recover and roll forward by applying logs ACROSS resetlogs boundaries, but it requires you flashback / restore to a point prior to the last SCN before the recover step. Once you open resetlogs on the copy, it is diverged from the primary (primary goes down Main Street, clone goes down First Street). So you have to head back to First and Main intersection, and recover.


NOTE: I have not suggested you resync or register anything. But the confusion starts when discussing standby, because we immediately think "Data Guard" cluster.

 

by: NJDfan1711Posted on 2009-08-06 at 11:56:00ID: 25036813

Yes, sorry for the confusion.  I just saw that "standby database" is actually an industry term which seems to describe an online replication of some sort.  I am not doing something that advanced or complex (I don't think).

To answer #1, no, I do not believe it is the same catalog -- I've said now a few times, each server has its own catalog.  Target server = primary db + catalog.  Backup server = backup db + catalog.

For #2, I think I understand what you're saying.  Where can I go from here?  I'm trying to get back to a point where I am ready to attempt restoring archive logs again, but after just finishing the restore+recovery, I get an error saying data file 5 needs media recovery after doing open resetlogs.

 

by: it-rexPosted on 2009-08-06 at 11:56:16ID: 25036815

these are 2 typical database using the same name and dbid;therfore they can not use the same catalog;
mrjoltcola;please advise.

is the physical structure of thses 2 servers exactly the same?
disk wise?
also please show  both

select * from v$instance
select * from v$database

 for both servers
@mrjoltcola understood and will do;do not be mad at your student;)

 

by: mrjoltcolaPosted on 2009-08-06 at 12:07:05ID: 25036943

These are different options below to accomplish your standby solution. This is a very complex question and is honestly best done by voice, because the nature of the options differ and need to be explained. I'll do my best.

In no particular order of value or complexity, some options:


1) Keep a non-dataguard "standby" ready for recovery, but simply don't open it. Just keep it in recovery mode and apply logs as you need to. That way you won't create a new incarnation. It is the act of "open resetlogs" that you need to delay until needed. Keep in mind, you need to be constantly shipping logs or backupsets over to the standby for availability, or must have to delay the application of the logs until the failure, and for that reason, I really don't see any advantage to this step, but we used to do this prior to data guard with manual scripts.

2) If you want to open the "standby", for testing, or whatever, then configure Oracle flashback database. It will allow you to flashback and recover again and again. The flashback will send you back in time, then you can recover again.

OR

3) Simply restore a full backup and recover as far as you can, using the backupsets / archivelogs. This option is a delayed response option, in that you have to wait until the disaster to start all of the restore / recovery work. If going this route, at least periodically test the backups by doing this restore.


What is to be gained from using separate catalogs? I do not advise that. It would solve your problem of having the correct history available to RMAN without any "catalog operations", this is the whole point of the centralized catalog.

 

by: NJDfan1711Posted on 2009-08-06 at 12:09:39ID: 25036975

Yes, the directory structures are the same.  Drive letters are the same.  Except target server is on a SAN with RAID 5, and backup server has local RAID 1.

Query from backup server:
 
SQL> select * from v$instance;
 
INSTANCE_NUMBER INSTANCE_NAME
--------------- ----------------
HOST_NAME
----------------------------------------------------------------
VERSION           STARTUP_T STATUS       PAR    THREAD# ARCHIVE LOG_SWITCH_WAIT
----------------- --------- ------------ --- ---------- ------- ---------------
LOGINS     SHU DATABASE_STATUS   INSTANCE_ROLE      ACTIVE_ST BLO
---------- --- ----------------- ------------------ --------- ---
              1 ptmn
TXDR
10.2.0.4.0        06-AUG-09 MOUNTED      NO           1 STARTED
ALLOWED    NO  ACTIVE            PRIMARY_INSTANCE   NORMAL    NO
 
 
SQL>
 
 
Query from target server:
 
SQL> select * from v$instance;
 
INSTANCE_NUMBER INSTANCE_NAME
--------------- ----------------
HOST_NAME
----------------------------------------------------------------
VERSION           STARTUP_T STATUS       PAR    THREAD# ARCHIVE LOG_SWITCH_WAIT
----------------- --------- ------------ --- ---------- ------- ---------------
LOGINS     SHU DATABASE_STATUS   INSTANCE_ROLE      ACTIVE_ST BLO
---------- --- ----------------- ------------------ --------- ---
              1 ptmn
DATA1
10.2.0.4.0        06-AUG-09 OPEN         NO           1 STARTED
ALLOWED    NO  ACTIVE            PRIMARY_INSTANCE   NORMAL    NO
 
 
SQL>

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:

Select allOpen in new window

 

by: mrjoltcolaPosted on 2009-08-06 at 12:13:04ID: 25037028

@it-rex: Noone is mad :), there was some miscommunication in this thread. I think we are closing on a solution.


@NJDfan: At this point, if you've opened previously with resetlogs, your only option to get back to where you can restore archive logs from the primary is to start over and restore the database again. Though I am unclear how if you had previously opened with resetlogs, how you are in a state of requiring media recovery.

This is a very complex topic to deal with over this forum. :(

 

by: mrjoltcolaPosted on 2009-08-06 at 12:18:02ID: 25037090

Since I'm running out of 1-2-3s and a-b-cs I'm switching to Roman Numerals. :)

I. There is the solution to rescue you from a minor mess that is based on a simple mistake.

If you cannot open without further recovery (file 5 needs media recovery) then RMAN is looking for the next archive log. Perhaps it was not properly backed up, or rotated out in the first place, or perhaps the catalog command never worked. You can continue this route and probably learn some valuable lessons...


II. There is a long-term, proper solution to accomplish what you originally set out to do.

Start over and do it right.

 

by: NJDfan1711Posted on 2009-08-06 at 12:19:13ID: 25037105

I don't know why I am in that state either.  I did a restore database and everything seemed fine.  Then when I issued "recover database" it appeared to complete, but told me openresetlogs would result in that error.  So I did it anyway, and of course, got the error.

Now, if I try to issue restore database again, it tells me all datafiles already restored.  If I issue restore datafile 5, it also says it's been restored.  

 

by: it-rexPosted on 2009-08-06 at 12:23:23ID: 25037153

select resetlogs_time from v$database from the backup one;

Do not mix the terms "target "with "production/Original" DB
as target means the db that rman will serve using eithet a catalog or controlfile;
so any DB could be a target DB.

I also I gree with mrjoltcola these are your current option.

 

by: mrjoltcolaPosted on 2009-08-06 at 12:38:48ID: 25037292

If the restores are not executing again, you may try restore with the 'force' option.

I've needed it at one point in the past when RMAN was trying to be too smart and thought the file did not need restoration.

The situation you are in is simply lack of enough archive logs to finish the recover. You can continue down the path and restore the archive logs with your original scenario, but I'm dubious, because if you ever opened your database, then it should open now, unless you had repeated a restore.

 

by: NJDfan1711Posted on 2009-08-07 at 06:14:58ID: 25042290

Hi guys.  I am just about to close this topic since I have made some progress now, but I had just one last question.  Here's what I did:

Deleted all files and references to any backups and logs other than 8/5/09 which is the date I want to roll forward to.  Restored the controlfile from autobackup from that date.  Restored the datafiles again, then did a recover and open with resetlogs.  It succeeded.  Then, when connected to my catalog on the backup server, I did a 'catalog backuppiece' using the backup from 12:30 on 8/5/09.  It worked.  Then I had to register my database with the catalog.  It worked, and a resync also succeeded after  that.  Finally I ran 'restore archivelog all' which seemed to complete successfully as well.  I can see the new .arc files in the directory I expect...however... I thought this step was the part where the database gets "rolled forward".  But, when I check my ERP program for the data, I did not see anything new after the restore I did from 6:30am.  So here's my last question:

Does "restore archivelog all" actually import the archive logs, or does it just extract them from my .bkp file and put them on the hard-drive?  If the latter, then what is the command to actually make the database import those .arc files?  Is it a recover database?

If it's ok with you guys, I'd like to split the points, 250 a piece, between mrjoltcola and it-rex, since you both offered helpful advice throughout the troubleshooting process.

Thanks again.

 

by: it-rexPosted on 2009-08-07 at 07:58:29ID: 25043409

to be honest I think you need to split these points between schwertner;mrjoltcola as she is the first one pointed us that there is some miscommunication.
see ID: 25033898

 

by: NJDfan1711Posted on 2009-08-07 at 08:45:50ID: 25043997

I do agree the comment was somewhat helpful to determine what I was after, but that was the only time we heard from that person and it didn't resolve what my actual goal was.  You and mrjoltcola stuck with the issue throughtout many posts in order to get to the proper resolution.

With that said, any ideas as to my last question?

 

by: mrjoltcolaPosted on 2009-08-07 at 11:02:56ID: 25045394

>>Does "restore archivelog all" actually import the archive logs, or does it just extract them from my .bkp file and put them on the hard-drive?

Latter. RESTORE restores files, period. It doesn't do anything else to the files. It can restore from IMAGE copies or BACKUPSETs. "restore archivelog" just grabs the log files from whereever RMAN decides is best (if you have multiple backups) and puts them back on the filesystem or ASM so the database can see them. "RECOVER" applies the redo (by reading from archive logs) and will access and restore logs as needed if available in the catalog and the media layer.

I agree with your choice of closing, it is your question, and your decision.

 

by: mrjoltcolaPosted on 2009-08-07 at 11:06:33ID: 25045425

Also please make sure to take my recommendations in consideration, such as using a centralized RMAN server. That way there is no registration, etc. needed. You simply run RMAN from the replica copy, connecting as the original database (since the DBID matches) and restore. As far as the catalog is concerned, it is the same database. Restores are easy, but just be careful about performing _backups_ from different copies of the same database using a central CAT, that will cause issues if not done right.

Make sure to thoroughly test your DR scenario once or twice, and document it. Trust me, if/when you actually need it, you may have forgotten our conversation and some of the steps, and that document will be invaluable.

 

by: NJDfan1711Posted on 2009-08-07 at 12:34:55ID: 25046180

I definitely consider all recommendations and advice given to me, that's why I'm here :)

I am also documenting as much as I possibly can so that I remember what I did to get it to work.

Where I am now:  I did a restore archivelog all which took two different backupsets from 08/0509 and 08/06/09 and restored the logs into a folder based on today's date, 08/07/09.  I did a crosscheck and a list backup and the catalog apperas to be aware of the files. I can see them on the disk and they appear the right size.  They start with sequence # 4299 and go through 4324.  

If I issue recover database it appears to work, but finishes in 0 seconds and does not error out.  That's strange. The same happens if I do recover database until sequence = 4324

Then if I do recover database until time 07-AUG-09, it starts, but errors out with "datafile 1 must be restored from backup created before 07-AUG-09".

And finally, if I do recover database until time 06-AUG-09 it RMAN-06004: ORACLE error from recovery catalog database: RMAN-20207: UNTIL TIMEor RECOVERY WINDOW is before RESETLOGS time.


Your thoughts?  I feel like I am inches away from success... =/

 

by: NJDfan1711Posted on 2009-08-31 at 05:49:39ID: 31612093

Thanks for your help and patience.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...