-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WMS ID# 11781 New workshop for 23ai DBA essential series (#314)
* WMS ID# 11781 New workshop for 23ai DBA essential series Hi, WMS ID# 11781 This is a new workshop for DBA Essentials series, titled Monitor and tune Oracle Database 23ai using Oracle Enterprise Manager. Kindly approve. thanks, Suresh * Fixed image file name lower case issue Hi, I have fixed image file name lower case issue. WMS ID# 11781 New workshop for 23ai DBA essential series (PR #314) thanks. Suresh
- Loading branch information
Showing
60 changed files
with
1,107 additions
and
0 deletions.
There are no files selected for viewing
Binary file added
BIN
+586 KB
...e-db/improve-db-performance-using-sql-tuning-advisor/images/t1_s1_emcc_home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+256 KB
...db-performance-using-sql-tuning-advisor/images/t1_s2_emcc_targets_databases.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+288 KB
...ove-db-performance-using-sql-tuning-advisor/images/t1_s3_emcc_database_home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+322 KB
...rmance-using-sql-tuning-advisor/images/t2_s1_peformance_sql_sql-tuning-sets.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+171 KB
...improve-db-performance-using-sql-tuning-advisor/images/t2_s2_database-login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+295 KB
...e-db-performance-using-sql-tuning-advisor/images/t2_s3_sql-tuning-sets_home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+191 KB
...erformance-using-sql-tuning-advisor/images/t2_s4_create_tuning-sets_options.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+237 KB
...mance-using-sql-tuning-advisor/images/t2_s5_create_tuning-sets_load-methods.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+239 KB
...performance-using-sql-tuning-advisor/images/t2_s6_create_tuning-sets_review.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+316 KB
...erformance-using-sql-tuning-advisor/images/t2_s7_create_tuning-sets_refresh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+337 KB
...ce-using-sql-tuning-advisor/images/t3_s1_performance_sql_sql-tuning-advisor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+186 KB
...improve-db-performance-using-sql-tuning-advisor/images/t3_s2_database-login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+366 KB
...rmance-using-sql-tuning-advisor/images/t3_s3_schedule_tuning-advisor_filled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+304 KB
...nce-using-sql-tuning-advisor/images/t3_s4_schedule_tuning-advisor_executing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+522 KB
...ormance-using-sql-tuning-advisor/images/t3_s5_tuning-advisor_result-summary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+483 KB
...ormance-using-sql-tuning-advisor/images/t3_s6_tuning-advisor_result-details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+334 KB
...rmance-using-sql-tuning-advisor/images/t3_s7_tuning-advisor_recommendations.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+179 KB
...ng-sql-tuning-advisor/images/t3_s8_tuning-advisor_recommendations_implement.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+367 KB
...ance-using-sql-tuning-advisor/images/t3_s9_tuning-advisor_implement_confirm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
146 changes: 146 additions & 0 deletions
146
...nce-using-sql-tuning-advisor/improve-db-performance-using-sql-tuning-advisor.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
# Diagnose problems and improve performance using SQL Tuning Advisor | ||
|
||
## Introduction | ||
|
||
This lab shows the steps for diagnosing problems in Oracle Database 23ai and improving performance using the automatic SQL Tuning Advisor from Oracle Enterprise Manager Cloud Control. | ||
|
||
Estimated time: 45 minutes | ||
|
||
### Objectives | ||
|
||
- Login to Oracle Database storage administration | ||
- Configure SQL tuning sets | ||
- Configure SQL Tuning Advisor | ||
|
||
### Prerequisites | ||
|
||
This lab assumes you have: | ||
- An Oracle Cloud account | ||
- Installed Oracle Database and Oracle Enterprise Manager Cloud Control | ||
- Completed all previous labs successfully | ||
|
||
## Task 1: Login to Oracle Database Storage Administration | ||
|
||
1. On the Oracle Enterprise Manager Cloud Control home page, go to the **Targets** menu and select **Databases**. | ||
|
||
![emcc home](./images/t1_s1_emcc_home.png " ") | ||
|
||
2. The **Databases** page lists the Oracle Databases added to Oracle Enterprise Manager Cloud Control as managed targets. Select the database instance for which you want to view the details. In this lab, the `orcl.us.oracle.com_ORCLPDB`, a Pluggable Database instance, is selected. | ||
|
||
![emcc targets databases](./images/t1_s2_emcc_targets_databases.png " ") | ||
|
||
3. The database instance home page displays various details about the selected database. | ||
|
||
![emcc database home](./images/t1_s3_emcc_database_home.png " ") | ||
|
||
## Task 2: Configure SQL Tuning Sets | ||
|
||
1. From the **Performance** menu, go to the **SQL** option and select **SQL Tuning Sets**. | ||
|
||
![performance sql tuning sets ](./images/t2_s1_peformance_sql_sql-tuning-sets.png " ") | ||
|
||
2. Oracle Enterprise Manager Cloud Control redirects to the **Database Login** page. On the **Database Login** page, provide the Oracle Database login credentials and click **Login** to connect to the Oracle Database. | ||
> **Note:** Usually the `sys` user is used for login. | ||
![database login](./images/t2_s2_database-login.png " ") | ||
|
||
3. The existing SQL tuning sets are displayed. You can select any existing tuning set. For this lab, we will create a new tuning set called WSDemo. To create a new SQL tuning set, click **Create**. | ||
|
||
![create tuning sets home](./images/t2_s3_sql-tuning-sets_home.png " ") | ||
|
||
4. In the Create SQL Tuning Set wizard, in the Options page, provide a name and click **Next**. For this lab, we use the name WSDemo. | ||
|
||
![create tuning sets options](./images/t2_s4_create_tuning-sets_options.png " ") | ||
|
||
5. In the Create SQL Tuning Set wizard, in the Load Methods page, provide details of the load methods to collect and load SQL statements into the SQL tuning set, and click **Finish**. For this lab, select Incrementally capture active SQL statements over a period of time from the cursor cache option, set duration to 5 minutes, and Frequency to 2 seconds. | ||
|
||
![create tuning sets load methods](./images/t2_s5_create_tuning-sets_load-methods.png " ") | ||
|
||
6. In the Create SQL Tuning Set wizard, on the Review page, review the provided information and click **Submit**. | ||
|
||
A message confirming that the SQL tuning set `WSDEMO` has been created will be displayed along with the job number. | ||
|
||
![create tuning sets review](./images/t2_s6_create_tuning-sets_review.png " ") | ||
|
||
7. After the time duration we set elapses, click the Refresh button to refresh the page. An updated SQL count will be displayed. | ||
|
||
![create tuning sets refresh](./images/t2_s7_create_tuning-sets_refresh.png " ") | ||
|
||
|
||
## Task 3: Configure SQL Tuning Advisor | ||
|
||
1. From the **Performance** menu, go to the **SQL** option and select **SQL Tuning Advisor**. | ||
|
||
![performance sql tuning advisor](./images/t3_s1_performance_sql_sql-tuning-advisor.png " ") | ||
|
||
2. Oracle Enterprise Manager Cloud Control redirects you to the **Database Login** page if you are not already logged in. On the **Database Login** page, provide the Oracle Database login credentials and click **Login** to connect to the Oracle Database. | ||
> **Note:** Usually the `sys` user is used for login. | ||
![database login](./images/t3_s2_database-login.png " ") | ||
|
||
3. The Schedule SQL Tuning Advisor wizard appears. Specify the following information and click **Submit** to schedule a job and run the SQL Tuning Advisor. | ||
|
||
- **Name:** Leave the default value. | ||
- **Description:** Enter a brief note about the job. | ||
- **SQL Tuning Set:** Click the magnifier icon and select your SQL tuning set. For this lab, the `WSDEMO` created in the previous task is used. | ||
- **Total Time Limit (minutes):** `30` | ||
- **Scope of Analysis:** `Comprehensive` | ||
- **Time Limit per Statement (minutes):** `5` | ||
- **Schedule:** Time when this job must be run. Leave the default value. For this lab, select `Immediately`. | ||
|
||
![tuning advisor filled](./images/t3_s3_schedule_tuning-advisor_filled.png " ") | ||
|
||
4. The SQL Tuning Advisor starts tuning the SQL statements. A processing dialog box appears that displays the status of the tuning task. The SQL tuning set that you select runs the Advisor, which analyzes the individual SQL statements and displays the progress of the analysis. | ||
|
||
- After the SQL Tuning Advisor finishes the analysis of the SQL statements, the **Status** of the SQL Tuning Advisor task changes to `Completed`. | ||
- If the Advisor is unable to analyze all the SQL statements, the task is still complete after it reaches the time limit, however, the status of the task is interrupted. It displays the results of the SQL statements that the Advisor was able to analyze within the given time frame. | ||
- You can click **Interrupt** to stop the task. | ||
- Clicking **Cancel** or closing the page will not stop the task run by the Advisor. | ||
|
||
![tuning advisor execution](./images/t3_s4_schedule_tuning-advisor_executing.png " ") | ||
|
||
5. After the Status is complete, the results are displayed on the SQL Tuning Result Summary page. It displays a graphical summary of the Automatic SQL Tuning Advisor activity. | ||
|
||
- It displays the count of SQL statements the Advisor analyzed in the task. | ||
- It also displays the SQL Profile Potential DB Time Benefit chart. The benefit of the SQL profile recommendations in DB time (in seconds) is displayed in bar charts. The bar charts have before and after bars, which denote the actual DB time and improved DB time, respectively. | ||
- The SQL Examined Status pie chart displays the status of SQL statements the Advisor examined with findings, without findings, and skipped due to errors. You can click the legends of the pie chart to view the summary of the tuning recommendation for the SQL Statements for the selected type. Close the summary window. | ||
- The Breakdown By Finding Type bar chart displays the count of SQL statements on the basis of the SQL Profile, Index, Statistics, Restructure SQL, and Alternative Plan. Click the bar to view a summary of the tuning recommendations for the selected bar. Close the summary window. | ||
|
||
![tuning advisor result summary](./images/t3_s5_tuning-advisor_result-summary.png " ") | ||
|
||
6. Click **Show all results** on the previous screen to view the summary of the tuning recommendations for all the SQL statements analyzed. You can view the summary of the tuning recommendations the Advisor provides during the time frame you select. | ||
|
||
![tuning advisor result details](./images/t3_s6_tuning-advisor_result-details.png " ") | ||
|
||
7. Click **View Recommendations** on the previous screen to view the details of the recommendation provided. It displays an overview of the recommendations. The different types of recommendations are SQL Profile, Alternative Plans, Restructure SQL, Error, and Miscellaneous. The Select Recommendation table lists the following information about the type of recommendation you select: | ||
|
||
- **Findings:** The analysis of the recommendation. | ||
- **Recommendation:** The recommendation advised by the Advisor. | ||
- **Rationale:** The justification of the recommendation. | ||
- **Benefit (%):** The estimated performance benefit calculated in percentage. | ||
- **Other Statistics:** Click the icon to view the statistics for this plan. | ||
- **New Explain Plan:** Click the icon to view the steps of execution of the New Plan. | ||
- **Compare Explain Plan:** Click the icon to view the comparison between the Original Explain Plan and New Explain Plan. | ||
|
||
![tuning advisor recommendations](./images/t3_s7_tuning-advisor_recommendations.png " ") | ||
|
||
8. On the **Recommendations** page, select a recommendation and click **Implement**. For this lab, **SQL Profile** is selected. A confirmation message appears. Select `Yes` to begin with the implementation. | ||
|
||
> **Note:** The database advises that you can implement only one recommendation. Oracle recommends that you select the recommendation with the maximum benefit. | ||
![tuning advisor recommendations implement](./images/t3_s8_tuning-advisor_recommendations_implement.png " ") | ||
|
||
9. The Recommendations for the SQL ID you select appears, with the confirmation message that the recommended SQL Profile was created successfully. | ||
|
||
![tuning advisor implement confirm](./images/t3_s9_tuning-advisor_implement_confirm.png " ") | ||
|
||
|
||
|
||
***Congratulations!*** You have successfully complete the workshop on ***monitoring and tuning the Oracle Database***. | ||
|
||
|
||
## Acknowledgements | ||
|
||
- **Author:** Suresh Mohan, Database User Assistance Development Team | ||
- **Contributors:** Manisha Mati, Suresh Rajan, Manish Garodia | ||
- **Last Updated By/Date:** Suresh Mohan, October 2024 |
Binary file added
BIN
+109 KB
...23ai-ws9-em-monitor-tune-db/initialize-environment/images/db-service-status.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+69.5 KB
...3ai-ws9-em-monitor-tune-db/initialize-environment/images/db-service-status2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.16 MB
...s-23ai/23ai-ws9-em-monitor-tune-db/initialize-environment/images/em-landing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.08 MB
...ies-23ai/23ai-ws9-em-monitor-tune-db/initialize-environment/images/em-login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+45.9 KB
...23ai-ws9-em-monitor-tune-db/initialize-environment/images/em-service-status.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+80.8 KB
...s9-em-monitor-tune-db/initialize-environment/images/listener-service-status.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+67.8 KB
...ai-ws9-em-monitor-tune-db/initialize-environment/images/login-em-external-1.png
Oops, something went wrong.
Binary file added
BIN
+63.9 KB
...ai-ws9-em-monitor-tune-db/initialize-environment/images/login-em-external-2.png
Oops, something went wrong.
Binary file added
BIN
+127 KB
...ws9-em-monitor-tune-db/initialize-environment/images/named-creds-job-submit.jpg
Oops, something went wrong.
Binary file added
BIN
+106 KB
...-em-monitor-tune-db/initialize-environment/images/named-creds-job-succeeded.jpg
Oops, something went wrong.
Binary file added
BIN
+295 KB
...i/23ai-ws9-em-monitor-tune-db/initialize-environment/images/named-creds-job.jpg
Oops, something went wrong.
Binary file added
BIN
+189 KB
...-23ai/23ai-ws9-em-monitor-tune-db/initialize-environment/images/ssh-key-gen.png
Oops, something went wrong.
Binary file added
BIN
+25.7 KB
...es-23ai/23ai-ws9-em-monitor-tune-db/initialize-environment/images/submitted.jpg
Oops, something went wrong.
Binary file added
BIN
+43.1 KB
...3ai-ws9-em-monitor-tune-db/initialize-environment/images/update-ssh-creds-0.png
Oops, something went wrong.
Binary file added
BIN
+861 KB
...3ai-ws9-em-monitor-tune-db/initialize-environment/images/update-ssh-creds-1.png
Oops, something went wrong.
Binary file added
BIN
+637 KB
...3ai-ws9-em-monitor-tune-db/initialize-environment/images/update-ssh-creds-2.png
Oops, something went wrong.
Binary file added
BIN
+884 KB
...3ai-ws9-em-monitor-tune-db/initialize-environment/images/update-ssh-creds-3.png
Oops, something went wrong.
Binary file added
BIN
+779 KB
...3ai-ws9-em-monitor-tune-db/initialize-environment/images/update-ssh-creds-4.png
Oops, something went wrong.
Oops, something went wrong.