ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Problem with CURRENT_TIMESTAMP

Post new topic  Reply to topic
 Problem with CURRENT_TIMESTAMP « View previous topic :: View next topic » 
Author Message
hewingt
PostPosted: Tue Sep 14, 2004 10:47 pm    Post subject: Problem with CURRENT_TIMESTAMP Reply with quote

Newbie

Joined: 10 Sep 2004
Posts: 3
Location: London

I am inserting records into an Oracle database after processing in a database node where one of the expressions is CURRENT_TIMESTAMP but the time being evaluated is the current time or the current time + or - 1 minute. There appears to be no constancy as to what answer is given. Any ideas on how I could always get the current time accurately?

Thanks,

Toby Hewing
Back to top
View user's profile Send private message
PGoodhart
PostPosted: Wed Sep 15, 2004 6:09 am    Post subject: Reply with quote

Master

Joined: 17 Jun 2004
Posts: 278
Location: Harrisburg PA

Can you use the ORACLE database function for current timestamp rather then the MQ function CURRENT_TIMESTAMP? It will be more accurate when dealing with the database insert. Then you will have the actual insert time instead of a time that might be off for a bunch of different reasons.
Otherwise check your broker server time and your ORACLE Server time and see if they are different. (A minute off you should be able to tell, much less and you won't be able to without some sort of time sync tool.)
_________________
Patrick Goodhart
MQ Admin/Web Developer/Consultant
WebSphere Application Server Admin
Back to top
View user's profile Send private message
kirani
PostPosted: Wed Sep 15, 2004 3:19 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

WMQI returns you the same timestamp for each call to this function in the same node. So if you are calling this function in 5 different places in your compute node, they all will return you the same value.
As patrick said, use DB timestamp function.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
hewingt
PostPosted: Thu Sep 16, 2004 10:58 pm    Post subject: Reply with quote

Newbie

Joined: 10 Sep 2004
Posts: 3
Location: London

I'm feeding multiple messages so I should be getting individual timestamps. Below is a cut down version of the trace and you can clearly see the time being returned is in variance with the time of the trace.

2004-09-10 15:33:32.849740 evaluating 'CURRENT_TIMESTAMP' at (24, 33); result was 'TIMESTAMP '2004-09-10 15:34:32.815738''.
2004-09-10 15:33:46.684752 evaluating 'CURRENT_TIMESTAMP' at (24, 33); result was 'TIMESTAMP '2004-09-10 15:34:46.672149''.
2004-09-10 15:33:57.470308 evaluating 'CURRENT_TIMESTAMP' at (24, 33); result was 'TIMESTAMP '2004-09-10 15:34:57.458423''.
2004-09-10 15:34:09.999857 evaluating 'CURRENT_TIMESTAMP' at (24, 33); result was 'TIMESTAMP '2004-09-10 15:34:09.988102''.
2004-09-10 15:34:22.379984 evaluating 'CURRENT_TIMESTAMP' at (24, 33); result was 'TIMESTAMP '2004-09-10 15:34:22.367990''.
2004-09-10 15:34:35.079260 evaluating 'CURRENT_TIMESTAMP' at (24, 33); result was 'TIMESTAMP '2004-09-10 15:34:35.067466''.
2004-09-10 15:34:47.287612 evaluating 'CURRENT_TIMESTAMP' at (24, 33); result was 'TIMESTAMP '2004-09-10 15:34:47.275829''.
2004-09-10 15:35:09.475810 evaluating 'CURRENT_TIMESTAMP' at (24, 33); result was 'TIMESTAMP '2004-09-10 15:34:09.464028''.
2004-09-10 15:35:20.572640 evaluating 'CURRENT_TIMESTAMP' at (24, 33); result was 'TIMESTAMP '2004-09-10 15:34:20.560512''.
2004-09-10 15:35:40.284308 evaluating 'CURRENT_TIMESTAMP' at (24, 33); result was 'TIMESTAMP '2004-09-10 15:36:40.195831''.
2004-09-10 15:35:49.251528 evaluating 'CURRENT_TIMESTAMP' at (24, 33); result was 'TIMESTAMP '2004-09-10 15:36:49.243373''.

This is just out of interest now as I'm going to use the Database time as suggested.

Thanks.
Back to top
View user's profile Send private message
kirani
PostPosted: Fri Sep 17, 2004 8:38 am    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Quote:

2004-09-10 15:33:32.849740 evaluating 'CURRENT_TIMESTAMP' at (24, 33); result was 'TIMESTAMP '2004-09-10 15:34:32.815738''.


It's interesting to see the first timestamp is always greater than the second timestamp.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Problem with CURRENT_TIMESTAMP
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.