10G Dataguard

Hi
I am planning to implement Dataguard for learning purposes. I have a single box. Has anyone implemented Primary and standby database on same box. Please share any link or guidelines how to proceed.
I am thinking of manually copying the datafiles of my primary DB to new directory and create database with same name.
any suggestions??

Hi i did this although it's for windows and i am doing it on OEL4 i modified accordingly
Setup Standby Database on One PC
Building the Data Guard
1.     Check the primary database name:
SQL> select name from v$database;
NAME
BSL01LAB
2.     Enable Forced logging
--check FORCE LOGGING status
SQL> select force_logging from v$database;
FOR
NO
--eable FORCE LOGGING
SQL> alter database force logging;
Database altered.
--Verify
SQL> select force_logging from v$database;
FOR
YES
3.     Create a password file
--To create the password file
D:\oracle\product\10.2.0\db_1\database>orapwd file=PWDbsl01lab.ora password=dow entries=5
--To verify the new password file
D:\oracle\product\10.2.0\db_1\database>sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jul 25 22:24:41 2006
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
SQL> connect sys/dow as sysdba
Connected to an idle instance.
4.     Configure a Standby Redo Log
Step 1 Ensure log file sizes are identical on the primary and standby database
SQL> select group#,thread#,bytes/1024/1024,members from v$log;
    GROUP#    THREAD# BYTES/1024/1024    MEMBERS
         1          1              50          1
         2          1              50          1
         3          1              50          1
Step 2 Determine the appropriate number of standby redo log file groups
The minimal number should be 3+1=4
Step 3 Verify related database parameters and settings
Maxlogfiles
Maxlogmembers
Step 4 Create standby redo log file groups
SQL> alter database add standby logfile ('D:\ORACLE\PRODUCT\10.2.0\ORADATA\BSL01LAB\redo01d.log') size 50M;
Database altered.
SQL> alter database add standby logfile ('D:\ORACLE\PRODUCT\10.2.0\ORADATA\BSL01LAB\redo02d.log') size 50M;
Database altered.
SQL> alter database add standby logfile ('D:\ORACLE\PRODUCT\10.2.0\ORADATA\BSL01LAB\redo03d.log') size 50M;
Database altered.
Step 5 Verify the standby redo log file groups were created
SQL> select group#,thread#,sequence#,archived,status from v$standby_log;
    GROUP#    THREAD#  SEQUENCE# ARC STATUS
         4          0          0 YES UNASSIGNED
         5          0          0 YES UNASSIGNED
         6          0          0 YES UNASSIGNED
5.      Set Primary Database Initialization Parameters
--Content of pfilebsl01lab.ora
bsl01lab.__db_cache_size=79691776
bsl01lab.__java_pool_size=4194304
bsl01lab.__large_pool_size=4194304
bsl01lab.__shared_pool_size=75497472
bsl01lab.__streams_pool_size=0
*.audit_file_dest='D:\oracle\product\10.2.0/admin/bsl01lab/adump'
*.background_dump_dest='D:\oracle\product\10.2.0/admin/bsl01lab/bdump'
*.compatible='10.2.0.1.0'
*.control_files='D:\oracle\product\10.2.0/oradata/bsl01lab/\control01.ctl','D:\oracle\product\10.2.0/oradata/bsl01lab/\control02.ctl','D:\oracle\product\10.2.0/oradata/bsl01lab/\control03.ctl'
*.core_dump_dest='D:\oracle\product\10.2.0/admin/bsl01lab/cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_recovery_file_dest='D:\oracle\product\10.2.0/flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.dispatchers='(PROTOCOL=TCP) (SERVICE=bsl01labXDB)'
*.job_queue_processes=10
*.nls_length_semantics='CHAR'
*.open_cursors=300
*.pga_aggregate_target=16777216
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=167772160
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='D:\oracle\product\10.2.0/admin/bsl01lab/udump'
db_name='bsl01lab'
db_unique_name=bsl01lab
log_archive_config='DG_CONFIG=(bsl01lab,bsl01labdg)'
control_files='D:\ORACLE\PRODUCT\10.2.0\ORADATA\BSL01LAB\CONTROL01.CTL','D:\ORACLE\PRODUCT\10.2.0\ORADATA\BSL01LAB\CONTROL02.CTL','D:\ORACLE\PRODUCT\10.2.0\ORADATA\BSL01LAB\CONTROL03.CTL'
log_archive_dest_1=
  'LOCATION=D:\oracle\product\10.2.0\arch
   VALID_FOR=(all_logfiles,all_roles)
   DB_UNIQUE_NAME=bsl01lab'
