Set archiving parameters on physical standby

most respected forum members,
i have two databases both are oracle 9i release 2 on windows server 2003.
A (this is production database)
B (i want to make this standby )
on A (production machine ) i set parameters
alter system set log_archive_dest_1 = 'location =E:\oracle\archives'
alter system set log_archive_dest_2 = 'service (tnsnames entry from standby db)
standby_archive_dest = 'E:\oracle\archives'' (the location is same on standby as it on primary)
on B (standby db) how i set these parameters.
plz reply in detail
regards
Edited by: user10204771 on Apr 17, 2009 6:57 AM

hi werner,
the link u told me , i m following the same doccument.
here it is chapter 3 creating physical standby db.
while enable archiving on standby db , here the parameters are
alter system set log_archive_dest_2 = 'service = (here the tnsnames entry will be from tns of primary db or standby) bcz in primary tnsnames entry is "REPEIMS" and in standby the tnsnames entry "REPSTDY".
Moreover when i will change my standby db to archivelog mode where i will set that destination
alter system set log_archive_dest_1 = 'Location (here like this) or some other parameter'
regards rehan

Similar Messages

  • Data Guard Archive Latency with Physical Standby

    I'm trying to get a latency number that tells me how long it took ARCH to move an archive file from the Primary instance to the physical standby instance and "apply it". I see lots of numbers but I can't make heads or tails of them. Does a metric such as this exist in a log file, a V$ view, or can it possibly be calculated or extrapolated?
    Thanks
    Steve ([email protected])

    This is how calculated the same in a test env.
    1. stop standby listener
    2. shutdown standby
    3. perform a data load (import)
    4. start the standby listener. This will cause arch files to be shipped to the standby. Monitor the files being shipped and time it
    5. start the standby db in recovery mode
    6. repeatedly execute the following query while timing the log apply services:
    SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;

  • Patching with physical standby document

    There is this old document targeting 9i. Is there anything for 11g of a similar nature:
    Applying Patch Sets / Interim Patches with Physical Standby Database in Place in Oracle 9i [ID 187242.1]

    You require others to search for free on your behalf?
    Shame on you!
    Sybrand Bakker
    Senior Oracle DBA

  • Setting up a physical standby on a server with a different structure

    I am having a few issues trying to set up a physical standby database.
    The primary database has a different naming structure than the standby and they are at different sites.
    Physical is /var/hpsrp/ctrorp03/oradata/u0x/<DB_NAME>/<DB_UNIQUE_NAME> and standby is /var/hpsrp/drforp03/oradata/u0x/<DB_NAME>/<DB_UNIQUE_NAME>.
    I have set db_file_name_convert to '<PRIMARY PATH>', '<STANDBY PATH>' times the number of paths as pairs.
    I have created a blank database for standby and having taken a full backup of primary with control file and standby control file.
    Now I hit the issues:
    The DB incarnation numbers are different.
    When I try and do a normal restore e.g. set dbid, restore controlfile; mount; it fails as it is trying to find files in the primary structure and not standby structure.
    When I try renaming via set newname or auxname it can't find files to restore I guess due to the incarnation id's.
    If I set the incarnation id and try to restore backup it fails as the incarnation id's don't match.
    I have tried looking through various forums and the documentation but can't find a solution, probably can't see the wood for the trees though as there is so much.
    Has anyone done this type of setup before and can give me some advice?

    Thanks for you replies I will try and give more information on both.
    srsatya :- Version is 11.2 the controlfile I tried to restore was the one created by the backup not the standby should I be putting the standby in place then before I do the restore? If so just a replacement for the current controlfile by carefully replace at an OS level or by mimicing the controlfile to be restored from autobackup?
    CKPT:- Think I tried that but I have been going around in so many circles may have mucked something up.
    RMAN> set dbid=2261148474 (The PRIMARY Incarnation number)
    executing command: SET DBID
    RMAN> alter database mount;
    using target database control file instead of recovery catalog
    database mounted
    RMAN> run
    2> { 
    3> allocate channel c1 device type disk;
    4> SET NEWNAME FOR DATAFILE 1 TO '/var/hpsrp/drforp03/oradata/u01/SAPDS/DRFSAPDS/system01.dbf';
    5> SET NEWNAME FOR DATAFILE 2 TO '/var/hpsrp/drforp03/oradata/u04/SAPDS/DRFSAPDS/sysaux01.dbf';
    6> SET NEWNAME FOR DATAFILE 3 TO '/var/hpsrp/drforp03/oradata/u01/SAPDS/DRFSAPDS/undotbs01.dbf';
    7> SET NEWNAME FOR DATAFILE 4 TO '/var/hpsrp/drforp03/oradata/u01/SAPDS/DRFSAPDS/users01.dbf';
    8> SET NEWNAME FOR DATAFILE 5 TO '/var/hpsrp/drforp03/oradata/u04/SAPDS/DRFSAPDS/IPSCMS01.dbf';
    9> SET NEWNAME FOR DATAFILE 6 TO '/var/hpsrp/drforp03/oradata/u04/SAPDS/DRFSAPDS/IPSA01.dbf';
    10> SET NEWNAME FOR DATAFILE 7 TO '/var/hpsrp/drforp03/oradata/u02/SAPDS/DRFSAPDS/DSCR01.dbf';
    11> SET NEWNAME FOR DATAFILE 8 TO '/var/hpsrp/drforp03/oradata/u03/SAPDS/DRFSAPDS/ISCR01.dbf';
    12> SET NEWNAME FOR DATAFILE 9 TO '/var/hpsrp/ctrorp03/oradata/u05/SAPDS/CTRSAPDS/DSLR_DEV01.dbf';
    13> SET NEWNAME FOR DATAFILE 10 TO '/var/hpsrp/ctrorp03/oradata/u05/SAPDS/CTRSAPDS/undotbs02.dbf';
    14>
    15> RESTORE DATABASE;
    16> SWITCH DATAFILE ALL;
    17> RECOVER DATABASE;
    18> }
    allocated channel: c1
    channel c1: SID=165 device type=DISK
    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
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    Starting restore at 28-JUN-12
    released channel: c1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 06/28/2012 10:21:13
    RMAN-06189: current DBID 2261148474 does not match target mounted database (2261834728)
    RMAN> exit
    Recovery Manager complete.
    drfora04 ora_srp3 $ rman
    Recovery Manager: Release 11.2.0.1.0 - Production on Thu Jun 28 10:22:16 2012
    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
    RMAN> connect target /
    connected to target database: SAPDS (DBID=2261834728, not open)
    RMAN> run
    2> { 
    3> allocate channel c1 device type disk;
    4> SET NEWNAME FOR DATAFILE 1 TO '/var/hpsrp/drforp03/oradata/u01/SAPDS/DRFSAPDS/system01.dbf';
    5> SET NEWNAME FOR DATAFILE 2 TO '/var/hpsrp/drforp03/oradata/u04/SAPDS/DRFSAPDS/sysaux01.dbf';
    6> SET NEWNAME FOR DATAFILE 3 TO '/var/hpsrp/drforp03/oradata/u01/SAPDS/DRFSAPDS/undotbs01.dbf';
    7> SET NEWNAME FOR DATAFILE 4 TO '/var/hpsrp/drforp03/oradata/u01/SAPDS/DRFSAPDS/users01.dbf';
    8> SET NEWNAME FOR DATAFILE 5 TO '/var/hpsrp/drforp03/oradata/u04/SAPDS/DRFSAPDS/IPSCMS01.dbf';
    9> SET NEWNAME FOR DATAFILE 6 TO '/var/hpsrp/drforp03/oradata/u04/SAPDS/DRFSAPDS/IPSA01.dbf';
    10> SET NEWNAME FOR DATAFILE 7 TO '/var/hpsrp/drforp03/oradata/u02/SAPDS/DRFSAPDS/DSCR01.dbf';
    11> SET NEWNAME FOR DATAFILE 8 TO '/var/hpsrp/drforp03/oradata/u03/SAPDS/DRFSAPDS/ISCR01.dbf';
    12> SET NEWNAME FOR DATAFILE 9 TO '/var/hpsrp/ctrorp03/oradata/u05/SAPDS/CTRSAPDS/DSLR_DEV01.dbf';
    13> SET NEWNAME FOR DATAFILE 10 TO '/var/hpsrp/ctrorp03/oradata/u05/SAPDS/CTRSAPDS/undotbs02.dbf';
    14>
    15> RESTORE DATABASE;
    16> SWITCH DATAFILE ALL;
    17> RECOVER DATABASE;
    18> }
    using target database control file instead of recovery catalog
    allocated channel: c1
    channel c1: SID=165 device type=DISK
    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
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    Starting restore at 28-JUN-12
    released channel: c1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 06/28/2012 10:22:26
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 4 found to restore
    RMAN-06023: no backup or copy of datafile 3 found to restore
    RMAN-06023: no backup or copy of datafile 2 found to restore
    RMAN-06023: no backup or copy of datafile 1 found to restore
    RMAN>
    Edited by: gzmzpz on 28-Jun-2012 04:56

  • How to change the database character set on physical standby database?

    Hi,
    We have a database with character set WE8ISO8859P1 and migrated the character set to WE8MSWIN1252 using csscan/csalter scripts. This database has a physical standby database setup also and after the migration, the physical standby database is still showing the character set as WE8ISO8859P1. How can I change the characterset on the physical standby? I raised a Service Request with Oracle, and they said that recreating the standby database is the only supported way of changing the char set on the standby database. Is this true?
    Thanks,
    Sreekanth

    Thank you, Robert, for your reply.
    The standby is in sync with the primary.
    see below
    SYS@sisprod>select * from v$dataguard_stats;
    NAME VALUE UNIT TIME_COMPUTED
    apply finish time +00 00:00:00.0 day(2) to second(1) interval 12-NOV-2009 14:02:46
    apply lag +00 00:00:00 day(2) to second(0) interval 12-NOV-2009 14:02:46
    estimated startup time 11 second 12-NOV-2009 14:02:46
    standby has been open N 12-NOV-2009 14:02:46
    transport lag +00 00:00:00 day(2) to second(0) interval 12-NOV-2009 14:02:46
    SYS@sisprod>
    I am selecting from v$nls_parameters;
    I don't know how to restore the controlfile from primary. Could you please tell me how to do it?
    Thanks,
    Sreekanth

  • Dataguard physical standby archive log question

    Hi all,
    I will try to keep this simple..
    I have a 4 node RAC primary shipping logs to a 2 node physical standby.
    On the primary when I run 'alter system archive log current' on an instance I only see 1 log being applied on the standby, that is by querying v$archived_log.
    If I run the following on the standby:
    select thread#,sequence#,substr(name,43,70)"NAME",registrar,applied,status,first_time from v$archived_log where first_time
    in
    (select max(first_time) from v$archived_log group by thread#)
    order by thread#
    I get:
    THREAD# SEQUENCE# NAME REGISTR APPLIED S FIRST_TIME
    1 602 thread_1_seq_602.2603.721918617 RFS YES A 17-jun-2010 12:56:58
    2 314 thread_2_seq_314.2609.721918627 RFS NO A 17-jun-2010 12:56:59
    3 311 thread_3_seq_311.2604.721918621 RFS NO A 17-jun-2010 12:57:00
    4 319 thread_4_seq_319.2606.721918625 RFS NO A 17-jun-2010 12:57:00
    Why do we only see the max(sequence#) having been applied and not all of them?
    This is the same no matter how many times I archive the current log files on any of the instances on the primary and also the standby does not have any gaps.
    Hope this is clear..
    any ideas?
    jd

    ok output from gv$archived_log on standby BEFORE 'alter system archive log current' on primary
    THREAD# SEQUENCE# NAME REGISTR APPLIED S FIRST_TIME
    1 679 thread_1_seq_679.1267.722001505 RFS NO A 18-jun-2010 11:58:22
    1 679 thread_1_seq_679.1267.722001505 RFS NO A 18-jun-2010 11:58:22
    2 390 thread_2_seq_390.1314.722001507 RFS NO A 18-jun-2010 11:58:23
    2 390 thread_2_seq_390.1314.722001507 RFS NO A 18-jun-2010 11:58:23
    3 386 thread_3_seq_386.1266.722001505 RFS YES A 18-jun-2010 11:58:22
    3 386 thread_3_seq_386.1266.722001505 RFS YES A 18-jun-2010 11:58:22
    4 393 thread_4_seq_393.1269.722001507 RFS NO A 18-jun-2010 11:58:23
    4 393 thread_4_seq_393.1269.722001507 RFS NO A 18-jun-2010 11:58:23
    Output from v$archived_log on standby AFTER 'alter system archive log current' on primary
    THREAD# SEQUENCE# NAME REGISTR APPLIED S FIRST_TIME
    1 680 thread_1_seq_680.1333.722004227 RFS NO A 18-jun-2010 11:58:29
    1 680 thread_1_seq_680.1333.722004227 RFS NO A 18-jun-2010 11:58:29
    2 391 thread_2_seq_391.1332.722004227 RFS NO A 18-jun-2010 11:58:30
    2 391 thread_2_seq_391.1332.722004227 RFS NO A 18-jun-2010 11:58:30
    3 387 thread_3_seq_387.1271.722004225 RFS NO A 18-jun-2010 11:58:28
    3 387 thread_3_seq_387.1271.722004225 RFS NO A 18-jun-2010 11:58:28
    4 394 thread_4_seq_394.1270.722004225 RFS YES A 18-jun-2010 11:58:29
    4 394 thread_4_seq_394.1270.722004225 RFS YES A 18-jun-2010 11:58:29
    as a reminder we have a 4 node RAC system shipping logs to a 2 node RAC standby. There are no gaps but only one log is ever registered as being applied.
    Why is that? Why arnt all logs registered as being applied?

  • Physical standby in archive log mode

    HI ,
    Our phyiscal standby database is running in archive log mode,
    1.Is it manadatory to have it in archive log mode ?
    2.As it is in archive log mode , does it produce any archivelog ?

    Hello again;
    The Standby is a clone of the Primary. I assume we are talking Physical Standby.
    Why does it need to produce archive in standby role?Its does not produce archive in the Standby role. I have seen a Standby produce a log now and then, but not log after log like a primary. A Standby database does not write Redo or use Redo logs, it uses Standby Redo logs. Since Redo logs are not used, archive is not written.
    Why it is manadatory to enable archive log in standby?Smart design I'm thinking. Why would Oracle make us add this complex step to a failover/switchover?
    Keep it simple if possible.
    Data Guard Concepts and Administration 11g Release 2 (11.2) E10700-02
    Database Concepts
    http://docs.oracle.com/cd/E11882_01/server.112/e25789/process.htm
    Best Regards
    mseberg

  • Data Guard Archive Log Latency Between Primary and Physical Standby

    How can I get the time it takes (latency) for the primary instance to get an archive log over to the physical standby instance and get it "archived" and "applied". I have been looking at the V$ARCHIVED_LOG view on each side but the COLUMN "COMPLETION_TIME" always shows a date "MM/DD/YY" and no timestamp. I thought the DATE datatype include data and time. Any ideas on how I can get the latency info I'm looking for?
    Thanks
    Steve

    the COLUMN "COMPLETION_TIME" always shows a date "MM/DD/YY"
    and no timestamp. Did you try using TO_CHAR ? e.g.
    to_char(completion_time,'dd/mm/yyyy hh24:mi:ss')

  • Error while trying to open physical standby database - (DATA GUARD)

    Hi Everyone,
    I have problems in opening the database of the physical standby in read- write mode/ read only mode. I have a primary server which is running on 2 node RAC and the standby on a seperate single server being used as DR. I recently got this server and my aim was to isolate the standby server from primary server and perform few test. As it has never been tested even once.
    Primary Database spec: (2 Node Rac on ASM)
    Oracle Version : 10.2.0.3.0
    O/s : HP-UX B.11.23
    Standby Database spec: (Single Node)
    Oracle Version : 10.2.0.3.0
    O/s: HP-UX db01 B.11.23
    Error:
    alter database recover managed standby database cancel;
    Database altered.
    SQL> alter database open
    2 ;
    alter database open
    ERROR at line 1:
    ORA-16004: backup database requires recovery
    ORA-01152: file 1 was not restored from a sufficiently old backup
    ORA-01110: data file 1: '+DATA/dprod/datafile/system01.dbf'
    Parameters :
    log_archive_dest_2 string SERVICE=PROD1 LGWR ASYNC VALID
    FOR=(ONLINELOGFILES,PRIMARY_
    ROLE) DB_UNIQUE_NAME=PROD
    remote_archive_enable string true
    fal_client string DPROD
    fal_server string PROD1, PROD2
    Steps tried so far:
    Changed log_archive_dest_2 = DEFER on both the primary nodes
    Standby :
    startup nomount
    alter database mount standby database;
    alter database recover managed standby database disconnect;
    alter database recover managed standby database cancel;
    alter database open/readonly (tried both)
    Same error.
    On Primary:
    SQL> select max(sequence#) from v$log_history;
    MAX(SEQUENCE#)
    55702
    on Standby:
    MAX(SEQUENCE#)
    33289
    Primary Database:
    SELECT SEQUENCE#, FIRST_TIME, NEXT_TIME FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
    SEQUENCE# FIRST_TIME NEXT_TIME
    55700 13-JUN-11 13-JUN-11
    55700 13-JUN-11 13-JUN-11
    55701 13-JUN-11 13-JUN-11
    55701 13-JUN-11 13-JUN-11
    55702 13-JUN-11 13-JUN-11
    60824 rows selected.
    Standby Database:
    SEQUENCE# FIRST_TIME NEXT_TIME
    55698 13-JUN-11 13-JUN-11
    55699 13-JUN-11 13-JUN-11
    55700 13-JUN-11 13-JUN-11
    55701 13-JUN-11 13-JUN-11
    15206 rows selected.
    Additional Information :
    There is a delay of 20 minutes before the logs get applied. which has been intentional set by team.
    Any help will be highly appreciated. Thanks in advance
    Sadiq

    Hi,
    Primary Database:
    select status,checkpoint_count from v$datafile_header;
    STATUS CHECKPOINT_COUNT
    ONLINE 672472065
    ONLINE 672472065
    ONLINE 672472065
    ONLINE 672472065
    ONLINE 672472065
    ONLINE 672472065
    ONLINE 672472065
    ONLINE 672472065
    ONLINE 672472065
    ONLINE 672472065
    ONLINE 672472065
    STATUS CHECKPOINT_COUNT
    ONLINE 672472065
    ONLINE 672472065
    ONLINE 672472065
    ONLINE 672472065
    ONLINE 672472065
    ONLINE 672472065
    ONLINE 59736
    ONLINE 59736
    ONLINE 59736
    ONLINE 59736
    ONLINE 59736
    STATUS CHECKPOINT_COUNT
    ONLINE 57717
    ONLINE 57717
    57 rows selected.
    Standby Database;
    select status,checkpoint_count from v$datafile_header;
    STATUS CHECKPOINT_COUNT
    ONLINE 672445072
    ONLINE 672445072
    ONLINE 672445072
    ONLINE 672445072
    ONLINE 672445072
    ONLINE 672445072
    ONLINE 672445072
    ONLINE 672445071
    ONLINE 672445071
    ONLINE 672445071
    ONLINE 672445071
    STATUS CHECKPOINT_COUNT
    ONLINE 672445071
    ONLINE 672445071
    ONLINE 672445071
    ONLINE 672445071
    ONLINE 672445071
    ONLINE 672445071
    ONLINE 32742
    ONLINE 32742
    ONLINE 32742
    ONLINE 32742
    ONLINE 32742
    STATUS CHECKPOINT_COUNT
    ONLINE 30723
    ONLINE 30723
    57 rows selected.
    Archieve log list :
    Primary database:
    SQL> archive log list
    Database log mode Archive Mode
    Automatic archival Enabled
    Archive destination USE_DB_RECOVERY_FILE_DEST
    Oldest online log sequence 49110
    Next log sequence to archive 49111
    Current log sequence 49111
    Standby Database:
    SQL> archive log list;
    Database log mode Archive Mode
    Automatic archival Enabled
    Archive destination USE_DB_RECOVERY_FILE_DEST
    Oldest online log sequence 49110
    Next log sequence to archive 0
    Current log sequence 49111
    I tried log switch multiple times in primary database i saw that its getting highlighted in standby database.

  • Problem creating physical Standby database with RMAN

    Hi All
    I am trying to learn oracle dataguard and as part of the process learning creating standby database.
    Platform : Sun-Fire-V250 Sparc, Solaris 10
    Database Version - Oracle 11R2
    I am creating standby database on same server, so directory structure is different.
    Following the instructions on Oracle site I managed to create a functional physical standby database. But I am not able to create standby database using RMAN. These are the steps that I followed-
    1.Set up all necessary parameters on primary database as done while creating physical standby database manually, eg setting force logging, creating standby logs etc.
    2.Edited parameter file on primary database as done while creating manual pysical standby database creation. Some of the changes done are-
    On Primary Database:
    *.FAL_CLIENT='orcl11020' #Primary database unique name
    *.FAL_SERVER='stdby_11' #Standby database unique name
    db_file_name_convert='/<dir>/oradata/stdby_11','/<dir>/oradata/orcl11020'
    log_file_name_convert='/<dir>/oradata/stdby_11','/<dir>/oradata/orcl11020','/<dir>/oradata/stdby_11/redo_mem','/<dir>/oradata/orcl11020/redo_mem'
    standby_file_management=auto
    *.log_archive_config='DG_CONFIG=(orcl11020,stdby_11)'
    *.log_archive_dest_1='LOCATION=/<dir>/flash_recovery_area/ORCL11020/archivelog
    VALID_FOR=(ALL_LOGFILES,ALL_ROLES) db_unique_name=orcl11020'
    *.log_archive_dest_2='SERVICE=stdby_11 LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) db_unique_name=stdby_11'
    *.LOG_ARCHIVE_DEST_STATE_1='ENABLE'
    *.LOG_ARCHIVE_DEST_STATE_2='ENABLE'
    *.LOG_ARCHIVE_FORMAT='%t_%s_%r.arc'
    *.LOG_ARCHIVE_MAX_PROCESSES=30
    Copied same pfile for standby database and modified following-
    *.control_files='/<dir>/oradata/stdby_11/stdby_11.ctl','/<dir>/fra_stdby/stdby_11/stdby_11.ctl'
    *.db_name='orcl1102'
    *.db_unique_name='stdby_11'
    *.FAL_CLIENT='stdby_11'
    *.FAL_SERVER='orcl11020'
    db_file_name_convert='/<dir>/oradata/orcl11020','/<dir>/oradata/stdby_11'
    log_file_name_convert='/<dir>/oradata/orcl11020','/<dir>/oradata/stdby_11','/<dir>/oradata/orcl11020/redo_mem','/<dir>/oradata/stdby_11/redo_mem'
    standby_file_management=auto
    *.log_archive_dest_1='LOCATION=/<dir>/fra_stdby/STDBY_11/archivelog
    VALID_FOR=(ALL_LOGFILES,ALL_ROLES) db_unique_name=stdby_11'
    *.log_archive_dest_2='SERVICE=orcl11020 LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
    db_unique_name=orcl11020'
    3. Add relevant information in tnsnames.ora and listener.ora files and then restart listener.
    3. Created password file with same credential as primary database.
    4.Up-to-date RMAN backup of primary database available.
    5.Create standby controlfile with rman
    While primary database s open (I tried with primary database in mount mode as well)-
    $>rman catalog rman/paswd@rman target /
    RMAN> BACKUP CURRENT CONTROLFILE FOR STANDBY;
    6. Open a new terminal and startup standby database in nomount mode using parameter file created -
    $>ORACLE_SID=stdby_11
    $>export ORACLE_SID
    $>sqlplus / as sysdba
    SQL>STARTUP NOMOUNT pfile='<location/initfilename.ora'
    SQL>quit
    $> rman AUXILIARY / target sys/passwd@orcl11020 catalog rman/passwd@rman
    RMAN>DUPLICATE TARGET DATABASE FOR STANDBY DORECOVER;
    RMAN finishes without error but archive logs are not being tranported. Looking at the log, following caught my eye-
    Error 1017 received logging on to the standby
    Check that the primary and standby are using a password file
    and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
    and that the SYS password is same in the password files.
    returning error ORA-16191
    FAL[client, ARC2]: Error 16191 connecting to orcl11020 for fetching gap sequence
    Errors in file /<>dir>/diag/rdbms/stdby_11/stdby_11/trace/stdby_11_arc2_24321.trc:
    ORA-16191: Primary log shipping client not logged on standby
    Errors in file /<dir>/diag/rdbms/stdby_11/stdby_11/trace/stdby_11_arc2_24321.trc:
    ORA-16191: Primary log shipping client not logged on standby
    So on both primary and standby I confirmed
    SQL> show parameter remote_login_passwordfile
    NAME TYPE VALUE
    remote_login_passwordfile string EXCLUSIVE
    To make double sure that password files are same, I shutdown both databases, delete password files and recreated with same credentials.
    Password files are called - orapworcl11020 and orapwstdby_11
    Can someone guide me where thisngs are going wrong here please.

    Not sure if I understood it clearly.
    SELECT * FROM V$ARCHIVE_GAP;
    returns no rows so there is no gap.
    But could you please explain me the result of the previous query. To catch up again, on standby when I check
    SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG
    SEQUENCE# APPLIED
    75 NO
    74 NO
    76 NO
    77 NO
    I understand that though archive files have been copied across but they are not applied yet.
    On primary when I give your query -
    SELECT name as STANDBY,SEQUENCE#,applied, completion_time
    2 FROM v$archived_log
    3 where dest_id=2
    4 and sequence# BETWEEN 74 and 80;
    I get -
    STANDBY SEQUENCE# APPLIED COMPLETIO
    stdby_11 74 YES 28-JUN-11
    stdby_11 75 YES 28-JUN-11
    stdby_11 76 YES 29-JUN-11
    stdby_11 77 YES 29-JUN-11
    stdby_11 78 YES 29-JUN-11
    stdby_11 79 YES 29-JUN-11
    stdby_11 80 YES 29-JUN-11
    stdby_11 75 NO 07-JUL-11
    stdby_11 74 NO 07-JUL-11
    stdby_11 76 NO 07-JUL-11
    stdby_11 77 NO 07-JUL-11
    stdby_11 78 NO 07-JUL-11
    I have intentionally given
    sequence# BETWEEN 74 and 80
    because I know in the current incarnaion of the database, max sequence is 78.
    So my understanding is, the rows between 28-29 June are from previous incarnation, correct me if I am wrong
    Archive files of the current incarnation, since I successfully created standby database are shipped but yet to be applied - am I right?
    Then my final question is, when will these archives be applied to standby database?
    I am sorry to ask too many questions but I am just trying to understand how it all works.
    Thanks for your help again

  • Problem While Creating Physical Standby Using RMAN

    Hi Guru's
    May be this incidence you all face while creating physical standby DB. I try to create Physical standby database Using RMAN Duplicate Command from one server
    (pri machine) to Standby Machine.
    The steps i followed to create the above are as follows:
    Step 1:- Enable Forced Logging
    SQL> ALTER DATABASE FORCE LOGGING;
    Step 2:- Configure a Standby Redo Log
    SQL> ALTER DATABASE ADD STANDBY LOGFILE GROUP 10
      2> ('/oracle/dbs/log1c.rdo','/oracle/dbs/log2c.rdo') SIZE 500M;
    Step 3:- Set Primary Database Initialization Parameters
    SQL> create pfile='?/dbs/pfileorcl.ora' from spfile;
    Edit the pfile to add the standby parameters, here shown:
    db_unique_name='orcl'
    LOG_ARCHIVE_CONFIG='DG_CONFIG=(orcl,orcldr)'
    LOG_ARCHIVE_DEST_2='SERVICE=orcldr LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=orcldr'
    *.fal_server=orcldr
    *.fal_client=orcl
    *.standby_file_management=auto
    Step 4:- Enable Archiving
    SQL> SHUTDOWN IMMEDIATE;
    SQL> STARTUP MOUNT;
    SQL> ALTER DATABASE ARCHIVELOG;
    SQL> ALTER DATABASE OPEN;
    Step 5:- Setup tnsnames for standby database
    This should be done on primary database by altering tnsnames.ora or using NetCA command, and create it by the name orcldr
    orcldr =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = standby-svr)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcldr)
    Step 6:- Backup database and copy it to standby
    This backup script should be run on primary and copied to standby on the same mount point, running this scripts using RMAN, all files under /rman_backup should be copied to /rman_backup on standby server.
    $rman target /
    RMAN> run
    allocate channel c1 type disk;
    allocate channel c2 type disk;
    backup database format '/rman_backup/%U';
    backup archivelog all format '/rman_backup /%U';
    backup current controlfile for standby format '/rman_backup/%U';
    Step 7:- Standby Database Steps
    Installing Oracle Software
    This should be same release and patchset with exactly same ORACLE_HOME mount point.
    Setting Up listener
    Create and start a listener on standby database using NetCA, or creating listener.ora in $ORACLE_HOME/network/admin
    LISTENER =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = standby-svr)(PORT = 1521))
    Step 8:- Set Standby Database Initialization Parameters
    Copying the pfile created in primary database and renames it to initorcldr.ora, and changes these parameters:
    db_unique_name='orcldr'
    LOG_ARCHIVE_CONFIG='DG_CONFIG=(orcldr,orcl)'
    LOG_ARCHIVE_DEST_2='SERVICE=orcl LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=orcl'
    *.fal_server=orcl
    *.fal_client=orcldr
    *.LOG_ARCHIVE_DEST_STATE_2='ENABLE'
    Step 9:- Setup tnsnames for primary database
    This should be done on standby database by altering tnsnames.ora or using NetCA command, and create it by the name orcl
    orcl =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = primary-svr)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl)
    Step 10:- Copy a Password File
    A password file must be created on the Primary and copied over to the Standby site. The sys password must be identical on both sites. Copy orapworcl to $ORACLE_HOME/dbs and rename file to orapworcldr
    Step 11:- Create mount points for Oracle
    Mount point should be created on standby server with the same convention used in primary, this includes the location for controlfiles, redo logs, datafiles, archive log destination and alert logs.
    $ mkdir -p /u01/app/oracle/oradata/orcl/
    $ mkdir -p /u01/app/oracle/flash_recovery_area/
    $ mkdir -p /u01/app/oracle/admin/orcl/adump
    $ mkdir -p /u01/app/oracle/admin/orcl/bdump
    $ mkdir -p /u01/app/oracle/admin/orcl/cdump
    $ mkdir -p /u01/app/oracle/admin/orcl/udump
    Step 12:- Use RMAN to restore backup and setup standby
    Connect to RMAN and execute the following command to create standby database, this should be performed on standby server after copying backup and setting tnsnames.
    $ export ORACLE_SID=orcldr
    $ rman target sys/tiger@orcl auxiliary sys/tiger@orcldr
    RMAN> duplicate target database for standby dorecover;
    Here i am getting problem as :
    While trying to connect to traget database and auxiliary database i notice that when RMAN is connect to both databases it shows
    orcl ( DBID xyz)
    orcl (not mounted)
    Here in my view the second database must be standby database name or auxiiary db name is standby db name which in my case is orcldr
    after this issue i am facing the second issues as :
    in command
    duplicate target database for standby dorecover;
    After modifying the command to
    RMAN> duplicate target database to "standby";
    rman-05520 database name mismatch
    Can u please let me know where i am mistaking

    ok for pri:
    db_name=orcl
    db_unique_name=orcl
    for standby:
    db_name=orcl 
    db_unique_name=sbyorcl ( i change orcldr to sbyorcl later)for new testing
    but now what i am getting on
      Verify connectivity
    On Primary Server:
    C:\> lsnrctl stop LISTENERI (working fine)
    C:\> lsnrctl start LISTENER (working fine)
    C:\> tnsping orcl (working fine)
    C:\> tnsping sbyorcl (working fine)
    C:\> sqlplus sys/xxxxx@orcl (working fine)
    C:\> sqlplus sys/xxxxx@sbyorcl (not working fine)
    ERROR:
    ORA-12514: TNS:listener does not currently know of service requested in connect
    descriptor
    On Standby Server:
    C:\>lsnrctl stop LISTENER
    C:\> lsnrctl start LISTENER
    C:\> tnsping orcl
    C:\> tnsping sbyorcl
    C:\> sqlplus sys/xxxxx@orcl
    C:\> sqlplus sys/xxxxx@sbyorcl
    My listner file for pri :-
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (GLOBAL_DBNAME = orcl)
          (ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
          (SID_NAME = ORCL)
    LISTENER =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.202.129)(PORT = 1521))
    tnsnames.ora file on pri is:
    sbyorcl =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.202.128)(PORT = 1521))
        (CONNECT_DATA =
          (SERVICE_NAME = sbyorcl)
    ORCL =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.202.129)(PORT = 1521))
        (CONNECT_DATA =
          (SERVICE_NAME = orcl)
    and listener file on standby :
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = PLSExtProc)
          (ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
          (PROGRAM = extproc)
        (SID_DESC =
          (GLOBAL_DBNAME = orcl)
          (ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
          (SID_NAME = orcl)
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.202.128)(PORT = 1521))
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    and tnsnames.ora file on standby:
    ORCL =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.202.128)(PORT = 1521))
        (CONNECT_DATA =
          (SERVICE_NAME = orcl)
    sbyorcl =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.202.129)(PORT = 1521))
    (CONNECT_DATA =
           SERVICE_NAME = sbyorcl)
    EXTPROC_CONNECTION_DATA =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
        (CONNECT_DATA =
          (SID = PLSExtProc)
          (PRESENTATION = RO)
    Kinldy guide me where i am mistaking it's urgent

  • Physical standby database fail-over

    Hi,
    I am working on Oracle 10.2.0.3 on Solaris SPARC 64-bit.
    I have a Dataguard configuration with a single Physical standby database that uses real time application. We had a major application upgrade yesterday and before the start of upgrade, we cancelled the media recovery and disabled the log_archive_dest_n so that it doesn't ship the archive logs to standby site. We left the dataguard configuration in this mode incase of a rollback.
    Primary:
    alter system set log_archive_dest_state_2='DEFER';
    alter system switch logfile;
    Standby:
    alter database recover managed standby database cancel;Due to application upgrade induced problems we had to failover to the physical standby, which was not in sync with primary from yesterday. I used the following method to fail-over since i do not want to apply any redo from yesterday.
    Standby:
    alter database activate physical standby database;
    alter database open;
    shutdown immediate;
    startupSo, after this step, the database was a stand alone database, which doesn't have any standby databases yet (but it still has log_archive_config parameter set and log_archive_dest_n parameters set but i have 'DEFER' the log_archive_dest_n pointing to the old primary). I have even changed the "archive log deletion policy to NONE"
    RMAN> configure archivelog deletion policy to none;After the fail-over was completed, the log sequence started from Sequence 1. We cleared the FRA to make space for the new archive logs and started off a FULL database backup (backup incremental level 0 database plus archivelog delete input). The backup succeded but we got these alerts in the backup log that RMAN cannot delete the archivelogs.
    RMAN-08137: WARNING: archive log not deleted as it is still neededMy question here is
    1) Even though i have disabled the log_archive_dest_n parameters, why is RMAN not able to delete the archivelogs after backup when there is no standby database for this failed-over database?
    2) Are all the old backups marked unusable after a fail-over is performed?
    FYI... flashback database was not used in this case as it did not server our purpose.
    Any information or documentation links would be greatly appreciated.
    Thanks,
    Harris.

    Thanks for the reply.
    The FINISH FORCE works in some cases but if there is an archive gap (though it didn't report in our case), it might not work some times (DOCID: 846087.1). So, we followed the Switch-over & Fail-Over best practices where it mentioned about this "ACTIVE PHYSICAL STANDBY" for a fail-over if you intend not to apply any archivelogs. The process we followed is the Right one.
    Anyhow, we got the issue resolved. Below is the resolution path.
    1) Even though if you DEFER the LOG_ARCHIVE_DEST_STATE_N parameter's on the primary, there are some situations where the Primary database in a dataguard configuration where it will not delete the archive logs due to some SCN issues. This issue may or may not arise in all fail-over scenarios. If it does, then do the following checks
    Follow DOCID: 803635.1, which talks about a PLSQL procedure to check for problematic SCN's in a dataguard configuration even though the physical standby databases are no available (i.e., if the dataguard parameters are set, log_archive_config, log_archive_dest_n='SERVICE=..." still set and even though corresponding LOG_ARCHIVE_DEST_STATE_N parameters are DEFERRED).
    If this procedure returns any rows, then the primary database is not able to delete the archivelogs because it is still thinking there is a standby database and trying to save the archive logs because of the SCN conflict.
    So, the best thing to do is, remove the DG related parameters from the spfile (log_archive_config, log_archive_dest_n parameters).
    After i made these changes, i ran a test backup using "backup archivelog all delete input", the archive logs got deleted after backup without any issues.
    Thanks,
    Harris.
    Edited by: user11971589 on Nov 18, 2010 2:55 PM

  • Archive destination on Logical Standby

    Dear colleagues,
    A physical standby database writes archivelogs in '/oradata3/iclgstdb/archivelog' destination because a parameter standby_archive_dest set in '/oradata3/iclgstdb/archivelog':
    SQL> sho parameter standby
    NAME                                 TYPE        VALUE
    standby_archive_dest                 string      /oradata3/iclgstdb/archivelog
    standby_file_management              string      AUTO
    When I switch the physical to a logical standby then archivelogs are written in '$ORACLE_HOME/dbs/arch' destination:
    SQL> ARCHIVE LOG LIST
    Database log mode              Archive Mode
    Automatic archival             Enabled
    Archive destination            /ora/OraHome11203/dbs/arch
    Oldest online log sequence     1
    Next log sequence to archive   2
    Current log sequence           2
    But I don't see this destination in v$parameter view.
    How can I change "Archive destination /ora/OraHome11203/dbs/arch" to '/oradata3/iclgstdb/archivelog'?

    Hi,
    Above answered given by one of our DBA friend is correct...just want to add few things,
    We need to update both the parameters related to log_archive_dest_1 and log_archive_dest_2 on primary and standby location,
    on primary,
    log_archive_dest_1 would be local directory or would be ASM...
    log_archive_dest_2 would be standby database service name and archive will generated on standby location location...
    Correct ans:-
    "If your version of Oracle is 11 then STANDBY_ARCHIVE_DEST parameter is deprecated.
    set LOG_ARCHIVE_DEST_1  to '/oradata3/iclgstdb/archivelog on the standby"
    Regards,
    GRB

  • Reg upgrade of Physical Standby from 9i -10g

    hi guys,I'm planning to upgrade my database from 9i 9.2.0.7-10g 10.2.0.3...along with Physical Standby Site....
    I got a link for Dataguard upgrade
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/upgrades.htm
    what I conluded from this links is...Just writing the high level steps
    -Apply all the Archive logs on Standby
    -install the Oracle Software on Primary Standby
    -Upgrade the Primary
    -Start the Standby with password file and spfile from the new home..and set the FAL parameters
    I might be missing some steps here
    but
    I just wanted to make sure we actually dont upgrade the Standby as we do with Primary just installing the 10g software on Standby as well and starting the instance with spfile from 10g home with same set of datafies....is considered to be the upgrade.......of Standby database????????looks too simple
    Thanx
    Gagan

    You could certainly reinstall Apex to make sure that Apex-related packages and procedures are re-granted properly, but that still won't solve the other cases where specific non-Apex-related packages were granted but became "ungranted" after the upgrade. I'm not involved with DB upgrades myself, so the whole procedure is a bit "black box" to me, so I don't know if packages that were granted become revoked on an upgrade. Talk to you DBA about the DB upgrade and find out what packages were granted by default.
    but we may get other errors down the line because of other privileges that are still missing...Probably, and depending on the exact 10g version you installed, there are other DB bugs that will mess with Apex. Was this upgrade done on a test instance first or just production? In either case, run through all your applications and see if anything else breaks. If possible (and appropriate) notify your users that an upgrade occurred and that you've tried to resolve any problems but some might be hiding out there. It's not bad to be cautious--we tend to run things the other way and upgrade overnight, do a few checks to see that nothing is 100% broken and come in the next morning to all kinds of fun errors the users found.

  • DG physical standby 1

    Hi
    11.2.0.1
    We have a DEV database which is also as critical as PROD db since there are lots of critical projects running on it.
    This DEV database was configured with dataguard physical standby at the DR server.
    Well this is what I read in the documents only, as I am newly taking over as dba. The setup was done outsourced
    by 3rd party, and I can not talk to the implentors as they have been long gone.
    When I check the DR server only the PROD is running and the DEV was shutdown for the last 12 months.
    My question is if the physical standby is shutdown for almost a year, can it still be activated? or will it still be valid?
    Will it affect performance of the Primary database? since it might still checking heartbeat to it? or holding up some processes like archivers?
    How do you disable physical standby from the primary db?
    Thanks
    petra k.

    Hello;
    "if the physical standby is shutdown for almost a year, can it still be activated? or will it still be valid?"
    No and no. Even a tiny production database would have generated and remove too much archive in a years time for the old standby to have ANY value. Rebuild it.
    How do you disable physical standby from the primary db?
    You could just do this: ( On the primary side )
    alter system set log_archive_dest_state_2=defer;
    And you could clean up all the parameters for DG too.
    How to remove a Data Guard Configuration from Primary Database (Doc ID 733794.1)
    Best Regards
    mseberg

Maybe you are looking for