?
Solved

Please help with problems setting up an Auxiliary Instance for a RMAN Dupliate Restore

Posted on 2005-05-06
12
Medium Priority
?
374 Views
Last Modified: 2012-05-05
I have been given the task of restoring a hot/online backup and my Oracle DBA and ADMIN skills are weak.

I have created the password file using ORAPWD and have it in my <ORACLE_HOME>\database directory.  
I have edited the init.ora files in the default location and set remote_login_passwordfile=EXCLUSIVE.
I have edited the listener.ora and tnsnames.ora to add entries for the new SID.

But I cannot get Oracle Net Connectivity
after starting SQLPLUS with /NOLOG option here's what I get when I try to CONNECT:
SQL> CONNECT sys/password_set_in_ORAPWD@existingSIDdup AS SYSDBA
ERROR:
ORA-12154: TNS:could not resolve service name

Thanks for your help.  
0
Comment
Question by:pt_wood
  • 11
12 Comments
 
LVL 21

Expert Comment

by:oleggold
ID: 13954948
Hi pt_wood,
> estoring a hot/online backup
Firstable,If You have a hot backup then Your DB is in a good shape!!!
Secondly,try to locate Your Oracle Home
Hope It helps
Cheers!
0
 
LVL 21

Expert Comment

by:oleggold
ID: 13954960
pt_wood,
In Your<ORACLE_HOME>\network\admin directory 2 files at least must be available:
tnsnames.ora and sqlnet.ora
....
0
 
LVL 21

Expert Comment

by:oleggold
ID: 13954971
Try to edit TNSNAMES.ORA as follows:
existingSIDdup =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST =10.237.237.211)(PORT = 1521))
    (CONNECT_DATA = (SID = existingSIDdup))
  )
where 10.237.237.211 is Your Db host IP
0
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 
LVL 21

Expert Comment

by:oleggold
ID: 13954979
Now ,put attention to the second file sqlnet.ora,
it can have these lines:
NAMES.DEFAULT_DOMAIN=
and SQLNET.AUTHENTICATION_SERVICES=
put # before each one of them
0
 
LVL 21

Expert Comment

by:oleggold
ID: 13954987
In any case even if You can't connect in remote ,You'll be able to connect from the db host by using:
set ORACLE_SID=existingSIDdup
CONNECT / AS SYSDBA

0
 
LVL 21

Expert Comment

by:oleggold
ID: 13955031
Now ,to the proccess of the Recovery itself:
You start here:
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96519/recov.htm
0
 
LVL 21

Expert Comment

by:oleggold
ID: 13955040
But first You must deside which do You want to perform,Complete or Incomplete !!!
Complete recovery involves using redo data or incremental backups combined with a backup of a database, tablespace, or datafile to update it to the most current point in time - this means that if the reason of Your recovery process is some logical failure - You don't wan't Complete Recovery  there.
Here the steps for it anyway:
Mount the database
Ensure that all datafiles you want to recover are online
Restore a backup of the whole database or the files you want to recover
Apply online or archived redo logs, or a combination of the two
If you are performing complete recovery on a tablespace or datafile, then you must:

Take the tablespace or datafile to be recovered offline if the database is open
Restore a backup of the datafiles you want to recover
Apply online or archived redo logs, or a combination of the two
0
 
LVL 21

Expert Comment

by:oleggold
ID: 13955046
2nd One :Incomplete Recovery
Incomplete recovery uses a backup to produce a noncurrent version of the database. In other words, you do not apply all of the redo records generated after the most recent backup. You usually perform incomplete recovery of the whole database in the following situations:

Media failure destroys some or all of the online redo logs.
A user error causes data loss, for example, a user inadvertently drops a table.
You cannot perform complete recovery because an archived redo log is missing.
You lose your current control file and must use a backup control file to open the database.
If You have one of the situations above ,You have no choise but to use Incomplete Recovery
0
 
LVL 21

Expert Comment

by:oleggold
ID: 13955052
Please,note that:
"to perform incomplete media recovery, you must restore all datafiles from backups created prior to the time to which you want to recover and then open the database with the RESETLOGS option when recovery completes".
 The RESETLOGS operation creates a new incarnation of the database--in other words, a database with a new stream of log sequence numbers starting with log sequence 1.
This also means that You can throw away all Your old backups,they will be not usefull now!!!

0
 
LVL 21

Expert Comment

by:oleggold
ID: 13955059
Here  the exerts for You if decided to proceed:
Media Recovery Options
Because you are not completely recovering the database to the most current time, you must tell Oracle when to terminate recovery. You can perform the following types of media recovery.

Type of Recovery Function
Time-based recovery
 Recovers the data up to a specified point in time.
 
Cancel-based recovery
 Recovers until you issue the CANCEL statement (not available when using Recovery Manager).
 
Change-based recovery
 Recovers until the specified SCN.
 
Log sequence recovery
 Recovers until the specified log sequence number (only available when using Recovery Manager).
 
0
 
LVL 21

Accepted Solution

by:
oleggold earned 1500 total points
ID: 13955067
Now the easiest way to recover a db is to use the RMAN COMMANDLINE UTILITY:
TYPE RMan at cmd prompt:
RMAN Restore and Recovery
The basic RMAN recovery commands are RESTORE and RECOVER. Use RESTORE to restore datafiles from backup sets or from image copies on disk, either to their current location or to a new location. You can also restore backup sets containing archived redo logs. Use the RMAN RECOVER command to perform media recovery and apply archived logs or incremental backups.

RMAN automates the procedure for recovering and restoring your backups and copies. For example, run the following commands from within RMAN to restore and recover the database to its current time:

SHUTDOWN IMMEDIATE; # shuts down database
STARTUP MOUNT; # starts and mounts database
RESTORE DATABASE; # restores all datafiles
RECOVER DATABASE; # recovers database using all available redo
ALTER DATABASE OPEN; # reopens the database

You can also use the SQLPLUS :
If you do not use RMAN, then you can restore backups with operating system utilities and then run the SQL*Plus RECOVER command to recover the database. You should follow these basic steps:

After identifying which files are damaged, place the database in the appropriate state for restore and recovery. For example, if some but not all datafiles are damaged, then take the affected tablespaces offline while the database is open.
Restore the files with an operating system utility. If you do not have a backup, it is sometimes possible to perform recovery if you have the necessary redo logs dating from the time when the datafiles were first created and the control file contains the name of the damaged file.

If you cannot restore a datafile to its original location, then relocate the restored datafile and change the location in the control file.

Restore any necessary archived redo log files.
Use the SQL*Plus RECOVER command to recover the datafile backups.
0
 

Author Comment

by:pt_wood
ID: 13993888
I was able to get the Aux instance set up - the issues turned out to be in the configuration of Net Naming, Listeners and Intelligent Agent - got all that worked out - too much to go into here.

The latest stumbling block is how to connect to backup files copied from another host so I can use them for the DUPLICATE command - i think it's channels - but I'm still hunting.

I have my Aux instance and the backups of Target ready to go.

Thanks for your help oleggold.
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
What we learned in Webroot's webinar on multi-vector protection.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question