Display the sql statement with arguments with ojdbc14_g.jar

Hi,
I'd like to display the sql statements with ojdbc14_g.jar.
So I've followed the documentation and set an OracleLog.properties file which is linked to my java program.
The problem is the trace generated is huge and I only need the SQL requests wich are made with the arguments but I don't know how to configure that.
Have you got a sample file which handle that ?
I've tried that :
oracle.jdbc.handlers=java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level=CONFIG
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
oracle.level=INFO
oracle.jdbc.driver.level=OFF
oracle.jdbc.driver.OraclePreparedStatement.level=OFF
oracle.jdbc.pool.level=OFF
oracle.jdbc.util.level=OFF
oracle.sql.level=INFO
But that doesn't display only the SQL and args :(
Regards.

The fact is the statement are made by ejb entities on JBoss so I don't have a way to make specific logger to display the sql order. The only thing I can do is to set the log4j org.jboss.ejb.plugins.cmp to a trace level in order to see the sql order but without the arguments.
I tried those traces however I see stuff like that without any SQL orders :
<<
10:10:53,833 INFO [STDOUT] NFO: PhysicalConnection.getRestrictGetTables() returned false
29 nov. 2007 10:10:52 oracle.jdbc.driver.PhysicalConnection getRemarksReporting
INFO: PhysicalConnection.getRemarksReporting()
29 nov. 2007 10:10:52 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
INFO: PhysicalConnection.getRestrictGetTables() returned false
29 nov. 2007 10:10:52 oracle.jdbc.driver.PhysicalConnection getDefaultFixedString
INFO: PhysicalConnection.getDefaultFixedString() returning false
29 nov. 2007 10:10:52 oracle.jdbc.driver.OraclePreparedStatement setString
INFO: OraclePreparedStatement.setString(paramIndex=1, x=%)
29 nov. 2007 10:10:52 oracle.jdbc.driver.OraclePreparedStatement setString
INFO: OraclePreparedStatement.setString(paramIndex=2, x=VIEW_ACTION_NAMES)
29 nov. 2007 10:10:52 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
INFO: PhysicalConnection.getRestrictGetTables() returned false
29 nov. 2007 10:10:52 oracle.jdbc.driver.T4CPreparedStatement allocateTmpByteArray
GRAVE: oracle.jdbc.driver.T4CPreparedStatement.allocateTmpByteArray : Re-allocate byte array of size : 4000
29 nov. 2007 10:10:52 oracle.jdbc.driver.OracleResultSetImpl close
INFO: OracleResultSetImpl.close()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getMetaData
INFO: PhysicalConnection.getMetaData()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getCatalog
INFO: PhysicalConnection.getCatalog()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRemarksReporting
INFO: PhysicalConnection.getRemarksReporting()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
INFO: PhysicalConnection.getRestrictGetTables() returned false
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRemarksReporting
INFO: PhysicalConnection.getRemarksReporting()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
INFO: PhysicalConnection.getRestrictGetTables() returned false
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getDefaultFixedString
INFO: PhysicalConnection.getDefaultFixedString() returning false
29 nov. 2007 10:10:53 oracle.jdbc.driver.OraclePreparedStatement setString
INFO: OraclePreparedStatement.setString(paramIndex=1, x=%)
29 nov. 2007 10:10:53 oracle.jdbc.driver.OraclePreparedStatement setString
INFO: OraclePreparedStatement.setString(paramIndex=2, x=PROCESS_TYPE_HIERARCHY)
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
INFO: PhysicalConnection.getRestrictGetTables() returned false
29 nov. 2007 10:10:53 oracle.jdbc.driver.T4CPreparedStatement allocateTmpByteArray
GRAVE: oracle.jdbc.driver.T4CPreparedStatement.allocateTmpByteArray : Re-allocate byte array of size : 4000
29 nov. 2007 10:10:53 oracle.jdbc.driver.OracleResultSetImpl close
INFO: OracleResultSetImpl.close()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getMetaData
INFO: PhysicalConnection.getMetaData()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getMetaData
INFO: PhysicalConnection.getMetaData()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getCatalog
INFO: PhysicalConnection.getCatalog()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRemarksReporting
INFO: PhysicalConnection.getRemarksReporting()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
INFO: PhysicalConnection.getRestrictGetTables() returned false
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRemarksReporting
INFO: PhysicalConnection.getRemarksReporting()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
INFO: PhysicalConnection.getRestrictGetTables() returned false
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getDefaultFixedString
INFO: PhysicalConnection.getDefaultFixedString() returning false
29 nov. 2007 10:10:53 oracle.jdbc.driver.OraclePreparedStatement setString
INFO: OraclePreparedStatement.setString(paramIndex=1, x=%)
29 nov. 2007 10:10:53 oracle.jdbc.driver.OraclePreparedStatement setString
INFO: OraclePreparedStatement.setString(paramIndex=2, x=PROCESS_TYPE_HIERARCHY)
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
INFO: PhysicalConnection.getRestrictGetTables() returned false
29 nov. 2007 10:10:53 oracle.jdbc.driver.T4CPreparedStatement allocateTmpByteArray
GRAVE: oracle.jdbc.driver.T4CPreparedStatement.allocateTmpByteArray : Re-allocate byte array of size : 4000
29 nov. 2007 10:10:53 oracle.jdbc.driver.OracleResultSetImpl close
INFO: OracleResultSetImpl.close()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getMetaData
INFO: PhysicalConnection.getMetaData()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getCatalog
INFO: PhysicalConnection.getCatalog()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRemarksReporting
INFO: PhysicalConnection.getRemarksReporting()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
INFO: PhysicalConnection.getRestrictGetTables() returned false
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRemarksReporting
INFO: PhysicalConnection.getRemarksReporting()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
INFO: PhysicalConnection.getRestrictGetTables() returned false
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getDefaultFixedString
INFO: PhysicalConnection.getDefaultFixedString() returning false
29 nov. 2007 10:10:53 oracle.jdbc.driver.OraclePreparedStatement setString
INFO: OraclePreparedStatement.setString(paramIndex=1, x=%)
29 nov. 2007 10:10:53 oracle.jdbc.driver.OraclePreparedStatement setString
INFO: OraclePreparedStatement.setString(paramIndex=2, x=FORM_EMBEDDED_VIEWS)
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
INFO: PhysicalConnection.getRestrictGetTables() returned false
29 nov. 2007 10:10:53 oracle.jdbc.driver.T4CPreparedStatement allocateTmpByteArray
GRAVE: oracle.jdbc.driver.T4CPreparedStatement.allocateTmpByteArray : Re-allocate byte array of size : 4000
29 nov. 2007 10:10:53 oracle.jdbc.driver.OracleResultSetImpl close
INFO: OracleResultSetImpl.close()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getMetaData
INFO: PhysicalConnection.getMetaData()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getMetaData
INFO: PhysicalConnection.getMetaData()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getCatalog
INFO: PhysicalConnection.getCatalog()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRemarksReporting
INFO: PhysicalConnection.getRemarksReporting()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
INFO: PhysicalConnection.getRestrictGetTables() returned false
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRemarksReporting
INFO: PhysicalConnection.getRemarksReporting()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
INFO: PhysicalConnection.getRestrictGetTables() returned false
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getDefaultFixedString
INFO: PhysicalConnection.getDefaultFixedString() returning false
29 nov. 2007 10:10:53 oracle.jdbc.driver.OraclePreparedStatement setString
INFO: OraclePreparedStatement.setString(paramIndex=1, x=%)
29 nov. 2007 10:10:53 oracle.jdbc.driver.OraclePreparedStatement setString
INFO: OraclePreparedStatement.setString(paramIndex=2, x=FORM_EMBEDDED_VIEWS)
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
INFO: PhysicalConnection.getRestrictGetTables() returned false
29 nov. 2007 10:10:53 oracle.jdbc.driver.T4CPreparedStatement allocateTmpByteArray
GRAVE: oracle.jdbc.driver.T4CPreparedStatement.allocateTmpByteArray : Re-allocate byte array of size : 4000
29 nov. 2007 10:10:53 oracle.jdbc.driver.OracleResultSetImpl close
INFO: OracleResultSetImpl.close()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getMetaData
INFO: PhysicalConnection.getMetaData()
29 nov. 20>>

