DATE and TIMESTAMP problem - fixable with 11.1 JDBC Driver?

I'm adding some queries to an older part of our code base and while reading through the documentation for one of the classes I found that we weren't using our normal Hibernate queries because we needed to ensure that we weren't sending Timestamps to Oracle. Apparently the Timestamp would be converted to a Date because the column in the database was of type DATE. This was causing problems because the DATE column's index was being ignored and the table contains millions of records.
The Oracle FAQ seems to indicate that this has been fixed in the 11.1 JDBC drivers. I know that I can use 11.1 JDBC drivers with a 10.2.0 database, but will it use the new 11.1 mappings for DATE and TIMESTAMP or the old 10.2.0 mappings? Oracle FAQ page: http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html#08_01

Oracle FAQ page: http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html#08_01
Well obviously that was really stupid.
I'm adding some queries to an older part of our code base and while reading through the documentation for one of the classes I found that we weren't using our normal Hibernate queries because we needed to ensure that we weren't sending Timestamps to Oracle. Apparently the Timestamp would be converted to a Date because the column in the database was of type DATE. This was causing problems because the DATE column's index was being ignored and the table contains millions of records.
Not sure I follow that logic.
If the value was going into the database then it would update the index.
From that only one of the following could be true.
1. It wasn't going into the database.
2. It was being truncated to a date.
The Oracle FAQ seems to indicate that this has been fixed in the 11.1 JDBC drivers. I know that I can use 11.1 JDBC drivers with a 10.2.0 database, but will it use the new 11.1 mappings for DATE and TIMESTAMP or the old 10.2.0 mappings? I would agree with your interpretation of the FAQ.
And I would then follow it up by testing both with the old driver and the new.

