How to check performance for Stored procedure or Package.

Hi ,
Can any one please tell me , how to check performance for Stored procedure or Function or Package
Thanks&Regards,
Sanjeev.

user13483989 wrote:
Hi ,
Can any one please tell me , how to check performance for Stored procedure or Function or Package
Thanks&Regards,
Sanjeev.Oracle has provided set of Tools to monitor the Performance.
Profilers being one of them; If you wish to understand more on PL/SQL Optimization, please read PL/SQL Optimization and Tuning.
See example of DBMS_PROFILER.
See example of PLSQL Hierarchial Profiler

Similar Messages

  • How to use @prompt for stored procedure in universe

    Hi,
    I am using Bo XI R3.1 and universe was built on stored procedures and database is sql server 2005.
    I would like to show the list of values for prompts in report which they are based on parameters given for stored procedures in universe. Instead of typing the value for prompts the user should select some values for the prompt.
    I've tried in the universe putting the prompt syntax but didn't work could any one please let me know how this will be achived
    Thanks in advance,
    Eswar

    Hi Eswar,
    Please try the following steps mentioned below:
    1. Go to Insert -> click Tables and Import the table which needs to assign LOVu2019s into Universe panel.
    Objects which are created on tables may appear in inactive mode.
    2. Right click on the stored procedure -> Click on Edit stored procedures.
    3. Click on the Browse universe objects from Stored Procedure Editor. (Button avaial on the left)
    4. Select the object which you want to assign for the List of values.
    5. Enter the desired text which you want to display in the WebI reports in the Edit prompt Label.
    6. Export the Universe.
    Before doing the above steps:
    While creating for SP Univ, a parameter screen appears after selecting SP. In the "Value" field enter a dummy value and
    from the "Next Execution" drop down at the right select "Prompt me for a value".
    Regards,
    Rohit

  • How to select from a stored procedure?

    Lets say I have a simple stored procedures
    Create Procedure stp_test
    As
    Begin
     Select * from tbl1
    End
    Go
    I would like to be able to do this in SSMS (actually, I want to do this from ADODB)
    Select top 10 * from ...stp_test... Order By rowID
    It looks like I want to use OpenQuery on the stored Procedure, but I have not been able to do it correctly.  How can I query my stored procedure?
    Rich P

    It looks like I want to use OpenQuery on the stored Procedure, but I have not been able to do it correctly.  How can I query my stored procedure?
    If you want to use the OPENQUERY method , use the following.. follow this link...
    http://stackoverflow.com/questions/209383/select-columns-from-result-set-of-stored-procedure
    Please mark as answer, if this has helped you solve the issue.
    Good Luck :) visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

  • Structure for Stored Procedure Call

    Hi All,
             Guys I am trying to call a stored procedure call using receiver jdbc adapter...
    This is the outgoing message:
    <b><?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:SP_DB xmlns:ns0="urn:sce-com:xi:dev:mohammf">
    - <Test>
    - <PP_TEST_P action="EXECUTE">
      <table>PP_TEST_P</table>
      <RECTYPEIND type="CHAR">CC</RECTYPEIND>
      <JENUMBER type="CHAR">76724</JENUMBER>
      <COMPANY type="CHAR">BCEO</COMPANY>
      <CONSTANT1 type="CHAR">AB</CONSTANT1>
      <SYSTEMDATE type="CHAR">08/12/2007</SYSTEMDATE>
      <DR_CR_ID type="CHAR">0</DR_CR_ID>
      <AMOUNT type="CHAR">934928599475843</AMOUNT>
      <MONTH_NUMBER type="CHAR">000008</MONTH_NUMBER>
      <COST_CENTER type="CHAR">LosAngeles</COST_CENTER>
      <ORDERNO type="CHAR">694950375830</ORDERNO>
      <WBS type="CHAR">Southern California Edis</WBS>
      <ACCOUNTID type="CHAR">6949503758</ACCOUNTID>
      <BATCH_ID type="CHAR">3408102007</BATCH_ID>
      <ASSIGNMENT type="CHAR">Technology Solutio</ASSIGNMENT>
      <GL_JOURNAL_CATEGORY type="CHAR">GHTF</GL_JOURNAL_CATEGORY>
      <PROFIT_CENTER type="CHAR">3434694950</PROFIT_CENTER>
      <REFDOCNUMBER type="CHAR">00000000004304300056006056</REFDOCNUMBER>
      </PP_TEST_P>
    - <PP_TEST_P action="EXECUTE">
      <table>PP_TEST_P</table>
      <RECTYPEIND type="CHAR">XX</RECTYPEIND>
      <JENUMBER type="CHAR">76724</JENUMBER>
      <COMPANY type="CHAR">BCEO</COMPANY>
      <CONSTANT1 type="CHAR">AB</CONSTANT1>
      <SYSTEMDATE type="CHAR">08/12/2007</SYSTEMDATE>
      <DR_CR_ID type="CHAR">0</DR_CR_ID>
      <AMOUNT type="CHAR">934928599475843</AMOUNT>
      <MONTH_NUMBER type="CHAR">000008</MONTH_NUMBER>
      <COST_CENTER type="CHAR">LosAngeles</COST_CENTER>
      <ORDERNO type="CHAR">694950375830</ORDERNO>
      <WBS type="CHAR">Southern California Edis</WBS>
      <ACCOUNTID type="CHAR">6949503758</ACCOUNTID>
      <BATCH_ID type="CHAR">3408102007</BATCH_ID>
      <ASSIGNMENT type="CHAR">Technology Solutio</ASSIGNMENT>
      <GL_JOURNAL_CATEGORY type="CHAR">GHTF</GL_JOURNAL_CATEGORY>
      <PROFIT_CENTER type="CHAR">3434694950</PROFIT_CENTER>
      <REFDOCNUMBER type="CHAR">00000000004304300056006056</REFDOCNUMBER>
      </PP_TEST_P>
      </Test>
      </ns0:SP_DB></b>
    The error I am getting is: 
    <b><i>2007-08-20 09:44:05 Error Unable to execute statement for table or stored procedure. 'PP_TEST_P' (Structure 'Test') due to java.sql.SQLException: ERROR: Invalid XML document format for stored procedure: 'type="<SQL-type>"' attribute is missing for element 'table' (Setting a SQL-type (e.g. INTEGER, CHAR, DATE etc.) is mandatory !)
    2007-08-20 09:44:05 Error JDBC message processing failed; reason Error processing request in sax parser: Error when executing statement for table/stored proc. 'PP_TEST_P' (structure 'Test'): java.sql.SQLException: ERROR: Invalid XML document format for stored procedure: 'type="<SQL-type>"' attribute is missing for element 'table' (Setting a SQL-type (e.g. INTEGER, CHAR, DATE etc.) is mandatory !)
    2007-08-20 09:44:05 Error MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'PP_TEST_P' (structure 'Test'): java.sql.SQLException: ERROR: Invalid XML document format for stored procedure: 'type="<SQL-type>"' attribute is missing for element 'table' (Setting a SQL-type (e.g. INTEGER, CHAR, DATE etc.) is mandatory !)
    2007-08-20 09:44:05 Error Exception caught by adapter framework: null
    2007-08-20 09:44:05 Error Delivery of the message to the application using connection JDBC_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'PP_TEST_P' (structure 'Test'): java.sql.SQLException: ERROR: Invalid XML document format for stored procedure: 'type="<SQL-type>"' attribute is missing for element 'table' (Setting a SQL-type (e.g. INTEGER, CHAR, DATE etc.) is mandatory !).</i></b>
    Pls advice..
    XIer
    Message was edited by:
            XIer

    Hi,
    Check your DATA TYPE attributes with the attributes of the column names in the Database table.  There is a mismatch between the DT and Table in the database.
    <b>Cheers,
    *RAJ*</b>

  • How to list dependencies of stored procedure in a package in oracle

    hi gurus,
    can any body help me to solve the below issue?
    how to list dependencies of stored procedure in a package in oracle?
    advanced thanks...

    It sounds like you're going to have trouble because you're trying to track dependencies at a more fine-grained level than Oracle does (at least prior to 11g, which I know does finer-grained dependency tracking for columns, so there may be something that would help you there).
    In Oracle, the entity is the package body. The procedure within the package does not have dependencies and does not depend on anything, it is part of the package body, which does have dependencies. You can see what tables are used by the package body via DBA_DEPENDENCIES. But if you're trying to track the dependencies for a particular procedure in a package, you'd either have to manually examine the code or you'd have to write your own PL/SQL parser.
    Justin

  • Too many arguments for stored procedure call

    I have a stored procedure with 34 arguments, including the return value. I am trying to call it from java using JDBC thin drivers (jdk11, oracle815), but I get the "wrong number or types of arguments" error message. JDBC-OCI fails also. I saw a reference in this discussion group to there being a limit of 32 arguments for stored procedure calls from jdbc (posted 6/29/99). Is there such a limit? If so, is there a fix or workaround? If there is not a limit, how can I determine which argument is causing the problem?
    Many thanks.
    Mike
    java.sql.SQLException: ORA-06550: line 1, column 13:
    PLS-00306: wrong number or types of arguments in call to 'PUT_CHECK'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.jav
    a)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithBatch(OracleStatement
    .java)
    at oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme
    nt.java)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePrepar
    edStatement.java)
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStat
    ement.java)
    at metris.quickcheck.database.DS1.main(DS1.java:79)
    null

    I must confess I still don't understand your problem. By rows ...
    I have an sql that recodes a column and has 1450 rows. This doesn't work
    although when I use the same with less rows 40-60 it works.... do you mean rows in the table or elements in the CASE() statement ?
    From the 9i SQL Reference:
    " The maximum number of arguments in a CASE expression is 255, and each WHEN ... THEN pair counts as two arguments. To avoid exceeding the limit of 128 choices, you can nest CASE expressions. That is return_expr can itself be a CASE expression."
    According to the 10g docs the limit is the same there.
    Cheers, APC

  • Performance Tune Stored procedures

    Hi Experts,
    What is the best approach to performance tune stored procedures. Is it to run expalin plan for the queries used in cursors or there is more to it?
    I need all your advise.
    Thanks

    As generic advice: Absolutely not.
    The performance of PL/SQL may be irrelevant to the performance of specific SQL statements contained.
    Consider the following:
    1. A very inefficient query that runs one time and takes 2 seconds to execute.
    2. A query that runs in 2 milliseconds inside a loop.
    Which one is more likely to be the issue?
    The answer is that it depends on the number of interations of the loop.
    The proper tool for tuning PL/SQL, as discussed by Tom Kyte, are, depending on version, DBMS_PROFILER or DBMS_HPROF.
    Find out where the time is being spent.
    Then tune that which takes the most time.
    It is not necessarily the slowest SQL statement.

  • How to customize events, execute stored procedures using JSF and ADF BC

    As a java beginner, I started with developing simple web application using JSF and ADF business component through visual and declarative approach. I need to know how to customize events, execute stored procedures, invoke functions on triggering events associated with rich controls. for eg. how to write customized functions on button click or checkbox click events to achieve business requirement and can be modified whenever required.
    Edited by: 792068 on Aug 31, 2010 9:40 PM

    Which business layer is prefered to create interactive data model: 1. ADF business components or 2. Enterprise JavaBeans using Java persistance API (JPA) or 3. Toplink 4. Portlets
    which minimizes writing low level codes and how much OOPS knowledge is required for creating above business layer binding data to viewcontroller layer?

  • How to output value from stored procedure

    Hi folks, I need to output the OrderFK from a stored procedure not really sure how to achieve this any help or tips much appreciated.
    Sql code below
    USE [TyreSanner]
    GO
    /****** Object: StoredProcedure [dbo].[AddCustomerDetails] Script Date: 11/12/2014 20:56:34 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER PROCEDURE [dbo].[AddCustomerDetails]
    /***********************Declare variables ***********************/
    /******tblCustomer******/
    @Forename nvarchar(50),
    @Surname nvarchar(50),
    @HouseNo nvarchar(50),
    @CustAddress nvarchar(50),
    @Town nvarchar(50),
    @Postcode nvarchar(50),
    @ContactNo nvarchar(50),
    @EmailAddress nvarchar(50),
    /******tblLink_OrderProduct******/
    @ProductQuantity int,
    @TotalProductSaleCost decimal,
    @ProductFK int,
    @FittingDate date,
    @FittingTime Time
    As
    DECLARE @CustomerFK int;
    DECLARE @OrderFK int;
    Begin TRANSACTION
    SET NOCOUNT ON
    INSERT INTO [TyreSanner].[dbo].[Customer](Forename, Surname, HouseNo, CustAddress, Town, Postcode, ContactNo, EmailAddress)
    VALUES (@Forename,@Surname,@HouseNo,@CustAddress,@Town,@Postcode,@ContactNo,@EmailAddress)
    Set @CustomerFK = SCOPE_IDENTITY()
    INSERT INTO [TyreSanner].[dbo].[Order] (CustomerFK)
    VALUES (@CustomerFK)
    SET @OrderFK = SCOPE_IDENTITY()
    INSERT INTO [TyreSanner].[dbo].[Link_OrderProduct](OrderFK, ProductFK, ProductQuantity, TotalProductSaleCost, FittingDate, FittingTime)
    VALUES
    (@OrderFK, @ProductFK, @ProductQuantity, @TotalProductSaleCost, @FittingDate, @FittingTime)
    COMMIT TRANSACTION

    Hi brucey54,
    There’re several ways to capture the value from a Stored Procedure. In you scenario, I would suggest 2 options, by an output parameter or by a table variable.
    By an output Parameter, you need to make a little bit modification on your code as below:
    USE [TyreSanner]
    GO
    ALTER PROCEDURE [dbo].[AddCustomerDetails]
    @Forename nvarchar(50),
    @FittingDate date,
    @FittingTime Time,
    @OrderFK int output
    As
    DECLARE @CustomerFK int;
    --DECLARE @OrderFK int;
    Run the following code, Then @OrderFKvalue holds the value you’d like.
    DECLARE @OrderFKvalue int;
    EXEC AddCustomerDetails(your parameters,@OrderFKvalue output)
    Anyway if you don’t like to add one more parameter, you can get the value by a table variable as well. Please append “SELECT @OrderFK;” to your Procedure as below:
    USE [TyreSanner]
    GO
    ALTER PROCEDURE [dbo].[AddCustomerDetails]
    SET @OrderFK = SCOPE_IDENTITY()
    INSERT INTO [TyreSanner].[dbo].[Link_OrderProduct](OrderFK, ProductFK, ProductQuantity, TotalProductSaleCost, FittingDate, FittingTime)
    VALUES
    (@OrderFK, @ProductFK, @ProductQuantity, @TotalProductSaleCost, @FittingDate, @FittingTime);
    SELECT @OrderFK;
    Then you can call the Stored Procedure as below:
    DECLARE @T TABLE (OrderFK INT);
    INSERT @T EXEC AddCustomerDetails(your parameters) ;
    SELECT OrderFK FROM @T;
    There’re more options to achieve your requirement, please see the below link:
    How to Share Data between Stored Procedures
    If you have any question, feel free to let me know.
    Best Regards,
    Eric Zhang

  • Reg:How to check Vendor for particular Asset

    HI
    How to check Vendor for particular Asset?
    regards
    JK rao

    Hi,
    Good morning and greetings,
    It would be very difficult to go into each and every asset and display the asset...instead create a quick viewer query using SQVI and use the table ANLA and the field name is LIFNR for Vendor Code and for Asset Number it is ANLN1.
    Please reward points if found useful
    Thanking you
    With kindest regards
    Ramesh Padmanabhan

  • How to call pl/sql stored procedure in JDBC query dialogbox

    Hi,
    how to call pl/sql stored procedure in JDBC query dialogbox(reports 9i) .
    Cheers,
    Raghu

    please refer : Re: problem If you have more doubts, please ask in that question.

  • How to call PL-SQL/stored procedure in Creator

    Anybody can tell how to call PL-SQL/Stored procedures inside creator...

    Hi!!!
    You can see this topic http://forum.sun.com/jive/thread.jspa?threadID=106046
    There is how to call oracle stored procedures. Also I put a lot of links in these topic doing reference stored procedures. I have one that it tells specially how to call oracle stored procedures from java, is in spanish but you can understand the code.;-)
    http://yoprogramador.vampisol.com/index.php?title=pl_sql_oracle_desde_java&more=1&c=1&tb=1&pb=1
    Byeee

  • How to execute the parametered stored procedure in sql *plus ?

    how to execute the parametered stored procedure in sql *plus ?
    my storedprocedure format
    CREATE OR REPLACE PROCEDURE SMS_SELECTMPLOYEE
    (empDOB out date, empEmpName out varchar2)
    thanks & regards
    mk_mur

    Oh, sorry... making many reading-too-fast mistakes today...
    You can't declare date variables in SQL*Plus (seel help var), but you can cast to varchar2:
    TEST> CREATE OR REPLACE PROCEDURE SMS_SELECTMPLOYEE (empDOB out date, empEmpName out varchar2) IS
      2  d date := sysdate;
      3  e varchar2(10) := 'bob';
      4  begin
      5  empdob := d;
      6  empempname := e;
      7  end;
      8  /
    Procedure created.
    TEST> var d varchar2(30)
    TEST> var n varchar2(30)
    TEST> call  SMS_SELECTMPLOYEE(:d,:n);
    Call completed.
    TEST> print d n
    D
    11/07/06
    N
    bobYoann.

  • ALDSP 3.0 -- schema owner for stored procedure or SQL Statement

    Using ALDSP, I have a need to create a physical service based on a stored procedure or a SQL statement. I am wondering what will happen when I move to another deployment environment where the schema owner changes. In our QA and Prod environments, we have a different schema owner for all tables in the application (the DBAs believe this prevents unwanted updates to a prod environment). DSP elegantly supports this for normal table- and view-based physical services by mapping schemas through the DSP console after deployment. Will I get the same type of mapping capability for stored procedures and SQL statements? I noticed that I can add a SQL-based function to a physical service...is there a way to pass in the physical table name from that data service to the procedure or SQL statement?
    Thanks,
    Jeff

    Schema name substitution should work for stored procedures just like it does for tables. If it doesn't - report a bug.
    You don't get any help for sql-statement based data services - dsp doesn't parse the sql provided. One thing you could do is use the default schema (following the user of your connection pool), and not specify the schema in your sql-statement.

  • How to convert SQL server stored procedures to Oracle 11g

    Hi Experts,
    In SQL server 30 stored procedures are there how to convert all the stored procedure
    from SQL server to Oracle 11g.
    Please help me,
    Thanks.

    ramya_162 wrote:
    In SQL server 30 stored procedures are there how to convert all the stored procedure
    from SQL server to Oracle 11g.
    The single most fundamental concept you need to understand (grok in its fullness) is:
    ORACLE IS NOT SQL-SERVER
    There is very little, to NOTHING, in common between T-SQL (a language extension to SQL) and PL/SQL (integration of SQL with the language Ada, part of ALGOL family of languages that includes Pascal and C++).
    So taking a T-SQL procedure and porting it as is to PL/SQL is plain stupid.
    Why?
    Oracle sucks at trying to be SQL-Server.
    So how do you migrate from SQL-Server to Oracle?
    By taking the REQUIREMENTS that the T-SQL procedures address, and addressing these requirements using Oracle SQL and PL/SQL.

Maybe you are looking for

  • Satellite A60-652: ati2dvag driver has stopped working

    Hello, Recently I have some problems with my graphics. My satellite freezes up, and goes to a low resolution with a few colours. A message says the ati2dvag driver has stopped working. After rebooting the satellite shows a blue screen and reboots...s

  • Need Help calling Dynamic Action from Link in Interactive Report

    Hello I have an Interactive Report. I would like to have a Dynamic Action called when the user selects a row (Clicks a Link). I am running Application Express 4.0.2.00.07 on Oracle 11gR1. Any help would be great.

  • Why can't I add/send to groups

    It seems pretty definitive that on the iPhone one cannot  add to a contact group or mail to a group. I must admit that I was hoping that the recent OS update would deal with this but it hasn't. My question to the experts out there is why Apple- norma

  • Mountain Lion stopped downloading.

    I JUST opened my MacBook Air and I'm in the process of downloading the Mountian Lion OS. It was free and was going fine then STOPPED! In both the Launch Pad and The App Store. Then the downloading time started growing and hit like 21 hours.. So I sto

  • Error message 441 'server connection'

    Hi, I have an HP Photsmart 5520 and the following comes up when i try to scan to an email 'Server connection Error 411'  could you please help me.  Thanks  Nuriye