Friday, December 30, 2011

Problmes And Solutions


1. Net Sevice Name Incorrectly Specified
              Sid Name Incorrect

2. Tns Lost Contact
                           Recreate Listener
3. Ora-01455: Converting Column Overflows Integer Datatype
                                  Statistics=None Or Exclude=Statistics
Nls_Characterset. Nls_Language=American_America.We8mswin1252

4. Canot Open Database In Exclusive Mode
   Shut Instance Which Already Runing Using Same Crd Files

5. How To Do Data Pump Import From Higher To Lower Version Database
       Expdp Arju/A Tables=Test Dumpfile=Test_Table.Dmp Logfile=Test_Table.Log Directory=E Version=10.2

6. Data In The Partition Was Deleted But Space Allocated To That Partition Was Not Gained
                       Alter Table User_Activity Truncate Partition Mar_2008 Drop Storage;

7.The Sha-Bang (#!) At The Head Of A Script Tells Your System That This
File Is A Set  Of Commands To  Be Fed To The Command Interpreter Indicated.
 After #! There Is Path Name Which Is The Path To The Program That Interprets The  ommands In   The Script, Whether It Be A Shell, A Programming Language, Or  A Utility. This Command
 Interpreter Then Executes  The Commands In The Script, Starts At The Top And  Ignore
 Comments.

8. Ora-27101: Shared Memory Realm Does Not Exist
 Create Spfile From Pfile   . Problem Will Solve   With Old Sga Parameters

9.  Ora-00054 Resource Busy And Acquire With Nowait Specified
 Oracle Database 11g Includes The Ddl_Lock_Timeout Parameter, Which You Can Set Using
 The Alter System And Alter Session Commands. Now You Have The Opportunity Not To Issue
 Ddl   Frequently And Query Itself Can Wait A Specified Time And If It Find Resource Free Within  This Time  Ddl Operation Will Be Completed.

10. To  Add New Partition To A Table
 Alter Table Chitta Split Partition Pmax At (To_Date('01-Aug-2011')) 
 Into (Partition P0711,Partition Pmax)

 11.  Exporting Questionable Statistics
Slect Nls_Characterset From Nls_Database_Parameters
Export  Nls_Lang=American_America.Character Set

12 . Ping[Arc0]: Heartbeat Failed To Connect To Standby 'Standby'. Error Is 1031. Insufficient Privs
 Recreate  Standby Database Password File  Using Orapwd Utility

13 . Ora-01153: An Incompatible Media Recovery Is Active
 Alter Database Recover Managed Standby Database Cancel;

14.  Ora-16607: One Or More Databases Have Failed
 Both Databases Should Start With Spfile Only And In Both Databases The Parameter
 Dg_Broker_Start Should Be Set To True

15.Oc4j Configuration Issue. F:\Oracle\Product\10.2.0\Db_1/Oc4j/J2ee/Oc4j_Dbconsole_Radha_Orcl Not Found.

16. To View A List Of Archivelogs That Are No Longer Needed On The Standby, You Must First Execute The Following Procedure:
Execute Dbms_Logstdby.Purge_Session;
This Procedure Updates The Dba_Logmnr_Purged_Log View With A List Of Archivelogs That Are No Longer Needed.
Alter Database Start Logical Standby Apply Skip Failed Transaction;

17. Rman-05001: Auxiliary Filename '%S' Conflicts With A File Used By The Target Database
  Db_File_Name_Convert=(,)
  Log_File_Name_Convert=(,)

18. Rman-06023: No Backup Or Copy Of Datafile 5 Found To Restore
 Copy  Rman Backup Set Copies To Remote  System Directory

19.  To Mount Widows Folder Into Linux
Mount –T Cifs  //10.150.1.26/Shared Folder  /Mount –O Username=Root

20. Case Statement In Where Clase
Sql>Var  Dyy Number
Sq>Exec :Dyy:=15
Select * From Estimate_Approval_Auth_M O Where O.Category_Id='100-22'  And No_Of_Days = (Case When    
:Dyy >=5 Then 5 When :Dyy>5 And :Dyy>=10 Then 10  When :Dyy>10 And :Dyy>=15 Then 15 When :Dyy>;15
And :Dyy>20 Then 20 Else 25 End )

22.  Run Level check failed in cluvfy 

Check: Run level
  Node Name     run level                 Required                  Status
  ------------  ------------------------  ------------------------  ----------
  il06devvcpdb01  unknown                   3,5                       failed
Result: Run level check failed

[oragrid@il06devvcpdb01 grid]$ /usr/bin/who -r
[oragrid@il06devvcpdb01 grid]$

Chmod 644 /etc/inittab
Chmod 644 /var/run/utmp

[oragrid@il06devvcpdb01 grid]$ who -r
         run-level 5  2012-02-07 06:58                   last=S

[oragrid@il06devvcpdb01 grid]$

Configuring Dataguard Broker

Broker log files are created in the alert log directory and are named drc.log.

1.SET  FOLLOWING PARAMETER TO TRUE

ALTER SYSTEM SET DG_BROKER_START=TRUE;

2.  DGMGRL

DGMGRL> CONNCT SYS@PRIMARY/ORACLE

3. Create the broker configuration.

CREATE CONFIGURATION DATAGUARD AS

  PRIMARY DATABASE IS PRIMARY

  CONNECT IDENTIFIER IS PRIMARY;

4. Show the configuration information.

>SHOW  CONFIGURATION ;

Configuration

  Name:                dataguard

  Enabled:             NO

  Protection Mode:     MaxPerformance

  Fast-Start Failover: DISABLED

  Databases:

    primary - Primary database

Current status for "dataguard":

DISABLED

5. ADD STANDBY DATABASE TO BROKER

>ADD DATABASE STANDBY  AS

  CONNECT IDENTIFIER IS STANDBY

  MAINTAINED AS PHYSICAL;

6. >SHOW CONFIGURATION;

Configuration

  Name:                dataguard

  Enabled:             NO

  Protection Mode:     MaxPerformance

  Fast-Start Failover: DISABLED

  Databases:

    primary - Primary database

    standby - Physical standby database

Current status for "dataguard":

DISABLED

7. ENABLE CONFIGURATION

> ENABLE CONFIGURATION ;

Warning: ORA-16607: one or more databases have failed

Check broker log  file

    Error: ORA-16627: operation disallowed since no standby databases would remain to support protection mode

    Maintain  LogXptMode parameter  as SYNC IN BOTH  DBS

    ORA-16628: the broker protection mode is inconsistent with the database setting

    Maintain protection modes are same in broker and db

    ORA-16072: a minimum of one standby database destination is required

Most likely cause for this error is ,primary LOG_ARCHIVE_DEST_2 was not in sync with the Standby protection mode.

eg:-

log_archive_dest_2 = SERVICE=orcl1 LGWR ASYNC NOAFFIRM
log_archive_dest_3 = SERVICE=orcl2 LGWR ASYNC NOAFFIRM

Please set the Primary Init.ora parameter log_archive_dest_ correctly (at least for one standby destination) in sync with the standby Protection mode..

Requirements for Maximum Protection and Maximum Availability modes :
- Redo archival process: LGWR
- transmission mode: SYNC
- Disk write option: AFFIRM

---------------------------------------OR


Change the Protection mode to Maximum performance

Setting Protection Modes in Database

ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE {AVAILABILITY | PERFORMANCE | PROTECTION};

Fast-Start Failover (FSFO) feature that provides an ability of automatic failover to the standby database if the primary database is not available for certain time.

PREREQUIREMENTS:

Enabling Fast-Start Failover requires the following pre-requisites to be met:
Flashback Database feature is enabled on both the primary and the standby database.
The protection mode of the configuration must be set to MAXIMUM AVAILABILITY
tnsnames.ora in the ORACLE_HOME where the observer runs must be set to see both databases, the primary and the standby.
DGMGRL must be available on the observer host.

Physical Standby database Configuration Using RMAN



1.create  pfile for primary database
2.create pfile for standby database

Click bellow link for parameter settings 

http://oracle-dba-world.blogspot.in/2011/12/physical-standby-database-configuration.html

3. create control file for standby database from primary database
Using rman
BACKUP CURRENT CONTROLFILE FOR STANDBY;
4. take full backup of primary database .
5.copy this rman backup to standby database server , make sure that u should maintain same directory structure
6.create oracle service using oradim (in windows)
7.create spfile and pwd file for standby database
8. create listener and add database services in listener.ora and host string in tnsnames.ora in both databases
9. start the standby database in nomount mode.
10. connect to rman
rman target sys/oracle@primary  auxiliary sys/oracle@standby
connected to target database: SATI (DBID=1784854517)
connected to auxiliary database: SATI (not mounted)
if u get error while connecting standby database
error from auxiliary database: ORA-12528: TNS:listener: all appropriate instances are blocking new connections
check listener.ora in standby database it should containd sid list for current sid
11.

run {
 allocate channel prmy1 type disk;
 allocate auxiliary channel stby type disk;
 duplicate target database for standby from active database ;
}
C:\Documents and Settings\VINITHA>rman  target sys@primary auxiliary sys@standby

Recovery Manager: Release 10.2.0.1.0 - Production on Sat Apr 23 23:38:38 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

target database Password:
connected to target database: ORCL (DBID=1259160665)
auxiliary database Password:
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04006: error from auxiliary database: ORA-12528: TNS:listener: all appropriate instances are blocking new connections

C:\Documents and Settings\VINITHA>rman  target sys@primary auxiliary /

Recovery Manager: Release 10.2.0.1.0 - Production on Sat Apr 23 23:46:59 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

target database Password:
connected to target database: ORCL (DBID=1259160665)
connected to auxiliary database: ORCL (DBID=1259160665)

RMAN> run {
2>  allocate channel prmy1 type disk;
3>  allocate auxiliary channel stby type disk;
4> DUPLICATE TARGET DATABASE FOR STANDBY NOFILENAMECHECK;
5> }

using target database control file instead of recovery catalog
allocated channel: prmy1
channel prmy1: sid=270 devtype=DISK

allocated channel: stby
channel stby: sid=274 devtype=DISK

Starting Duplicate Db at 23-APR-11
released channel: prmy1
released channel: stby
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 04/23/2011 23:47:33
RMAN-05500: the auxiliary database must be not mounted when issuing a DUPLICATE command

RMAN> EXIT


Recovery Manager complete.

C:\Documents and Settings\VINITHA>rman  target sys@primary auxiliary /

Recovery Manager: Release 10.2.0.1.0 - Production on Sat Apr 23 23:53:31 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

target database Password:
connected to target database: ORCL (DBID=1259160665)
connected to auxiliary database: ORCL (DBID=1259160665)

RMAN> EXIT


Recovery Manager complete.

C:\Documents and Settings\VINITHA>rman  target sys@primary auxiliary /

Recovery Manager: Release 10.2.0.1.0 - Production on Sat Apr 23 23:56:56 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

target database Password:
connected to target database: ORCL (DBID=1259160665)
connected to auxiliary database: ORCL (DBID=1259160665)

RMAN> EXIT


Recovery Manager complete.

C:\Documents and Settings\VINITHA>rman  target sys@primary auxiliary sys@standby

Recovery Manager: Release 10.2.0.1.0 - Production on Sat Apr 23 23:57:15 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

target database Password:
connected to target database: ORCL (DBID=1259160665)
auxiliary database Password:
connected to auxiliary database: ORCL (not mounted)

RMAN> run {
2>  allocate channel prmy1 type disk;
3>  allocate auxiliary channel stby type disk;
4> DUPLICATE TARGET DATABASE FOR STANDBY NOFILENAMECHECK;
5> }

using target database control file instead of recovery catalog
allocated channel: prmy1
channel prmy1: sid=274 devtype=DISK

allocated channel: stby
channel stby: sid=321 devtype=DISK

Starting Duplicate Db at 23-APR-11

contents of Memory Script:
{
   restore clone standby controlfile;
   sql clone 'alter database mount standby database';
}
executing Memory Script

Starting restore at 23-APR-11

channel stby: starting datafile backupset restore
channel stby: restoring control file
channel stby: reading from backup piece F:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\PRIMARY\BACKUPSET\2011_04_23\O1_MF_NCNNF_TAG20110423T073323_6V4DVFTV_.BKP
ORA-19870: error reading backup piece F:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\PRIMARY\BACKUPSET\2011_04_23\O1_MF_NCNNF_TAG20110423T073323_6V4DVFTV_.BKP
ORA-19505: failed to identify file "F:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\PRIMARY\BACKUPSET\2011_04_23\O1_MF_NCNNF_TAG20110423T073323_6V4DVFTV_.BKP"
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 3) The system cannot find the path specified
failover to previous backup

