Resource execution time..

Hi gurus,
version:11.0.6.0
platform:windows 7
we daily execute around 170-180 sql queries to fetch data from different-different servers and also use spool function in each query to save the output onto csv file
but it take a lot time while execution .
example:-
spool FR-FM-020_MONITOR_HIGH_SERVICE_CLASS_CHANGE_CDR_[Day-1]-[Month-1]-[Year-1].csv;
select distinct served_msisdn,event_date,prev_rate_plan_key,rate_plan_key,transaction_datetime,transaction_amt,transaction_src_type_key,flexi_col_2,flexi_col_3 from orv5_etl.fct_in_transaction PARTITION(date_[Year-1][Month-1][Day-1]) where prev_rate_plan_key!=Rate_plan_key AND FLEXI_COL_3!='ACSUSER';
spool off;
spool PA-TR-020_AvsB_Outgoing_trunk_Local_Carry_International_[Day-2]-[Month-2]-[Year-2].csv;
SELECT /*+ parallel( r,8) */* FROM orv5_etl.fct_switch partition(date_[Year-2][Month-2][Day-2]) r WHERE flexi_col_1='Transit' AND out_tg_id_key IN
(SELECT outgoing_tg FROM tglist WHERE nature='Local')
AND SUBSTR (original_b_num, -9, 2) NOT IN (SELECT series FROM tglist WHERE nature='Local') and length(original_b_num)>=9;
spool off;
spool NE-FO-013_FILE_SEQUENCE_CHECK_MSC_MSS_RAMS_[Day-2]-[Month-2]-[Year-2].csv;
select file_name, COUNT(1) from orv5_etl.fct_switch PARTITION(DATE_[Year-2][Month-2][Day-2])
group by file_name;
spool off;
spool PR-PA-027_Review_activation_date_for_subscribers_on_SDP_[Day-2]-[Month-2]-[Year-2].csv;
SELECT SERVED_MSISDN,SERVED_IMSI,PROCESS_DATE_KEY,SUBS_BU_KEY,SRV_TYPE_KEY,SUBS_STATUS_KEY,FILE_NAME,RATE_PLAN_KEY,PREV_RATE_PLAN_KEY,SYS_ID_KEY,NE_ID_KEY,ACCOUNT_BAL,VALIDITY_DATE,FIRST_SEEN_DATE,LAST_SEEN_DATE,AGE_IN_NETWORK,DEACTIVATION_DATE,ACTIVATION_DATE,CUG_ID,FORFEITURE_DATE,POPULATION_DATE_TIME,FLEXI_COL_1,FLEXI_COL_2,PORT_ID_KEY
FROM ORV5_ETL.DIM_SUBS_IN PARTITION (DATE_[Year-2][Month-2][Day-2])
WHERE ACTIVATION_DATE IS NULL;
SPOOL OFF;
and as on (...170-180 sql queries)
what changes or method should i apply to execute my task fast.
any help would be complimentary..
regards
Edited by: abdul: on Jan 28, 2013 3:32 PM

Hi Abdul,
You need check below ..
1. Get AWR report & find top time consuming query
@?/rdbms/admin/awrrpt.sql
2. Explain plan of the top queries
3. Check the file system utilization or number of files present in that FS where you are storing csv
4. Check wait event of the session which is running those reports
col sql_text for a80
set pages 200
set line 900
col PROGRAM for a20
col MACHINE for a20
col CPU 9999999999
alter session set nls_date_format='dd-mon-yyyy hh24:mi:ss';
col event for a40
select *
  from (select /*+ rule */
         sa.sql_id,
         sa.CPU_TIME "CPU",
         s.sid "SID",
         s.serial# "SERIAL",
         s.program "PROGRAM",
         s.machine "MACHINE",
         sa.SQL_TEXT "SQL_TEXT",
         vp.spid,
         sw.event,
         s.logon_time,
         s.last_call_et / 60,
         s.username,
         s.status
          from v$sqlarea sa, v$session s, v$process vp, v$session_wait sw
         where sa.address = s.sql_address
           and sw.sid = s.sid
           and s.paddr = vp.addr
         order by CPU_TIME desc)
where rownum < 10;Thanks,
Ajay More
http://www.moreajays.com

