user4773127
user4773127

Reputation:

Restore Standby database failed in Oracle 11g express

I have two machine A and B and i want two setup standby database in machine B, so i have followed below steps..

  1. Install oracle 11g express in machine A and same install in another machine B for standby.
  2. Enable Archive mode in both machine A and B.
  3. Create TableSpace with name tbs_test on both machine.
  4. Create user testuser on both machine & grant permission for dba.
  5. In Machine A, i have create a table Tb_Employee and insert data into table Tb_Employee on table space tbs_test.
  6. Now take backup from some script on machine A and trying to restore on machine B but not succeed due to some error mentioned in below statement.

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE;

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE

* ERROR at line 1:

ORA-00283: recovery session canceled due to errors

ORA-19909: datafile 1 belongs to an orphan incarnation

ORA-01110: data file 1: 'C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSTEM.DBF'

I have used following script to take backup(Full backup + Archive)

Step 1 Execute Begin Backup Script

conn / as sysdba; alter system checkpoint;

alter tablespace SYSAUX begin backup;

alter tablespace SYSTEM begin backup;

alter tablespace TBS_Test begin backup;

exit;

Step 2 Copy SYSAUX.DBF, SYSTEM.DBF and TBS_Test.DBF files to backup directory

Step 3 create standby control file through execute following script

conn / as sysdba;

alter database backup controlfile to trace as 'C:\Backup\controlfile.txt' reuse;

alter database backup controlfile to 'C:\Backup\controlfile.ctl' reuse;

alter database create standby controlfile as 'C:\Backup\controlfile_standby.ctl';

exit

Step 4 copy stand by control file as Control.DBF into backup directory

Step 5 After copied files Execute End Backup Script

conn / as sysdba;

alter tablespace SYSAUX end backup;

alter tablespace SYSTEM end backup;

alter tablespace UNDOTBS1 end backup;

alter tablespace TBS_Test end backup;

exit;

Step 6 Execute script for Archive log

conn / as sysdba;

alter system checkpoint;

alter system archive log current;

disconnect;

exit;

Step 7 After execute script copy all archive files into backup directory("C:/Backup")

After just restore file into Machine B.

Upvotes: 0

Views: 691

Answers (1)

Sergiu Velescu
Sergiu Velescu

Reputation: 514

  1. Not sure Oracle Express support standby (please consult the documentation - as I remember Data Guard is licensed on top of Enterprize Edition)
  2. In order to configure standby it is not enough just to backup one instance and restore to another - for this you will have to make some more configurations (for example - to name instances according, FORCE LOGGING, backup controlfile for standby, set LOG_ARCHIVE_DEST parameters and many others, see documentation)

Your question is too "wide" we don't know what and how it has been done (put the scripts here), and in which order.

Upvotes: 0

Related Questions