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

Similar Messages

  • 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

  • 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

  • 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/

  • 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

  • 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

  • Need sample source code for calling stored procedure in Oracle

    Hi.
    I try to call stored procedure in oracle using JCA JDBC.
    Anybody have sample source code for that ?
    Regards, Arnold.

    Thank you very much for a very quick reply. It worked, but I have an extended problem for which I would like to have a solution. Thank you very much in advance for your help. The problem is described below.
    I have the Procedure defined as below in the SFCS1 package body
    Procedure Company_Selection(O_Cursor IN OUT T_Cursor)
    BEGIN
    Open O_Cursor FOR
    SELECT CompanyId, CompanyName
    FROM Company
    WHERE CompanyProvince IN ('AL','AK');
    END Company_Selection;
    In the Oracle Forms, I have a datablock based on the above stored procedure. When I execute the form and from the menu if I click on Execute Query the data block gets filled up with data (The datablock is configured to display 10 items as a tabular form).
    At this point in time, I want to automate the process of displaying the data, hence I created a button and from there I want to call this stored procedure. So, in the button trigger I have the following statements
    DECLARE
    A SFCS1.T_Cursor;
    BEGIN
    SFCS1.Company_Selection(A);
    go_Block ('Block36');
    The cursor goes to the corresponding block, but does not display any data. Can you tell me how to get the data displayed. In the future versions, I'm planning to put variables in the WHERE clause.

  • Calling stored procedure from embedded sql

    I'm trying to call a stored procedure from embedded sql. I'm following the examples located in
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/a96109/pco06pls.htm#i9641
    I have the following section in my .pco file before precompiling.
    exec sql execute
    begin
    docs.grant_access_to_all_categories(:p_sam_id);
    end;
    end-exec.
    When running procob on the file with the above code I get the following error.
    Error at line 225, column 13 in file pco\docs_stored_procedures.pco
    exec sql execute
    ............1
    PCB-S-00576, PLS-201: identifier 'DOCS.GRANT_ACCESS_TO_ALL_CATEGORIES' must be d
    eclared
    Error at line 225, column 13 in file pco\docs_stored_procedures.pco
    exec sql execute
    ............1
    PCB-S-00576, PLS-0: Statement ignored
    Any ideas on what I am doing wrong on calling this stored procedure.

    I get the same error when trying to precompile sample11.pco from the demo directory in the oracle client software.
    Error at line 70, column 12 in file sample11.pco
    EXEC SQL EXECUTE
    ...........1
    PCB-S-00576, PLS-201: identifier 'EMP_DEMO_PKG.OPEN_CUR' must be declared
    Error at line 70, column 12 in file sample11.pco
    EXEC SQL EXECUTE
    ...........1
    PCB-S-00576, PLS-0: Statement ignored

  • Best practice for calling stored procedures as target

    The scenario is this:
    1) Source is from a file or oracle table
    2) Target will always be oracle pl/sql stored procedures which do the insert or update (APIs).
    3) Each failure from the stored procedure must log an error so the user can re-submit the corrected file for those error records
    There is no option to create an E$ table, since there is no control option for the flow around procedures.
    Is there a best practice around moving data into Oracle via procedures? In Oracle EBS, many of the interfaces are pure stored procs and not batch interface tables. I am concerned that I must build dozens of custom error tables around these apis. Then it feels like it would be easier to just write pl/sql batch jobs and schedule with concurrent manager in EBS (skip ODI completely). In that case, one could write to the concurrent manager log and the user could view the errors and correct.
    I can get a simple procedure to work in ODI where the source is the SQL, and the target is the pl/sql call to the stored proc in the database. It loops through every row in the sql source and calls the pl/sql code.
    But I can not see how to set which rows have failed and which table would log errors to begin with.
    Thank you,
    Erik

    Hi Erik,
    Please, take a look in these posts:
    http://odiexperts.com/?p=666
    http://odiexperts.com/?p=742
    They could help you in a way to solve your problem.
    I already used it to call Oracle EBS API's and worked pretty well.
    I believe that an IKM could be build to automate all the work but I never stopped to try...
    Does it help you?
    Cezar Santos
    http://odiexperts.com

  • Syntax for calling Stored procedures?

    Seems straightforward but I just can get the syntax.
    Here's the procedure defined in SQL
    CREATE Procedure usp_InsTest
    @title varchar(150),
    @length int,
    @catid int,
    @date datetime,
    @filename varchar(50),
    @typeid int,
    @desc varchar(2000),
    @statusid int,
    @assign char(1),
    @languageid int = null
    as
    Insert into test(TestTitle,TestLength,TestCatID,TestDate,TestFileName,
    TestTypeID,TestDesc,TestStatusID,TestIsAssigned,
    TestLanguageID)
    values (@title,@length,@catid,@date,@filename,@typeid,@desc,
    @statusid,@assign,@languageid)
    GO
    I have tried a number of ways. What is the correct sytax for calling a stored procedure with variables?

    Here's what I've come up with...
    Connection dbConn;
    Driver d = (Driver)Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
    String URL = "jdbc:odbc:" + "cms";
    dbConn = DriverManager.getConnection(URL, "sa", "");
    CallableStatement s;
    String x = "{call usp_InsTest(@title,@length,@catid,@date,@filename,@typeid,@desc,@statusid,@assign,@languageid)}";
    Calendar c = Calendar.getInstance();
    s = dbConn.prepareCall(x);
    s.setString(1,TestTitle);
    s.setInt(2,Integer.parseInt(TestLength));
    s.setInt(3,6);
    s.setDate(4,new java.sql.Date(System.currentTimeMillis()));
    s.setString(5,TestFileName);
    s.setInt(6,Integer.parseInt(TestTypeID));
    s.setString(7,"Test Description");
    s.setInt(8,Integer.parseInt(TestStatusID));
    s.setInt(9,Integer.parseInt(TestIsAssigned));
    s.setInt(10,1);
    ResultSet r = s.executeQuery();
    I get
    java.lang.NullPointerException
    at sun.jdbc.odbc.JdbcOdbcPreparedStatement.clearParameter(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcPreparedStatement.setChar(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcPreparedStatement.setString(Unknown Source)
    at CMSBatch.addToDatabase(CMSBatch.java:242)
    at CMSBatch.actionPerformed(CMSBatch.java:312)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    Line 242 is the first setString.
    Is my prepareCall statement correct?

  • Can I call stored procedure with PL/SQL?

    Oracle newbie question, it is.
    Assume a very simple stored procedure like this:
    Create or replace procedure aa (
    inPar IN number, outPar OUT number)
    IS
    rrr Number;
    Begin
    Blah, blah, blah...
    rrr := inPar + 100;
    Blah, blah, blah...
    outPar := rrr;
    End;
    So the questions are
    1) How do I call the above stored proc and pass input parameter values dynamically?
    2) How can I retreieve the results of outPar?
    I did some research and I learn I can use a programming interface such as Visual Basic or Java. Is that the only way available? I know a small bit about SQL*Plus. f I've tried to enter some PL/SQL commands under SQL*PLUS but I'm stuck. I must have missed something..please.
    In MS SQL Server environment I know what I can do. If I want to do the same thing, I just:
    Create proc aa ( @inParam int, @outParam int OUTPUT )
    as
    blah, blah, blah
    Set @outParam = @inParam + 1000
    return 1
    GO
    Enter the following statements (via query analyzer) to call the SQL Server Stored procedure and get the result:
    Declare @outX int
    Declare @returnX int
    exec @returnX = aa 100, @outX OUTPUT
    print str(@outX)
    print str(@returnX)
    Go

    maybe this example might be of some help:
    SQL> set linesize 120
    SQL> set pagesize 40
    SQL> select * from emp;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7566 JONES      MANAGER         7839 02-APR-81       2975       1000         20
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
          7839 KING       PRESIDENT            17-NOV-81       5000                    10
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7788 SCOTT      ANALYST         7566 09-DEC-82       3000                    20
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7876 ADAMS      CLERK           7788 12-JAN-83       1100                    20
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7934 MILLER     CLERK           7782 23-JAN-82       1300                    10
    14 rows selected.
    SQL> create or replace procedure proc_get_emp_name(pEmpno in number,
      2                                                pEmpName out varchar2) as
      3  begin
      4    select ename
      5      into pEmpName
      6      from emp
      7     where empno = pEmpno;
      8  end;
      9  /
    Procedure created.
    SQL> declare
      2    vEname     emp.ename%type;
      3  begin
      4    for i in (select empno from emp) loop
      5      proc_get_emp_name(i.empno,vEname);
      6      dbms_output.put_line(vEname);
      7    end loop;
      8  end;
      9  /
    SMITH
    ALLEN
    WARD
    JONES
    MARTIN
    BLAKE
    CLARK
    SCOTT
    KING
    TURNER
    ADAMS
    JAMES
    FORD
    MILLER
    PL/SQL procedure successfully completed.
    SQL>

  • 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

  • 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

  • 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