channel stby: restoring control file
ORA-19625: error identifying file F:\CONTROL01.CTL
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 3) The system cannot find the path specified.
ORA-19600: input file is control file  (F:\CONTROL01.CTL)
ORA-19601: output file is control file  (G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL01.CTL)
failover to previous backup

channel stby: restoring control file
ORA-19625: error identifying file C:\CONTROL.CTL
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 2) The system cannot find the file specified.
ORA-19600: input file is control file  (C:\CONTROL.CTL)
ORA-19601: output file is control file  (G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL01.CTL)
failover to previous backup

channel stby: restoring control file
ORA-19625: error identifying file D:\CONTROL01.CTL
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 21) The device is not ready.
ORA-19600: input file is control file  (D:\CONTROL01.CTL)
ORA-19601: output file is control file  (G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL01.CTL)
failover to previous backup

channel stby: restoring control file
ORA-19625: error identifying file D:\CONTROL01.DBF
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 21) The device is not ready.
ORA-19600: input file is control file  (D:\CONTROL01.DBF)
ORA-19601: output file is control file  (G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL01.CTL)
failover to previous backup

released channel: prmy1
released channel: stby
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 04/23/2011 23:59:33
RMAN-03015: error occurred in stored script Memory Script
RMAN-06026: some targets not found - aborting restore
RMAN-06024: no backup or copy of the control file found to restore

###########################################################
### copy all rman backup to standby database into same directory structure ###########################################################

RMAN> run {
2>  allocate channel prmy1 type disk;
3>  allocate auxiliary channel stby type disk;
4> DUPLICATE TARGET DATABASE FOR STANDBY NOFILENAMECHECK;
5> }

allocated channel: prmy1
channel prmy1: sid=274 devtype=DISK

allocated channel: stby
channel stby: sid=321 devtype=DISK

Starting Duplicate Db at 24-APR-11

contents of Memory Script:
{
   restore clone standby controlfile;
   sql clone 'alter database mount standby database';
}
executing Memory Script

Starting restore at 24-APR-11

channel stby: starting datafile backupset restore
channel stby: restoring control file
channel stby: reading from backup piece F:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\PRIMARY\BACKUPSET\2011_04_23\O1_MF_NCNNF_TAG20110423T073323_6V4DVFTV_.BKP
channel stby: restored backup piece 1
piece handle=F:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\PRIMARY\BACKUPSET\2011_04_23\O1_MF_NCNNF_TAG20110423T073323_6V4DVFTV_.BKP tag=TAG20110423T073323
channel stby: restore complete, elapsed time: 00:00:37
output filename=G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL01.CTL
output filename=G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL02.CTL
output filename=G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL03.CTL
Finished restore at 24-APR-11

sql statement: alter database mount standby database

contents of Memory Script:
{
   set newname for tempfile  1 to
 "G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\TEMP01.DBF";
   switch clone tempfile all;
   set newname for datafile  1 to
 "G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF";
   set newname for datafile  2 to
 "G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF";
   set newname for datafile  3 to
 "G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF";
   set newname for datafile  4 to
 "G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF";
   set newname for datafile  5 to
 "G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\EXAMPLE01.DBF";
   set newname for datafile  6 to
 "G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SAMPLE01.DBF";
   set newname for datafile  7 to
 "G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SAMPLE02.DBF";
   restore
   check readonly
   clone database
   ;
}
executing Memory Script

executing command: SET NEWNAME

renamed temporary file 1 to G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\TEMP01.DBF in control file

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 24-APR-11

channel stby: starting datafile backupset restore
channel stby: specifying datafile(s) to restore from backup set
restoring datafile 00001 to G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF
restoring datafile 00002 to G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF
restoring datafile 00003 to G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF
restoring datafile 00004 to G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF
restoring datafile 00005 to G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\EXAMPLE01.DBF
restoring datafile 00006 to G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SAMPLE01.DBF
restoring datafile 00007 to G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SAMPLE02.DBF
channel stby: reading from backup piece F:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\PRIMARY\BACKUPSET\2011_04_22\O1_MF_NNNDF_TAG20110422T213412_6V39R2QG_.BKP
channel stby: restored backup piece 1
piece handle=F:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\PRIMARY\BACKUPSET\2011_04_22\O1_MF_NNNDF_TAG20110422T213412_6V39R2QG_.BKP tag=TAG20110422T213412
channel stby: restore complete, elapsed time: 00:07:28
Finished restore at 24-APR-11

contents of Memory Script:
{
   switch clone datafile all;
}
executing Memory Script

datafile 1 switched to datafile copy
input datafile copy recid=24 stamp=749237785 filename=G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF
datafile 2 switched to datafile copy
input datafile copy recid=25 stamp=749237785 filename=G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF
datafile 3 switched to datafile copy
input datafile copy recid=26 stamp=749237785 filename=G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF
datafile 4 switched to datafile copy
input datafile copy recid=27 stamp=749237785 filename=G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF
datafile 5 switched to datafile copy
input datafile copy recid=28 stamp=749237786 filename=G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\EXAMPLE01.DBF
datafile 6 switched to datafile copy
input datafile copy recid=29 stamp=749237786 filename=G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SAMPLE01.DBF
datafile 7 switched to datafile copy
input datafile copy recid=30 stamp=749237786 filename=G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SAMPLE02.DBF
Finished Duplicate Db at 24-APR-11
released channel: prmy1
released channel: stby

