SQL Tracing in TimesTen with actual data visible

Hi,
We're having some issues with our TimesTen-based application where under some circumstances (it appears to increase under load) the results appear to get 'mixed up', i.e. a query appears to not have received the right result set from the database. I know the result set is wrong because we're doing performance testing where each query should actually return exactly the same.
I also say 'appears' because I think the problem is on the client side, where multiple threads access the database simultaneously and somehow things get mixed up. This happens so deep in the application that increasing the logging on client side didn't tell me what I need to know thus far.. And before I look further, I want to exclude the possibility that the database is mixing up results from queries processed in parallel.
To accomplish that I would like to enable a TimesTen trace in ttTraceMon where the actual data returned as a result set to the client is visible. Is this possible? There are a lot of components you can trace, I haven't tried them all but at least the SQL component does not show this information, not even at the highest trace level.
Is there any way to get a view of the actual result set that is being returned to a client, before that client's driver or the application (we use JDBC) actually interprets the results?
Any clues are greatly appreciated! Thanks in advance.
We use TimesTen 11.2.2.
Kind regards,
Pieter van Wijngaarden

The answer sadly is no. There is not currently any trace level that will show data values.
If you really need to share database connections between application threads then it should be done very carefully. Some rules to observe are:
1. When a thread is using a connection it should have exclusive use of it. Do not allow multiple threads to make concurrent use of the same connection; TimesTen has internal mutex protection to avoid this causing problems for the database but due to the nature of the ODBC and JDBC APIs it is very hard at an application level to ensure correctness with this approach.
2. Many objects (statements, result sets etc.) are closely associated with a specific connection. When a thread has 'relinquished control' of a connection it should not then manipulate any object associated with that connection in any way whatsoever.
For example:
1. Thread 1 'reserves' connection 1.
2. Thread 1 issues a query on connection 1 and obtains a result set.
3. Thread 1 'releases' connection 1.
4. Thread 2 'reserves' connection 1 and starts to do some work.
5. Thread 1 starts to process values from the result set obtained in step 2.
At this point you have two threads working concurrently on connection 1 and all bets are off (and certainly you will see problems).
Code that violates these rules may seem to work okay with some databases but not with others. That is not the fault of the database but just a happy coincidence. This code pattern is just incorrect.
Also please note that, unlike Oracle DB, in TimesTen a commit or rollback operation on a connection closes / invalidates all result sets associated with that connection so again if you share connections in a way similar to the above this can also cause you problems.
Good luck with your debugging.
Chris
Edited by: ChrisJenkins on Jan 30, 2013 10:03 AM

