The SQL query is not executing

Hi
I have the following situation: In a project we designed our reports calling a stored procedure the exits in a MS SQL Server 200 database. The Stored Procedures works fine and when they are used in the report everything works perfectly.
The reports are being made with CR DEsigner 11, when the designer ends them, ha pass them to me and we put them in our java web application. I open them and even preview them since the Crystal Reprots Perspective of Eclipse and I can see the data, so everything to this point is OK.
The problem comes when I change of connection, I'm trying to connect every report to the same host and database, and when the reprot is displayed in the browser there is no data. I profile the SQL commands that are executed when the report is requested and I found that the reprot is not executing the stored procedure.
I guess because i'm connectring the report to the same database and host that was used when the report is created and i'm also passing exactly the same parameters of the stored procedure, then report thinks that it doesn't have executing again becuase it will be the same information.
SO, i wonder if there is a way to request to the report to execute the sql query every time i have to display it.
thanks for any help.

What happens when you try to view the report using a simple viewer.jsp?without changing the connection?
2009-05-25 14:06:09,250 ERROR com.businessobjects.reports.sdk.JRCCommunicationAdapter -  detected an exception: Error de conexión: [SQLServer 2000 Driver for JDBC]Error establishing socket.
But the database server is ok, so i think the rpt needs more information to be connect to the database.
Also what happens if you dont use the data bean and give everything there only?
The same, the rpt is not executing the stored procedure.
Did anything change on the RDBMS side? Additional packages, changes to the schema, ownership, etc?
No, the server is ok and the database is ok.
If you configure Log4J logging to DEBUG, you should see the database invokes from the Crystal Java engine, specifically the queries sent and the number of rowsets returned. Do you notice any errors?
I have a problem here with log4j. In my project i'm using spring and with the help of spring i configure log4j, basically with spring is easier to configure log4j.
I'm telling you this because i have log4j working but when my application reaches the code to change the connection to the rerport, log4j dies and stop sending any message to the stdout or to a log file. I haven't since this behavior in any other app o library. So i want to guess i have something wrong with my log4j or maybe with log4j+spring.
So, i remove all the code of spring referring to log4j, but the problem with log4j wasn't solved.
What i will try now is to remove spring from the project.
This is my log4j.properties:
log4j.rootLogger=DEBUG, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - %m%n

