Snapshot refresh interval

Hi,
I would like to know how to create a snapshot refresh group that would refresh the snapshot daily between 0800 hrs to 1700 hrs.
Appreciate any inputs.
Thanks & Kind Regards,
Zaid

Standard disclaimer-- 8.0.5 has been desupported for many years, you really ought to upgrade. Most of the folks on this and other forums haven't seen an 8.0.5 system in quite some time, so there may be version-specific caveats that we've long forgotten.
When a job fails, the error should be written to the alert log.
When a job fails, it will be rescheduled with an increasing delay (1 sec, 2 sec, 4 sec, 8 sec, ...) for 16 times. If it fails 16 times in a row, the job is marked as broken.
You can use the DBMS_JOB.BROKEN method to indicate that a job is no longer broken. You generally want to fix the underlying problem first, though.
Justin

Similar Messages

  • Snapshot Refresh taking More Time

    Dear All,
    We are facing a Snapshot refresh problem currently in Production Environment.
    Oracle Version : Oracle8i Enterprise Edition Release 8.1.6.1.0
    Currently we have created a Snapshot on a Join with 2 remote tables using Synonyms.
    ex:
    CREATE SNAPSHOT XYZ REFRESH COMPLETE WITH ROWID
    AS
    SELECT a.* FROM SYN1 a, SYN2 b
    Where b.ACCT_NO=a.ACCT_NO;
    We have created a Index on the above Snapshot XYZ.
    Create index XYZ_IDX1 on XYZ (ACCT_NO);
    a. The Explain plan of the above query shows the Index Scan on SYN1.
    If we query above Select Statement,it hardly takes 2 seconds to exedute.
    b. But the Complete Refresh of Snapshot XYZ is almost taking 20 Mins for just truncating and inserting 500 records and is generating huge Disk Reads as SYN1 in remote table consists of 32 Million records whereas SYN2 contains only 500 Records.
    If we truncate and insert inot a table as performed by the Complete refresh of Snapshot,it hardly takes 4 Seconds to refresh the table.
    Please let me know what might be the possible reasons for the Complete refresh of Snapshot taking more time.

    Dear All,
    While refreshing the Snapshot XYZ,I could find the following.
    a. Sort/Merge operation was performed while inserting the data into Snapshot.
    INSERT /*+ APPEND */ INTO "XYZ"
    SELECT a.* FROM SYN1 a, SYN2 b Where b.ACCT_NO=a.ACCT_NO;
    The above operation performed huge disk reads.
    b. By Changing the session parameter sort_area_size ,the time decreased by 50% but still the disk reads are huge.
    I would like to know why Sort/Merge Operation is performed in the above Insert?
    Edited by: Prashanth Deshmukh on Mar 13, 2009 10:54 AM
    Edited by: Prashanth Deshmukh on Mar 13, 2009 10:55 AM

  • How to track Snapshot refresh error

    Hi
    I have a procedure which is doing the below transaction one after one:
    1- Refresh snapshot Snap1
    2- track snapshot refresh status If Ok do step 3 if not exit
    2- Insert agregate data from snapshot Snap1 to table
    3- Track insertion status if Ok proceed on next steps if not exit
    3- commit
    To refresh the snapshot here is the syntaxe i want to use.
    DBMS_SNAPSHOT.refresh('Snap1','F');
    If refresh ok then
    insert into T1 select ..... from Snap1;
    commit;
    end if;
    Thank you.

    I try to show/hide a div depending on the occurence of errors. I resolved this problem by doing this in javascript.
    function showEdu(){
    $("#edu").animate({ height: 'show', opacity: 'show' }, 'slow');
    $s('P6_EDU_SHOWN','Y');
    function hideEdu(){
    $("#edu").animate({ height: 'hide', opacity: 'hide' }, 'slow');
    $s('P6_EDU_SHOWN','N');
    function checkEduError(){
    if($("span").hasClass("errTxt") == true)
    {showEdu();}
    else
    if($v('P6_EDU_SHOWN') == 'Y')
    {showEdu();}
    else
    {hideEdu();}
    }

  • Snapshot Refresh

    Hi.,
    I am facing following error on during the snapshot refresh at 8i
    ORA-04052: error occurred when looking up remote object [email protected]
    ORA-00604: error occurred at recursive SQL level 2
    ORA-02085: database link RT.PRDU connects to RT
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 617
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 674
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 654
    ORA-06512: at line 1
    Provide me the suitable solution.
    Thanks in advance.

    Try to solve the following error :
    ORA-02085 database link string connects to string
    Cause: The database link attempted to connect to a database with a different name. The name of the database link must be the same name as the name of the database.
    Action: Create a database link with the same name as the database to which it connects.
    What's the name of the dblink ?
    Nicolas.
    Message was edited by:
    N. Gasparotto

  • ORA-12008: error in snapshot refresh path

    I am getting this error even i am specifying to use other rollback segment
    ALTER ROLLBACK SEGMENT R02 SHRINK;
    SET TRANSACTION USE ROLLBACK SEGMENT R02;
    alter materialized view PAY_REV_BREAKUPWITHWOFF NOLOGGING;
    BEGIN dbms_mview.refresh('PAY_REV_BREAKUPWITHWOFF') ; END;
    ERROR at line 1:
    ORA-12008: error in snapshot refresh path
    ORA-01562: failed to extend rollback segment number 1
    ORA-01628: max # extents (505) reached for rollback segment SYS_RBS
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 617
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 674
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 654
    ORA-06512: at line 1

    The reason why it's still using SYS_RBS seems to be that since you are refreshing a materialized view, it might be doing parallel DMLs. In this case the clause of specifying a particular rollback segment is ignored.
    In addition to the above, try taking the rollback segment offline by executing
    alter rollback segment SYS_RBS offline;
    and then drop it by running
    drop rollback segment SYS_RBS;
    Then create new one and see if it works.
    if the above mentioned doesn't work somehow...
    try to change the extents storage parameter by running
    alter rollback segment sys_rbs storage (MAXEXTENTS 1000);
    Can't be sure as i currently don't have access to my system
    Hope this helps
    Message was edited by:
    thrilller

  • UNDO SPACE DURING SNAPSHOT REFRESH

    Hi All,
    I am seeing a weird issue with mu undo space in oracle 10g 10.2.0.3.
    Problem is ....
    I am doing a complete snapshot refresh from a remote database to source database. When I do this the snapshot refresh is consuming my all undo, I can see this by executing
    select distinct segment_name,sum(bytes)/1024/1024/1024 from dba_segments where tablespace_name='UNDO_TBS' group by segment_name;
    SEGMENT_NAME SUM(BYTES)
    _SYSSMU16$                    39.931324
    My total undo space is 40GB
    Why the snapshot refresh is consuming all the undo. Any idea? Appreciate your help.

    Hi,
    You can use the undocumented parameter "_mav_refresh_consistent_read" - refresh materialized views using consistent read snapshot (it will reduced the undo log issues).
    The Basic problem is "ATOMIC_REFRESH" is true or enable. try to make it false and check
    ATOMIC_REFRESH=>false
    Example :- execute DBMS_MVIEW.REFRESH(''view_name,'C’,ATOMIC_REFRESH=>false);
    - Pavan Kumar N

  • Snapshot Refresh (How to stop COMPLETE refresh and run FAST refresh)?

    Hi,
    I have a snapshot refresh executed as COMPLETE which is taking very long. When I try to kill this and try to run a FAST I get:
    ERROR at line 1:
    ORA-12057: materialized view "PORTALSNP1"."V21_BILLING_ACCOUNT" is INVALID an must complete refresh
    How can I resolve this to stop the COMPLETE refresh altogether and be able to run the FAST refresh.
    Also is there a way to get the time it will take to complete the running snapshot refresh?
    Please and thankYou!
    Regards,
    A

    You don't resolve it ... you drop the materialized view. Then you create a materialized view log. Then a properly coded MV.
    http://www.morganslibrary.org/library.html
    bookmark this link
    then look up "Materialized Views and "Materialized View Logs"
    The log must be created first.

  • Scheduling Snapshot refreshes

    Hi
    Need help here. The following is the script to create one of our snapshots.
    CREATE SNAPSHOT PREEM_VIEW_SNP
    PCTFREE 0
    PCTUSED 99
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 25600 K
    NEXT 5120 K
    MINEXTENTS 1
    MAXEXTENTS 505
    PCTINCREASE 0
    FREELISTS 1
    FREELIST GROUPS 1
    BUFFER_POOL DEFAULT)
    TABLESPACE BP_DATA
    LOGGING
    NOCACHE
    NOPARALLEL
    USING INDEX PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    BUFFER_POOL DEFAULT)
    REFRESH COMPLETE
    NEXT TRUNC(SYSDATE+1) + 6.5/24
    WITH ROWID
    USING DEFAULT LOCAL ROLLBACK SEGMENT
    DISABLE QUERY REWRITE AS
    select cust_id customer_id,BTN || BTN_CUST_CD || RPAD(BTN_SORT_CD, 1) || RPAD(BTN_SFX, 4) || RPAD(BTN_ST_CD, 1)BLG_ACCT_TLPHN_NO
    from CSBAN10V@UCDWP001
    where ACCT_MKT_UN_ID in ('C', 'D', 'F', 'G', 'I',
    'L', 'O', 'P', 'R', 'S', 'V', 'W')
    Im concerned about the NEXT TRUNC(SYSDATE+1) + 6.5/24 part. It says the snapshot refreshes every day at 6:30 am.
    I need to schedule the refreshes every day except Saturday and Sunday. Got any idea how can I do that?
    Prash

    You would probably want to use the dbms_job package to schedule the refresh in that case, rather than scheduling the refresh in the materialized view creation. Write a function that returns the next refresh time for your snapshot and pass that in when you create your job.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Modify the AWR snapshot time interval

    Hi,
    on 10g R2 how to Modify the AWR snapshot time interval to two hours ?
    Thanks.

    Hi,
    Please see the below link to modify AWR snapshot time interval through command prompt and EM Datbase/Grid Control
    http://www.dba-oracle.com/art_dbazine_freeman_database_advisors_p1.htm
    Hope this helps.
    Regards
    Satishbabu Gunukula
    http://oracleracexpert.blogspot.com
    [Click here to lean Delete Archive logs using RMAN|http://oracleracexpert.blogspot.com/2009/08/delete-archive-logs-using-rman.html]

  • Snapshot refresh DBMS Jobs

    Hello,
    I have a snapshot scheduled to refresh every hour. I have noticed that job is actually not running every hour. Here is an example of what i am trying to explain.
    DECLARE
    X NUMBER;
    BEGIN
    SYS.DBMS_JOB.SUBMIT
    ( job => X
    ,what => 'dbms_refresh.refresh(''"Schema"."FLODS_RENEW_MV"'');'
    ,next_date => TO_DATE('08/08/2006 09:22:00','dd/mm/yyyy hh24:mi:ss')
    ,INTERVAL => 'SYSDATE+1/24 '
    ,no_parse => TRUE
    SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || TO_CHAR(x));
    END;
    COMMIT;
    This runs approximately for 3 mins. And i noticed today that the next_date changed the time to next_date => TO_DATE('08/08/2006 10:25:00','dd/mm/yyyy hh24:mi:ss').
    So, is there any way to schedule a job every hour? Insted of every hour after the job finished executing?
    Thanks

    Hi,
    This is one of the good reasons for using dbms_scheduler instead of dbms_job. dbms_scheduler supports a calendar syntax (actually a modified iCal RFC 2445 standard) for scheduling at regular intervals. The following job skeleton runs every hour at 22 mins after the hour starting immediately
    begin
    dbms_scheduler.create_job(
    job_name=>'my_hourly_job',
    job_type=>'plsql_block',
    job_action=>'my_proc();',
    repeat_interval=>'freq=hourly;byminute=22;bysecond=0',
    enabled=>true , auto_drop=>true
    end;
    This is much clearer than using an ugly PL/SQL time function with TRUNC . It also deals automatically with daylight savings time switchovers which is uncertain with the PL/SQL time function.
    With the new calendar syntax there should really be no reason to revert to time functions.
    Hope this helps,
    Ravi.

  • Snapshots refresh from package from another scheme

    *Also posted to Database:General!
    Hi all,
    i have a trouble while refreshing snapshots.
    First, i have a scheme where a package (for snapshots
    update) and snapshots themselves reside:
    package snp_update
    procedure update_snapshots
    is
    begin
    for s_name in ( SELECT owner, name
    FROM user_snapshots )
    loop
    dbms_snapshot.refresh (s_name.owner || '.' ||
    s_name.name, 'CA');
    end loop;
    end;
    end;
    Second, i have a scheme where reside only synonym to
    snp_update package (synonym name is syn_snp_update) and
    this scheme have granted 'execute' privilege on snp_update.
    But when i try to use it as
    begin
    syn_snp_update.update_snapshot;
    end;
    i have error: ORA-01031: insufficient privileges.
    But when i execute this pl/sql block from package
    owner's scheme - everything ok.
    Oracle: 8.0.5 on Sun Solaris 2.5
    Plz, help me.
    Maksym.

    How has your schema been granted the rights on SYN_SNP_UPDATE? A common cause of this problem is that the rights have been granted to a role. Oracle does not allow you to build procedures, etc using objects that you have been granted through a role. If this is the case you'll have to grant EXECUTE on SYN_SNP_UPDATE to your schema explicitly.
    Cheers, APCThrough
    grant execute on snp_update <synonym's owner schema>;
    BTW: Package's procedure is executing. Cursor (select ... from user_snapshots) retrieves first snapshot info in package's scheme and call to dbms_snapshot.refresh generates error.

  • Snapshot refresh time

    Hi
    I have the following snapshot on oracle 8.1 :
    CREATE SNAPSHOT LSBAN30Y_SNP
    PCTFREE 0
    PCTUSED 99
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 256000 K
    NEXT 25600 K
    MINEXTENTS 1
    MAXEXTENTS 505
    PCTINCREASE 0
    FREELISTS 1
    FREELIST GROUPS 1
    BUFFER_POOL DEFAULT)
    TABLESPACE BP_DATA
    LOGGING
    NOCACHE
    NOPARALLEL
    USING INDEX PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    BUFFER_POOL DEFAULT)
    REFRESH COMPLETE
    NEXT greatest(trunc(sysdate+1), NEXT_DAY(trunc(sysdate)-5 ,'MONDAY')) + 4/24 + 30/1440
    WITH ROWID
    USING DEFAULT LOCAL ROLLBACK SEGMENT
    DISABLE QUERY REWRITE AS
    SELECT
    ACCT_ID BILLING_ACCOUNT_ID,
    CUST_ID BLG_SYS_CUST_ID,
    ACCT_ESTAB_DAT SYS_ACCT_ESTAB_DAT,
    ACCT_STAT_CD SYS_ACCT_STS_CD ,
    decode(SCE_SYS_ID, '1', 'C', '2', 'C', '3', 'C', '4', 'W', '5', 'W', '6', 'E', '7', 'E', null) LEG_SYS_RGN_INDR,
    BTN BLG_ACCT_TLPHN_NO ,
    BTN_CUST_CD,
    BTN_SFX EASTERN_SUFFIX,
    TYP_OF_ACCT_CD BTN_TYP_OF_ACCT_CD,
    PRI_CLSS_ID CLSS_OF_SRVC_CD,
    ' ' BTN_CONTRACT_NO,
    RTRIM(BLG_NM_LN1)||' ' ||LTRIM(BLG_NM_LN2) BTN_BILLING_NAME,
    PCL_IND PCL_INDR,
    BILL_PER SYS_BILL_PRD_INDR,
    GR_ACCT_ID SYS_SPCL_BLG_GR_NO
    FROM
    CSBAN10V@UCDWP001
    where ACCT_MKT_UN_ID in ('C', 'D', 'F', 'G', 'I', 'L', 'O', 'P',
    'R', 'S', 'V', 'W')
    and rownum < 5000000
    I have created indexes on BILLING_ACCOUNT_ID and BLG_SYS_CUST_ID.
    There are 4.3 million records in the snapshot.
    It takes 6hrs to refresh the snapshot.
    The questions I have are:
    1. How can I reduce the refresh time? Is it because of the indexes? Should i make any change to the create snapshot script?
    2. The create snaphot query works fine without the rownum < 500000 statement in oracle 9i but in oracle 8i it gives
    CSBAN10V user not found in UCDWP001 error. It works OK with the rownum < 5000000 statement. Why is that so?
    thanks
    prash

    You are specifying that the refresh must be COMPLETE, so Oracle has to transfer all 5,000,000 rows over the wire from the remote database every time. If you specified that the refresh could be FAST, and created a materialized view log on the remote table, Oracle would be able to transfer only the changed rows each time you refreshed.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • SNAPSHOT REFRESH PROBLEM

    Hi
    I am getting the following error when i try create the snapshot. I have created the snap log on that table. still I am getting this error.
    ORA-12054: cannot set the ON COMMIT refresh attribute for the materialized view
    pls help me how to solve this error.

    Christy,
    What version of oracle are you running at the master and snapshot sites? Are you creating snapshots or materialized views?
    Bev

  • What happen when an error occurs during Snapshot-Refresh?

    Hi,
    I would like to know what happens, when an error occurs
    during a refresh (COMPLETE-REFRESH) of a snapshot?
    Is there a possibility for exception-handling??
    During a complete refresh the data in the snapshot will be deleted an the requested new from the master-side. Now when
    an error occurs during the refresh what happens with the "old" data of the snapshot??? Will it be lost?
    Thanxx
    Schoeib

    Each thread has its own error state. To get the results for a thread (including error result), you need to have a wait step which waits for it. If a thread has an error and you wait for it, you will get the error at the wait step that waits for it.
    If your main thread has an error and you want some worker thread to exit, you should add code to the cleanup of your main thread's sequence which signals the worker thread to exit (you should already have some sort of mechanism for signaling the worker thread to exit (there are many ways to do this, for example, a boolean variable passed by reference to the new thread's sequence, or a TestStand notification).
    If your main thread is getting an error, but is stuck inside a step, that problem is probably specific to something your code is doing, that is not the normal behavior of TestStand. You will need to provide more details or an example sequence in order for us to better understand what is happening.
    Hope this helps,
    -Doug

  • Snapshot refresh error:  ora-01401 inserted value too large for column

    I have an error ora-01401 "Inserted value too large for column" when I try to do a refresh on a group at the materialized view site.
    My model is 1 master replicating to a readonly materialized view site. I have 2 refresh groups for separate sets of tables. 1 refresh group work fine...the other I got the above error.
    I have doubled the rbs and system tablespace without any help thinking that I must be running out of default rollback segment space.
    Anyone has this before?

    The error is related to a field, not to any tablespace. This normaly happens to me when I change the lenght or resolution of a field in the base tables. The structure changes don't "flow" to the materialized view! I must "regenerate" them. Normally droping and creating it again to make them receive the new lenght of that field.
    Sometimes, when the field changed is not part of any primary key I have changes directly the field in the materialized view as if it was a normal table.
    Hope this helps
    Luis

Maybe you are looking for