12. START REDO APPLYING BY ISSUEING FOLLOWING COMMAND
 ALTER DATABASE RECOVER STANDBY DATABASE DISCONNECT FROM SESSION

Physical Standby database Configuration By coping Datafile from production to standby


1.. CREATE  PFILE OF PRIMARY DATABASE   WHICH CONTAINS  NECESSARY PARAMETERS  FOR PRIMAY DATABASE ENVIRONMENT

DB_UNIQUE_NAME=PRIMARY

SERVICE_NAMES=PRIMARY

LOG_ARCHIVE_CONFIG='DG_CONFIG=(PRIMARY,STANDBY)'

LOG_ARCHIVE_DEST_1='LOCATION=F:\oracle\product\10.2.0\flash_recovery_area\ORCL\ARCHIVELOG  VALID_FOR=(ALL_LOGFILES,ALL_ROLES) 

DB_UNIQUE_NAME=PRIMARY'

LOG_ARCHIVE_DEST_2='SERVICE=STANDBY LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=STANDBY'

LOG_ARCHIVE_DEST_STATE_1=ENABLE

LOG_ARCHIVE_DEST_STATE_2=ENABLE

REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE

LOG_ARCHIVE_FORMAT=%t_%s_%r.arc 

LOG_ARCHIVE_MAX_PROCESSES=30

FAL_SERVER=STANDBY

FAL_CLIENT=PRIMARY

DB_FILE_NAME_CONVERT='STANDBY','PRIMARY'

LOG_FILE_NAME_CONVERT='G:\oracle\product\10.2.0\oradata\ORCL','G:\oracle\product\10.2.0\oradata\orcl'

STANDBY_FILE_MANAGEMENT=AUTO





2. CREATE  PFILE FOR STANDBY DATABASE  


DB_UNIQUE_NAME=STANDBY

SERVICE_NAMES=STANDBY

LOG_ARCHIVE_CONFIG='DG_CONFIG=(STANDBY,PRIMARY)'

LOG_ARCHIVE_DEST_1='LOCATION=F:\oracle\product\10.2.0\flash_recovery_area\ORCL\ARCHIVELOG  VALID_FOR=(ALL_LOGFILES,ALL_ROLES) 

DB_UNIQUE_NAME=STANDBY'

LOG_ARCHIVE_DEST_2='SERVICE=PRIMARY LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=PRIMARY'

LOG_ARCHIVE_DEST_STATE_1=ENABLE

LOG_ARCHIVE_DEST_STATE_2=ENABLE

REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE

LOG_ARCHIVE_FORMAT=%t_%s_%r.arc

LOG_ARCHIVE_MAX_PROCESSES=30

FAL_SERVER=STANDBY

FAL_CLIENT=PRIMARY

DB_FILE_NAME_CONVERT='STANDBY','PRIMARY'

LOG_FILE_NAME_CONVERT='G:\oracle\product\10.2.0\oradata\ORCL','G:\oracle\product\10.2.0\oradata\orcl'

STANDBY_FILE_MANAGEMENT=AUTO


2.  CREATE SPFILE AND PWD FILE FOR PRIMARY DATABASE AND   PUT THE PRIMARY DATABASE IN  MOUNT MODE .

3. CREATE  STAND BY DATABASE CONTROLFILE USING  PRIMARY DATABASE CONTROLFILE  BY ISSUEING FOLLOWING COMMAND

ALTER DATABASE CREATE STANDBY CONTROLFILE AS '/tmp/boston.ctl';

4. CREATE SERVICE FOR STANDBY DATABASE USING ORADIM AND ALSO CREATE NECESSARY DIRECTORY STRUCTURES . CREATE SPFILE AND PWD FILE FOR STANDBY DATABASE

5. COPY STANDBY DATABASE CONTROLFILE CREATED USING PRIMARY DB AND ALL DATAFILES  AND REDO LOG FILES TO STNAND BY DATABASE SERVER

6. create listener and add database services in listener.ora and host string in tnsnames.ora in both databases

7. MOUNT THE STANDBY DATABASE

8. create temporary tablespace for standby database

9. START REDO APPLYING BY ISSUEING FOLLOWING COMMAND

 ALTER DATABASE RECOVER STANDBY DATABASE DISCONNECT FROM SESSION