- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
6#
发表于 2012-2-17 18:40:28
"sqlplus select sysdate 是正常的"
就你截的图来看 当时的OS时间是15:36 而 sysdate 返回的是 01:36 , 何以得出select sysdate from dual 是正常的这个结论?
群中 沧海明月的 建议 mos 227334.1- My Alert.log has wrong time for some or all entry's.
- The time used for the message in the alert.log is the same as "sysdate" for the process that is writing to the alert.log. Alert.log messages are not written by "Oracle" they are written by the Oracle proces that is responsible for that error/message (including user sessions). Most messages in the Alert.log are written by background processes like Pmon, the used "sysdate" for the background processes is defined (on unix) by the TZ variable set when the database was started.
- If however a other process (like a user process/session encountering an error or doing a shutdown of the database) writes to the Alert.log and that user session uses a other TZ setting then the time for the error or parts of the shutdown sequence will be using a different time compared to the entry's written by the background processes (like log switches).
- Note that:
- a)if you do a "select to_char(sysdate,'DD-MON-YY HH24:MI:SS') from dual;" will give a correct result, even with a ORACLE_SID connection because here the environment is set by the executable that is spawning the process and that is sqlplus (or the listener if it's a listener connection), not the database kernel.
- You need to see what is actually "off", if this is the shutdown time for example or the time for a application error then simply use the correct TZ for the session (which can be batch job) that does the shut down. If entry's like logswitches are "off" from the expected time then you need to restart the database and listener with the required TZ setting.
- b) This has nothing to do with the database timezone, session time etc.
复制代码 与以上描述不符合的是 这里 sysdate返回的时间也是错误的
建议
1. 确认TZ 变量,从第一张截图来看 是 远程登录 , 所以你确认该变量 要在多台服务器上。 不要再截图了 !
2. 上传 该 oracle实例 最新的 vktm 后台进程的trace文件 及 alert.log 告警日志 |
|