Scheduler :: Procedure In Job Takes Less Time When Executed Manually

Apr 25, 2013

I am using oracle 9.2.0.8 on RHEL 4.8 (64-bit). I have this one job in database that takes almost 12-15 minutes to execute but when I execute procedure in that job manually, it executes in one minute. Even when no other job is running in database, it takes more than 10 minutes to execute.

View 1 Replies


ADVERTISEMENT

Procedure In A Job Takes Less Time To Run When Executed Manually

Apr 25, 2013

I am using oracle 9.2.0.8 on RHEL 4.8 (64-bit). I am facing a strange problem. I have this one job in database that takes almost 12-15 minutes to execute but when I execute procedure in that job manually, it executes in one minute. Even when no other job is running in database, it takes more than 10 minutes to execute.

View 1 Replies View Related

What Happens When UNDO Space Is Full / Transaction Takes More Time To ERROR

Jan 26, 2011

I have a long running transaction (more than 3 hours), and at the same time other operations are occurring on different tables, using the same UNDO space.

Sometimes we see ORA-30036, but this error occurs very late in the process. The transaction normally takes 3 hours, but when UNDO space is full, we do not get ORA-30036 upto 8 hours or 9 hours of process.

I am wondering what could be happening in the background, when UNDO space is full, which makes the transaction to extend upto 8 hours or 9 hours (pl. note, this transaction gets completed within 3 hours normally). This is in 11g, UNDO space is managed manually.

View 2 Replies View Related

Server Utilities :: Impdp Takes Huge Time In Oracle11gR2

Feb 13, 2012

1) My database dump size near about 4GB , which is provided by the vendor .
2) In the dump , total objects are 364949 , where

Table : 121316
LOB object : 121315
(Normal+LOB) indexes : 122317

3) Now when I run the import using system or another user , it hangs on the below stage for 70+ hours ..

impdp ntest/ntest directory=test_dir dumpfile=JBLLIVE.31Jan2012.11.50AM.dmp remap_schema=JBLLIVE:NTEST logfile=ntest_10feb.log

