免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2205 | 回复: 2
打印 上一主题 下一主题

sybase 时间和系统不同步 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-04-14 06:49 |只看该作者 |倒序浏览
操作系统时间因为夏时制快了一个小时,有些sybase服务器内部时间跟着变了,但有些sybase服务器时间没变。请问怎么回事?如何能把sybase时间改过来?不用重启sybase能不能改?谢谢。

俺的配置:

系统:Debian
Sybase: 11.9.2

论坛徽章:
0
2 [报告]
发表于 2005-04-14 10:23 |只看该作者

sybase 时间和系统不同步

sybase时间取的就是系统时间,绑定的

论坛徽章:
0
3 [报告]
发表于 2005-04-15 06:46 |只看该作者

sybase 时间和系统不同步

问题解决,多谢hobbylu提醒。

原来启动sybase的script里的时区设置不一样,时间变了的是和系统时区一样。时间没变的时区设的是GMT。

另外,俺在网上找到一段很精辟的关于sybase时间,系统时间和夏时制关系的论述。给大家转过来看看:

IMHO, ideally ASE is set up so it is not going to be affected by daylight savings
time - I think it is best to run ASE on GMT / Universal standard time and let clients
(which could be in multiple time zones) handle the conversion to the local time zone
plus any adjustments due to daylight savings time. On UNIX systems, this is
accomplished by either running the enire box on GMT, or by setting the TZ (time zone)
enironment variable for the "sybase" user (the user who boots the ASE).

If ASE is run so that the OS does adjust for daylight savings time under it,
a) The datetime datatype does not include a timezone component, so if 2AM happens
twice in one day, you won't be able to tell if a record was from the first 2am or
the second 2am unless you add some additional indicator to the table.
b) The getdate() function works by making a call to the OS every time it is called,
so it will immediately reflect the change in time
c) ASE also maintains an internal clock which it updates as it receives ticks from
the OS. ASE makes a call to the OS to get the current time once a minute and
checks for a difference between the internal and OS clock and then can slow down
or speed up the internal clock somewhat in an attempt to resynch them - but the
internal clock never will run in reverse, at best it will increment very very
slowly. This internal clock is used to generate the "crdate" values in sysobjects,
and populates the datetime stamp on begintran and endtran log records - which
could effect the "load tran with until_time" command.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP