How to examine the generated SQL statement in Receiver JDBC Adapter

I have been searching this forum how to display te generated sql statement (by the jdbc receiver adapter).
The only suggestion is to use RWB, but I was unable to find any details about how to do so.
Any help is appreciated

Hi,
To add, u can see the SQL Statements in Audit log of RWB.
Select Message Monitoring-> Adapter Engine. choose ur entry and click on Details option button, u can see the SQL Statements in Audit Log.
Regards,
Sudharshan
Message was edited by:
        Sudharshan Aravamudan

Similar Messages

  • How to tune the following sql statements which has two unions in oracle 10g

    It takes a long time to run the following sql statement in 10g. Each select brings back about 4 million rows and there will be about 12 million rows. When I run each select statements seprately in sqlplus I can see the data immedaitely but when I run it as whole with two unions in the select it just takes very very long time? I want to know how to make this run faster? Can we add hints? or is it because of any table space? Any help is appreciated.
    select
    D.EMPLID
    ,D.COMPANY
    ,'CY'
    ,D.CALENDAR_YEAR
    ,D.QTRCD
    ,D.ERNCD
    ,D.MONTHCD
    ,D.MONTHCD
    ,D.GRS_MTD
    ,D.GRS_QTD
    ,D.GRS_YTD
    ,D.HRS_MTD
    ,D.HRS_QTD
    ,D.HRS_YTD
    from PS_EARNINGS_BAL D
    where D.SPCL_BALANCE = 'N'
    union
    select
    D.EMPLID
    ,D.COMPANY
    ,'FY'
    ,(case when D.MONTHCD > '06' then D.CALENDAR_YEAR + 1 else D.CALENDAR_YEAR end)
    ,ltrim(to_char(to_number(D.QTRCD) + decode(sign(3-to_number(D.QTRCD)),1,2,-2),'9'))
    ,D.ERNCD
    ,ltrim(to_char(to_number(D.MONTHCD) + decode(sign(7-to_number(D.MONTHCD)),1,6,-6),'09'))
    ,D.MONTHCD
    ,D.GRS_MTD
    ,D.GRS_QTD
    ,(select sum(F.GRS_MTD) from PS_EARNINGS_BAL F where
    F.EMPLID = D.EMPLID and
    F.COMPANY = D.COMPANY and
    F.ERNCD = D.ERNCD and
    F.SPCL_BALANCE = D.SPCL_BALANCE and
    (case when F.MONTHCD < '07' then F.CALENDAR_YEAR -1 else F.CALENDAR_YEAR end)
    = (case when D.MONTHCD < '07' then D.CALENDAR_YEAR -1 else D.CALENDAR_YEAR end)
    and to_number(F.MONTHCD) + decode(sign(7-to_number(F.MONTHCD)),1,6,-6)
    <= to_number(D.MONTHCD) + decode(sign(7-to_number(D.MONTHCD)),1,6,-6))
    ,D.HRS_MTD
    ,D.HRS_QTD
    ,(select sum(F.HRS_MTD) from PS_EARNINGS_BAL F where
    F.EMPLID = D.EMPLID and
    F.COMPANY = D.COMPANY and
    F.ERNCD = D.ERNCD and
    F.SPCL_BALANCE = D.SPCL_BALANCE and
    (case when F.MONTHCD < '07' then F.CALENDAR_YEAR -1 else F.CALENDAR_YEAR end)
    = (case when D.MONTHCD < '07' then D.CALENDAR_YEAR -1 else D.CALENDAR_YEAR end)
    and to_number(F.MONTHCD) + decode(sign(7-to_number(F.MONTHCD)),1,6,-6)
    <= to_number(D.MONTHCD) + decode(sign(7-to_number(D.MONTHCD)),1,6,-6))
    from PS_EARNINGS_BAL D
    where D.SPCL_BALANCE = 'N'
    union
    select
    D.EMPLID
    ,D.COMPANY
    ,'FF'
    ,(case when D.MONTHCD > '09' then D.CALENDAR_YEAR + 1 else D.CALENDAR_YEAR end)
    ,ltrim(to_char(to_number(D.QTRCD)+decode(sign(4-to_number(D.QTRCD)),1,1,-3),'9'))
    ,D.ERNCD
    ,ltrim(to_char(to_number(D.MONTHCD)+decode(sign(10-to_number(D.MONTHCD)),1,3,-9),'09'))
    ,D.MONTHCD
    ,D.GRS_MTD
    ,D.GRS_QTD
    ,(select sum(F.GRS_MTD) from PS_EARNINGS_BAL F where
    F.EMPLID = D.EMPLID and
    F.COMPANY = D.COMPANY and
    F.ERNCD = D.ERNCD and
    F.SPCL_BALANCE = D.SPCL_BALANCE and
    (case when F.MONTHCD < '10' then F.CALENDAR_YEAR -1 else F.CALENDAR_YEAR end)
    = (case when D.MONTHCD < '10' then D.CALENDAR_YEAR -1 else D.CALENDAR_YEAR end)
    and to_number(F.MONTHCD)+decode(sign(4-to_number(F.MONTHCD)),1,9,-3)
    <= to_number(D.MONTHCD)+decode(sign(4-to_number(D.MONTHCD)),1,9,-3))
    ,D.HRS_MTD
    ,D.HRS_QTD
    ,(select sum(F.HRS_MTD) from PS_EARNINGS_BAL F where
    F.EMPLID = D.EMPLID and
    F.COMPANY = D.COMPANY and
    F.ERNCD = D.ERNCD and
    F.SPCL_BALANCE = D.SPCL_BALANCE and
    (case when F.MONTHCD < '10' then F.CALENDAR_YEAR -1 else F.CALENDAR_YEAR end)
    = (case when D.MONTHCD < '10' then D.CALENDAR_YEAR -1 else D.CALENDAR_YEAR end)
    and to_number(F.MONTHCD)+decode(sign(4-to_number(F.MONTHCD)),1,9,-3)
    <= to_number(D.MONTHCD)+decode(sign(4-to_number(D.MONTHCD)),1,9,-3))
    from PS_EARNINGS_BAL D
    where D.SPCL_BALANCE = 'N'
    Edited by: user5846372 on Mar 11, 2009 8:55 AM

    Hi,
    What i observed is that your table name and where clause is same in all the thress SELECTs whereas columns having some manipulations that is not going to be unique. I guess you can easily replace UNION with UNION ALL.
    from PS_EARNINGS_BAL D
    where D.SPCL_BALANCE = 'N'Note: I am not aware of your data and business requirement. Please test the result before removing. It is just a suggetion
    Cheers,
    Avinash

  • How to get the real SQL statement from a preparedstatement?

    Hi,
    I am trying to log the actual SQL sent to database by the preparedStatement. Since the original SQL I used to prepare the statement has a lot of "?" in it, after setting all the parameters in the preparedStatement, I want to get the final SQL statement executed. Is there a way to get it? Probably the SQL will depend on different drivers.
    Thanks in advance.

    Thanks, changhsu. I tried the tracing technique. But it only prints out the original SQL statement sent to the preparedStatement. The following is part of the log file:
    ======================================================================
    --------NetDirect JSQLConnect Version:2.2708--------
    2002-04-10 14:23:54.818 (1) Connection attempt number 1 Connection ID:1 for host:perseus
    2002-04-10 14:23:55.429 (1) JSQLConnect(2.2708) Trial license - expires on:Thu Apr 25 17:47:32 CDT 2002, unlimited connections
    2002-04-10 14:23:55.449 (2) Connection allocated from pool ID:2
    2002-04-10 14:23:55.72 (2) [Thread[Thread-6,5,main], IO:88cb4, Dbc:1346]] SELECT SHARED_DRIVES FROM EPM_PREFS WHERE PRODUCT='PE'
    2002-04-10 14:23:57.913 (2) Connection closed and returned to connection pool ID:2
    2002-04-10 14:23:58.193 (3) Connection attempt number 2 Connection ID:3 for host:perseus database:epm20 SQL6.5:false
    2002-04-10 14:23:58.203 (3) [Thread[Thread-6,5,main], IO:88cb3, Dbc:1347]] use epm20 set quoted_identifier,ansi_null_dflt_on,ansi_padding on set textsize 2147483647 set transaction isolation level read committed set implicit_transactions off
    2002-04-10 14:24:00.356 (4) Connection allocated from pool ID:4
    2002-04-10 14:24:01.168 (4) [Not Loged In@localhost, IO:88cb2, Dbc:1347]] PreparedStatement::prepare stmt:SELECT PASSWD FROM RESOURCE_INFO WHERE USER_ID=? AND DELETE_FLG IS NULL
    2002-04-10 14:24:01.448 (4) [Not Loged In@localhost, IO:88cb2, Dbc:1347]] RPC:sp_prepare
    2002-04-10 14:24:01.488 (4) [Not Loged In@localhost, IO:88cb2, Dbc:1347]] RPC:sp_execute
    =======================================================================
    I did not try to trace in SQL Server 7. I will have to find out how to do that first.
    Thanks again.

  • UPDATE statement in Receiver JDBC adapter

    Hi all,
    I would like to use UPDATE statement in my receiver JDBC adapter and would like to know how this UPDATE statement works in following case.
    1) If i have 10 records to be updated in database, whether Commit happens at the end of all 10 records updation OR it will be for every record update?
    Regards

    Hi,
    Then let me construct my query this way...
    i have 10 records that needs to be updated to database, say For Ex: 7 records are updated successfully and 8th record has issue in updating the table.
    In this case i would like to ROLLBACK entire 10 records with out committing any thing.
    So if i use your 2nd option, it should perform as i expected right?
    Regards

  • What are the Batch mode parameters for Receiver JDBC Adapter

    Hi All,
             Could some pls tell me how to set bacth mode in receiver JDBC adapter and what are its parameters and how to configure them. i beleive there is something like max count parameters etc..
    Regards,
    Xier

    Hi,
    Check this for more info
    http://help.sap.com/saphelp_nw04s/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    Regards
    Seshagiri

  • How to use the generated SQL of "Recommendation"

    Dear Experts,
    I am using KXEN recommendation function. After trained the model, I expose the result in form of HANA SQL. However, I am really have no idea how to make this SQL runnable because there are some subqueries like:
    FROM $Dataset "SPACEIN"
      LEFT OUTER JOIN (SELECT * FROM  WHERE "GRAPH_NAME" = 'Transactions') "PRODUCTS" ON ("PRODUCTS"."KXNODEFIRST" = "SPACEIN".MemberID)
      LEFT OUTER JOIN (SELECT * FROM  WHERE "GRAPH_NAME" = 'Product') "RULES" ON ("PRODUCTS"."KXNODESECOND" = "RULES"."KXNODESECOND")
      LEFT OUTER JOIN (SELECT * FROM  WHERE "GRAPH_NAME" = 'Transactions') "NOTIN" ON ("RULES"."KXNODESECOND_2" = "NOTIN"."KXNODESECOND") AND ("NOTIN"."KXNODEFIRST" = "SPACEIN".MemberID)
    Please pay attention to the red parts. While $Dataset, I assume it should be the data source which is used to train the model, but how to handle the "GRAPH" parts(the next 3 subqueries)? There are something missing after "FROM" clause, what should I fill in here? why the XKEN will generate sucn incomplete codes?
    Thanks for your help!

    Hi Richard,
    To apply a recommendation model, you first need to save your model in your database. (saving the model in the database for such models and for what you want to do is mandatory).
    Once you saved it, you will see many tables starting with "Kx" : KxInfos, KxLinks, KxNodes...
    These tables contains information on the nodes available in the data used, on the links between products.
    Now, if you generate the SQL code for Hana, the name of your KxLinks table should now be used in the SQL code.
    When prompted for $Dataset and $Key, you should specify in place of $Dataset the name of the table on which you want to apply your model. In place of $Key, you should enter the name of the key of this table (e.g. UserId).
    In my case $Dataset =>KAR_UniqueCustomers and $Key=>UserID
    My generated code looks like this :
    FROM KAR_UniqueCustomers "SPACEIN"
    LEFT OUTER JOIN (SELECT * FROM KxLinks1 WHERE "GRAPH_NAME" = 'Transactions') "PRODUCTS" ON ("PRODUCTS"."KXNODEFIRST" = "SPACEIN".UserID)
    LEFT OUTER JOIN (SELECT * FROM KxLinks1 WHERE "GRAPH_NAME" = 'ItemPurchased') "RULES" ON ("PRODUCTS"."KXNODESECOND" = "RULES"."KXNODESECOND")
    Note that your application table must contain:
    - A column with the same name as your users identifier in the training dataset. It contains the list of distinct users (stricly 1 row for each customer id)
    - A column with the same name as your products name in the training dataset. It can contain the name of the same product for all customers.
    I hope you'll make it work !
    Armelle

  • Dynamic SQL Statements with an JDBC Adapter

    Hello,
    i have a simple scenario:
    A WebService calls SAP XI and XI has convert this request into an dynamic SQL for a particular DB-Table.
    Two Questions:
    1. Can this done with an JDBC-Receiverchannel or do i have to write a Java Server-Proxy?
    2. How do i bring dynamic SQL Stratement into the JDBC Receiver-Adapter?
    Regard
    Gunnar

    I think you should be able to achieve this using the SQL_QUERY / SQL_DML action in the JDB receiver adapter...
    The SQL string can be dynamically created....
    see the help link on different document types with JDBC receiver adapater....look for statement6...
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/frameset.htm
      <StatementName6>
    <anyName action=” SQL_QUERY” | “SQL_DML”>
    <access>SQL-String with optional placeholder(s)</access>
    <key>
      <placeholder1>value1</placeholder1>
      <placeholder2>value2<placeholder2>    
    </key>
    </anyName > 
      </StatementName6>
    Thanks,
    Renjith

  • How to dynamically execute generated SQL statements using 11gR2 ?

    Hello,
    I'd like to know if it is possible to do what the following statement intended to do:
    select * from (select replace('select empno from emp',
                                 '') from dual);in other words, is it possible to dynamically generate and execute a select statement in a from clause ?
    thank you for your help,
    John
    Edited by: 440bx on Jul 16, 2010 3:57 PM changed "generate" to "generated" in subject

    Hello Aketi,
    That is totally WICKED !!
    I've been playing with the code you posted, pretty much since you did, trying to figure out how it works. I have some idea of how it works now but, I cannot figure out why I get the set of results, not once but TWICE.
    When I run the query you posted above, this is what I get:
    SQL> @getxml2
    TABLE_NAME                          count
    CLOB_EXAMPLE                            1
    D42                                     1
    DEPT                                    4
    DEPT_2                                  0
    DEPT_ACCIDENTS                          6
    DEPT_EAST                               2
    ... some tables deleted to shorten the output
    T1                                      1
    T10                                    10
    T100                                    0
    22 rows selected.
    TABLE_NAME                          count
    CLOB_EXAMPLE                            1
    D42                                     1
    DEPT                                    4
    DEPT_2                                  0
    DEPT_ACCIDENTS                          6
    DEPT_EAST                               2
    ... some tables deleted to shorten the output
    T1                                      1
    T10                                    10
    T100                                    0
    22 rows selected.
    SQL>The result is shown TWICE. I cannot figure out why. Any ideas as to why the result is shown twice ? (I ran the statement from SQL*Plus and started a fresh instance of SQL*Plus to ensure that no settings from previous scripts would be the cause).
    Thank you for your help, great little piece of code!
    John.
    Edited by: 440bx on Jul 16, 2010 5:30 PM
    Edited by: 440bx on Jul 16, 2010 5:31 PM - corrected name in Hello greeting
    Edited by: 440bx - 11gR2 on Jul 17, 2010 2:55 AM - corrected misspelling
    Edited by: 440bx - 11gR2 on Jul 17, 2010 2:56 AM - corrected another misspelling

  • Not able to View generated SQL statement

    Hi,
    In order to view the generated SQL statement in Receiver JDBC Adapter,
    i have done logSQLStatement as true in  CC still not able to view in RWB,
    also mesg protocol i m using in CC is "xml sql format", is it bcos of this i am not able to ?
    If yes, then how can i see that sql string?
    Regards,
    Pratibha

    Pratibha,
    In our JDBC scenario the message protocol is also set to XML SQL Format
    The Integration Process has a mapping step of type XSL that uses an Imported Archive to create the SQL select statement.  Then there is a synchronous Send step for the JDBC component
    Both this SQL statement and the returned SQL result are available in the XML message monitor SXMB_MONI
    Regards,
    Mike

  • UD Connect Generated SQL Statement

    Hi All,
    Can anyone tell me if it's possible to influence the generated SQL statement?  We need to be able to use the order by clause so as to get the records in the correct order.
    Any help much appreciated.
    Thanks
    Craig

    Hi
    Yes its possible in THIS WAY.
    CASE-1
    In UD Connect we have the DATA in a BASE TABLE. When we execite the under like DATASOURCE  (UD-CONNECT). The dependant Info PACK brings the complete data to PSA. After the DATA LANDS in PSA. We can sort out in the same way how can SORT in the SQL Statement method. But to do this you have to PUT a Start routine at infopack level.
    Case-2
    You have to use a store procedure out side the SAP BI .

  • Where to see generated SQL statement from jdbc adapter?

    Hi everybody,
    where can I see the generated SQL statement from JDBC adapter?
    Regards Mario

    Yes and True lterally means the same, but alas XI does not understand literature..
    Just checked the note as well, as you are correct!
    Regards
    Bhavesh

  • How do I Pass a parameter to a SQL Component Task where the source SQL statement is also a variable

    Hi,
    I have been tasked with making a complex package more generic.
    To achieve this I need to pass a parameter to a SQL Component Task where the source SQL statement is also a variable.
    So to help articulate my question further I have create a package and database as follows; -
    USE [KWPlay]
    GO
    /****** Object: Table [dbo].[tblTest] Script Date: 05/14/2014 17:08:02 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[tblTest](
    [ID] [bigint] IDENTITY(1,1) NOT NULL,
    [Description] [nvarchar](50) NULL,
    CONSTRAINT [PK_tblTest] PRIMARY KEY CLUSTERED
    [ID] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    I populated this table with a single record.
    I unit tested the SQL within SSMS as follows;
    SELECT * FROM dbo.tblTest
    Result; -
    ID           
    Description
    1             
    Happy
    DECLARE @myParam NVARCHAR(100)
    SET @myParam = 'Sad'
    UPDATE dbo.tblTest SET [Description] = @myParam FROM dbo.tblTest WHERE ID = 1
    SELECT * FROM dbo.tblTest
    Result; -
    ID   
    Description
    1    
    Sad
    Within the package I created two variables as follows; -
    Name: strSQL
    Scope: Package
    Data Type: String
    Value: UPDATE dbo.tblTest SET [Description] = @myParam FROM dbo.tblTest WHERE ID = 1
    Name: strStatus
    Scope: Package
    Data Type: String
    Value: Happy
    I then created a single ‘Execute SQL Task’ component within the control flow as follows; -
    However when I run the above package I get the following error; -
    SSIS package "Package.dtsx" starting.
    Error: 0xC002F210 at Execute SQL Task, Execute SQL Task: Executing the query "UPDATE dbo.tblTest SET [Description] = @myParam FR..." failed with the following error:
    "Parameter name is unrecognized.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
    Task failed: Execute SQL Task
    Warning: 0x80019002 at Package: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. 
    The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the
    errors.
    SSIS package "Package.dtsx" finished: Failure.
    I also tried; - 
    Name: strSQL
    Scope: Package
    Data Type: String
    Value: UPDATE dbo.tblTest SET [Description] = ? FROM dbo.tblTest WHERE ID = 1
    However I received the error; - 
    SSIS package "Package.dtsx" starting.
    Error: 0xC002F210 at Execute SQL Task, Execute SQL Task: Executing the query "UPDATE dbo.tblTest SET [Description] = ? FROM dbo...." failed with the following error: "Parameter name is unrecognized.". Possible failure reasons: Problems with
    the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
    Task failed: Execute SQL Task
    Warning: 0x80019002 at Package: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED.  The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches
    the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
    SSIS package "Package.dtsx" finished: Failure.
    Kind Regards,
    Kieran.
    Kieran Patrick Wood http://www.innovativebusinessintelligence.com http://uk.linkedin.com/in/kieranpatrickwood http://kieranwood.wordpress.com/

    Tried; - 
    Name: strSQL
    Scope: Package
    Data Type: String
    Value: UPDATE dbo.tblTest SET [Description] = ? FROM dbo.tblTest WHERE ID = 1
    and; - 
    Result; - 
    SSIS package "Package.dtsx" starting.
    SSIS package "Package.dtsx" finished: Success.
    Therefore the answer was to put the parameter number rather than the parameter name under the parameter mapping tab-> parameter name column. 
    Kieran Patrick Wood http://www.innovativebusinessintelligence.com http://uk.linkedin.com/in/kieranpatrickwood http://kieranwood.wordpress.com/

  • How to find the backend  SQL query of the JSP page in OIC

    Does anybody how the best way to find the backend SQL QUERY of OIV JSP page?

    How To Generate Trace Files in in HTML/JSP (using Profile Option)
    •     • Note: This requires proper responsibility to set SQL Initialization statement using Profile option.      
         Step 1.     Login to the desired Form application.     
         Step 2.     Select +Profile >> System ('Find System Profile Values' screen will pop up)     
         Step 3.     Check 'User' and Type in the Username (in which the account for that user will be trace)     
         Step 4.     Type 'Initialization%' in the Profile box and Hit 'Find' (Click here for preview.)     
         Step 5.     In the User box, type the following statement and Hit 'Save' (Click here for preview)
         BEGIN FND_CTL.FND_SESS_CTL('','','TRUE','TRUE','','ALTER SESSION SET TRACEFILE_IDENTIFIER = TESTING MAX_DUMP_FILE_SIZE = 5000000 EVENTS ='||''''||' 10046 TRACE NAME CONTEXT FOREVER, LEVEL 12'||'''');END;     
         Note:     specify any name you like to identify your trace, in this case, testing is the end name on the trace. You can also specify the amount of data allowable to be in the trace, in this case, 5000000 is the amount set. Make sure you hit 'Save' afterwards.[Quotes in the statement are all 'Single' quotes.]
              specifying TRACEFILE_IDENTIFIER value is mandatory when setting up the trace using the above profile option value
         Step 6.     Login to HTML / JSP page with username/password and start your flow. (Everything you do once login to HTML / JSP will get trace.)     
         Step 7.     Logout of HTML / JSP application once you completed with your flow.      
         Step 8.     Go back to the Profile option in the Form application and delete the Initialization SQL statement, and Hit 'Save'.     
         Step 9.     Log in to the database server or login server and retrieve your trace file.
         Identify and retrieve the trace file using the tracefile_identifier specified in Step 5.
         In this case the tracefile_identifier is “TESTING”. (Click here for Trace file locations) *     
         Note:     If you need to regenerate your trace or tracing a new flow, then repeat Step 1 to Step 8. To avoid self-confusion, choose a different name for your trace identifier everytime you set to trace.     
         Step 10.     See TKPROF section on how to format trace file into readable text.
         Trace Options Definition
         No Trace          Tracing is not activated
         Activities will not get traced.
         Regular Trace
         (Level 1)          Contains SQL, execution statistics, and execution plan.
         Provides execution path, row counts as well as produces smallest flat file.
         Trace with Binds
         (Level 4)          Regular Trace plus value supplied to SQL statement via local variables.
         Trace with Waits
         (Level 8)          Regular Trace plus database operation timings that the SQL waited to have done in order to complete, i.e. disk access.
         Trace with Binds and Waits
         (Level 12)          Regular trace with both waits and binds information.
         Contains the most complete information and will produce the largest trace file.
    ****Send me an email to [email protected],I will share the document with you.

  • How can i use one SQL statement to solve problem?

    How can i use one SQL statement to solve the question below?
    For a Table named A, there is a column named F(char type).
    Now select all the records where F like '%00' and update their F value to '%01'
    Just one SQL statement.Do not use PL/SQL block.
    How to do that?
    Thanks.

    What is the data volume for this table?
    Do you expect lots of rows to have '%00' as their value?
    Following two statements come to mind. Other experts would be able to provide better alternatives:
    If you have index on SUBSTR(f, 2):
    UPDATE A
    SET    f = SUBSTR(f,
                      1,
                      length(f) - 2) || '01'
    WHERE  substr(f,
                  -2) = '00';If most of the rows have pattern '%00':
    UPDATE A
    SET    f = SUBSTR(f,
                      1,
                      length(f) - 2) ||
               DECODE(SUBSTR(f,
                             -2),
                      '00',
                      '01',
                      SUBSTR(f,
                             -2));

  • OBIEE 11g "WITH SAWITH0 AS" subquery factoring clause in the generated sql

    I've observed that the OBIEE 11g generates in the query log physical query using the WITH (sub-query factoring) clause to make the generated sql elegantly readable. This is great! Thanks for the developers. However I have some questions about this.
    __Background__
    Oracle Database' default behaviour is that if you have only one sub-query in the WITH section, it executes it as an in-line view and does not materialize it before the main sql is executed. If you have more than one, by default the database engine materializes all of them in the order of the definition. In some cases this can completely blow up the SGA and make the query never ending. To divert this behaviour you can apply two hints that work both in inline views and in sub-queries as well: /*+ MATERIALIZE */ and /*+ INLINE*/, however Analytics 11g does not seem to have hint capabilities at the logical table level, only at physical table level.
    If we go with the current defaults, developers not aware of this feature can bump into serious performance issues for the sake of some syntax candy at the generated sql level, I'm afraid.
    __Questions__
    * Is it possible to turn the Analytics server not to use WITH but use inline views instead?
    * Is there any way to sneak in some hints that would put the /*+ INLINE */ hint to the appropriate place in the generated sub-queries if needed
    * Does the Oracle Database have any initialization parameter that can influence this sub-query factoring behavior and divert from the default?

    The WITH statement is not added to make the query more elegant, it's added for performance reasons. If your queries take long to run then you may have a design issue. In a typical DWH DB SGA needs to be seriously increased since the queries ran are much larger and complex than on an OLTP DB. In any case you can disable the WITH statement in the Admin Tool by double clicking on your database object on the physical layer and going to the Features tab. The feature is called WITH_CLAUSE_SUPPORTED.