Similar Messages

  • How to Run SQL Tuning Advisor on the SQL statement with SQL_ID?

    Can you give the steps to run the SQL tuning advisor on the SQL statement with SQL_ID?
    Database version: 10g Release 2

    Hi,
    You can use either the automatic SQL tuning features that are accessible from Enterprise Manager Database Console on the "Advisor Central" page or trough SQL*PLUS using the DBMS_SQLTUNE pakage:
    -- creating the tuning task
    set serveroutput on
    declare
      l_sql_tune_task_id  varchar2(100);
    begin
      l_sql_tune_task_id := dbms_sqltune.create_tuning_task (
                              sql_id      => '<your_sql_id>',
                              scope       => dbms_sqltune.scope_comprehensive,
                              time_limit  => 60,
                              task_name   => '<your_tuning_task_name>',
                              description => 'tuning task for statement your_sql_id.');
      dbms_output.put_line('l_sql_tune_task_id: ' || l_sql_tune_task_id);
    end;
    -- executing the tuning task
    exec dbms_sqltune.execute_tuning_task(task_name => '<your_tuning_task_name>');
    -- displaying the recommendations
    set long 100000;
    set longchunksize 1000
    set pagesize 10000
    set linesize 100
    select dbms_sqltune.report_tuning_task('<your_tuning_task_name>') as recommendations from dual;For more information, take a look at link provided by Jaffy.
    Cheers
    Legatti

  • I am traveling from the united states to ireland with an IPAD2 what type of adapter do i need?

    i am traveling from the united states to ireland with an IPAD2  what type of adapter do i need?

    All you need is a plug adapter. The charger that came with the iPad works world-wide.

  • Sql statement not working with for update

    Hi, iam facing an error fetch out of sequence
    when iam trying to execute a sql statement
    Statement st=con.createStatement();
    st.executeQuery(select mycolumn from table where jobno=1 for update);
    the statement works well without " for update ".
    any solutions????

    Hi,
    The fetch out of sequence error occurs usually when you are trying to read from a cursor that has no data left(like EOF).
    After executing the sql statement move the pointer to the first row (or the beginning of the resultset)
    This is actually an oracle error bearing number :ORA:01002
    Hope this helps.
    Thanks,
    Creator Team.

  • BIDS 2008 DataFlow viewer not showing even though the sql statement returns data

    Have a dataflow and trying to see why no rows are being written to the destination.  I popped a viewer on the connection, but it doesnt show up when I run.  What can I check?
    The DataFlow source runs a sql statement and it runs fine and returns a result.

    Why would that be if I can execute the sql statement that is being used in the OLEDB Source, and I get a result, yet the destination gets no rows afterwards.  Even executing the Dataflow task by itself, no rows are written.
    I do have a script task that modifies the connection before the dataflow, but this was working fine yesterday :)
    Even so, if there was a problem with the connection, I would get an error.  There no no errors, it just sees no rows and the dataviewer is never displayed.
    What the heck can I check?

  • How to use presentaion variable in the SQL statement

    Is there any special syntax to use a presentation variable in the SQL Statement?
    I am setting a presentation variable (Fscl_Qtr_Var)in the dashboard prompt.
    If i set the filter as ADD->VARIABLE->PRESENTATION, it shows the statement as 'Contract Request Fiscal Quarter is equal to / is in @{Fscl_Qtr_Var} '.
    And this works fine but when i convert this to SQL, it returns
    "Contract Request Date"."Contract Request Fiscal Quarter" = 'Fscl_Qtr_Var'
    And this does not work.It is not being set to the value in the prompt.
    I need to combine this condition with other conditions in the SQL Statement. Any help is appreciated. Thanks

    Try this: '@{Fscl_Qtr_Var}'

  • DIsabling printing of the sql statement in command prompt

    Hi.
    I am connecting to an access database with my java application. Problem is, it prints the connection and the sql statement there. Is there any way to disable it?
    Example of what is seen at my command prompt:
    connection is dbc:odbc:Inventory System
    DB: SELECT * FROM Products WHERE ProductID = 1;

    Ah i see where my mistake is now...Gracefully put. Many of the regulars here and in other forums get a little frustrated, either seeing the same basic problems over and over (it's as if Google doesn't work in vast parts of the world) or or the occaisional person who really isn't willing to work or willing to learn - they want "the answer". Sometimes after a bad run of that we get a little sensitive and snarky. Don't feel bad, there's a mountain to learn with JDBC and, personally, I think everyone is entitled to one brain f*rt a week (<snark> although this may count as one-and-a-half </snark>). Good luck.

  • Setting the sql statement

    http://www.egbolig.dk/drift_bo_syd.rpt (HERE IS THE REPORT)
    We are using SAP Crystal Report .NET Runtime files (http://scn.sap.com/docs/DOC-7824 newest version 13.0.9.1312) in our web asp.net application. Everything have been working fine, but we have can into problems when showing the certain kinda reports.
    In our code get the reports sql statement using getSQLStatement.
    Dim gp As New GroupPath() Dim sql As String = report.ReportClientDocument.RowsetController.GetSQLStatement(gp)
    This will get the sql, and we use this sql (getSqlStatement) and attach a sql WHERE clause from the code to only get a certain number of records.
    The report Drift_bo_syd.rpt has 5 tables, and the following sql statement. 
    Database/Show Sql Statement
    SELECT "rekvstam"."Sel", "rekvstam"."Afd", "rekvstam"."Levadresse", "rekvstam"."Rekvisition", "rekvstam"."Lejemaal", "rekvstam"."Lejer", "rekvstam"."Udfoertaf", "rekvstam"."Udfoertdato", "rekvstam"."Krit", "Selskab"."Adresse", "Selskab"."Postby", "Selskab"."Tlf", "Selskab"."Fax", "rekvstam"."Kontor", "rekvstam"."Hjemme", "rekvstam"."Rekvdato", "rekvstam"."Aftale", "rekvstam"."InitialRet", "rekvstam"."Arbejde", "kreditor"."Att", "rekvstam"."Konto", "Selskab"."Navn", "Selskab"."Email", "Interessentadresse"."Navn", "Interessentadresse"."Adresse", "Interessentadresse"."Postby", "Interessentadresse"."Email1", "Interessentadresse"."Telefon_Fax", "Interessentadresse"."Type", "Interessentadresse"."Tlf1", "rekvstam"."tlfLejer", "kreditor"."Kred", "Interessentadresse"."Interessentnr" FROM  (("Rekvstam" "rekvstam" INNER JOIN "Selskab" "Selskab" ON "rekvstam"."Sel"="Selskab"."Sel") LEFT OUTER JOIN "Kreditor" "kreditor" ON "rekvstam"."Kred"="kreditor"."Kred") INNER JOIN "Interessentadresse" "Interessentadresse" ON "kreditor"."Interessentnr"="Interessentadresse"."Interessentnr" WHERE  "Interessentadresse"."Type"='K' 
    But if we run the report from our asp.net code, we get the following error: 
    Cannot determine the queries necessary to get data for this report. Failed to retrieve data from the database. Error in File Drift_Bo_Syd {97FED382-1BAC-4DB1-970F-9E098ECE28F1}.rpt: Failed to retrieve data from the database.
    After a long time searching for a solution, we found out that if we place the column kred from the kreditor table on the report, the report will work. (field explorer / database fields / kreditor (table) / kred (column)
    Very important is that the field "kreditor.kred" is a primary key of the table kreditor, and also used in the linking.!
    (We can get the report to work if we call the sql statement with the "kreditor"."kred" in the SELECT statement.
    SELECT "kreditor"."kred", "rekvstam"."Sel", "rekvstam"."Afd", "rekvstam"."Levadresse", "rekvstam"."Rekvisition", "rekvstam"."Lejemaal", "rekvstam"."Lejer", "rekvstam"."Udfoertaf", "rekvstam"."Udfoertdato", "rekvstam"."Krit", "Selskab"."Adresse", "Selskab"."Postby", "Selskab"."Tlf", "Selskab"."Fax", "rekvstam"."Kontor", "rekvstam"."Hjemme", "rekvstam"."Rekvdato", "rekvstam"."Aftale", "rekvstam"."InitialRet", "rekvstam"."Arbejde", "kreditor"."Att", "rekvstam"."Konto", "Selskab"."Navn", "Selskab"."Email", "Interessentadresse"."Navn", "Interessentadresse"."Adresse", "Interessentadresse"."Postby", "Interessentadresse"."Email1", "Interessentadresse"."Telefon_Fax", "Interessentadresse"."Type", "Interessentadresse"."Tlf1", "rekvstam"."tlfLejer", "kreditor"."Kred", "Interessentadresse"."Interessentnr" FROM  (("Rekvstam" "rekvstam" INNER JOIN "Selskab" "Selskab" ON "rekvstam"."Sel"="Selskab"."Sel") LEFT OUTER JOIN "Kreditor" "kreditor" ON "rekvstam"."Kred"="kreditor"."Kred") INNER JOIN "Interessentadresse" "Interessentadresse" ON "kreditor"."Interessentnr"="Interessentadresse"."Interessentnr" WHERE  "Interessentadresse"."Type"='K'
    But it should not be necessary to include this field (which is the primary key and used in linking the report) in the sql statement,
    BECAUSE it is not used in the report. So maybe this is a bug?
    It has not been necessary in RDC Crystal Report or RAS Crystal Report in a classic asp envoriment.
    Here is the code we use to set the reports SQL Statement)
    Try
    Dim conn As New SqlConnection(connString)
    conn.Open()
    Dim sd As New SqlDataAdapter(New SqlCommand(nySQL, conn))
    Dim ds As New Data.DataSet()
    Dim navn As String = report.Database.Tables.Item(0).Name
    sd.Fill(ds, navn)
    report.SetDataSource(ds)
    conn.Close()
    Catch ex As Exception
    Throw
    End Try

    Hi Jan
    I understand your problem completely but we have asked  R&D to be able to edit the SQL and they explained due to how the report Engine works it's simply not possible anymore. It would take a complete rewrite in all of our DB drivers and query dll's to be able to allow it. They did that in CR 9 when they rewrote the DB drivers and removed the SQL part of the code into separate dll's and that is when the ability was removed, it's been that way ever since.
    One possibility is to get the SQL from the Report and then connect to your DB using a .NET and if the results from the SQL is less than 5K rows and not too many columns you could then set the Report data source to a Dataset.
    As long as all of the field names are the same CR will run the report using this work flow.
    For data larger than 5K rows, limit is due to memory resources, you could save the DS to an XML file and then set the reports data source to the XML file. We've seen 100meg XML's used so the amount of data should not be a problem, but of course there are limits to everything so test...
    This should not affect performance much.
    So the work flow would be:
    Load the report
    Get the SQL Statement
    Paste it into a Dataset Query
    Something like this should get you started:
    //string connString = "Provider=SQLOLEDB;Data Source=MySQLServer;Database=xtreme;User ID=sa;Password=pw";
    string connString = "Provider=SQLNCLI10;Server=MySQLServer;Database=xtreme;User ID=sa;Password=pw";
    Detail"".""Quantity"" FROM   ""xtreme"".""dbo"".""Orders Detail"" ""Orders Detail""";
    string sqlString = @"SELECT top 10*  FROM  ""xtreme"".""dbo"".""Financials"" ""Financials""";
    System.Data.OleDb.OleDbConnection oleConn = new System.Data.OleDb.OleDbConnection(connString);
    System.Data.OleDb.OleDbCommand cmd = oleConn.CreateCommand();
    cmd.CommandText = sqlString;
    System.Data.DataSet ds = new System.Data.DataSet();
    OleDbDataAdapter oleAdapter = new OleDbDataAdapter(sqlString, oleConn);
    //OleDbDataAdapter oleAdapter2 = new OleDbDataAdapter(sqlString2, oleConn);
    DataTable dt1 = new DataTable("Financials");
    //DataTable dt2 = new DataTable("Orders Detail");
    oleAdapter.Fill(dt1);
    //oleAdapter2.Fill(dt2);
    ds.Tables.Add(dt1);
    //ds.Tables.Add(dt2);
    ds.WriteXml("c:\\reports\\sc2.xml", XmlWriteMode.WriteSchema);
    // as long as the field names match exactly Cr has no problems setting report to a DS.
    try
        rpt.SetDataSource(ds.Tables[0]); // incremtent [0] for more than 1 table.
        rpt.SetDataSource(ds);
    catch (Exception ex)
        MessageBox.Show("ERROR: Schema Mismatch. Error reported by CR: " + ex.Message);
    //Now check for subreport and set to same DS
    foreach (CrystalDecisions.CrystalReports.Engine.Section section in rpt.ReportDefinition.Sections)
        foreach (CrystalDecisions.CrystalReports.Engine.ReportObject reportObject in section.ReportObjects)
            if (reportObject.Kind == ReportObjectKind.SubreportObject)
                CrystalDecisions.CrystalReports.Engine.SubreportObject subReport = (CrystalDecisions.CrystalReports.Engine.SubreportObject)reportObject;
                CrystalDecisions.CrystalReports.Engine.ReportDocument subDocument = subReport.OpenSubreport(subReport.SubreportName);
                subDocument.SetDataSource(ds);
    And for XML it would use this part, not above I am saving the data and structure in the XML file so it should match what is in the report:
    foreach (CrystalDecisions.CrystalReports.Engine.Table rptTable in rpt.Database.Tables)
        try
            rptTable.Location = btrDataFile.ToString(); // @"D:\Atest\" + rptTable.Location + ".xml";
        catch (Exception ex)
            MessageBox.Show("ERROR: " + ex.Message);
    Only issue you may run into is sometimes XML does not have a direct field type and your original data source but you'll get an error if that happens which could be trapped and handled.
    If you have a report that only uses 2 tables I do have code that will convert it to use a Command Object. That is the limit the engine is capable of, there is a lot of logic to be able to do this in CRD and the SDK so that is all we could get for now.
    I hope that helps
    Don

  • How do you display the SQL that BEx uses?

    All,
    I would like to display the SQL that is submitted to BEx.  I understand you can perform a SQL Trace (ST05), but I want to see the SQL before is submitted to BEx.  Can anyone help me.
    Thanks.

    As Allison mentions - use RSRT, choosing Execute + Debug.
    From there you will see an option, Display SQL Query, which may be what you want, it displays the SAP's Open SQL, but what you might relate better to is the Display  Run Schedule, which will show the SQl as translated to the target DB environment and the Explain (execution) Plan.
    Just as an FYI, ST04 is also useful for seeing the SQL and execution plans of a query that has already run. Check it out if you are not familiar with it.

  • Sqlplus - hiding the SQL statement

    When I run sqlplus to spool a report, it always prints out the original SQL statement in the report, but I only want the results. For example, the following script:
    SET PAGESIZE 0
    SET FEEDBACK OFF
    SPOOL report.log
    SELECT * FROM employees;
    SPOOL OFF
    prints out not only the results, but also the SQL statement "SELECT * FROM employees;" in the report. How do I hide the SQL statement from the report?
    Thanks.

    the set echo off will work if you run your select-script from a batch-file.
    (the batch-file call an other file with the select statement)
    ~
    pascal

  • How could I find the SQL statement who get this message ?

    ORA-01555 caused by SQL statement below (Query Duration=11191 sec, SCN: 0x0854.723b9c32)
    ... How could I find the SQL statement who got this message ?
    Thanks, Paul

    ORA-01555 means that the UNDO/ROLLBACK space is not large enough.
    This occurs because the SELECT statement is attempting to read the UNDO, but the UNDO has been released (transactions have committed or rolled back) and reused.
    The following are SOME of the reasons I have seen this to occur:
    1) Updates in a loop, with commits happening in the same loop
    - this will mark the UNDO available quickly and quickly reuse it. Then when the SELECT wants to rebuild a block, the UNDO used to rebuild the block has been reused (solution, make the UNDO bigger)
    2) A SELECT cursor used to control a loop in which updates are performed, and a 'done' flag is marked against the current cursor record, and commits are performed at the end of each loop, prior to fetching the next record
    - same problem as above, but it hits the current process. Same solution
    3) A 'month end' activity spike occurs, and all sorts of transactions create updates. There is a report that reports the activity - amusingly it needs to start at the beginning of all the work and updates periodically by doing a huge SELECT up front. This is then used to drive a loop which attempts to get information from the various transactions that have been updated and committed. After a while, the SELECT gets an ORA-01555
    - same problem as above and same solution. Get a bigger UNDO segment.
    You say this only happens once a month. That should give a hint.
    I wouldn't bother with which SELECT statement, as much as which APPLICATIONs are being run when it happens.
    One way around this - use 10g and set the guaranteed retention period. All sorts of other things will break, by no more 1555. <g>

  • How to monitor the sql statement running?

    Hi ,
    i need to check the status of the sql script running on the database.
    what is the way to chect that?
    if the particular query is taking very long time what might be the reason?

    Since you are [relatively] new at this ..
    the recommended technique will change based on version of Oracle database, the edition of the database, the options of the database and the operating system.
    For example, I would normally suggest a newbie with Oracle Database 10g or 11g Enterprise Edition to use the Enterprise Manager Diagnostics Pack. A demo thereof is on the Oracle BY Example site (http://otn.oracle.com) - look for Tutorials towards the top.
    As for why ... it's waiting on things. Which things may depend on the database, the operating system, the disk subsystem, the network subsystem, memory allocation, sorting, other load, and even how well or badly the SQL statement was written.

  • Get an set the SQL statement from a report at runtime

    i know there is an opportunity to filter the records by using setRecordSelectionFormula() method...but i wondered if you can anyhow get the whole SQL statement that is in the report. i think it would be very useful for many developers to maipulate the SQL directly like you were able to using the PE-functions in the old CRPE32.DLL...
    but in CR XI the CRPE32.DLL is no longer supported. now we have to substitute these functions with the JRC but i am not sure if it provides everything we had in the CRPE32.DLL...
    after all i do not understand why the CRPE32.DLL is still delivered but not supported. in my CR XI R2 installtion i found this file signed with version 11.5.3.438
    by the way it is a question of performance...a query would be faster if you could directly query the database by changing the reports sql statement instead of allowing the report to retrieve all data and then performing the filtering.
    so please, for the next version of the JRC give us the opportunity to get an set the sql statement of a report directly!

    Not an option. crpe32 is proprietory and the SQL we generate is to complex to assume it will be done correctly. Which is why the ability was removed

  • The SQL statement "SELECT * FROM "SDBAH"" contains the semantics error[s]:

    Hello all together,
    actually I try to implement an user interface for using BRTools from a J2EE Application.
    I created a datasource-alias "BRTOOLS" using netweaver administrator.
    inside the implementation i execute the following code:
    DataSource ds = (DataSource) ctx.lookup("jdbc/BRTOOLS");
    Connection con = ds.getConnection();
    String query = "select * from SDBAH;";
    Statement stmt = con.createStatement();
    try {
       ResultSet rs = stmt.executeQuery(query);
    As the result I get the following message:
    The SQL statement "SELECT * FROM "SDBAH"" contains the semantics error[s]: - 1:15 - the table or view >>SDBAH<< does not exist.
    Using SQLplus or dbconsole I can see and use the table SDBAH. The table scheme is "SAPSR3DB"which is the standard scheme for J2EE.
    If I try:
    select * from SAPSR3DB.SDBAH;
    I get the same result.
    What is wrong in my constellation?
    Thank you very much in advance.
    Greetings Stephan

    Dear Yordan,
    yes I did a restart of the whole system.
    If I do a wrong lookup:
    e.g:
    DataSource ds = (DataSource) ctx.lookup("jdbc/BRToolsFailure");
    where Alias  "BRToolsFailure" does not exist, I get
    Object not found in lookup of BRToolsFailure.
    So I think that the Alias of the default data source is right and visible.
    Next try:
    I use an already existing alias "ADS" in my code and get the same message:
    The SQL statement "SELECT * FROM "SDBAH"" contains the semantics error[s]: - 1:15 - the table or view >>SDBAH<< does not exist.
    If I extend the tablename with the scheme-name "SAPSR3DB" I get the following:
    The SQL statement "SELECT * FROM "SAPSR3DB"."SDBAH"" contains the semantics error[s]: - 1:24 - the table or view >>SDBAH<< does not exist
    When I use SQLPLUS SAPSR3DB/password and call:
    select * from SDBAH;
    I get a result like expected.
    Thanks a lot,
    Stephan

  • Execute the sql statement stored in table

    friends i m in complication that, how can i execute sql statement which is stored in database table.
    how can i fetch that particular statement from table and make it execute!!!
    Thanks in advance

    I think we should stop at this point and have a little think.
    My understanding is that your plan is to do the following
    -Execute a Dynamic SQL statement which is constructed from values in several columns in a table (Bad idea to begin with)
    -The result of the execution is then loaded into PL/SQL.....not sure how you are handling different column lists but I'll assume you are not having to convert every column value to a VARCHAR2
    -The values returned are then used in an INSERT statement
    So basically your goal here is to take some data from one table and insert it into another table by moving data from SQL to PL/SQL then back to SQL in an elaborate, dynamic way. This is a costly waste of resources and will not scale (this is before we get to the problem of having to read the SQL statement from a table in the first place)
    I would recommend looking the INSERT SELECT statement here: http://psoug.org/reference/insert.html
    This will get the job done in one go. If you really do need it to be dynamic (which you don't, trust me) then you can still store this statement in your "dynamic SQL" table and execute it using EXECUTE IMMEDIATE although I can say for sure that you're going to run into more problems down the line with this architecture, it won't scale very well, and you'll probably waste at least *1* day of your time every week trying to fix a bug caused by the removal of a table, change to a column name etc.......
    However if you believe that storing SQL in a table is the best solution to your problem then go ahead.....at least when you find out that it isn't you'll have learned a valuable lesson.

Maybe you are looking for

  • Need Help With Custom Calculation Script

    Hey everyone.  I'm using Acrobat Pro X and stumbling a bit on the syntax for the following equation.  I need to add the value of "Cell1" & "Cell2" then add the value of "Cell3".  However,the value of "Cell3" is entered by the user and specifies a per

  • ?'s Regarding ProDesignTools article "How to Move or Upgrade Adobe CS6 from One Computer to Another"

    I have read this article: http://prodesigntools.com/move-adobe-cs5-between-computers-or-windows-to-mac.html and have the following questions: I have an older Windows laptop and would like to purchase a box version of CS6. If my Windows laptop crashes

  • Selecting objects in multisim

    I was going along happliy creating a schematic but then after a couple of copy and pastes suddenly many of the components were being selected in a very strange way.  Instead of the usual blue box around the componment I just clicked on, I get a very

  • Retrieveing data using RH_READ_INFTY_1001 in ECC 6.0

    Hi Guys,    I am working on ECC 6.0. I need to fetch data from table HRP1001. Hence am using the FM RH_READ_INFTY_1001. This FM retrieves all the records but populates the fields SCLAS & SOBID with garbage values. These are the main relation fields i

  • Payment Card Status (PaCa) status Not Approved for authorized card in VKM3

    Hi, We are noticing that SAP is displaying payment card status as 'B' (Not Approved) in VKM3 even though the order has been successfully authorized with the credit card. Does anyone has any idea why and when SAP does that? Any help would be highly ap