Materialized View to be run every 1 minute through dbms_scheduler

Hi,
I have a materialized view on 1 database which has its select statement going across a database link to numerous tables on another database.
The materialized view creates fine and when refreshed using dbms_snapshot refreshes without error.
My requirement is to automate this refresh for every minute. I have created a job through dbms_scheduler for the refresh to happen every minute but it fails with the error message
ORA-12008: error in materialized view refresh path
I have ctreated another materialized view on the database which does not go across a dblink and scheduled this though dbms_scheduler for every minute, this works fine.........
So it appears my issue is the selecting from tables across a dblink.
Does any one have any experience of this area, how to resolve this issue or maybe an alternative solution than dbms_scheduler?
Thanks in advance.
Mark.

How is your database link defined?
Is it using a fixed user? i.e create database link .... identified by xxxxx
I think it needs to be to be used in a scheduled job.
Carl

Similar Messages

  • DBMS_SCHEDULER.   How do I set frequency to run every 30 minutes

    Hi,
    I need this job to run every 30 minutes, lets say on 15 minutes and 45 minutes past the hour. What are the necessray changes. I have looked through the docs and have been getting errors when I try and change the line repeat_interval.
    begin
    dbms_scheduler.create_schedule(
    schedule_name =>'HOTLIST_GENERATION',
    start_date =>to_date('01-MAR-2007 02:30','DD-MON-YYYY HH24:MI'),
    repeat_interval =>'FREQ=Hourly',
    end_date =>NULL,
    comments =>'Schedule for Hotlist generation');
    end;

    Perhaps repeast_interval => 'FREQ=MINUTELY; INTERVAL=30'
    See the dbms_scheduler entry in the Oracle PL/SQL Packages and Types manual.
    HTH -- Mark D Powell --

  • Schedule Job to run every 15 minutes from 5 AM to 10 PM

    Hello,
    I am interested to have a job running from 5:00 AM to 10:00 PM every day, every 15 minutes
    Is it possible with Oracle 10g DBMS_scheduler?
    Thanks

    Hi,
    You can check this form here :http://www.oracle-base.com/articles/10g/scheduler-10g.php
    Hope this help

  • Compilingh a procdure which runs every 15 minutes haning

    Hi,
    We have a schedule set up to run a pl/sql packaged procedure every 15 minutes.
    Oracle 11.2.0.3 on AIX Power Series 7
    Runs fine but when need make change to pacakge, finding that have to stop the scheduled job, change and recompile procedure then recreate the schedule.
    Is this expected behaviour or are we doing something wrong?
    Could try dbms_scheduler.disable job?
    Thanks
    Edited by: user5716448 on 05-Nov-2012 10:40

    Found out was because running when trying to compile.

  • LaCie Backup Runs every few minutes?

    I have a LaCie external for backup purposes. I do not believe I have any auto backups set (I use super duper manually). Every 10/15 minutes it looks like the blue light flickers and the LaCie is trying to do something. It slows down some of the operations of my computer. Does anyone have an idea of what I can check to fix this?
    Thanks, Jim

    Jim Kaye wrote:
    I will say that the LaCie still blinks every 10-15 or so minutes for a few seconds (maybe that is normal?).
    It's possible depending on what operations you're doing. If you're not touching the computer and it keeps doing that something is wrong. But does it compromise any functionality?
    Jim Kaye wrote:
    On reindexing
    1. I assume it doesn't remove the erase the hd and I have to do a new backup or does it?
    No, not at all. It just creates a fresh index for the files on it.
    Jim Kaye wrote:
    2. This is what I did. Rebooted using the LaCie. Then opened the privacy tab (which had nothing in it). Dragged the LaCie icon from the desktop to the privacy box. *It would not move from there, so I then deleted it.* Then I rebooted using the mac HD.
    I'm not sure why it wouldn't move you should be able to drag it into and out of privacy.
    http://support.apple.com/kb/HT2409
    I would try that again and then if you succeed allow the drive to fully re-index before restarting from another disk.
    Another way is simply to open Terminal and copy & paste the following command
    sudo mdutil -E /
    Press Return, type your Admin password when prompted for "Password:", then press Return again.
    Your password will be invisible.
    This tells the system to erase the existing Spotlight indices on your *current startup disk*, which should be your LaCie.
    You'll receive a message indicating that the volume index was removed and will be rebuilt immediately.
    -mj

  • DBMS_JOB not running every 30 minutes

    Hi All
    I am using DBMS job to schedule a job as I am still using version 9 oracle:
    variable jobno number;
    begin
    dbms_job.submit(:jobno, statspack.snap(i_snap_level => 6, i_modify_parameter => 'true'), SYSDATE, 'sysdate + 30/1440', TRUE);
    commit;
    end;
    However the job still runs hourly(default) even with the interval specified as 'sysdate + 30/1440'
    Please advice
    Thanks
    Parvez

    JOB_QUEUE_INTERVAL is obsolete in 9i. You can set a hidden parameter of JOBQUEUE_INTERVAL but from what I can tell, the job queue cordinator wakes up every 5 seconds to run.
    I use dbms_jobs in 9i and 10g without any problems. I actually have a scheduler that wake up every 60 seconds to run.
    When running select * from dba_jobs, is your job broken? What is the NEXT_DATE value?
    If everything looks ok, try removing the job and then inserting the job again.

  • Scheduling job to run  every 45 minutes

    Hi, i have to execute a batch evert 45 minutes, everyday except friday.
    i gave the below but its executing evey hourly i.e 60 min not 45 min, can some1 plz help
    BEGIN
    DBMS_SCHEDULER.create_job (
    job_name => 'JOB',
    job_type => 'PLSQL_BLOCK',
    job_action => 'BEGIN JOB; END;',
    start_date => SYSTIMESTAMP,
    repeat_interval => 'FREQ=DAILY; BYDAY=MON,TUE,WED,THU,SAT,SUN;BYHOUR=9,10,11,12,13,14,15,16,17,18,19,20,21; BYMINUTE=45;',
    end_date => NULL,
    enabled => TRUE,
    comments => 'TO test proc');
    END;
    /

    BEGIN
    DBMS_SCHEDULER.create_job (
    job_name => 'JOB',
    job_type => 'PLSQL_BLOCK',
    job_action => 'BEGIN JOB; END;',
    start_date => SYSTIMESTAMP,
    repeat_interval => 'FREQ=MINUTELY; INTERVAL=45;BYDAY=MON,TUE,WED,THU,SAT,SUN',
    end_date => NULL,
    enabled => TRUE,
    comments => 'TO test proc');
    END;
    /

  • Materialized View to run only once in a year...

    Hi everybody...
    I want to create a materialized view which will run only once in a year and specifically some minutes after 00:00 a.m. on new year's day,
    so i created the following:
    CREATE MATERIALIZED VIEW <mv_name>
    BUILD IMMEDIATE
    REFRESH START WITH TO_DATE('01/01/2007 00:15:00','DD/MM/RRRR HH24:MI:SS')
    NEXT SYSDATE+366
    I have two notes:
    1) how to declare the refresh to be done the first new year's day after the day it'll be created , i mean not static date (01/01/2007)
    2)some years are leap and some are not , so in order to run every new year's day how should i transform the above..????
    3)is there any view which displays the next run of a materialized view..???
    the view DBA_MV_REFRESH_TIMES displays the last refresh of mv's...
    I use Oracle 10.2.0.1 on XP ...
    Thanks , a lot
    Simon

    1).
    use the expression that evaluates to next january first.
    SQL> select sysdate, add_months(trunc(sysdate, 'yyyy'), 12) from dual ;
    SYSDATE     ADD_MONTHS(
    19-JUN-2006 01-JAN-2007
    1 row selected.
    SQL>2). for this also use the same expression that will evaluate to the january first of the year after that.

  • Run SQL script every 5 minutes

    Hi:
    I have a script which monitor the database. I want to make it to reflsh every 5 minutes on Linux. How to do it?
    Thank you.

    Hi,
    Here is the small example.
    Open the crontab in editing mode
    $crontab -e
    Insert following line.
    */5 * * * * /home/oracle/scripts/monitor.sh
    This will schedule monitor.sh script to run every 5 minutes.
    You can write any of your type in monitoring. For example following script will monitor alert.log errors...
    #!/bin/ksh
    . /etc/oracle.profile
    for SID in `cat $ORACLE_HOME/sidlist`
    do
    cd $ORACLE_BASE/admin/$SID/bdump
    if [ -f alert_${SID}.log ]
    then
    mv alert_${SID}.log alert_work.log
    touch alert_${SID}.log
    cat alert_work.log >> alert_${SID}.hist
    grep ORA- alert_work.log > alert.err
    fi
    if [ `cat alert.err|wc -l` -gt 0 ]
    then
    mailx -s "${SID} ORACLE ERRORS" [email protected] < alert.err
    fi
    rm -f alert.err
    rm -f alert_work.log
    done
    Note- Above is just for exmaple.
    Regards

  • Creating a Materialized View Log After the Data has been instered

    Hi,
    I am trying to create a method of replication from Oracle to MySQL using the Materialized View Log table.
    This has been done before and works quite well, the only problem is that I am trying to impliment the log after the table has been created and populated and wish to push all the existing data through the log file...
    Does anyone know if it is possible to refresh the Materialized View Log and not a Materialized View.
    The way the replication is intended to work is:
    Oracle> Data inserted into table
    Oracle> writes the vector data to the MVL
    Script> Monitors the MVL and can see the changes being made to the Oracle Table
    Script> Updates MySQL with the data and removes the rows from the MVL
    MySQL is then used with other unix systems
    Currently we export the data from the table using Triggers and a cronjob running every x minute to check for changes in the TriggerTables
    Many thanks for your time on this, I have been checking for almost a whole working day and not found the answer to this problem.

    Thats what I thought, the MVL will only read data that has changed since it was created and wont have the option to load in all the data as though it was made before the table was created.
    From what I have read, the MVL is quicker than a Trigger and I have some free code that prooved to work from a MVL using it as a reference to know what records to update. There is not that much to a MVL, a record ID and type of update, New, Update or Delete.
    I think what I will have to do is work on a the same principle for the MVL but use a Trigger as this way we can do a full reload if required at any point.
    Many thanks for your help.

  • Materialized View Logs on OLTP DB- Performance issues

    Hi All,
    We have a request to check what would be the performance impact of having Matirialized View (with FAST refresh each 5 and each 30 min).
    We have been using some APIs( I don't have full details of this job) to refresh tables in Reportign DB and want to switch to MVIEWS in the next release.
    The base tables for this MVs are in DB1 with high DML activity.
    We are planing to create 7 MVs on a reporting DB pointing to the corresponding tables in DB1.
    I am setting up the env with the required tables to test this and also want to know your experiences in implementing Mviews with Fast refresh pointing to a typical OLTP DB as I am new to MVIEWS.
    How it affects the performance of DML statements on base tables?
    How often you had to do complete refresh because of invalid/outdated Mview Logs?
    other Maintenance overheads?
    any possible workarounds?
    Oracle Version: 9.2.0.8
    OS : HP-UX
    Thank you for sharing your experiences.

    Doing incremental refreshes every 5 minutes willadd some amount of load to the OLTP system. Again,
    depending on your environment, that may or may not be
    significant.
    what factors can effet this? Among other things, the size of the materialized view logs that need to be read, which in turn depends on the number of transactions and the setup of the materialized views, the current load on the OLTP system, etc. If you're struggling with an I/O or CPU bottleneck at peak processing now, for example, having a dozen materialized view refresh processes running as well would probably generate noticable delays in the system. If you have plenty of spare CPU & I/O bandwidth, the refreshes will be less noticable.
    is it the same in 10g R2 too? we are upgrading to the
    same in coming October.Streams is far easier to deal with in 10.2.
    Justin

  • Materialized View Issue

    Hi,
    I have created a materialized view , which is refreshed every day at 1 AM . It was created yesterday. Here is the initial part of it
    CREATE MATERIALIZED VIEW MV_TEST
    TABLESPACE USERS
    PCTUSED 0
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    NOCACHE
    NOLOGGING
    NOCOMPRESS
    NOPARALLEL
    BUILD IMMEDIATE
    REFRESH COMPLETE
    START WITH SYSDATE
    NEXT ROUND(SYSDATE + 1) + 1/24
    WITH PRIMARY KEY
    AS
    Now , when it was created initially , a query that retrieves around 40,000 records took 8 seconds to run . That looked ok . But today when I tried to run the same query , it took 12 minutes to runt he query . Any idea whats going wrong . I checked the user jobs , it says its a non broken job ,means completed successfully . Please, if you can have some suggestions , what to do or what to check to see whats is going on .
    Thanks .

    here is the query with its execution plan
    SELECT  PERSONNEL_ID, EMP_FIRST_NAME, EMP_LAST_NAME, EXEMPT, FTE_ASSIGNED, EMPLOYEE_VISITOR_ID, STAFF_CATEGORY, EMP_DIVISION, ACCOUNT_ID, ACCOUNT_NUMBER, ACCOUNT_NAME,
            ACCOUNT_MANAGER_ID, ACCOUNT_START_DATE, ACCOUNT_END_DATE, ACCOUNT_STATUS, MGR_FIRST_NAME, MGR_LAST_NAME, MGR_DIVISION, YEARS, PERIOD_YEAR, LCS_EFFORT
    FROM
    WITH
    LCS AS (SELECT LC.PERSONNEL_ID, LC.ACCOUNT_ID , SUM(NVL(LC.LCS_EFFORT,0)) LCS_EFFORT , AP.PERIOD_YEAR
            FROM
            (SELECT PERSONNEL_ID, ACCOUNT_ID , FISCAL_YEAR_ID , FISCAL_PERIOD_ID , LCS_EFFORT
            FROM LABOR_COMMITED WHERE COMMITED_DATE IS NOT NULL ) LC
            PARTITION BY ( PERSONNEL_ID, ACCOUNT_ID)
            RIGHT OUTER JOIN
            (SELECT FIRST_DAY PERIOD_YEAR, FISCAL_YEAR_ID, FISCAL_SYSTEM_PERIOD_ID FROM ALL_PERIODS WHERE CALENDRICAL_EQUIVALENT IS NOT NULL
             AND FIRST_DAY > TO_DATE('01-JUN-2004','DD-MON-YYYY')) AP
            ON (LC.FISCAL_YEAR_ID = AP.FISCAL_YEAR_ID  AND LC.FISCAL_PERIOD_ID = AP.FISCAL_SYSTEM_PERIOD_ID)
            GROUP BY LC.PERSONNEL_ID, LC.ACCOUNT_ID , AP.PERIOD_YEAR),
    PER AS (SELECT P.PERSONNEL_ID, P.FIRST_NAME EMP_FIRST_NAME, P.SURNAME_ISI EMP_LAST_NAME, P.EXEMPT, P.FTE_ASSIGNED,
            NVL(P.EMPLOYEE_ID,P.VISITOR_NUMBER) EMPLOYEE_VISITOR_ID, ST.CODE_VALUE STAFF_CATEGORY, DIV.DIVISION_NUMBER EMP_DIVISION
            FROM PERSONNEL P , CODES ST , DIVISIONS DIV 
            WHERE P.STAFF_CATEGORY_CODE_ID  = ST.CODE_ID (+) AND P.DIVISION_ID = DIV.DIVISION_ID (+)),
    ACT AS (SELECT AC.ACCOUNT_ID, AC.ACCOUNT_NUMBER, AC.ACCOUNT_NAME, AC.ACCOUNT_MANAGER ACCOUNT_MANAGER_ID, AC.ACCOUNT_START_DATE, AC.ACCOUNT_END_DATE,
            ACS.ACCOUNT_STATUS_DESIG ACCOUNT_STATUS, MGR.FIRST_NAME MGR_FIRST_NAME, MGR.SURNAME_ISI MGR_LAST_NAME,  MGR_DIV.DIVISION_NUMBER MGR_DIVISION
            FROM ACCOUNTS AC, ACCOUNT_STATUS ACS, PERSONNEL MGR, DIVISIONS MGR_DIV
            WHERE AC.ACCOUNT_STATUS_ID = ACS.ACCOUNT_STATUS_ID AND AC.ACCOUNT_MANAGER = MGR.PERSONNEL_ID AND MGR.DIVISION_ID = MGR_DIV.DIVISION_ID (+))
    SELECT  PER.PERSONNEL_ID , PER.EMP_FIRST_NAME, PER.EMP_LAST_NAME, PER.EXEMPT, PER.FTE_ASSIGNED, PER.EMPLOYEE_VISITOR_ID, PER.STAFF_CATEGORY , PER.EMP_DIVISION,
            ACT.ACCOUNT_ID, ACT.ACCOUNT_NUMBER, ACT.ACCOUNT_NAME, ACT.ACCOUNT_MANAGER_ID, ACT.ACCOUNT_START_DATE, ACT.ACCOUNT_END_DATE, ACT.ACCOUNT_STATUS,
            ACT.MGR_FIRST_NAME, ACT.MGR_LAST_NAME, ACT.MGR_DIVISION, TO_NUMBER(TO_CHAR(LCS.PERIOD_YEAR,'YYYY')) YEARS, LCS.PERIOD_YEAR, LCS.LCS_EFFORT
    FROM    LCS, PER, ACT
    WHERE   LCS.PERSONNEL_ID = PER.PERSONNEL_ID
    AND     LCS.ACCOUNT_ID = ACT.ACCOUNT_ID
    PLAN_TABLE_OUTPUT
    Plan hash value: 2443154823
    | Id  | Operation                          | Name                  | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                   |                       |   190K|   278M|       | 41814   (1)| 00:08:22 |
    |   1 |  VIEW                              |                       |   190K|   278M|       | 41814   (1)| 00:08:22 |
    |*  2 |   HASH JOIN RIGHT OUTER            |                       |   190K|    39M|       | 41814   (1)| 00:08:22 |
    |   3 |    TABLE ACCESS FULL               | CODES                 |  4513 | 58669 |       |     8   (0)| 00:00:01 |
    |*  4 |    HASH JOIN RIGHT OUTER           |                       |   190K|    36M|       | 41802   (1)| 00:08:22 |
    |   5 |     TABLE ACCESS FULL              | DIVISIONS             |    11 |    77 |       |     3   (0)| 00:00:01 |
    PLAN_TABLE_OUTPUT
    |*  6 |     HASH JOIN                      |                       |   190K|    35M|       | 41795   (1)| 00:08:22 |
    |   7 |      TABLE ACCESS FULL             | PERSONNEL             |  2100 | 90300 |       |    25   (4)| 00:00:01 |
    |*  8 |      HASH JOIN                     |                       |   190K|    27M|       | 41766   (1)| 00:08:22 |
    |*  9 |       HASH JOIN                    |                       |  2449 |   253K|       |    42   (8)| 00:00:01 |
    |  10 |        TABLE ACCESS FULL           | ACCOUNT_STATUS        |     2 |    10 |       |     3   (0)| 00:00:01 |
    |* 11 |        HASH JOIN                   |                       |  2449 |   241K|       |    38   (6)| 00:00:01 |
    |* 12 |         HASH JOIN RIGHT OUTER      |                       |  2100 | 69300 |       |    28   (4)| 00:00:01 |
    |  13 |          TABLE ACCESS FULL         | DIVISIONS             |    11 |    77 |       |     3   (0)| 00:00:01 |
    |  14 |          TABLE ACCESS FULL         | PERSONNEL             |  2100 | 54600 |       |    25   (4)| 00:00:01 |
    |  15 |         TABLE ACCESS FULL          | ACCOUNTS              |  2449 |   162K|       |     9   (0)| 00:00:01 |
    |  16 |       VIEW                         |                       |   190K|  8906K|       | 41720   (1)| 00:08:21 |
    PLAN_TABLE_OUTPUT
    |  17 |        HASH GROUP BY               |                       |   190K|    12M|    32M| 41720   (1)| 00:08:21 |
    |  18 |         VIEW                       |                       |   190K|    12M|       | 38561   (1)| 00:07:43 |
    |  19 |          MERGE JOIN PARTITION OUTER|                       |   190K|    10M|       | 38561   (1)| 00:07:43 |
    |  20 |           SORT JOIN                |                       |     5 |    95 |       |    14   (8)| 00:00:01 |
    |  21 |            VIEW                    |                       |     5 |    95 |       |    13   (0)| 00:00:01 |
    |  22 |             NESTED LOOPS           |                       |     5 |    90 |       |    13   (0)| 00:00:01 |
    |  23 |              TABLE ACCESS FULL     | FISCAL_YEARS          |     8 |    80 |       |     3   (0)| 00:00:01 |
    |* 24 |              TABLE ACCESS FULL     | FISCAL_SYSTEM_PERIODS |     1 |     8 |       |     1   (0)| 00:00:01 |
    |* 25 |           SORT PARTITION JOIN      |                       | 38000 |  1447K|  4216K|   532   (3)| 00:00:07 |
    |  26 |            VIEW                    |                       | 38000 |  1447K|       |   142   (3)| 00:00:02 |
    |* 27 |             TABLE ACCESS FULL      | LABOR_COMMITED        | 38000 |  1447K|       |   142   (3)| 00:00:02 |
    PLAN_TABLE_OUTPUT
    Predicate Information (identified by operation id):
       2 - access("P"."STAFF_CATEGORY_CODE_ID"="ST"."CODE_ID"(+))
       4 - access("P"."DIVISION_ID"="DIV"."DIVISION_ID"(+))
       6 - access("LCS"."PERSONNEL_ID"="P"."PERSONNEL_ID")
       8 - access("LCS"."ACCOUNT_ID"="AC"."ACCOUNT_ID")
       9 - access("AC"."ACCOUNT_STATUS_ID"="ACS"."ACCOUNT_STATUS_ID")
      11 - access("AC"."ACCOUNT_MANAGER"="MGR"."PERSONNEL_ID")
    PLAN_TABLE_OUTPUT
      12 - access("MGR"."DIVISION_ID"="MGR_DIV"."DIVISION_ID"(+))
      24 - filter("PERIODS"."CALENDRICAL_EQUIVALENT" IS NOT NULL AND CASE  WHEN
                  "PERIODS"."CALENDRICAL_EQUIVALENT" IS NOT NULL THEN TO_DATE(''||TO_CHAR("PERIODS"."CALENDRICAL_EQUIVALENT")|
                  |'/01/'||"YEARS"."FISCAL_YEAR"||'','MM/DD/YYYY') ELSE
                  TO_DATE('06/01/'||"YEARS"."FISCAL_YEAR"||'','MM/DD/YYYY')+14 END >TO_DATE('2004-06-01 00:00:00',
                  'yyyy-mm-dd hh24:mi:ss'))
      25 - access("LC"."FISCAL_YEAR_ID"="AP"."FISCAL_YEAR_ID" AND
                  "LC"."FISCAL_PERIOD_ID"="AP"."FISCAL_SYSTEM_PERIOD_ID")
           filter("LC"."FISCAL_PERIOD_ID"="AP"."FISCAL_SYSTEM_PERIOD_ID" AND
                  "LC"."FISCAL_YEAR_ID"="AP"."FISCAL_YEAR_ID")
      27 - filter("COMMITED_DATE" IS NOT NULL)
    55 rows selected.

  • Cisco prime infrastructure 1.3 makes every 15 minutes cpu high on cisco 800 routers

    I have an issue with cisco prime infrastructure 1.3 and cisco 880 routers, every 15 minutes the cpu goes to 100% on those routers, but I cannot find the job on the prime which is causing this, if I look in the job dashboard I have some jobs like sam_poller_22_15_getvpnpoller_27977292 that runs every 15 minutes (other jobs that I see CDBPoller_dmvpnPoller and CDBPoller_getvpnpoller)   , probably is it on of these jobs, but how can I stop it (job type : poller job, owner =system) and what are they doing?
    thanks for any assistance

    This is what i expected. I know many platform like 29xx/39xx or ISR's has known issues with Cisco Prime Infrastructure when it polls CISCO-LICENSE-MGMT-MIB, devices go high on CPU.
    You have to block clmgmtLicenseInfoEntry by creating a view on your 800 router by configuring snmp view.
    Following is the command/example:
    Step 1: Configure SNMP View:
    snmp-server view iso included
    snmp-server view   clmgmtLicenseInfoEntry excluded
    Link community string to SNMP View:
    snmp-server community view ro|rw
    Example per your configuration:
    snmp-server view PrimeInfra iso included
    snmp-server view PrimeInfra clmgmtLicenseInfoEntry excluded
    snmp-server community ArgSnmp view PrimeInfra RO ACLSNMP_RO
    OR you can try following on your Cisco PI:
    Manually update file below,
    Open the /opt/CSCOlumos/conf/sam/template.xml, modify the template id=20  (licensePoller)
    Update tag for value 600 to 86400 for all attrributes () of
    template id =20
    Old: 600
    New: 86400
    Some known bugs on such issues are :
    CSCug97914 and CSCuc72024
    Please check and let me know the updates.
    -Thanks
    Vinod
    **Rating Encourages contributors, and its really free. **

  • Creating Materialized View in Toad

    As with every new endeavor - come new questions.
    I am trying to create a materialized view via toad (first time doing this). Now - toad is great, since it provides a kind-of wizard interface. Hence, one doesn't have to completely code in the create statement, with all of the options, etc.
    Instead, in toad, one can (via the schema browser), go into the Materialized Views tab and click on create new. This opens a window with 6 tabs: Basic Info, Refresh Info, Physical Attributes, Query, Partitions & Subpartition Template.
    In the Basic Info, one can put a check mark next to some of the following options:
    -Build Deffered
    -Parallel
    -Cache
    -Logging
    -Using index
    -Allow updates
    etc.
    I have read that build deferred refers to whether or not you would like the view to be created automatically or to be deferred.
    Anyways, I tried to find Toad documentation to explain each of the options in-detail. No success. Hence, am researching each part piece by piece.
    But - here is my question:
    In the Query tab, we are asked to specify a query. I am assuming that the query does not have to be a full query, beginning with CREATE MATERIALIZED VIEW mv_table1 REFRESH FAST etc...
    Since in this 'wizard', we are providing the MV name at the top of the dialog box, we are checking the 'options' in the other tabs, etc.
    And so, I assumed that the query should merely be a select query in the window mentioned above.
    So I entered the following:
    select * from table1@remote_db;
    When I go to verify the syntax, I get the error message: ORA_00911: invalid character. It seems to be pointing to my db_link (remote_db). I have been using this link throughout many places, w/o any problems.
    Has anyone created a MV in toad before? Any links to good toad documentation would be helpful as well.
    Thanks.

    (This is fun... ;))
    For anyone endeavoring this in the future, below I have attached the prerequisites required in order to create a materialized view (can also be found @ http://download-uk.oracle.com/docs/cd/B14117_01/server.101/b10759/statements_6002.htm):
    Prerequisites
    The privileges required to create a materialized view should be granted directly rather than through a role.
    To create a materialized view in your own schema:
    You must have been granted the CREATE MATERIALIZED VIEW system privilege and either the CREATE TABLE or CREATE ANY TABLE system privilege.
    You must also have access to any master tables of the materialized view that you do not own, either through a SELECT object privilege on each of the tables or through the SELECT ANY TABLE system privilege.
    To create a materialized view in another user's schema:
    You must have the CREATE ANY MATERIALIZED VIEW system privilege.
    The owner of the materialized view must have the CREATE TABLE system privilege. The owner must also have access to any master tables of the materialized view that the schema owner does not own (for example, if the master tables are on a remote database) and to any materialized view logs defined on those master tables, either through a SELECT object privilege on each of the tables or through the SELECT ANY TABLE system privilege.
    To create a refresh-on-commit materialized view (ON COMMIT REFRESH clause), in addition to the preceding privileges, you must have the ON COMMIT REFRESH object privilege on any master tables that you do not own or you must have the ON COMMIT REFRESH system privilege.
    To create the materialized view with query rewrite enabled, in addition to the preceding privileges:
    If the schema owner does not own the master tables, then the schema owner must have the GLOBAL QUERY REWRITE privilege or the QUERY REWRITE object privilege on each table outside the schema.
    If you are defining the materialized view on a prebuilt container (ON PREBUILT TABLE clause), then you must have the SELECT privilege WITH GRANT OPTION on the container table.
    The user whose schema contains the materialized view must have sufficient quota in the target tablespace to store the master table and index of the materialized view or must have the UNLIMITED TABLESPACE system privilege.
    When you create a materialized view, Oracle Database creates one internal table and at least one index, and may create one view, all in the schema of the materialized view. Oracle Database uses these objects to maintain the materialized view data. You must have the privileges necessary to create these objects.

  • How to schedule a job every 10 minutes from 07 to 19 from Monday to Friday

    Hi,
    I would like to schedule a job in a way that runs every 10 minutes starting from 07 up to 19 from Monday to Friday
    How to do this?
    thanks in advance
    lk
    Oracle rdbms 10.2.0.4

    Off the top of my head :
    begin
    dbms_scheduler.create_job('OTN_JOB',
       job_action=> 'YOUR_STORED_PROCEDURE'  ,
       repeat_interval => 'FREQ=DAILY; BYHOUR=07,08,09,10,11,12,13,14,15,16,17,18,19; BYMINUTE=0,10,20,30,40,50',
       job_type=>'STORED_PROCEDURE', enabled=>TRUE);
    end;
    /Best Regards
    mseberg

Maybe you are looking for

  • Can't resize partition after upgrading to Yosemite (using SSD drive)

    I upgraded to 10.10 and using SSD drive now. When I was using OS X 10.8.5, I could freely resize partition but not anymore. I guess because of the SSD drive and the new version of OS X, and Logical Volume Group could be involved. I don't want to wast

  • How do I get an email file attachment, any extension, off of my phone?

    All I want to do is get an email file attachment off of my phone and on to my computer so I can use it.  I don't want to open it on my phone, it could be an AutoCAD file, a programming langauge file, etc.  I want the option to save the attachment to

  • Goods Receipt, Good Issue Batch Control

    I'm trying to import Goods Receipt and Goods Issue using the DI API for version SAP 6.5 SP1 Patch 17. I was able to import for item that were not batch controlled but not for batch controlled items. I was wondering if anyone had a code sample on how

  • How to create a managed metadata column in sharepoint document library programmatically

    Hi, I want to create a column of type "Managed metadata" in a document library. I am new to managed metadata and its basics. So i need to know what it requires to create it. i got this 1. Create a term set Group. 2. Create term set. 3. Create a term.

  • Look Up Error

    Hi All, Can anyone tell me as to how I can guess by seeing the mapping itself (that uses a lookup) that it will suffer from the following runtime error: "A table can be outer joined with at most one other table". After developing a long enough mappin