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 is required for both Solaris and Windows servers.
To restore the database on the standby server
Log into the primary server as the oracle (Solaris) or AgfaService (Windows) user.
Shut down the primary server by typing
sqlplus / as sysdba
shutdown immediate;
exit;
Log into the standby server as the oracle (Solaris) or AgfaService (Windows) user.
Change to the /opt/oracle/current/dbs (Solaris) or C:\oracle\product\10.2.0\db_1\database (Windows) directory
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.
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;
To shut down the standby database, type
sqlplus / as sysdba
shutdown immediate;
exit;
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
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 |
Copy the necessary data files and redo log files from the primary server to the standby server:
![]() | Note: On Solaris, use the cp -rp command for each. On Windows, use standard file copy and paste functionality. |
| Source directory | Source files | Target directory | Additionally |
|---|---|---|---|
flashback/db_recovery_area | standby_control.ctl | flashback/db_recovery_area | – |
| /mnt2/data1 | All 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/index1 | All 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/system | All 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/system | All 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. |
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.
On the standby server, restore the standby control file in RMAN.
Log in as user oracle (Solaris) or AgfaService (Windows).
Type
rman target /
startup nomount;
restore standby controlfile from 'flashback/db_recovery_area directory/standby_control_file.ctl';
shutdown abort;
startup mount;
exit
Change to the /usr/mvf/bin (Solaris) or C:\mvf\bin (Windows) directory.
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 |