log_archive_dest_2=
  'SERVICE=bsl01labdg LGWR ASYNC
   VALID_FOR=(online_logfiles,primary_role)
   DB_UNIQUE_NAME=bsl01labdg'
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=bsl01labdg
FAL_CLIENT=bsl01lab
DB_FILE_NAME_CONVERT='C:\data_guard\bsl01lab','D:\oracle\product\10.2.0\oradata\bsl01lab'
LOG_FILE_NAME_CONVERT=
'C:\data_guard\bsl01lab','D:\oracle\product\10.2.0\oradata\bsl01lab'
STANDBY_FILE_MANAGEMENT=auto
STANDBY_ARCHIVE_DEST='C:\temp\priarch'
--create spfile
SQL> create spfile from pfile='d:\pfilebsl01lab.ora';
File created.
6.     Enable the primary DB Archiving
SQL> startup mount;
ORACLE instance started.
Total System Global Area  167772160 bytes
Fixed Size                  1247900 bytes
Variable Size              83887460 bytes
Database Buffers           79691776 bytes
Redo Buffers                2945024 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
7.     Create a Backup Copy of the Standby Database
--Shutdown DB
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
--Copy data files from “D:\oracle\product\10.2.0\oradata\bsl01lab”  to “C:\data guard\bsl01lab”
8.     Create a Control File for the Standby Database
SQL> startup mount
ORACLE instance started.
Total System Global Area  167772160 bytes
Fixed Size                  1247900 bytes
Variable Size              83887460 bytes
Database Buffers           79691776 bytes
Redo Buffers                2945024 bytes
Database mounted.
SQL> alter database create standby controlfile as 'd:\bsl01labdg.ctl';
Database altered.
SQL> alter database open;
Database altered.
9.     Create the parameter file for Standby Database
Contents of the parameter file:
bsl01lab.__db_cache_size=79691776
bsl01lab.__java_pool_size=4194304
bsl01lab.__large_pool_size=4194304
bsl01lab.__shared_pool_size=75497472
bsl01lab.__streams_pool_size=0
*.audit_file_dest='C:\data_guard\dump'
*.background_dump_dest='C:\data_guard\dump'
*.compatible='10.2.0.1.0'
*.core_dump_dest='C:\data_guard\dump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_recovery_file_dest='C:\data_guard\dump'
*.db_recovery_file_dest_size=2147483648
*.dispatchers='(PROTOCOL=TCP) (SERVICE=bsl01labXDB)'
*.job_queue_processes=10
*.nls_length_semantics='CHAR'
*.open_cursors=300
*.pga_aggregate_target=16777216
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=167772160
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='C:\data_guard\dump'
db_name='bsl01lab'
db_unique_name=bsl01labdg
log_archive_config='DG_CONFIG=(bsl01lab,bsl01labdg)'
control_files='C:\data_guard\bsl01lab\control01.ctl','C:\data_guard\bsl01lab\control02.ctl','C:\data_guard\bsl01lab\control03.ctl'
log_archive_dest_1=
  'LOCATION=C:\data_guard\arch
   VALID_FOR=(all_logfiles,all_roles)
   DB_UNIQUE_NAME=bsl01labdg'