Similar Messages

  • Resource plan to limit execution time

    Hi,
    I am using 11.1.0.7 database. Can anyone guide me how should i create a resource consumer group/resource plan and assign to my user "dev" so that any query run by this user should not take more than 10 minutes for execution and should abort if execution time exceeds 10 minutes.
    Thanks
    Salman

    BEGIN
    dbms_resource_manager.clear_pending_area();
    dbms_resource_manager.create_pending_area();
    dbms_resource_manager.create_consumer_group(consumer_group => 'mytest_group', comment => '', cpu_mth => 'ROUND-ROBIN');
    dbms_resource_manager.submit_pending_area();
    END;
    BEGIN
    dbms_resource_manager.clear_pending_area();
    dbms_resource_manager.create_pending_area();
    dbms_resource_manager.create_plan( 'MYTEST_PLAN', '');
    dbms_resource_manager.create_plan_directive(
        plan => 'MYTEST_PLAN',
        group_or_subplan => 'MYTEST_GROUP',
        comment => '',
        cpu_p1 => NULL, cpu_p2 => NULL, cpu_p3 => NULL, cpu_p4 => NULL,
        cpu_p5 => NULL, cpu_p6 => NULL, cpu_p7 => NULL, cpu_p8 => NULL,
        parallel_degree_limit_p1 => NULL,
        active_sess_pool_p1 => NULL,
        queueing_p1 => NULL,
        switch_group => 'KILL_SESSION',
        switch_time => 600,
        switch_estimate => false,
        max_est_exec_time => NULL,
        undo_pool => NULL,
        max_idle_time => NULL,
        max_idle_blocker_time => NULL,
        switch_time_in_call => NULL
    dbms_resource_manager.create_plan_directive(
        plan => 'MYTEST_PLAN',
        group_or_subplan => 'OTHER_GROUPS',
        comment => '',
        cpu_p1 => NULL, cpu_p2 => NULL, cpu_p3 => NULL, cpu_p4 => NULL,
        cpu_p5 => NULL, cpu_p6 => NULL, cpu_p7 => NULL, cpu_p8 => NULL,
        parallel_degree_limit_p1 => NULL,
        active_sess_pool_p1 => NULL,
        queueing_p1 => NULL,
        switch_group => NULL,
        switch_time => NULL,
        switch_estimate => false,
        max_est_exec_time => NULL,
        undo_pool => NULL,
        max_idle_time => NULL,
        max_idle_blocker_time => NULL,
        switch_time_in_call => NULL
    dbms_resource_manager.submit_pending_area();
    END;
    BEGIN
    dbms_resource_manager.clear_pending_area();
    dbms_resource_manager.create_pending_area();
    dbms_resource_manager.set_consumer_group_mapping(
        dbms_resource_manager.oracle_user,
        'DEV',
        'MYTEST_GROUP'
    dbms_resource_manager.submit_pending_area();
    END;

  • Execution time for an insert/update

    Hello!
    We are using EJB entities 3.0 and JPA configured to run on WAS and DB2. We also are using Container Managed Persistence
    We have a transactional method let's name it addA(), when executed, ultimately inserts data in 11 DB2 tables.
    In some of the 11 tables there are could be multiple rows inserted, in average, about 2 inserts.
    We are using the EntityManager.persist method to handle each entity.
    The method completes in about 11 seconds when the resources on the server (CPU,memory) are in a good state (so not overloaded).
    Is this a reasonable/decent time for the operation we are trying to do?
    If not, what would be a reasonable running time for such an operation?
    What do we need to do in order to improve the performance and decrease the execution time, other than switching to BMP and coding manual SQL inserts?

    user2617486 wrote:
    Do you have any idea how we can localize/isolate better the problem at the DB level?
    Can we programatically insert log statements to see how long it takes the processing on the WAS and how long takes the actual SQL statements execution once they hit the DB2 database?You need help from a DBA, you can't reason this problem away. You need cold hard facts from whatever tooling the database provides. Of course you could try adding log statements to see how long each database operation is taking on the Java side of things, but that only proves that it is slow, not WHY it is slow.
    The network latency can not be considered in this case since we run the test application on the same WAS where the application resides so it no networking involved.and the database runs on that machine as well? This is new information you are pulling out of your hat by the way, now all of a sudden there are two applications? And with the limited information you give I am to assume you are having performance problems from the test application and not from your "main application"? Otherwise I see no point in you making this argument.

  • Decrease the execution time of package

    Hi All,
    In our dataware housing environment ( complete ETL in PL/SQL) . We have different packages to populate different mart tables.
    One of our package is to populate a table which runs on several times to populate the table with data of different locations. It executes very fast for all the locations except one particular location for this particular location amount of data is also much higher than other location that is one of the reason it takes a lot of time.
    Can we do something to reduce the execution time of this package for this particular location despite of huge amount of data ?
    Any kind of help will be highly appreciated .
    Thanks
    Dikshit

    Since I do not know what's your queries doing inside the package, I really can not come up with a solid solution, I would also recommend you to use parellal dml in order to reduce the execution time, but you also need to make sure you have enogh hardware resources to play with.
    hare krishna
    Alok

  • Execution time increase

    hai  guys,
    Im currently developing a code that run 24 hours 7 days a week. My problem is the execution time increases as days pass by. As im tracing down the execution time ,the 1st day i start the to run the program execution time is 0.04 second but after 3 day it increases to 4.5 seconds .
    then i indually tracked down the subvi that causing problem and find out that the problem is on writing to ini file.
    The subvi function is to REPLACE the data (20 data )in a file every 10 second*not accumulating data just replace the old data  . I open file replace data and close file every itteration and as day pass the execution time for this subvi increases.
    Can any one help me to get a solution for the problem as time is a very important factor in my programming. the execution time is limited for less that 10 second.
    thanks
    regards
    kokula 

    As David said, post the code.
    Is there any reason why your are loggin to an .ini file?  Does that mean you are using the LabVIEW config file functions?
    I don't know if deallocating memory would help, or is even possible, without seeing your code.  You either have a problem with resources continuously being created, but not being closed out.  Or you have an ever growing array.  This takes more memory over time, and slows down the code because LabVIEW has to move memory around to account for the ever larger array.
    I bet if you let your program run long enough, it would eventually crash due to running out of memory.
    By the way 47MB to 350 MB of memory consumption means the same thing as RAM usage increasing.

  • CVI XML Functions Execution Times Increase When Looped

    I have written multiple functions using CVI that read XML files. I have confirmed in the Resource Tracking utility that i have cleaned up all of my lists, elements, documents, etc. I have found that when I loop any of the functions I have created, the execution times increase. The increase is small but it is noticable and does effect my execution.
    Are there any other sources of memory that I need to deallocate? It seems that there is a memory leak somewhere but I am unable to see where this increase is located.
    I am currently running LabWIndows/CVI 2009 on Windows 2008 Server. I have looped my functions using TestStand 4.2.1. Any help would be appreciated!
    Thanks in advance,
    Kyle
    Solved!
    Go to Solution.

    HI Daniel,
    Thanks for the quick response.
    It is indeed slow down in execution speed when we loop. When looped, the XML reader is overwriting variables, not adding to an array. Our application is structured differently than my test case. We run a CVI function from TestStand that contains a series of commands, which contains the XML reading. The XML looping is really done in CVI. I used TestStand in my test case just to get execution times. Our psuedocode for the CVI function is as followed:
    For loop (looping over values, like amplitude or frequency)
    Reading the XML
    Applying the data from the XML to set up some instrument(s)
    Do something...
    End loop
    I can confirm that the instrument set up is not the cause of the slow down. We have written the same XML reading in C# and applied the values to the instrument setup and do not experience the slow down.
    I tested with On-The-Fly Reporting enabled and the execution time continued to slow down.
    I hope that answers all of your questions!
    Thanks,
    Kyle

  • Clustering of SQL query execution times

    In doing some query execution experiments I have noted a curious (to me, anyhow) clustering of execution times around two distinct points. Across about 100 tests each running 1000 queries using (pseudo-)randomly generated IDs the following pattern emerges. The queries were run from Java using all combinations of pooled/non-pooled and thin/oci driver combinations:
         100          *
         90          *
    R     80          *
    u     70          *
    n     60          *
    s     50          *
         40          *                                             *
         30          *                                             *
         20          *                                        *     *     *
         10          *     *                              *     *     *     *     
              0     100     200     300     400     500     600     700     800     900     1000     1100     1200
                                       Time(ms)Where about half of the total execution times cluster strongly about a given (short) time value with a smaller but broader clustering at a significantly slower mark, with zero intermediate values. The last point is the one I find most curious.
    What I would have expected is something like this:
         100          
         90          
    R     80          
    u     70          
    n     60          
    s     50          
         40                              *                         
         30                         *     *     *                    
         20                    *     *     *     *     *     *          
         10          *     *     *     *     *     *     *     *     *     *          
              0     100     200     300     400     500     600     700     800     900     1000     1100     1200
                                       Time(ms)The variables I have tentatively discounted thus far:
    -query differences (single query used)
    -connection differences (using single pooled connection)
    -garbage collection (collection spikes independent of query execution times)
    -amount of data returned in bytes (single varchar2 returned and size is independent of execution time)
    -driver differences (thin and oci compared, overall times differ but pattern of clustering remains)
    -differences between Statement and PreparedStatement usage (both show same pattern)
    I know this is a rather open-ended question, but does the described pattern seem faniliar or spark any thoughts?
    DB-side file I/O?
    Thread time-slicing variations (client or DB-side)?
    FWIW, the DB is 9.2.0.3 DB and the clients are running on WinXP with Java 5.0 and 9i drivers.
    Thanks and regards,
    M

    Further context:
    Are your queries only SELECT queries ?
    Yes, the same SELECT query is used for all tests. The only variable is the bind variable used to identify the primary key of the selection set (i.e. SELECT a.* from a, b, c where a.x = b.x and b.y = c.y and c.pk = ?) where all PKs and FKs are indexed.Do the queries always use the same tables, the same where clauses ?
    Yes, the same tables are always invoked. The where clauses invoked are identical with the excepton of the single bind variable as described above.Do your queries always use bind variables ?
    A single bind variable is used in all invocations as described above.Are your queries also running in single user mode or multi user mode (do you use SELECT FOR UPDATE ?) ?
    We are not using SELECT FOR UPDATEDid something else run on the database/on the server hosting the database on the same time ?
    I have not eliminated the idea, but the test has been repeated roughly 100 times over the course of a week and at different times of day with the same pattern emerging. I suppose it is not out of the question that a resource-hogging process is running consistently and constantly on the DB-side box.Thanks for the input,
    M

  • Query reg. Resource and time allocation in cProjects

    Wondering if someone can answer this query related to -  Resource and time allocation in cProjects.
    I understand the following regarding creating cProject -
    1 - Project manager creates a cProject for any upcoming new project in the organization.
    2 - Phases and Tasks will be created automatically (at our end) based on the template selected while creating the cProject.
    3 - Project manager assigns the resources to the project.
    4 - Allocate start date and end date for the resources against Tasks or Phase -
    > This is the point where there isn't enough documentation to help me progress further. Please can someone suggest how and where do we specify the start date and end date to a resource in cProject.
    A sample document on the BEST approach to create cProject, assign reources to tasks, allocate start date and end date would indeed help further clarify my doubt.
    I wante to create a cProject with various tasks, assign resources, start and end date for each task. As the project progresses,
    I want to execute a report to track the progress of this cProject as resources go on completing a task.
    Thanks,
    RB

    Hi Pramod,
       Thanks for your reply. Below are some queries based on few points mentioned by you.
    Allocate start date and end date for the resources against Tasks or Phase -
    When we prepare Project template, we define all project structure with phase, tasks, milestones, etc. - OK
    Also we define phase and task depedency, duration for tasks. - OK
    In actual Project execution PM creates project with reference to template, he add or delete any task / phase, changes duration if required. - How do you change duration of the task ? What series of events or clicks need to be followed ? Would be nice if atleast one option is listed.
    While in project planning, planner has to enter start and end date for project. - OK
    cProject scedules all other dates accordingly. We need not to go to individual phase or task to adjust dates. one can adjust only duration and depency to get required dates for tasks. This is standard planning phelosophy used in CPR, MSP or Primavra I believe. - At phase level, I can see Earliest start + finish and Latest start + finish dates populated automatically. In addition Start date constraint and Finish data constraints fields are available and empty. Is it mandatory to enter these dates ?
    While doing resource assignment, the start and end dates are coming from task assigned to particular Project Role. - At Task level, I can see Earliest start + finish and Latest start + finish dates populated automatically. In addition Start date constraint and Finish data constraints fields are available and empty. Is it mandatory to enter these dates ?
    cProjects automatically schedules the plan in create status, once the project released and actual status updated in cProjects, Project plan needs to schedules manually with help of schedule button in Project menu.- When I click Schedule button, message - Bottom-up scheduling was carried out is populated on screen. What is Bottom-up scheduling ?
    Would be nice to get reply to above queries.
    Thanks,
    RB

  • Getting estimated execution time via JDBC

    Hi,
    I have a web application that's meant to query by multiple search criteria, so queries can quickly become too complex. I know that using Resource Manager it is possible to prevent certain queries from running, based on estimated execution time.
    Is there any way to query these time estimates, making them available to the calling application? (before going ahead with execution)
    Thanks
    Ivan

    I am not sure if this is possible in JDBC, the best thing you can do is, get an average execution time for query and use in your application OR do a start time and end time while you are executing the scripts and get the difference.

  • Loading jar files at execution time via URLClassLoader

    Hello�All,
    I'm�making�a�Java�SQL�Client.�I�have�practicaly�all�basic�work�done,�now�I'm�trying�to�improve�it.
    One�thing�I�want�it�to�do�is�to�allow�the�user�to�specify�new�drivers�and�to�use�them�to�make�new�connections.�To�do�this�I�have�this�class:�
    public�class�DriverFinder�extends�URLClassLoader{
    ����private�JarFile�jarFile�=�null;
    ����
    ����private�Vector�drivers�=�new�Vector();
    ����
    ����public�DriverFinder(String�jarName)�throws�Exception{
    ��������super(new�URL[]{�new�URL("jar",�"",�"file:"�+�new�File(jarName).getAbsolutePath()�+"!/")�},�ClassLoader.getSystemClassLoader());
    ��������jarFile�=�new�JarFile(new�File(jarName));
    ��������
    ��������/*
    ��������System.out.println("-->"�+�System.getProperty("java.class.path"));
    ��������System.setProperty("java.class.path",�System.getProperty("java.class.path")+File.pathSeparator+jarName);
    ��������System.out.println("-->"�+�System.getProperty("java.class.path"));
    ��������*/
    ��������
    ��������Enumeration�enumeration�=�jarFile.entries();
    ��������while(enumeration.hasMoreElements()){
    ������������String�className�=�((ZipEntry)enumeration.nextElement()).getName();
    ������������if(className.endsWith(".class")){
    ����������������className�=�className.substring(0,�className.length()-6);
    ����������������if(className.indexOf("Driver")!=-1)System.out.println(className);
    ����������������
    ����������������try{
    ��������������������Class�classe�=�loadClass(className,�true);
    ��������������������Class[]�interfaces�=�classe.getInterfaces();
    ��������������������for(int�i=0;�i<interfaces.length;�i++){
    ������������������������if(interfaces.getName().equals("java.sql.Driver")){
    ����������������������������drivers.add(classe);
    ������������������������}
    ��������������������}
    ��������������������Class�superclasse�=�classe.getSuperclass();
    ��������������������interfaces�=�superclasse.getInterfaces();
    ��������������������for(int�i=0;�i<interfaces.length;�i++){
    ������������������������if(interfaces[i].getName().equals("java.sql.Driver")){
    ����������������������������drivers.add(classe);
    ������������������������}
    ��������������������}
    ����������������}catch(NoClassDefFoundError�e){
    ����������������}catch(Exception�e){}
    ������������}
    ��������}
    ����}
    ����
    ����public�Enumeration�getDrivers(){
    ��������return�drivers.elements();
    ����}
    ����
    ����public�String�getJarFileName(){
    ��������return�jarFile.getName();
    ����}
    ����
    ����public�static�void�main(String[]�args)�throws�Exception{
    ��������DriverFinder�df�=�new�DriverFinder("D:/Classes/db2java.zip");
    ��������System.out.println("jar:�"�+�df.getJarFileName());
    ��������Enumeration�enumeration�=�df.getDrivers();
    ��������while(enumeration.hasMoreElements()){
    ������������Class�classe�=�(Class)enumeration.nextElement();
    ������������System.out.println(classe.getName());
    ��������}
    ����}
    It�loads�a�jar�and�searches�it�looking�for�drivers�(classes�implementing�directly�or�indirectly�interface�java.sql.Driver)�At�the�end�of�the�execution�I�have�found�all�drivers�in�the�jar�file.
    The�main�application�loads�jar�files�from�an�XML�file�and�instantiates�one�DriverFinder�for�each�jar�file.�The�problem�is�at�execution�time,�it�finds�the�drivers�and�i�think�loads�it�by�issuing�this�statement�(Class�classe�=�loadClass(className,�true);),�but�what�i�think�is�not�what�is�happening...�the�execution�of�my�code�throws�this�exception
    java.lang.ClassNotFoundException:�com.ibm.as400.access.AS400JDBCDriver
    ��������at�java.net.URLClassLoader$1.run(URLClassLoader.java:198)
    ��������at�java.security.AccessController.doPrivileged(Native�Method)
    ��������at�java.net.URLClassLoader.findClass(URLClassLoader.java:186)
    ��������at�java.lang.ClassLoader.loadClass(ClassLoader.java:299)
    ��������at�sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
    ��������at�java.lang.ClassLoader.loadClass(ClassLoader.java:255)
    ��������at�java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
    ��������at�java.lang.Class.forName0(Native�Method)
    ��������at�java.lang.Class.forName(Class.java:140)
    ��������at�com.marmots.database.DB.<init>(DB.java:44)
    ��������at�com.marmots.dbreplicator.DBReplicatorConfigHelper.carregaConfiguracio(DBReplicatorConfigHelper.java:296)
    ��������at�com.marmots.dbreplicator.DBReplicatorConfigHelper.<init>(DBReplicatorConfigHelper.java:74)
    ��������at�com.marmots.dbreplicator.DBReplicatorAdmin.<init>(DBReplicatorAdmin.java:115)
    ��������at�com.marmots.dbreplicator.DBReplicatorAdmin.main(DBReplicatorAdmin.java:93)
    Driver�file�is�not�in�the�classpath�!!!�
    I�have�tried�also�(as�you�can�see�in�comented�lines)�to�update�System�property�java.class.path�by�adding�the�path�to�the�jar�but�neither...
    I'm�sure�I'm�making�a/some�mistake/s...�can�you�help�me?
    Thanks�in�advice,
    (if�there�is�some�incorrect�word�or�expression�excuse�me)

    Sorry i have tried to format the code, but it has changed   to �... sorry read this one...
    Hello All,
    I'm making a Java SQL Client. I have practicaly all basic work done, now I'm trying to improve it.
    One thing I want it to do is to allow the user to specify new drivers and to use them to make new connections. To do this I have this class:
    public class DriverFinder extends URLClassLoader{
    private JarFile jarFile = null;
    private Vector drivers = new Vector();
    public DriverFinder(String jarName) throws Exception{
    super(new URL[]{ new URL("jar", "", "file:" + new File(jarName).getAbsolutePath() +"!/") }, ClassLoader.getSystemClassLoader());
    jarFile = new JarFile(new File(jarName));
    System.out.println("-->" + System.getProperty("java.class.path"));
    System.setProperty("java.class.path", System.getProperty("java.class.path")+File.pathSeparator+jarName);
    System.out.println("-->" + System.getProperty("java.class.path"));
    Enumeration enumeration = jarFile.entries();
    while(enumeration.hasMoreElements()){
    String className = ((ZipEntry)enumeration.nextElement()).getName();
    if(className.endsWith(".class")){
    className = className.substring(0, className.length()-6);
    if(className.indexOf("Driver")!=-1)System.out.println(className);
    try{
    Class classe = loadClass(className, true);
    Class[] interfaces = classe.getInterfaces();
    for(int i=0; i<interfaces.length; i++){
    if(interfaces.getName().equals("java.sql.Driver")){
    drivers.add(classe);
    Class superclasse = classe.getSuperclass();
    interfaces = superclasse.getInterfaces();
    for(int i=0; i<interfaces.length; i++){
    if(interfaces[i].getName().equals("java.sql.Driver")){
    drivers.add(classe);
    }catch(NoClassDefFoundError e){
    }catch(Exception e){}
    public Enumeration getDrivers(){
    return drivers.elements();
    public String getJarFileName(){
    return jarFile.getName();
    public static void main(String[] args) throws Exception{
    DriverFinder df = new DriverFinder("D:/Classes/db2java.zip");
    System.out.println("jar: " + df.getJarFileName());
    Enumeration enumeration = df.getDrivers();
    while(enumeration.hasMoreElements()){
    Class classe = (Class)enumeration.nextElement();
    System.out.println(classe.getName());
    It loads a jar and searches it looking for drivers (classes implementing directly or indirectly interface java.sql.Driver) At the end of the execution I have found all drivers in the jar file.
    The main application loads jar files from an XML file and instantiates one DriverFinder for each jar file. The problem is at execution time, it finds the drivers and i think loads it by issuing this statement (Class classe = loadClass(className, true);), but what i think is not what is happening... the execution of my code throws this exception
    java.lang.ClassNotFoundException: com.ibm.as400.access.AS400JDBCDriver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:140)
    at com.marmots.database.DB.<init>(DB.java:44)
    at com.marmots.dbreplicator.DBReplicatorConfigHelper.carregaConfiguracio(DBReplicatorConfigHelper.java:296)
    at com.marmots.dbreplicator.DBReplicatorConfigHelper.<init>(DBReplicatorConfigHelper.java:74)
    at com.marmots.dbreplicator.DBReplicatorAdmin.<init>(DBReplicatorAdmin.java:115)
    at com.marmots.dbreplicator.DBReplicatorAdmin.main(DBReplicatorAdmin.java:93)
    Driver file is not in the classpath !!!
    I have tried also (as you can see in comented lines) to update System property java.class.path by adding the path to the jar but neither...
    I'm sure I'm making a/some mistake/s... can you help me?
    Thanks in advice,
    (if there is some incorrect word or expression excuse me)

  • How to get the execution time of a Discoverer Report from qpp_stats table

    Hello
    by reading some threads on this forum I became aware of the information stored in eul5_qpp_stats table. I would like to know if I can use this table to determine the execution time of a worksheet. In particular it looks like the field qs_act_elap_time stores the actual elapsed time of each execution of specific worksheet: am I correct? If so, how is this value computed? What's the unit of measure? I assume it's seconds, but then I've seen that sometimes I get numbers with decimals.
    For example I ran a worksheet and it took more than an hour to run, and the value I get in the qs_act_elap_time column is 2218.313.
    Assuming the unit of measure was seconds than it would mean approx 37 mins. Is that the actual execution time of the query on the database? I guess the actual execution time on my Discoverer client was longer since some calculations were performed at the client level and not on the database.
    I would really appreciate if you could shed some light on this topic.
    Thanks and regards
    Giovanni

    Thanks a lot Rod for your prompt reply.
    I agree with you about the accuracy of the data. Are you aware of any other way to track the execution times of Discoverer reports?
    Thanks
    Giovanni

  • How to get the total execution time from a tkprof file

    Hi,
    I have a tkprof file. How can I get the total execution time. Going through the file i guess the sum of "Total Waited" would give the total time in the section "Elapsed times include waiting on following events:"
    . The sample of tkprof is given below.
    SQL ID: gg52tq1ajzy7t Plan Hash: 3406052038
    SELECT POSTED_FLAG
    FROM
    AP_INVOICE_PAYMENTS WHERE CHECK_ID = :B1 UNION ALL SELECT POSTED_FLAG FROM
      AP_PAYMENT_HISTORY APH, AP_SYSTEM_PARAMETERS ASP WHERE CHECK_ID = :B1 AND
      NVL(APH.ORG_ID, -99) = NVL(ASP.ORG_ID, -99) AND
      (NVL(ASP.WHEN_TO_ACCOUNT_PMT, 'ALWAYS') = 'ALWAYS' OR
      (NVL(ASP.WHEN_TO_ACCOUNT_PMT, 'ALWAYS') = 'CLEARING ONLY' AND
      APH.TRANSACTION_TYPE IN ('PAYMENT CLEARING', 'PAYMENT UNCLEARING')))
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute    442      0.08       0.13          0          0          0           0
    Fetch      963      0.22       4.72        350      16955          0         521
    total     1406      0.31       4.85        350      16955          0         521
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 173     (recursive depth: 1)
    Number of plan statistics captured: 1
    Rows (1st) Rows (avg) Rows (max)  Row Source Operation
             1          1          1  UNION-ALL  (cr=38 pr=3 pw=0 time=139 us)
             1          1          1   TABLE ACCESS BY INDEX ROWID AP_INVOICE_PAYMENTS_ALL (cr=5 pr=0 pw=0 time=124 us cost=6 size=12 card=1)
             1          1          1    INDEX RANGE SCAN AP_INVOICE_PAYMENTS_N2 (cr=4 pr=0 pw=0 time=92 us cost=3 size=0 card=70)(object id 27741)
             0          0          0   NESTED LOOPS  (cr=33 pr=3 pw=0 time=20897 us)
             0          0          0    NESTED LOOPS  (cr=33 pr=3 pw=0 time=20891 us cost=12 size=41 card=1)
             1          1          1     TABLE ACCESS FULL AP_SYSTEM_PARAMETERS_ALL (cr=30 pr=0 pw=0 time=313 us cost=9 size=11 card=1)
             0          0          0     INDEX RANGE SCAN AP_PAYMENT_HISTORY_N1 (cr=3 pr=3 pw=0 time=20568 us cost=2 size=0 card=1)(object id 27834)
             0          0          0    TABLE ACCESS BY INDEX ROWID AP_PAYMENT_HISTORY_ALL (cr=0 pr=0 pw=0 time=0 us cost=3 size=30 card=1)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      db file sequential read                       350        0.15          4.33
      Disk file operations I/O                        3        0.00          0.00
      latch: shared pool                              1        0.17          0.17
    ********************************************************************************

    user13019948 wrote:
    Hi,
    I have a tkprof file. How can I get the total execution time.
    call count cpu elapsed disk query current rows
    total 1406 0.31 4.85 350 16955 0 521TOTAL ELAPSED TIME is 4.85 seconds from line above

  • How to improve the execution time of my VI?

    My vi does data processing for hundreds of files and takes more than 20 minutes to commplete. The setup is firstly i use the directory LIST function to list all the files in a dir. to a string array. Then I index this string array into a for loop, in which each file is opened one at a time inside the loop, and some other sub VIs are called to do data analysis. Is there a way to improve my execution time? Maybe loading all files into memory at once? It will be nice to be able to know which section of my vi takes the longest time too. Thanks for any help.

    Bryan,
    If "read from spreadsheet file" is the main time hog, consider dropping it! It is a high-level, very multipurpose VI and thus carries a lot of baggage around with it. (you can double-click it and look at the "guts" )
    If the files come from a just executed "list files", you can assume the files all exist and you want to read them in one single swoop. All that extra detailed error checking for valid filenames is not needed and you never e.g. want it to popup a file dialog if a file goes missing, but simply skip it silently. If open generates an error, just skip to the next in line. Case closed.
    I would do a streamlined low level "open->read->close" for each and do the "spreadsheet string to array" in your own code, optimized to the exact format of your files. For example, notice that "read from spreadheet file" converts everything to SGL, a waste of CPU if you later need to convert it to DBL for some signal processing anyway.
    Anything involving formatted text is not very efficient. Consider a direct binary file format for your data files, it will read MUCH faster and take up less disk space.
    LabVIEW Champion . Do more with less code and in less time .

  • Resource busy time out oracle message - Concurrency and Locks

    I have a requirement to generate gapless invoice and receipt number in our application. so i have currently used the below approach.
    a. created table with a column to hold the invoice and receipt number sequence value.
    b. whenever transaction gets succeed. i will lock the table which holds the invoice number and receipt number inorder to avoid the sequential number slipages.
    Issue
    1. since the application belongs to online payment through portal by customers, when concurrent users trying to pay and while generating receipt number's, i am facing with "resource busy time out" message frequently. Here i noticed when user1 locks the table to access the receipt number value and session is not committed or rollback and another session user2 trying to access the same resource, in this scenario i am facing this error.
    Frequency of encountering this error is low, but customer was telling us this error is show stopper and affects normal business.
    Is there any alternative solution or method can be applied to overcome this problem?
    Current SQL used in application
    cursor <cursor name> is.
    select <column_name>
    into <variable>
    from <table name>
    for update of wait 5
    update <table name> set <column name> = value + 1
    where current of <cursor name>

    1e0ea4a1-1610-4dec-a44c-4ee1f46ba1a4 wrote:
    I have a requirement to generate gapless invoice and receipt number in our application. so i have currently used the below approach.
    Engage the business and inquire WHY this "requirement" exists. I have personally never seen an audit requirement wherein invoices MUST be devoid of gaps (that's not to say they do not exist, just that I've never seen one
    They certainly must be unique, but that's what a sequence will do for you. If the business absolutely needs gapless information, then they will have to be willing to pay the price which is going to be longer transaction times (as requests queue in a busy system to get this sought after gapless resource). Your job is to explain this to them ... nothing comes without a cost.
    The only thing you can really do (assuming you engage the business and the requirement doesn't change) is ensure the transactions are designed in such a manner that
    1) they complete as fast as possible AND that the locking is done at the latest possible stage of the transaction
    2) there is no user interaction (you cannot allow the users a "review" screen of any sort ... because users get silly sometimes and go for a coffee while reviewing things)
    Cheers,

  • How to find out the execution time of a sql inside a function

    Hi All,
    I am writing one function. There is only one IN parameter. In that parameter, i will pass one SQL select statement. And I want the function to return the exact execution time of that SQL statement.
    CREATE OR REPLACE FUNCTION function_name (p_sql IN VARCHAR2)
    RETURN NUMBER
    IS
    exec_time NUMBER;
    BEGIN
    --Calculate the execution time for the incoming sql statement.
    RETURN exec_time;
    END function_name;
    /

    Please note that wrapping query in a "SELECT COUNT(*) FROM (<query>)" doesn't necessarily reflect the execution time of the stand-alone query because the optimizer is smart and might choose a completely different execution plan for that query.
    A simple test case shows the potential difference of work performed by the database:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    Session altered.
    SQL>
    SQL> drop table count_test purge;
    Table dropped.
    Elapsed: 00:00:00.17
    SQL>
    SQL> create table count_test as select * from all_objects;
    Table created.
    Elapsed: 00:00:02.56
    SQL>
    SQL> alter table count_test add constraint pk_count_test primary key (object_id)
    Table altered.
    Elapsed: 00:00:00.04
    SQL>
    SQL> exec dbms_stats.gather_table_stats(ownname=>null, tabname=>'COUNT_TEST')
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.29
    SQL>
    SQL> set autotrace traceonly
    SQL>
    SQL> select * from count_test;
    5326 rows selected.
    Elapsed: 00:00:00.10
    Execution Plan
    Plan hash value: 3690877688
    | Id  | Operation         | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |            |  5326 |   431K|    23   (5)| 00:00:01 |
    |   1 |  TABLE ACCESS FULL| COUNT_TEST |  5326 |   431K|    23   (5)| 00:00:01 |
    Statistics
              1  recursive calls
              0  db block gets
            419  consistent gets
              0  physical reads
              0  redo size
         242637  bytes sent via SQL*Net to client
           4285  bytes received via SQL*Net from client
            357  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
           5326  rows processed
    SQL>
    SQL> select count(*) from (select * from count_test);
    Elapsed: 00:00:00.00
    Execution Plan
    Plan hash value: 572193338
    | Id  | Operation             | Name          | Rows  | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT      |               |     1 |     5   (0)| 00:00:01 |
    |   1 |  SORT AGGREGATE       |               |     1 |            |          |
    |   2 |   INDEX FAST FULL SCAN| PK_COUNT_TEST |  5326 |     5   (0)| 00:00:01 |
    Statistics
              1  recursive calls
              0  db block gets
             16  consistent gets
              0  physical reads
              0  redo size
            412  bytes sent via SQL*Net to client
            380  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              1  rows processed
    SQL>As you can see the number of blocks processed (consistent gets) is quite different. You need to actually fetch all records, e.g. using a PL/SQL block on the server to find out how long it takes to process the query, but that's not that easy if you want to have an arbitrary query string as input.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle:
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

Maybe you are looking for

  • Regarding send step in bpm--"send context"

    i want to use the send step in my bpm with send context. The send context is a freely definable string, which you specify in the send step. You query the send context in a condition in the receiver determination in the Integration Directory. You must

  • Link from SSRS Report to a Project Gantt, Focusing on a Task

    Hi, We are using Server 2010 SP 2 (and considering moving to 2013). We have an SSRS grid report in which each row relates to a task in a project on the server. We would like to add to each row in the report a link that will open the project and focus

  • Horizontally centering flash .swf" and disallowing horizontal scroll??

    Is it possible to center a flash .swf file on a website, and then disable horizontal scrolling? I made my website in Flash Catalyst, and I made the width 1700px and the height 1200px. I made the width large because I wanted it to look good in the lar

  • Trouble syncing ipad / iphone - video

    ipad 1 wont sync video from iphone 4S thru itunes?

  • How to keep ONLY the iPhoto 08 - edited version ?

    Good day, First of all, let me explain teh structure I intend to use : I have migrated my complete iPhoto 08 database into Apertue (+/- 3200 pictures) to be able to use the extended storage and edition tools. I'm keep iPhoto only for "friendly" purpo