In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Sometimes the system time may be set incorrectly because the installation database is not standardized enough, and we need to adjust the system time. But what is the impact of adjusting the system time on the database? Let's do some small experiments.
1. Test the table insert operation with a date field.
-- session 1
SQL > create table T1 (id int,dt date); Table created.SQL > insert into T1 values (1Magazine sysdate); 1 row created.SQL > select * from T1 ID DT- 1 09-DEC-2017 10:21:16--session 2 [root@roidb01 ~] # dateSat Dec 9 10:21:40 CST 2017 [root@roidb01 ~] # date-s 20:00:00Sat Dec 9 20:00:00 CST 2017 [root@roidb01 ~] # dateSat Dec 9 20:00:02 CST 2017 Mustang-return to session1SQL > insert into T1 values (1 language sysdate) 1 row created.SQL > select * from T1; ID DT- 1 09-DEC-2017 10:21:16 1 09-DEC-2017 20:00:09SQL > SQL > insert into T1 values (1 Magi Sysdate); 1 row created.SQL > select * from T1 ID DT- 1 09-DEC-2017 10:21:16 1 09-DEC-2017 20:00:09 1 09-DEC-2017 19:00:10
If the sysdate time is used in some table date fields, the time will insert data according to the operating system time, and the date will certainly change, which is likely to cause problems with the business logic, which needs to be noted.
two。 Test AWR report
-- modified the day before [root@roidb01 ~] # date-s 01:00:00Sat Dec 9 01:00:00 CST 2017 [root@roidb01 ~] # [root@roidb01 ~] # date-s "2017-12-08 11:00:00" Fri Dec 8 11:00:00 CST 2017 [root@roidb01 ~] # dateFri Dec 8 11:00:01 CST 2017--AWR reported exception SQL > @? / rdbms/admin/awrrpt.sqlCurrent Instance~ DB Id DB Name Inst Num Instance- 1489897299 ORCL 1 orclSpecify the Report Type~~~AWR reports can be generated in the following formats. Please enter thename of the format at the prompt. Default value is' html'.'html' HTML format (default) 'text' Text format'active-html' Includes Performance Hub active reportEnter value for report_type: Type Specified: htmlInstances in this Workload Repository schema~~~~ DB Id Inst Num DB Name Instance Host-- -- * 1489897299 1 ORCL orcl roidb01Using 1489897299 for database IdUsing 1 for instance numberSpecify the number of days of snapshots to choose from~~~Entering the number of days (n) will result in the most recent (n) days of snapshots being listed. Pressing withoutspecifying a number lists all completed snapshots.Enter value for num_days: 2Listing the last 2 days of Completed Snapshots SnapInstance DB Name Snap Id Snap Started Level-- -orcl ORCL 1 09 Dec 2017 10:14 1 2 09 Dec 2017 10:14 1 3 09 Dec 2017 10:14 14 09 Dec 2017 10:14 1 5 09 Dec 2017 19:00 1 6 09 Dec 2017 19:01 17 09 Dec 2017 01:02 1 8 09 Dec 2017 01:02 19 08 Dec 2017 11:00 1-becomes the previous day Time disorder 10 08 Dec 2017 11:00 1Specify the Begin and End Snapshot Ids~~Enter value for begin_snap:
It also shows that the modification time will have a certain impact on AWR, so try to adjust it later.
3. Impact on database cluster
For the Oracle RAC database, the time of each instance needs to be the same, and the inconsistent time will cause the node downmachine.
Summary: when installing the database, be sure to adjust the time and time zone of the database. This is also an item that must be checked. Install the database in accordance with the specifications to avoid unnecessary trouble. If there is any other influence, you can leave a message and communicate together.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.