Similar Messages

  • In JDBC Sender Adapter , the server is Microsoft SQL .I need to pass current date as the input column while Executing stored procedure, which will get me 10 Output Columns. Kindly suggest me the SQL Query String

    In JDBC Sender Adapter , the server is Microsoft SQL .I need to pass current date as the input column while Executing stored procedure, which will get me 10 Output Columns. Kindly suggest me the SQL Query String , for executing the Stored Procedure with Current date as the input .

    Hi Srinath,
    The below blog might be useful
    http://scn.sap.com/community/pi-and-soa-middleware/blog/2013/03/06/executing-stored-procedure-from-sender-adapter-in-sap-pi-71
    PI/XI: Sender JDBC adapter for Oracle stored procedures in 5 days
    regards,
    Harish

  • SQL query can be executed through TOAD but not through Discoverer

    Hallo, everybody:
    Got another problem. A SQL query can be executed through TOAD, but when I want to execute it by a worksheet of Discoverer Plus, it always shows there is no data.
    PS: I copied this query from Discoverer Plus to TOAD, which means, this query is generated through the Discoverer. Does anybody know about how could it be?
    Thank you.
    Geng

    Hi,
    If you are able to get data in TOAD with the same user credential as that of Discoverer Plus then it will implies an issue with Discoverer.
    Else it is privilege issue , your TOAD user has select privilege to the base objects (tables/views etc) where as your Disoverer used does not.
    Compare the privileges granted to these 2 users and you can narrow done to the issue .
    Thanks,
    Sutirtha

  • Executing the SQL statement is not allowed - Error

    I am getting "Executing the SQL statement is not allowed" for an INSERT cfquery that I'm running.  I checked the usual suspects:
    - DSN allows INSERT
    - I've seen reports online where certain field names or values are considered key words, so for protection CF blocks the query in this way (it would be nice if there was a different error message when it gets blocked this way vs. the DSN doesn't allow INSERT error message).  The field names and values were all benign strings, so it didn't seem like that.
    I took the same string for the query and ran it on another page and it ran fine (same DSN, too).

    SOLVED: I decided to enter this in here, just to get it into web searches for others since I couldn't find anything.
    - I was calling a function for one of the values in the query:  get_db_status_code("initialize")  Apparently CF parses the query to see if it's allowed BEFORE it runs the CFML in it, so something in that function name, or the parameter "initialize" was a key word that CF doesn't allow.  I moved the function call outside of the query and loaded a temp variable for use in the query and it then worked.

  • SQL Query - The number of columns specified in "SQL Query" does not match t

    I am creating new UDM for tablespace alert, below is my query,however its failing with error
    SQL Query - The number of columns specified in "SQL Query" does not match the value specified in "SQL Query Output"
    I selected Metric type is number
    SQL Query Format : Two columns
    Query:
    SELECT d.tablespace_name,round(((a.bytes - NVL(f.bytes,0))*100/a.maxbytes),2)
    used_pct FROM sys.dba_tablespaces d,(select tablespace_name, sum(bytes) bytes, sum(greatest(maxbytes,bytes)) maxbytes from sys.dba_data_files group by tablespace_name) a,(select tablespace_name, sum(bytes) bytes from sys.dba_free_space group by tablespace_name) f
    WHERE d.tablespace_name = a.tablespace_name(+) AND d.tablespace_name = f.tablespace_name(+)
    AND NOT (d.extent_management = 'LOCAL' AND d.contents = 'TEMPORARY');
    Any clues why i am getting error.

    SQL> SELECT d.tablespace_name,round(((a.bytes - NVL(f.bytes,0))*100/a.maxbytes),2) used_pct
    2 FROM sys.dba_tablespaces d,(select tablespace_name, sum(bytes) bytes, sum(greatest(maxbytes,bytes)) maxbytes from sys.dba_data_files group by tablespace_name) a,(select tablespace_name, sum(bytes) bytes from sys.dba_free_space group by tablespace_name) f
    3 WHERE d.tablespace_name = a.tablespace_name(+) AND d.tablespace_name = f.tablespace_name(+)
    4 AND NOT (d.extent_management = 'LOCAL' AND d.contents = 'TEMPORARY');
    TABLESPACE_NAME USED_PCT
    MGMT_TABLESPACE .82
    SYSAUX 1.52
    UNDOTBS1 .32
    RMAN .02
    CORRUPT_TS 10.63
    USERS 0
    SYSTEM 2.26
    MGMT_ECM_DEPOT_TS .04
    MGMT_AD4J_TS 0

  • Report data  does not reflect the SQL Query?

    Hi,
    I have a report which does not seem to be processing all records returned from the database. When I run the SQL Query produced by crystal manually against the SQL Server all data is returned correctly in crystal not. Does this mean my links are not set up correctly in the Database Expert? or is there another issue, I use a Crystal Syntax selection formulae which is based on a couple of paramters to filter the database records.
    Help is appreciated
    K

    <p>I agree with Rahul on checking the record count on the report vs. the record count from the query.  Conditional suppression and Group selection formula will hide records that are actually being returned.</p><p>It sounds like (from your question) that you are using the database linking expert in CR.  You can also check the SQL that CR is sending by going to Database -> Show SQL Query... compare this with the query you are using for validation, this will give you some clues as to whether your linking structure has an issue. </p>

  • The SQL statement is not valid - when importing data from SQL Server using a query

    Hi there,
    I am trying to import data from SQL to Power Pivot using a SQL query like below:
    SELECT Score.FieldCount, Score.Record.GetAt(0), Score.Record.GetAt(1),  Score.Record.GetAt(2),  Score.Record.GetAt(3),  Score.Record.GetAt(4)
    FROM 
    SELECT * FROM dbo.CLR1(
    dbo.CLR2('c:\FILES\Test.xml'), 
    'SELECT * FROM [dbo].[CXCustomer_Small]') Input
    ) Score
    And when I tried to validate it, it returns
    The SQL statement is not valid. A column name cannot be blank.
    I ran the above SQL statement in Management Studio and it works without problem. Any idea?
    Thanks!
    Chu
    -- Predict everything. http://www.predixionsoftware.com

    Never mind, I figured out - I need to give each column a name.
    -- Predict everything. http://www.predixionsoftware.com

  • How to optimize the select query that is executed in a cursor for loop?

    Hi Friends,
    I have executed the code below and clocked the times for every line of the code using DBMS_PROFILER.
    CREATE OR REPLACE PROCEDURE TEST
    AS
       p_file_id              NUMBER                                   := 151;
       v_shipper_ind          ah_item.shipper_ind%TYPE;
       v_sales_reserve_ind    ah_item.special_sales_reserve_ind%TYPE;
       v_location_indicator   ah_item.exe_location_ind%TYPE;
       CURSOR activity_c
       IS
          SELECT *
            FROM ah_activity_internal
           WHERE status_id = 30
             AND file_id = p_file_id;
    BEGIN
       DBMS_PROFILER.start_profiler ('TEST');
       FOR rec IN activity_c
       LOOP
          SELECT DISTINCT shipper_ind, special_sales_reserve_ind, exe_location_ind
                     INTO v_shipper_ind, v_sales_reserve_ind, v_location_indicator
                     FROM ah_item --464000 rows in this table
                    WHERE item_id_edw IN (
                             SELECT item_id_edw
                               FROM ah_item_xref --700000 rows in this table
                              WHERE item_code_cust = rec.item_code_cust
                                AND facility_num IN (
                                       SELECT facility_code
                                         FROM ah_chain_div_facility --17 rows in this table
                                        WHERE chain_id = ah_internal_data_pkg.get_chain_id (p_file_id)
                                          AND div_id = (SELECT div_id
                                                          FROM ah_div --8 rows in this table
                                                         WHERE division = rec.division)));
       END LOOP;
       DBMS_PROFILER.stop_profiler;
    EXCEPTION
       WHEN NO_DATA_FOUND
       THEN
          NULL;
       WHEN TOO_MANY_ROWS
       THEN
          NULL;
    END TEST;The SELECT query inside the cursor FOR LOOP took 773 seconds.
    I have tried using BULK COLLECT instead of cursor for loop but it did not help.
    When I took out the select query separately and executed with a sample value then it gave the results in a flash of second.
    All the tables have primary key indexes.
    Any ideas what can be done to make this code perform better?
    Thanks,
    Raj.

    As suggested I'd try merging the queries into a single SQL. You could also rewrite your IN clauses as JOINs and see if that helps, e.g.
    SELECT DISTINCT ai.shipper_ind, ai.special_sales_reserve_ind, ai.exe_location_ind
               INTO v_shipper_ind, v_sales_reserve_ind, v_location_indicator
               FROM ah_item ai, ah_item_xref aix, ah_chain_div_facility acdf, ah_div ad
              WHERE ai.item_id_edw = aix.item_id_edw
                AND aix.item_code_cust = rec.item_code_cust
                AND aix.facility_num = acdf.facility_code
                AND acdf.chain_id = ah_internal_data_pkg.get_chain_id (p_file_id)
                AND acdf.div_id = ad.div_id
                AND ad.division = rec.division;ALSO: You are calling ah_internal_data_pkg.get_chain_id (p_file_id) every time. Why not do it outside the loop and just use a variable in the inner query? That will prevent context switching and improve speed.
    Edited by: Dave Hemming on Dec 3, 2008 9:34 AM

  • Read from sql task and send to data flow task - [OLE DB Source [1]] Error: A rowset based on the SQL command was not returned by the OLE DB provider.

    I have created a execut sql task -
    In that, i have a created a 'empidvar' variable of string type and put sqlstatement = 'select distinct empid from emp'
    Resultset=resultname=0 and variablename=empidvar
    I have added data flow task of ole db type and I put this sql statement under sql command - exec emp_sp @empidvar=?
    I am getting an error.
    [OLE DB Source [1]] Error: A rowset based on the SQL command was not returned by the OLE DB provider.
    [SSIS.Pipeline] Error: component "OLE DB Source" (1) failed the pre-execute phase and returned error code 0xC02092B4.

    shouldnt setting be Result
    Set=Full Resultset as your query returns a resultset? also i think variable to be mapped should be of object type.
    Then for data flow task also you need to put it inside a ForEachLoop based on ADO.NET recordset and map your earlier variable inside it so as to iterate for every value the sql task returns.
    Also if using SP in oledb source make sure you read this
    http://consultingblogs.emc.com/jamiethomson/archive/2006/12/20/SSIS_3A00_-Using-stored-procedures-inside-an-OLE-DB-Source-component.aspx
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to find out which Tables have been accessed without looking at the SQL query ?

    Hi,
    I would like to know is there a way to find out what queries have been executed and on which tables without looking at the SQL query.
    I have an old C++ code which calls some library functions to access the Oracle database. The source code for the library is not available to me yet. The functions selects/updates/deletes and inserts based on some input parameters I give. I do not know which tables it affects. How do I find out the actual SQL query and/or the tables it accesses ? I was told about V$SQL table that
    has the most recently executed queries, but
    I did'nt see any queries connected to my process.
    Could anybody help me on this ?
    Thanks
    Jagdeep
    [email protected]
    null

    PRECISE/SQL can help you if you have access to it
    2nd option can be that turn on SQL_TRACE
    Run executable of ur c++ program
    it will create a trace file in user_dump_dest
    and then using TKPROF u can see all quesries and their plan also.
    HTH
    Gagan Deep Singh
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by (jagdeeps):
    Hi,
    I would like to know is there a way to find out what queries have been executed and on which tables without looking at the SQL query.
    I have an old C++ code which calls some library functions to access the Oracle database. The source code for the library is not available to me yet. The functions selects/updates/deletes and inserts based on some input parameters I give. I do not know which tables it affects. How do I find out the actual SQL query and/or the tables it accesses ? I was told about V$SQL table that
    has the most recently executed queries, but
    I did'nt see any queries connected to my process.
    Could anybody help me on this ?
    Thanks
    Jagdeep
    [email protected]<HR></BLOCKQUOTE>
    null

  • How to view the sql query?

    hi,
      how to view the sql query formed from the xml structure in the receiver jdbc?

    You can view SAP Note at
    http://service.sap.com/notes
    But you require SMP login ID for this which you should get from your company. The content of the notes are as follows:
    Reason and Prerequisites
    You are looking for additional parameter settings. There are two possible reasons why a feature is available via the "additional parameters" table in the "advanced mode" section of the configuration, but not as documented parameter in the configuration UI itself:
    Category 1: The parameter has been introduced for a patch or a SP upgrade where no UI upgrade and/or documentation upgrade was possible. In this case, the parameter will be moved to the UI and the documentation as soon as possible. The parameter in the "additional parameters" table will be deprecated after this move, but still be working. The parameter belongs to the supported adapter functionality and can be used in all, also productive, scenarios.
    Category 2. The parameter has been introduced for testing purposes, proof-of-concept scenarios, as workaround or as pre-released functionality. In this case, the parameter may or may not be moved to the UI and documentation, and the functionality may be changed, replaced or removed. For this parameter category there is no guaranteed support and usage in productive scenarios is not supported.
    When you want to use a parameter documented here, please be aware to which category it belongs!
    Solution
    The following list shows all available parameters of category 1 or 2. Please note:
    Parameter names are always case-sensitive! Parameter values may be case-sensitive, this is documented for each parameter.
    Parameter names and values as documented below must be used always without quotaton marks ("), if not explicitly stated otherwise.
    The default value of a parameter is always chosen that it does not change the standard functionality
    JDBC Receiver Adapter Parameters
    1. Parameter name: "logSQLStatement"
                  Parameter type: boolean
                  Parameter value: true for any string value, false only for empty string
                  Parameter value default: false (empty String)
                  Available with: SP9
                  Category: 2
                  Description:
                  When implementing a scenario with the JDBC receiver adapter, it may be helpful to see which SQL statement is generated by the JDBC adapter from the XI message content for error analysis. Before SP9, this can only be found in the trace of the JDBC adapter if trace level DEBUG is activated. With SP9, the generated SQL statement will be shown in the details page (audit protocol) of the message monitor for each message directly.
                  This should be used only during the test phase and not in productive scenarios.
    Regards,
    Prateek

  • How to get cm:search to use the max attribute when creating the SQL query?

    When we use the max attribute in the cm:search tag, it does not seem to honor the max attribute when creating the SQL query. However, the result returned from the tag is limited to the number specified by the max attribute. Then the tag seems to work as intended, but the performance will be sub optimal when the SQL query returns unnecessary rows to the application.
    We use the cm:search tag to list the latest news (ordered by date), and with the current implementation we have to expect a decrease in performance over time as more news is published. But we can’t live with that. We need to do the constraint in the SQL query, not in the application.
    The sortBy attribute of cm:search is translated to “order by” in the SQL query, as expected.
    Is it possible to get cm:search to generate the SQL query with an addition of “where rownum <= maxRows”?

    Hi Erik,
    The behavior of a repository in regards to the search tag's max results parameter is dependent on the underlying repository's implementation. That said, the OOTB repository in WLP does augment the generated SQL to limit the number of rows returned from the database. This is done in the parsing logic. This behavior may differ with other repository implementations.
    -Ryan

  • Problem in WAD (The requested query / does not exist on the current server)

    Dear Guru's
    When i execute a Web Application in WAD in the selection screen suppose if i give Key product  as 86000 then check and execute i get correct data. Then if i come to  backpage (Selection screen again using backspace) and change Key product  as 86022  then check and execute then i get following error
    The requested query / does not exist on the current server
    System error in program CL_RSR_OLAP_VAR and form BAD STATE (see long text)
    Can any one please provide me some good solution...
    We are using BI 7.0 sp 16, But i am executing this Wed Application in 3.1WAD.
    Thanks and Regards,
    kalyan

    Dear Jai,
    Issue is in WAD selection screen for first product valuse every thing if fine, when i go back and change product value and then CHECK and EXECUTE the following error comes.
    The requested query / does not exist on the current server
    System error in program CL_RSR_OLAP_VAR and form BAD STATE (see long text)
    Any one have any idea plssssssssssssssssssssssssssssssssssss..........
    dude's some soln.....
    Thanks and Regards,
    Dev
    Edited by: Srinivas dev on Jul 4, 2008 2:45 PM

  • Error - The requested query does not exist on the current server

    Hi all,
    We've started to get an error when exeucting queries on our BW system.  The erorr is "The requested query does not exist on the current server".  Even though I can go in an change the query on the server, I get this message when I try to execute it.  I also get the same message when I try to run the query in RSRT.
    Has anyone else run into this problem?
    Thanks!
    ~Matt

    The problem that we had was due to a pre-query not transported up.  We transported up the missing pre-query and everything worked fine.  If you go into change mode on the query and press the check button.  It should tell you which query is missing.

  • Give me the sql query which calculte the table size in oracle 10g ecc 6.0

    Hi expert,
    Please  give me the sql query which calculte the table size in oracle 10g ecc 6.0.
    Regards

    Orkun Gedik wrote:
    select segment_name, sum(bytes)/(1024*1024) from dba_segments where segment_name = '<TABLE_NAME>' group by segment_name;
    Hi,
    This delivers possibly wrong data in MCOD installations.
    Depending on Oracle Version and Patchlevel dba_segments does not always have the correct data,
    at any time esp. for indexes right after being rebuild parallel (Even in DB02 because it is using USER_SEGMENTS).
    Takes a day to get the data back in line (never found out, who did the correction at night, could be RSCOLL00 ?).
    Use above statement with "OWNER = " in WHERE for MCOD or connect as schema owner and use USER_SEGMENTS.
    Use with
    segment_name LIKE '<TABLE_NAME>%'
    if you like to see the related indexes as well.
    For partitioned objects, a join from dba_tables / dba_indexes to dba_tab_partitions/dba_ind_partitions to dba_segments
    might be needed, esp. for hash partitioned tables, depending on how they have been created ( partition names SYS_xxxx).
    Volker

Maybe you are looking for

  • How do I remove display of attendance quota in Multi-Day view in TMW?

    Hi, I have just created an attendance quota and am seeing it every day in the multi.day view of Time Manager's Workplace. I would like to remove it from being displayed in that part of TMW. Can anyone help me? Thanks in advance Kim ;-)

  • Disk too slow error when using M-Audio Oxygen 49 keyboard

    I bought the M-Audio Oxygen 49 keyboard. And when I plug it into my MacBook Pro to do some playing, the project will record for maybe a minute but then I get a 'disk too slow' error and the recording stops. This happens every single time, no matter i

  • How to get information about enhancements

    HI, I am new to ABAP. Is there  any easy way to see the enhancements/exits. Moderator message : Read forum rules before posting. This is an FAQ and discussed many times in forums, search for avaialble information. Thread locked. Edited by: Vinod Kuma

  • Downloaded Itunes, will not open!

    I ha downloaded Itunes twice .  It will not open!

  • Insert data into mySQL with BPEL

    I want to do an insert/update on a table in mySQL. In step 4 of the adapter configuration wizard I select "Perform operation on table" and choose insert/update when I click on next I can see all the tables in the mySQL database but if I choose the ta