Link to home
Start Free TrialLog in
Avatar of pt_wood
pt_wood

asked on

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

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.  
Avatar of oleggold
oleggold
Flag of United States of America image

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!
pt_wood,
In Your<ORACLE_HOME>\network\admin directory 2 files at least must be available:
tnsnames.ora and sqlnet.ora
....
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
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
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

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
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
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
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!!!

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).
 
ASKER CERTIFIED SOLUTION
Avatar of oleggold
oleggold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pt_wood
pt_wood

ASKER

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.