Unix Technical Forum

getdate() timing problem

This is a discussion on getdate() timing problem within the Sybase forums, part of the Database Server Software category; --> Hi All, Hope anyone seen this before and could give me some hints or explanation. I encounter a strange ...


Go Back   Unix Technical Forum > Database Server Software > Sybase

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 03:50 PM
Joerg Gempe
 
Posts: n/a
Default getdate() timing problem

Hi All,
Hope anyone seen this before and could give me some hints or explanation.

I encounter a strange timing behaviour on a LINUX,ASE. It happens, that
the getdate() returns "wrong" values.
Not sure if it's really a wrong time value but the time jumps for and
back, back and for. At least it lokks like.


1> select @@version
2> go




---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Adaptive Server Enterprise/12.5.0.2/EBF 10753 ESD#1/P/Linux
Intel/Linux 2.4.7-10smp i686/rel12502/1867/32-bit/OPT/Sun Dec 15
07:34:10 2002


The simple "counter" I use is:

declare @count int
select @count=1
while (@count) < 10
BEGIN
select "count: ",@count," = ",convert(varchar(25), getdate(), 109)
select @count = @count+1
waitfor delay "00:00:01"
END

and the output like:

count: 1 = Aug 14 2003 5:24:12:576P
count: 2 = Aug 14 2003 5:24:13:563P
count: 3 = Aug 14 2003 5:24:17:456P
count: 4 = Aug 14 2003 5:24:15:563P
count: 5 = Aug 14 2003 5:24:16:566P
*count: 6 = Aug 14 2003 5:24:26:386P <==
^^^^
count: 7 = Aug 14 2003 5:24:27:720P
count: 8 = Aug 14 2003 5:24:29:053P
*count: 9 = Aug 14 2003 5:24:20:566P <==
^^^^

but getdate() from count 6 was called before getdate() of count 9. But
why is the result the opposite? Same for count 3.

If I do a similar time-loop with Perl
for(my $i = 1; $i <= 100; $i++) {
print localtime() ."\n";
sleep 1;
}

everything looks okay.
So I really have no idea how this could happen.

Thanx in advance
Joerg




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-08-2008, 03:50 PM
Joerg Gempe
 
Posts: n/a
Default Re: getdate() timing problem

Just a additional remark.

The timing problem is already visible in the SYBASE log at startup:
....
00:00000:00000:2003/08/14 15:21:44.71 kernel Checked out license ASE_S
00:00000:00000:2003/08/14 15:21:44.71 kernel Adaptive Server Enterpris
00:00000:00000:2003/08/14 15:21:36.43 kernel Using config area from pr
00:00000:00000:2003/08/14 15:21:36.48 kernel Internal run-time model s
00:00000:00000:2003/08/14 15:21:36.49 kernel Using 1024 file descripto
00:00000:00000:2003/08/14 15:21:44.88 kernel Adaptive Server Enterpris
00:00000:00000:2003/08/14 15:21:44.88 kernel Confidential property of
....
00:00000:00001:2003/08/14 15:21:45.84 kernel Component Integration Ser
00:00000:00001:2003/08/14 15:21:45.85 kernel Component Integration Ser
00:00000:00001:2003/08/14 15:21:45.85 server Opening Master Database .
00:00000:00001:2003/08/14 15:21:39.40 server Loading SQL Server's defa
00:00000:00001:2003/08/14 15:21:39.41 server Loaded default Unilib con
00:00000:00001:2003/08/14 15:21:39.42 server Recovering database 'mast
00:00000:00001:2003/08/14 15:21:39.44 server Redo pass of recovery has
00:00000:00001:2003/08/14 15:21:39.50 server Checking external objects
00:00000:00001:2003/08/14 15:21:39.52 server Database 'master' is now
00:00000:00001:2003/08/14 15:21:37.55 server The transaction log in th
....


Thanx in advance
Joerg

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-08-2008, 03:50 PM
Anthony Mandic
 
Posts: n/a
Default Re: getdate() timing problem

Joerg Gempe wrote:

> I encounter a strange timing behaviour on a LINUX,ASE. It happens, that
> the getdate() returns "wrong" values.
> Not sure if it's really a wrong time value but the time jumps for and
> back, back and for. At least it lokks like.


ASE gets its date from the system. So I would suggest directing
your efforts there. Check patches etc. or ask on the ASE Linux
mailing list or Linux newsgroup(s).

-am © 2003
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-08-2008, 03:51 PM
Pablo Sanchez
 
Posts: n/a
Default Re: getdate() timing problem

Joerg Gempe <j.gempe@epages.de> wrote in
news:bhiksp$3ug$1@branwen.iks-jena.de:

> Any other hints?


Unfortunately as another poster has stated, this is not an ASE issue
but an O/S issue.
--
Pablo Sanchez, Blueoak Database Engineering
http://www.blueoakdb.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:36 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com