Solved

Oracle Function

Posted on 2013-12-11
2
575 Views
Last Modified: 2013-12-16
Hi,
I have an PL/SQL function who need's to run every 15 minutes. The name of the function is UPDATE_RC_ITL, inserting the data from one to another database...
Thank you in advance
0
Comment
Question by:andrejaTJ
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 38

Expert Comment

by:Geert Gruwez
ID: 39711150
you need db_link from the database with the destination table to the source database
http://docs.oracle.com/cd/E11882_01/server.112/e17118/statements_5005.htm#SQLRF01205

you can use dbms_scheduler for scheduling a procedure or pl/sql call every 15 minutes
http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_sched.htm#CIHHBGGI

the first time you'll need to create the table
create table xxx as select from schema.table_name@db_link;

and then add the changed data with the merge statement
http://docs.oracle.com/cd/E11882_01/server.112/e17118/statements_9016.htm#SQLRF01606
0
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 200 total points
ID: 39711153
Use dbms_scheduler to run the function.

This should work.  Just change the function name and name the job and comments whatever you want.
exec dbms_scheduler.create_job (job_name => 'SOME_JOB', -
	job_type => 'STORED_PROCEDURE', -
	job_action => 'myStoredFunction', -
	number_of_arguments => 0, -
	repeat_interval => 'FREQ=HOURLY; BYMINUTE=0,15,30,45; BYSECOND=0', -
	enabled => TRUE, -
	comments => 'My function');

Open in new window

0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question