Sysdate gives incorrect value

Hello experts,
Our company uses Oracle 10g DB and we are using Stored Procedures to fetch employees data from various tables. We fetch only fresh data depending on the date when it is retrived. Hence the result of the query depends on Sysdate value. The databse has two instances and all are synchronised to same local time.
Recently we noticed that sometimes we get stale data which can only happen when sysdate value is not ccorrect. Can anyone suggest under what circumstances Oracle might return wrong value of sysdate?
Thanks in advance.........

Thanks evryone for your suggestions. But i have tried "Select Sysdate from Dual". It always gives me correct date. But the problem is very sporadic. Most of the times, the stored procedure returns correct value but occasionally it retrives stale data.
Through java logs(we invoke SP from java code), we could find out that the data returned was stale. This brought us to the conclusion that sysdate being used is incorrect sometimes.
We asked DBA team who confirmed that All Instances of DB are synched up and have same Sysdate.
Can you please suggest some way to trace the actual query being executed to fetch the result. This would unveil the actual problem ( which we believe is the incorrect sysdate value ) . On being asked, DBA suggested that such tracing cannot be done as it would impact performance of all other systems using same DB.
Can you please help on this?

Similar Messages

  • Multitouch.maxTouchPoints giving incorrect values for Google Nexus S

    Just testing out the Adobe multitouch example application (http://www.adobe.com/devnet/flash/articles/multitouch_gestures.htm_phases-16569.html) and have discovered that Multitouch.maxTouchPoints is giving incorrect values (2) for my Google Nexus S (5+).
    If any devs are listening, can you give me more information? Should I report a bug?

    The runtime team is aware of this issue.  I believe it may return 2 for many if not all devices.

  • Bug-fix needs your vote: queries w/ joins against SQLite return incorrect values because Adobe treats PK col as alias for rowid when it should not

    For someone new to Adobe the forums and products can be bewildering. I've been advised to repost something I posted in Flash Data Integration in this forum.
    Here is the link to the post I put there:
    http://forums.adobe.com/message/2363777#2363777
    I have reported this bug: http://bugs.adobe.com/jira/browse/FB-23750
    I gather bugs get fixed if people vote for them to be fixed. Please vote for it to be fixed. It is serious, and you might not even realize you're suffering from it because the incorrect values returned by the query will seem perfectly plausible.
    If the link above doesn't work, here it is again:
    When I execute the following query in Flex and/or Lita:
    select wrdid, uspelling from WRD WHERE uspelling = 'wingeard'
    the results are:
    uspelling...wrdid
    wingeard   3137
    Look at what comes back when I execute this query using .NET provider by  Robert Simpson for SQLite and SQLite Manager by Mrinal Kant:
    SELECT     rowid, wrdid, uspelling
    FROM         WRD
    WHERE     (uspelling = 'wingeard')
    rowid.......wrdid...........uspelling
    3137........3042............wingeard
    No wonder none of my queries with joins is working correctly in Flex.
    wrdid is defined as "int" not INTEGER.
    http://www.sqlite.org/lang_createtable.html (see INTEGER PRIMARY KEY section):
    "The special behavior of INTEGER PRIMARY KEY is only available if the type name is exactly "INTEGER" (in any mixture of upper and lower case.)  Other integer type names like "INT" or "BIGINT" or "SHORT INTEGER" or "UNSIGNED INTEGER" causes the primary key column to behave as an ordinary table column with integer affinity and a unique index, not as an alias for the rowid."  [emphasis added]
    Now, I happen to think the SQLite developers made a mistake here in failing to follow standards, preferring not to break legacy code. They'd rather break current code instead???  I would not characterize this as a "corner case" and the bug-at-hand is de facto evidence of that.

    Did you try running the queries I posted? What were your results with those?
    What I am seeing is that when I use "int PRIMARY KEY" in a CREATE TABLE statement, that column becomes the special "rowid" column. I believe this is also what you are seeing.
    However, what confuses me is how you're getting a table with three columns "rowid", "id", and "name" in the first place. When I run this SQL...
    CREATE TABLE test
    id int PRIMARY KEY,
    name String
    ...I get a table with two columns: a normal column named "name", and a special primary key column named "id", which for this table is identical to the column represented by the rowid identifier.
    However, if I understand correctly, your table has three columns, "id", "name", and the special primary key column (i.e. "rowid"). Is that right? Can you give me the SQL that was used to create the table, or tell me how the table was created (e.g. if you used a tool like Lita) so I can try to re-create your exact situation? That would really be very very helpful -- it was the only detail that was missing in your last post, so I had to guess on that one detail.
    I tried something else to re-create your situation. I ran the following statement:
    CREATE TABLE test
    id int
    name String
    That gave me a table with two real columns plus the rowid column. Then I ran the three insert statements on that table, and when I ran the select statement I got the expected result:
    id     name
    1     one
    2     two
    7     seven
    Again, I'm guessing that your table was created differently than my test table, and that's the explanation for the difference.
    Some other possibilities to consider:
    The screen shot doesn't show a SQLResult object, so it seems that you're using some wrapper library or code to execute the query, or at least that you've copied the SQLResult.data Array to another variable named results. Although it seems less likely to me, it's possible that somewhere in that code something is getting scrambled. (But I'd rather rule out AIR as the underlying cause first before attempting to explore those paths.)
    As a side note, if you really want the database to have three columns (the special rowid column and your two columns id and name), and you don't want id to be the special rowid column, then it sounds to me like you don't actually want to define id as the primary key. If you just want the id column to have a constraint that prevents duplicate values, you can define it as a UNIQUE column:
    CREATE TABLE test
    id int UNIQUE,
    name String
    That gives you the same database-enforced constraint of not allowing duplicate values, but it tells the database explicitly that id isn't the same thing as the rowid primary key. (You can still join another table to the id column even if it's not defined as the primary key.)
    P.S. I'm sure you don't mean it this way, but using gigantic red text comes across like shouting -- it's very "loud". I'm trying my best to understand the issue you're having and help you resolve it, and using multiple colors and font sizes doesn't really make your post any more or less clear. Just because I ask you questions, or say that I'm seeing different results than you, doesn't mean I don't believe that you're seeing the results you're seeing. I've definitely seen strange variations and cases where something happens on my computer but others can't duplicate it on their computers -- so I believe that you are getting the results you're getting. I'm just trying to figure out how to make it so that I can also get those results, so that I can pass that on to the engineers who are in a position to make changes.

  • How to fix 'Unexpected error: Incorrect value: Location URL' in WSDL

    Hi All,
    Using SOAMANAGER  transaction, I created a service ECC_CUSTOMERQUOTEERPCRTRC and its binding 'ECC_CUSTOMERQUOTEERPCRTRC_binding' using the Create Service option under the tab Configurations and using the web service definition 'ECC_CUSTOMERQUOTEERPCRTRC'.  When I click on the link "Open WSDL document for selected binding" under the tab 'Overview', I get the following XML code in the popup window for the WSDL.
    - <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    - <soap:Body>
    - <soap:Fault>
      <faultcode>soap:Server</faultcode>
      <faultstring>Unexpected error: Incorrect value: Location URL for subject IF {http</faultstring>
    - <detail xmlns:slibfault="http://xml.sap.com/2005/11/esi/slib/fault/">
      <slibfault:timestamp>Wed, 17 Nov 2010 22:29:02 GMT</slibfault:timestamp>
    - <slibfault:exception>
      <slibfault:text>Incorrect value: Location URL for subject IF {http://sap.com/xi/APPL/Global2}:CustomerQuoteERPCreateRequestConfirmation_In not found</slibfault:text>
      <slibfault:position program="CL_SIDL_SUBJECT_ADAPTER=======CP" include="CL_SIDL_SUBJECT_ADAPTER=======CM006" line="47" />
      </slibfault:exception>
      </detail>
      </soap:Fault>
      </soap:Body>
      </soap:Envelope>
    The XML code for nthe WSDL displays an error 'Unexpected error: Incorrect value: Location URL for subject IF '. It looks like the code could find the required URL. Please let me know how to fix this error.
    Thanks in advance.
    --R D

    Hello.
    In SOAMANAGER delete your "unexpected" service (endpoint).
    Then create it again.
    If same error will occurs - try to delete all definitions of this service (include sicf-transaction) and then create it completely again.
    Hope it helps.

  • Java returning incorrect values for width and height of a Tiff image

    I have some TIFF images (sorry, I cannot post them b/c of there confidential nature) that are returning the incorrect values for the width and height. I am using Image.getWidth(null) and have tried the relevant methods from BufferedImage. When I open the same files in external viewers (Irfanview, MS Office Document Imaging) they look fine and report the "correct" dimensions. When I re-save the files, my code works fine. Obviously, there is something wrong with the files, but why would the Java code fail and not the external viewers? Is there some way I can detect file problems?
    Here is the code, the relevant section is in the print() routine.
    * ImagePrinter.java
    * Created on Feb 27, 2008
    * Created by tso1207
    import java.awt.Graphics2D;
    import java.awt.Image;
    import java.awt.print.PageFormat;
    import java.awt.print.PrinterException;
    import java.io.File;
    import java.io.IOException;
    import java.util.Iterator;
    import javax.imageio.ImageIO;
    import javax.imageio.ImageReader;
    import javax.imageio.stream.FileImageInputStream;
    import javax.imageio.stream.ImageInputStream;
    import com.shelter.io.FileTypeIdentifier;
    public class ImagePrinter extends FilePrintable
       private final ImageReader _reader;
       private final int _pageCount;
       private final boolean _isTiff;
       //for speed we will hold current page info in memory
       private Image _image = null;
       private int _imgWidth = 0;
       private int _imgHeight = 0;
       private int _currentPage = -1;
       public ImagePrinter(File imageFile) throws IOException
          super(imageFile);
          ImageInputStream fis = new FileImageInputStream(getFile());
          Iterator readerIter = ImageIO.getImageReaders(fis);
          ImageReader reader = null;
          while (readerIter.hasNext())
             reader = (ImageReader) readerIter.next();
          reader.setInput(fis);
          _reader = reader;
          int pageCount = 1;
          String mimeType = FileTypeIdentifier.getMimeType(imageFile, true);
          if (mimeType.equalsIgnoreCase("image/tiff"))
             _isTiff = true;
             pageCount = reader.getNumImages(true);
          else
             _isTiff = false;
          _pageCount = pageCount;
       public int print(java.awt.Graphics g, java.awt.print.PageFormat pf, int pageIndex)
          throws java.awt.print.PrinterException
          int drawX = 0, drawY = 0;
          double scaleRatio = 1;
          if (getCurrentPage() != (pageIndex - getPageOffset()))
             try
                setCurrentPage(pageIndex - getPageOffset());
                setImage(_reader.read(getCurrentPage()));
                setImgWidth(getImage().getWidth(null));
                setImgHeight(getImage().getHeight(null));
             catch (IndexOutOfBoundsException e)
                return NO_SUCH_PAGE;
             catch (IOException e)
                throw new PrinterException(e.getLocalizedMessage());
             if (!_isTiff && getImgWidth() > getImgHeight())
                pf.setOrientation(PageFormat.LANDSCAPE);
             else
                pf.setOrientation(PageFormat.PORTRAIT);
          Graphics2D g2 = (Graphics2D) g;
          g2.translate(pf.getImageableX(), pf.getImageableY());
          g2.setClip(0, 0, (int) pf.getImageableWidth(), (int) pf.getImageableHeight());
          scaleRatio =
             (double) ((getImgWidth() > getImgHeight())
                ? (pf.getImageableWidth() / getImgWidth())
                : (pf.getImageableHeight() / getImgHeight()));
          //check the scale ratio to make sure that we will not write something off the page
          if ((getImgWidth() * scaleRatio) > pf.getImageableWidth())
             scaleRatio = (pf.getImageableWidth() / getImgWidth());
          else if ((getImgHeight() * scaleRatio) > pf.getImageableHeight())
             scaleRatio = (pf.getImageableHeight() / getImgHeight());
          int drawWidth = getImgWidth();
          int drawHeight = getImgHeight();
          //center image
          if (scaleRatio < 1)
             drawX = (int) ((pf.getImageableWidth() - (getImgWidth() * scaleRatio)) / 2);
             drawY = (int) ((pf.getImageableHeight() - (getImgHeight() * scaleRatio)) / 2);
             drawWidth = (int) (getImgWidth() * scaleRatio);
             drawHeight = (int) (getImgHeight() * scaleRatio);
          else
             drawX = (int) (pf.getImageableWidth() - getImgWidth()) / 2;
             drawY = (int) (pf.getImageableHeight() - getImgHeight()) / 2;
          g2.drawImage(getImage(), drawX, drawY, drawWidth, drawHeight, null);
          g2.dispose();
          return PAGE_EXISTS;
        * <br><br>
        * Created By: TSO1207 - John Loyd
        * @since version XXX
        * @return
       public int getPageCount()
          return _pageCount;
       public void destroy()
          setImage(null);
          try
             _reader.reset();
             _reader.dispose();
          catch (Exception e)
          System.gc();
        * <br><br>
        * Created By: TSO1207 - John Loyd
        * @since Mar 25, 2008
        * @return
       public Image getImage()
          return _image;
        * <br><br>
        * Created By: TSO1207 - John Loyd
        * @since Mar 25, 2008
        * @return
       public int getImgHeight()
          return _imgHeight;
        * <br><br>
        * Created By: TSO1207 - John Loyd
        * @since Mar 25, 2008
        * @return
       public int getImgWidth()
          return _imgWidth;
        * <br><br>
        * Created By: TSO1207 - John Loyd
        * @since Mar 25, 2008
        * @param image
       public void setImage(Image image)
          _image = image;
        * <br><br>
        * Created By: TSO1207 - John Loyd
        * @since Mar 25, 2008
        * @param i
       public void setImgHeight(int i)
          _imgHeight = i;
        * <br><br>
        * Created By: TSO1207 - John Loyd
        * @since Mar 25, 2008
        * @param i
       public void setImgWidth(int i)
          _imgWidth = i;
        * <br><br>
        * Created By: TSO1207 - John Loyd
        * @since Mar 25, 2008
        * @return
       public int getCurrentPage()
          return _currentPage;
        * <br><br>
        * Created By: TSO1207 - John Loyd
        * @since Mar 25, 2008
        * @param i
       public void setCurrentPage(int i)
          _currentPage = i;
    }Edited by: jloyd01 on Jul 3, 2008 8:26 AM

    Figured it out. The files have a different vertical and horizontal resolutions. In this case the horizontal resolution is 200 DPI and the vertical is 100 DPI. The imgage width and height values are based on those resolution values. I wrote a section of code to take care of the problem (at least for TIFF 6.0)
       private void setPageSize(int pageNum) throws IOException
          IIOMetadata imageMetadata = _reader.getImageMetadata(pageNum);
          //Get the IFD (Image File Directory) which is the root of all the tags
          //for this image. From here we can get all the tags in the image.
          TIFFDirectory ifd = TIFFDirectory.createFromMetadata(imageMetadata);
          double xPixles = ifd.getTIFFField(256).getAsDouble(0);
          double yPixles = ifd.getTIFFField(257).getAsDouble(0);
          double xRes = ifd.getTIFFField(282).getAsDouble(0);
          double yres = ifd.getTIFFField(283).getAsDouble(0);
          int resUnits = ifd.getTIFFField(296).getAsInt(0);
          double imageWidth = xPixles / xRes;
          double imageHeight = yPixles / yres;
          //if units are in CM convert ot inches
          if (resUnits == 3)
             imageWidth = imageWidth * 0.3937;
             imageHeight = imageHeight * 0.3937;
          //convert to pixles in 72 DPI
          imageWidth = imageWidth * 72;
          imageHeight = imageHeight * 72;
          setImgWidth((int) Math.round(imageWidth));
          setImgHeight((int) Math.round(imageHeight));
          setImgAspectRatio(imageWidth / imageHeight);
       }

  • In  po i am unable 2 give frieght value 0.525.

    In my po i am unable 2 give frieght value 0.525. a error msg coming that input format----
    not possible. its taking only 0.52.    My requirement is 0.525.
    Thanku
    Shakir

    Hi,
    The decimal format of your currency must be set to two digit for which it is not allowing more than two .Check this in CUNI.If it is already set to two and this is in production client it is not advisable to change the settings now. Better use a condition type having the value in percentge format which will allow three decimal places.
    Dhruba

  • VersionMajor has incorrect value

    Recently we have migrated from SAP 4. 7 to ECC6 , After migration the  ABAP proxy interfaces are not working we get an error messages
    "XML tag Main/@versionMajor has incorrect value 002; expected value is 003"
    Any idea where to modify version major?

    Hi,
    refer this link.
    Re: Parser - "Unexpected value" error
    Regards,
    Sharanya.

  • Error "XML tag Main/@versionMinor has incorrect value 001; expected value."

    I'm going to describe our scenario.
    We have created an Abap proxy in a BW system to run a XI interface. The abap proxy in BW is connected to the IE of a XI 3.0 system. That scenario runs without problems with BW 3.5 (basis 6.40). Now, we are migrating the release of BW to 7.30. we have created the Abap proxy in the migrated BW system but when we run the interface the next message is returned:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Integration Server
      -->
    - <SAP:Error SOAP:mustUnderstand="1" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
      <SAP:Category>XIProtocol</SAP:Category>
      <SAP:Code area="PARSER">UNEXPECTED_VALUE</SAP:Code>
      <SAP:P1>Main/@versionMinor</SAP:P1>
      <SAP:P2>001</SAP:P2>
      <SAP:P3>000</SAP:P3>
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:Stack>XML tag Main/@versionMinor has the incorrect value 001. Value 000 expected</SAP:Stack>
      <SAP:Retry>N</SAP:Retry>
      </SAP:Error>
    does anyone know what the problem is? is there a version conflict between BW 7.3 and XI 3.0?
    Thanks very much

    Hi,
    I'm not an expert, but it might be that you would also need to update the XI content to match the new release and then regenerate the proxy.
    It does indeed seem to be a difference in the version of the proxies between BW 3.5 and BW 7.3.
    Regards,
    Horia

  • XML tag Main/@versionMajor has incorrect value 002; expected value is 003

    Dear experts!
    I have created a file to proxy scenario. When sent out of XI the following message occurs:
    O, btw, I have tried both XI 2.0 and 3.0 in the comm. channel and a fault message is present.
    What's the matter???
    - <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIProtocol</SAP:Category>
      <SAP:Code area="PARSER">UNEXPECTED_VALUE</SAP:Code>
      <SAP:P1>Main/@versionMajor</SAP:P1>
      <SAP:P2>002</SAP:P2>
      <SAP:P3>003</SAP:P3>
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>XML tag Main/@versionMajor has incorrect value 002; expected value is 003</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Thanks for your suggestions!
    <i>Will reward points if answers are helpful</i>

    Hi.
    Can you copy past your xml input payload...
    Check out this thread...he has same issue...n its resolved..
    XI 3.0 and external Java client/web service
    Use the url:
    http://hostname:port/XISOAPAdapter/MessageServlet?version=3.0&channel=:SOAPRequest:SOAPIn
    Nilesh
    Message was edited by:
            Nilesh Kshirsagar

  • How to give level value 'unknown'

    Hi there,
    When creating a dimension with OWB, we get for every level also a row with empty values voor de levels underneath.
    E.g.: Dimension customer: Level Total, level customer group, level customer.
    I get:
    =====================================
    Level_total customer_group customer
    Total NULL NULL
    Total Group1 NULL
    Total Group2 NULL
    =====================================
    This is generated by OWB automatically.
    Anybody any idea how to fill in 'Unknown' instead having it blank? I've looked if i can fill somewhere a property, but could not find.
    Any help is appreciated.
    Thanks
    Sandra

    hii vishal,
    this selct option i already taking from database.
    only i want to give constant value to this field ..
    u mean to write selection-screen  select-option in coding part of query/infoset?
    for this field?
    n give const value in this code/.?

  • CALCULATE_TAX_ITEM gives wrong values for Scess and HScess in PO Print

    Dear Friends,
    I am working with PO Print in smartforms hare the Fm CALCULATE_TAX_ITEM is gives wrong values for Scess and HEcess if I put the Gate pass (Basic Excise Duty) Manually.
    And one more Issue is as if I check any line item condition taxes than imediatly when I see the print the all line items Scee and HEcess displays same which I have saw.
    If there is a single line item in PO than there is no issue any way.
    kindly suggest to resolve the issue.
    Regards,
    D Tarun Kumar

    Hi,
    I had the same issue, that taxes on invoice tab of PO was not printed correctly on PO form by calling CALCULATE_TAX_ITEM.
    If you want to have the same tax value as komp-mwsbp, that use following form routine call before FB CALCULATE_TAX_ITEM.
    perform j_1b_save_tax_fields(saplmepo) using ekko ekpo lfa1.
    This is used in transaction me23n also.
    Kind regards,
    Tülay

  • Different measures use same source column but gives different values in SSAS project

    I've inherited a SSAS project. I'm currentlig gaining knowledge, but do not understand this: There are 4 measures that get data from same source table and column. Example measures:
    [Started]
    [Processing]
    [Processed]
    [Finished]
    All of them gets data from a table (view), and a column "Event_count" with just value 0 in each row. Usage of the measure is "Count of non-empty values".
    Correctly all of these measures gives different values, but I don't understand how since they all go against the same source column. I thougt maybe they were defined in Calculated measures, but nothing there. Where or what else could be affecting this behavior?
    Bonus information (problem): One of the measures is returning blank/empty, which is why started with this research at all.
    Help anyone?
    regards .r

    Hi ,
    I would ask if all the measures are under the same measure group ? It is important to know, since in the dimension usage we are creating relationships between dimensions and measure
    groups .
    Did you try the delete all the calculation's code and leave only the " CALCULATE ; " part ? Do the values change after deploying the slim script ?
    Are all properties the same ? defaults & caching ?
    Regards, David .

  • Is there any function module to give absolute value of a number?

    Hi,
    Is there any function module to give absolute value of a number?
    That has similar functionality to the Built in Function ABS.
    Please let me know.
    Thanks,
    cs

    hi,
    why are you looking for any function module.
    You can easily get it by mathematical function ABS .
    Syntax : <Turget Variable> = ABS <Source Variable>
    \[removed by moderator\]
    Anirban Bhattacharjee
    Edited by: Jan Stallkamp on Jun 27, 2008 4:19 PM

  • 'Incorrect value type for array element in index N'

    Please help.  Preflight is flagging multiple 'Incorrect value type for array element in index N" > Required key /F is missing >Array element at index 0 is of wrong type' messages for pages throughout my text document with embedded navigation and annotations.What does it mean? Is there anything I can do?
    The origins of the file are from a selection of emails taken from Mail and gmail, and letters probably written on pc (Office) and converted to pdf...
    I'm on Mac Mavericks.
    Thanks for reading.

    What problem are you trying to solve with preflighting? What are you checking for?

  • Incorrect value: Namespace prefix q1 of QName q1:RequestArray is undeclared

    Can someone please help me understand this error message?
    Incorrect value: Namespace prefix q1 of QName q1:RequestArray is undeclared
    Exception of class CX_SLIB
    I get this error when generating the Proxy Class.
    The URL of the Web Service WSDL is:
    https://addresscheck.melissadata.net/v2/SOAP/Service.svc?wsdl
    I found an OSS note which looked promising, but even after implementing the note I still get the error.
    OSS Note # 0001229799  -  "Workaround for kernel bug with xml namespace context"
    Thank you very much !
    -Chris

    Hope you would get everything from this link
    http://www.saphelp.com/ERP/archive/index.php?f-118.html
    regards
    nag

Maybe you are looking for