Where are User Defined Functions and Stored Procedures kept in SQL Server?

Hi,
I have a growing list of Stored Procedures and User-Defined Functions in SQL Server, and would like to be able to list all my user SP and UDF easily.
Is it possible to write a query to list all SP and UDF?
I saw the following specimen code in an SQL book, but am not sure this is what I need because I could not make it work.
SELECT *
    FROM INFORMATION_SCHEMA.ROUTINES
WHERE SPECIFIC_SCHEMA = N'CustomerDetails'
    AND SPECIFIC_NAME = N'apf_CusBalances'
I tried:
SELECT *
    FROM INFORMATION_SCHEMA.ROUTINES
but it does not work.
Suppose all my SP are named following this pattern:
    dbo.usp_Storeproc1
How would I modify the above code? or is there a better code?
Thanks
Leon Lai

Hi ,
try this to get list of all stored procedures:
SELECT *
FROM sys.procedures where name like 'dbo.usp%'
Thanks,
Neetu

Similar Messages

  • User define table and store procedure install

    Hi there,
    I like to deploy an addon, there are User define tables and store procedure need add to database, I wonder which chance is properly to add them, if add these user define objects in time of install, we can not get the enough information that connect to SQL server, and also create UDT need DIAPI. if put create UDT and UDsp in addon program, the problem is which DIAPI funciton or object can execute create store procedure SQL string.
    Thanks for any help.
    Lanjun

    R. Schwachofer,
    Thank you very much,
    the way call isqlw.exe to run SQL script is a good way when install, but I confuse with two questions about this way. first, run isqlw.exe should provid loginid and password of SQL server, these two information need additional install dialog to get; second if use isqlw.exe the store procedure only create to the current company database, when create new compay DB the store procedure does not exist in new DB.
    so I still do not know which way is the proper way to create SP for addon.
    Thanks in advance.
    Lanjun

  • User-Defined Function and Context Manipulation

    Hi Mapping Gurus, I need your help.
    I have a user-defined function and one of my input parameter (c) is in a loop (EDI segment).  So one, if I execute my function I get:
    Exception:[java.lang.ArrayIndexOutOfBoundsException: 0]
    If I change the context or use the remove context node function it’s working but it’s always taking the first row in consideration since I'm using c[0] .  Here is the logic:
    String WHERE_CLAUSE = "A"" = ""'"b[0]"'"" and B = ""'"c[0]"'";
    So since c is an array [], I have tried different logic to get to the right row.
    1- I tried using another parameter (e) to pass a counter or an index to my function.  So each time it's looping, it's passing a new value to the function but I’m still getting the first row and I’m not to sure why?
    int G = Integer.parseInt(e[0]);  // e[] = My counter field
    String WHERE_CLAUSE = "A"" = ""'"b[0]"'"" and B = ""'"c[G]"'";
    2- I tried using a parameter stored in the container:
    String Num;
    Num = (String)getParameter(“counter”);
    if (Num == null)  G = 0;
    else
    G = Integer.parseInt(Num);
    G = G + 1;
    String WHERE_CLAUSE = "A"" = ""'"b[0]"'"" and B = ""'"c[G]"'";
    Num = "" + G;
    setParameter(e[0], Num);
    and I’m still getting the first one, look like it’s using a different container each time it’s looping so the Value is always the same?
    4- I created a new user-defined function with the container logic, then it’s working but I’m back to the same problem in my main function, it’s only looking at e[0] for my counter all the time.
    5- I tried using the Seeburger Java Variables and guess what in the main fonction, as new UDF,... and guess what, same result!
    So anybody out there that was able to get UDF's working into a multiple context scenario?
    Am I missing something?
    I will reward points and beer for any help!

    This is one of the text with passing a counter to the function to try to go to the right row in the array since I'm doing a remove context and I'm getting all the d_234's:
    public void ReadTable(String[] a,String[] b,String[] c,String[] d,String[] e,ResultList result,Container container){
    int G = Integer.parseInt(e[0]); // My counter
    String var;
    String DBTABLE = a[0];
    String lookUpField = d[0];
    String WHERE_CLAUSE = "A"" = ""'"b[0]"'"" and B = ""'"c[G]"'";
    Now this one was with the internal container logic:
    int G;
    String DBTABLE = a[0];
    String lookUpField = d[0];
    String Num;
    Num = (String)getParameter(e[0]);
    if (Num == null)  G = 0;
    else
    G = Integer.parseInt(Num);
    G = G + 1;
    Num = "" + G;
    setParameter(e[0], Num);
    String WHERE_CLAUSE = "A"" = ""'"b[0]"'"" and B = ""'"c[G]"'";
    And now with the Seeburger Variables:
    int G;
    try {
    VariableBean be=VariableFactory.getVariableInstance("");
    G = Integer.parseInt(String.valueOf(be.getStringVariable("yves")));
    } catch (Exception f) {
    throw new RuntimeException(f);
    String DBTABLE = a[0];
    String lookUpField = d[0];
    String WHERE_CLAUSE = "A"" = ""'"b[0]"'"" and B = ""'"c[G]"'";
    try {
    G = G + 1;
    Num = "" + G;
    VariableBean be=VariableFactory.getVariableInstance("");
    be.setStringVariable("yves",Num);
    catch (Exception f) {
    throw new RuntimeException(f);
    All 3 logics were returning always the first row or a counter of 1 if the logic is in the main ReadTable function.

  • Creation of DB Adaptert for calling stored procedure in MS SQL server

    Hi,
    I need to create a DB adapter to call a stored procedure in MS SQL Server.
    I have gone thru the thread MS SQL Server database connection
    It mentions that we need to use a command line utility for generating the wsdl and xsd for calling stored procedures in MS SQL server. Please provide information where to find this utility and how to use it.
    Any links to tutorials are welcome.
    Thanks !!.
    Silas.

    Command line is required for stored procedures, if you are using the basic options you don't need to worry.
    (1) Download MS SQL Server 2005 JDBC Driver from Microsoft Site. http://msdn.microsoft.com/en-us/data/aa937724.aspx
    (2) The download is self extracting exe file. Extract this into Program Files on your machine. It should create folder as "Microsoft SQL Server 2005 JDBC Driver"
    (3) In above mentioned folder search for sqljdbc.jar copy this file into JDeveloper\JDBC\lib folder.
    (4) Open JDeveloper/jdev/bin/jdev.conf file add following entry.
    AddJavaLibPath C:/Program files/Microsoft SQL Server 2000 Driver for JDBC/lib
    While executing this step make sure that your JDeveloper is closed.
    (5) On command prompt go to J Developer folder and execute following command
    jdev -verbose
    This will open JDeveloper.
    (6) Now go to JDeveloper > Connections > Database Connections > New Database Connection
    (7) Select Third Party JDBC
    (8) Specify MS Sql Server User Name, password and Role.
    (9) In connection page specify following
    - Driver Class: com.microsoft.sqlserver.jdbc.SQLServerDriver
    - For class path browse to C:/Program files/Microsoft SQL Server 2000 Driver for JDBC/lib folder, select sqljdbc.jar add it as library.
    - Specify URL as following.
    jdbc:sqlserver://SERVERNAME:1433;databaseName=MSSQLDBNAME;
    (10) Go to Test page and test it.
    cheers
    James

  • Writing a stored procedure to import SQL Server table data into a Oracle table

    Hello,
    As a new DBA I have been tasked with writing a stored procedure to import SQL Server table data into an Oracle table. I have been given many suggestions on how to do it from SQL Server but I I just need to write a stored procedure to run it from the Oracle side. Suggestions/guidance on where to start would be greatly appreciated! Thank you!
    I started to write it based on what I have but I know this is not correct :/
    # Here is the select statement for the data source in SQL Server...
    SELECT COMPANY
    ,CUSTOMER
    ,TRANS_TYPE
    ,INVOICE
    ,TRANS_DATE
    ,STATUS
    ,TRAN_AMT
    ,CREDIT_AMT
    ,APPLD_AMT
    ,ADJ_AMT
    ,TRANS_USER1
    ,PROCESS_LEVEL
    ,DESCRIPTION
    ,DUE_DATE
    ,OUR_DATE
    ,OUR_TIME
    ,PROCESS_FLAG
    ,ERROR_DESCRIPTION
      FROM data_source_table_name
    #It loads data into the table in Oracle....   
    Insert into oracle_destination_table_name (
    COMPANY,
    CUSTOMER,
    TRANS_TYPE,
    INVOICE,
    TRANS_DATE,
    STATUS,
    TRANS_AMT,
    CREDIT_AMT,
    APPLD_AMT,
    ADJ_AMT,
    TRANS_USER1,
    PROCESS_LEVEL,
    DESCRIPTION,
    DUE_DATE,
    OUR_DATE,
    OUR_TIME,
    PROCESS_FLAG,
    ERROR_DESCRIPTION)
    END;

    CREATE TABLE statements would have been better as MS-SQL and Oracle don't have the same data types.
    OUR_DATE, OUR_TIME will (most likely) be ONE column in Oracle.
    DATABASE LINK
    Personally, I'd just load the data over a database link:
    insert into oracle_destination_table_name ( <column list> )
    select ... <transform data here>
    from data_source_table@mssql_db_link
    As far as creating the database link from Oracle to MS-SQL ... that is for somebody else to answer.
    (most likely you'll need to use an ODBC driver)
    EXTERNAL TABLE
    If the data from MS-SQL is in a CSV file, just use and external table.
    same concept:
    insert into oracle_destination_table_name ( <column list> )
    select ... <transform data here>
    from data_source_external_table
    MK

  • How to invoke a stored procedure on MS Sql Server with Java?

    I started writing Enterprise Java Beans and created an ODBC dsn with MS Sql Server 2000 which I can access using jdbc:odbc:mySqlDSN. This all works fine using Java Sql Statements. What kind of Java/Java Sql statement can I use to invoke a stored procedure on the Sql Server? Is it possible to use ADO/ADO command objects with Java? Is it possible to import/implement Mdac2.6 ActiveX data objects libary in Java?
    Thanks

    Thanks all for your replies. I will search the api for callable statements. I am curious though, the reply that suggests using a prepared statement - can I put the name of a stored procedure in a prepared statment or is this just suggestions an action query like Insert Into, Update, Delete? Like with ADO you can say
    cmdObject.CommandType = adStoredProcedure
    cmdObject.CommandText = "NameOfStoredProc"
    cmdObject.ExecuteNonQuery()
    Once I am calling/importing/implementing the proper libraries/interfaces in Java, can a prepared statement reference a stored procedure as above?
    Thanks

  • Difference between Function and Stored Procedure

    Hi guys, i don't understand the exact difference between a function and a stored procedure. I did lot of google but still. Can somebody explain in simple words. Thanks.

    Hi,
    Here's an example of a user-defined function:
    CREATE OR REPLACE FUNCTION     factorial
    (      in_num       IN     PLS_INTEGER
    RETURN     PLS_INTEGER
    DETERMINISTIC
    IS
    BEGIN
         IF  in_num IS NULL
         THEN
              RETURN     NULL;
         ELSIF in_num <= 1
         THEN
              RETURN  1;
         ELSE
              RETURN  in_num * factorial (in_num - 1);
         END IF;
    END     factorial;
    SHOW ERRORSThis function retruns an integer. You can use the function (or, more properly, the integer that it returns) anywhere an integer expression is allowed.
    For example
    SELECT     ROWNUM
    ,     factorial (ROWNUM)     AS f
    ,     loc
    ,     SUBSTR ( loc
                , 1
                , factorial (ROWNUM)
                )          AS s
    FROM     scott.dept;Output:
    `   ROWNUM          F LOC           S
             1          1 NEW YORK      N
             2          2 DALLAS        DA
             3          6 CHICAGO       CHICAG
             4         24 BOSTON        BOSTON

  • Calling Managed CLR Stored Procedure from C++ SQL Server 2008 fails with Msg 2809

    I am trying to call a stored procedure from C++ (VS 2010).
    Here is what the stored procedure looks like:
    public class Validate
    [Microsoft.SqlServer.Server.SqlProcedure(Name = "ClientTest")]
    public static void ClientTest(out String res )
    { res = "50";}
    To create a stored procedure I deploy at first the assembly
    USE [test]
    GO
    CREATE ASSEMBLY ClientTestAssembly
    AUTHORIZATION testLogin
    FROM 'C:\Users\test\Documents\Visual Studio 2010\Projects\TestCreationAssemblyCSharp\TestCreationAssemblyCSharp\bin\x64\Debug\TestCreationAssemblyCSharp.dll'
    and call 
    USE test
    GO
    CREATE PROCEDURE ClientTest (@res NVARCHAR(40) OUTPUT)
    AS
    EXTERNAL NAME ClientTestAssembly.Validate.ClientTest
    I can call my procedure direct in SQL Server Management Studio without any errors
    declare @res nvarchar(10)
    execute ClientTest @res OUTPUT
    print @res
    But when I try to call this procedure from C++ using CALL syntax
    SQLBindParameter(sqlstatementhandle, 1, SQL_PARAM_OUTPUT, SQL_C_CHAR,
    SQL_VARCHAR , 40, 0, version, sizeof(version) ,
    &pcbValue);
    res = SQLExecDirect(sqlstatementhandle, (SQLCHAR*)("{CALL ClientTest(?) }"), SQL_NTS);
    I get the Error 2809 with SQLSTATE 42000 and with statement 
    The request for 'ClientTest'
    (procedure) failed because 'ClientTest' is a procedure object.
    However, if I wrap my CLR stored procedure into a T-SQL stored procedure, like
    CREATE PROCEDURE myProc (@res NVARCHAR(40) OUTPUT)
    AS
    EXEC ClientTest @res OUTPUT
    and call then myProc instead of ClientTest
    res = SQLExecDirect(sqlstatementhandle, (SQLCHAR*)("{CALL myProc(?) }"), SQL_NTS);
    everithing works fine and I get 50 as result.
    I have no ideas what is the reason for that behavior.
    Thanks very much for any suggestion. 
    Christina

    I'm not an ODBC expert, but you might try following the sample here:
    Process Return Codes and Output Parameters (ODBC)
    To see if it also behaves differently for your CLR proc.
    David
    David http://blogs.msdn.com/b/dbrowne/

  • User defined function and returning resultset

    Hi all,
    Following query, if I comment the statement in where clause which refers to a returning value of a function in the subquery, it takes 1 sec to finish. when uncomment it however, can't finish in 30 mins. Please help me on finding out the problem.
    I'm also wondering how to get a returning cursor in this case(to bypass above trouble)..
    Many thanks
    -s
    --pseudocode for how can I get a cursor in an anonymous block for host app
    begin
    -- get the resultset1 in someway
    select t1.showit,...
    from t1..;
    -- based on resultset1
    open myrefcursor for
    select * from resultset1 -- what is the resultset1?
    where resultset1.showit=1;
    end;
    --end pseudocode for getting a cursor
    -- hanging(takes too long) query (simplified)
    select t1.*,t2.account,t2.showit
    from (select t3.account,myfunc(t3.account) showit
    from tbl2 t3) t2,
    tbl1 t1
    where t1.account=t2.account
    and ...
    /* "hang" this query by uncomment this */
    -- and t2.showit=1;
    -- functions
    function myfunc(p_acc varchar2)
    return number is
    v_tmpdate date;
    v_invdate date;
    v_tmpcount number(8);
    v_accid number(8);
    v_curodisp number(14,4);
    v_curdisp number(14,4);
    v_curdisprev number(14,4);
    v_rowcount number(8);
    v_tmpshow number(8);
    p_vkey number(8);
    p_inv varchar(50);
    cursor cur(cv_vkey number, cv_accid number, cv_lastdate date) is
    select a.vkey vkey,a.invdate invdate, b.odisp odisp
    from inv a, recon b
    where a.vkey=cv_vkey
    and a.akey = cv_accid
    and a.invdate between to_date('01/01/2000','DD/MM/YYYY')
    and cv_lastdate
    and b.vkey = a.vkey
    and b.inv# = a.inv#
    order by invdate DESC;
    begin
    select vkey,inv#,akey, invdate into p_vkey,p_inv,v_accid, v_invdate
    from inv
    where akey = p_acc;
    v_tmpdate := add_months(v_invdate, 1);
    select count(*) into v_tmpcount
    from recon a, inv b
    where b.vkey = p_vkey
    and b.akey = v_accid
    and b.invdate between to_date('01/01/2000','DD/MM/YYYY')
    and v_tmpdate
    and a.inv# = b.inv#
    and a.vkey = b.vkey;
    if v_tmpcount = 0 then
    return 0;
    end if;
    v_rowcount := 0;
    for c1 in cur(p_vkey,v_accid,v_tmpdate) loop
    v_rowcount := v_rowcount + 1;
    v_curdisp := getcurdisp(c1.vkey,c1.inv#);
    v_curdisprev := getcurdisprev(c1.vkey,c1.inv#);
    v_curodisp := nvl(c1.odisp, 0) - v_curdisp - v_curdisprev;
    if v_curodisp >= 1000 then
    return 1;
    elsif v_curodisp = 0 then
    return 0;
    end If;
    end if;
    if extract(month from c1.invdate) in ('1','01')
    and extract(year from c1.invdate) = '2000' then
    select a.showodisp into v_tmpshow
    from acc a, inv b
    where b.vkey = c1.vkey
    and b.inv# = c1.inv#
    and a.akey = b.akey;
    return v_tmpshow;
    end If;
    end loop;
    return 0;
    end myfunc;
    function getcurdisp(p_vkey,p_inv)
    return number is
    v_tmp number(15,4);
    begin
    select sum(amount) into v_tmp
    from cost
    where vkey=p_vkey
    and inv#=p_inv
    and desc like '%disp';
    return v_tmp;
    end;
    function getcurdisprev(p_vkey,p_inv)
    return number is
    v_tmp number(15,4);
    begin
    select sum(amount) into v_tmp
    from cost
    where vkey=p_vkey
    and inv#=p_inv
    and desc like '%disprev';
    return v_tmp;
    end;

    Autotrace only showed the index usage on the main query, but nothing on the queries within the functions, so here is the tkprof that shows index usage on the queries within the functions.
    TKPROF: Release 9.2.0.1.0 - Production on Mon Jan 17 00:31:39 2005
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    Trace file: ora92_ora_4092.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 goal: CHOOSE
    Parsing user id: 59 
    select t1.*, t2.account, t2.showit
    from   tbl1 t1,
           (select account, myfunc(account) showit
            from   tbl2) t2
    where  t1.account = t2.account
    and    t2.showit = 1
    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.11       1.81          0          1          0           0
    total        3      0.11       1.81          0          1          0           0
    Misses in library cache during parse: 0
    Optimizer goal: CHOOSE
    Parsing user id: 59 
    Rows     Row Source Operation
          0  NESTED LOOPS 
          0   INDEX FULL SCAN OBJ#(69662) (object id 69662)
          0   INDEX RANGE SCAN OBJ#(69661) (object id 69661)
    select user#
    from
    sys.user$ where name = 'OUTLN'
    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          2          0           1
    total        3      0.00       0.00          0          2          0           1
    Misses in library cache during parse: 0
    Optimizer goal: CHOOSE
    Parsing user id: SYS   (recursive depth: 2)
    Rows     Row Source Operation
          1  TABLE ACCESS BY INDEX ROWID USER$
          1   INDEX UNIQUE SCAN I_USER1 (object id 44)
    select a.vkey, a.invdate, b.odisp, a.inv#
         from   inv a, recon b
         where  a.akey = :b1
         and    a.invdate between to_date ('01/01/2000', 'DD/MM/YYYY')
                          and     add_months (a.invdate, 1)
         and    b.vkey = a.vkey
         and    b.inv# = a.inv#
         order  by a.invdate DESC
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.10          0          0          0           0
    Execute    105      0.00       0.01          0          0          0           0
    Fetch      105      0.01       0.01          0        309          0         100
    total      211      0.01       0.13          0        309          0         100
    Misses in library cache during parse: 1
    Optimizer goal: CHOOSE
    Parsing user id: 59     (recursive depth: 1)
    Rows     Row Source Operation
        100  SORT ORDER BY
        104   TABLE ACCESS BY INDEX ROWID RECON
        313    NESTED LOOPS 
        104     INDEX FULL SCAN INV_IDX (object id 69658)
        104     INDEX RANGE SCAN RECON_IDX (object id 69659)
    SELECT sum (amount)
      from   cost
      where  vkey = :b2
      and    inv# = :b1
      and    descr like '%disp'
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute    100      0.00       0.00          0          0          0           0
    Fetch      100      0.01       0.00          0        100          0         100
    total      201      0.01       0.01          0        100          0         100
    Misses in library cache during parse: 1
    Optimizer goal: CHOOSE
    Parsing user id: 59     (recursive depth: 1)
    Rows     Row Source Operation
        100  SORT AGGREGATE
          0   TABLE ACCESS BY INDEX ROWID COST
          0    INDEX RANGE SCAN COST_IDX (object id 69657)
    SELECT sum (amount)
      from   cost
      where  vkey = :b2
      and    inv# = :b1
      and    descr like '%disprev'
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute    100      0.00       0.00          0          0          0           0
    Fetch      100      0.01       0.00          0        100          0         100
    total      201      0.01       0.01          0        100          0         100
    Misses in library cache during parse: 1
    Optimizer goal: CHOOSE
    Parsing user id: 59     (recursive depth: 1)
    Rows     Row Source Operation
        100  SORT AGGREGATE
          0   TABLE ACCESS BY INDEX ROWID COST
          0    INDEX RANGE SCAN COST_IDX (object id 69657)
    SELECT a.showodisp
          from   acc a, inv b
          where  b.vkey = :b2
          and    b.inv# = :b1
          and    a.akey = b.akey
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute    100      0.01       0.00          0          0          0           0
    Fetch      100      0.03       0.00          0        299          0          99
    total      201      0.04       0.01          0        299          0          99
    Misses in library cache during parse: 1
    Optimizer goal: CHOOSE
    Parsing user id: 59     (recursive depth: 1)
    Rows     Row Source Operation
         99  TABLE ACCESS BY INDEX ROWID ACC
        299   NESTED LOOPS 
        100    INDEX RANGE SCAN INV_IDX (object id 69658)
         99    INDEX RANGE SCAN ACC_IDX (object id 69660)
    begin
        for x in ( select * from session_trace_file_name )
        loop
            if ( dbms_lob.fileexists( bfilename('UDUMP_DIR', x.filename ) ) = 1 )
            then
                insert into avail_trace_files (filename) values (x.filename);
            end if;
        end loop;
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.01       0.00          0          0          0           1
    Fetch        0      0.00       0.00          0          0          0           0
    total        2      0.01       0.00          0          0          0           1
    Misses in library cache during parse: 0
    Optimizer goal: CHOOSE
    Parsing user id: 736     (recursive depth: 1)
    select *
    from
    session_trace_file_name
    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        2      0.00       0.00          0          0          0           1
    total        4      0.00       0.00          0          0          0           1
    Misses in library cache during parse: 0
    Optimizer goal: CHOOSE
    Parsing user id: 736     (recursive depth: 2)
    INSERT into avail_trace_files (filename)
    values
    (:b1)
    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          3           1
    Fetch        0      0.00       0.00          0          0          0           0
    total        2      0.00       0.00          0          0          3           1
    Misses in library cache during parse: 0
    Optimizer goal: CHOOSE
    Parsing user id: 736     (recursive depth: 2)
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      2      0.00       0.00          0          0          0           0
    Fetch        1      0.11       1.81          0          1          0           0
    total        4      0.11       1.81          0          1          0           0
    Misses in library cache during parse: 0
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        8      0.00       0.11          0          0          0           0
    Execute    409      0.02       0.04          0          0          3           2
    Fetch      408      0.06       0.03          0        810          0         401
    total      825      0.08       0.19          0        810          3         403
    Misses in library cache during parse: 4
        9  user  SQL statements in session.
        1  internal SQL statements in session.
       10  SQL statements in session.
    Trace file: ora92_ora_4092.trc
    Trace file compatibility: 9.00.01
    Sort options: default
           1  session in tracefile.
           9  user  SQL statements in trace file.
           1  internal SQL statements in trace file.
          10  SQL statements in trace file.
          10  unique SQL statements in trace file.
         945  lines in trace file.

  • Handle user defined exception in stored procedure

    Dear all,
    I'm using JDev 11.1.1.4.0
    In my application I'm calling the stored procedure with only in parameters using the Example 37-9 http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/bcadvgen.htm#ADFFD1056
    In my stored procedure I have user defined exception, like:
    create or replace procedure ...
    AS
    e_otwarty     EXCEPTION;
    //some code
      EXCEPTION
        WHEN e_otwarty THEN
          dbms_output.put_line('Masz juz otwarty raport');
          // or what should I do here ??
    END;I want to display the message in the popup window in my ADF application. How can I do that ?
    Regards,
    Wojtek.

    raise_application_error(-20001, 'error message');
    Scott

  • How can I Use a Stored Procedure from Microsoft SQL Server?

    Hi All,
    Would like to use stored procedure as my data service in Visual Composer.
    Our version is VC7.0 SP20.
    Is stored procedure feasible? What is the system that i need to create  in Enterprise Portal? Currently i have BI JDBC System which only allows me to search for tables from SQL Server.
    Much appreciate your help.
    Thanks & Regards,
    Sarah

    Hi Skif,
    Referring to my post: JDBC System Connection VS BI JDBC System Connection
    I do not even able to view list of stored procedure. I need help too..maybe you can show me how do you set the connection? What are the mandatory connection properties? I have filled up:
    - Connection URL
    - Driver class name
    - User Administration: User, Admin (I did user mapping too)
    The error message that i got is:
    com.sap.guimachine.portalconnector.commandhandler.CommandException: Failed to connect to backend system. Check your system definition and user privileges.#
    I had assigned full control to the DB user, and map my portal user to that DB user.
    Many Thanks,
    Sarah

  • Translate Stored Procedure from MS SQL Server to ORACLE 9i

    Hi...
    I work usually with MS SQL Server, and now I need to migrate an application from MS SQL Server to ORACLE 9i. I think to preserve most of User Interface made actually in MS Visual Basic .NET 2003 and change or "translate" all the MS SQL Server stored procedures to ORACLE 9i(most of business logic was code in Stored Procedures). So I need an advise of how to do that, if there are a tool for migration (tables, PK, FK, Rules, Defaults...etc) and, if possible, a procedure or tips for translate the stored procedures.
    Thanks in advance....
    Eusebio M

    Here's some links:
    Oracle Migration Workbench:
    http://www.oracle.com/technology/tech/migration/workbench/index.html
    Forums for Migration:
    http://forums.oracle.com/forums/forum.jspa?forumID=183
    Database and Application Migrations
    Good luck!
    Christian

  • DB Adapter calling stored procedure in MS SQL Server.

    Hi
    i am calling a stored procedure in a MS SQL Server.
    I configured a Datasource for MS SQL Server driver as Oracle's MS SQL Server Driver(Type 4) Versions: 7.0 and later and provide all db details of sql server. I tested the data source and was getting success message. My BPEL code is just talking with input parameter and then calling the stored procedure in sql server. I was able to compile the code in jdeveloper and deploy to weblogic. But when i am testing the code. i am getting an error.
    <env:Fault>
    <faultcode>env:Server</faultcode>
    <faultstring>Exception occured when binding was invoked.
    Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'IDMService' failed due to: JCA Binding Component connection issue.
    JCA Binding Component is unable to create an outbound JCA (CCI) connection.
    Test:IDMService [ IDMService_ptt::IDMService(InputParameters,OutputParameters) ] : The JCA Binding Component was unable to establish an outbound JCA CCI connection due to the following issue: javax.resource.spi.IllegalStateException: [Connector:199176]Unable to execute allocateConnection(...) on ConnectionManager. A stale Connection Factory or Connection Handle may be used. The connection pool associated with it has already been destroyed. Try to re-lookup Connection Factory eis/sql/idm from JNDI and get a new Connection Handle.
    Please make sure that the JCA connection factory and any dependent connection factories have been configured with a sufficient limit for max connections. Please also make sure that the physical connection to the backend EIS is available and the backend itself is accepting connections.
    The invoked JCA adapter raised a resource exception.
    Please examine the above error message carefully to determine a resolution.</faultstring>
    <faultactor/>
    <detail>
    <exception>[Connector:199176]Unable to execute allocateConnection(...) on ConnectionManager. A stale Connection Factory or Connection Handle may be used. The connection pool associated with it has already been destroyed. Try to re-lookup Connection Factory eis/sql/idm from JNDI and get a new Connection Handle.</exception>
    </detail>
    </env:Fault>
    What is the problem with connection . How cna i rectify it.
    Thanks,
    Venu Raja

    followed the steps mentioned in meatalnk..
         JCA-12563 - Unable to Establish an Outbound JCA CCI Connection [ID 1235943.1]
    Metalink ID - 1235943.1

  • Creation of DB Adapter for calling stored procedure in MS SQL server 2008

    Hi,
    I am trying to create WSDL and XSD using oracle.tip.adapter.db.sp.artifacts.GenerateArtifacts command line tool to access a MS SQL Server 2008 store procedure and the utility throws the below error,
    C:\jdevstudio10134\integration\lib>java oracle.tip.adapter.db.sp.artifacts.GenerateArtifacts sp.properties
    Warning: Could not locate file pc.properties in classpath
    log4j:WARN No appenders could be found for logger (collaxa.cube.infrastructure).
    log4j:WARN Please initialize the log4j system properly.
    Database platform version is not supported.
    Attempt to use an unsupported database platform version: 10.
    Use a supported version of the database platform. Contact oracle support if error is not fixable.
    It seems this utilty is not supporting MS SQL server 2008 to create artifacts, can you please help me?
    Oracle SOA server: 10.1.3.4
    Driver used: com.microsoft.sqlserver.jdbc.SQLServerDriver
    Thanks,
    Levey

    Hi Levey,
    The Oracle® Application Server Adapters for Files, FTP, Databases, and Enterprise Messaging User’s Guide 10g Release 3 (http://docs.oracle.com/cd/E11036_01/integrate.1013/b28994.pdf), only names Microsoft SQL Server 2000 and 2005. It provides some tips for integrating with MS SQL Server.
    The Oracle® Fusion Middleware User's Guide for Technology Adapters 11g Release 1 (http://docs.oracle.com/cd/E23943_01/integration.1111/e10231.pdf) does name Microsoft SQL Server 2008.
    Perhaps raise a SR to be sure.
    Kind regards, Ronald

  • Excuting stored procedure remotly from SQL Server

    Hi everybody,
    H recive an error message when I try to execute a remote stored procedure on Oracle from SQL Server though a linked server of ME OLE provider for oracle.
    I can view all of the Oracle tables and views within SQL Enterprise Manager. When I try to execute a the command (execute OracleServer...StoredProcedure) through MS query analyzer using the linked Oracle server, I receive the error.
    Could you please help me overcome this problem
    I found something similiar, but with no accepted answer:
    Accessing Oracle Table via Linked Server
    Thanks alot

    Let's put it in another way:
    How could I execute a stored procedure on Oracle from an OLE DB connection?
    Is there syntax for PL/SQL to use from other languages like Transact-SQL?
    Thanks once again

Maybe you are looking for

  • Windows 8 Installation DVD not recognized by TouchSmart 600

    I am trying to install Windows 8 on my TouchSmart 600-1305t PC (Product #: XL730AV#ABA ). The problem is that my computer does not recognize the Windows 8 installation DVD I purchased. Is there a solution to this problem? I would ideally like to dual

  • Photo Event Organization Problem

    I had about 20,000 plus photos in I-Photo all organized by event and date.  I decided to download another 1700 photos from a remote hard drive from my career and after they were imported, all the organization of the events was lost.  I cannot seem to

  • Missing Timeline Slider

    Hi there, Happy New Year, My timeline slider has vanished, very odd! Only on the laptop though, even when pluggin in an external monitor. iMac upstairs has a fully functional slider. Both are running 10.1 and latest OS. I've attached a grab - any ide

  • Monitor and Macbook

    I have an external monitor for my Macbook. I was wondering if I can open the lid and use the webcam instead of having to unplug the DVI and just using the Macbook display? Also, whenever I close the my MB it puts the computer into sleep mode. Is this

  • Error in Postal code .

    Postal code error for country XX. What table is used to configure postal code.