IMPAX 6.5.1 Server Knowledge Base home > Oracle Server home > Configuring Oracle Data Guard > Configuring Oracle Data Guard using cold backup

Restoring the database on the standby server

Restoring the database on the standby server is required for both Solaris and Windows servers.

To restore the database on the standby server

  1. Log into the primary server as the oracle (Solaris) or AgfaService (Windows) user.

  2. Shut down the primary server by typing

    sqlplus / as sysdba

    shutdown immediate;

    exit;

  3. Log into the standby server as the oracle (Solaris) or AgfaService (Windows) user.

  4. Change to the /opt/oracle/current/dbs (Solaris) or C:\oracle\product\10.2.0\db_1\database (Windows) directory

  5. On Solaris, type

    mv orapw orapw.pre_dg

    orapwd file=orapw password=stayout entries=40

    On Windows, type

    mv PWDMVF.ora PWDMVF.ora.pre_dg

    orapwd file=PWDMVF.ora password=stayout entries=40

    This creates an Oracle password file.

  6. To ensure that the scripts can log into SQLPlus as the sys or dbadmin user, type

    sqlplus / as sysdba

    alter user sys identified by stayout;

    grant sysdba to dbadmin;

  7. To shut down the standby database, type

    sqlplus / as sysdba

    shutdown immediate;

    exit;

  8. On Solaris, to mount the partition locally, log in as the root user and type

    mount primary_server_name:path_to_flashback_recovery_area_on_primary_server /mnt1

    mount primary_server_name:/dbase /mnt2

  9. Clean up the existing data files and redo log files from the standby server by deleting (or move) these files. In doing so, ensure that the /dbase directory structure and any symlinks remain untouched.

    /dbase/system/*.ctl/dbase/redo/*.dbf/dbase/data1/*.ctl
    /dbase/system/*.dbf/dbase/index1/*.ctl/dbase/data1/*.dbf
    /dbase/rbs/*.ctl/dbase/index1/*.dbf/dbase/data2/*.ctl
    /dbase/rbs/*.dbf/dbase/index2/*.ctl/dbase/data2/*.dbf
    /dbase/redo/*.ctl/dbase/index2/*.dbf/dbase/arch/*.dbf
  10. Copy the necessary data files and redo log files from the primary server to the standby server:

    Note:

    Note:

    On Solaris, use the cp -rp command for each. On Windows, use standard file copy and paste functionality.

    Source directorySource filesTarget directoryAdditionally

    flashback/db_recovery_area

    standby_control.ctl

    flashback/db_recovery_area

    /mnt2/data1All files with *.dbf extensions/dbase/data1 (Solaris) or D:\data\dbase\data1 (Windows)If you have data2/data3/data4 directories that are not symlinks of data1, also copy to those directories.
    /mnt2/index1All files with *.dbf extensions/dbase/index1 (Solaris) or D:\data\dbase\index1 (Windows)If you have index2/index3/index4 directories that are not symlinks of index1, also copy to those directories.
    /mnt2/systemAll files with *.dbf extensions/dbase/system (Solaris) or D:\data\dbase\system (Windows)If you have rbs/redo directories that are not symlinks of system, also copy to those directories.
    /mnt2/systemAll redo0*.log files/dbase/system (Solaris) or D:\data\dbase\system (Windows)Make sure the redo_standby*.log files are not copied. Note that the redo log files could be in the redo directory.
  11. Copy any additional data or index files from the primary to the standby server, but do not copy the control files or the standby redo log files.

  12. On the standby server, restore the standby control file in RMAN.

    1. Log in as user oracle (Solaris) or AgfaService (Windows).

    2. Type

      rman target /

      startup nomount;

      restore standby controlfile from 'flashback/db_recovery_area directory/standby_control_file.ctl';

      shutdown abort;

      startup mount;

      exit

  13. Change to the /usr/mvf/bin (Solaris) or C:\mvf\bin (Windows) directory.

  14. On the standby server, switch back to the command prompt where setup_dg was running. At the manual restore prompt, type "y" to continue with Data Guard configuration.


Finally, to link the two servers, complete the Data Guard configuration.


Topic number: 124004

Applies to: IMPAX 6.5.1 Server Knowledge Base