Maybe you are looking for

  • How do I get my MacBook Pro w/ 10.8.4 to mirror to Apple TV?

    I can use Apple TV to play movies from my iTunes, but I have heard that I should be able to mirror my screen to the Apple TV, and I cannot. Under System Preferences>Displays I have a check box to show mirroring displays in the menu bar when available

  • Can iTunes credit vouchers be used when family sharing?

    My son recently redeemed an iTunes voucher on his account but every time he tries to purchase a song, it asks me for permission and to charge it to my account as the administrator. I have been declining because I don't want it charged to my credit ca

  • Sql report on item - problem with commas in the string

    I have a simple report that groups all the Job Titles entered on our database. I pass the job title to an apex item and then on a second page list the records that match that job title using: and ed.ede_job_title = :P35_JOB_TITLE If there is a comma

  • How to back up my iphoto events to an external drive

    I have a Lacie external drive. I really just want to back up my pictures from the Iphoto, but everytime i try to do it , it will just transfer the pictures without the events. I had try the time Machine, but it will take me 15 days to dowloadteh enti

  • Help! i cant install visual studio!

    Help! Can anyone help me please! I downloaded Visual Studio Express 2013 for Windows desktop computer suddenly made a restart and when it came on I tried to install, then an error there is a problem with the installation and that I should contact mic