log_archive_dest_2=
  'SERVICE=bsl01lab LGWR ASYNC
   VALID_FOR=(online_logfiles,primary_role)
   DB_UNIQUE_NAME=bsl01lab'
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=bsl01lab
FAL_CLIENT=bsl01labdg
DB_FILE_NAME_CONVERT='D:\oracle\product\10.2.0\oradata\bsl01lab','C:\data_guard\bsl01lab'
LOG_FILE_NAME_CONVERT=
'D:\oracle\product\10.2.0\oradata\bsl01lab','C:\data_guard\bsl01lab'
STANDBY_FILE_MANAGEMENT=auto
STANDBY_ARCHIVE_DEST='C:\temp\stdarch'
10.     Setup the Environment to Support the Standby Database
Step 1 Create a windows-based service
D:\oracle\product\10.2.0\db_1>oradim -new -sid bsl01labdg -intpwd dow -startmode manual
Instance created.
Step 2 create a password file
D:\oracle\product\10.2.0\db_1>set oracle_sid=bsl01labdg
C:\data guard\database>orapwd file=PWDbsl01labdg.ora password=dow entries=5
Step 3 configure listeners for the primary and standby database
Step 4 create Oracle Net Service names
Step 5 create a server parameter file for the standby database
D:\oracle\product\10.2.0\db_1\database>set oracle_sid=bsl01labdg
D:\oracle\product\10.2.0\db_1\database>sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jul 26 03:11:04 2006
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
SQL> connect sys/dow as sysdba
Connected to an idle instance.
SQL> create spfile from pfile='d:\pfilebsl01labdg.ora';
File created.
--Verify the new spfile
SQL> show parameter spfile
NAME                                 TYPE        VALUE
spfile                               string      D:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\SPFILEBSL01LABDG.ORA
11.     Mount the standby DB
SQL> startup mount
ORACLE instance started.
Total System Global Area  167772160 bytes
Fixed Size                  1247900 bytes
Variable Size              62915940 bytes
Database Buffers          100663296 bytes
Redo Buffers                2945024 bytes
Database mounted.
12.     Start Redo Apply
SQL> alter database recover managed standby database disconnect from session;
Database altered.
13.     Verify the status of primary and standby database
--bsl01lab window
D:\oracle\product\10.2.0\db_1\database>set oracle_sid=bsl01lab
D:\oracle\product\10.2.0\db_1\database>sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jul 26 03:24:41 2006
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
SQL> connect / as sysdba
Connected.
SQL> select instance_name, status from v$instance;
INSTANCE_NAME    STATUS
bsl01lab         OPEN
--bsl01labdg window
D:\oracle\product\10.2.0\db_1\database>set oracle_sid=bsl01labdg
D:\oracle\product\10.2.0\db_1\database>sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jul 26 03:34:15 2006
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
SQL> connect / as sysdba
Connected.
SQL> select instance_name,status from v$instance;
INSTANCE_NAME    STATUS
bsl01labdg       MOUNTED
Both instance status are OK
14.     Verify archived log transport and applying service
--bsl01lab window
SQL>  select name,sequence# from v$archived_log order by 2;
NAME                                                SEQUENCE#
D:\ORACLE\PRODUCT\10.2.0\ARCH\1_80_595473116.ARC           80
bsl01labdg                                                 80
D:\ORACLE\PRODUCT\10.2.0\ARCH\1_81_595473116.ARC           81
bsl01labdg                                                 81
D:\ORACLE\PRODUCT\10.2.0\ARCH\1_82_595473116.ARC           82
bsl01labdg                                                 82
--bsl01labdg
SQL>  select name,sequence# from v$archived_log order by 2;
NAME                                                SEQUENCE#
C:\DATA_GUARD\ARCH\1_80_595473116.ARC                      80
C:\DATA_GUARD\ARCH\1_81_595473116.ARC                      81
C:\DATA_GUARD\ARCH\1_82_595473116.ARC                      82
--On the primary DB, switch log file by force
--bsl01lab window
SQL> alter system switch logfile;
System altered.
Elapsed: 00:00:05.21
SQL> /
System altered.
Elapsed: 00:00:01.14
SQL> /
System altered.
Elapsed: 00:00:06.01
--Check the archived log again
--bsl01lab window
SQL> select name,sequence# from v$archived_log order by 2;
NAME                                                SEQUENCE#
D:\ORACLE\PRODUCT\10.2.0\ARCH\1_84_595473116.ARC           84
bsl01labdg                                                 84
D:\ORACLE\PRODUCT\10.2.0\ARCH\1_85_595473116.ARC           85
NAME                                                SEQUENCE#
bsl01labdg                                                 85
--bsl01labdg window
SQL> select name,sequence# from v$archived_log order by 2;
NAME                                                SEQUENCE#
C:\DATA_GUARD\ARCH\1_84_595473116.ARC                      84
C:\DATA_GUARD\ARCH\1_85_595473116.ARC                      85
--To check whether the new archived logs have been applied
--bsl01labdg window
SQL> select sequence#,applied
  2  from v$archived_log
  3  order by sequence#;
SEQUENCE# APP
        80 YES
        81 YES
        82 YES
        83 YES
        84 YES
        85 YES
35 rows selected.
The archived logs are applied successfully on the standby database
Switch-over Testing
1.     Verify it is possible to perform a switchover.
--bsl01lab window
SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
SWITCHOVER_STATUS
SESSIONS ACTIVE
SQL> SHOW PARAMETER JOB_QUEUE_PROCESSES;
NAME                                 TYPE        VALUE
job_queue_processes                  integer     10
SQL> ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
System altered.
SQL> SELECT SID, PROCESS, PROGRAM FROM V$SESSION
  2  WHERE TYPE = 'USER'
  3  AND SID <> (SELECT DISTINCT SID FROM V$MYSTAT);
       SID PROCESS  PROGRAM
        86 1404:3172 emagent.exe
        89 1234 OMS
        90 1234OMS
        93 1404:1768 emagent.exe
        95 1234 OMS
        98 1988 ORACLE.EXE (J000)
6 rows selected.
--To stop ‘emagent’ and ‘OMS’, open another window, and in OS run
S:\>set oracle_sid=bsl01lab
S:\>emctl stop agent
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
This will stop the Oracle Enterprise Manager 10g Database Control process. Conti
nue [y/n] :y
The OracleDBConsolebsl01lab service is stopping............
The OracleDBConsolebsl01lab service was stopped successfully.
--Common Processes That Prevent Switchover
Type of Process     Process Description     Corrective Action
CJQ0     Job Queue Scheduler Process     Change the JOB_QUEUE_PROCESSES dynamic parameter to the value 0. The change will take effect immediately without having to restart the instance.
QMN0     Advanced Queue Time Manager     Change the AQ_TM_PROCESSES dynamic parameter to the value 0. The change will take effect immediately without having to restart the instance.
DBSNMP     Oracle Enterprise Manager Management Agent     Issue the emctl stop agent command from the operating system prompt.
SQL> SELECT SID, PROCESS, PROGRAM FROM V$SESSION
  2  WHERE TYPE = 'USER'
  3  AND SID <> (SELECT DISTINCT SID FROM V$MYSTAT);
