2

I'm trying to synchronize 2 dbs which are not connected to each other, and located in a separated networks.

The 'copy db' (aka: standby) can be read only, but still should be active.

My intuition (which I'm not sure is correct) tells me I can synchronize the both using RMAN backup / restore, then move the archive files from source (production) to copy (standby), open copy (standby) in read only mode and apply changes when still open (similar to active data guard).

What I did is as follows (according this manual): I configured data guard according the manual, see link.

On source (production):

$ rman target=/
RMAN> BACKUP DATABASE PLUS ARCHIVELOG;

I moved the files and restored on the copy after configured as standby:

$ rman target=/
RMAN> STARTUP MOUNT;
RMAN> RESTORE DATABASE;

and got Finished restore at

Now on the copy (after all configurations from the manual) I've tried to open the db:

SQL> shutdown immediate;
...
Oracle instance shut down.
SQL> startup mount;
ORACLE instance started
...
Database mounted.
SQL> alter database open read only;
alter database open read only
* 
ERROR at line 1:
ORA-10458: standby database requires recovery
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: 'C:\PATH\TO\FILE\SYSTEM01.DBF'

I'm using oracle 11g DB on windows, I've tried also on Linux and reach the same results.

both machine are new, oracle 11g SW installed on both (with sample schemes), and DB was dropped on the copy before the restore.

file was copied after DB was dropped, no changes was made on the source DB except the configuration according to the manual.

I would like to ask:

  • is what I'm trying to achieve (active data guard without direct connection, manually move of archive once in a while, and auto apply of archive) looks possible?

  • why the database restore or open is failed?

  • is there simpler way to do so? (i.e. manual backup / restore without configure production / standby architecture, but still apply the archive of the source to the copy.)

Thanks for any reply.

3
  • Active Data Guard is for real-time query so you must real-time apply in order to off-load the read-only queries. To answer your second question we need more information like complete procedure you have used. I think you may do that but first it must be install like primary/standby then later you can catalog the archived redo log into the standby then you can recover the database. You just need to ship archived redo log manually to standby site.
    – atokpas
    Feb 25, 2016 at 22:09
  • @JSapkota Thanks. 1. I've tried the whole procedure from the mentioned link, (oracle-base.com/articles/11g/data-guard-setup-11gr2). 2. I did the manual backup restore, (not using duplicate). 3. I started from 2 clean DBs (with sample DBs) but didn't change any data. can I skip the synchronization and try to apply the archive log? (i don't care about redo log, since if I want I can archive it.)
    – SHR
    Feb 25, 2016 at 23:18
  • basically you are talking about manual standby so first you must create standby using duplicate command or manual shipping backups to standby then you can backup archive log on primary and ship to standby then apply it. click here for reference.
    – atokpas
    Feb 25, 2016 at 23:29

1 Answer 1

1

First you need to make sure that the copied database is a standby database. That is not the case in your case. Use duplicate to do that is the easiest way.

Is it possble at all using a not connected database .... yes, but why? To me it looks like a waste of money if there is no decent connectivity.

Restore/open failed because your copy database feels it has the PRIMARY role. (select database_role from v$database; to check)

There hardly is a simpler way to do this than using rman duplicate. This can be done using a backup, no problem at all. Maybe hiring a real dba can save you lot's of time, money and in the end a disaster.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.