Standby Practical Notes
Standby Practical Notes
File created.
System altered.
SQL> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 286332064 bytes
Fixed Size 451744 bytes
Variable Size 167772160 bytes
Database Buffers 117440512 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Disabled
Archive destination /home/oracle9i/admin/shiv/arch
Oldest online log sequence 64
Next log sequence to archive 65
Current log sequence 65
SQL> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
System altered.
SQL> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
FOR
---
NO
Database altered.
FOR
---
YES
NAME
-------------------------------------------------------------------------
-------
/home/oracle9i/admin/shiv/data/system01.dbf
/home/oracle9i/admin/shiv/data/undotbs01.dbf
/
home/oracle9i/admin/shiv/data/shiv01.dbf/home/oracle9i/admin/shiv/data/mo
han01.dbf
/home/oracle9i/admin/shiv/data/sud01.dbf
/
home/oracle9i/admin/shiv/data/data00.dbf/home/oracle9i/admin/shiv/data/sh
am01.dbf/home/oracle9i/admin/shiv/data/ar1.dbf
/home/oracle9i/admin/shiv/data/gg.dbf
/
home/oracle9i/admin/shiv/data/data01.dbf/home/oracle9i/admin/shiv/data/bb
b.dbf
11 rows selected.
SQL> shutdown;
Database closed.
Database dismounted.
ORACLE instance shut down.
oracle9i@intellic standby]$ ls
archive controlfile datafile dump redolog
Goto primary database and copy all datafiles into standby database
datafile folder
primary database
SQL> startup
ORACLE instance started.
Database altered.
cd/dbs/
vi initstandby.ora
*.background_dump_dest='/home/oracle9i/admin/shiv/bdump'
*.compatible='9.2.0'
*.control_files='/home/oracle9i/admin/shiv/control/control01.ctl'
*.core_dump_dest='/home/oracle9i/admin/shiv/cdump'
*.db_block_size=4096
*.db_cache_size=100m
*.db_name='shiv'
*.log_archive_dest_1='location=/home/oracle9i/admin/shiv/arch'
*.log_archive_dest_state_1='enable'
*.log_archive_start=TRUE
*.query_rewrite_enabled='TRUE'
*.query_rewrite_integrity='TRUSTED'
*.shared_pool_size=100m
*.undo_management='auto'
*.undo_tablespace='undotbs'
*.user_dump_dest='/home/oracle9i/admin/shiv/udump'
:%s/shiv/standby/g
*.background_dump_dest='/home/oracle9i/standby/shiv/bdump'
*.compatible='9.2.0'
*.control_files='/home/oracle9i/standby/shiv/control/control01.ctl'
*.core_dump_dest='/home/oracle9i/standby/shiv/cdump'
*.db_block_size=4096
*.db_cache_size=100m
*.db_name='shiv'
*.log_archive_dest_1='location=/home/oracle9i/standby/shiv/arch'
*.log_archive_dest_state_1='enable'
*.log_archive_start=TRUE
*.query_rewrite_enabled='TRUE'
*.query_rewrite_integrity='TRUSTED'
*.shared_pool_size=100m
*.undo_management='auto'
*.undo_tablespace='undotbs'
*.user_dump_dest='/home/oracle9i/standby/shiv/udump'
*.background_dump_dest='/home/oracle9i/standby/dump/bdump'
*.compatible='9.2.0'
*.control_files='/home/oracle9i/standby/controlfile/cntr.ctl'
*.db_block_size=4096
*.db_cache_size=100m
*.db_name='shiv'
*.log_archive_dest_1='location=/home/oracle9i/standby/arch'
*.log_archive_dest_state_1='enable'
*.log_archive_start=TRUE
*.query_rewrite_enabled='TRUE'
*.query_rewrite_integrity='TRUSTED'
*.shared_pool_size=100m
*.undo_management='auto'
*.undo_tablespace='undotbs'
*.user_dump_dest='/home/oracle9i/standby/dump/udump'
db_file_name_convert='/home/oracle9i/admin/shiv/data','/home/oracle9i/sta
ndby/datafile'
log_file_name_convert='/home/oracle9i/admin/shiv/redo','/home/oracle9i/st
andby/redolog'
standby_file_management=auto
remote_archive_enable=true
instance_name=standby
lock_name_space=standby
standby_archive_dest='/home/oracle9i/standby/arch'
To create listeners
#netmgr
To start listeners
Database altered.
System altered.
go to standby database
Database altered.
Database altered.
Primary database
System altered.
SQL> /
System altered.
SQL> /
System altered.
standby database
Database altered.
Database altered.
Primary database
14 rows selected.
1 row updated.
SQL> commit;
Commit complete.
To check update
Database altered.
Database altered.
14 rows selected.
SQL> alter database recover managed standby database disconnect from
session;
Database altered.
Database altered.
14 rows selected.
Database altered.
Database altered.
SQL> select * from scott.emp;
14 rows selected.
SQL> shut
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.