no rows selected
SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
SWITCHOVER_STATUS
TO STANDBY
Now it is ready to switch to standby
2.     Initiate the switchover on the primary database.
SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY;
Database altered.
Elapsed: 00:02:57.73
3.     Shut down and restart the former primary instance.
SQL> shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area  167772160 bytes
Fixed Size                  1247900 bytes
Variable Size              88081764 bytes
Database Buffers           75497472 bytes
Redo Buffers                2945024 bytes
Database mounted.
4.     Verify the switchover status on the standby database
--bsl01labdg window
SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
SWITCHOVER_STATUS
TO PRIMARY
5.     Switch the target physical standby database role to the primary role
--bsl01labdg window
SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;
Database altered.
6.     Finish the transition of the standby database to the primary role.
--bsl01labdg window
SQL> alter database open;
Database altered.
Elapsed: 00:00:33.56
7.     Verify the status of primary and standby database
--bsl01labdg now is the primary database
SQL> select instance_name,status from v$instance;
INSTANCE_NAME    STATUS
bsl01labdg       OPEN
--bsl01lab now is the standby database
SQL> select instance_name,status from v$instance;
INSTANCE_NAME    STATUS
bsl01lab         MOUNTED
--start archived log applying on bsl01lab
SQL> alter database recover managed standby database disconnect from session;
Database altered.
--bsl01labdg window
SQL> alter system switch logfile;
System altered.
SQL> /
System altered.
SQL> /
System altered.
--bsl01lab window
SQL> select sequence#,applied from v$archived_log order by 1;
SEQUENCE# APP
       90 YES
       91 YES
       92 YES
successfully switched-over!Upto Point 13 it's fine but after that on 14
when i do
SQL> select name,sequence# from v$archived_log;
no rows selectedwhat is the problem...

