Logical standby problem on primary DB updates

Hi all!
I am quite new to standby databases, but I managed to sucessfully setup logical standby (11g on linux).
However, I got some problem - when I try to insert some data into Primary DB using simple JDBC statements, I sometimes get exception:
java.sql.SQLException: ORA-16224: Database Guard is enabled
And this happens not all the time - sometimes I can insert and commit, but sometimes I get exception.
This never happens when I am trying to insert data directly from sqlplus or TOAD.
looks to me like java application sometimes is connecting to standby database.
any suggestions?
Thanks

Check for example, whether both DBs present the same service and whether you have an oracle net configuration like
myservice =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = host_A)(PORT = 1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = host_B)(PORT = 1521))
      (LOAD_BALANCE = yes)
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = myservice)
  )You should make sure that the productive service is only presented by the primary database. See this explanation:
http://prutser.files.wordpress.com/2008/12/client_connectivity.pdf
Kind regards
Uwe
http://uhesse.wordpress.com

Similar Messages

  • ORA-01403 - Logical Standby Apply ends on delete/update statement

    - This thread is relocated to this forum; advice from Daniel Roy -
    After implementing 2 logical standby databases and running pretty smooth for a while 'strange' errors occur which puzzle me. Sometimes I skip a transaction or exclude a schema from replication and hold my breath for what next roars its ugly head.
    Despite fulfilling all logical standby prerequisites and maintaining primary keys on tables I now run into ORA-01403 errors. The updated table only contains 1 row and has a foreign key to another small table.
    I could instantiate these tables, but I want to understand why these errors occur and prevent them form happing or learn how to resolve them best.
    Anyone around who dealt with these matters and won?
    I'm running this implementation with Oracle 9.2.0.7 on Tru64 51.b
    I'm able to create the logical standby databases manually and with aid of the Data Guard Creation Wizard (EM10g 10.1).
    Can anyone also help me out with refining the faulty transaction from e.g. V$LOGMNR_CONTENTS? (Without disrupting the data guard setup).
    I've already retrieved redo info from archivelogs, but there must be an easy way.
    Regards,
    Erik

    Any way for you to turn tracing on for the DB where you see this ORA-01403 error? We could then probably find out exactly what goes wrong. It's very hard for us to know exactly what might be wrong, since we don't know your exact setup (except for this table). Let me know if that's not possible, and I could construct a logical DB setup to test (even tho it would be on Windows, I don't have Tru64).
    Daniel

  • Logical Standby Problem

    My environment is Primary database is 11.1.0.7 64bit on Windows 2003 Enterprise 64bit. Logical is on the same platform and oracle version but a different server. I created a physical standby first and it applied the logs quickly without any issues. I received no errors when I changed it over to a Logical standby database. The problem that is happening is as soon as I issue the command "alter database start logical standby apply;" the CPU usage goes to 100% and the SQL apply takes a long time to apply a log. When I was doing this on 10G I never ran into this, as soon as the log was received, it was applied within a couple of minutes. I don't think it could be a memory issue since there is plenty on the Logical standby server. I just can't figure out why the SQL apply is so slow and the CPU usage skyrockets. I went through all of the steps in the guide "Managing a Logical Standby Database" from Oracle and I don't see anything wrong. The only difference between the two databases is that on the Primary I have Large Page support enabled, I don't on the Logical. Any help would be greatly appreciated, I need to use this Logical to report off of.

    Thanks for the responses. I have found what is causing the problem. I kept noticing that the statements it was slowing down on were the ones where data was being written to the SYS.AUD$ table in the System tablespace on the Logical Standby database. A quick count of the records showed that I had almost 6 million records in that table. After I decided to truncate SYS.AUD$ on the Logical, the archive logs started to apply normally. I wonder why the Logical has a problem with this table and the Primary doesn't. I didn't even know auditing was turned on on the Primary database, it must be enabled by default. Now I know why my System table space has grown from 1gb to 2gb since November.
    Now that I fixed it for now, I am unsure what to do to keep this from happening. Can I turn off Auditing on the Logical and keep it on for the Primary? Would this stop data from being written to the SYS.AUD$ table on the Logical? It doesn't appear that there is any kind of cleanup on this table that is offered by Oracle, I guess I can just clean out this table occasionally but that is just another thing to add to the list of maintenance tasks. I notice that you can also write this audit data to a file on the OS. Has anyone here done that?

  • Creating logical standby from non primary backup

    We want to test creation for logical standby in our test enviroment.
    Here is the plan we are
    1. Backup Prod.
    2. Restore Test Primary (T1) and Restore test standby (T2) from Prod backup.
    3. Setup standby between T1 and T2.
    Plan is to save the time for backup and restore process. I have not doe it before. Will this process work or T2 restore needs to be done from backup of T1 as that would be primary.
    Manuj

    969257 wrote:
    Thanks Tobi.
    I will try this. The test system is very large about 16TB and the backup/restore process takes days. I just wanted to be sure if the same backup would work for creating the primary and standby at the same time.
    So in this case, I will just have to restore from backup and move forward with archivelogs. Will I have to use the control-file from Prod or from T1.
    Use the control file from T1(test primary)
    I would like to use the backup COPY.
    General steps to follow:
    1. restore T1 as the (test)primary DB.
    2. recover/apply the T1 using the redo log.
    3. restore T2 but do not apply redo to prevent it from divergence from T1. i mean, let T2 scn be behind T1 scn.
    4. following the general steps as it apply to you in preparing and creating primary and standby DB
    http://docs.oracle.com/cd/B19306_01/server.102/b14239/create_ps.htm
    5. make sure T2 can receive and apply redo data from T1
    6.covert T2 to logical standby DB
    http://docs.oracle.com/cd/B19306_01/server.102/b14239/create_ls.htm
    HTH
    Tobi

  • Problem when switching over to a Logical Standby - RESOLVED

    I used GRID to create a logical standby. The primary and standby servers have the same OS's and are both 64-bit. I am using Oracle 10gR3 on both, and the same patches have been applied to both servers. Prior to doing the switchover, I queried switchover_status on the primary database and received a state of SESSIONS ACTIVE. I then issued the command ALTER DATABASE PREPARE TO SWITCHOVER TO LOGICAL STANDBY on the primary, and ALTER DATABASE PREPARE TO SWITCHOVER TO PRIMARY on the logical. The problem is that they are now both stuck in the PREPARING TO SWITCHOVER state and I cannot to anything to budge them from that state. As far as GRID is concerned, they are both in a NORMAL state, but the SQL queries prove differently. The APPLIED_SCN and NEWEST_SCN on the current standby do not match.
    Any ideas?
    Cheers
    Message was edited by:
    user458496

    Hi,
    APPLIED_SCN means that the newest SCN at which all changes have been applied. The values in the APPLIED_SCN and NEWEST_SCN columns will match if all available redo log data has been processed.
    NEWEST_SCN means that the most recent SCN available on the standby system. If no more logs are being shipped, then changes could be applied to this SCN. The values in the APPLIED_SCN and NEWEST_SCN columns will match if all available redo log data has been processed.
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_3250.htm
    Hope this helps.
    Adith

  • ORA-01291:missing logfile when FlashingBack a Primary DB in logical standby

    OS: Solaris 10 and Windows vista
    Oracle version : 10.2.0.4.0 Enterprise Edition and 10.2.0.3.0 Enterprise Edition
    We are getting ORA-01291: missing logfile when FlashingBack a failed Primary DB into logical standby
    We are following Below procedure for failover and flashback in logical standby.
    Primary and standby database name is as below.
    primary db_name primdb
    standby db_name logicdb
    failover
    From primdb:
    shut abort
    From logicdb:
    select applied_scn,newest_scn from dba_logstdby_progress;
    alter database stop logical standby apply;
    alter database activate logical standby database;
    Flashing Back a Failed Primary Database into a Logical Standby Database
    We are following instructions from below link.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/scenarios.htm#i1050060
    SYS@logicdb> SELECT APPLIED_SCN AS FLASHBACK_SCN FROM V$LOGSTDBY_PROGRESS;
    FLASHBACK_SCN
    302330
    1 row selected.
    SYS@logicdb> SELECT file_NAME FROM DBA_LOGSTDBY_LOG WHERE NEXT_CHANGE# > (SELECT VALUE FROM DBA_LOGSTDBY_PARAMETERS
              WHERE NAME = 'STANDBY_BECAME_PRIMARY_SCN') AND FIRST_CHANGE#<=302330;
    FILE_NAME
    /logs/app/oracle/flash_recovery_area/LOGICDB/archivelog2/logicdb_1_12_729695607.arc
    Note: We have copied above mentioned file to primary archive destination i.e. /logs/app/oracle/flash_recovery_area/PRIMDB/archivelog.
    SYS@primdb> startup mount
    ORACLE instance started.
    Total System Global Area 1073741824 bytes
    Fixed Size 2046056 bytes
    Variable Size 264243096 bytes
    Database Buffers 801112064 bytes
    Redo Buffers 6340608 bytes
    Database mounted.
    SYS@primdb> FLASHBACK DATABASE TO SCN 302330;
    Flashback complete.
    SYS@primdb> ALTER DATABASE OPEN RESETLOGS;
    Database altered.
    SYS@primdb> ALTER DATABASE START LOGICAL STANDBY APPLY NEW PRIMARY logicdb;
    Database altered.
    SYS@primdb> select type,high_scn,status from v$logstdby;
    TYPE HIGH_SCN
    STATUS
    COORDINATOR
    ORA-01291: missing logfile
    Primary database init.ora parameters are as below
    *.db_file_name_convert=('/export/oracle/oradata/primdb/','/export/oracle/oradata/logicdb/')
    *.db_name='primdb'
    *.instance_name=primdb
    *.db_unique_name=primdb
    *.service_names=primdb
    *.db_recovery_file_dest='/logs/app/oracle/flash_recovery_area'
    *.fal_client='LOGICDB'
    *.fal_server='PRIMDB'
    *.log_archive_dest_1='LOCATION=/logs/app/oracle/flash_recovery_area/PRIMDB/archivelog/ VALID_FOR=(ONLINE_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=primdb'
    *.log_archive_dest_2='SERVICE=logicdb LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=logicdb'
    *.log_archive_dest_3='LOCATION=/logs/app/oracle/flash_recovery_area/PRIMDB/archivelog2/ VALID_FOR=(STANDBY_LOGFILES,STANDBY_ROLES) DB_UNIQUE_NAME=primdb'
    *.log_archive_dest_state_1='ENABLE'
    *.log_archive_dest_state_2='ENABLE'
    *.log_archive_dest_state_3='DEFER'
    *.log_archive_format='primdb_%t_%s_%r.arc'
    *.log_archive_max_processes=4
    *.log_file_name_convert=('/export/oracle/oradata/primdb/','/export/oracle/oradata/logicdb/')
    *.standby_file_management='AUTO'
    *.log_archive_config='dg_config=(primdb,logicdb)'
    Standby database init.ora parameters are as below
    *.db_file_name_convert=('/export/oracle/oradata/primdb/','/export/oracle/oradata/logicdb/')
    *.db_name='logicdb'
    *.instance_name=logicdb
    *.db_unique_name=logicdb
    *.service_names=logicdb
    *.db_recovery_file_dest='/logs/app/oracle/flash_recovery_area'
    *.fal_client='LOGICDB'
    *.fal_server='PRIMDB'
    *.log_archive_dest_1='LOCATION=/logs/app/oracle/flash_recovery_area/LOGICDB/archivelog/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=logicdb'
    *.log_archive_dest_2='SERVICE=primdb LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=primdb'
    *.log_archive_dest_3='LOCATION=/logs/app/oracle/flash_recovery_area/LOGICDB/archivelog2/ VALID_FOR=(STANDBY_LOGFILES,STANDBY_ROLES) DB_UNIQUE_NAME=logicdb'
    *.log_archive_dest_state_1='ENABLE'
    *.log_archive_dest_state_2='DEFER'
    *.log_archive_dest_state_2='ENABLE'
    *.log_archive_format='logicdb_%t_%s_%r.arc'
    *.log_archive_max_processes=4
    *.log_file_name_convert=('/export/oracle/oradata/primdb/','/export/oracle/oradata/logicdb/')
    *.log_archive_config='dg_config=(primdb,logicdb)'

    Hi ,
    The error shows it is waiting for the Logfile. The Integrated extract mainly needs of the availability of two things.
    1. Archivelogs.
    2. Trail Files.
    Both should be retained to the needed / required level.
    Please execute the below query and check the status of the Extract / Capture process.
    The below query displays the information of each capture process in a database.,
    COLUMN CAPTURE_NAME HEADING 'Capture|Name' FORMAT A7
    COLUMN PROCESS_NAME HEADING 'Capture|Process|Number' FORMAT A7
    COLUMN SID HEADING 'Session|ID' FORMAT 9999
    COLUMN SERIAL# HEADING 'Session|Serial|Number' FORMAT 9999
    COLUMN STATE HEADING 'State' FORMAT A20
    COLUMN TOTAL_MESSAGES_CAPTURED HEADING 'Redo|Entries|Evaluated|In Detail' FORMAT 9999999
    COLUMN TOTAL_MESSAGES_ENQUEUED HEADING 'Total|LCRs|Enqueued' FORMAT 9999999999
    SELECT c.CAPTURE_NAME,
           SUBSTR(s.PROGRAM,INSTR(s.PROGRAM,'(')+1,4) PROCESS_NAME,
           c.SID,
           c.SERIAL#,
           c.STATE,
           c.TOTAL_MESSAGES_CAPTURED,
           c.TOTAL_MESSAGES_ENQUEUED
      FROM V$STREAMS_CAPTURE c, V$SESSION s
      WHERE c.SID = s.SID AND
            c.SERIAL# = s.SERIAL#;
    Also run this query to check, if the capture is waiting for which logfile.,
    COLUMN CONSUMER_NAME HEADING 'Capture|Process|Name' FORMAT A15
    COLUMN SOURCE_DATABASE HEADING 'Source|Database' FORMAT A10
    COLUMN SEQUENCE# HEADING 'Sequence|Number' FORMAT 99999
    COLUMN NAME HEADING 'Required|Archived Redo Log|File Name' FORMAT A40
    SELECT r.CONSUMER_NAME,
           r.SOURCE_DATABASE,
           r.SEQUENCE#,
           r.NAME
      FROM DBA_REGISTERED_ARCHIVED_LOG r, DBA_CAPTURE c
      WHERE r.CONSUMER_NAME =  c.CAPTURE_NAME AND
            r.NEXT_SCN      >= c.REQUIRED_CHECKPOINT_SCN;
    The above query clearly shows for which logfile the Extract / Capture process is waiting. Check if that logfile is available in your system.
    Regards,
    Veera

  • Add new datafile to logical standby database but not in primary

    Hi,
    Is it ok to add a new datafile to the SYSAUX tablespace on the logical standby database but not on primary? We are running out of disk space on the partition where SYSAUX01.dbf resides so we want to add a new SYSAUX02.dbf in another partition which has space. but this will only be on the logical standby not on primary, there is still lots of space in primary. standby_file_management is MANUAL and this is LOGICAL STANDBY not PHYSICAL.
    Is this possible or where there be any issues?
    Thanks.

    Logical Standby can differ from Primary, it can have extra tablespaces, datafiles, tables, indexes, users ...
    HTH
    Enrique

  • Logical Standby working issues Oracle 9i, Windows

    Hi,
    Set up Oracle 9i Logical Standby on Windows. (instructions as per Oracle Documentation)
    Did not have any issues setting up.
    While setting up the Logical Standby, Recovered the Primary Database until Oct 10/09 8:16 pm
    Registered the archive log in the logical standby generated hence and the FAL took care of copying/registering the rest of the archivelogs.
    Created and inserted some records in Primary database and could see them in Standby.
    So far so good.
    On Oct11 data was entered into Primary database. Archivelogs were shipped to Standby, I could see them registered in DBA_LOGSTDBY_LOG.
    The APPLIED_SCN,NEWEST_SCN were in sync as per DBA_LOGSTDBY_PROGRESS.
    Today, we had some issues with data and when we queried the user tables: (no skip settings)
    Couldn't see any data in standby past the recovery...
    No errors reported in DBA_LOGSTDBY_EVENTS. No errors in Alert log also.
    What could be happening?
    Thanks,
    Madhuri

    I figured it out...
    Today, we had some issues with data and when we queried the user tables: (no skip settings)
    Couldn't see any data in standby past the recovery...I was using two tables as random spot check and both did not get updated. So, I was under the impression SQL APPLY did not do anything.
    But, it did apply the redo on the rest of the tables.
    These 2 tables in question were skipped because both of them had Function Based indexes.
    They are very huge individual tables .
    So, exporting them from Primary database and Importing them into Standby Database. Skipping DML in DataGuard.
    That solved the problem.
    --Madhuri                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • ORA-01403: no data found on LOGICAL STANDBY database

    Hi ,
    Logical Standby issue :
    Oracle 10.2.0.2 enterprise edition .
    M Working on LOGICAL Standby since 1 yrs but still i havent got this ......................................
    I m getting countinuously no data foud errror on logical standby database .
    I found the table causing the proble(db_logstdby_events) and skipped that table and instanciated table using bwlow package:
    exec dbms_logstdby.instantiate_table (.......................................
    but when i start apply process on logical standby it again give no data found for new table :
    Even i tried to instantiate the table using EXPORT/IMPORT during down time but the same facing same problem .
    As much as i known abt the error that is :
    table1
    id
    10
    20
    30
    Now if sql apply process on logical standby tries to performe the update transaction(for example) as belows
    update table1 set id=100 where id=50;
    above query will not be completed cos it will never find the values 50 which is not in table .Thts why this error comming ..
    Now my worry is ... no users dare to change/make such changes on Logical standby .So if there is no changes in tables then sqll apply should get all the values to be needded for an update ......
    watingggg guyssss/......

    Troubleshooting ORA-1403 errors with Flashback Transaction
    In the event that the SQL Apply engine errors out with an ORA-1403, it may be possible to utilize flashback transaction on the standby database to reconstruct the missing data. This is reliant upon the undo_retention parameter specified on the standby database instance.
    ORA-1403: No Data Found
    Under normal circumstances the ORA-1403 error should not be seen in a Logical Standby environment. The error occurs when data in a SQL Apply managed table is modified directly on the standby database, and then the same data is modified on the primary database.
    When the modified data is updated on the primary database and received by the SQL Apply engine, the SQL Apply engine verifies the original version of the data is present on the standby database before updating the record. When this verification fails, an ORA-1403: No Data Found error is thrown by Oracle Data Guard: SQL Apply.
    The initial error
    When the SQL Apply engine verification fails, the error thrown by the SQL Apply engine is reported in the alert log of the logical standby database as well as a record being inserted into the DBA_LOGSTDBY_EVENTS view. The information in the alert log is truncated, while the error is reported in it's entirety in the database view.
    LOGSTDBY stmt: update "SCOTT"."MASTER"
    set
    "NAME" = 'john'
    where
    "PK" = 1 and
    "NAME" = 'andrew' and
    ROWID = 'AAAAAAAAEAAAAAPAAA'
    LOGSTDBY status: ORA-01403: no data found
    LOGSTDBY PID 1006, oracle@staco03 (P004)
    LOGSTDBY XID 0x0006.00e.00000417, Thread 1, RBA 0x02dd.00002221.10
    The Investigation
    The first step is to analyze the historical data of the table that threw the error. This can be achieved using the VERSIONS clause of the SELECT statement.
    SQL> select versions_xid
    , versions_startscn
    , versions_endscn
    , versions_operation
    , pk
    , name
    from scott.master
    versions between scn minvalue and maxvalue
    where pk = 1
    order by nvl(versions_startscn,0);
    VERSIONS_XID VERSIONS_STARTSCN VERSIONS_ENDSCN V PK NAME
    03001900EE070000 3492279 3492290 I 1 andrew
    02000D00E4070000 3492290 D 1 andrew
    Depending upon the amount of undo retention that the database is configured to retain (undo_retention) and the activity on the table, the information returned might be extensive and the versions between syntax might need to be changed to restrict the amount of information returned.
    From the information returned, it can be seen that the record was first inserted at scn 3492279 and then was deleted at scn 3492290 as part of transaction ID 02000D00E4070000. Using the transaction ID, the database should be queried to find the scope of the transaction. This is achieved by querying the flashback_transaction_query view.
    SQL> select operation
    , undo_sql
    from flashback_transaction_query
    where xid = hextoraw('02000D00E4070000');
    OPERATION UNDO_SQL
    DELETE insert into "SCOTT"."MASTER"("PK","NAME") values
    ('1','andrew');
    BEGIN
    Note that there is always one row returned representing the start of the transaction. In this transaction, only one row was deleted in the master table. The undo_sql column when executed will restore the original data into the table.
    SQL> insert into "SCOTT"."MASTER"("PK","NAME") values ('1','andrew');
    SQL> commit;
    The SQL Apply engine may now be restarted and the transaction will be applied to the standby database.
    SQL> alter database start logical standby apply;

  • Creating triggers in a logical standby database

    Does anyone know if its possible to create and enable a trigger in a logical standby database on a 'guarded' table? I've been able to create the trigger (as an after insert trigger) and it appears to be valid but it never seems to fire, despite inserts taking place. Are there any other steps involved to activate this, or is it just plain not possible in a logical standby? My primary and logical standby databases are 10.2.0.3

    HI Daniel,
    I appreciate your quick response.
    My choice of name may not have been ideal, however changing new to another name - like gav - does not solve the problem.
    SYS@UATDR> connect / as sysdba
    Connected.
    SYS@UATDR>
    SYS@UATDR> select name, log_mode, database_role, guard_status, force_logging, flashback_on, db_unique_name
    2 from v$database
    3 /
    NAME LOG_MODE DATABASE_ROLE GUARD_S FOR FLASHBACK_ON DB_UNIQUE_NAME
    UATDR ARCHIVELOG LOGICAL STANDBY ALL YES YES UATDR
    SYS@UATDR>
    SYS@UATDR> create tablespace ts_gav
    2 /
    Tablespace created.
    SYS@UATDR>
    SYS@UATDR> create user gav
    2 identified by gav
    3 default tablespace ts_gav
    4 temporary tablespace temp
    5 quota unlimited on ts_gav
    6 /
    User created.
    SYS@UATDR>
    SYS@UATDR> grant connect, resource to gav
    2 /
    Grant succeeded.
    SYS@UATDR> grant unlimited tablespace, create table, create any table to gav
    2 /
    Grant succeeded.
    SYS@UATDR>
    SYS@UATDR> -- show privs given to gav
    SYS@UATDR> select * from dba_sys_privs where grantee='GAV'
    2 /
    GRANTEE PRIVILEGE ADM
    GAV CREATE TABLE NO
    GAV CREATE ANY TABLE NO
    GAV UNLIMITED TABLESPACE NO
    SYS@UATDR>
    SYS@UATDR> -- create objects in schema
    SYS@UATDR> connect gav/gav
    Connected.
    GAV@UATDR>
    GAV@UATDR> -- prove ability to create tables
    GAV@UATDR> create table gav
    2 (col1 number not null)
    3 tablespace ts_gav
    4 /
    create table gav
    ERROR at line 1:
    ORA-01031: insufficient privileges
    GAV@UATDR>

  • Creating new tables in Logical Standby database

    Hi
    I have a requirement to create new tables in logical standby database. These tables will not be present on primary database. Is it possible to do this ?
    I have a new schema already created which has the privilege to CREATE new table.
    I have stopped the logical standby apply.
    When I am now trying to create a new table but it is failing with error : insufficient privileges.
    When I am trying to run below statement on new schema it is also failing with error of insufficient privileges.
    alter session disable dataguard;
    Please help.

    user8819121 wrote:
    Thanks Mahir,
    I was able to create the table after logging in as sysdba.
    But I need my user on that table to execute DML statements. My user has privileges to insert,delete and update any table.
    I tried the following statements to disable the guard but it is sill not working
    ALTER DATABASE GUARD STANDBY.
    Do I need to skip the tables created using dbms_logstdby package to not making it part of SQL Apply ? I guess not since the table is not in primary database.
    Amit
    You can skip only on primary, your created schema on Standby is not in primary.
    Then you must change Status of data guard to NONE. NONE is means is not any security on your data.
    In Guard status NONE can change all schema data.
    Please check link: http://docs.oracle.com/cd/E11882_01/server.112/e10700/manage_ls.htm#CHDGFGHG
    Following tests on user created before guard status is change from ALL to STANDBY.
    C:\Users\Administrator>sqlplus / as sysdba
    SQL> conn test/test
    Connected.
    SQL> select table_name from user_tables;
    TABLE_NAME
    T
    SQL> insert into t values(22);
    insert into t values(22)
    ERROR at line 1:
    ORA-16224: Database Guard is enabled
    SQL> conn / as sysdba
    Connected.
    SQL> select guard_Status from  v$database;
    GUARD_S
    ALL
    SQL> alter  database guard standby;
    Database altered.
    SQL> conn test/test
    Connected.
    SQL> insert into t values(1);
    insert into t values(1)
    ERROR at line 1:
    ORA-16224: Database Guard is enabled
    SQL> conn / as sysdba
    Connected.
    SQL> select guard_Status from  v$database;
    GUARD_S
    STANDBY
    SQL> alter  database guard none;
    Database altered.
    SQL> select guard_Status from  v$database;
    GUARD_S
    NONE
    SQL> conn test/test
    Connected.
    SQL> insert into t values(1);
    1 row created.
    SQL> commit;
    Commit complete.And Now I want share with you new tests :)
    Now user creating when after guard status change
    SQL> drop  user test cascade;
    User dropped.
    SQL> select guard_status from v$database;
    GUARD_S
    STANDBY
    SQL> create user test identified by test;
    User created.
    SQL> grant create session,  resource, create table to test;
    Grant succeeded.
    SQL> conn test/test
    Connected.
    SQL> create table t (n number);
    Table created.
    SQL> insert into t values(1);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL>It means when guard status is ALL then all of user created guarding.
    When you changed status to STANDBY then Logical Standby guard only primary schema and created schema before change.
    NONE is not guard any schema. it means you can delete standby schema data too.
    Regards
    Mahir M. Quluzade
    Edited by: Mahir M. Quluzade on Apr 19, 2013 4:07 PM

  • Logical Standby out of sync after archiver stuck (how to resync)

    Hi,
    I had an archiver stuck on my logical standby database for about 4 hours this night.
    2 hours later my primary db also had an archiver stuck.
    After solving the problem by repairing the backup mechanism and startup of the archivelog backup I realised
    that some tables are out of sync.
    How can I get back all things back in sync again?
    DB: 11gR2 EE
    OS: RedHat Linux 5.5
    Thanks
    941743

    Hi,
    I don't sure have or not resyncronization whole schema, but you can use with PL/SQL as
    Stop SQL Apply on logical  standby  database
    SQL> ALTER DATABASE STOP LOGICAL STANDBY APPLY;
    on primary
    SQL>  begin
      2> for t in (select table_name from db_tables where owner = '<your schema name>')
      3> loop
      4>   DBMS_LOGSTDBY.INSTANTIATE_TABLE(shema_name => '<your schema name>', object_name => T.Table_name, dblink => '<you dblink name>');
      5> end loop;
      6>end;
    Start SQL Apply on logical standby database
    SQL> ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE;If you skip DML and DDL for your schema, then you must UNSKIP DML and DDL on this tables you must add following script to PL/SQL block before INSTANTIATE_TABLEs.
    DBMS_LOGSTDBY.UNSKIP(stmt => 'DML', schema_name => '<your schema name>', object_name => T.Table_Name);
    DBMS_LOGSTDBY.UNSKIP(stmt => 'DDL', schema_name => '<your schema name>', object_name => T.Table_Name);Regards
    Mahir M. Quluzade
    Edited by: Mahir M. Quluzade on Sep 13, 2012 6:17 PM

  • Creation of Logical Standby Database Using RMAN ACTIVE DATABASE COMMAND

    Hi All,
    I am in confusion how to create logical standby database from primary database using rman active database command.
    What i did:-
    Create primary database on machine 1 on RHEL 5 with Oracle 11gR2
    Create standby database on machine 2 on RHEL 5 With Oracle 11gR2 from primary using RMAN active database command
    Trying to create logical standby database on machine 3 on RHEL 5 with Oracle 11gR2 using RMAN active database command from primary.
    The point which confuse me is to start the logical standby in nomount mode on machine 3 with which pfile like i create the pfile for standby database do i need to create the pfile for logical standby db.
    I done the creation of logical standby database by converting physical standby to logical standby database
    I am following the below mentioned doc for the same:
    Creating a physical and a logical standby database in a DR environment | Chen Guang&amp;#039;s Blog
    Kindly guide me how to work over the same or please provide me the steps of the same.
    Thanks in advance.

    Thanks for your reply
    I already started the logical standby database with pfile in nomount mode. And successfully completed the duplication of database. by mentioning the DB_FILE_NAME_CONVERT and LOG_FILE_NAME_CONVERT parameter.
    But i am not able to receive the logs on the above mentioned blog i run the sql command to check the logs but getting "no rows selected"
    My primary database pfile is:
    pc01prmy.__db_cache_size=83886080
    pc01prmy.__java_pool_size=12582912
    pc01prmy.__large_pool_size=4194304
    pc01prmy.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
    pc01prmy.__pga_aggregate_target=79691776
    pc01prmy.__sga_target=239075328
    pc01prmy.__shared_io_pool_size=0
    pc01prmy.__shared_pool_size=134217728
    pc01prmy.__streams_pool_size=0
    *.audit_file_dest='/u01/app/oracle/admin/pc01prmy/adump'
    *.audit_trail='db'
    *.compatible='11.1.0.0.0'
    *.control_files='/u01/app/oracle/oradata/PC01PRMY/controlfile/o1_mf_91g3mdtr_.ctl','/u01/app/oracle/flash_recovery_area/PC01PRMY/controlfile/o1_mf_91g3mf6v_.ctl'
    *.db_block_size=8192
    *.db_create_file_dest='/u01/app/oracle/oradata'
    *.db_domain=''
    *.db_file_name_convert='/u01/app/oracle/oradata/PC01SBY/datafile','/u01/app/oracle/oradata/PC01PRMY/datafile'
    *.db_name='pc01prmy'
    *.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
    *.db_recovery_file_dest_size=2147483648
    *.diagnostic_dest='/u01/app/oracle'
    *.dispatchers='(PROTOCOL=TCP) (SERVICE=pc01prmyXDB)'
    *.fal_client='PC01PRMY'
    *.fal_server='PC01SBY'
    *.log_archive_config='DG_CONFIG=(pc01prmy,pc01sby,pc01ls)'
    *.log_archive_dest_1='LOCATION=/u01/app/oracle/flash_recovery_area/PC01PRMY/ VALID_FOR=(ONLINE_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=pc01prmy'
    *.log_archive_dest_2='SERVICE=pc01sby LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=pc01sby'
    *.log_archive_dest_3='SERVICE=pc01ls LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES, PRIMARY_ROLE) DB_UNIQUE_NAME=pc01ls'
    *.log_archive_dest_state_1='ENABLE'
    *.log_archive_dest_state_2='DEFER'
    *.log_archive_dest_state_3='DEFER'
    *.log_archive_max_processes=30
    *.log_file_name_convert='/u01/app/oracle/oradata/PC01SBY/onlinelog','/u01/app/oracle/oradata/PC01PRMY/onlinelog'
    *.open_cursors=300
    *.pga_aggregate_target=78643200
    *.processes=150
    *.remote_login_passwordfile='EXCLUSIVE'
    *.sga_target=236978176
    *.undo_tablespace='UNDOTBS1'
    My logical standby pfile is:-
    pc01ls.__db_cache_size=92274688
    pc01ls.__java_pool_size=12582912
    pc01ls.__large_pool_size=4194304
    pc01ls.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
    pc01ls.__pga_aggregate_target=79691776
    pc01ls.__sga_target=239075328
    pc01ls.__shared_io_pool_size=0
    pc01ls.__shared_pool_size=125829120
    pc01ls.__streams_pool_size=0
    *.audit_file_dest='/u01/app/oracle/admin/pc01ls/adump'
    *.audit_trail='db'
    *.compatible='11.1.0.0.0'
    *.control_files='/u01/app/oracle/oradata/PC01LS/controlfile/o1_mf_91g3mdtr_.ctl','/u01/app/oracle/flash_recovery_area/PC01LS/controlfile/o1_mf_91g3mf6v_.ctl'
    *.db_block_size=8192
    *.db_create_file_dest='/u01/app/oracle/oradata'
    *.db_domain=''
    *.db_file_name_convert='/u01/app/oracle/oradata/PC01SBY/datafile','/u01/app/oracle/oradata/PC01PRMY/datafile'
    *.db_name='pc01prmy'
    *.db_unique_name='pc01ls'
    *.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
    *.db_recovery_file_dest_size=2147483648
    *.diagnostic_dest='/u01/app/oracle'
    *.dispatchers='(PROTOCOL=TCP) (SERVICE=pc01prmyXDB)'
    *.log_archive_config='DG_CONFIG=(pc01prmy,pc01sby,pc01ls)'
    *.log_archive_dest_1='LOCATION=/u01/app/oracle/flash_recovery_area/PC01PRMY/ VALID_FOR=(ONLINE_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=pc01prmy'
    *.log_archive_dest_2='LOCATION=/u01/app/oracle/flash_recovery_area/PC01LS/ VALID_FOR=(STANDBY_LOGFILES,STANDBY_ROLE) DB_UNIQUE_NAME=pc01ls'
    *.log_archive_dest_3='SERVICE=pc01ls LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES, PRIMARY_ROLE) DB_UNIQUE_NAME=pc01ls'
    *.log_archive_dest_state_1='ENABLE'
    *.log_archive_dest_state_2='ENABLE'
    *.log_archive_max_processes=30
    *.log_file_name_convert='/u01/app/oracle/oradata/PC01SBY/onlinelog','/u01/app/oracle/oradata/PC01PRMY/onlinelog'
    *.open_cursors=300
    *.pga_aggregate_target=78643200
    *.processes=150
    *.remote_login_passwordfile='EXCLUSIVE'
    *.sga_target=236978176
    *.undo_tablespace='UNDOTBS1'
    Kindly advice over the same

  • Status of Logical Standby In case of Failover to Physical Standby

    I am using oracle 9.2.0.8 database . I have one logical and one physical standby database in place. If I perform failover to my physical standby, will my logical standby still continue to work with new primary database?

    Thank you for your kind reply.
    I performed failover to my physical standby and now archives are going on my logical standby from new primary but changes are not getting applied on my logical standby database.
    when i tried to register the logical logfile from new primary on my logical standby i am getting following error.
    SQL> ALTER DATABASE REGISTER LOGICAL LOGFILE 'E:\orcl1\stdb\archives\TESTDBT001S00001.ARC';
    ALTER DATABASE REGISTER LOGICAL LOGFILE 'E:\orcl1\stdb\archives\TESTDBT001S00001.ARC'
    ERROR at line 1:
    ORA-01287: file is from a different database incarnation

  • Oracle 10g Logical Standby

    The question is on Oracle 10g Logical Standby Data Guard. Below is the short description of what we wanted to do.
    We currently run our Remedy application on Oracle10g. We wanted to setup Data Guard (logical standby) so we can perform our application upgrade on the logical standby. While we upgrade our application, our customers perform the dml on the primary instance.
    During the upgrade, we will change the ddl on our application in the logical standby instance. After the application upgrade, we do a role switch between the two instances (primary became a new logical standby and logical standby became new primary). Now, we wanted the data or the dml that our customers perform on the old primary replicate over to the new primary.
    It is possible for the logical standby to perform the ddl at the same time user perform the ddl and dml on the primary instance?
    After role switch between the two instances, is the data changed on the primary replicate over to the new primary?
    Thank you for your helps.
    Loc Nguyen
    [email protected]

    Hi Shital,
    Guard_status protects the data from being changed.
    ALL- By default it is not possible for a non-privileged user to modify data on a data guard SQL apply database. This is because the database guard is automatically set to ALL.
    With this level of security, only SYS user can modify the data.
    STANDBY- When you set this level of security, users are able to modify data that is not maintained by the Logical apply engine.
    NONE permits any users to access the standby database as long as they have correct privileges. This is the normal security for all data in the database.
    You can change the guard status value from ALL to NONE in order to allow non-privileged users to modify data and Yes you can create user and extra tablespace in logical standby database..this is what the one of advantage of using Logical standby database.
    SQL> ALTER DATABASE GUARD NONE;
    Thanks

Maybe you are looking for

  • Log in to iCloud keeps appearing

    All of a sudden on my iPad Air the "log in to iCloud" message keeps appearing every couple of seconds. have no idea why this is occurring.

  • Transports in PI System

    Hello All, Can you please suggest me the options for Client and Transports in PI system. Basically we are planning just one client in PI system in all landscapes (Dev-TEST-QAS-PROD). Does PI need some kind of communication or Data from ERP ,CRM ,BI s

  • Create portal user using web dynpro abap application

    Dear All, I would like to know is it possible to create portal user-id through web dynpro abap application. My requirement is > I have to create a web dynpro abap application. In the web dynpro abap application I have name email-id and phone number a

  • Offline ADOBE form on Portal

    Hi All, We have developed offiline ADOBE forms using ABAP (not in dynpro). Now we want to put this forms or deploy these formal on portal. Any idea how this can be done. Do we need to use NWDS to upload these forms or can they uploaded using Iviews.

  • Federated BI portal to ECC portal.

    Dear Experts, I Have configured Federated portal BI portal to ECC portal, when I have seen privew of iview (BI Portal) from ECC Portal, here I'm getting error like "the system is unable to interpret the sso ticket recieved". Please let me know any co