Vous êtes sur la page 1sur 2

Creating a standby database (traditional method) - Linux/Unix

The process involves making a full backup of your production database on the primary
server. This can be either a hot or a cold backup. If a hot backup is used, then the archive
log files created during the backup will also need to be copied to the standby database.
Preliminary steps:
Step1
Setup the same Linux or Unix user accounts !racle software owner" and groups dba" on
the standby server preferably with the same uid and the same gid" as on the primary
server.
#. $ecreate the same !racle directory structure on the standby server as on the primary
server.
%. Install !racle software on the standby server preferably in the same location as on the
primary
server.
&. 'opy the init.ora file for the production database on the production server to the
standby
server.
(. 'opy the )var)opt)oracle)oratab or )etc)oratab from the production server to the standby
server
*. 'opy the password file +!$,'L-./!0-)dbs)orapw1+!$,'L-.SI23 from the
production
server to the standby server. 4ou may have to create a new password file with the orapwd
utility.
5. 'opy the spfile file from the production server to the standby server if it is used.
!n the primary server6
7. 0ake a standby controlfile on the production database using the following command6
S8L3 ,LT-$ 2,T,9,S- '$-,T- ST,:294 '!:T$!L;IL- ,S
<)oracle)orabase)admin)dbvisitp)create)ST,:294.29=ISIT.control>?.ctl< $-US-@
Ahere dbvisitp is the name of the database
B. 'opy this standby controlfile to a temporary location on the standby server.
?>. 0ake a cold or a hot backup of the database to either disk or tape.
??. $estore the full production database backup including any new archive logs" to the
standby
server.
!n the standby server6
?#. $eplace the existing controlfiles" if any" with this new standby controlfile from the
temporary
location. 0ake sure the names of the controlfiles" stay the same.
-xample6 if the existing controlfiles were named control>?.ctl and control>#.ctl, replace
the
existing controlfiles with the new standby controlfile created in step 7 above" and make
sure
that new standby controlfiles are named control>?.ctl and control>#.ctl.
?%. Set the correct !racle environment on Linux and Unix with the oraenv command"
?&. Start sClplus6
sClplus )nolog
S8L3 connect ) as sysdba @
S8L3 startup nomount
S8L3 alter database mount standby database @
S8L3 recover standby database @
Specify log6 D1$-T3Esuggested F filename F ,UT! F ',:'-LG
?(. ,pply archives until there are no more archives to be applied.
?*. Standby database is now complete. The standby database is in mount standby mode
which is
correct for 2bvisit to continue. ;or reference the commands to start a standby database
are6
S8L3 startup nomount
S8L3 alter database mount standby database

Vous aimerez peut-être aussi