Similar Messages

  • Title parameter: replacing sysdate with actual date

    i have 2 parameters:say,
    from_date = 10/OCT/2006 , to_date = SYSDATE
    and what i'm trying to acheive is to print the parameters in the report TITLE.
    when i use '&parameters' i see for to_date = SYSDATE instead i want to see the actual date the when the report was run.
    is there a way i can do it...?

    Michael brings up a fun little point.
    Years ago, I used to extoll to users that parameters, calculations, etc. had to follow a standard (ie: calculations were labelled like: calc_today_date, calc_gl_code_fixed, etc., and parameters were labelled such as: parm_plant_code or parm_employee_name, etc.).
    I then started teaching that as you don't see the parameter, you could label it however you like: ie: i_hate_my_job, my_boss_is_stupid, etc.
    Boy was it fun when I discovered that if you chose to display the parameters in the title, you'd get the parameter label as well!
    Suffice it to say, I do what Michael suggests. Create a parameter name with something that let's you display it - where the name says what it is (ie: from date, gl code, etc.).
    Maybe at some point in the future, Oracle will add the concept of what's in the EUL for item properties, wherein you have a parameter id (where you could put in text what it really is) and a parameter label (how you want it displayed).
    Russ

  • Fill fields with actual date / timestamp with button

    Hello,
    I did not find an answer for my following problem.
    I want to put a button my adobe form that fills automactically three fields with data from the PC which are:
    actual time (of the PC and of course timezone info), date and username, so the User has to press one button to fill all these data for convenience. 
    So I think it is necessary to program this in JavaScript as an "on-click" action. Since I'am not too much familiar with this, it would be great if someone can post a little sample coding for this (or has some other tipp).
    regards and happy xmas
    Jörg

    you must have target fields for your Date, Time and Username, for example you have a structure in your data view called "ZINFO" with the fields "EDATE", "ETIME","ENAME"
    in your layout you need a button where you click on
    in the click event you can fill your fields (formcalc)
    xfa.resolveNode("xfa.record.ZINFO.EDATE").value = Num2Date(Date(), "DD/MM/YYYY");  
    xfa.resolveNode("xfa.record.ZINFO.ETIME").value = Num2Time(Time(), "HH:MM:SS", "de_DE");
    so you always get time/date when clicking
    but how do you know who has opened the form?? did you realize some password protection??
    br norbert

  • Sql Server Connectivity issue with ODI Data Profiler

    Hi all,
    To profile data from SQL Server Data source, i had created a ODBC connection(using Windows NT authentication) in the system and it was successful. Created a connection with Type ODBC connection in Loader Connections along with System name, Port No and DSN Name. But while trying to connect the database it is throwing an error as Authentication Failed. Please guide me.

    ODI's DP does not support the use of sourcing data on the ODBC data source. You must extract to a file, and use the file as the input.

  • Project Scheduling aligment with Actual Date

    Hi,
    I have Scheduled a Project in Planning Board and my first Activity (Architecture Design) was scheduled to finish at 30.06.2014.
    While the the next dependant activity was scheduled to start the next day 01.07.2014.
    Now my first Activity (Architecture Design) is finalised & confirmed (see actual in yellow) earlier than planned.
    Please can you tip, what shall I do to reschedule the project so that next activity is also planned to start earler (the next day after first).
    Or where do I set up this logic "if the activity on critical path is finished earlier, reschedule the whole project to as early as possible".
    I understand I can;t chage "Basic Dates", but the forecast dates shall reflect the state of actuals - right?  
    Cheers,
    Daria

    Hi Daria,
    Kindly ensure that the automatic log indicator is ticked on as well and send us the screenshot of the log that you are getting while rescheduling the network. (Using scheduling types Forward/Backward/Free Scheduling)
    Regards
    Varun

  • Do Cubes exist with actual data as from BW305 etc

    Hello Gurus,
    I would like to practice from the SAP Training material i.e. BW305 etc. I wish to know whether all those cubes mentioned actually exist somehwere in SAP Demo Infoarea? If not, how can I proceed furthur? Thanks.
    SD

    No they may not be available. while taking the training they will provide system. there only i believe you can practice, since that is IDES system.
    regards,
    vsn

  • How to get  the actual data in ALV report

    I am doing some upgradation work   in that i am using Submit  & And return and  also i am using some function modules like LIST FROM MEMORY , LIST TO TXT wnd WRITE LIST , it gives output in normal list format , But i need to print in ALV report .
    With the use of set table for 1st display i got the  ALV report   but not with actual data, (some junk value is showing) , So can any 1 suggest me how to get  the  actual data in ALV report, With the use of  Any Function Module or with Coding,
    with regards,

    Hi Saravana
    I am sure you must be getting the values in tables of table parameters from every FM.
    consolidate the values from tables of all FMs in one table and built ALV for that table only.
    I hope this way you can show the actual data in ALV.
    thanks
    Lalit

  • Original dates in comparison of actual dates

    Hi Experts
    I have a project with certain activities and partily executed (few activities are confirmed and partially confirmed).
    For the finally confirmed activities, the planned earliest and latest dates if activity are matched with actual dates.
    To have an analysis of planned and actual dates, how to retain the original dates?
    Over a period of time, i have incerted new activities. To enable bringing these activities in schedule, i need to re-schedule the project.
    But, the origjnal schedule also will get rescheduled. I am looking for retaining the original schedule despite repeated reschedules for the purpose of future analysis.
    Generally, the project progress in gantt chart (general business requirement) is monitored with out deviating the original schedule.
    Require comments by experts.
    warm regards
    ramSiva

    Hi Mahendra
    My scheduling scenario is bottom up, because the individual activities and procurement lead times will decide the actual planning for each WBS.
    So, as you suggested, once after complete structuring and initial scheduling, i will transfer the basic dates to forecast dates.
    Then onwards i will keep reschedule after confirmation / partial confimation  / addition of new activities.  Is this method keeps the forecast dates unchanged forever and gives information on iniital schedule?
    During intermittent rescheduling, will the forecast dates get affected as like basic dates (due to my scenario bottom-up)?
    warm regards
    ramSiva

  • Actual dates are altered during schedule calculation

    I've had an unusual problem the last couple times I've calculated a P6 schedule. Actual dates from a prior update are being changed. It's random. Also, a few activities without progress (scheduled to start a couple weeks in the future) are randomly given actual starts a few weeks in the past.
    I can deal with activities that are given actual dates when they shouldn't. But, I don't want to deal with actual dates changing after doing a schedule calculation.
    If you're puzzled at what I'm talking about, here's an example.
    Activity X has an actual start date of 07Feb11 and is not complete. It's scheduled completion date is 31March11. There are no out of sequence errors, or other errors, because everything was cleaned up. A schedule update is done and the activity finish is given an actual finish date of 07Apr11, and the schedule is calculated.
    After it is calculated, the actual start date is changed from 07Feb11 to 01Apr11.
    This has happened to a few activities (random), and the changes to actual dates is also random.
    What's going on?

    Are the activities or resource assignments set to Auto Compute Actuals?

  • Is anyone facing the similar problem of visible lag while opening app with 3G data on? It seems apple has made 5s slow to improve iphone 4 performance.5s was very smooth on 7.0.6 even with 3G data on. Is this a bug? Is apple going to fix this soon?

    Is anyone facing the similar problem of visible lag while opening app with 3G data on? It seems apple has made 5s slow to improve iphone 4 performance.5s was very smooth on 7.0.6 even with 3G data on. Is this a bug? Is apple going to fix this soon?

    I have same Problem. I tried all options - Reset All Settings, Erase Content & reset all settings, Upgrated to IOS8.1, Restore using iTune. But problem persists.
    When I turn Cellular Data or Wifi ON, then there is a lag while opening the Apps. But If I turn Data/Wifi off, phone becomes super fast. I have checked with my friends. They are not facing this issue. Not sure if Apple know this.

  • SQL Loader Oracle 10g problem in upload date with time data -- Very urgent.

    Hi
    I am trying to upload data using SQL loader. There are three columns in the table
    defined as DATE. When I tried upload a data like this '2007-02-15 15:10:20', it is not loading time part. The date stored as 02/15/2008' only. There is not time on that. I tried with many different format nothing work. Can please help me ?
    I have also tried with to_date --> to_timestamp it did not work.
    The application is going to be in production, I cannot change DATE to TIME STAMP. This is very urgent.
    LASTWRITTEN "decode(:LASTWRITTEN,'null',Null, to_date(:LASTWRITTEN,'YYYY-MM-DD HH24:Mi:SS'))",
    CREATEDON "decode(:CREATEDON,'null',Null, to_date(:CREATEDON,'YYYY-MM-DD HH24:Mi:SS'))",
    LASTUPDATEDON(21) "decode(:LASTUPDATEDON,'null',Null, to_date(:LASTUPDATEDON(21),'DD/MM/YYYY HH24:MI:SS'))"

    Your problem is most likely in decode - the return type in your expression will be character based on first search value ('null'), so it will be implicitly converted to character and then again implicitly converted to date by loading into date column. At some of this conversions you probably are loosing your time part. You can try instead use cast:
    SQL> desc t
    Name                                      Null?    Type
    LASTWRITTEN                                        DATE
    CREATEDON                                          DATE
    LASTUPDATEDON                                      DATE
    SQL> select * from t;
    no rows selected
    SQL> !cat t.ctl
    LOAD DATA
    INFILE *
    INTO TABLE T
    TRUNCATE
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
    LASTWRITTEN
    "decode(:LASTWRITTEN,'null',cast(Null as date),
      to_date(:LASTWRITTEN,'YYYY-MM-DD HH24:MI:SS'))",
    CREATEDON
    "decode(:CREATEDON,'null',cast(Null as date),
      to_date(:CREATEDON,'YYYY-MM-DD HH24:MI:SS'))",
    LASTUPDATEDON
    "decode(:LASTUPDATEDON,'null',cast(Null as date),
      to_date(:LASTUPDATEDON,'DD/MM/YYYY HH24:MI:SS'))"
    BEGINDATA
    2007-02-15 15:10:20,null,null
    null,2007-02-15 15:10:20,null
    null,null,15/02/2007 15:10:20
    SQL> !sqlldr userid=scott/tiger control=t.ctl log=t.log
    SQL*Loader: Release 10.2.0.3.0 - Production on Fri Feb 29 00:20:07 2008
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 3
    SQL> select * from t;
    LASTWRITTEN         CREATEDON           LASTUPDATEDON
    15.02.2007 15:10:20
                        15.02.2007 15:10:20
                                            15.02.2007 15:10:20Best regards
    Maxim

  • SQL 2008 how to compare & identify data among 2 tables with same structure ?

    Hello is there a TSQL way of comparing row by row for example comparing DateTimeStamp field in 2 separate tables with same structure in identifying if it's data was changed (If Table1.DateField > Table2.DateField THEN UPDATE it's entire row to match it's
    corresponding Table1 row.) ?
    Probably thinking would need a cursor to loop through or are there other better ways via TSQL ?
    Thanks in advance.

    Hi,
    I am assuming you have a PRIMARY KEY field or a UNIQUE field in both tables, which you should!
    You can do this using "UPDATE with INNER JOIN". (SQL Server – Update Table with INNER JOIN)
    Working example:
    USE [TestDatabase]
    GO
    /* Create Temp Tables */
    CREATE TABLE [dbo].[Table1]
    [ID] INT
    ,[Name] VARCHAR(10)
    ,[ModifyDate] DATETIME
    CREATE TABLE [dbo].[Table2]
    [ID] INT
    ,[Name] VARCHAR(10)
    ,[ModifyDate] DATETIME
    GO
    INSERT INTO [dbo].[Table1] ([ID], [Name], [ModifyDate]) VALUES (1, 'Vishal', GETDATE())
    INSERT INTO [dbo].[Table2] ([ID], [Name], [ModifyDate]) VALUES (1, 'Gajjar', GETDATE() + 1)
    GO
    SELECT [ID], [Name], [ModifyDate] FROM [dbo].[Table1]
    SELECT [ID], [Name], [ModifyDate] FROM [dbo].[Table2]
    GO
    UPDATE T1
    SET T1.[Name] = T2.[Name]
    FROM [dbo].[Table1] T1
    INNER JOIN [dbo].[Table2] T2 ON T1.[ID] = T2.[ID] /* Join on Key field */
    WHERE T2.[ModifyDate] > T1.[ModifyDate] /* Update criteria */
    GO
    /* CleanUp - Drop Tables
    DROP TABLE [dbo].[Table1], [dbo].[Table2]
    This Updates Table1 with latest values from Table2, You need to change the UPDATE statement for your scenario.
    - Vishal
    SqlAndMe.com

  • Creating Web service for PL/SQL Procedure with Complex Data Types

    I need to created web service for PL/SQL Procedure with Complex Data types like table of records as parameters, how do we map the pl/sql table type parameters with web service, how to go about these?

    Hello,
    When you are creating a service from a Stored Procedure, the OracleAS WS tools will create necessary Java and PL wrapper code to handle the complex types (table of record) properly and make them compatible with XML format for SOAP messages.
    So what you should do is to use JDeveloper or WSA command line, to create a service from your store procedure and you will see that most of the work will be done for you.
    You can find more information in the:
    - Developing Web Services that Expose Database Resources
    chapter of the Web Service Developer's guide.
    Regards
    Tugdual Grall

  • Can NOT cancel/Reverse GI with a date before the actual GI date

    Hi
    can NOT cancel/Reverse GI with a date before the actual GI date, if i do the PGI in wrong date, then how should i do?
    thanks

    >
    jo jo wrote:
    > Hi
    >
    > can NOT cancel/Reverse GI with a date before the actual GI date, if i do the PGI in wrong date, then how should i do?
    > thanks
    Hi Jo Jo,
    I am not sure if i understand your problem correctly.
    As far as my understanding goes you are trying to reverse a GI on a date before Actual goods issue date.
    If you have PGId on a date before planned GI date the system will update that date into Actual GI date and not planned GI Date.
    For example if you planned GI date was 1st April 2008 and you did PGI on 28th April 2008 Actual GI date will become 28th April 2008.
    So if you try to reverse PGI before 28th April you wont be allowed to as you cannot reverse a goods issue that has not happened.
    Hope it helps.
    Post furthur if i had misunderstood your problem.
    Regards
    Abhishek

  • Help with a query regarding time dependent display of Plan/Actual data

    Hello,
    Let me try to explain what my problem is:
    I have a query that shows plan and actual sales figures on a timeline. Plan and actual data is identified by 0VERSION (P01 for Plan; P00 for Actual).
    0CALMONTH and Sales key figure is in rows. 0VERSION is in collums.
    The output looks as follows (simplified):
    CalYYYY/MM............P01....P00
    2006.09......Sales........90.....100
    2006.10......Sales......100.......95
    2006.11......Sales........90........0
    2006.12......Sales........95........0
    So far so good! But users aren't satisfied with that. They want only <u>one</u> collumn with sales figures. For past months (< 2006.11) they want to see actual figures (Version P00). For current and future month (>= 2006.11) they want to see plan figures (Version P01). And this only in one single collumn.
    So the output should look this way:
    CalYYYY/MM..........P00/P01
    2006.09......Sales......100
    2006.10......Sales.... ...95
    2006.11......Sales........90
    2006.12......Sales........95
    Is there any way/workaround to accomplish this?
    Your help will be very appreciated!
    Regards,
    Ulrich

    Hi,
    For this what you can try is , have the two Restricted Key Figs the way you have right now, but Hide them. Then Create a Third Formula Key Fig, in which you can put a Boolean Logic :
    (FV > 11) * Act KF +(FV<= 11)*Plan KF
    Where FV is a Formula Variable which takes on the Value from Month (1 for Jan , 2 for Feb etc)
    Try something on these lines.

Maybe you are looking for

  • Mavericks freezing for a few seconds in intervals

    I've just upgraded to Mavericks and I'm having an issue with it freezing for a few seconds at random intervals. happens almost everytime I switch desktops too. herer's my system spec : Hardware Information:           MacBook Pro (15-inch, Early 2011)

  • How to find the list of org .field values in sap

    Hi, I need a list of org files values . example : I want to know ... Plant= WERKS,Cost Center=KOSTL. similarly I need the list of all org. values. what is the table name? Thanks in advance SR Message was edited by:         sunny raj

  • Twitter links do not work most of the time?

    i use twitter a lot but on ipad I can't get the hyperlinks to work. If i copy and paste into safari then they work occasionaly Ly but often not. Can anyone help?

  • Smartforms in SAP Query

    Is there any way to add smartforms to sap Query???? It's a real problem in SAP ERP. We can generate internal reports in sap query, and generate outgoing reports in smartforms. But I really don't understand why they aren't connected!!!!!

  • Validating vendors in PO item conditions of BAPI_PO_CREATE1

    Hai friends, BAPI_PO_CREATE1 is not validating the vendors of item level conditions(BAPIMEPOCOND-VENDOR_NO). But I have to validate those vendors existed in SAP or not. please help me. regards, Eswar.