Similar Messages

  • 11g to 10g Dataguard

    Dear Friend,
    We have set up for Physical stand by between two 10g instances.
    Now its required to upgrade oracle version , but 1st we want to upgrade Primary DB version to 11g then later on stand by.
    So is 11g to 10g DG is possible?, does logical standby support this? if yest then what will be process for same.

    So is 11g to 10g DG is possible?nope, it would not make sense. a standby is for failover, how can you failover to an older release?
    if you want a reporting system on an old release - ok (I wouldn't agree with you but whatever). You would do that using streams.
    Tom @ http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1468639100346407276
    Also Check below link where Rajesh has given good PDFs links :
    How to upgrade the 10g Dataguard after the primary was upgraded to 11g
    Regards
    Girish Sharma

  • How to upgrade the 10g Dataguard after the primary was upgraded to 11g

    Hi
    What is the best procedure to follow to upgrade my 10g physical Dataguard after the 10g primary was upgraded to 11g ?
    I was planning on stopping archiving of hte primary prior to the upgrade and enable after.
    Do I need to reastablish my Dataguard from scratch ??
    Old verison : 10.2.0.4
    New version : 11.2.0.1
    Thanks in advance
    Orna

    Orna Weisman wrote:
    Hi
    What is the best procedure to follow to upgrade my 10g physical Dataguard after the 10g primary was upgraded to 11g ?
    I was planning on stopping archiving of hte primary prior to the upgrade and enable after.
    Do I need to reastablish my Dataguard from scratch ??
    Old verison : 10.2.0.4
    New version : 11.2.0.1Hope this helps :
    http://www.oracle.com/technology/deploy/availability/htdocs/DataGuardOverview.html
    http://www.oracle.com/technology/deploy/availability/maa/maa_wp_11g_upgrades_made_easy.pdf
    http://www.oracle.com/technology/deploy/availability/pdf/maa_wp_11g_transientlogicalrollingupgrade.pdf
    http://www.oracle.com/technology/deploy/availability/pdf/maa_wp_10gr2_rollingupgradebestpractices.pdf
    Regards
    Rajesh

  • Oracle 10g dataguard Connect-time failover Parameter 15 minutes

    Hello,
    we running a system with DataGuard in Maximum Availability protection mode and one physical Standby Database. There are two connections between primary and standby. I configured listener and tnsnames to perform a Connect-time failover in case one connection is down. In first place it seemed to work fine but since it has happened that the primary always hangs for exactly 15 minutes until the failover is performed. (ALL redologs need archiving)
    I think this must be the default value of a Parameter but reading docs for hours I can't find it.
    Can anybody help me?
    Best regards
    Fritz

    It's like this. The connection failover I'm talking about is only between the primary database and standby database. I have two connections between them. That makes two addresses for the service (servicetostandby) specified in the log_archive_dest used by dataguard. In my case the log_archive_dest Paramater looks like this:
    log_archive_dest_3 = 'SERVICE servicetostandby OPTIONAL LGWR SY
    NC AFFIRM VALID_FOR=(ONLINE_LO
    GFILES,PRIMARY_ROLE) DB_UNIQUE
    NAME=standby REOPEN=10 NETTIME
    OUT=9'
    The tnsnames.ora entry looks like this:
    servicetostandby =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = address1)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = address2)(PORT = 1521))
    (FAILOVER=true)
    (LOAD_BALANCE=false)
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = standby)
    So if either address1 or address2 is down dataguard should use the other address to connect to the standby database.
    Maybe because of the Maximum Availability protection mode the primary database does not perform if the standby database is not available. I'm not sure about that. But fact is that if I power off the standby database, the primary database hangs only for 9 seconds. That's specified in the net_time_out attribut of the log_archive_dest Parameter. So I'm quite sure that something in the oracle net service causes the problem.
    With the "primary hangs" I mean: After the used connection (say address1) went down the redologfiles of the primary database get filled and then it stops for 15 minutes. The messages in the alert.log:
    Thread 1 cannot allocate new log, sequence 1304
    All online logs needed archiving
    After 15 minutes the connection via address2 is established and everything works fine.
    I hope I made myself clear this time and didn't confuse you totally.
    Edited by: user633694 on Apr 14, 2009 8:13 AM

  • Oracle 10g Dataguard Setup

    Hi Guys,
    I am planning to have Dataguard setup for my single instance database in HP-UNIX.
    Please let me know the pre-requistes for this setup. I currently have Oracle enterprise edition installed. Do i need any specific application, tool or software installed for this, etc ?
    Also, help me out with the configuration steps.
    Thanks.

    user9098221 wrote:
    Hi,
    Thanks. Apart from RMAN, do i need to have anything else installed for the setup ?
    Also, if i choose the manual method(using sql's), do I need to install anything ?
    I understand these are basics. Please bear with me.
    Thanks.Hi,
    On standby side need following steps.
    1. You must install Oracle Database Enterprise Edition (same version, same patchset) Software only.
    2. Add Listener, and add standby service name
    3. You must create folders for data files, flash recovery area and diags.
    Not need any additional tools.
    Regards
    Mahir M. Quluzade

  • Oracle 10g dataguard

    Hi all
    I have created a dataguard on a separate server and shifted the production database to dataguard server in an emergency. Now I want to revert back to the production server.
    Please tell me the procefure for the same and tell me that how much data loss will occure?

    try this solution
    On the current primary database, query the SWITCHOVER_STATUS column of the V$DATABASE fixed view
    on the primary database to verify it is possible to perform a switchover. For example: 
    SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    SWITCHOVER_STATUS
    TO STANDBY
    OR  
    SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    SWITCHOVER_STATUS
    SESSIONS ACTIVE
    Initiate the switchover on the primary database 
    To change the current primary database to a physical standby database role, use the following SQL statement
    on the primary database: 
    If the value in the SWITCHOVER_STATUS column is TO STANDBY 
    SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY; 
    If the value in the SWITCHOVER_STATUS column is SESSIONS ACTIVE 
    SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN;
    Shut down the former primary instance, and restart and mount the database and confirm the switch over notification: 
    SQL> SHUTDOWN IMMEDIATE;
    SQL> STARTUP MOUNT;
    SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    SWITCHOVER_STATUS
    TO_PRIMARY
    Switch the target physical standby database role to the primary role. 
    If switch over status is to primary:  
    SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;
    If switch over status is active session:
    SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WITH SESSION SHUTDOWN; 
    Finish the transition of the standby database to the primary role 
    If standby database has not been opened in read-only mode since the last tiem it was started, issue
    SQL> alter database open; 
    If the physical standby database has been opened in read-only mode since the last time it was stared, you must
    issue
    SQL>shutdown immediate;
    SQL>startup;
     Enable the log_archive_dest_state_n parameter for redo transmission 
    At new Standby database activate media recovery: 
    SQL> Alter database recover managed standby database disconnect from session; 
    regards,

  • Oracle 10g Dataguard Physical Standby Database

    When I set my dataguard group to "MAXIMIZE AVAILABILITY" the protection level is always RESYNCHRONIZATION.
    It's normal ?
    SQL> SELECT PROTECTION_MODE, PROTECTION_LEVEL, DATABASE_ROLE FROM V$DATABASE;
    PROTECTION_MODE PROTECTION_LEVEL DATABASE_ROLE
    MAXIMUM AVAILABILITY RESYNCHRONIZATION PHYSICAL STANDBY
    SQL> show parameter log_archive_dest_2
    NAME TYPE VALUE
    log_archive_dest_2 string SERVICE=PIJ10G2 LGWR SYNC AFFIRM
    SQL> show parameter log_archive_dest_state_2;
    NAME TYPE VALUE
    log_archive_dest_state_2 string ENABLE

    this is my log on primary db :
    Thread 1 advanced to log sequence 422
    Current log# 1 seq# 422 mem# 0: /oradata/orapij10g/redologs/PIJ10G/redo01.log
    Wed Oct 1Thread 1 cannot allocate new log, sequence 423
    Private strand flush not complete
    Current log# 1 seq# 422 mem# 0: /oradata/orapij10g/redologs/PIJ10G/redo01.log
    Wed Oct 17 16:24:51 2007
    Destination LOG_ARCHIVE_DEST_3 is SYNCHRONIZED
    LNSc started with pid=34, OS id=21052
    Wed Oct 17 16:24:56 2007
    Destination LOG_ARCHIVE_DEST_3 is UNSYNCHRONIZED
    Wed Oct 17 16:24:56 2007
    Errors in file /oracle/ora10g/admin/PIJ10G/bdump/pij10g_lgwr_26248.trc:
    ORA-16086: Message 16086 not found; No message file for product=RDBMS, facility=ORA
    LGWR: Failed to archive log 2 thread 1 sequence 423 (16086)
    Thread 1 advanced to log sequence 423
    Current log# 2 seq# 423 mem# 0: /oradata/orapij10g/redologs/PIJ10G/redo02.log
    I don't understand this error message. How can solve my probleme ?

  • 10g , dataguard, em starts database ok but then cant read status

    I am attempting to get dataguard up and running. The problem I am stuck at is that the Enterprose manage starts up the database with no problem but them the following message appears :-
    #The database status is currently unavailable. It is possible that the database is in mount or nomount state#
    I can however access the database perfectly and read tables using sqlplus !!
    I am very confused about how to configure the listener.ora file . I suspect this may be the problem.
    Here is some further info thanks !!
    SQL> sho parameters name
    NAME TYPE VALUE
    db_file_name_convert string
    db_name string MVM
    db_unique_name string MVM1
    global_names boolean FALSE
    instance_name string MVM
    lock_name_space string
    log_file_name_convert string
    service_names string MVM1
    sp_name string MVM
    SQL>
    The following is the contents of the listener.ora file :-
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /export/home/oracle/product/10.1)
    (PROGRAM = extproc)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = mvm1)(PORT = 1521))
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    The database is definately not in the nomount or mount state
    SQL> select OPEN_MODE from v$database;
    OPEN_MODE
    READ WRITE
    SQL>

    No, I'm just working through the procedure for configuring the master server first , the next step is to configure the standby database .
    George

  • 10g dataguard - physical standby database

    Hi Guys,
    DB1 <Primary> - Production
    DB2 <Physial Standby> - DR
    I will need to startup my DB2 in DR segment for testing.
    If i perform the below, will it affect my Production DB? I need it to be up and running as well.
    DR:
    recover managed standby database cancel;
    shutdown immediate;
    startup nomount;
    alter database mount standby database;
    recover standby database until cancel;
    alter database activate standby database;
    thanks

    Hi,
    In 10g version, you can open database database with READ ONLY mode. In that case standby database
    recieve primary generated changes but not apply .
    I see you steps you using ALTER DATABASE ACTIVATE STANDBY DATABASE statement for activating database
    Activate the standby database using the SQL ALTER DATABASE ACTIVATE STANDBY DATABASE statement. This converts the standby database to a primary database, creates a new reset logs branch, and opens the database.*
    If you are not need convert standby database to primary database then , you must use only
    ALTER DATABASE OPEN READ ONLY;
    Regards
    Mahir M. Quluzade
    www.mahir-quluzade.com

  • Step by step 10g Dataguard , physical standby database setup metalink notes

    On metalink i saw this note, but unable to find now if someone can help....

    Note:248382.1 Creating a 10g Data Guard Physical Standby on Linux

  • Log apply service in 10g dataguard

    Very Good Morning to all ;
    I  have a doubt when applying redo data at standby site. (MAXIMUM PERFORMANCE)
    In physical standby database , 
    I know , Redo Data is applied from  standby redo log (real time apply )  or  archive redo log ( redo apply)
      1) When using max performance mode (physical standby ) ,  which one is default ?
         I do NOT find any answer even googled.
         Thanks in advance ..

    Hi Baris ;
    When using maximum performance mode , If i enable LogXptMode = 'SYNC'
    Any possibilities to check 'whether my db using really sync option ?
    BarisYildirim wrote:
    Hi,
    I don't think there is a benefit sync in max. performance mode. I think Oracle ignores SYNC in this mode.
    Yes baris, i think so.  but i have some collections.
    If possible , could you please check once again ??
    Requirements for maximum performance mode
    Redo archival process
    Lgwr or Arch
    Network transmission mode
    ASYNC  if using LGWR , SYNC if using ARCH
    Disk write option
    Noaffirm
    Standby redo logs?
    No, but  recommended.
    Standby database type
    Physical or logical
    Above information given by my trainers  ...

  • Oracle 10g Dataguard Error

    Hi,
    I created a standby database using RMAN backups.
    I have followed all the steps correctly because the standby database does come up without any errors when I give the command
    'alter database mount standby database;'
    or
    'alter database recover managed standby database using current logfile disconnect from session;'
    But, in the alert log file I can see the following errors.
    ORA-00313 - open failed for members of logfile group1 (and 2 and 3)
    ORA-227037 - unable to obtain file status (file may not exist)
    and
    ORA-19527 Physical standby redo log must be renamed.
    When I go back and check, the first error is correct in the sense that the redo log files are not present in the location specified.
    Querying the V$LOG & V$LOGFILE do return the name and path of the log files (or where they should be but are not!)
    What have I missed that the redo logs are not created at the time of restore and recover?
    TIA.
    KV

    Hi KV,
    You mentioned that you created a standby database from RMAN backup, but you also have to set the primary to send the archives to the standby. Have you done that?
    This can be done manually by setting "log_archive_dest_n" parameter to "service=<service>" where <service> is a TNS entry to the standby. You may want to check all the options available for this parameter here (I don't know which version you use so this is from 10gR2 documentation).
    You can also use Data Guard Broker to do that for you (you need to create a configuration using dgmgrl utility or Grid Control), this is the link to the documentation about Data Guard Broker: [http://download.oracle.com/docs/cd/B19306_01/server.102/b14230/toc.htm]
    HTH
    Liron Amitzi
    Senior DBA consultant
    [www.dbsnaps.com]
    [www.orbiumsoftware.com]

  • How to configure dataguard in Multiple instance 10g / OEL

    we configured 3 databases in sigle server 10g /OEL
    Now we would like to configure data guard( physical standby) for all three.
    can some one guide me for this configuration?
    santhanam.

    As you have 3 databases you will have to configure 3 DR's may be in one server/different server as per your requirement.
    you can have look on following thread for how to setup DR for 10g....
    oracle 10g dataguard
    Hope it will help you.
    Anil Malkai

  • Dataguard.... [ the achivelog not transfort between primary & standby db] m

    Dear all Dataguard gurus [sorry if i wrong to place this message]
    i tried to install oracle 10g dataguard on 2 machines with Centos 4.6 for development
    after finish the installation, i 've got some "STRANGE" ..when i do a query at dataguard1
    dataguard1 is primary database machines [hostname]
    dataguard2 is standby database machines [hostname]
    sys@dataguard1> select sequence#, first_time, next_time from v$archived_log;
    SEQUENCE# FIRST_TIM NEXT_TIME
    --------- 16 24-JUL-09 24-JUL-09
    17 24-JUL-09 24-JUL-09
    18 24-JUL-09 24-JUL-09
    19 24-JUL-09 24-JUL-09
    20 24-JUL-09 24-JUL-09
    21 24-JUL-09 24-JUL-09
    22 24-JUL-09 11-AUG-09
    23 11-AUG-09 12-AUG-09
    24 12-AUG-09 12-AUG-09
    25 12-AUG-09 12-AUG-09
    26 12-AUG-09 12-AUG-09
    sys@dataguard1>select sequence#,applied
    2 from v$archived_log
    3 order by sequence#;
    SEQUENCE# APP
    16 NO
    17 NO
    18 NO
    19 NO
    20 NO
    21 NO
    22 NO
    23 NO
    24 NO
    but if i do the same quey on standby database
    sys@dataguard2> select sequence#, first_time, next_time from v$archived_log;
    nothing archive...and not applied..
    here my parameter file not all parameter included
    primary db..on dataguard1 machines dbname : dgtest
    *.db_file_name_convert='/u01/app/oracle/oradata/dgtest','/u01/app/oracle/oradata/dgtest'
    *.db_name='dgtest'
    *.DB_UNIQUE_NAME='dgtest'
    *.fal_client='dgtest2'
    *.fal_server='dgtest'
    *.job_queue_processes=10
    *.log_archive_config='DG_CONFIG=(dgtest,dgtest2)'
    *.log_archive_dest_1='LOCATION=/u02/oradata/archive/dgtest/
    valid_for=(all_logfiles,all_roles)
    db_unique_name=dgtest'
    *.log_archive_dest_2='service=dgtest2 lgwr async
    valid_for=(online_logfiles,primary_roles)
    db_unique_name=dgtest2'
    *.log_archive_dest_state_1='enable'
    *.log_archive_dest_state_2='enable'
    *.log_archive_format='%s_%t_%r.arc'
    *.log_file_name_convert='/u01/app/oracle/oradata/dgtest','/u01/app/oracle/oradata/dgtest',
    '/u01/app/oracle/flash_recovery_area/DGTEST/onlinelog/','/u01/app/oracle/flash_recovery_area/DGTEST/onlinelog/'
    *.service_names='dgtest'
    *.standby_file_management='auto'
    standby on dataguard1 machines..dbname : dgtest2
    *.db_file_name_convert='/u01/app/oracle/oradata/dgtest','/u01/app/oracle/oradata/dgtest'
    *.db_name='dgtest'
    *.DB_UNIQUE_NAME='dgtest2'
    *.fal_client='dgtest2'
    *.fal_server='dgtest'
    *.log_archive_config='DG_CONFIG=(dgtest,dgtest2)'
    *.log_archive_dest_1='LOCATION=/u02/oradata/archive/dgtest/
    valid_for=(all_logfiles,all_roles)
    db_unique_name=dgtest2'
    *.log_archive_dest_2='service=dgtest lgwr async
    valid_for=(online_logfiles,primary_roles)
    db_unique_name=dgtest'
    *.log_archive_dest_state_1='enable'
    *.log_archive_dest_state_2='enable'
    *.log_archive_format='%s_%t_%r.arc'
    *.log_file_name_convert='/u01/app/oracle/oradata/dgtest','/u01/app/oracle/oradata/dgtest',
    '/u01/app/oracle/flash_recovery_area/DGTEST/onlinelog/','/u01/app/oracle/flash_recovery_area/DGTEST/onlinelog/'
    *.remote_login_passwordfile='EXCLUSIVE'
    *.service_names='dgtest'
    *.standby_file_management='auto'
    what could be the problem????
    thanks for u'r attention & help
    maybe hunterX could help the problem ;)
    Edited by: kang dadang on Aug 13, 2009 12:09 AM
    Edited by: kang dadang on Aug 13, 2009 12:10 AM

    thanks for reply amit..
    when i do that query
    select * from V$ARCHIVE_DEST where dest_id=2
    Status = ERROR
    ERROR = ORA-01031: insufficient privileges
    ORA-01031: insufficient privileges ????
    what could it be the problem??
    nb : the passwdfile between db iis same
    but i configure direct I/O could it be the problem?
    thanks amit
    Edited by: kang dadang on Aug 17, 2009 10:08 PM
    Edited by: kang dadang on Aug 17, 2009 10:11 PM
    Edited by: kang dadang on Aug 17, 2009 10:16 PM
    Edited by: kang dadang on Aug 17, 2009 10:25 PM

  • Dataguard the achivelog not transfort between primary & standby db

    Dear all Dataguard gurus
    i tried to install oracle 10g dataguard on 2 machines with Centos 4.6 for development
    after finish the installation, i 've got some "STRANGE" ..when i do a query at dataguard1
    dataguard1 is primary database
    dataguard2 is standby database
    sys@dataguard1> select sequence#, first_time, next_time from v$archived_log;
    SEQUENCE# FIRST_TIM NEXT_TIME
    16 24-JUL-09 24-JUL-09
    17 24-JUL-09 24-JUL-09
    18 24-JUL-09 24-JUL-09
    19 24-JUL-09 24-JUL-09
    20 24-JUL-09 24-JUL-09
    21 24-JUL-09 24-JUL-09
    22 24-JUL-09 11-AUG-09
    23 11-AUG-09 12-AUG-09
    24 12-AUG-09 12-AUG-09
    25 12-AUG-09 12-AUG-09
    26 12-AUG-09 12-AUG-09
    sys@dataguard1>select sequence#,applied
    2 from v$archived_log
    3 order by sequence#;
    SEQUENCE# APP
    16 NO
    17 NO
    18 NO
    19 NO
    20 NO
    21 NO
    22 NO
    23 NO
    24 NO
    but if i do the same quey on standby database
    sys@dataguard2> select sequence#, first_time, next_time from v$archived_log;
    nothing archive...and not applied
    what could be the problem????
    thanks for u'r attention & help
    Edited by: kang dadang on Aug 12, 2009 7:22 PM

    thanks for response jerald
    everything is same, all pass for sys on primary & standby are the same, password file on both machine are same
    here my parameter file[not all parameter included]
    [primary db]..on dataguard1 machines [dbname : dgtest]
    *.db_file_name_convert='/u01/app/oracle/oradata/dgtest','/u01/app/oracle/oradata/dgtest'
    *.db_name='dgtest'
    *.DB_UNIQUE_NAME='dgtest'
    *.fal_client='dgtest2'
    *.fal_server='dgtest'
    *.job_queue_processes=10
    *.log_archive_config='DG_CONFIG=(dgtest,dgtest2)'
    *.log_archive_dest_1='LOCATION=/u02/oradata/archive/dgtest/
    valid_for=(all_logfiles,all_roles)
    db_unique_name=dgtest'
    *.log_archive_dest_2='service=dgtest2 lgwr async
    valid_for=(online_logfiles,primary_roles)
    db_unique_name=dgtest2'
    *.log_archive_dest_state_1='enable'
    *.log_archive_dest_state_2='enable'
    *.log_archive_format='%s_%t_%r.arc'
    *.log_file_name_convert='/u01/app/oracle/oradata/dgtest','/u01/app/oracle/oradata/dgtest',
    '/u01/app/oracle/flash_recovery_area/DGTEST/onlinelog/','/u01/app/oracle/flash_recovery_area/DGTEST/onlinelog/'
    *.service_names='dgtest'
    *.standby_file_management='auto'
    [standby] on dataguard1 machines..[dbname : dgtest2]
    *.db_file_name_convert='/u01/app/oracle/oradata/dgtest','/u01/app/oracle/oradata/dgtest'
    *.db_name='dgtest'
    *.DB_UNIQUE_NAME='dgtest2'
    *.fal_client='dgtest2'
    *.fal_server='dgtest'
    *.log_archive_config='DG_CONFIG=(dgtest,dgtest2)'
    *.log_archive_dest_1='LOCATION=/u02/oradata/archive/dgtest/
    valid_for=(all_logfiles,all_roles)
    db_unique_name=dgtest2'
    *.log_archive_dest_2='service=dgtest lgwr async
    valid_for=(online_logfiles,primary_roles)
    db_unique_name=dgtest'
    *.log_archive_dest_state_1='enable'
    *.log_archive_dest_state_2='enable'
    *.log_archive_format='%s_%t_%r.arc'
    *.log_file_name_convert='/u01/app/oracle/oradata/dgtest','/u01/app/oracle/oradata/dgtest',
    '/u01/app/oracle/flash_recovery_area/DGTEST/onlinelog/','/u01/app/oracle/flash_recovery_area/DGTEST/onlinelog/'
    *.remote_login_passwordfile='EXCLUSIVE'
    *.service_names='dgtest'
    *.standby_file_management='auto'
    thanks for all...jerald
    Edited by: kang dadang on Aug 12, 2009 11:52 PM

Maybe you are looking for