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

Similar Messages

  • ERROR OGG-00868 Error code 1291, error message: ORA-01291: missing logfile

    OGG Version 12.1.2.1.0 OGGCORE_12.1.2.1.
    DB : 11.2.0.4.3
    I am getting below error.
    2014-12-31 09:53:09  ERROR   OGG-00868  Error code 1291, error message: ORA-01291: missing logfile
      (Missing Log File <unknown>. Read Position SCN: 2585.802983323 (11103293443483)).
    Our solution uses ADG and OGG
    We have source and target where ADG was setup . We later broke ADG setup and made Oracle DB's in source and target into standalone.
    As part of our solution during our deployment window ,we would break ADG i.e we would make both the source and target as independent DB’s with PRIMARY Read /Write mode.
    -Take Guaranteed restore point on Source DB so that we can flash back at later stage(so of now we have not executed flash back command)
    -Once ADG config is disabled we will start the OGG extract which is already configured before =We are at this stage where we are hit with errors and extract is not starting .

    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

  • ORA-00936: Missing Expression when using a claculation as a condition item

    Hi
    I created a calculation below to create a subtotal on each row of a group of selected items.
    SUM(Invoice Amount)OVER(PARTITION BY Supplier Num ORDER BY Payment Currency Code)
    This worked fine - but then I wanted to create a condition based on this calculation and when I used the calculation as a condition item and reran the report I received the 'ORA-00936: Missing Expression' error. So not too sure why it is fine as a calculation but not as part of a condition.
    We use Discoverer version 4.1
    Am I missing something or is this a bug?
    Any help would be very appreciated
    Thanks
    Marcus

    Thanks for your reply, Rod
    We are using the 9.2.0.5 version of the database
    I am not a SQL expert, by any means, but below is the line that refers to the condition in the sql inspector
    WHERE ( ( E_152 )/2 > 50)
    presuambly that means E_152 is the calculation, I think this may be refering to this at the beginning of the report:
    SELECT DISTINCT E316344 as E316344,E316372 as E316372,E316411 as E316411,E316425 as E316425,E316496 as E316496,E316497 as E316497,E316498 as E316498,E316510 as E316510,E316511 as E316511,E316512 as E316512,E316515 as E316515,E316517 as E316517,E316519 as E316519,E316520 as E316520,E_24 as E_24,E_21 as E_21,E_18 as E_18,E_16 as E_16,E_13 as E_13,E_11 as E_11,E316501 as E316501 FROM ( SELECT E_152 as E_152,DISTINCT E316344 as E316344,E316372 as E316372,E316411 as E316411,E316425 as E316425,E316496 as E316496,E316497 as E316497,E316498 as E316498,E316510 as E316510,E316511 as E316511,E316512 as E316512,E316515 as E316515,E316517 as E316517,E316519 as E316519,E316520 as E316520,E_24 as E_24,E_21 as E_21,E_18 as E_18,E_16 as E_16,E_13 as E_13,E_11 as E_11,E316501 as E316501 FROM ( SELECT DISTINCT i316344 as E316344,i316372 as E316372,i316411 as E316411,i316425 as E316425,i316496 as E316496,i316497 as E316497,i316498 as E316498,i316510 as E316510,i316511 as E316511,i316512 as E316512,i316515 as E316515,i316517 as E316517,i316519 as E316519,i316520 as E316520,SUM(i316501) OVER(PARTITION BY i316345 ORDER BY i316520 )/2 as E_24,( i316501-( NVL(i316502,0) ) )*( NVL(i316522,1) ) as E_21,i316501-( NVL(i316502,0) ) as E_18,NVL(i316502,0) as E_16,i316501*( NVL(i316522,1) ) as E_13,NVL(i316522,1) as E_11,i316501 as E316501,SUM(i316501) OVER(PARTITION BY i316345 ORDER BY i316520 ) as E_152
    Apologies if this info is not that helpful
    Would it have anything to do with the fact that the row calculation is based on several rows (i.e. a subtotal) and if a single row is excluded it would change the value of the other rows within that subtotal group. Maybe it causes some sort of circular issue?
    Anyway, thanks again for your help - hopefully we can resolve it
    Marcus

  • ORA-00917: missing comma when using NVL

    Hi All,
    I have a INSERT statement which works fine and looks something like:
    EXECUTE IMMEDIATE
    'insert into MYTABLE(ID,TASK_ROLE, PROGRESS,SALES_PERSON) values ...
    However if I change the above piece to use NVL function like this:
    EXECUTE IMMEDIATE
    'insert into MYTABLE(ID,TASK_ROLE, NVL(PROGRESS,''0''),SALES_PERSON) values ...
    I am getting the following error:
    ORA-00917: missing comma
    Where should I enter the extra comman needed?
    Regards,
    Pawel.

    Hi these are in fact two simple quotes '. If I use only one simple quote I get an error:
    1 error has occurred
    ORA-06550: line 48, column 239: PLS-00103: Encountered the symbol "0" when expecting one of the following: * & = - + ; < / > at in is mod remainder not rem return returning <> or != or ~= >= <= <> and or like LIKE2_ LIKE4_ LIKEC_ between into using || multiset bulk member SUBMULTISET_ The symbol "* was inserted before "0" to continue.
    Same thing happens if I ommit the quotes at all and leave it like NVL(PROGRESS,0)
    Edited by: padmocho on Sep 20, 2010 11:37 AM

  • Missing logfiles when hot backup is taken using RMAN

    Hello All,
    I am having the below situation .Please help to clarify.
    I have taken hot backup using RMAN. Database is in Archivelog mode. It doesn't take backup of online redo logs. The status of my redo logs are as below. All are not archived.
    /u01/app/oracle/oradata/redo01.log ----Active---Not Archived
    /u01/app/oracle/oradata/redo03.log ----Active---Not Archived
    /u01/app/oracle/oradata/redo03.log----Current---Not Archived
    Now, I am using the backup to restore a database on another machine. But as the logs are not archived, I may miss some data.
    How can I get the data also?
    Regards
    VJ..

    I have taken hot backup using RMAN. Database is in Archivelog mode. It doesn't take backup of online redo logs. The status of my redo logs are as below. All are not archived.
    /u01/app/oracle/oradata/redo01.log ----Active---Not Archived
    /u01/app/oracle/oradata/redo03.log ----Active---Not Archived
    /u01/app/oracle/oradata/redo03.log----Current---Not Archived
    Now, I am using the backup to restore a database on another machine. But as the logs are not archived, I may miss some data.
    How can I get the data also?If the redo log status is still "ACTIVE" that mean, still archiving is in progress,
    You can give even
    SQL> alter system checkpoint;and do you have any idea at what point you want to recover your database? Even though they are in ACTIVE stauts, when you are taking backup. Still you can apply them how much you want. There will be no lost data. But ensure you haven't opened[resetologs] database.

  • I´m getting these error ORA-00936:missing expression runnig a Task on Info

    I´m getting these error ORA-00936: missing expression, when running the SDE_ORA_Reverse_GLJournals task.
    I´m setting the variables $$FILTER_BY_LEDGER_ID, $$FILTER_BY_LEDGER_TYPE, $$LEDGER_ID_LIST and $$LEDGER_TYPE_LIST in the DAC correctly. I see the values asigned to those variables in the parameters file( SDE_ORA_Reverse_GLJournals.txt)
    But when the task is executing, those values comes empty. Does someone have encountered with the same mistake?
    Thanks in advanced.

    Hi,
    Im finding a similar issue but with task SDE_ORA_GLJournals,
    the code is :
    AND DECODE(, 'Y', GL.LEDGER_ID, 1) IN ()
    AND DECODE(, 'Y', GL.LEDGER_CATEGORY_CODE, 'NONE') IN ()]
    the parameters are also fine in the parameters file.
    Has anyone found a solution or an explanation for this?
    Thanks a lot, regards
    Nestor

  • 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;

  • How to convert a Logical Standby DB to a Primary

    Hi,
    I have an issue with our Data Guarded cluster (two nodes, one Primary and one Logical Standby Oracle 10i DBs running on HP-UX 11.23)
    The issue is that for some reasons the Primary and the Standby are out of sync in terms of archive log sequences.
    For instance the primary shows:
    Date: Feb-27-2009 14:02:33
    ID DESTINATION STATUS ARCHIVED_THREAD# ARCHIVED_SEQ#
    1 /db05/oradata/NSMS/archive/ VALID 1 864
    2 stdby VALID 1 10
    3 /db05/oradata/NSMS/archive/DR/ VALID 1 11
    11 /db05/oradata/NSMS/archive/DR/ VALID 1 864
    Report on Redo Log Gaps between Primary and Standby.
    Date : Feb-27-2009 14:02:33
    LAST_SEQ_RECD LAST_SEQ_SENT
    863 864
    But the STANDBY shows in the alert log:
    LOGMINER: Begin mining logfile: /db05/oradata/NSMS/archive/DR/arch673877647_1_304.log
    Fri Feb 27 12:51:36 2009
    LOGMINER: End mining logfile: /db05/oradata/NSMS/archive/DR/arch673877647_1_304.log
    Fri Feb 27 12:51:36 2009
    LOGMINER: Begin mining logfile: /db05/oradata/NSMS/archive/DR/arch673877647_1_305.log
    Fri Feb 27 12:51:39 2009
    LOGMINER: End mining logfile: /db05/oradata/NSMS/archive/DR/arch673877647_1_305.log
    since the DBA_LOGSTDBY_LOG contains on the STANDBY:
    $ is_db_apply_current.sh
    1 300 595040838 595042886 YES
    1 301 595042886 595042919 YES
    1 302 595042919 595096418 CURRENT
    1 303 595096418 595127201 CURRENT
    1 304 595127201 595159342 CURRENT
    1 305 595159342 595207457 CURRENT
    At this point I don't know how to cleanup the situation on the Standby.
    I tried to resync completely form primary copying all datafiles and archives but still cannot reset the archive sequence on the STANDBY, so that it keeps looking for the wrong archives.
    Thanks in advance !
    Mike

    Hi
    Problem seems different then post heading."How to convert a logical standby to primary" stepts are follow.
    On primary site.
    1.On primary site "alter database prepare to switchover to logical standby".
    2.On standby site "alter database prepare to switchover to parimary;
    3.Check "select switchover_status from v$database to both sites.
    4.At primary site When status becomes to_standby then "alter database commit to switchover to logical stanedby".
    5.At stndby site "alter database commit to switchover to parimary".
    6.After successfully switchover at new logical standby site "alter database stard logical standby apply".
    For you problem ,Can you paste following from standby site.
    1.select applied_sequence#,last_sequence# V$logstdby_progress.
    2.select * from V$logstdby_stats
    3.select * from v$archived_log
    Also from primary site,
    1.select * from v$log.
    hope this will help U.
    Tinku
    Edited by: Tinku on Feb 27, 2009 8:39 PM

  • Logical Standby Database Not Getting Sync With Primary Database

    Hi All,
    I am using a Primary DB and Logical Standby DB configuration in Oracle 10g:-
    Version Name:-
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    PL/SQL Release 10.2.0.5.0 - Production
    CORE 10.2.0.5.0 Production
    TNS for Solaris: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - Production
    We have build the logical standby last week and till date the Logical DB is not sync. I have checked the init parameters and I wont see any problems with it. Also archive log destinations are also fine enough.
    We have a important table named "HPD_HELPDESK" where record count is growing gradually whereas in logical standby it's not growing. There are some 19K record difference in the both the tables.
    I have checked the alert log but it is also not giving any error message. Please find the last few lines of the alert log in logical Database:-
    RFS LogMiner: Registered logfile [oradata_san1/oradata/remedy/arch/ars1_1703_790996778.arc] to LogMiner session id [1]
    Tue Aug 28 14:56:52 GMT 2012
    RFS[2853]: Successfully opened standby log 5: '/oracle_data/oradata/remedy/stbyredo01.log'
    Tue Aug 28 14:56:58 GMT 2012
    RFS LogMiner: Client enabled and ready for notification
    Tue Aug 28 14:57:00 GMT 2012
    RFS LogMiner: Registered logfile [oradata_san1/oradata/remedy/arch/ars1_1704_790996778.arc] to LogMiner session id [1]
    Tue Aug 28 15:06:40 GMT 2012
    RFS[2854]: Successfully opened standby log 5: '/oracle_data/oradata/remedy/stbyredo01.log'
    Tue Aug 28 15:06:47 GMT 2012
    RFS LogMiner: Client enabled and ready for notification
    Tue Aug 28 15:06:49 GMT 2012
    RFS LogMiner: Registered logfile [oradata_san1/oradata/remedy/arch/ars1_1705_790996778.arc] to LogMiner session id [1]
    I am not able to trace the issue that why the records are not growing in logical DB. Please provide your inputs.
    Regards,
    Arijit

    How do you know that there's such a gap between the tables?
    If your standby db is a physical standby, then it is not open and you can't query your table without cancelling the recovery of the managed standby database.
    What does it say if you execute this sql?
    SELECT PROCESS, STATUS, THREAD#, SEQUENCE#, BLOCK#, BLOCKS FROM V$MANAGED_STANDBY;The ARCH processes should be connected and MRP waiting for a file.
    If you query for the archive_gaps, do you get any hits?
    select * from gv$archive_gapIf you're not working in a RAC environment you need to query v$archive_gap, instead!
    Did you check whether the archives generated from the primary instance are transferred and present in the file system of your standby database?
    I believe your standby is not in recovery_mode anymore or has an archive_gap, which is the reason why it doesn't catch up anymore.
    Hope it helps a little,
    Regards,
    Sebastian
    PS: I'm working on 11g, so unfortunately I'm not quite sure if the views are exist in 10gR2. It's worth a try though!
    Edited by: skahlert on 31.08.2012 13:46

  • IR Report Search - ORA-20001: get_dbms_sql_cursor error ORA-00936: missing expression

    Hi All,
      I had created a IR report based on a table and it was working with no issues.  But after few days, when I try searching using the IR search bar it shows "ORA-20001: get_dbms_sql_cursor error ORA-00936: missing expression" error message. I don't see any debug messages or errors in the debug window. The Finder drop down is empty too, there are no columns displayed to filter.
    When I recreate the IR report(new page) based on the same table, It works fine and there are no issues with the search.  But the old IR report search doesnt work. I have not modified the any thing in the old report after initial creation. Report uses Primary key based on a sequence.
    What might have caused this issue?
    Is there a way to intercept the search query from IR report?
    Apex version - 4.2.3.00.08.
    Any help on this appreciated.
    Thanks,
    Jagan

    Hi MK, as I had mentioned in my post, I don't see any logs in the debug window, query tab.
    Can you please guide me how to check the query logs on search?
    Thanks,
    Jagan

  • Impdp triggers always give error ORA-04071:missing BEFORE, AFTER or INSTEAD

    Hello,
    I am using 11g impdp to create a test system.
    I use this cmd to import
    impdp 'SYS/xxxxx@PWRFUN AS SYSDBA' dumpfile=PWRPROD.DMP logfile=PWRFUNimportPROD.log SCHEMAS=pwrplant TABLE_EXISTS_ACTION=REPLACE
    Then I get this error for all the triggers
    ORA-39083: Object type TRIGGER failed to create with error:
    ORA-04071: missing BEFORE, AFTER or INSTEAD OF keyword
    Failing sql is:
    CREATE TRIGGER "PWRPLANT"."APPROVAL_STEPS_HISTORY" PS_HISTORY
    BEFORE UPDATE OR INSERT ON PWRPLANT.APPROVAL_STEPS_HISTORY
    FOR EACH ROW
    BEGIN    :new.user_id := USER;    :new.time_stamp := SYSDATE; END;
    As you can see, the trigger does contain the word "before".
    When I remove " "PWRPLANT"."APPROVAL_STEPS_HISTORY" " and run the trigger below, it compiles correctly. Why is this, and how do I make my impdp to run correctly?
    CREATE TRIGGER PS_HISTORY
    BEFORE UPDATE OR INSERT ON PWRPLANT.APPROVAL_STEPS_HISTORY
    FOR EACH ROW
    BEGIN    :new.user_id := USER;    :new.time_stamp := SYSDATE; END;

    same error, thanks for your attemp
    Error starting at line 1 in command:
    CREATE TRIGGER "PWRPLANT"."APPROVAL_STEPS_HISTORY" PS_HISTORY
    BEFORE UPDATE OR INSERT ON PWRPLANT.APPROVAL_STEPS_HISTORY
    REFERENCING new AS new
    FOR EACH ROW
    BEGIN :new.user_id := USER; :new.time_stamp := SYSDATE; END;
    Error report:
    ORA-04071: missing BEFORE, AFTER or INSTEAD OF keyword
    04071. 00000 - "missing BEFORE, AFTER or INSTEAD OF keyword"
    *Cause:    The trigger statement is missing the BEFORE/AFTER/INSTEAD OF clause.
    *Action:   Specify either BEFORE, AFTER or INSTEAD OF.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • ORA-00922: missing or invalid option

    I am using oracle 10g datbase.
    and trying to create a list of tables of 300 tables - a sampel is given below
    CREATE TABLE "SCHM1"."HOLIDAYS"
    ( "DATE" DATE NOT NULL ENABLE,
    "DESCR" VARCHAR2(40),
    "EXTRA_HOURS" NUMBER(2,0),
    "HOLIDAY_GROUP" VARCHAR2(5) NOT NULL ENABLE,
    "CREATED_BY" VARCHAR2(12),
    "CREATED_ON" DATE,
    "AMENDED_BY" VARCHAR2(12),
    "AMENDED_ON" DATE,
    CONSTRAINT "BANK_HOLIDAYSP1" PRIMARY KEY ("DATE", "HOLIDAY_GROUP")
    USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
    STORAGE(INITIAL 32768 NEXT 32768 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "SCHM1_REF_INDEXES1" ENABLE
    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 32768 NEXT 32768 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "SCHM1_REF_DATA1"
    CREATE TABLE "SCHM1"."LODGEMENT"
    ( "BANK_LODGEMENT" NUMBER(10,0) NOT NULL ENABLE,
    "LODGEMENT_SLIP" NUMBER(12,0),
    "BRANCH" NUMBER(4,0),
    "EMPLOYEE" VARCHAR2(12),
    "LODGEMENT_DATIM" DATE,
    "SYS_DATIM" DATE,
    "TILL_DAT" DATE,
    "POSTED_FLG" VARCHAR2(1),
    "EMERGENCY_FLG" VARCHAR2(1),
    "CREATED_BY" VARCHAR2(12),
    "CREATED_ON" DATE,
    "AMENDED_BY" VARCHAR2(12),
    "AMENDED_ON" DATE,
    "LODGEMENT_GRP" NUMBER,
    CONSTRAINT "BANK_LODGEMENTP1" PRIMARY KEY ("BANK_LODGEMENT")
    USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
    STORAGE(INITIAL 32768 NEXT 32768 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "SCHM1_INDEXES10" ENABLE
    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 32768 NEXT 32768 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "SCHM1_DATA10"
    when I executed this in sql window i get the error:
    ORA-00922: missing or invalid option
    when I run it from command prompt ,
    i get error like
    SP2-0734: unknown command beginning "USING INDE..." - rest of line ignored.
    SP2-0734: unknown command beginning "STORAGE(IN..." - rest of line ignored.
    SP2-0734: unknown command beginning "PCTINCREAS..." - rest of line ignored.
    SP2-0734: unknown command beginning "TABLESPACE..." - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    and it doesn't create the table. CAn someone let em know how I to create log of errors on execution so taht the session can be resumed and also
    help me in finding the error in this.
    Cheers
    Edited by: user1000979 on 02-Sep-2009 06:50

    Hi!
    there is just missing a sql terminator between the statements ...
    it is not a internal sql language ...
    i have no problems when execute it in sql*plus.
    tested with oracle 8i and XE
    CREATE TABLE "SCHM1"."HOLIDAYS"
    ( "DATE" DATE NOT NULL ENABLE,
    "DESCR" VARCHAR2(40),
    "EXTRA_HOURS" NUMBER(2,0),
    "HOLIDAY_GROUP" VARCHAR2(5) NOT NULL ENABLE,
    "CREATED_BY" VARCHAR2(12),
    "CREATED_ON" DATE,
    "AMENDED_BY" VARCHAR2(12),
    "AMENDED_ON" DATE,
    CONSTRAINT "BANK_HOLIDAYSP1" PRIMARY KEY ("DATE", "HOLIDAY_GROUP")
    USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
    STORAGE(INITIAL 32768 NEXT 32768 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "SCHM1_REF_INDEXES1" ENABLE
    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 32768 NEXT 32768 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "SCHM1_REF_DATA1"
    CREATE TABLE "SCHM1"."LODGEMENT"
    ( "BANK_LODGEMENT" NUMBER(10,0) NOT NULL ENABLE,
    "LODGEMENT_SLIP" NUMBER(12,0),
    "BRANCH" NUMBER(4,0),
    "EMPLOYEE" VARCHAR2(12),
    "LODGEMENT_DATIM" DATE,
    "SYS_DATIM" DATE,
    "TILL_DAT" DATE,
    "POSTED_FLG" VARCHAR2(1),
    "EMERGENCY_FLG" VARCHAR2(1),
    "CREATED_BY" VARCHAR2(12),
    "CREATED_ON" DATE,
    "AMENDED_BY" VARCHAR2(12),
    "AMENDED_ON" DATE,
    "LODGEMENT_GRP" NUMBER,
    CONSTRAINT "BANK_LODGEMENTP1" PRIMARY KEY ("BANK_LODGEMENT")
    USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
    STORAGE(INITIAL 32768 NEXT 32768 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "SCHM1_INDEXES10" ENABLE
    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 32768 NEXT 32768 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "SCHM1_DATA10"
    /Regards

  • ORA-00922: missing or invalid option in create seq, trigger

    Hi All,
    I am trying to create a table, sequence, and trigger with the following SQL and am getting the error:
    ORA-00922: missing or invalid option
    CREATE TABLE "DATA_INVENTORY"
    (     "ID" INTEGER NOT NULL ENABLE,
         "COE_CONTRACT_NUM" VARCHAR2(30),
         "PROJ_AREA" VARCHAR2(30),
         "STATE" VARCHAR2(30),
         "DATA_DATE" VARCHAR2(30) NOT NULL ENABLE,
         "NUM_OF_MEDIA" NUMBER,
         "DATA_TYPE" VARCHAR2(30)NOT NULL ENABLE,
         "MEDIA_TYPE" VARCHAR2(30)NOT NULL ENABLE,
         "EXTERNAL_DRIVE_DESCR" VARCHAR2(200),
         "ROOM_NUM" VARCHAR2(10)NOT NULL ENABLE,
         "DRAWER_NUM" VARCHAR2(30),
         "PROJ_CODE" VARCHAR2(30),
         "COMPANY" VARCHAR2(30),
         "DESCRIPTION" VARCHAR2(200),
         "NOTES" VARCHAR2(500),
         "INDEX" VARCHAR2(30),
         "INDEX_LINK" VARCHAR2(75),
         "DATA_LINK" VARCHAR2(75),
         "METADATA" VARCHAR2(75),
         "METADATA_LINK" VARCHAR2(75),
         "DISTRIBUTE" VARCHAR2(30)NOT NULL ENABLE,
         "CORPORATE" VARCHAR2(1)NOT NULL ENABLE,
         CONSTRAINT "DATA_INVENTORY_PK" PRIMARY KEY ("ID") ENABLE,
         CONSTRAINT "DATA_INVENTORY_UK1" UNIQUE ("COE_CONTRACT_NUM", "PROJ_AREA") ENABLE
    CREATE SEQUENCE "DATA_INVENTORY_SEQ" MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 324 CACHE 20 NOORDER NOCYCLE
    CREATE OR REPLACE TRIGGER "BI_DATA_INVENTORY"
    before insert on "DATA_INVENTORY"
    for each row
    begin
    select "DATA_INVENTORY_SEQ".nextval into :NEW.ID from dual;
    end;
    ALTER TRIGGER "BI_DATA_INVENTORY" ENABLE
    Does anyone see anything wrong with this?
    The create table part is alright but when I add the create sequence etc it causes the error
    Thanks,
    Kirk

    Hello Kirk,
    Your code work likes a charm. Check your privileges for creating sequences and triggers.
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    http://www.bloggingaboutoracle.org/
    http://www.logica.com/

  • ORA-01506: missing or illegal database name

    Hi Gurus/Experts,
    I am implementing  dataguard for digaster consideration for my primary database mydb. I have changed some initilization parameter for this implementation and while doing this when I changed a paraneter like below:
    SQL> alter system set db_file_name_convert="'/u01/app/oracle/oradata/mydb_un', '/u01/app/oracle/oradata/orcl_un'" scope=spfile;
    System altered.
    Because this parameter is static so I have restart my database with startup force option. But I am getting belwo error.:
    SQL> startup force
    ORA-01506: missing or illegal database name
    Below is my entries in $ORACLE_HOME/dbs location :
    hc_mydb.dat  initmydb.ora  init.ora  lkMYDB  lkMYDB_UN  orapwmydb  spfilemydb.ora
    And below is my current pfile entry:
    [oracle@localhost dbs]$ more initmydb.ora
    mydb.__db_cache_size=67108864
    mydb.__java_pool_size=4194304
    mydb.__large_pool_size=4194304
    mydb.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
    mydb.__pga_aggregate_target=171966464
    mydb.__sga_target=243269632
    mydb.__shared_io_pool_size=0
    mydb.__shared_pool_size=155189248
    mydb.__streams_pool_size=4194304
    *.audit_file_dest='/u01/app/oracle/admin/mydb/adump'
    *.audit_trail='db'
    *.compatible='11.2.0.0.0'
    *.control_files='/u01/app/oracle/oradata/mydb/control01.ctl','/u01/app/oracle/flash_recovery_area/mydb/control02.ctl'
    *.db_block_size=8192
    *.db_domain=''
    *.db_name='mydb'
    *.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
    *.db_recovery_file_dest_size=4294967296
    *.db_unique_name='mydb_un'
    *.diagnostic_dest='/u01/app/oracle'
    *.dispatchers='(PROTOCOL=TCP) (SERVICE=mydbXDB)'
    *.log_archive_config='DG_CONFIG=(mydb_un,orcl_un)'
    *.log_archive_dest_1='LOCATION=USE_DB_RECOVERY_FILE_DEST REOPEN=8 MAX_FAILURE=4'
    *.log_archive_dest_2='SERVICE=orcl delay=10 db_unique_name=orcl_un'
    *.memory_target=413138944
    *.open_cursors=300
    *.processes=150
    *.remote_login_passwordfile='EXCLUSIVE'
    *.undo_tablespace='UNDOTBS1'
    Please help me to get it relsove and let me know what wrong I did.
    Regards,
    Michel

    Hi Mseberg,
    As of now I do not have standby INIT file and one which INIT file which I am showing here that's for my primary database i.e mydb. I would like to let you know I am planning to implement dataguard where mydb would be my primary database ad orcl would be my stabd by database. Before creating standby database I am preparing all initilization parameter in my primary database.
    I have started my database with SYSDBA but still getting the same error. Please check below:
    [oracle@localhost ~]$ . oraenv
    ORACLE_SID = [oracle] ? mydb
    The Oracle base for ORACLE_HOME=/u01/home/oracle/product/11.2.0/db_1 is /u01/app/oracle
    [oracle@localhost ~]$ sqlplus / as sysdba
    SQL*Plus: Release 11.2.0.1.0 Production on Sun Jan 5 00:15:12 2014
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    Connected to an idle instance.
    SQL> startup
    ORA-01506: missing or illegal database name
    Regards,
    Michel

  • ORA-02000: missing UNUSED keyword

    Hi,
    I have a table tab_xyz
      CREATE TABLE tab_xyz(
        col1 number,
        col2 varchar2(10)
      ORGANIZATION EXTERNAL
        TYPE ORACLE_LOADER DEFAULT DIRECTORY "MF_DIR" ACCESS PARAMETERS ( records
        delimited BY newline badfile MF_DIR:'xyz.csv.bad' logfile MF_DIR:'
        xyz.csv.log' discardfile MF_DIR:'xyz.csv.dsc' fields terminated BY
        ',' ) LOCATION ( 'xyz.csv' )
      I'm trying to add reject limit to 100 but getting the below error:
      ALTER TABLE tab_xyz SET REJECT_LIMIT 100;
      Error starting at line 8 in command:
      ALTER TABLE tab_xyz SET REJECT_LIMIT 100
      Error report:
      SQL Error: ORA-02000: missing UNUSED keyword
      02000. 00000 -  "missing %s keyword"
      I tried to add the UNUSED keyword.. but error again
      ALTER TABLE tab_xyz  SET UNUSED REJECT_LIMIT 100;
      Error starting at line 8 in command:
      ALTER TABLE tab_xyz UNUSED SET REJECT_LIMIT 100
      Error report:
      SQL Error: ORA-01735: invalid ALTER TABLE option
      01735. 00000 -  "invalid ALTER TABLE option"
      *Cause:   
      *Action:
      I have 2 questions:
    1. how can I set the reject limit?
    2. where can I set when(01) = '"' in the create table
    Thanks.

    Can someone please look into the below issue:
    I tried to add the load when in my create table script..
      create table tab_xyz
        col1 varchar2(10),
        col2 varchar2(10)
      ORGANIZATION EXTERNAL
        TYPE ORACLE_LOADER DEFAULT DIRECTORY "MF_DIR" ACCESS PARAMETERS (
        records delimited BY newline
        load when (01) = '"'
        badfile mf_dir:'xyz.csv.bad'
        logfile mf_dir:'xzy.csv.log'
        discardfile mf_dir:'xyz.csv.dsc'
        fields terminated BY ',' optionally enclosed BY '"' MISSING FIELD VALUES ARE NULL 
        (col1, col2)
        LOCATION ('xyz.csv' )) 
      REJECT LIMIT 100;  but got the below error:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-00554: error encountered while parsing access parameters
    KUP-01005: syntax error: found ")": expecting one of: "colon"
    KUP-01007: at line 2 column 19
    29913. 00000 -  "error in executing %s callout"
    *Cause:    The execution of the specified callout caused an error.
    *Action:   Examine the error messages take appropriate action.Thanks.

Maybe you are looking for

  • Airport Admin Utility can no longer access Airport Extreme, what now?

    I have an Airport Extreme that worked fine for a long time with a specific IP. They sold out and the new company came in and installed new equipment. The settings had to change on the Airport. After that, I lost my ability to print through the Airpor

  • Can i install windows 8.1 on msi ms 7058 combo 915p?

    hello i have a msi ms 7058 msi 915p combo and my cpu is intel pentium 4  perscot 3ghz 1 mb socket 775  .i have already used this cpu with windows 8.1 whitout any problem with other old mainborad(gigabyte AGP DDR1).but i cant install with this mainbor

  • Tracking source system table name for a field in ODS

    Hi Guys, I know this is pretty simple for many of you, Being a newbie, pls clarify for me : Consider field1 in ODS1. I want to know the database table which is updating that field. From transfer rules i can see which is the source system filed name b

  • Getting passwords from Keychain into Dreamweaver

    Hello, I had a trial version of Dreamweaver CS4 on my Mac, and when I unsinstaled it I had some problems with CS3, so uninstalled that but reinstalled it. Now all the account infor for all my sites are gone from CS3. I still see them in the Keychain

  • Using Oracle Analytical Workspace With Excel

    Hi i have created an analytical workspace on Oracle Analytical Workspace, Now suppose i want to access this workspace from Excel , is this possible ?? If so How