Requirements of SQL Server 2005 Stored Procedures to Develop Crystal Report

Hi All,
   I want to learn how to create crystal report off of SQL Server 2005 Stored Procedure. So anybody please let me know from where I can download the documentation on "Requirements of SQL Server 2005 Stored Procedures for crystal report.
  I am using Crystal Report XI. Any help is greatly appreciated.
Thank You.

Hello,
When CR uses Stored Porcedures we only look at the last SELECT statement. We can't use TMP tables because they are owned by the system and not the user. Even though you created them under your logon credentials you are not the actual owner. Or so I have found so far.... CR does not have permissions to get to those temp tables. If you can find out dynamically what the table names are called then it may work. I don't have a sample but it has the usual table info with a random GUID or temp name, really long, and changes every time.
What should work is create a real table, not one of MS's tempTables and then push all your data to that table and then the last select statement returns all of your data from that temp table:
SELECT * FROM MYTEMPTABLE.DBO.TABLE.
Then CR should ahve no issues.
It may be that the JDBC driver has problems. Test it using OLE DB or ODBC.
Thanks again
Don

Similar Messages

  • BI Publisher 11g - calling SQL Server 2005 stored procedure error

    Hi experts
    I have been calling succesfully an SQL server 2005 stored procedure for the data model of a BI publisher report in 10g, passing it a customerNo parameter.
    EXEC     [dbo].[usp_WelcomeLettersConsumerNo]
              @CustomerNo = :sCustomerNo
    However it does not work in 11g I get the error:
    [Hyperion][SQLServer JDBC Driver][SQLServer]Incorrect syntax near the keyword 'is'.
    which is frustrating as there is no 'is' in the statement (perhaps it is picking up :s?) - I wonder does anyone know if there has been a change in 11g that may be causing this?
    cheers
    Tim

    Hi experts
    I have been calling succesfully an SQL server 2005 stored procedure for the data model of a BI publisher report in 10g, passing it a customerNo parameter.
    EXEC     [dbo].[usp_WelcomeLettersConsumerNo]
              @CustomerNo = :sCustomerNo
    However it does not work in 11g I get the error:
    [Hyperion][SQLServer JDBC Driver][SQLServer]Incorrect syntax near the keyword 'is'.
    which is frustrating as there is no 'is' in the statement (perhaps it is picking up :s?) - I wonder does anyone know if there has been a change in 11g that may be causing this?
    cheers
    Tim

  • Cannot execute a MS SQL Server 2005 Stored procedure via OSB BS

    I created the jca from Jdeveloper using DBAdapter. Then from eclipse I created the wsdl by generating the service. Then I imported all the relevant files in OSB console and created the business service. After executing the business service I get the below error (Pls scroll down).
    I tried many combination s. I tested with a stored procedure which returns only 1 row and 1 column and I hardcoded the column value. I also tried a stored procedure without any input parameters.
    I am sure there is no problem with the deployment of the datasource because I can execute operations to a table for select, update, delete using a business service following the above procedures.
    I created the stored proc following the same steps for select, update, delete. Also one more info is that when I call a stored proc from Oracle XE database it is working fine.
    My JDBC version is 4 . I am using the jar file provided by Microsoft that is sqljdbc4.
    Web Logic Server - 11gR1
    OSB - 11g + coherence + OEPE
    JDeveloper - 11.1.1.3.0
    can someone please help. This is very urgent. I have tried many combination's to get this to work from last 3 days without any luck.
    Help appreciated.
    Regards
    this happens only while executing the stored procedure.
    The invocation resulted in an error: Invoke JCA outbound service failed with application error, exception: com.bea.wli.sb.transports.jca.JCATransportException: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/NEHR_OSB/Lab/SvcNumb [ SvcNumb_ptt::SvcNumb(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'SvcNumb' failed due to: Stored procedure invocation error.
    Error while trying to prepare and execute the OSBLogs.dbo.sp_Numb API.
    An error occurred while preparing and executing the OSBLogs.dbo.sp_Numb API. Cause: java.lang.NullPointerException
    ; nested exception is:
    BINDING.JCA-11811
    Stored procedure invocation error.
    Error while trying to prepare and execute the OSBLogs.dbo.sp_Numb API.
    An error occurred while preparing and executing the OSBLogs.dbo.sp_Numb API. Cause: java.lang.NullPointerException
    Check to ensure that the API is defined in the database and that the parameters match the signature of the API.
    com.bea.wli.sb.transports.jca.JCATransportException: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/NEHR_OSB/Lab/SvcNumb [ SvcNumb_ptt::SvcNumb(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'SvcNumb' failed due to: Stored procedure invocation error.
    Error while trying to prepare and execute the OSBLogs.dbo.sp_Numb API.
    An error occurred while preparing and executing the OSBLogs.dbo.sp_Numb API. Cause: java.lang.NullPointerException
    ; nested exception is:
    BINDING.JCA-11811
    Stored procedure invocation error.
    Error while trying to prepare and execute the OSBLogs.dbo.sp_Numb API.
    An error occurred while preparing and executing the OSBLogs.dbo.sp_Numb API. Cause: java.lang.NullPointerException
    Check to ensure that the API is defined in the database and that the parameters match the signature of the API.

    Hi,
    Even I am getting this kind of problem while executing a stored procedure from OSB.
    I have a stored procedure and i have created wsdl and xsd using JDEV. Now when i am creating a .biz with this wsdl and executing it , this is giving following error:
    <JCA_TRANSPORT_RUNTIME_APPLICATION_FAULT xmlns="http://www.bea.com/transport/2007/05/jca">
    oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/DBTest/TryDB [ TryDB_ptt::TryDB(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'TryDB' failed due to: Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the EAIUSER.DIM_Procedure API. Cause: java.sql.SQLException: ORA-06550: line 1, column 7:
    PLS-00201: identifier 'EAIUSER.DIM_PROCEDURE' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    [Caused by: ORA-06550: line 1, column 7:
    PLS-00201: identifier 'EAIUSER.DIM_PROCEDURE' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    ; nested exception is:
    JCA-11811
    Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the EAIUSER.DIM_Procedure API. Cause: java.sql.SQLException: ORA-06550: line 1, column 7:
    PLS-00201: identifier 'EAIUSER.DIM_PROCEDURE' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    [Caused by: ORA-06550: line 1, column 7:
    PLS-00201: identifier 'EAIUSER.DIM_PROCEDURE' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Check to ensure that the API is defined in the database and that the parameters match the signature of the API. Contact oracle support if error is not fixable.
    Please help me in solving this..

  • MS SQL Server system stored procedures can't be migrated into Oracle 11g

    During database migration from MS SQL Server 2008 to Oracle 11g R2, if the application stored procedure invokes the MS SQL Server system stored procedures (for example: sp_getapplock, sp_releaseapplock ....), these SQL server system stored procedures can't be transferred. See following migrated Oracle application stored procedure for example:
    create or replace
    PROCEDURE spPwSysID_GetNextID
    v_ID OUT NUMBER,
    iv_SysType IN NVARCHAR2 DEFAULT NULL ,
    iv_Cnt IN NUMBER DEFAULT NULL
    AS
    v_SysType NVARCHAR2(50) := iv_SysType;
    v_Cnt NUMBER(10,0) := iv_Cnt;
    v_result NUMBER(10,0);
    BEGIN
    --SQL Server BEGIN TRANSACTION;
    utils.incrementTrancount;
    v_Systype := UPPER(v_Systype) ;
    IF v_Cnt < 1 THEN
    v_Cnt := 1 ;
    END IF;
    v_result :=sp_getapplock(v_Resource => v_Systype,
    v_LockMode => 'Exclusive') ;
    IF v_result >= 0 THEN
    BEGIN
    SELECT ID
    INTO v_ID
    FROM PWSYSID
    WHERE SysType = v_SysType;
    IF SQL%ROWCOUNT = 1 THEN
    UPDATE PwSysID
    SET ID = ID + v_cnt
    WHERE SysType = v_SysType;
    ELSE
    BEGIN
    INSERT INTO PwSysID
    ( ID, SysType )
    VALUES ( v_cnt + 1, v_SysType );
    v_ID := 1 ;
    END;
    END IF;
    v_result :=sp_releaseapplock(v_Resource => v_Systype) ;
    END;
    ELSE
    BEGIN
    raise_application_error( -20002, 'Lock failed to acquire to generate Cityworks Id.' );
    END;
    END IF;
    utils.commit_transaction;
    END;

    During database migration from MS SQL Server 2008 to Oracle 11g R2, if the application stored procedure invokes the MS SQL Server system stored procedures (for example: sp_getapplock, sp_releaseapplock ....), these SQL server system stored procedures can't be transferred. See following migrated Oracle application stored procedure for example:
    create or replace
    PROCEDURE spPwSysID_GetNextID
    v_ID OUT NUMBER,
    iv_SysType IN NVARCHAR2 DEFAULT NULL ,
    iv_Cnt IN NUMBER DEFAULT NULL
    AS
    v_SysType NVARCHAR2(50) := iv_SysType;
    v_Cnt NUMBER(10,0) := iv_Cnt;
    v_result NUMBER(10,0);
    BEGIN
    --SQL Server BEGIN TRANSACTION;
    utils.incrementTrancount;
    v_Systype := UPPER(v_Systype) ;
    IF v_Cnt < 1 THEN
    v_Cnt := 1 ;
    END IF;
    v_result :=sp_getapplock(v_Resource => v_Systype,
    v_LockMode => 'Exclusive') ;
    IF v_result >= 0 THEN
    BEGIN
    SELECT ID
    INTO v_ID
    FROM PWSYSID
    WHERE SysType = v_SysType;
    IF SQL%ROWCOUNT = 1 THEN
    UPDATE PwSysID
    SET ID = ID + v_cnt
    WHERE SysType = v_SysType;
    ELSE
    BEGIN
    INSERT INTO PwSysID
    ( ID, SysType )
    VALUES ( v_cnt + 1, v_SysType );
    v_ID := 1 ;
    END;
    END IF;
    v_result :=sp_releaseapplock(v_Resource => v_Systype) ;
    END;
    ELSE
    BEGIN
    raise_application_error( -20002, 'Lock failed to acquire to generate Cityworks Id.' );
    END;
    END IF;
    utils.commit_transaction;
    END;

  • A problem when referring to a stored procedure in a crystal report

    Hi all,
    I've checked that when calling one stored-procedure within a crystal report, one sequence will be selected for 2 times. Thus 2 will be added to the corr. sequence No. And I've also directly ran such procedure in 'SQL/Plus' that follows, to make sure that actually the corr. sequence will be referenced by only once.
    SQL> execute p_rpT_FCL_col (:te, 'ZIMU00000537SJU',:GRP)
    PL/SQL procedure successfully completed.
    SQL> print :te
    TE
    17
    SQL> execute p_rpT_FCL_col (:te2, 'ZIMU00000537SJU',:GRP)
    PL/SQL procedure successfully completed.
    SQL> print :te2
    TE2
    18
    Bst Rgds,
    Edward

    Well, can you please post the details about your stored proc?
    <quote> I've checked that when calling one stored-procedure within a crystal report, one sequence will be selected for 2 times. Thus 2 will be added to the corr. sequence No.</quote>
    Question: What do you mean by that? How many times did you run the report?
    More details please.
    -Raj Suchak
    [email protected]

  • Required Microsoft Sql Server 2005 Server Roles for JDBC Connection

    Hi!
    I have developed a database in MS SQL Server 2005, to which I would require only bulkadmin server role from an external java application, because I only need to update rows, insert values or use select queries in the database.
    The problem is that, using either the Microsoft JDBC Driver 1.1 or the Java JDBC ODBC Driver and the Windows XP Data Base (ODBC) configurations, I need a user with sysadmin server role inside Sql Server, otherwise JDBC won't connect to the database using the selected user. Even if I leave the sql login with setupadmin or any server role lower than sysadmin, the connection is refused.
    Is there no way to connect using JDBC to MS Sql Server 2005 other than granting the connected user sysadmin rights? My code looks as follows:
    String driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
    String url = "jdbc:sqlserver://FIREBLADE\\SQLEXPRESS";
    String user = "username";
    String password = "password$$";
    Connection conn;
    Class.forName(driver);
    conn = DriverManager.getConnection(url,user,password);
    if (conn != null)
    System.out.println("\nSQL Server Connection established ...\n");
    I have heard that Java JDBC connections to Microsoft require high-level access, and if that's the case I would rather migrate my database to MySql.
    Any informed answer is more than welcome. Thanks for reading my post!

    Well i personally prefer usage of open source MS SQL SERVER 2k jdbc driver called jtds instead of the driver provided by MS themselves(which is proproteriry) as i had similar problem which i personally encountered when i was using it.
    go through the below link for further info.
    http://jtds.sourceforge.net/
    REGARDS,
    RaHuL

  • Pass unicode data in SQL Server 2008 stored procedure parameter

    Hi,
    I want to pass unicode data in a SQL stored procedure. But I am not sure that how to append N with NVarchar datatype.
    For example I Create a table LocalizationTest and wants to insert a few records.
    Create table LocalizationTest
        Field1 NVarchar(255)
    INSERT INTO LocalizationTest
    VALUES(N'123 Illini Dr, 東皮奧里亞, 8989')
    the above given statement works.
    To explain it more , script A works but script B does not work.
    DECLARE @X NVARCHAR(255)
    [A]
    SET @X=N '123 Illini Dr, 東皮奧里亞, 8989'
    INSERT INTO LocalizationTest
    VALUES(@X)
    [B]
    SET @X= '123 Illini Dr, 東皮奧里亞, 8989'
    INSERT INTO LocalizationTest
    VALUES(@X)
    What is the correct way to execute script B because @X will be passed in a SQL Stored Procedure?
    Thanks
    Sharma M.

    If you do not pass the value as a Unicode value there is nothing left of the Unicode characters but question marks. Once this has happened, AFAIK there is no way to undo it (other than resetting the value as Unicode characters again).
    Affirmative.
    Demo - This is what happens if you convert UNICODE (nvarchar) to varchar with implicit conversion (try to force 2 bytes into one byte).
    3F hex is '?'.
    CREATE TABLE #LocalizationTest (Field1 VARCHAR(255))
    INSERT INTO #LocalizationTest
    VALUES(N'123 Illini Dr, 東皮奧里亞, 8989')
    DECLARE @X NVARCHAR(255), @dSQL NVARCHAR(MAX)
    SET @X=N'123 Illini Dr, 東皮奧里亞, 8989'
    INSERT INTO #LocalizationTest VALUES(CONVERT(NVARCHAR(255),@X))
    SET @dSQL = N'INSERT INTO #LocalizationTest VALUES(N'''+@X+''')'
    PRINT @dSQL
    EXEC sp_ExecuteSQL @dSQL
    SELECT *, Field1Bin=convert(binary(30), Field1) FROM #LocalizationTest
    DROP TABLE #LocalizationTest
    123 Illini Dr, ?????, 8989 0x31323320496C6C696E692044722C203F3F3F3F3F2C203839383900000000
    123 Illini Dr, ?????, 8989 0x31323320496C6C696E692044722C203F3F3F3F3F2C203839383900000000
    123 Illini Dr, ?????, 8989 0x31323320496C6C696E692044722C203F3F3F3F3F2C203839383900000000
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Cannot refresh a stored procedure within a Crystal Report from Xcelsius

    Please help...Xcelsius 2008 & Live Office problem...
    What I am trying to do is to refresh a stored procedure that is within a Crystal report from within my Xcelsius dashboard in Preview mode. The data returned appears on the Xcelsius dashboard. It works fine in Design mode, just not in Preview or when published as a swf.
    1. I set up a Crystal Report using a Stored Procedure as the data provider.
    2. The Stored Procedure has a parameter built into it.
    3. When the report is refreshed within Crystal, the prompt dialog box is displayed; I fill in the desired value, and run. Everything comes back fine.
    4. Crystal Report is exported to the repository.
    5. In Excel, I inserted the Crystal Report using Live Office. It shows up as a Live Office object just fine.
    6. I bound an Excel cell to the prompt; when you change the value in the bound cell, the Live Office object refreshes and displays the correct results.
    7. In Xcelsius, I imported the Excel spreadsheet.
    8. I set up a Text component that is bound to the cell containing the parameter value. Also set up a Grid to display the results, and a Connection Refresh button to call the refresh. Added a Live Office Data Connection pointing to the Web Service URL for the report.
    Note: When in Designer mode, if the value of the bound cell is changed, the results in the grid change accordingly.
    9. When in Preview mode (or generated swf), if the Refresh button is pressed, a "User Identification" dialog box appears asking me to log on. The values it asks for are: System, User Name, Password, and Authentication. I enter the same credentials as are within the Live Office settings in Excel, (which are working correctly), but receive an error "soapenv:Server.generalException: Database logon failed.".
    Note - all the id's are synced up - Business Objects, Database, etc.
    I've tried all kinds of combinations, but nothing gets me past this error. If I use any other server than the one listed under System in Live Office, the error message is "soapenv:Server.generalException: Server XXXXX not found or server may be down".
    I've noticed that in Excel directly, when I open the spreadsheet and refresh the Live Office object, I am prompted to log on to the database where the stored procedure is being executed. This dialog box does not appear once the Excel sheet has been imported into Xcelsius. One of the combinations I tried in the "User Identification" dialog box was the name of the database server, that didn't work either.
    I also tried creating the Live Office object directly within the Excel spreadsheet in Xcelsius, but then I was unable to bind the prompt value. Could never get the Live Office/Properties menu to appear.
    Ideas? Thoughts?
    Thanks in advance!
    Stephanie

    This post looks like a duplicate of: Live Office: Database logon failed error

  • Crystal Reports 9 and SQL Server 2005 default parameter values

    We're using Crystal Reports 9 and upgraded from SQL Server 2000 to SQL Server 2005.
    I'm noticing a very weird problem which I wonder if anyone else has experienced (and hopefully found a resolution for). It appears that in using Crystal with SQL Server 2005 stored procedures, if we have default parameter values in the stored procedures, the default parameter values get completely ignored if you pass in a NULL value from Crystal!
    For example, if you have a stored procedure that begins like this:
    ALTER          Procedure [dbo].[StoredProcedure]
    @Param1 VarChar(200) = '',
    @Param2 VarChar(200) = ''
    AS ...
    both @Param1 and @Param2 have a default value of an empty string, and therefore should become empty strings if nothing (NULL values) gets passed in for them.
    But, like I said, what I'm finding is that with Crystal calling the stored procedure with NULL @Param1 and @Param2 values, they never become empty strings, but rather remain as NULLs.
    This was never a problem with SQL 2000.
    Very perplexing. Anyone else every experience this?
    Thank you.

    Please ignore my earlier post -- answered my own question.
    NULL parameter values do not get replaced by default values in SQL -- that is normal behavior in both SQL 2000 and SQL 2005. Just goes to show, that no many how many years programming experience you have, you can still get tripped up sometimes : (

  • MS SQL Server 2005 Developer Edition

    Hi,
    We are developing a legal management product on SAP platform
    We would have  SQL Server to be used as a database for SAP ECC 6.0 in DEVELOPEMENT environment
    The landscape of the planned development  environment  has a total of 8 servers. We understand that a separate MS SQL Server 2005 ( Question :- Enterprise / standard / Developer ??? ) edition is required for all the servers Each server will run its own instance. Each server will have 2 Intel Xeon CPUs with quad cores.
    We understand that there will not be any users accessing the database directly. Instead, the SAP ECC software will create its own schema and users ( at most 4).
    1) Please let us know which edition is best suitable for us for above scenario .
    2) Does SAP ECC work on SQL Server 2005 Developer edition ?
    3) Can we have  one instance of SQL Server be used and multiple databases for dev, qa and prod be created from it
    Your prompt response will much be appreciated
    Thanks a ton !

    1) Please let us know which edition is best suitable for us for above scenario .
    SAP ONLY supports Enterprise edition.
    2) Does SAP ECC work on SQL Server 2005 Developer edition?
    No SAP willnot work on SQL Server 2005 edition.
    3) Can we have one instance of SQL Server be used and multiple databases for dev, qa and prod be created from it.
    Yes, technically it is possoble. But not at all recommended by SAP.
    Regards,
    SK

  • CR with VS 2003 Oracle vs SQL Server 2005

    VS2003
    Windows XP
    All Crystal Reports designed using "push" model (Seting the Report Document's SetDataSource property using a single table dataset)
    I have a large VS2003 application (90+ Crystal Reports) using an Oracle database.  The client wants to switch to SQL Server 2005.  The application works with SQL Server "as is" except for the Crystal Reports.  A query engine error is generated.  The tables/views are quite simple using only integers, decimals, char and varchar columns, no datetime columns.   The dataset's  Name and datatable's Name are the same, the only difference is the data provider used.  Microsoft's Oracle Data provider vs Microsoft's SQL Server Data provider. Any thoughts? Any workarounds?.
    I am in the process of converting the application to VS2008 and the problem does not exist in the VS2008 version.  Crystal Reports converted from VS2003 to VS2008 work with either database/data provider.,
    Edit: It appears that Oracle does not differentiate between datatypes decimal and int32.  Any thoughts. (Not the problem)
    Edited by: spooky102 on Aug 17, 2009 6:40 PM
    Edited by: spooky102 on Aug 17, 2009 6:42 PM
    Edited by: spooky102 on Aug 17, 2009 7:31 PM

    An assumption here is that your .NET 2003 app is using the bundled version of CR(?) - version 9.1. If that is the case, make sure you have updated your install with SP1:
    https://smpdl.sap-ag.de/~sapidp/012002523100009301312009E/crnet11win_en.zip
    Next, see if this blog will help you in troubleshooting the issue:
    /people/ludek.uher/blog/2009/03/02/troubleshooting-issues-with-vs-net-datasets-and-crystal-reports
    re:
    It appears that Oracle does not differentiate between data types decimal and int32.
    Not sure how this relates to Crystal Reports as such? But let's work on one issue per thread. If you want to work the data type issue more, please create a new thread. Otherwise, these things get too messy...
    Ludek

  • Crystal Reports Server (XI) - Store Procedure Dependency 4 Running Reports!

    I'm upgrading from Crystal Reports 7 to XI.
    Currently, data in temp tables gets populated once a stored procedure executes. I've added this stored procedure as a dependency for the reports to run. As a result, scheduled Reports do not start running until this stored procedure finishes executing. This ensures there is data in the tables before the reports start to run.
    However I'm not sure how the above can be accomplished in XI. This is the only hurdle, the team has overcome all the other hurdles and this could potentially be a show stopper.
    Please help!
    Thanks,
    Anuj

    Carl:
    Thanks a lot for your assistance! I'm using Crystal Enterprise.
    The event dependency works fine, however I'm having trouble in accomplishing this:
    "Put the Stored Procedure in a Crystal report and schedule it to trigger the event upon successful completion."
    I'm new to the XI environment, sorry if the question sounds too dumb or too basic....
    Since the stored procedure will load data in the concerned tables only when executed, I'm having trouble in executing the procedure when I created a new report & selected the procedure as the data source. I get an error as "Invalid Argument Provided"
    Do I need to copy the SQL of the stored procedure and run it in the report as a command object? I'm afraid doing so will not commit the newly added records.
    Thanks much for your assistance, appreciate it!
    Thanks,
    Anuj

  • How to find the list of unused stored procedures in SQL Server 2005?

    Hi,
    I need to find out the list of stored procedures which are not in use.
    I found there is something called "sys.dm_exec_procedure_stats " for SQL server 2008.
    Can you please suggest your ides here to do the same job for SQL server 2005.
    Many Thanks.

    In SQL 2005 there is, sort of. This is query lists the last execution
    time for all SQL modules in a database:
       SELECT object_name(m.object_id), MAX(qs.last_execution_time)
       FROM   sys.sql_modules m
       LEFT   JOIN (sys.dm_exec_query_stats qs
                    CROSS APPLY sys.dm_exec_sql_text (qs.sql_handle) st) 
              ON m.object_id = st.objectid
             AND st.dbid = db_id()
       GROUP  BY object_name(m.object_id)
    But there are tons of caveats. The starting point of this query is
    the dynamic management view dm_exec_query_stats, and the contents is
    per *query plan*. If a stored procedure contains several queries, 
    there are more than one entry for the procedure in dm_exec_query_stats.
    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

  • Sender JDBC support the stored procedure in SQL Server 2005

    Dear All,
    My question here is , Sender is JDBC adpter support to call the Stored procedure in Microsoft SQL Server 2005?
    I followed the below thread before posting this question
    Sender JDBC Adapter Supports Stored Procedures????
    In the thread Suraj response has mentioned SAP note: 941317, I checked the note, Note says it supported only ORACLE DBMS versions.
    Could you please clarify about this to possibility to call the stored procedure in Microsoft SQL server 2005?
    Thank you in Advance
    Sateesh

    Hi Sateesh,
    To answer your query, Yes it does. SP call works with SQL Server 2005 as well, the SP call should be "execute SPNAME <paramas>". In the place of update statement put any junk value as mentioned in the earlier comment.
    But just one thing to be noted, the select or any other query returning the desired resultset must be the first statement in youre SP returning value to the calling app. Means if there are any update, deletion or intermediate select queries to be used with in your SP, those all should be placed after the Main Select query that returns the desired resultset. Variable declarions and assignments are allowed.
    But if the seq of statements in your SP are like:
    @var1 Varchar
    Update <tablename>....
    Select * from <tablename>
    Then the output of the SP is :
    1 row updated
    <the resultset from select>
    In such cases, PI can recognise the first value returned only, that is "1 row updated" and hence the returned resultset wouldn't be seen by PI or not be passed to integration engine. Hence the update should come after the main Select.
    One more interesting piece of information, even if you copy and paste the entire SP code in place of the query string of Sender JDBC adapter, that too will work with all your variable declarations, multiple queries and updates and everything. Just have to follow the above rule.
    Let us know what you find.
    Regards,
    Suddhasatta

  • SQL Server 2005 64-bit & SQL CLR Stored Procedures using DI API. COM Error.

    Hi,
    We've created a set of SQL CLR Stored Procs in C# .NET which use the DI API to import data into SAP (DEV was carried out on 32-bit environment).
    The DLLs and Interop.SAPbobsCOM have been successfully deployed as assemblies on SQL Server with their permission set to UNSAFE on the following environment:
    Microsoft Windows Server 2003 R2 Standard Edition 64-bit, Service Pack 2
    Microsoft SQL Server 2005 - 9.00.3073.00 (X64)
    SAP Business One 2007 A (8.00.180) SP:00 PL:45
    When executing the SQL CLR Stored Procs from SQL Server Management Studio, the following error is returned:
    "Retrieving the COM class factory for component with CLSID {632F4591-AA62-4219-8FB6-22BCF5F62007} failed due to the following error: 80040154."
    From our understanding, this occurs because SQL Server loads the assemblies into it's 64-bit process space, whereas the SAPbobsCOM is 32-bit. Are we assuming correctly?
    What can be done to solve this problem?

    Hi Jeremy,
    I'd agree with your assumption that it's to do with your DLL running in a 64 bit process. When you build your project, try setting the build properties to use a X86 instruction set (ie 32 bit).
    More details here:
    Re: Addon Develeped on 32bit Install on 64bit
    I've never tried for a CLR stored procedure but this is how you get around the issue when running a DI API addon on a 64 bit machine so hopefully it will work if the dll is executed by SQL Server. Let us know how you get on.
    Kind Regards,
    Owen

Maybe you are looking for

  • Is there a way to get Front Row?

    I have a first gen Mac Mini PowerPC , I have Tiger 10.4.5, and i am wodering if there is a way to download Front Row on my computer or is there any way to get front row? or do i have to pay?

  • Podcast playlist missing in Podcast App

    Just posted the following under iTunes Feedback. If you agree, please post also. Thanks, Okay, you removed Podcasts from the Music App on the Iphone and moved them to the Podcast App. Where did the playlists go? I don't just listen to 1 Podcast. I bu

  • How to make Webservice call another Webservice

    i have developed two webservices , what i need is to call the methods in one of them by the other .... the first one for example calls the second one , how they communicate !!!!

  • Logic 9.1.8  !!!!

    I don't know about anyone else, but this new version goes along VERY smooth....have worked all day and not a glitch,no laggy stuff, and it's very responsive. It's working GREAT!!!!  Like the commercial.... I'm happier than a witch in a broom factory!

  • TACACS+ and RADIUS

    Hi, Can i configured on aironet 1100 RAIDIUS for users and TACACS for administration? With Cisco ACS i can only add one option. I want to centralize the AAA for all the equipments and use CISCO ACS! But the AP's are radio clients already! TKS