1)local_data_guard physical standby database

  primary database sid : orcl
  standby database sid : standby
1@@@@create initorcl.ora for primary database.
@@@
####begin_1-1##########################################
[oracle@station15 dbs]$ cat initorcl.ora
*.__db_cache_size=436207616
orcl.__db_cache_size=427819008
*.__java_pool_size=4194304
orcl.__java_pool_size=4194304
*.__large_pool_size=4194304
orcl.__large_pool_size=4194304
*.__shared_pool_size=163577856
orcl.__shared_pool_size=171966464
*.__streams_pool_size=0
orcl.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/orcl/adump'
*.background_dump_dest='/u01/app/oracle/admin/orcl/bdump'
*.compatible='10.2.0.1.0'
*.control_files='/u01/app/oracle/oradata/orcl/controlfile/control01.ctl','/u01/app/oracle/oradata/orcl/controlfile/control02.ctl','/u01/app/oracle/oradata/orcl/controlfile/control03.ctl'
*.core_dump_dest='/u01/app/oracle/admin/orcl/cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
*.job_queue_processes=10
*.open_cursors=300
*.pga_aggregate_target=203423744
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=612368384
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='/u01/app/oracle/admin/orcl/udump'
*.db_file_name_convert='/u01/app/oracle/oradata/standby','/u01/app/oracle/oradata/orcl'
*.db_name='orcl'
*.fal_client='orcl'
*.fal_server='standby'
*.log_archive_config='dg_config=(orcl,standby)'
*.log_archive_dest_1='location=/u01/app/oracle/oradata/orcl/archivelog valid_for=(all_logfiles,all_roles) db_unique_name=orcl'
*.log_archive_dest_2='service=standby valid_for=(online_logfiles,primary_role) db_unique_name=standby'
*.log_file_name_convert='/u01/app/oracle/oradata/standby','/u01/app/oracle/oradata/orcl'
*.log_archive_format=log_%t_%s_%r_.arc
*.standby_file_management='AUTO'
######end_1-1##########################################
@@@
@@@make sure primary database is archived mode
SQL> select open_mode from v$database;
OPEN_MODE
------------------------------
READ WRITE
SQL> alter database close;
SQL> alter database archivelog;
SQL> startup force
SQL> alter database force logging;
@@@
@@@modify the outside password file.
@@@without the orapwxxxx file, the archivelog transport would be refused.
[oracle@station15 dbs]$ pwd
/u01/app/oracle/product/10.2.0/db_1/dbs
[oracle@station15 dbs]$ cp orapwdorcl orapwdstandby
@@@
@@@create dir for inintial to nomount
mkdir -p /u01/app/oracle/admin/standby/adump
mkdir -p /u01/app/oracle/admin/standby/bdump
mkdir -p /u01/app/oracle/admin/standby/cdump
mkdir -p /u01/app/oracle/admin/standby/udump
mkdir -p /u01/app/oracle/oradata/orcl/archivelog
mkdir -p /u01/app/oracle/oradata/orcl/onlinelog
mkdir -p /u01/app/oracle/oradata/orcl/datafile
mkdir -p /u01/app/oracle/oradata/orcl/controlfile
mkdir -p /u01/app/oracle/oradata/standby/controlfile
mkdir -p /u01/app/oracle/flash_recovery_area
2@@@@compute the standby database
@@@apply the new parameter initorcl.ora to primary database.
@@@and copy datafile to stanby database
SQL> shutdown immediate;
SQL> startup nomount pfile='?/dbs/initorcl.ora';
SQL> create spfile from pfile;
SQL> alter database mount;
SQL> alter database create standby controlfile as
     '/u01/app/oracle/oradata/standby/controlfile/control01.ctl';
SQL> alter database open;
SQL> shutdown immediate
SQL> !cp -rp /u01/app/oracle/oradata/orcl/* /u01/app/oracle/oradata/standby
@@@
@@@configure the tns for "data guard broker"
[oracle@station15 admin]$ vim $TNS_ADMIN/tnsnames.ora
orcl =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.15)(PORT = 1521)))
    (CONNECT_DATA =(SID = orcl))
    )
standby =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.15)(PORT = 1521)))
    (CONNECT_DATA =(SID = standby))
    )
3@@@@edit and apply the initorcl.ora to standby database.
@@@
####begin_3-1########################################
[oracle@station15 dbs]$ cat initstandby.ora
*.__db_cache_size=436207616
standby.__db_cache_size=427819008
*.__java_pool_size=4194304
standby.__java_pool_size=4194304
*.__large_pool_size=4194304
standby.__large_pool_size=4194304
*.__shared_pool_size=163577856
standby.__shared_pool_size=171966464
*.__streams_pool_size=0
standby.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/standby/adump'
*.background_dump_dest='/u01/app/oracle/admin/standby/bdump'
*.compatible='10.2.0.1.0'
*.control_files='/u01/app/oracle/oradata/standby/controlfile/control01.ctl','/u01/app/oracle/oradata/standby/controlfile/control02.ctl','/u01/app/oracle/oradata/standby/controlfile/control03.ctl'
*.core_dump_dest='/u01/app/oracle/admin/standby/cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_file_name_convert='/u01/app/oracle/oradata/orcl','/u01/app/oracle/oradata/standby'
*.db_name='orcl'
*.db_unique_name='standby'
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.dispatchers='(PROTOCOL=TCP) (SERVICE=standbyXDB)'
*.fal_client='standby'
*.fal_server='orcl'
*.job_queue_processes=10
*.log_archive_config='dg_config=(orcl,standby)'
*.log_archive_dest_1='location=/u01/app/oracle/oradata/standby/archivelog valid_for=(all_logfiles,all_roles) db_unique_name=standby'
*.log_archive_dest_2='service=orcl valid_for=(online_logfiles,primary_role) db_unique_name=orcl'
*.log_file_name_convert='/u01/app/oracle/oradata/orcl','/u01/app/oracle/oradata/standby'
*.log_archive_format=log_%t_%s_%r_.arc
*.open_cursors=300
*.pga_aggregate_target=203423744
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=612368384
*.standby_file_management='AUTO'
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='/u01/app/oracle/admin/standby/udump'
######end_3-1########################################
@@@
[oracle@station15 admin]$ export ORACLE_SID=standby
[oracle@station15 admin]$ sqlplus /  as sysdba
SQL> create spfile from pfile;
SQL> startup
Database mounted.
Database opened.
@@@
SQL> alter database recover managed standby database disconnect from session;
Database altered.
4@@@@check archivelog
@@@start the primary database.
[oracle@station15 standby]$ echo $ORACLE_SID
orcl
[oracle@station15 standby]$ sqlplus / as sysdba
SQL> startup
Database mounted.
Database opened.
@@@
SQL> alter system switch logfile;
System altered.
[root@station15 bdump]# pwd
/u01/app/oracle/admin/standby/bdump
[root@station15 bdump]# vim alert_standby.log
.....................
Media Recovery Waiting for thread 1 sequence 13
Tue May 22 14:22:42 2012
RFS[1]: No standby redo logfiles created
RFS[1]: Archived Log: '/u01/app/oracle/oradata/standby/archivelog/log_1_13_783948788_.arc'
Tue May 22 14:22:44 2012
Media Recovery Log /u01/app/oracle/oradata/standby/archivelog/log_1_13_783948788_.arc
Media Recovery Waiting for thread 1 sequence 14
.................