Import: Release 11.2.0.1.0 - Production on Fri Feb 10 09:49:50 2012

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "NTEST"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "NTEST"."SYS_IMPORT_FULL_01": ntest/******** directory=test_dir dumpfile=JBLLIVE.31Jan2012.11.50AM.dmp remap_schema=JBLLIVE:NTEST logfile=ntest_10feb.log
Processing object type SCHEMA_EXPORT/USER
ORA-31684: Object type USER:"NTEST" already exists
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
----
In this situation I observed the worker status and see that some table and some LOB objects including LOB indexes are imported . Worker process do it in background but it does not show in the front import log file (I dont understand why it not shows in the import logfile). it imports one table,one LOB , one LOB index ..then again one table,one LOB , one LOB index ... in this way .

And my observation first it inserts data into the LOB tables and then it inserts into normal table . And when it is starting to insert data to the normal table then this table's log are shown in the import logfile.

an example of our data type :

Objects :
===================================================
LOB_FD17_RGS_TSTCD2 LOB
FD17_RGS_VERSION TABLE

(here i see one table has one LOB segment, in this way 121316 table has 121316 LOB)

SQL> desc FD17_RGS_VERSION
Name Null? Type
----------------------------------------- -------- ----------------------------
RECID VARCHAR2(255)
XMLRECORD BLOB

Our observation perhaps inserting blob mainly occurs the slowness . Is there any patch or is there any bug regarding BLOB/LOB objects in oracle-11gR2

View 6 Replies View Related

Takes Long Time To Drop Tables With Large Numbers Of Partitions

Jul 17, 2013

11.2.0.3 This is for a build. We are still in development. No risk of data loss. As part of the build, I drop the user,re-create it, re-create the objects. Allows us to test the build all the way through. Its our process. This user has some tables with several 1000 partitions. I ran a 10046 trace and oracle is using pl/sql to do loops to do DML against the data dictionary. Anyway to speed this up? I am going to turn off the recyclebin during the build and turn it back on. anything else I can do? Right now I just issue 'drop user cascade'. Part of is the weak hardware we have in the development/environment. Takes about 20 minutes just to run through this part of the script (the script has alot more pieces than this) and we do fairly frequent builds. I can't change the build process. My only option is to try to make this run a little faster.

View 3 Replies View Related

SQL & PL/SQL :: Stored Procedure That Takes List Of IDs As Input Parameters

Oct 22, 2010

I need a stored proc that takes list of ids as input parameters. For all these Ids. the proc will send out data from another table as out ref cursor. Sounds very simple yet I am stuck with how do I pass the input list of ids.

View 3 Replies View Related

Database SQL Statement Executed Time

Oct 23, 2008

If I like to identify the executed time of a particular SQL Statement, beside v$sql, is there any other dictionary or lookup table that have this piece of information?

Why v$sql is not sufficient, because this is a recurrsive update statement which is regularly called, and thus the last_load_time is overwritten.

My archivelog had been purged due to our scheduled backup.

Is there any other way to identify when the particular SQL statement is executed?

View 4 Replies View Related

SQL & PL/SQL :: Same Query Taking Different Time When Executed Through Different DBs?

Feb 19, 2013

I have a query which is executing fast in dev env,but very long time in qa env.What is the criteria when this behaviour occurs.Though qa is having more data than dev.But still it is taking long time for 1 rows also.When I am using the query rownum<=1.So What to check for this.

View 6 Replies View Related

PL/SQL :: How To Run A Scheduler Using Scheduled Time

Jun 5, 2013

-- Scheduler details

BEGIN
dbms_scheduler.create_schedule( 
schedule_name  => 'INTERVAL_EVERY_1_MINUTES', 
start_date    => trunc(sysdate)+18/24, 
repeat_interval => 'freq=MINUTELY;interval=1', 
comments     => 'Runtime: Every day all 1 minutes'); 
END;-- program code
BEGIN     

[code]....

all above three code compiled successfully . but it is not running automatically and not run every 1 minute.

I try to run this manuall by using following code

BEGIN
dbms_scheduler.run_job('JOB_FEED_UK_DATA',TRUE);
END;

It works fine..

create or replace
PROCEDURE LOAD_CUSTOMERS_UK
IS
BEGIN
  Insert into CUSTOMERS_UK (ID, NAME, CITY)  VALUES (1,'SMITH','LONDON');
  Insert into CUSTOMERS_UK (ID, NAME, CITY)  VALUES (2,'JONES','LONDON');
  Insert into CUSTOMERS_UK (ID, NAME, CITY)  VALUES (3,'BROWN','BRIGHTON');

[code]....

View 12 Replies View Related

Scheduler And Report Time Conflict

Dec 4, 2012

We have scheduled some Jobs such as monthly, semi-annually reports using dbms_scheduler. we use 10gR2 software and windows 2003 server. we have a report which supposed to run at 4:00 AM and as soon as the report finishes it sends the report as email to the authorized users. when the scheduler ran the report inside the report it shows as ran at 3:08 AM where they get systimestamp. but when i query the

select last_stat_time, next_run__date from dba_scheduler_jobs where job_name ='TEST';

last_start_time next_run_date
03-DEC-12 04.00.00..223000 AM -04:00 07-JAN-13 04.00.00..200000 AM -04:00

when I query systimestamp from dual on that database from sqlplus:
i get the following:
systimestamp
04-DEC-12 07.40.16..152000 AM -05:00

I see the difference of -04.00 and -05.00 from both of the queries. i know the systimestamp from dual is correct. how to I fix the scheduler Job to run at the correct time with daylight savings to take effect?

View 3 Replies View Related

Export/Import/SQL Loader :: Table Import Takes Long Time And Still Running?

Jun 22, 2012

MY DB Version: 10.2.o

OS: Windows Server 2003

I am trying to import on table which i have the export dump file which i take using expdp previously when i load that table on the same host

by using below command:

expdp scott/tiger@db10g tables=EMP,DEPT directory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=expdpEMP_DEPT.log

after that i zip that dump and move it to external usb and now i need that table i copy that table and unzip that that dump

Command i am using to do the import is :

impdp scott/tiger@db10g tables=EMP,DEPT directory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=impdpEMP_DEPT.log

But the query of import is still runing even not showing any amount of rows to be imported.

i already make the tablespace in which the table was previosuly before dropping but when i check the sapce of tablespace that is also not consuming one error i got preiviously while performing this task is:

Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
Master table "CDR"."SYS_IMPORT_TABLE_03" successfully loaded/unloaded
Starting "CDR"."SYS_IMPORT_TABLE_03":  cdr/********@tsiindia directory=TEST_DIR dumpfile=CAT_IN_DATA_042012.DMP tables=CAT_IN_DATA_042012 logfile=impdpCAT_IN_DATA_042012.log

[code]....

i check streams_pool_size it will show zero and then i make it to 48M and after that

SQL> show parameter streams_pool_size;
NAME                                 TYPE        VALUE
-----------
streams_pool_size                    big integer 48M

But still it takes time

View 13 Replies View Related

SQL & PL/SQL :: Activities When Procedure Executed

Sep 6, 2010

when a procedure, package or function is executed which part of oracle code gets loaded, where the values of the variables are stored etc. When a package is loaded in the memory does specification and body both gets loaded?

How can I found how much memory is required to execute a procedure? consider oracle architecture (SGA, PGA, UGA etc.)

View 3 Replies View Related

Performance Tuning :: How To Find Out Queries That Are Executed In Particular Range Of Time

Sep 9, 2011

here we have an scenario where we want to find out all the sql statements that are executed in a particular time. The sql statements are executed via our application. I tried in awr report but it shows only the sql query which has taken long time to execute. and i even tried in V$session and V$sqlarea. how to view the executed sql statements in a particular session/current session

View 3 Replies View Related

PL/SQL :: O/P Not Displaying While Procedure Is Successfully Executed?

Apr 4, 2013

I m executing below PLSQL procedure . Its getting executed successfully but not displaying the O/P. I have set serveroutput on also.

set serveroutput on

DECLARE
   lc_file_handle        UTL_FILE.file_type;
   lc_file_dir           VARCHAR2 (100);
   lc_file_name          VARCHAR2 (50);
  
[code]...

View 14 Replies View Related

SQL & PL/SQL :: ORA-04067 Not Executed / Procedure Does Not Exist?

Jul 25, 2011

I am facing error in application.

ORA-04067: not executed ,procedure "BALA.SEQ_RR_ID" does not exist.

This procedure exist in database.There is one synonym with the name also exist in database.

View 7 Replies View Related

Workflow :: Run Procedure Manually For Testing Purpose

Oct 23, 2012

i want to run this procedure manually for testing purpose

procedure Reject_Doc(itemtype in varchar2,
itemkey in varchar2,
actid in number,
funcmode in varchar2,
resultout out NOCOPY varchar2 )

what are the possible values for the variables itemtype,itemkey, actid,funcmode?

View 3 Replies View Related

Executed Procedure - Buffer Overflow Error

Nov 16, 2011

when i am executing the procedure, i am getting the below error.

I have added below lines in the procedure.

DBMS_OUTPUT.ENABLE(100000);

Even though i am getting the error.

ORA-20000: ORU-10027: buffer overflow, limit of 100000 bytes
ORA-06512: at "SYS.DBMS_OUTPUT", line 32
ORA-06512: at "SYS.DBMS_OUTPUT", line 97
ORA-06512: at "SYS.DBMS_OUTPUT", line 112
ORA-06512: at "Procedure name", line 199
ORA-06512: at line 1
20000. 00000 - "%s"

*Cause: The stored procedure 'raise_application_error' was called which causes this error to be generated.

*Action: Correct the problem as described in the error message or contact the application administrator or DBA for more information.

View 6 Replies View Related

Scheduler :: Schedule A Procedure In Oracle

Sep 22, 2012

OS:Windows Server 2008
Database:Oracle 11gR2

I want to schedule a procedure in oracle and not from the Tash scheduler utility.Is there any way to schedule the procedure at database level.I want to run the procedure daily at specific time.

View 2 Replies View Related

When Executed Procedure SEND_MAIL / Recipient Is Not Receiving Mail

Jul 7, 2011

I created the following procedure in my local database.When I executed the procedure SEND_MAIL, recipient is not receiving mail.Do I need any setup in my database?

here is my procedure.
CREATE OR REPLACE PROCEDURE SEND_MAIL (
msg_to varchar2,
msg_subject varchar2,
msg_text varchar2 )
IS
c utl_smtp.connection;
rc integer;
msg_from varchar2(50) := 'Oracle11.2';
mailhost VARCHAR2(30) := '10.137.133.18'; -- local database host
[code]....

View 3 Replies View Related

SQL & PL/SQL :: ORA-01010 - Invalid OCI Operation During SCHEDULER Job Procedure That Selects From Database Link

Oct 18, 2012

The Oracle DB in question is 11.2.0.1, x64, Server 2008.I also have a SQL Server 2005 database that runs a third party product, "PaperVision", which we use to manage documents of various kinds. This SQL Server server is also Win 2008, x64.Now, on the server that runs SQL Server, I have a simple view which is defined as such :

select DOCID,
DOCINDEX1,
DOCINDEX2,
DOCINDEX3,
DOCINDEX4,
DOCINDEX5,
DOCINDEX6,
DOCINDEX7,
DOCINDEX8,
[code]....

This view works great from the SQL Server side. I also created a database link from Oracle to the SQL Server machine, and it also works great.It is defined as such :

CREATE PUBLIC DATABASE LINK PVE_SQLSERVER
CONNECT TO EVP_PVE_USER
IDENTIFIED BY <PWD>
USING 'PVE_SQLSERVER';

Where EVP_PVE_USER is a user created on the SQL Server machine with rights to select from this view.I know it works because I get results with a sql command like :

select * from VW_PVE_DOCS_1_1@PVE_SQLSERVER;

I also created a view on the Oracle server that refines this information. It is defined as such :

CREATE OR REPLACE FORCE VIEW EVPDBA.VW_PVE_CONTRACTS_INALERT
(
DOCID,
EFFECTIVE_DATE,
EXPIRATION_TYPE,
ALERT_PERIOD_START,
ALERT_PERIOD_END,
ACRONYM,
[code]....

This view also works fine, i.e., I can select * from it from the sql command line.Now, the problem comes in when I need to run a procedure that processes this view every night and/or week.I have stripped everything out of this procedure that is not relevant, and it is defined as such for this forum :

CREATE OR REPLACE PROCEDURE EVPDBA.TESTME
is
tnum number := 0;
begin
select count(*) into tnum from VW_PVE_CONTRACTS_INALERT;
end;
/

If I execute this procedure from the sql command line, all is well.When I run it from a scheduler job, I get

ORA-01010: invalid OCI operation
ORA-02063: preceding line from PVE_SQLSERVER
ORA-06512: at "EVPDBA.TESTME", line 5
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_ISCHED", line 185
ORA-06512: at "SYS.DBMS_SCHEDULER", line 486
ORA-06512: at line 1

I am aware that DBMS_SCHEDULER performs a commit when scheduling a job, however, this is not scheduled from a trigger.I scoured the forums and have found a few things that seemed relevant, but not much. One had to do with the version of the JDBC driver between two Oracle databases, but I wonder if the age difference between Oracle 11 and SQL Server 2005 (Express) might be an issue. The fact that all command line select statements and running the procedure work fine implies to me that there is an additional issue raised due to the scheduler.

The other posts I found talked about performing a commit just before any select that ultimately pulls across a db link. I did this, and still no luck.One other useful fact - the job appeared to run succesfully at 5am, yet trying again at 8am threw the error, so it may be sporadic. (Although during regular daytime hours it is a very repeatable error).

I am looking into reformatting things to use the older DBMS_JOB, however, I really like the log history of job details and other functionality available with SCHEDULER.

View 5 Replies View Related

Scheduler :: How To Add Email Notifications To A Scheduler Program

Aug 9, 2013

We have a scheduler chain that calls 2 scheduler programs.The chains are controlled by a scheduler job that has job_type as CHAIN.My challenge is how to add email notifications on the failure or success of the programs.

I know about this procedure DBMS_SCHEDULER.ADD_JOB_EMAIL_NOTIFICATION, but this is only applicable to jobs and not programs(i believe). Is there an alternative way to trigger off emails for scheduler programs ?

View 0 Replies View Related

How To Set Time Limit For A Procedure

Mar 1, 2009

I want to write a procedure in such a way that the code in the proceduce should finish its work with in a given amount of time other wise it should exit from the procedure.

For example....

i am fetching data from a table and inserting into another table and i want ot finish this task within 10 mins if it does not i need to exit from the procedure.

View 1 Replies View Related

Block Of Procedure Taking Time To Execute

Feb 9, 2011

I have connected to the database from two sessions

Box 1 : i have executed a procedure.it took few seconds to get executed

Box 2 : I have executed a block of procedure.It is taking 1 min 40 secs to get executed.

why it is taking much time from Box2(for executing a block from procedure) , as the same code executed successfully in a procedure from Box 1.

View 2 Replies View Related

Performance Tuning :: Query Takes More Than 30 Minutes To Return Data

Aug 10, 2012

The below query takes more than 30 minutes to return data.All the objects used are views. There is no direct reference to any table.The views with _mnth_ have data for 7 distinct months. The base table for all the views have a composite PK on the columns AR_ID (or ACCT_AR_ID),MSRMNT_PRD_ID

I need the order by, as the query is part of informatica code, and the order by works in the further processing.

SELECT ac.ar_id AS acct_ar_id, m.msrmnt_prd_dt AS msrmnt_prd_dt
--removed the rest of column list to reduce size of code.
FROM edxf.ar_rsrv_mnth_v ac,
edxf.crdt_acct_mnth_v c,
edxf.crdt_acct_v ca,
(SELECT msrmnt_prd_id, msrmnt_prd_dt
FROM edxf.msrmnt_prd_v
WHERE msrmnt_prd_id =
[code]....

Also, the count of data in the views is as below.

ViewTotal countCount for 1 msrmnt_prd_id
---------------------------------------------------------
ar_rsrv_mnth_v1841892281945
crdt_acct_mnth_v664941457087369
crdt_acct_v12258728NA

View 7 Replies View Related

SQL & PL/SQL :: Removal Of Time In Input Parameter In Stored Procedure?

May 15, 2011

I'm creating a stored procedure wherein I'm the field wherein I will use for date input parameter is having a datetime format.

The format that we need for user's to input is 'DD-MON-YYYY' (without the minutes and seconds.)

how should I proceed with the creation of stored procedure for this?

View 2 Replies View Related

SQL & PL/SQL :: Schedule Procedure On Days Of Week At Specific Time?

Apr 12, 2010

I need to schedule a procedure on SUN, MON,TUE, WED and THU at 6:30 AM. make sure the folloiwng code is o.k.

begin
dbms_scheduler.create_job
(job_name => 'Load-Data_Calc',
job_type => 'STORED_PROCEDURE',

[code]...

View 5 Replies View Related

Performance Tuning :: Query With Nested Loop Takes 6 Hours To Complete

Jun 23, 2011

I'm joinging two tables event_types and tmp_acc tables.

event_types contains 2 Billion records
tmp_acc contains 20,000 records.

Resulting rows are about 300,000 records in event_types table end_t and account_obj_id0 are joined indexed

no indexs in tmp_acc.

When I run below query with nexted loop it takes 6 hrs to complete. But when I run with hash join even after 4 days it was still running. what is wrong with hash join here. Why it takes so long. I'm joining only 20000 rows. So I think there should be a way to get result rows quickly.

show parameters hash_area_size

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
hash_area_size integer 2097152

explain plan for
select --+ parallel(e,6)
[code]....

View 21 Replies View Related

PL/SQL :: Stored Procedure Taking Long Time When Updates In Loop

Feb 5, 2013

This is my stored procedure

I have below store procedure:

create or replace
PROCEDURE TESTPERFORMANCE (
o_statuscode OUT NUMBER,
o_statusdescription OUT VARCHAR2,
starttime out timestamp,
time_after_query_TESTJOB out timestamp,

[Code]...

This procedure is taking around 35 minutes when there are 35000 records to loop over (i.e cursor has 35000 records) and TESTJOBTRANSACTIONS table has 90000 records. How to reduce execution time.

View 12 Replies View Related

PL/SQL :: Select On View Takes Long On Definition Short - No Difference In Exec-plans?

Aug 20, 2012

[URL]...

I have a quite complex view that selects from approx 10 long tables (approx 4M records each) and build one "customer sentence" pre customer id. I will be always getting just one row from this view, eg. select * from my_view where party_id = XYZ. I'll NEVER EVER select the whole view.

The problem is that running a query:
select * from my_view where party_id = XYZ takes really long time, while putting the party_id = XYZ condition directly into the view executes in 0.0 seconds.

After putting a ORDERED FIRST_ROWS(1) hint into a view the execution plans seems to be the same (or very similar) for both queries. Unfortunately, I can not transfer anything but screenshot from the environmnet - therefore I paste the exec plans as screenshots only - pls follow the link: [URL]...

View DDL:
create or replace view my_view as
select /*+ ORDERED FIRST_ROWS(1) */  pt.party_id
           pt.party_id as id_klienta_mdm,
           pt.master_reference_no as id_klienta_ref_mdm,
        
[code]...

View 6 Replies View Related

DB Creation Manually?

Oct 19, 2012

Just started to learn oracle DBA. I am creating database manually.. I am facing following errors

I executed catproc.sql script it was running suddenlt oracle throwd following error.

CODEPL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
Package body created.

No errors.

Package body created.

BEGIN
*
ERROR at line 1:
ORA-01552: cannot use system rollback segment for non-system tablespace 'TEMP'
ORA-06512: at "SYS.DBMS_STATS", line 13210
ORA-06512: at "SYS.DBMS_STATS", line 13517

[code]...

Script detail's

CODECREATE  DATABASE drprod
       LOGFILE GROUP 1 ('/u01/app/oracle/oradata/drprod/redo01.log') SIZE 100M ,               GROUP 2 ('/u01/app/oracle/oradata/drprod/redo02.log') SIZE 100M
  MAXLOGFILES 5
  MAXLOGMEMBERS 5

[code]...

View 14 Replies View Related







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