SQL & PL/SQL :: DBMS_JOB Not Executing On Time?

Jul 30, 2012

I've defined DBMS_JOB in Oracle it is not starting on time. As per query it should start at 09:00 PM as given below.

SQL> SELECT TRUNC(SYSDATE) + 21/24 FROM DUAL;

TRUNC(SYSDATE)+21/24
--------------------
7/31/2012 9:00:00 PM

But instead it was started on 7/31/2012 1:14:10 AM. Which is wrong.

Following is script which I am using to submit this job.

DECLARE
X NUMBER;
BEGIN

[Code]....

View 6 Replies


ADVERTISEMENT

DBMS_JOB Running At Wrong Time

Jan 7, 2013

We have a bunch of jobs scheduled using DBMS_JOB (yes, I know I should be using DBMS_SCHEDULER, but we haven't migrated there yet). We are running Oracle 11.2.0.3 on Windows Server 2003 x64.

For example, we have a job that is supposed to run every Wednesday at 20:00. The Interval we have set up is "NEXT_ DAY (TRUNC(SYSDATE), 'WEDNESDAY')+20/24". This has been working as intended. Today (Monday), however, the job kicked off at 11:52. It was the wrong day and the wrong time.

I don't see anything weird in my alert log. Where else should I check to figure out why this job ran today?

JOB     LAST_DATE     LAST_SEC     NEXT_DATE     NEXT_SEC     INTERVAL     WHAT
293     1/7/2013 11:52:46 AM     11:52:46     1/9/2013 8:00:00 PM     20:00:00     NEXT_DAY(TRUNC(SYSDATE), 'WEDNESDAY')+20/24     ACQUISITIONS.WORKLOAD_STATUS_UPDATE_NOTIF;

View 5 Replies View Related

SQL & PL/SQL :: How To Get Which Query Is Taking Time While Executing

Mar 2, 2013

How to find time log for query or any procedure like start time and end time and total time.

So that I can tune that queries properly.

Also how can we find estimated query running time.?

View -1 Replies View Related

SQL & PL/SQL :: Extract DDL Of DBMS_JOB

Dec 20, 2011

How to extract DDL of DBMS_JOB in sqlplus ?

View 30 Replies View Related

SQL & PL/SQL :: ORA-31603 When Using DBMS_JOB.SUBMIT

Jul 5, 2013

I'm using dbms_metadata.get_ddl inside a package and I have a problem: if I execute the package directly, like "exec pkg_util.read_ddl('TA_DL_IDP', 'RMI_KUNDE') it works fine.

If I submit the same procedure using DBMS_JOB.SUBMIT, I get an error: Err_ -31603 - MSG: ORA-31603: object "RMI_KUNDE" of type TABLE not found in schema "TA_DL_IDP"

I know that in order to use dbms_metadata.get_ddl I need to have SELECT_CATALOG_ROLE and I know about the necessity to give explicit grants to objects rather than using roles when running pl/sql code from inside a package, but this is different: the different behavior is between running the same package in foreground and submitting it using DBMS_JOB.SUBMIT.

View 1 Replies View Related

PL/SQL :: How To Run DBMS_JOB In Parallel And Serial

Jul 26, 2012

I have total 8 procedure to run in parallel . and after that my 9th procedure should run.

below is my job submission procedure

create or replace procedure DURATION_ALARM_WEEKLY as
l_job number ;
begin
dbms_job.submit(l_job,'begin ALARMS_WEEKLY_CALL_OUT ; end;');
dbms_job.submit(l_job,'begin ALARMS_WEEKLY_CALL_IN ; end;');
dbms_job.submit(l_job,'begin ALARMS_WEEKLY_DURATIN_OUT ; end;');
[code].......

what is the syntax I have to do in my FINALE procedure . using DBMS_ALERT.REGISTER , DBMS_ALERT.WAITANY .....?

View 9 Replies View Related

Starting A Function In Parallel Using DBMS_JOB

Jun 30, 2011

We have Data Migration for our application coded in PL/SQL. The DB server has 64 Cores available (Solaris 10 OS) however running the migration code written as a function, utilizes very little CPU and CPU utilization is to max 2%. To utilize CPU power available to increase the speed of migration, we are using DBMS_JOB to schedule this function multiple times.

However scheduling the function 10 times, we are seeing that at any moment only 4/5 oracle processes are active and utilizing the CPU and CPU utilization has gone up to 5-6%. The speed of migration is increased but not to a great extend which I feel would work if we could utilize more CPU.

I see a parameter job_queue_processes is set to 10 currently in the database and am planning to increase this (currently to 25 as I don't have exact count of how many other jobs may be running in the database).

View 1 Replies View Related

Server Administration :: DBMS_JOB Using Sys Account

Jun 17, 2010

I have to change the execution of a job, I have the sys access.The job is in another user, say scott.how to use dbms_change using sys account to change the execution of a job in Scott user..

View 9 Replies View Related

SQL & PL/SQL :: DBMS_JOB / Maximum Number Of Failures A Job Can Allow

Mar 9, 2010

What is the maximum number of failures a job can allow,when we are scheduling jobs using DBMS_JOB.

View 1 Replies View Related

SQL & PL/SQL :: Dbms_job.submit How To Receive Output

Jan 2, 2011

Discreet use of dbms_job.submit (to call a procedure), can be used to multi thread several instances of same proc in pl sql. I am able to do it.The problem is that dbms_output.put_line of the proc which is multi threaded does not reflects in the outer proc (the proc which parallels this proc and then waits for their completion).How do I receive the output?

View 3 Replies View Related

PL/SQL :: Enable Dbms_job To Run On Every Day At 4am Excluding Fridays?

Jun 7, 2013

how to enable dbms_job to run on every day at 4am excluding Fridays.

View 7 Replies View Related

DBMS_JOB.SUBMIT Can Pass Dynamic Argument Procedure

Aug 10, 2010

'Can we pass a dynamic collection variable to the procedure that is called from dbms_job.submit'

I have a package my_package with:

1. record type: ocv_rec

2. collection type: varr_ocv_rec varray(100) of ocv_rec

3. record type: ext_id_rec

4. collection type: varr_ext_id_rec table of ext_id_rec index by pls_integer

5. procedure: analyze_error_152_ll

6. procedure: get_ext_ids_152(
v_db_ssa_dtl in varr_ocv_rec,
ext_id_type in varchar2,
ext_ids out varr_ext_id_rec)

Now here is where the issue resides:Within the definition of analyze_error_152_ll (in body of my_package), I call get_ext_ids_152 using dbms_job.submit

procedure analyze_error_152_ll
is
vJob varchar2(400);
vJobNum binary_integer;
v_db_ssa_dtl2 varr_ocv_rec := varr_ocv_rec();
ext_ids varr_ext_id_rec;
ext_id_type varchar2(5) := '(1)';
/*OTHER DECLARATONS*/

[code]......

View 7 Replies View Related

Server Administration :: Find Last Run Duration Of Job Which Was Scheduled Using DBMS_JOB

Jun 20, 2010

Is there any way to find the last run duration of a job which was scheduled using DBMS_JOB?

View 3 Replies View Related

Server Administration :: Advantages Of Using DBMS_schedular Ovet Dbms_job

Oct 11, 2012

we had one problem one of oracle job scheduled using dbms_job was inactive for so long time,As one of our developer noticed this and reached me as i checked the dba_job was running without an process

SQL> select sid,serial#,paddr from gv$session where osuser='oracle';

SID SERIAL# PADDR
---------- ---------- ----------------
626 753

i suggested a developer to drop job and reschedule it,now question was raised from them why process was not allocated to job.

View 6 Replies View Related

Server Administration :: DBMS_JOB Restarting / Database Shutdown

Aug 8, 2010

I was monitoring a database job to collect statistics, it was scheduled using DBMS_JOBS..I found that it was running during business hours so i got the session ID of the job using;

select sid from dba_jobs_running where job=11;

I then i killed the job using;

select serial# from v$session where sid =232;
alter system kill session '232, 10852';
select sid from dba_jobs_running where job=11;

no rows selected...After some time i again fired the same command

select sid from dba_jobs_running where job=11;

SID
----------
232

and found that the same job is again running..This behavior was repeated again N again. i have attached the spool file for the same...

what could be the reason that the job is starting all over again even after killing the session and what should be done to stop it..I understand that once the database shuts down and if the job is still running then it will restart once the database is up..In this case, Should i remove the job and re submit it again..

View 8 Replies View Related

DBMS_JOB - Pass Date As Parameter To Another Stored Procedure?

Mar 28, 2012

I have created a stored procedure that checks if a file exists and gets a date from the file if it exists. The date is then used as a paramter. See below:

CODEcreate or replace
PROCEDURE                     "P_Load_Stamp" AS
v_exists BOOLEAN;
v_length NUMBER;
v_blocksize NUMBER;

[code]...

The above codes works perfectly and I scheduled it using SQLPLUS as follows:

CODEvariable jobno number;
variable instno number;
begin
select instance_number into :instno from v$instance;

[code]...

My problem is that I need to pass the date from the above procedure as a parameter to another stored procedure. So I modified my code as follows (the parts in red):

CODEcreate or replace
PROCEDURE                     "P_Load_Stamp" (vCTIDATE OUT varchar2) AS
v_exists BOOLEAN;
v_length NUMBER;

[code]...

Now it doesn't strike me as a rights issue since I created it in the schem schema. What could I be doing wrong here?

View 1 Replies View Related

Performance Tuning :: Can Limit Dbms_job To Use Defined Amount Of CPU%

Dec 14, 2010

I am creating 5 dbms_job at run time in side a stored procedure.But when I execute that procedure, all the job get 100%cpu and as a result other process does not get response. so my question is can we limit the dbms_job to use a defined amount of cpu%.

View 9 Replies View Related

SQL & PL/SQL :: Executing SP Using Jobs

Sep 3, 2010

how to execute one stored procedure for every 10 minutes using oracle jobs

sp name: abc

using anonymous block with sample code.

View 10 Replies View Related

Executing WHOLE Package (of Procedures) At Once?

Aug 30, 2007

I could execute a package for eg if i had a package with procedures related to statistics and i run them each night, could i just do an exec on the package and it would run all those procedures??

Its not possible but i could call each procedure from ONE procedure

View 2 Replies View Related

Executing Function From Ksh Script?

Mar 5, 2009

I don't know how to control if a call to a PL function return errors.

I have this ksh:

executeFunction () {
echo "[executeFunction ]-> Phoebus DB started"
sqlplus -s /nolog <<!EOF!
CONNECT $USER/$PWD@$DB
@/sql/ejecutaFuncion.sql
EXIT;
!EOF!
}
executeFunction

And the code of "ejecutaFuncion.sql" is:

executeusers.startProcessing();
EXIT

How i can controle if the "startProcessing" function has any problems from the ksh?

View 1 Replies View Related

Getting Errors While Executing Procedure

Oct 4, 2010

I am getting errors while executing the following block.

create TYPE c_Rec as object(a VARCHAR2(1), b NUMBER);
DECLARE
-- TYPE c_Rec as object(a VARCHAR2(1), b NUMBER);
TYPE c_collection IS TABLE OF c_Rec;
l_coll c_collection := c_collection();
BEGIN
[code]........

error

06530. 00000 - "Reference to uninitialized composite"

View 1 Replies View Related

Executing Function In A Package?

Mar 24, 2008

I have created one function in the package.

function : Tier_wh
package : Order_DESC

Function defined as

function TIER_WH( message in out Xorder_desc)
...
...
end;

Xorder_desc is defined as

create or replace type Xorder_desc type
(order number(10),
location number(10),
wh varchar2(20)
);

how to execute this function which is defined in the package .

View 1 Replies View Related

SQL & PL/SQL :: Executing Rows With Previous Row

Nov 3, 2010

i have tablestructure like this

empno ename sal
1 sam 1000
2 tom 2000
3 ric 3000
4 mac 4000
5 doy 5000

i want TO WRITE SELECT QRY WHICH WILL GO like this

empno ename sal prevemp prevename presale
1 sam 1000 0 0 0
2 tom 2000 1 sam 1000
3 ric 3000 2 tom 2000
4 mac 4000 3 ric 3000
5 doy 5000 4 mac 4000

means when each current row executes it shld show details from previous row also means when details of tom is executing it also shows sam details

View 4 Replies View Related

SQL & PL/SQL :: Executing Merge Statement?

Jul 18, 2011

how to use the MERGE Statement. actually I've used oracle Merge Statement before and it works very well. However today I tried to use and perform a command like that:

Merge into myTable mt using ( select 'data' field1, 'data2' field2, ect from dual
union
select 'data' field1, 'data2' field2, ect from dual
union

[code]...

This has not worked.What am I doing wrong?What could I do to solve this problem and axecute this statement sucessfully?

View 3 Replies View Related

Forms :: Executing Program BAT In Another PC In 10g?

Oct 20, 2010

I have forms 10g and use oracle database11. I have a form and I need to execute a program x.bat in another PC.

View 2 Replies View Related

PL/SQL :: Executing Procedure Using Variables

Feb 6, 2013

I'm trying to execute a procedure within a Declare/Begin/End statement and using variables as input parameters in my procedure but I keep on getting an Invalid SQL Statement Error. My code is below:

declare

  START_dt  VARCHAR2(30);
  END_DT VARCHAR2(30);
 
  begin
       
    SELECT '01-APR-2011'
    INTO END_DT
    FROM DUAL;
 [code]....

The table the procedure is pulling data from doesn't have proper date/time stamps but my procedure takes the varchar dates above and turns them into dates in the procedure so the input date parameters are left as just string characters.

View 6 Replies View Related

What DML / DDL Command A User Is Executing

Sep 9, 2012

is there anyway to know that what dml/ddl command a user is executing and on which table the impact is taking place?

View 2 Replies View Related

Dbms Job Is Not Executing Automatically

Aug 11, 2011

Database 1(sm01):
=============
oracle, 9.2.0.6

there are 4 jobs scheduled in oracle dbms_job. 3 jobs will run everyday at 4.00AM. 1 job will run at every hour.Daily jobs are running fine. But hourly job is not executing automatically. If forced (exec dbms_job.run(<enter here job number>), this execute fine.

job_queue_processes=5
total jobs in schema=2503
total jobs in db = 2614

Even there are many jobs scheduled, next_date for 2234 jobs are lesser than the sysdate. Again in 269(2503-2234) jobs, 2265 are having NULL in the interval column.

Database 2(sm02):
=============
oracle, 9.2.0.6

there are 4 jobs scheduled in oracle dbms_job. 3 jobs will run everyday at 4.00AM. 1 job will run at every hour.All the jobs are not running automatically. If forced (exec dbms_job.run(<enter here job number>), these execute fine.

job_queue_processes=5
total jobs in schema=7
total jobs in db = 7

I planning to follow the below steps to avoid the above issue.

1.) Restart the job queue process by executing alter system set job_queue_processes=0

2.) Increase the value for the job_queue_processes.

3.) Restart the database

But I got stuck in the 2nd step. what value I need to put for this job_queue_processes parameter?

View 2 Replies View Related

Dynamically Executing A Select Command

Aug 4, 2010

How to dynamically execute a select command whether it is retrieved a single record or multiple record in oracle database 10g. i have tried with the command execute immediate but it was not successful.

is it possible can i delete or drop multiple tables in a single drop and delete statement.

View 5 Replies View Related

Forms :: Executing Query When Display Box Value Changes

Aug 24, 2010

In my form i have 2 datablocks, the first contains only a display item which is populated from a lov when a user presses a button. The second datablock shows a list of items which should be queried dependant on the value of the above LOV. What i thought i could do is on a post-change trigger for the display item is:

go_block('block_name');
do_key('execute_query');

However, i am told i cannot do these in a post-change trigger, how to acheive what I am looking. Would i perhaps have to create my own trigger somehow or is their a simplier way.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved