Manual update tables on 11g Logical Standby

Dear all,
I got one physical primary DB and one logical standby DB running 11.2.0.2 and SQL apply.  Same configuration (32bit DB, same server spec) and same settings for both DB servers.
I don't know but for some reason, a table in the logical standby DB (which also exists in the primary DB) cannot be updated properly, a delete statement for a single row can end up generating ORA-4030 and there is no reason primary can complete the task but the logical cannot. Finally, I skipped the table in SQL apply.
As the table is a monthly statistics table computed from another daily statistics table, and it is so large that I dont want to re-instatiate the table via the network, nor re-program the queries.
Therefore I decide to trigger the computation on the logical side.
My question is, given that I skipped the table in SQL, will the manual update create trouble for the SQL apply process?  I wonder how the redo procedure handles both tables under SQL apply and those under manual update.
BK

No!
One of the main benefits of a logical standby database would be the option of creating a local dataset.
See: ( Oracle® Data Guard Concepts and Administration 11g Release 2 (11.2) E10700-02 )
10.5 Customizing a Logical Standby Database
10.5.5 Adding or Re-Creating Tables On a Logical Standby Database
A materialized view may also be an option.
Best Regards
mseberg

Similar Messages

  • Oracle 11g Logical Standby not Replicating Security?

    Hello,
    I found that our Oracle 11g logical standby database stopped replicating security commands anymore since it was created as a Oracle 11g database. The security commands are related to users, roles and profiles such as create/alter/drop user, etc. The 11g logical standby database has no problem replicating other commands. Is this normal change with Oracle 11g logical standby? I know Oracle 10g logical standby can replicate those commands. The Oracle 11g logical standby was created the same way as Oracle 10g logical standby. We don't skip security commands on purpose. Anyone who got Oracle 11g logical standby has the same issue? We would like logical standby database to be able to replicate security. If it is normal for Oracle 11g logical standby to stop replicating security, is there a way to make Oracle 11g logical standby still replicates security?
    Thanks!

    had you started apply using this syntax
    real time apply
    alter database start logical standby apply immediate;
    check lag:
    alter session set nls_date_format='dd/mm hh24:mi';
    select newest_time || chr(22)|| newest_scn||chr(10)||applied_time||chr(22)||applied_scn||chr(13)||chr(16)||(newest_scn-applied_scn) lag from dba_logstdby_progress
    /

  • Table Modifications in Logical Standby

    Can I add a new column to a table in a logical standby for a table which is actively synchronized from the primary?  In essence, I would like to add a column to the table in the logical standby, but not add the column to the corresponding table in the primary DB.

    OK;
    So I have convert a Physical Standby to a Logical database.
    This table has been created:
    CREATE TABLE RSTARS
      ID            NUMBER,
      FIRST_NAME    VARCHAR2(50 BYTE),
      LAST_NAME     VARCHAR2(50 BYTE)
    TABLESPACE OTN_TEST
    PCTUSED    40
    PCTFREE    10
    INITRANS   1
    MAXTRANS   255
    STORAGE    (
                INITIAL          64K
                NEXT             1M
                MINEXTENTS       1
                MAXEXTENTS       UNLIMITED
                PCTINCREASE      0
                FREELISTS        1
                FREELIST GROUPS  1
                BUFFER_POOL      DEFAULT
    LOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    ALTER TABLE BIGSHOW.RSTARS ADD (
      CONSTRAINT RSTARS_PK
      PRIMARY KEY
      (ID));
    This data exist in the table:
    set linesize 200
    select * from rstars;
            ID FIRST_NAME                                         LAST_NAME                                  
             1 Robert                                             Plant                                      
             2 Jimmy                                              Page                                       
    2 rows selected.
    On the Primary add another row of data
    INSERT INTO RSTARS
      ID,
      FIRST_NAME,
      LAST_NAME
    VALUES
      3,
      'Ted',
      'Nugent'
    commit;
    Connect to the logical Standby and check for it.
    set linesize 200
    select * from rstars;
           ID FIRST_NAME                                         LAST_NAME                                  
             1 Robert                                             Plant                                      
             2 Jimmy                                              Page                                       
             3 Ted                                                Nugent                                     
    3 rows selected.
    MORE TO COME
    So I will add the columns one by one and test after each
    Add varchar2 to the table:
    SQL> alter database stop logical standby  apply;
    Database altered.
    SQL> alter session disable guard;
    Session altered.
    SQL> ALTER TABLE BIGSHOW.RSTARS ADD (CITY  VARCHAR2(15));
    Table altered.
    SQL> alter session enable guard;
    Session altered.
    SQL> alter database start logical standby  apply;
    Database altered.
    SQL>
    INSERT INTO RSTARS
      ID,
      FIRST_NAME,
      LAST_NAME
    VALUES
      4,
      'Geddy',
      'Lee'
    commit;
    LOGSTDBY Apply process AS02 server id=2 pid=38 OS id=31938 stopped
    Errors in file /u01/app/oracle/diag/rdbms/stest/STEST/trace/STEST_as01_31936.trc:
    ORA-26676: Table 'BIGSHOW.RSTARS' has 3 columns in the LCR and 4 columns in the replicated site
    Fri Aug 09 13:34:18 2013
    LOGMINER: session#=1 (Logical_Standby$), builder MS01 pid=34 OS id=31930 sid=34 stopped
    So you have good reason to be concerned. Thanks for the question. I have it in my notes, so I would have bet and lost!
    I thinking you can create a child table as a work around.
    You were right about this too:
    SQL> select * from DBA_LOGSTDBY_UNSUPPORTED;
    no rows selected
    ORA-26676 returns zero documents when I search Oracle Support today.
    Best Regards
    mseberg
    How to fix
    To correct all I did was this and Oracle added the row:
    SQL> alter database stop logical standby  apply;
    Database altered.
    SQL> alter session disable guard;
    Session altered.
    SQL> ALTER TABLE BIGSHOW.RSTARS DROP COLUMN CITY;
    Table altered.
    SQL> alter session enable guard;
    Session altered.
    SQL> alter database start logical standby  apply;
    Database altered.
    SQL>
    set linesize 200
    select * from rstars;
            ID FIRST_NAME                                         LAST_NAME                                     
             1 Robert                                             Plant                                         
             2 Jimmy                                              Page                                          
             3 Ted                                                Nugent                                        
             4 Geddy                                              Lee                                           
    4 rows selected.
    Message was edited by: mseberg  ( as you can tell I'm from the 70's )

  • Dataguard Logical Standby

    Question: We're just thinking here.
    If I have a primary database (A), which has a logical standby database (B), is it possible to have a logical standby database (C) for database (B)?
    We have users that are updating tables in the logical standby database (B) but these are different tables than what are being updated from primary database (A).
    Thank you

    Yes.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/cascade_appx.htm#i636960

  • Updating tables in logical standby database

    Dear DBAs,
    Is it possible to update non replicated tables in the logical standby database, but have the same schema name?
    "Alter session disable guard" works only for the current session, in fact i want it for all connected users whithout stopping the standby apply ?

    hi,
    Let's say in the primary database i have 10 tables, and using the RMAN i have created a Ph. standby database and then converted to a logical.
    so now i have the same schema and the same tables in these servers.
    the fact of using logical stdby is to be able to make DML transactions.
    so the issue is that from the 10 tables i need 9 tables to be replicated and the last one will not be replicated, so the application connected to the log. stdby will use only this table to update the user record(login date, logout date...bla bla bla).
    the problem is that when the user will connect to the database the application will insert a record like "insert into SCHEMANAME.tablename....."
    the problem is that the schema name is added into the insert statement.
    Thank you in advance

  • Logical standby instantiate table status

    Oracle 10.2.0.4
    Hello All,
    I am instantiating a table in a logical standby, execute dbms_logstdby.instantiate_table ('schema','table','db_link'). The table contains 18 million records and has been running for about 1 hour. Is there any way I can check the status of this instantiation as far as how much data has been processed or time remaining.
    Any help would be greatly appreciated!
    Thank you,
    Dave

    user13129655 wrote:
    Oracle 10.2.0.4
    Hello All,
    I am instantiating a table in a logical standby, execute dbms_logstdby.instantiate_table ('schema','table','db_link'). The table contains 18 million records and has been running for about 1 hour. Is there any way I can check the status of this instantiation as far as how much data has been processed or time remaining.
    Any help would be greatly appreciated!
    Thank you,
    Davesince other session can not see uncommitted data, you can not do so directly.
    query v$sess_io repeatedly to see that I/O is occurring.

  • Issue while Instantiating a table in logical standby

    I am trying to instantiate the tables in my logical standby and i am getting this error
    ORA-39006: internal error
    ORA-06512: at "SYS.DBMS_LOGSTDBY", line 636
    ORA-06512: at line 1
    i used the below command to instantiate the table
    EXECUTE DBMS_LOGSTDBY.INSTANTIATE_TABLE('FLXUSER','JOB_ACTION', 'NGMES_PROD')
    i have also provide all the required privilege i.e LOGSTDBY_ADMINISTRATOR and DBA.still i am getting the error.
    In alertlog i found the Import struck warning as the job is getting struck.
    The value (30) of MAXTRANS parameter ignored.
    kupprdp: master process DM00 started with pid=31, OS id=4648
             to execute - SYS.KUPM$MCP.MAIN('SYS_IMPORT_TABLE_01', 'LH137', 'KUPC$C_1_20131218044529', 'KUPC$S_1_20131218044529', 0);
    Wed Dec 18 04:47:54 2013
    The value (30) of MAXTRANS parameter ignored.
    kupprdp: master process DM00 started with pid=51, OS id=3076
             to execute - SYS.KUPM$MCP.MAIN('SYS_IMPORT_TABLE_01', 'LH137', 'KUPC$C_1_20131218044754', 'KUPC$S_1_20131218044754', 0);
    Wed Dec 18 04:49:41 2013
    The value (30) of MAXTRANS parameter ignored.
    kupprdp: master process DM00 started with pid=52, OS id=4128
             to execute - SYS.KUPM$MCP.MAIN('SYS_IMPORT_TABLE_01', 'FLXUSER', 'KUPC$C_1_20131218044941', 'KUPC$S_1_20131218044941', 0);
    which i think are just warning.
    kindly help me out

    Yes that could very well be the reason. You can try recompiling. If it does not fix, you can reload the whole datapump utility by using following metalink note:
    How To Reload Datapump Utility EXPDP/IMPDP (Doc ID 430221.1)

  • MV Logs not getting purged in a Logical Standby Database

    We are trying to replicate a few tables in a logical standby database to another database. Both the source ( The Logical Standby) and the target database are in Oracle 11g R1.
    The materialized views are refreshed using FAST REFRESH.
    The Materialized View Logs created on the source ( the Logical Standby Database) are not getting purged when the MV in the target database is refreshed.
    We checked the entries in the following Tables: SYS.SNAP$, SYS.SLOG$, SYS.MLOG$
    When a materialized view is created on the target database, a record is not inserted into the SYS.SLOG$ table and it seems like that's why the MV Logs are not getting purged.
    Why are we using a Logical Standby Database instead of the Primary ? Because, the load on the Primary Database is too much and the machine doesn't have enough resources to support MV based replication. The CPU usage is 95% all the time. The appplication owner won't allow us to go against the Primary database.
    Do we have to do anything different in terms of Configuration/Privileges etc. because we are using a Logical Standby Database as a source ?
    Thanks in Advance.

    We have a 11g RAC database in solaris OS where there is huge gap in archive log apply.
    Thread Last Sequence Received Last Sequence Applied Difference
    1 132581 129916 2665
    2 108253 106229 2024
    3 107452 104975 2477
    The MRP0 process seems not to be working also.Almost 7000+ archives lag in standby if compared with primary database.
    i suggest you to go with Incremental rollforward backups to make it SYNC, use this below link for step by step procedure.
    http://www.oracle-ckpt.com/rman-incremental-backups-to-roll-forward-a-physical-standby-database-2/
    Here questions.
    1) Whether those archives are transported & just not applied?
    2) Is in production do you have archives or backup of archives?
    3) What you have found errors in alert log file?
    post
    SQL> select severity,message,error_code,timestamp from v$dataguard_status where dest_id=2;
    4) What errors in primary database alert log file?
    Also post
    select     ds.dest_id id
    ,     ad.status
    ,     ds.database_mode db_mode
    ,     ad.archiver type
    ,     ds.recovery_mode
    ,     ds.protection_mode
    ,     ds.standby_logfile_count "SRLs"
    ,     ds.standby_logfile_active active
    ,     ds.archived_seq#
    from     v$archive_dest_status     ds
    ,     v$archive_dest          ad
    where     ds.dest_id = ad.dest_id
    and     ad.status != 'INACTIVE'
    order by
         ds.dest_id
    /Also check errors from standby database.

  • Materialized View Logs in a logical standby database

    I am trying to create materialized views based on a few tables in a logical standby database.
    The target database (11g R2) where the MVs will be created is a stand-alone database.
    The DB where the base tables reside is a logical standby database (11g R2).
    The requirement is to do a "FAST REFRESH" of the Materialized Views.
    My questions are :
    1. Can I create MV logs in the logical standby DB?
    2. If the answer to question no. 1 is "Yes", do I need to do anything different or configure the logical standby DB in a specific manner in order to create MV logs. From what I understand, the objects in the logical standby database are in a locked state. Is that going to be a problem ?
    Any other information that might be relevant is greatly appreciated.
    Thanks in advance.

    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>

  • Adv Compression & Logical Standby DB (SQL Apply)

    Hi,
    Is use of AC on a primary database supported with the SQL Apply (logical standby) version of Data Guard in release 11.1.0.7 ?
    thanks !
    Curt Lukenbill
    Paychex, Inc

    Dan, Thanks for the replies. The source of my confusion is the 11g Data Guard Documentation --
    In the Appendix, it states --
    C.7 Unsupported Table Storage Types
    Logical standby databases do not support the following table storage types:
    Tables stored with segment compression enabled
    We are going to test it out here, and we'll share the results...
    I'd hate not to be able to use AC on my primary because we have a SQL*Apply standby associated with it....If this is the case (and we can't use AC on the primary), I hope Oracle is addressing it in 11gR2....
    Curt Lukenbill

  • How to apply the changes in logical standby database

    Hi,
    I am new to Dataguard. I am now using 10.2.0.3 and followed the steps from Oracle Data Guard Concepts and Administration Guide to setup a logical standby database.
    When I insert a record to a table from the primary database side, when i query the same table from the logical standby database, it doesn't show the new records.
    Did I miss something? What I want to do is when I insert a record in the primary db, then the corresponding record will be inserted in the standby db.
    Or I totally misunderstand what Oracle data guard is? Any help are appreciated.
    Denis

    Hi
    Can anyone help to answer me is my logical standby db have a archive gap?
    SQL> SELECT APPLIED_SCN, APPLIED_TIME, READ_SCN, READ_TIME, NEWEST_SCN, NEWEST_T
    IME FROM DBA_LOGSTDBY_PROGRESS;
    APPLIED_SCN APPLIED_TIME READ_SCN READ_TIME NEWEST_SCN
    NEWEST_TIME
    851821 29-JUL -08 17:58:29 851822 29-JUL -08 17:58:29 1551238
    08-AUG -08 08:43:29
    SQL> select pid, type, status, high_scn from v$logstdby;
    no rows selected
    SQL> alter database start logical standby apply;
    Database altered.
    SQL> select pid, type, status, high_scn from v$logstdby;
    PID
    TYPE
    STATUS HIGH_SCN
    2472
    COORDINATOR
    ORA-16116: no work available
    3380
    READER
    ORA-16127: stalled waiting for additiona 852063
    l transactions to be applied
    2480
    BUILDER
    ORA-16116: no work available
    2492
    ANALYZER
    ORA-16111: log mining and apply setting
    up
    2496
    APPLIER
    ORA-16116: no work available
    2500
    APPLIER
    ORA-16116: no work available
    3700
    APPLIER
    ORA-16116: no work available
    940
    APPLIER
    ORA-16116: no work available
    2504
    APPLIER
    ORA-16116: no work available
    9 rows selected.
    Thanks a lot.
    Message was edited by:
    Denis Chan

  • Error from Logical Standby

    Dear All,
    I have configured Logical Standby Database 10gR2, on Windows 2003 Server.
    Logs are shipped and applied on the standby, without any issue.
    I can log on logical database using sys account, but if i use any other user's account i get this error message:
    SQL> connect user/pass
    ERROR:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-06550: line 11, column 52:
    PL/SQL: ORA-16224: Database Guard is enabled
    ORA-01017: invalid username/password; logon denied
    ORA-06550: line 11, column 4:
    PL/SQL: SQL Statement ignored
    ORA-06550: line 17, column 28:
    PL/SQL: ORA-16224: Database Guard is enabled
    ORA-01017: invalid username/password; logon denied
    ORA-06550: line 14, column 8:
    PL/SQL: SQL Statement ignored
    ORA-06550: line 20, column 12:
    PLS-00513: PL/SQL function called from SQL must return value of legal SQL type
    ORA-06550: line 12, column 4:
    PL/SQL: Statement ignored
    ORA-01017: invalid username/password; logon denied
    I have copied the password file from live to standby.
    Kindly help

    Hi,
    Did you sure connecting to  standby database correct user and password ?
    Did you  getting following error on connection?
    ERROR:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-06550: line 11, column 52:
    PL/SQL: ORA-16224: Database Guard is enabled
    ORA-01017: invalid username/password; logon denied
    ORA-06550: line 11, column 4:
    PL/SQL: SQL Statement ignored
    ORA-06550: line 17, column 28:
    PL/SQL: ORA-16224: Database Guard is enabled
    ORA-01017: invalid username/password; logon denied
    ORA-06550: line 14, column 8:
    PL/SQL: SQL Statement ignored
    ORA-06550: line 20, column 12:
    PLS-00513: PL/SQL function called from SQL must return value of legal SQL type
    ORA-06550: line 12, column 4:
    PL/SQL: Statement ignored
    ORA-01017: invalid username/password; logon denied
    Paste here your whole script.
    Additionally please check: http://docs.oracle.com/cd/E11882_01/server.112/e25608/manage_ls.htm#SBYDB4811
    10.2 Controlling User Access to Tables in a Logical Standby Database
    Regards
    Mahir M. Quluzade

  • Open Mode for Logical Standby

    HI,
    I have a logical standby. It's v$database.open_mode shows READ WRITE
    Q1. I am correct in assuming that the Database is only writable for tables that are not in the primary ?
    Q2. Are the tables that are also in the primary, in effect in read only mode on the logical standby ? Am I able to see the mode of these tables to prove they are read only ?
    thanks,
    Jim

    Hello;
    User modification to tables on the Logical Standby has three possible settings:
    ALL
    STANDBY
    NONE
    You can check the mode using this query:
    SELECT GUARD_STATUS FROM V$DATABASE;
    If you try to insert data into a table and the mode is 'ALL' and you are not the SYS user you should get an error
    ORA-16224
    If you want users to modify non-replicated standby tables then you need to change the mode from its default of 'ALL'.
    You can use DBA_LOGSTDBY_SKIP to find non-replicated tables ( the ones with skip rules ).
    If you create new objects consider a naming convention that allows you to easily see the write status.
    Best Regards
    mseberg

  • Update table-TVARVC

    Hi,
    Kindly inform how do I manually update table-TVARVC for movement type 901 for example as the variable set in this table requires updation of movement type.
    Since I have not updated any table hence step by step description will help me.

    Hi,
    Just require some confirmation:
    1) In parameter tab, we create the variable and maintain the values. Basically where do we create variable.Is it here we create a variable and insert in parameter tab.
    2) Secondly what value is maintained under "Selection Options " tab.

  • Inserts/Updates on replicated tables Logical Standby Database ??

    Hello all,
    We have a Logical standby database on 10.2.0.5. Can you please suggest if there is a way we can do data inserts/updates on replicated tables ?
    Can this be done by doing a alter database guard none; or alter session disable|enable guard; ?? Even if it completes succesfully , will this have any effect on replication later ?

    Hello all,
    We have a Logical standby database on 10.2.0.5. Can you please suggest if there is a way we can do data inserts/updates on replicated tables ?
    Can this be done by doing a alter database guard none; or alter session disable|enable guard; ?? Even if it completes succesfully , will this have any effect on replication later ?

Maybe you are looking for