Oracle RAC cluster local time and remote time inconsistency?

Source: Internet
Author: User
Tags local time

Cause:

The inconsistency of data events in the credit database resulted in the confusion of data (RAC cluster), inconsistent Plsql query time and database time, which seriously affected the business. Because I just met once, and with the MySQL time zone solution experience, the feeling should be able to resolve quickly, however, not as simple as I think. The following is the whole story, experience sharing. (with VSP, so only)


1. Check the local time of the two servers, and the time zone.

650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M00/05/F4/wKiom1mu3hWz5dy-AAO7cm2NUp0479.png-wh_500x0-wm_ 3-wmp_4-s_3407049986.png "title=" 2.png "alt=" Wkiom1mu3hwz5dy-aao7cm2nup0479.png-wh_50 "/>

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M00/A4/A4/wKioL1mu3PqxmoPwAAIOrHhFk9M872.png-wh_500x0-wm_ 3-wmp_4-s_2713070834.png "title=" 1.png "alt=" Wkiol1mu3pqxmopwaaiorhhfk9m872.png-wh_50 "/>

You can see that Asia/shanghai CST Beijing time East eight district. (GMT stands for Greenwich Mean Time)

2. Check local time with SYSDBA:

650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M02/A4/A5/wKioL1mu4TmStFH9AAXwZGuwLqE143.png-wh_500x0-wm_ 3-wmp_4-s_2149625486.png "title=" 3.png "alt=" Wkiol1mu4tmstfh9aaxwzguwlqe143.png-wh_50 "/>


650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M00/05/F4/wKiom1mu4ZOhxRcSAAXi94utqMs970.png-wh_500x0-wm_ 3-wmp_4-s_2256534758.png "title=" 4.png "alt=" Wkiom1mu4zohxrcsaaxi94utqms970.png-wh_50 "/>


Am means morning, PM means pm. There's nothing unusual about that. 2.1) Log in with other ordinary accounts

650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M02/A4/A5/wKioL1mu5ErwYlBeAAWolW9y4KM753.png-wh_500x0-wm_ 3-wmp_4-s_2300687486.png "style=" Float:none; "title=" 5.png "alt=" Wkiol1mu5erwylbeaawolw9y4km753.png-wh_50 "/>

650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M00/05/F4/wKiom1mu5GrjMCJQAAWJu--hurE006.png-wh_500x0-wm_ 3-wmp_4-s_2180793202.png "style=" Float:none; "title=" 6.png "alt=" Wkiom1mu5grjmcjqaawju--hure006.png-wh_50 "/>

2.2) Login to the general account with Plsql remote login to view

650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M00/05/F4/wKiom1mu5gnAIZTOAA06s9fhnn8566.png-wh_500x0-wm_ 3-wmp_4-s_1413124103.png "title=" 7.png "alt=" Wkiom1mu5gnaiztoaa06s9fhnn8566.png-wh_50 "/>

Notice the arrow: it becomes -8:00, and the time is 16 hours behind. GMT-8, but datatimezone no problem.

Tip: The values of sysdate and systimestamp are not affected by database parameter dbtimezone, and environment variables (such as TZ) in the operating system time zone affect their input. Because Sysdate and Systimestamp are actually calling the operating system the underlying interface directly returns the value. The setting of the operating system level TZ environment variable directly affects the values of sysdate and Systimestamp, and also affects the timestamp of database log writes.

The settings of dbtimezone affect the values of two data types in the database:

1) TimeStamp with time Zone

2) TimeStamp with Local time Zone.


3. Troubleshoot environment variable settings

Due to the same account, Plsql telnet-8:00, to see the other database is the utc:+8:00, local time is the

Therefore, it can only be checked from the database.

# srvctl getenv listener-l Listener-envs "TZ"

650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M02/05/F4/wKiom1mvBf-DU5dcAAzI2Qw531M349.png-wh_500x0-wm_ 3-wmp_4-s_4060388217.png "title=" 10.png "alt=" Wkiom1mvbf-du5dcaazi2qw531m349.png-wh_50 "/>

650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M00/A4/A5/wKioL1mvBhuygBIoAAaz1dzd9OM973.png-wh_500x0-wm_ 3-wmp_4-s_3989930230.png "title=" 11.png "alt=" Wkiol1mvbhuygbioaaaz1dzd9om973.png-wh_50 "/>

3.1) Database time zone:

650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M02/07/6A/wKiom1nJTinC2Q84AAI9yfZ4fME453.jpg-wh_500x0-wm_ 3-wmp_4-s_1034494443.jpg "title=" 11.jpg "alt=" Wkiom1njtinc2q84aai9yfz4fme453.jpg-wh_50 "/>

Also found no abnormalities.


Troubleshooting ideas:

No exceptions were found from the system time, database time, RAC Listener, environment variables, and most likely someone modified the parameters.


How to resolve:

Communicate with DBA, modify the grid environment variable time zone "Asia/shanghai", restart the database in batches, listen for recovery, solve the problem.

This article is from "Never give up!" Ningzhiyuan "blog, reprint please contact the author!

Oracle RAC cluster local time and remote time inconsistency?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.