In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
DM has AWR reports similar to Oracle, and here we will show you how to generate database snapshots as well as AWR reports. This article demonstrates the environment: DM Database Server x64 V7.1.6.46-Build (2018.02.08-89107) ENT. Enabling DM snapshots requires calling the DBMS_WORKLOAD_REPOSITORY package (DBMS_WORKLOAD_REPOSITORY package is not supported in DM MPP environment)
1. Create the DBMS_WORKLOAD_REPOSITORY system package.
SQL > call SP_INIT_AWR_SYS (1); DMSQL executed successfullyused time: 647.666 (ms). Execute id is 254.
two。 Enable status detection.
SQL > SELECT SF_CHECK_AWR_SYS;LINEID SF_CHECK_AWR_SYS--1 1used time: 5.590 (ms). Execute id is 255.
3. The following statement sets the interval to 60 minutes, which can also be other values:
SQL > CALL DBMS_WORKLOAD_REPOSITORY.AWR_SET_INTERVAL (60); DMSQL executed successfullyused time: 18.797 (ms). Execute id is 256.
4. Create a snapshot manually:
SQL > call DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT (); DMSQL executed successfullyused time: 61.528 (ms). Execute id is 258.
Wait a few minutes and then execute again.
SQL > call DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT (); DMSQL executed successfullyused time: 49.152 (ms). Execute id is 259.
Here we can try it a few more times to create several different snapshots.
5. View the created snapshot information, including snapshot id:
SQL > SELECT * FROM SYS.WRM$_SNAPSHOT LINEID SNAP_ID DBID INSTANCE_NUMBER STARTUP_TIME BEGIN_INTERVAL_TIME END_INTERVAL_TIME SNAP_LEVEL-- -- 1 1 NULL 1 2020-02-04 18 NULL 2532.000000 NULL 2020-02-04 18 NULL 28 purl 35.586240 12 2 NULL 1 2020-02-04 18 purl 25 purl 32.000000 NULL 2020-02-04 18 purl 31purl 21.207610 1
If we want to know at this time, corresponding to the health of the database at each point in time, we can use the AWR_REPORT_HTML method in the DBMS_WORKLOAD_REPOSITORY package to generate AWR reports in HTML format.
6. Generate the content with html format of the AWR analysis report with snapshot's id in the range of 1-2.
SELECT * FROM TABLE (DBMS_WORKLOAD_REPOSITORY.AWR_REPORT_HTML (1m 2))
7. Generate AWR analysis reports with snapshot's id in the range of 1-2 into the awr1_2.html file in the / home/dmdba directory.
SQL > call sys.awr_report_html, DMSQL executed successfullyused time: 317.395 (ms). Execute id is 260.
The generated report format is as follows
According to the AWR report, friends who are familiar with Oracle can basically connect seamlessly to the DM database.
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.