How to create a timer in stored procedure
Hi All:
I have a stored database procedure which needs to be fired at particular period of time. For eg: 12:00 AM at night.
Please advise what is the best solution for this.
I am using Oracle 9i enterprise edition in linux OS.
Thanks.
you can use the package dbms_job to schedule execution of user jobs
See here for more information and examples
http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96612/d_job2.htm#1002030
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96521/jobq.htm#7997
Similar Messages
-
How to create csv file in stored procedure
I want the output of my stored procedure in a csv file. How can I do that?
1) define File Paths
2) Write the output comma seperated to the file.
Simple :)
Hope you are comfortable with File operations.
URL for your reference
PL/SQL output to .CSV file
Regards,
Bhushan -
Creating a Oracle 10g stored procedure as a datasource for crystal 9 repor
Can someone direct me to instructions or information on how to create a Oracle 10g stored procedure as a datasource for my Crystal Reports 9.0 report?
i've found this example for you
http://www.pdssoftware.com/newsletter/mar07/page6.htm
and you could be able to get the guides from the SAP guide website for the products
http://help.sap.com/businessobject/product_guides/
hope this was helpful
good luck
Amr -
Is is possible to create Socket using Java Stored Procedures/Function(Ora)?
Hello Friends,
Is is possible to create Socket using Java Stored Procedures/Function in Oracle?
OR
How I can send a message from oracle to Java Desktop Application which is working like server program?
Please Guide !!J3Ganesh wrote:
Hello Friends,
Is is possible to create Socket using Java Stored Procedures/Function in Oracle?No, Oracle was very careful to take that feature out of the JDK provided in Oracle 10/11, but you can buy that feature back for, if I remember correctly, about 5000 dollars. (I actually raised a service request on this and then told my rep what I thought about the answer I received--some thing along the line of money grubbing so and so....)
How I can send a message from oracle to Java Desktop Application which is working like server program?You can make a table and poll it from time to time from the Java side and write and commit what ever you want to the table. I do not know any way to send a signal from Oracle DB an external Java application--Java or PL/SQL stored procedure. -
Execution Times of Stored Procedures Called from Other Stored Procedures
If I execute sys.dm_exec_procedure_stats, it will produce execution times of my stored procedures executed recently.
However, stored procedures called from other stored procedures do not show up.
Is there code that can return the execution times of stored procedures even though they are called from other stored procedures.Look at the example. It is counting nested execution.
CREATE PROC z1SP AS SELECT * FROM Production.Product;
GO
CREATE PROC z2SP AS SELECT * FROM Production.Product WHERE Color is not null; EXEC z1SP;
GO
SELECT object_name(2002822197), object_name(2034822311);
--z1SP z2SP
EXEC z1SP; EXEC z2SP;
GO 10
SELECT * from sys.dm_exec_procedure_stats
database_id object_id type type_desc cached_time last_execution_time execution_count
16 2002822197 P SQL_STORED_PROCEDURE 2014-12-16 13:02:45.170 2014-12-16 13:02:46.717 20
16 2034822311 P SQL_STORED_PROCEDURE 2014-12-16 13:02:45.460 2014-12-16 13:02:46.687 10
Kalman Toth Database & OLAP Architect
SQL Server 2014 Database Design
New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014 -
[CS3 JS] How to Create a Timer?
Within InDesign I need to be able to fire a periodic process to examine links from a JavaScript script. I have my own script running in its own engine.
I can't figure out how to create a timer that will run in the background and call the appropriate callback function periodically.
I've created a little process like this:
* Sleeps for waitTime milliseconds then calls the callBack function.
function timer(callBack, waitTime) {
$.writeln("timer(): callBack=" + callBack + ", waitTime=" + waitTime);
if (waitTime == undefined) waitTime = 2000;
$.writeln("timer(): sleeping for " + waitTime + "...");
$.sleep(waitTime);
$.writeln("timer(): awake, calling callBack");
try {
return callBack();
} catch (e) {
$.writeln("timer(): Exception from callBack.exec(): " + e);
return undefined;
function myCallBack() {
return Window.confirm("Callback called", true, "Continue looping");
while (true) {
if (!timer(myCallBack)) break;
And this works in the sense that my timer runs, but it runs as a blocking process, which is not what I want.
Is there something I'm missing or is this simply not possible in CS3 JavaScript? A search on "timer" in the InDesign forums didn't reveal anything, nor did the InDesign JavaScript Guide nor the Scripting Tools Guide.
Thanks,
Eliot1. Download and install Active Page Item Developer Toolkit.
http://www.rorohiko.com/wordpress/indesign-downloads/active-page-item-developer/
You'll have a demo period for 20 days or a month, I don't remember exactly.
2. Create a new document, open 'Active Page Item Developer' panel (Windows menu).
3. Copy the script from my previous post, draw an object - e.g. a rectangle and with the object selected enter 'idle' into Event Filter field, then press Tab and paste the script into the largest field.
You'll see an alert appearing every 10 seconds and the cursor flickering. -
How to use order by in stored procedure base block?
How to use order by in stored procedure base block? I need to change order by dynamically
Use SET_BLOCK_PROPERTY('BLOCK_NAME',ORDER_BY,'COLUMN_NAME1, COLUMN_NAME2');
-
Date/Time Format Stored Procedure Calls in ADVANCE MODE in JDBC ADAPTER
Hi Experts,
What is significance of Date/Time Format Stored Procedure Calls in ADVANCE MODE in JDBC ADAPTER.
Thanks,
ABDURI guess this would be applicable for the folowing formats - DATE, TIME, TIMESTAMP.
This is the correct link
http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm
Regards,
Prateek -
How to write a PL/SQL stored procedure in Oracle to call Webservice
Can any one pelase send me a code on how to write a PL/SQL stored procedure in Oracle database to call the Webservice ?
Thanks,
RajeshWere you able to solve this problem
-
Problem creating dataset using db2 stored procedure in Eclipse BIRT
Hi,
I am using DB2 9.7 Express Edition in Eclipse BIRT(version 2.5.1) for generating reports. I have used Type4 driver for jdbc connection.
For that, I have established jdbc connection using db2jcc.jar and db2jcc_license_cu.jar files.
I have successfully created data source, say DB2BIRT having following requisites-
Driver Class - com.ibm.db2.jcc.DB2Driver ( v3.50)
Driver URL - jdbc:db2://localhost:50000/database_name
User name - user_name
Password - Password
I have written some stored procedures and trying to use resultsets from those stored procedures into my report..
The stored procedures having involvement of only single resultset are working absolutely fine for new dataset using above DB2BIRT.
But, I am unable to create new dataset using stored procedures those having involvement of multiple resultsets.
I am getting following error as -
org.eclipse.birt.data.engine.odaconsumer.PreparedStatement$SequentialResultSetHandler getMoreResults
SEVERE: Cannot get more result sets from the statement.
Cannot get the result set.
SQL error #1: [jcc][10120][10943][3.50.152] Invalid operation: statement is closed. ERRORCODE=-4470, SQLSTATE=null
org.eclipse.birt.report.data.oda.jdbc.JDBCException: Cannot get the result set.
SQL error #1: [jcc][10120][10943][3.50.152] Invalid operation: statement is closed. ERRORCODE=-4470, SQLSTATE=null
com.ibm.db2.jcc.b.SqlException: [jcc][10120][10943][3.50.152] Invalid operation: statement is closed. ERRORCODE=-4470, SQLSTATE=null
at org.eclipse.birt.report.data.oda.jdbc.CallStatement.getMoreResults(CallStatement.java:1760)
at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaAdvancedQuery.getMoreResults(OdaAdvancedQuery.java:214)
at org.eclipse.birt.data.engine.odaconsumer.PreparedStatement$SequentialResultSetHandler.getMoreResults(PreparedStatement.java:5183)
at org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.getMoreResults(PreparedStatement.java:792)
at org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.flushResultSets(PreparedStatement.java:1009)
at org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.close(PreparedStatement.java:980)
at org.eclipse.birt.data.engine.executor.DataSource$DataSourceReleaser.run(DataSource.java:374)
at java.lang.Thread.run(Thread.java:619)
Caused by: com.ibm.db2.jcc.b.SqlException: [jcc][10120][10943][3.50.152] Invalid operation: statement is closed. ERRORCODE=-4470, SQLSTATE=null
at com.ibm.db2.jcc.b.wc.a(wc.java:55)
at com.ibm.db2.jcc.b.wc.a(wc.java:102)
at com.ibm.db2.jcc.b.tk.db(tk.java:3118)
at com.ibm.db2.jcc.b.tk.a(tk.java:1063)
at com.ibm.db2.jcc.b.tk.getMoreResults(tk.java:908)
at org.eclipse.birt.report.data.oda.jdbc.CallStatement.getMoreResults(CallStatement.java:1756)
... 7 more
Moreover, I tried to resolve above issue by changing Driver Class from com.ibm.db2.jcc.DB2Driver ( v3.50) to com.ibm.db2.jcc.uw.DB2StoredProcDriver ( v3.50)
So again while *"Test Connection"* for new Data source using this new driver class for stored procedure, there is an error reflection as -
org.eclipse.birt.report.data.oda.jdbc.JDBCException: The selected driver cannot parse the given url.
at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.testConnection(JDBCDriverManager.java:627)
at org.eclipse.birt.report.data.oda.jdbc.ui.util.DriverLoader.testConnection(DriverLoader.java:120)
at org.eclipse.birt.report.data.oda.jdbc.ui.util.DriverLoader.testConnection(DriverLoader.java:133)
at org.eclipse.birt.report.data.oda.jdbc.ui.profile.JDBCSelectionPageHelper.testConnection(JDBCSelectionPageHelper.java:653)
at org.eclipse.birt.report.data.oda.jdbc.ui.profile.JDBCSelectionPageHelper.access$7(JDBCSelectionPageHelper.java:627)
at org.eclipse.birt.report.data.oda.jdbc.ui.profile.JDBCSelectionPageHelper$7.widgetSelected(JDBCSelectionPageHelper.java:549)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1176)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3493)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3112)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.birt.report.designer.ui.dialogs.BaseDialog.open(BaseDialog.java:110)
at org.eclipse.birt.report.designer.data.ui.actions.EditDataSourceAction.doAction(EditDataSourceAction.java:68)
at org.eclipse.birt.report.designer.internal.ui.views.actions.AbstractElementAction.run(AbstractElementAction.java:70)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1176)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3493)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3112)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
Can anybody address my this issue for successful implementation of stored procedure(with involvement of multiple resultsets) for creating Data set in Eclipse BIRT ?
I will be really thankful.
Thanks in advance,
ManasiWell, in my stored procedure I have used 2 to3 cursors(as per my business logic) and all cursors except one are holding result sets. That exceptional cursor is intended for holding as well as returning result set after call to the procedure. And its perfectly running on db2 and returning the desired output. The problem is with Eclipse. The same procedure is not working in Eclipse BIRT.
-
How to call a sql server stored procedure from oracle
Hi all,
Please anybody tell me how to call a sql server stored procedure from oracle.
I've made an hsodbc connection and i can do insert, update, fetch data in sql server from oracle. But calling SP gives error. when I tried an SP at oracle that has line like
"dbo"."CreateReceipt"@hsa
where CreateReceipt is the SP of sql server and hsa is the DSN, it gives the error that "dbo"."CreateReceipt" should be declared.
my database version is 10g
Please help me how can i call it... I need to pass some parameters too to the SP
thanking youhi,
thank you for the response.
when i call the sp using DBMS_HS_PASSTHROUGH, without parameters it works successfully, but with parameters it gives the following error
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Generic Connectivity Using ODBC][Microsoft][ODBC SQL Server Driver]Invalid parameter number[Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index (SQL State: S1093; SQL Code: 0)
my code is,
declare
c INTEGER;
nr INTEGER;
begin
c := DBMS_HS_PASSTHROUGH.OPEN_CURSOR@hsa;
DBMS_HS_PASSTHROUGH.PARSE@hsa(c, 'Create_Receipt(?,?)');
DBMS_HS_PASSTHROUGH.BIND_VARIABLE@hsa(c,1,'abc');
DBMS_HS_PASSTHROUGH.BIND_VARIABLE@hsa(c,2,'xyz');
nr:=DBMS_HS_PASSTHROUGH.EXECUTE_NON_QUERY@hsa(c);
DBMS_HS_PASSTHROUGH.CLOSE_CURSOR@hsa(c);
end;
Create_Receipt is the sp which requires two parameters.
please give me a solution
thanking you
sreejith -
How to create a Time Dimension
Hi
This is regarding a new topic which i could not find the answer in this forum.
Actually i want to create a time dimension to populate my source data which is in date/time format.
can anyone please reply back reagrding how to create a time dimension in ODI???
regards
GourisankarHi Gourisankar,
I am not aware of time dimension. But when i searched in metalink i got the below note. I am not sure whether it will help you or not but still a small contribution. :)
The note as follows,
To create new time dimensions, run the following SQL instructions :
* Example to generate a calendar between 1999-01-01 and 2007-12-31 one row per day
SELECT to_date('1999-01-01','YYYY-MM-DD')+rownum
FROM DUAL
CONNECT BY
ROWNUM<=to_date('2007-12-31','YYYY-MM-DD')-to_date('1999-01-01','YYYY- MM-DD');
* Example for generating a calendar random number
SELECT DBMS_RANDOM.VALUE
FROM DUAL
CONNECT BY ROWNUM<=1000000;
May be you can create a VIEW out of this query ,reverse it and use that as a source in your interface.
Try this and let me know.
Thanks,
G
Edited by: Gurusank on Dec 22, 2008 4:19 PM -
Creating universe from MySql stored procedure?
Hi,
I am new to BusinessObjects. I need to create universes based on the schema in our MySql database. However, when I tried to create one from a stored procedure, I fount that I wasn't allowed to do that or the option to insert a stored procedure was grayed out.
Is it true that universe creation from MySql stored procedures not supported, or is it just something I didn't do right? Is there any workaround?
Thanks in advance!jason Lee,
You cannot combine universes with table structures with that of the stored procedures.Thats the reason in the existing universe the option is greyed out to insert stored procedures. You need to create a new universe thru design wizard and check the option to "create a universe through the stored procedure" in the first page.
Let me know your results
Thanks,
Karthik -
How to create production version & Explain with procedure
how to create production version & Explain with procedure
MadanHi Madan,
Production Versions are used to describe the production process to be used for planned / production order.
Why is it required?
Suppose you have 2/3 production lines and 2/3 alternative BOMs to produce one Finished Goods.
How system will come to know which BOM and Routing to be used. This is done thru Prod.Version.
In production version we maintain the combination of BOM and routing.
Also it can be designed with lot size or validity period.
Go to MM02--->MRP4 / Work scheduling view -
> Prod.Version.
Enter the validity period and lot size. and the production version should be unlocked.
After entering the reqd. routing no. and BOM alternative , carry a check.
After getting the Green signals ,Continue.
Thus you have saved the prod. version.
Mass processing TCode- C223.
Hope it would clarify you the basic of production version. -
Creating Threads in Java Stored procedures
Can I create threads inside Java Stored procedures?
or is there a restriction?
Thanks
KalCan I create threads inside Java Stored procedures?
or is there a restriction?
Thanks
Kal Hi Kal,
I don't mean to be rude, but have you tried it? Personally, I
haven't tried it (since I didn't have the need).
You don't say what version of Oracle DBMS you are using, but I
am using 8.1.7.3 on Solaris 7, and according to Oracle's
"Oracle 8i Java Developer's Guide", there is no restriction
(of-course, that depends on what you call a "restriction" :-)
http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/java.817/a83728/03writ11.htm#1003094
Hope this helps.
Good Luck,
Avi.
Maybe you are looking for
-
Can Apple Remote Desktop force a client to netboot?
Is there a way that ARD can make the machines boot directly to netbooting, without having to visit each machine and holding down the "N"?
-
When I load different flash movies in the same image-control (e.g. via a button-click), the browser-cursor starts switching from a busy-cursor (the little round clock-cursor) to an arrow (or hand)-cursor intermittingly, without stopping. When I load
-
How to programmatically set the real-time CVI startup DLL?
Dear NI Support Engineer: I'm part of a team of software engineers working on a real-time aerospace app at Honeywell (Coon Rapids, MN campus). We're using LabWindows/CVI 9.0 and three LabView 8.6 real-time modules. Up until now, we've been using the
-
Change font of autogenerated email
Hi Folks, I have another question and because of points being granted for the correct answers, I did not include in the previous post. When any users register on a site, we send them an email to activate the account and verify their email from the
-
Hey guys, I have a little problem. I have an English language macbook white. However I'm going to move to germany in a few months (business related). I will be using my macbook over there but I need some kind of way to get around using german keyboar