Which procedure is executing?

Hi,
Is there a way to know which procedure, in a pl/sql block, is running? I need put the procedure/function name into a string variable.
procedure doSomething is
begin
// In that moment doSomething is running!
end;
Thanks,
Leonardo Luiz

Maybe use calls to dbms_application_info:
create procedure doSomething (...)
as
begin
dbms_application_info.set_client_info( 'proc: doSomething'||'...' );
for x in ( ... )
loop
dbms_application_info.set_action( 'Progress ' || '...' );
end loop;
end;
This will show up in the view v$session.

Similar Messages

  • Java Stored Procedure in EXECUTE IMMEDIATE

    Hi,
    I need advice for the following.
    I'm on Oracle 11g R2. I'm testing application in Oracle 11gR1 and R2 and Oracle Express.
    Purpose is to generate XML reports.
    I have PLSQL Stored Procedure which does that, but since there is bug in Oracle11gR2 related to XMLTRANSFORM I have and Java Stored Procedure which is workaround. They are both compiled, valid etc.
    Java class is :
    import java.io.PrintWriter;
    import java.io.Writer;
    import oracle.xml.parser.v2.DOMParser;
    import oracle.xml.parser.v2.XMLDocument;
    import oracle.xml.parser.v2.XSLProcessor;
    import oracle.xml.parser.v2.XSLStylesheet;
    * This class is used as Java stored procedure
    * There is a bug on Oracle11gR2, related to the limitation on the number of style sheet instructions
    * This stored procedure is workaround when PLSQL code can not be used.
    * File must not have package, otherwise is wrongly compiled in DB
    public class JavaXslt {
         public static void XMLTtransform(oracle.sql.CLOB xmlInput,oracle.sql.CLOB xslInput,oracle.sql.CLOB output) throws Exception{
              DOMParser parser;
              XMLDocument xml;
              XMLDocument xsldoc;
              try{
                   parser = new DOMParser();
                   parser.parse(xmlInput.getCharacterStream());
                   xml = parser.getDocument();
                   parser.parse(xslInput.getCharacterStream());
                   xsldoc = parser.getDocument();
                   XSLProcessor processor = new XSLProcessor();
                   XSLStylesheet xsl = processor.newXSLStylesheet(xsldoc);
                   Writer w = output.setCharacterStream(1L);
                   PrintWriter pw = new PrintWriter(w);
                   processor.processXSL(xsl, xml, pw);
              }catch (Exception ex){
                   throw ex;
    PROCEDURE Java_XmlTransform (xml CLOB, xslt CLOB, output CLOB) AS LANGUAGE JAVA
    NAME 'JavaXslt.XMLTtransform(oracle.sql.CLOB, oracle.sql.CLOB, oracle.sql.CLOB)';
    I'm calling Java stored procedure from PLSQL Stored procedure (if it is Oracle11gR2) like that :
    Java_Proc.Java_XmlTransform(inputXML, xslt, res);
    So till here everything works ok. XSLT as applied and output XML (res) is OK.
    But when Oracle Express is used Java is out of the question, so there is no Java stored procedure. Howewer PLSQL Stored procedure is still needed.
    So I had to put call to Java Stored procedure in EXECUTE IMMEDIATE statement in order to compile to PLSQL package.
    But when I do that :
    EXECUTE IMMEDIATE 'BEGIN Java_Proc.Java_XmlTransform (:1, :2, :3); END;' USING inputXML, xslt, res;
    result value CLOB (res) has zero length...
    What am I missing? Should i set return value to Java class?
    Hope my explanations are clear though.
    Thanks

    Hi odie_63,
    Thanks for quick response.
    I didn't clearly explained.
    When using Oracle 11gR1 and Oracle Express I'm using only PLSQL Procedure.
    When using Oracle 11gR2 i have to use Java Stored procedure because there is documented bug in R2.
    That's why i have to use EXECUTE IMMEDIATE. I don't know which version is the client DB and whether there is or no Java procedures.
    I did tried
    EXECUTE IMMEDIATE 'BEGIN Java_Proc.Java_XmlTransform (:1, :2, :3); END;' USING IN inputXML, IN xslt, OUT res; and the result was ORA-06537: OUT bind variable bound to an IN position
    When using IN OUT for last parameter i.e.
    EXECUTE IMMEDIATE 'BEGIN Java_Proc.Java_XmlTransform (:1, :2, :3); END;' USING IN inputXML, IN xslt, IN OUT res;
    there is no exception, but still DBMS_LOB.getlength(res) = 0
    Thanks

  • What happens to the report if the underlying stored procedure to execute the report take atleast 3 hrs to run

    Hi,
    I have a report which is calling a stored procedure..
    Stored procedure exceutes 4-5 stored procedure and then returns the count each procedure it ran using union all statement... The stored procedure takes around 3-4 hrs to run because it is looking at quarterly data and YTD data.
    So once the report is kicked off and the procedure behind it runs and runs how will communicate to the report to show the final data... the final data will just be 5 rows with counts.
    I think we are running into a issue where the stored procedure runs and runs and then the report goes into la la land and has no clue what to do...
    Can you please shed some light on this..
    Thanks
    Karen

    Hi Karen,
    When we render a report, the report would process the following procedures:
    Open connections to data source and reading data rows from data extensions for all datasets, means retrieve data. Then process the engine requests, including the tablix, grouping, sorting, filtering, aggregations and subreport processing, means process report.
    Finally, render the report, including the pagination modules and on-demand expression evaluations.
    So the report rending has to wait until the stored procedure is executed. To improve the performance, we can consider the three aspects:
    Improve the performance of the stored procedures. Such as index and join. For better support, I suggest you can post a new thread about this issue in Transact-SQL forum at:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?forum=transactsql. It is appropriate and more experts will assist you.
    Simplify the report. For example, avoid including a reference to [&TotalPages] or any complex expressions in the page header and page footer. For more details, please see the following document:
    http://technet.microsoft.com/en-us/library/bb522806(v=sql.105).aspx
    Using cashing if you have a long-running query that cannot be tuned further. For more details, please refer to the following article:
    http://msdn.microsoft.com/en-us/library/ms159241(v=sql.110).aspx
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Finding Stored Procedure(s) Executed

    Hi,
    I need to find which stored procedure got executed when I run my application.
    My application is in .NET and I am using Oracle 9.2.0.5
    Thanks in advance.
    Pravin Pawar

    You can use SQL trace and TKPROF for that.
    1. Creation of PL/SQL and execution of procedures:
    bas002>
    bas002>
    bas002> create or replace procedure p2
      2  is
      3  d date;
      4  begin
      5  select sysdate into d from dual;
      6  end;
      7  /
    Procedure created.
    bas002> show errors
    No errors.
    bas002>
    bas002> create or replace procedure p1
      2  is
      3  n number;
      4  begin
      5  p2;
      6  select count(*) into n from dual;
      7  end;
      8  /
    Procedure created.
    bas002> show errors
    No errors.
    bas002>
    bas002> create or replace procedure p0
      2  is
      3  begin
      4  null;
      5  end;
      6  /
    Procedure created.
    bas002> show errors
    No errors.
    bas002>
    bas002>
    bas002> alter session set sql_trace=true;
    Session altered.
    bas002>
    bas002> exec p1;
    PL/SQL procedure successfully completed.
    bas002>
    bas002> exec p0;
    PL/SQL procedure successfully completed.
    bas002>
    bas002> alter session set sql_trace=false;
    Session altered.2. use TKPROF to get formated trace file:
    tkprof bas002_ora_892.trc output=test.trctest.trc contains:
    TKPROF: Release 10.2.0.2.0 - Production on Wed Jan 30 15:03:54 2008
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Trace file: bas002_ora_892.trc
    Sort options: default
    count    = number of times OCI procedure was executed
    cpu      = cpu time in seconds executing
    elapsed  = elapsed time in seconds executing
    disk     = number of physical reads of buffers from disk
    query    = number of buffers gotten for consistent read
    current  = number of buffers gotten in current mode (usually for update)
    rows     = number of rows processed by the fetch or execute call
    alter session set sql_trace=true
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        0      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        0      0.00       0.00          0          0          0           0
    total        1      0.00       0.00          0          0          0           0
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 55 
    BEGIN p1; END;
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.03       0.03          0          0          0           1
    Fetch        0      0.00       0.00          0          0          0           0
    total        2      0.03       0.03          0          0          0           1
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 55 
    SELECT SYSDATE
    FROM
    DUAL
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.01          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.00       0.00          0          0          0           1
    total        3      0.00       0.02          0          0          0           1
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 55     (recursive depth: 1)
    SELECT COUNT(*)
    FROM
    DUAL
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.00       0.00          0          0          0           1
    total        3      0.00       0.00          0          0          0           1
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 55     (recursive depth: 1)
    BEGIN p0; END;
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           1
    Fetch        0      0.00       0.00          0          0          0           0
    total        2      0.00       0.00          0          0          0           1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 55 
    alter session set sql_trace=false
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        0      0.00       0.00          0          0          0           0
    total        2      0.00       0.00          0          0          0           0
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 55 
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        3      0.00       0.00          0          0          0           0
    Execute      4      0.03       0.03          0          0          0           2
    Fetch        0      0.00       0.00          0          0          0           0
    total        7      0.03       0.03          0          0          0           2
    Misses in library cache during parse: 1
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        2      0.00       0.01          0          0          0           0
    Execute      2      0.00       0.00          0          0          0           0
    Fetch        2      0.00       0.00          0          0          0           2
    total        6      0.00       0.02          0          0          0           2
    Misses in library cache during parse: 2
        6  user  SQL statements in session.
        0  internal SQL statements in session.
        6  SQL statements in session.
    Trace file: bas002_ora_892.trc
    Trace file compatibility: 10.01.00
    Sort options: default
           1  session in tracefile.
           6  user  SQL statements in trace file.
           0  internal SQL statements in trace file.
           6  SQL statements in trace file.
           6  unique SQL statements in trace file.
          60  lines in trace file.
           0  elapsed seconds in trace file.I don't know if it's possible to get with TKPROF all procedures called by top level procedures (in this example p2 call is missing).
    I made this test with 10.2.0.2 but it should work the same for 9.2.0.5.
    Message was edited by:
    Pierre Forstmann

  • How pass date parametet in procedure while executing

    I am written procerdure in which I have to pass parameter the datatype is date how can I am able to pass the date while executing
    please help me

    ya its from the cient application but I am checking that procedure is executing properly or not so I passing it through prompt.
    I am executing in tha same format given by u, its displaying following error
    BEGIN HANGER_FAILURE_PROCEDURE (to_date('01-jan-05','dd-mon-yy') ); END;
    ERROR at line 1:
    ORA-01001: invalid cursor
    ORA-06512: at "SYSTEM.HANGER_FAILURE_PROCEDURE", line 62
    ORA-06512: at line 1
    ===============================
    And my procedure is
    CREATE OR REPLACE PROCEDURE HANGER_FAILURE_PROCEDURE (startDate IN FRIT_HANGER.AGING_START_TIME%TYPE ) IS
    shiftDescription SHIFT.DESCRIPTION%TYPE;
    failure_number HANGER_FAILURE.FAILURE_NUMBER%TYPE;
    failure HANGER_FAILURE.FAILURE_NUMBER%TYPE;
    fritID LVT_TEST.FRIT_ID%TYPE ;
    lvt_description LVT.DESCRIPTION%TYPE;
    test_time LVT_TEST.TEST_TIME%TYPE ;
    mikr LVT_TEST.MIKR%TYPE;
    mikr_res LVT_TEST.MIKR_PASSED%TYPE;
    mikg LVT_TEST.MIKG%TYPE;
    mikg_res LVT_TEST.MIKG_PASSED%TYPE;
    mikb LVT_TEST.MIKB%TYPE;
    mikb_res LVT_TEST.MIKB_PASSED%TYPE;
    coe2r LVT_TEST.COE2R%TYPE;
    coe2r_res LVT_TEST.COE2R_PASSED%TYPE;
    coe2g LVT_TEST.COE2G%TYPE;
    coe2g_res LVT_TEST.COE2G_PASSED%TYPE;
    coe2b LVT_TEST.COE2B%TYPE;
    coe2b_res LVT_TEST.COE2B_PASSED%TYPE;
    grparameter AGING_TEST.GR%TYPE;
    ccr VTS_TEST.CCR%TYPE;
    ccg VTS_TEST.CCG%TYPE;
    ccb VTS_TEST.CCB%TYPE;
    aging_hangerId AGING_HANGER.AGING_HANGER_ID%TYPE;
    aging_start_time FRIT_HANGER.AGING_START_TIME%TYPE;
    failure_type HANGER_FAILURE_TYPE.HANGER_FAILURE_TYPE_ID%TYPE;
    CURSOR result_lvt(sdate FRIT_HANGER.AGING_START_TIME%TYPE) IS
    SELECT
    AGING_HANGER.AGING_HANGER_ID,
    LVT.DESCRIPTION,
    FRIT_HANGER.AGING_START_TIME,
    LVT_TEST.FRIT_ID,
    LVT_TEST.TEST_TIME,
    LVT_TEST.MIKR,
    LVT_TEST.MIKR_PASSED,
    LVT_TEST.MIKG,
    LVT_TEST.MIKG_PASSED,
    LVT_TEST.MIKB,
    LVT_TEST.MIKB_PASSED,
    LVT_TEST.COE2R,
    LVT_TEST.COE2R_PASSED,
    LVT_TEST.COE2G,
    LVT_TEST.COE2G_PASSED,
    LVT_TEST.COE2B,
    LVT_TEST.COE2B_PASSED
    FROM LVT_TEST,LVT,FRIT_HANGER,AGING_HANGER
    WHERE LVT_TEST.LVT_ID=LVT.LVT_ID
    AND
    FRIT_HANGER.AGING_HANGER_ID=AGING_HANGER.AGING_HANGER_ID
    AND LVT_TEST.FRIT_ID=FRIT_HANGER.FRIT_ID
    AND FRIT_HANGER.AGING_START_TIME>sdate
    ORDER BY FRIT_HANGER.AGING_START_TIME;
    BEGIN
    IF result_lvt%ISOPEN THEN
    OPEN result_lvt(startDate);
    END IF;
    LOOP
    FETCH result_lvt
    INTO aging_hangerId, lvt_description, aging_start_time, fritID, test_time, mikr, mikr_res, mikg, mikg_res, mikb, mikb_res, coe2r, coe2r_res, coe2g, coe2g_res, coe2b, coe2b_res;
    exit when result_lvt%NOTFOUND;
    SELECT GR INTO grparameter
    FROM AGING_TEST
    WHERE
    TEST_TIME = (SELECT MAX(TEST_TIME) FROM AGING_TEST WHERE FRIT_ID = fritID);
    SELECT CCR, CCG, CCB INTO ccr,ccg,ccb
    FROM VTS_TEST
    WHERE TEST_TIME = (SELECT MAX(TEST_TIME) FROM VTS_TEST WHERE FRIT_ID = fritID);
    SELECT DESCRIPTION INTO shiftDescription
    FROM SHIFT
    WHERE START_TIME=TRUNC( aging_start_time);
    IF( mikr_res=0 OR mikg_res = 0 OR mikb_res = 0 )
    THEN
    SELECT MAX(FAILURE_NUMBER) INTO failure
    FROM HANGER_FAILURE
    WHERE AGING_HANGER_ID=aging_hangerId
    AND TO_DATE(AGING_START_TIME) = TO_DATE(aging_start_time)
    AND
    SHIFT_DESCRIPTION = shiftDescription;
    failure_number:=failure+1;
    SELECT HANGER_FAILURE_TYPE_ID INTO failure_type
    FROM HANGER_FAILURE_TYPE
    WHERE DESCRIPTION='MIK';
    INSERT INTO HANGER_FAILURE (HANGER_FAILURE_ID, HANGER_FAILURE_TYPE_ID, AGING_HANGER_ID,
    SHIFT_DESCRIPTION, AGING_START_TIME, FAILURE_NUMBER, LVT_DESCRIPTION,FRIT_ID,TEST_TIME, MIKR, MIKG, MIKB, COE2R, COE2G, COE2B, GR,CCR, CCG ,CCB ) VALUES(HANGER_FAILURE_ID_GENERATOR.NEXTVAL, failure_type, aging_hangerId, shiftDescription,aging_start_time,failure_number ,lvt_description, fritID,test_time, mikr,mikg,mikb,coe2r,coe2g,coe2b,grparameter,ccr,ccg,ccb);
    ELSE
    DBMS_OUTPUT.PUT_LINE('Doesn''t occur any MIK failure');
    END IF;
    IF (coe2r_res = 0 OR coe2g_res = 0 OR coe2b_res = 0)
    THEN
    SELECT MAX(FAILURE_NUMBER) INTO failure
    FROM HANGER_FAILURE
    WHERE AGING_HANGER_ID=aging_hangerId
    AND TO_DATE(AGING_START_TIME) = TO_DATE(aging_start_time)
    AND
    SHIFT_DESCRIPTION = shiftDescription;
    failure_number :=failure+1;
    SELECT HANGER_FAILURE_TYPE_ID INTO failure_type
    FROM HANGER_FAILURE_TYPE
    WHERE DESCRIPTION='COE2';
    INSERT INTO HANGER_FAILURE (HANGER_FAILURE_ID,HANGER_FAILURE_TYPE_ID,AGING_HANGER_ID,
    SHIFT_DESCRIPTION,AGING_START_TIME ,FAILURE_NUMBER, LVT_DESCRIPTION,FRIT_ID,TEST_TIME,MIKR,MIKG,MIKB,COE2R,COE2G,
    COE2B,GR ,CCR,CCG ,CCB ) VALUES(HANGER_FAILURE_ID_GENERATOR.NEXTVAL, failure_type, aging_hangerId, shiftDescription,aging_start_time,failure_number ,lvt_description, fritID,test_time, mikr,mikg,mikb,coe2r,coe2g,coe2b,grparameter,ccr,ccg,ccb);
    ELSE
    DBMS_OUTPUT.PUT_LINE('Doesn''t occur any COE2 failure');
    END IF;
    END LOOP;
    CLOSE result_lvt;
    END;
    plz help me

  • Which procedures are invoked?

    Hi,
    I am using an application which uses huge amount of procedures in the background. I need to know which procedures are getting executed when I do something in the application.
    Does anybody know how to get the list of the procedures executed in the given time?
    OR
    It will be ok if I get the list of the tables which are updated / inserted in the given time.
    Thanks.
    Nilesh

    you can try to query on v$sqlarea
    select first_load_time, sql_text
      from v$sqlarea
    where first_load_time like '2006-01-27%'note that the column first_load_time is not a date datatype

  • Procedure in Execute Immedite block

    Hi, all.
    I need to execute pl/sql procedure from Execute Immedite block.
    I am trying to do it with exec but getting error:
    begin
    EXECUTE IMMEDIATE '
    exec FillTestForOperation';
    end;
    begin
    ERROR at line 1:
    ORA-00900: invalid SQL statement
    ORA-06512: at line 2
    Is there any way to do it?

    JustasVred wrote:
    Hi, all.
    I need to execute pl/sql procedure from Execute Immedite block.
    I am trying to do it with exec but getting error:
    begin
    EXECUTE IMMEDIATE '
    exec FillTestForOperation';
    end;
    begin
    ERROR at line 1:
    ORA-00900: invalid SQL statement
    ORA-06512: at line 2
    Is there any way to do it?Try :
    declare
    vstring varchar2(10);
    begin
    vstring := FillTestForOperation';';
    execute immediate('begin '||vstring||' end;');
    end;
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

  • Is there any Way to find Which case is Executing in LabVIEW VI programmat​ically and Display it..

    Is there any Way to find Which case is Executing in LabVIEW VI programmatically and Display it..
    Solved!
    Go to Solution.

    I wrote this a few years ago: http://lavag.org/files/file/199-state-machine-foll​ower/
    This JKI RCF Plugin sets the Visible Frame property of a Case Structure while the owning VI is running. Use it to follow the execution through the cases in your string-based State Machine/Sequencer when Execution Highlighting isn't fast enough (and, it's never fast enough).
    The use-case I wrote this to improve is setting a Breakpoint on the Error wire coming out of the main Case Structure and probing the Case Selector terminal so I can float-probe wires during execution. The problem with this is that I had to manually select the current frame every time. This is boring, so I developed this plugin to automatically set the Visible Frame to the case most recently executed.
    You might be able to adapt it to your needs.  The basic idea is that a custom probe on the wire to the Case structure's selection terminal sends a notification to a VI that displays the appropriate case.
    We might be able to help you develop something easier if you'll give us more information.  Is it OK if the code to display the case is in the same VI?
    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice

  • In which procedure a table is used

    Hi,
    I am using oracle 9iR2 on red hat 4 (64 bit).
    I want to check a specific table is used in which procedures?
    Thanks

    Hi,
    you find referenced tables for procedure
    select *  from DBA_DEPENDENCIES
    where OWNER = <your_procedure_owner>
      and REFERENCED_TYPE='TABLE'
      and TYPE= 'PROCEDURE'
      and NAME = <procedure_name>;Regards
    Mahir M. Quluzade
    www.mahir-quluzade.com

  • How do I merge data from table1 on server 1 to final table on server 2 with a stored procedure to execute every so many hours.

    How do I merge data from table1 on server 1 to final table on server 2 with a stored procedure to execute every so
    many hours.

    How big is the table on server B? Is that possible to bring the all data into a server A and merge the data locally?
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How do I merge data from table1 on server 1 to final table on server 2 with a stored procedure to execute every 4 hours.

    How do I merge data from table1 on server 1 to final table on server 2 with a stored procedure to execute every so many hours.

    Hello,
    If you had configure server2 as
    linked server on the server1, you can run the following statement inside stored proceduce to copy table data. And then create a job to the run stored proceduce every 4 hours.
    Insert Into Server2.Database2.dbo.Table2
    (Cols)
    Select Cols From Server1.Database1.dbo.Table1
    Or you can use the SQL Server Import and Export Wizard to export the data from server1 to server2, save the SSIS package created by the wizard on the SQL Server, create a job to run the SSIS package. 
    Reference:http://technet.microsoft.com/en-us/library/ms141209.aspx
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Which user and which procedure takes snapshots for AWR in 10g??

    Hi, all.
    Which user and which procedure takes snapshots for AWR in 10g??
    The snapshot interval is 1 hour.
    I checked dba_scheduler_job, and dba_job.
    However, I was not able to find a job which takes a snapshot.
    On EM, I can see snapshots are being taken per one hour.
    Thanks and Regards.
    Message was edited by:
    user507290

    Dear Shmyg and VAS.
    Thanks for your reply.
    MMON takes a snapshot and stores snapshot information in DBA_HIST_** tables.
    Right??
    Does MMON have something to do with dbconsole and emagent??
    Even when I stopped dbconsole and emagent, snapshots are being taken.
    If so, what does do dbconsole and emagent??
    Thanks and Regards.
    Message was edited by:
    user507290

  • See which procedure is hanging

    One of my users is running a package and within the package a particular procedure keeps hanging but he doesnt know which one. Is there as a dba to see which procedure is mucking things up?
    thanks in advance
    SR

    I found another one too, this works as well.
    Thanks for all the responses
    ----Queries the job that is running during the current session
    ---get session id (sid) from oracle instance manager
    select t.sql_text
    from v$sqltext t, v$session s
    where s.sid = 48 and s.sql_address = t.address
    order by t.piece
    SR

  • Which procedures are registered on an alert?

    Hi,
    I'm working on a big and (for me) new system which uses (a lot of) alerts.
    Is there a way to find out, which procedures are registered or listening on alert XYZ?
    Thanks
    Mephi

    select * from dba_source
    where lower(text) like '%dbms_alert.register%';
    OWNER                          NAME                           TYPE               LINE TEXT                                             
    SYS                            DBMS_ALERT                     PACKAGE              39   --      dbms_alert.register('emp_table_alert');
    1 row selected.if your "alert"-message is not dinamic, then
    select distinct owner, name, type
    from dba_source
    where lower(text) like '%dbms_alert.register%'
    intersect
    select distinct owner, name, type
    from dba_source
    where lower(text) like lower('%alertXYZ%')

  • Which sequence used in which procedure/procedures?

    how can i know which sequence used in which procedure/procedures?
    can i get it from any system view?

    855516 wrote:
    how can i know which sequence used in which procedure/procedures?
    can i get it from any system view?You can search DBA/USER/ALL_SOURCE for each sequence name. Logic could look something like
    foreach sequence name in dba_sequences
      search dba_source for sequence nameRemember that code can be written using upper or lower case :)

Maybe you are looking for

  • How can I Loose the Heat or Fan Control in G4 Tower?

    I have a G4 FW 800 Tower that is running hotter with 10.5.x and knowing that heat kills hardware, I'd like to use the existing internal fans that do a great job when they fire up, to cool it down as I have seen them do. I have a temperature monitor a

  • Is it possible to link from a Google Map to a DPS article?

    Hey everybody, I'm using DPS to produce an iPad travel magazine about Berlin. One feature shoul be a Google Map with all the Points Of Interest from the articles. I want to set links from the articles to the POIs which is possible as far as I know. B

  • Automator for Exporting Spotlight Comments?

    Hello, I have around 700 historic photos that have been digitized. All the photo details (dates, etc.) were entered into the Spotlight Comments field under Get Info. Unfortunately, none of the comments appear when I open the photos in Adobe Bridge CS

  • Sorting still broken when syncing to iPhone/iPod...

    Ugh. Aperture 2 still hasn't fixed the broken syncing to the iPhone / iPod. When you sort an album by date (the default) and sync that album to the iPhone, the sort order is silently interpreted as "version name." Version name is almost never a reaso

  • Samsung Stratosphere camera not working

    After a year of taking pictures with this phone I now only get a black screen telling me to insert a memory card.  I do not even see a slot to insert a card.  Why would I suddenly need a card?  Any advice would be appreciated,