Maybe you are looking for

  • ICloud playlist are not updated correctly, iCloud playlist are not updated correctly

    I have configured multiple iTunes playlists on my iMac (which is using iTunes Match). Some of these are not properly updated on my iPhone 4S. For example I had a playlist folder Genre and in there a Sports (just a simple playlist, not even a smart on

  • HELP!!! Creating Text using script

    Hi there, I am writing a script which creates a text frame and adds text in it. The problem is, I want to add some information below everytime on many documents. Instead of copying from other sources everytime, I thought of writing a scirpt which by

  • SMTP message cannot be sent

    Hi All, I'm trying to send a custom ebMS document from Acme to Global Chips over Email. It is throwing me the below error message. From the below error I found out that the port number was wrong. I think it is taking the port number by default, but t

  • PDF Comments Disappear Upon Placing into InDesign CS5

    I am creating an InDesign document in which I need to pull information from several files. One such file is a PDF with comments inserted via the typewriter tool. Upon placing into InDesign, the comments do not appear, although the original text withi

  • How to: Resetting install location back to "Default Location..." (Windows 8)

    I recently upgraded my PC and added an SSD as my primary drive. Like most people, I also have a secondary drive for most apps and files. In the Creative Cloud App manager, I changed the Installation location to a directory on my secondary drive. The