Oracle 8i:Disaster recovery solution -Standby Database for Oracle version 8.1.7.0.0
Oracle 8i:Standby Database for Disaster recovery solution.
Here is the simple steps for creating standby database in oracle 8i.
This is testing purpose,So do the all steps from creating primary to real time sync of standby database.
1.Create/Configure Primary Database.
a)Create primary database pfile.
db_name = "primary"
instance_name = primary
service_names = primary
control_files = ("/oracle/primary/stdby1.ctl","/oracle/primary/stdby2.ctl")
control_file_record_keep_time=30
open_cursors = 100
max_enabled_roles = 30
db_block_buffers = 40000
db_block_lru_latches=4
cursor_space_for_time=true
session_cached_cursors=40
shared_pool_size = 71680000
shared_pool_reserved_size=9216000
large_pool_size = 10485760
java_pool_size = 10485760
log_checkpoint_interval = 1048576
processes = 300
log_buffer = 163840
log_archive_start = true
log_archive_dest_1 = "location=/oracle/primary/arc/"
log_archive_format = meta_arch_%t_%s.arc
LOG_ARCHIVE_DEST_2 = 'SERVICE=standby MANDATORY REOPEN=60'
LOG_ARCHIVE_DEST_STATE_2 = ENABLE
background_dump_dest = /oracle/primary/bdump
core_dump_dest = /oracle/primary/cdump
user_dump_dest = /oracle/primary/udump
db_block_size = 4096
remote_login_passwordfile = exclusive
os_authent_prefix = ""
java_soft_sessionspace_limit=83000000
java_max_sessionspace_size=1000000000
compatible = "8.1.0"
sort_area_size = 5242880
sort_area_retained_size = 3145728
utl_file_dir=/oracle2
hash_multiblock_io_count = 8
b) Create Password files
$orapwd file=/oracle/dbs/orapwprimary password=oracle entries=5
c).Create Database .
sql>startup nomount pfile=PATH
sql>create database primary
controlfile reuse
logfile '/oracle/primary/redo01.log' size 10M reuse,
'/oracle/primary/redo02.log' size 10M reuse,
'/oracle/primary/redo03.log' size 10M reuse
datafile '/oracle/primary/system01.dbf' size 100M reuse
autoextend on
next 10M maxsize 200M
character set WE8ISO8859P1;
d)Execute script for create dictionary views and tables.
SQL>@?/rdbms/admin/catalog,sql
SQL>@?/rdbms/admin/catproc.sql
2.Put Database in archive log mode.
SQL>shut immediate
SQL>startup mount
SQL>alter database archivelog;
SQL>alter database open;
3.Create standby control file.
SQL>ALTER DATABASE CREATE STANDBY CONTROLFILE AS '/oracle/stprimary.ctl'
4.Set Log Archive dest for standby
ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=standby MANDATORY REOPEN=60';
ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=ENABLE;
in pfile
LOG_ARCHIVE_DEST_2 = 'SERVICE=standby MANDATORY REOPEN=60'
LOG_ARCHIVE_DEST_STATE_2 = ENABLE
5.Take Hot/Cold backup of Database,pfile,passwordfiles.
6.Create/Configure standby Database
a) Copy the primary database backup,pfile,passowrd files to same location to standby database.
b) Create pfile for standby database from copied pfiles.
db_name = "primary"
instance_name = standby1
service_names = primary
control_files = ("/oracle/primary/stdby1.ctl","/oracle/primary/stdby2.ctl")
control_file_record_keep_time=30
open_cursors = 100
max_enabled_roles = 30
db_block_buffers = 40000
db_block_lru_latches=4
cursor_space_for_time=true
session_cached_cursors=40
shared_pool_size = 71680000
shared_pool_reserved_size=9216000
large_pool_size = 10485760
java_pool_size = 10485760
log_checkpoint_interval = 1048576
processes = 300
log_buffer = 163840
log_archive_start = true
log_archive_dest_1 = "location=/oracle/primary/arc/"
log_archive_format = meta_arch_%t_%s.arc
LOG_ARCHIVE_DEST_2 = 'SERVICE=primary MANDATORY REOPEN=60'
standby_archive_dest=/oracle/primary/arc/
LOG_ARCHIVE_DEST_STATE_2 = ENABLEbackground_dump_dest = /oracle/primary/bdump
core_dump_dest = /oracle/primary/cdump
user_dump_dest = /oracle/primary/udump
db_block_size = 4096
remote_login_passwordfile = exclusive
os_authent_prefix = ""
java_soft_sessionspace_limit=83000000
java_max_sessionspace_size=1000000000
compatible = "8.1.0"
sort_area_size = 5242880
sort_area_retained_size = 3145728
utl_file_dir=/oracle2
hash_multiblock_io_count = 8
instance_name = standby1
service_names = primary
control_files = ("/oracle/primary/stdby1.ctl","/oracle/primary/stdby2.ctl")
control_file_record_keep_time=30
open_cursors = 100
max_enabled_roles = 30
db_block_buffers = 40000
db_block_lru_latches=4
cursor_space_for_time=true
session_cached_cursors=40
shared_pool_size = 71680000
shared_pool_reserved_size=9216000
large_pool_size = 10485760
java_pool_size = 10485760
log_checkpoint_interval = 1048576
processes = 300
log_buffer = 163840
log_archive_start = true
log_archive_dest_1 = "location=/oracle/primary/arc/"
log_archive_format = meta_arch_%t_%s.arc
LOG_ARCHIVE_DEST_2 = 'SERVICE=primary MANDATORY REOPEN=60'
standby_archive_dest=/oracle/primary/arc/
LOG_ARCHIVE_DEST_STATE_2 = ENABLEbackground_dump_dest = /oracle/primary/bdump
core_dump_dest = /oracle/primary/cdump
user_dump_dest = /oracle/primary/udump
db_block_size = 4096
remote_login_passwordfile = exclusive
os_authent_prefix = ""
java_soft_sessionspace_limit=83000000
java_max_sessionspace_size=1000000000
compatible = "8.1.0"
sort_area_size = 5242880
sort_area_retained_size = 3145728
utl_file_dir=/oracle2
hash_multiblock_io_count = 8
c) Start standby database in nomount mode.
d) Put Copied standby control file to same location as primary(control_files parameter in pfile)
d) Put Copied standby control file to same location as primary(control_files parameter in pfile)
e) Mount Standby database
SQL>alter database mount standby database;
7.Start Recovery of standby Database.
SQL>recover managed standby database;
Cancel recovery
SQL>recover managed standby database cancel;
8.Manually apply Archive GAP.
a)copy all pending archives for standby.
sql>recover automatic standby database;
Comments
Post a Comment
Dear User,
Thank you very much for your kind response