Similar Messages

  • [iOS4] CMDeviceMotion and timestamp problem

    Hi,
    Excuse my English as it isn't my primary language.
    I hava a problem using an instance of CMDeviceMotion. I need data from both the gyro and accelerometer and the frequency of sample is set at the maximum, 100.
    I also need the timestamp at which the sample was taken. However, at the beginning the timestamp doesn't change even if the acceleration and gyro change. I got something like that :
    0.003779 -0.050910 0.001185 933.604339
    0.035029 -0.042457 0.019893 933.604339
    0.062266 -0.009147 0.084819 933.604339
    0.069300 0.012292 0.092631 933.604339
    0.047862 0.018517 0.091456 933.604339
    0.035304 0.029885 0.084575 933.604339
    0.032496 0.039498 0.083583 933.604339
    We have acceleration.x, .y, .z and the timestamp. As you can see the timestamp doesn't change for about 60 upgrades ~6 seconds.
    Besides, when it finally starts upgrading, it sometimes sample twice the accelreation/gyro at the same timestamp :
    0.115215 0.005342 -0.051157 1385.964002
    *0.120561 0.019797 -0.054112 1385.977830*
    *0.122637 0.031470 -0.051182 1385.977830*
    0.113840 0.042271 -0.045493 1385.992829
    Here is my code :
    In the viewDidLoad method :
    motionManager = [[CMMotionManager alloc] init];
    motionManager.deviceMotionUpdateInterval = 0.01;
    frequence = 100;
    Then I have a method invoked by a button :
    [motionManager startDeviceMotionUpdatesToQueue:[NSOperationQueue currentQueue]
    withHandler: ^(CMDeviceMotion *motionData, NSError *error)
    CMRotationRate rotation = motionData.rotationRate;
    CMAcceleration acceleration = motionData.userAcceleration;
    NSLog(@"rotation rate = [%f, %f, %f, %f]", rotation.x, rotation.y, rotation.z, motionData.timestamp);
    NSLog(@"acceleration rate = [%f, %f, %f, %f]", acceleration.x, acceleration.y, acceleration.z, motionData.timestamp);
    Any help appreciated,
    Thanks for your time
    Loïs

    Oracle FAQ page: http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html#08_01
    Well obviously that was really stupid.
    I'm adding some queries to an older part of our code base and while reading through the documentation for one of the classes I found that we weren't using our normal Hibernate queries because we needed to ensure that we weren't sending Timestamps to Oracle. Apparently the Timestamp would be converted to a Date because the column in the database was of type DATE. This was causing problems because the DATE column's index was being ignored and the table contains millions of records.
    Not sure I follow that logic.
    If the value was going into the database then it would update the index.
    From that only one of the following could be true.
    1. It wasn't going into the database.
    2. It was being truncated to a date.
    The Oracle FAQ seems to indicate that this has been fixed in the 11.1 JDBC drivers. I know that I can use 11.1 JDBC drivers with a 10.2.0 database, but will it use the new 11.1 mappings for DATE and TIMESTAMP or the old 10.2.0 mappings? I would agree with your interpretation of the FAQ.
    And I would then follow it up by testing both with the old driver and the new.

  • Date and Timestamp not updating

    Following on from my previous posts, the date and timestamp of updated files are not being updated in RoboSource Control, i.e. the Modified column in the RoboSource Control Explorer. However, it looks like changes are being stored on the server when topics are checked in, as I can right-click a file in source control that I have changed, choose View, and see the amendments in the HTML.
    Basically, this means that source control isn't recognising that files have changed and therefore when someone tries to get the latest version it doesn’t think there is one because the date and time are the same as previous version.
    Has anyone experienced this behaviour before or know why the Modified column has suddenly stopped being updated?
    Thanks
    Jonathan

    After some digging and random Googling the following article seems to have fixed my issue .
    It seems that if you are running RoboSource Control on 64-bit machines, there are problems with checking in files.
    http://helpx.adobe.com/robohelp/kb/cant-check-files-robosource-control.html.

  • How to validate date and timestamp format? Please help!

    Hi experts,
       I have a input field "receipt_date" with is of char20 type. It contains date and timestamp value like 20090429T054509.000Z
       In my ABAP code I want to validate if "receipt_date" value is in the format YYYYMMDDTHHMMSS.MMMZ. If not then display error message. How can do this validation? Is there any existing function module that does this kind of validation? Please help!
    Thanks & Regards
    Gopal

    Hi Gopal,
    Can you check whether the FM CACS_TIMESTAMP_GET_DATE is available in XApps? If yes, use this to identify a valid timestamp.
    Sample code:
        CALL FUNCTION 'CACS_TIMESTAMP_GET_DATE'
          EXPORTING
            i_timestamp = lv_stamp
          IMPORTING
            e_date      = lv_datum
            e_time      = lv_time.
    Hope this helps! Do let me know if you need anything else!!
    Cheers,
    Shailesh.
    Always provide feedback for helpful answers

  • Timezone effects on Date and Timestamp fields in af:query component

    Hello,
    I'm working on an ADF application where time zone is configured as follows:
    * Dynamic View Layer time zone is configured in trinidad-config.xml file and bound to a session scoped value:
    <trinidad-config>
      <skin-family>fusionFx</skin-family>
      <time-zone>#{sessionScope.tz}</time-zone>
    </trinidad-config>* ADF BC time zone is configured in adf-config.xml file and bound to View Layer time zone:
    <adf-config>
      <user-time-zone-config xmlns="http://xmlns.oracle.com/adf/usertimezone/config">
        <user-timezone expression="#{adfFacesContext.timeZone.ID}"/>
      </user-time-zone-config>
    </adf-config>The problem here is that Dates and Timestamp values work as expected all over the application except for the af:query component. When displayed as af:inputDate in af:form, Dates and Timestamp values are NOT getting converted to the time zone (TZ) configured in trinidad-config.xml file, whereas TimestampTz and TimestampLtz are. However, when displayed in af:query component, Dates and Timestamp values are automatically converted to View Layer TZ after a search has been performed.
    For example, say View Layer TZ = US/Pacific and we enter 01/jun/2011 as a search criteria of type Date and then click on the Search button. The displayed value automatically changes to 25/nov/2011, that is, it gets converted to the WLS JVM time zone, which is set to Europe/London.
    Is conversion of Date and Timestamps in af:query component the expected behaviour or could this be a bug?
    Is there any way to avoid this conversion?
    Thanks in advance
    Version:
    ADF Business Components 11.1.1.59.23
    Java(TM) Platform 1.6.0_21
    Oracle IDE 11.1.1.4.37.59.23
    PMD JDeveloper Extension 4.2.5.3.0
    Repost on 26-nov-2011 9:29
    Repost on 28-nov-2011 15:10
    Edited by: Barbara Gelabert on 26-nov-2011 9:29
    Edited by: Barbara Gelabert on 28-nov-2011 15:10

    Hi,
    Thanks for your reply. This certainly seems promising. However, I am getting a connection error now.
    The following...
    jar_loaded = require 'ojdbc14.jar'
    puts "Oracle jar loaded? #{jar_loaded}"
    puts "Starting active record"
    require 'rubygems'
    gem 'activerecord'
    gem 'activerecord-oracle_enhanced-adapter'
    require 'activerecord'
    puts "Connecting to MXGN"
    ActiveRecord::Base.establish_connection(
    :adapter => 'oracle_enhanced',
    :host => 'THEHOST',
    :port => '1550',
    :database => 'THEDB',
    :username => 'THEUSER',
    :password => 'THEPASSWORD'
    ... produces
    Oracle jar loaded? true
    Starting active record
    Connecting to MXGN
    ERROR: ActiveRecord oracle_enhanced adapter could not load Oracle JDBC driver. Please install ojdbc14.jar library.
    ERROR: ActiveRecord oracle_enhanced adapter could not load Oracle JDBC driver. Please install ojdbc14.jar library.
    C:/jruby/jruby-1.2.0/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:76:in `establish_connection': Please install the oracle_enhanced adapter: `gem install activerecord-oracle_enhanced-adapter` (LoadError) (RuntimeError)
    from H:\sandbox\DBPlay\lib\main_enhanced.rb:12
    I'm confused. Am I missing the driver, or have I failed to setup the enhanced Oracle adapter?
    I have tried moving the jar to $JRUBY_HOME/lib too, but the result was the same.
    All help would be greatly appreciated.
    Many Thanks
    Adrian

  • Reading Dates and Timestamps created by PL/SQL

    Hello,
    This is probably a FAQ (or stating the obvious) but I want to make sure I've got the right idea about things...
    I recently noticed that our Java app reads dates/timestamps incorrectly from the database. Any date set using 'SYSDATE' in PL/SQL is an hour out when read by Java. This is because we are now in BST and the object read back by the JDBC driver thinks the timezone is GMT.
    From reading around it seems that the DATE and TIMESTAMP types in Oracle don't persist timezone information. Fair enough, but to me this makes it dangerous to use SYSDATE at all in PL/SQL procedures.
    Previously I've never relied on the database itself to generate timestamps so dates have always been stored as UTC. I'm currently using SYS_EXTRACT_UTC(SYSTIMESTAMP) when inserting data in to tables and basically wondering if this is the common way of achieving accuracy.
    (using types such as "TIMESTAMP WITH LOCAL TIME ZONE" seem to have their own annoyances in JDBC so I've opted to avoid those)
    Thanks.

    Tom,
    This may be helpful...
    http://www.javaworld.com/javaworld/jw-10-2003/jw-1003-time.html
    Good Luck,
    Avi.

  • Can I use ICloud to store all my data and use it seamlessly with my devices and Mac?

    Can I use ICloud to store all my data and use it seamlessly with my devices and Mac.  I.E. I want to use it as I use my time capsule and get rid of all this stuff I have in my office.

    Yes.
    Apple - iCloud - Learn how to set up iCloud on all your devices

  • Production Order Change Date and Timestamp

    Hi, While trying to change the quantity and date of a production order I want to capture the date and timestamp of the change time.
    Please let me know which table or function module can be used for this. Thanks.

    Check AUFK-->AEDAT
    Regards
    AM

  • Date and timestamp code

    Hi Experts,
    I've a table which contains date and timestamp in single field. Now I need to do look up on this table.
    But this table can contain multiple records on same day.  I need to take record which has lower data and timestamp. How can I write a code to select lower date and stamp if multiple records exists. Any sample code. advance thank you very much.

    data: begin of itab occurs 0,
              date like sy-datum.
              end if itab.
    data: timestamp(14),
             zdate like sy-datum.
    select time from "ur table name"  into ztimestamp.
         zdate = ztimestamp(8).
    append ztable to itab.
    endselect.
    sort itab ascending.
    read table itab index 1.
    write:/ itab-date "it would be ur lowest date

  • Getting current date and timestamp for timezone

    I am getting the current date and timestamp using
    Date d = new Date();
    On the platform I'm using it is returning it in GMT time.
    I want to convert this into Eastern Time Zone for United Status.

    java.util.Date objects contain a count of milliseconds since the "epoch", which happens to be midnight, Jan 1 1970 GMT. However, they aren't intrinsically "in" any timezone.
    If you simply call Date.toString(), you'll get the date formatted for the current locale, including timezone.
    If you want a different format, you can use the DateFormat or SimpleDateFormat classes (recommended), or use Calendar to pull the various date components out. You have to physically set the timezone for each of these.
    To get a list of timezones supported by your machine, you can run this program:
    import java.util.Arrays;
    import java.util.TimeZone;
    public class TZDump
        public static void main(String[] argv)
        throws Exception
            String[] zones = TimeZone.getAvailableIDs();
            Arrays.sort(zones);
            for (int ii = 0 ; ii < zones.length ; ii++)
                System.out.println(zones[ii]);
    }And, here's a program that lets you compare the same date in different timezones:
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import java.util.TimeZone;
    public class TZDemo
        public static void main(String[] argv)
        throws Exception
            SimpleDateFormat fmt = new SimpleDateFormat("MM/dd/yy HH:mm:ss");
            Date now = new Date();
            System.out.println("Default TZ = " + fmt.format(now));
            String[] zones = new String[] { "EST", "EST5EDT", "PST"};
            for (int ii = 0 ; ii < zones.length ; ii++)
                fmt.setTimeZone(TimeZone.getTimeZone(zones[ii]));
                System.out.println("EST        = " + fmt.format(now));
    }

  • In Trouble with the Oracle JDBC Driver version - 10.1.0.5.0

    Hi !
    Without any problems i'm using the Oracle JDBC Driver version - 10.1.0.3.0 to access to the
    Oracle database (Oracle Database 10g Release 10.2.0.1.0 - 64bit Production).
    But exchanging the JDBC Driver 10.1.0.3.0 to 10.1.0.5.0 brings up the following problem:
    the statement
         con.prepareStatement(sql, resultSetType, resultSetConcurrency, resultSetHoldability)
         (with parameters resultSetType = 1003, resultSetConcurrency = 1007, resultSetHoldability= 1)
    returns null !
    while using the Oracle JDBC Driver version - 10.1.0.3.0 the statement (with same parameters)
    returns a correct PreparedStatement.
    Every hint or idea is welcome.
    Best regards,
    Claus

    Duplicate post:
    In Trouble with the Oracle JDBC Driver version - 10.1.0.5.0
    Claus,
    Pardon me if I am stating the obvious, but why don't you use the 10.2 JDBC driver with your 10.2 database? The driver is part of the database distribution. Otherwise, you can download the driver from the OTN Web site.
    Good Luck,
    Avi.

  • Changing date and time is wrong with time zone problem

    Okay, searched some of the forums, but didn't get the most correct answer to this:
    I just imported all my photos into Aperture from iPhoto (chose to have Aperture manage files as I don't plan on using iPhoto any longer. When I imported the files, I decided to do some organizing by date into folders. no problem.
    In some of my projects, I found some files that I imported from scans or got from others who had a film roll and processed it at a lab, and the dates from those files aren't the dates that the event took place. I went into Metadata>Adjust date and time, and changed the date (not so much the time I'm worried about), and checked the "change the masters" little box, too.
    After I close out of that box, the picture has the wrong date. I've determined this is because of the time zone support. I currently live in Japan, and I would like my photos here to show up as the date in the place they were taken. I think the date I enter, it thinks is the date I'm currently in (GMT +9), but aperture chooses to convert the date as if I was saying "hey, the picture I took happened on "date" in GMT +0:00)" which then makes it look in the metadata view as if it happened a day earlier.
    Any imported photos come in as the correct date and time and correct time zone, as far as I can see. It's just when I change the date and time it thinks I mean to have aperture convert it to GMT + 0:00. (but on a little more of a funny side... older pictures that happened in other time zones back in the states it lists the correct date and time for when the picture was taken, but "says" it's GMT +9:00) (another issue I'll deal with later maybe!)
    Hope I've described it in such a way that you can get it.

    I changed time and now my MacBook won't work

  • Time, date and settings problems with boot camp

    I have recently installed Windows XP using boot camp on my macbook, and everything seemed to be working fine for a while. However, after a couple of weeks, i am now getting date and time errors every time i shut down Windows and boot back into Mac OS. Upon restart the date always resets it self to December 2000, and this causes multiple programs to stop working. Also, airport forgets my wireless settings and no longer connects to my base station until i re-enter the passwords, so the date wont correct itself using the internet. The only way i have been able to set the correct time and date is to either set it manually, or to use the ethernet cable as it requires no passwords, which is inconvenient as my base station is in a awkward place.
    After resetting the time, date and internet settings, my macbook works perfectly again until the next time i use boot camp. I have also had exactly the same problem with another macbook i have, and cannot figure out how to stop this from happening.

    FAT32 will accessible from both Windows and OS X
    If you don't want to reformat your ext drive you need something like http://www.paragon-software.com/home/hfs-windows/ or http://www.mediafour.com/products/macdrive/

  • Null Date and Time Problem

    I created my entity classes from a database by using netbeans 6.0 and I'm using H2 as a database. I've the following table in my database.
    CREATE CACHED TABLE OPEN_TABLE ( ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY, TABLE_ID INTEGER, WAITER_ID INTEGER, OPEN_HOUR TIME DEFAULT CURRENT_TIME, OPEN_DATE DATE DEFAULT CURRENT_DATE );
    and here is the entity class netbeans created for me.
    import java.io.Serializable; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; /** * * @author Yupp */ @Entity @Table(name = "OPEN_TABLE") @NamedQueries({@NamedQuery(name = "OpenTable.findById", query = "SELECT o FROM OpenTable o WHERE o.id = :id"), @NamedQuery(name = "OpenTable.findByTableId", query = "SELECT o FROM OpenTable o WHERE o.tableId = :tableId"), @NamedQuery(name = "OpenTable.findByWaiterId", query = "SELECT o FROM OpenTable o WHERE o.waiterId = :waiterId"), @NamedQuery(name = "OpenTable.findByOpenHour", query = "SELECT o FROM OpenTable o WHERE o.openHour = :openHour"), @NamedQuery(name = "OpenTable.findByOpenDate", query = "SELECT o FROM OpenTable o WHERE o.openDate = :openDate")}) public class OpenTable implements Serializable {     private static final long serialVersionUID = 1L;     @Id     @Column(name = "ID", nullable = false)     private Integer id;     @Column(name = "TABLE_ID")     private Integer tableId;     @Column(name = "WAITER_ID")     private Integer waiterId;     @Column(name = "OPEN_HOUR")     @Temporal(TemporalType.TIME)     private Date openHour;     @Column(name = "OPEN_DATE")     @Temporal(TemporalType.DATE)     private Date openDate;     public OpenTable() {     }     public OpenTable(Integer id) {         this.id = id;     }     public OpenTable(Integer id, Date openHour, Date openDate) {         this.id = id;         this.openHour = openHour;         this.openDate = openDate;     }     public Integer getId() {         return id;     }     public void setId(Integer id) {         this.id = id;     }     public Integer getTableId() {         return tableId;     }     public void setTableId(Integer tableId) {         this.tableId = tableId;     }     public Integer getWaiterId() {         return waiterId;     }     public void setWaiterId(Integer waiterId) {         this.waiterId = waiterId;     }     public Date getOpenHour() {         return openHour;     }     public void setOpenHour(Date openHour) {         this.openHour = openHour;     }     public Date getOpenDate() {         return openDate;     }     public void setOpenDate(Date openDate) {         this.openDate = openDate;     }     @Override     public int hashCode() {         int hash = 0;         hash += (id != null ? id.hashCode() : 0);         return hash;     }     @Override     public boolean equals(Object object) {         // TODO: Warning - this method won't work in the case the id fields are not set         if (!(object instanceof OpenTable)) {             return false;         }         OpenTable other = (OpenTable) object;         if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {             return false;         }         return true;     }     @Override     public String toString() {         return "OpenTable[id=" + id + "]";     } }
    The problem is when I try to insert a new OpenTable to the database, Open_Date and Open_Hour columns stay as null. I want them to get the automatic CURRENT_DATE and CURRENT_TIME values. I can't see where the problem is because I used CURRENT_DATE and CURRENT_TIME words when I created the table. I don't have any problems when I use standart SQL statements to insert a new row. I just use INSERT INTO OPEN_TABLE(TABLE_ID, WAITER_ID) VALUES(2,3) and get current date and hour values automatically but JPA doesn't do that for me. What should I do to solve the problem?

    Those database defaults are only applied when you use an INSERT statement that specifies a list of columns excluding the ones with defaults. Presumably your persistence code always sets all columns when it does an INSERT, so the defaults won't apply. You'll have to find the way to set the defaults in the persistence layer, not in the database.

  • Cisco SPA525g2 Date and time Not Synced with the PBX server

    Hello,
    We have a couple of SPA525g2 phone connected and registered to our PBX server. We were able to configure 3 extensions on different lines of the phone. However, at times we were encountering issues with the other lines configured on the phone. There are times wherein 1  extension configured on the phone is having one way audio issue, but the other extensions configured on the same phone is working fine. and we have to reboot/reset the phone several times for all the extesions configured on the phone to work.
    Also, whenever we reset the phone, the date and time will be way way behind the current date and time, eventhough we have already set the correct date and time before we reset the phone.
    How can we resolve the one way audio issue on 1 or 2 extensions of the phone, while the other extensions configured to it is working fine?
    How can we make the phone sync the date and time with the PBx server?
    Any input and help regarding this issue is greatly appreciated...
    Btw, date and time  issue not sync with the PBX server is just happening on SPA525g2, we have other phones like SPA303, SPA504, and SPA232D/SPA302D. All other phones' date and time is in sync with the server even though we reset them except SPA525g2.
    Thank you very much,

    PeterMacSF,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Visit http://support.novell.com and search the knowledgebase and/or check all
    the other self support options and support programs available.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://forums.novell.com)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://forums.novell.com/faq.php
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://forums.novell.com/

Maybe you are looking for

  • View salary details in a single screen in Simulation

    Hi All, InPayroll Simulation is there any way to view the salry details in a sigle screen , insted of going to the drop down and view SD

  • I'm unknowingly getting logged off.

    Okay, I have read through pages of posts, I've even made the 443 change. So far I haven't read anything that has helped. While I am logged onto iChat, I randomly get disconnected but it doesn't show that I have been until I've sent a few messages. Th

  • Want report title on the same page above the column names

    Hi, I have given report title in the report header but for some reason it displays title on first page and data from next page on wards. I have also given a page break for the groups, is this the reason for getting  title on one page and dtata from n

  • How do I change frame sizes to user-defined frame sizes

    Hi, I hope someone can help me. I dont know how to change my project frame size to a user-defined frame size. ( like from 1920x1080p to 575x900p ) Ive found nowhere a answer to this question.

  • Lighthouse Approvals not timing out

    I'm running into a problem where my lighthouse approvals are not timing out. I've declared the timeout value and I'm only transitioning onto the success path if the return from the approvals.approved variable is set to true. My problem is that the ap