当前位置:首页 > 生活百科

oracle数据文件的存放位置(oracle常用命令)

栏目:生活百科日期:2025-06-04浏览:0

前言:

?在生产环境中,当运行中的Oracle数据库出现性能问题的时候,DBA通常都需要我们生成Oracle数据库出现性能问题时间段的AWR或者ASH等报告来判断原因,所以维护人员学会收集AWR、ADDM、ASH报告是必须的。

环境:

?CentOS 7.5

?Docker 20.10.2

?Oracle_11g

AWR报告收集:

?AWR(Automatic Workload Repository)自动工作负载库是Oracle公司提供的一个工具。AWR来可以自动收集、处理、并保存性能统计结果,这种统计数据存放在内存中并随后存储在数据库中,这些数据既能在报告中显示也可以通过视图查询。可以协助我们找出Oracle的性能瓶颈。

?@?/rdbms/admin/awrrpt

&[root@localhost ~]# docker psCONTAINER ID   IMAGE                                      COMMAND                  CREATED        STATUS         PORTS                    NAMES3edfba76f476   registry.aliyuncs.com/helowin/oracle_11g   "/bin/sh -c '/home/o…"   6 months ago   Up 2 seconds   0.0.0.0:1521-&>1521/tcp   oracle_11g&[root@localhost ~]# docker exec -it oracle_11g /bin/bash&[oracle@3edfba76f476 /]$ su - root  //切换为root用户Password:      # 密码默认为 helowin&[oracle@3edfba76f476 /]$ su - oracle   //再切换oracle用户,并且以SYS登录数据库&[oracle@3edfba76f476 ~]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Fri Aug 20 16:13:26 2021Copyright (c) 1982, 2009, Oracle.  All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL&> @?/rdbms/admin/awrrpt     //执行这个SQL就可以开始AWR报告收集Current Instance~~~~~~~~~~~~~~~~   DB Id    DB Name      Inst Num Instance----------- ------------ -------- ------------ 1384114315 HELOWIN             1 helowinSpecify the Report Type~~~~~~~~~~~~~~~~~~~~~~~Would you like an HTML report, or a plain text report?Enter 'html' for an HTML report, or 'text' for plain textDefaults to 'html'Enter value for report_type:   //提示你输入生成报告类型,默认为HTML,回车即可Type Specified:  htmlInstances in this Workload Repository schema~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   DB Id     Inst Num DB Name      Instance     Host------------ -------- ------------ ------------ ------------  1384114315        1 ORCL         orcl         32e47e645a97  1384114315        1 ORCL         helowin      a444e690ce3e  1384114315        1 ORCL         orcl         a444e690ce3e  1384114315        1 ORCL         helowin      85e4a929d0f8* 1384114315        1 HELOWIN      helowin      3edfba76f476  1384114315        1 HELOWIN      helowin      85e4a929d0f8Using 1384114315 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 &<return&> withoutspecifying a number lists all completed snapshots.Enter value for num_days: 1     //输入快照查看的间隔,一般一天的就行,实际根据DBA的要求来做Listing the last day's Completed Snapshots                                                        SnapInstance     DB Name        Snap Id    Snap Started    Level------------ ------------ --------- ------------------ -----helowin      HELOWIN            253 21 Apr 2021 18:12      1                                254 21 Apr 2021 19:00      1                                255 21 Apr 2021 20:00      1Specify the Begin and End Snapshot Ids~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Enter value for begin_snap: 253      //首先输入开始的快照ID,此处为253Begin Snapshot Id specified: 253Enter value for end_snap: 255       //输入快照结束ID,可以根据要求的时间确定,此处为255End   Snapshot Id specified: 255Specify the Report Name~~~~~~~~~~~~~~~~~~~~~~~The default report file name is awrrpt_1_253_255.html.  To use this name,press &<return&> to continue, otherwise enter an alternative.Enter value for report_name:    //输入报告的名字,默认的就可以,例如:awrrpt_1_167_169.html. 实例1 快照167-169的AWR报告,此处回车就行,报告生成在当前目录下Using the report name awrrpt_1_253_255.html&<html&>&<head&>&<title&>AWR Report for DB: HELOWIN, Inst: helowin, Snaps: 253-255&</title&>&<style type="text/css"&>body.awr {font:bold 10pt Arial,Helvetica,Geneva,sans-serif;color:black; background:White;}pre.awr  {font:8pt Courier;color:black; background:White;}h1.awr   {font:bold 20pt Arial,Helvetica,Geneva,sans-serif;color:#336699;background-color:White;border-bottom:1px solid #cccc99;margin-top:0pt; margin-bottom:0pt;padding:0px 0px 0px 0px;}h3.awr   {font:bold 18pt Arial,Helvetica,Geneva,sans-serif;color:#336699;background-color:White;margin-top:4pt; margin-bottom:0pt;}h3.awr {font:bold 16pt Arial,Helvetica,Geneva,sans-serif;color:#336699;background-color:White;margin-top:4pt; margin-bottom:0pt;}li.awr {font: 8pt Arial,Helvetica,Geneva,sans-serif; color:black; background:White;}th.awrnobg {font:bold 8pt Arial,Helvetica,Geneva,sans-serif; color:black; background:White;padding-left:4px; padding-right:4px;padding-bottom:2px}th.awrbg {font:bold 8pt Arial,Helvetica,Geneva,sans-serif; color:White; background:#0066CC;padding-left:4px; padding-right:4px;padding-bottom:2px}td.awrnc {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:White;vertical-align:top;}td.awrc    {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:#FFFFCC; vertical-align:top;}td.awrnclb {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:White;vertical-align:top;border-left: thin solid black;}td.awrncbb {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:White;vertical-align:top;border-left: thin solid black;border-right: thin solid black;}......&<p /&>End of Report&</body&>&</html&>Report written to awrrpt_1_253_255.htmlSQL&> !pwd/home/oracle

1.1 查看oracle容器内生成的AWR报告

&[root@test ~]# docker psCONTAINER ID   IMAGE                                      COMMAND                  CREATED        STATUS       PORTS                      NAMES3edfba76f476   registry.aliyuncs.com/helowin/oracle_11g   "/bin/sh -c '/home/o…"   2 months ago   Up 3 hours   0.0.0.0:1521-&>1521/tcp     oracle_11g&[root@test ~]# docker exec -it oracle_11g bash&[oracle@3edfba76f476 /]$ su - rootPassword:  helowin&[root@3edfba76f476 ~]# su - oracle&[oracle@3edfba76f476 ~]$ ls /home/oracle/app  awrrpt_1_253_255.html

1.2 导出oracle容器内部的AWR报告至之宿主机

&—》docker cp 容器ID:容器内文件路径 ./(宿主机路径)

&[root@test ~]# docker cp 3edfba76f476:/home/oracle/awrrpt_1_253_255.html ./

其他(RAC):

?因为有的系统一般都是RAC,所以需要在各个节点下的AWR报告,如果你愿意登录各个节点,可以使用一下SQL

SQL&> @?/rdbms/admin/awrrpti.sql  //和上边的区别就在这于,输入报告类型后的部分Instances in this Workload Repository schema~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  DB Id    Inst Num DB Name     Instance    Host------------ -------- ------------ ------------ ------------  3704746844       2 HS08      HS082       hp102* 3704746844       1 HS08      HS081       hp101Enter value for dbid: 3704746844                      (会要求你输入数据库的DBID)Using 3704746844 for database IdEnter value for inst_num: 1                                (输入数据库实例NUM,一般就是2节点,所以一般就是输入1 或者2)剩下的部分没啥区别Using 1 for instance number

ADDM报告收集:

?ADDM(Automatic Database Diagnostic Monitor) 是植入Oracle数据库的一个自诊断引擎.ADDM 通过检查和分析AWR获取的数据来判断Oracle数据库中可能的问题.

?@?/rdbms/admin/addmrpt

...SQL&> @?/rdbms/admin/addmrpt     //执行这个SQL就可以开始AWR报告收集Current Instance~~~~~~~~~~~~~~~~   DB Id    DB Name      Inst Num Instance----------- ------------ -------- ------------ 1384114315 HELOWIN             1 helowinInstances in this Workload Repository schema~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   DB Id     Inst Num DB Name      Instance     Host------------ -------- ------------ ------------ ------------  1384114315        1 ORCL         orcl         32e47e645a97  1384114315        1 ORCL         helowin      a444e690ce3e  1384114315        1 ORCL         orcl         a444e690ce3e  1384114315        1 ORCL         helowin      85e4a929d0f8* 1384114315        1 HELOWIN      helowin      3edfba76f476  1384114315        1 HELOWIN      helowin      85e4a929d0f8Using 1384114315 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 &<return&> withoutspecifying a number lists all completed snapshots.Listing the last 3 days of Completed Snapshots                                                        SnapInstance     DB Name        Snap Id    Snap Started    Level------------ ------------ --------- ------------------ -----helowin      HELOWIN            253 21 Apr 2021 18:12      1                                254 21 Apr 2021 19:00      1                                255 21 Apr 2021 20:00      1                                256 21 Apr 2021 21:00      1Specify the Begin and End Snapshot Ids~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Enter value for begin_snap: 254Begin Snapshot Id specified: 254Enter value for end_snap: 256End   Snapshot Id specified: 256Specify the Report Name~~~~~~~~~~~~~~~~~~~~~~~The default report file name is addmrpt_1_254_256.txt.  To use this name,press &<return&> to continue, otherwise enter an alternative.Enter value for report_name:Using the report name addmrpt_1_254_256.txtRunning the ADDM analysis on the specified pair of snapshots ...Generating the ADDM report for this analysis ...          ADDM Report for Task 'TASK_295'          -------------------------------Analysis Period---------------AWR snapshot range from 254 to 256.Time period starts at 21-APR-21 07.00.07 PMTime period ends at 21-APR-21 09.00.21 PMAnalysis Target---------------Database 'HELOWIN' with DB ID 1384114315.Database version 11.2.0.1.0.ADDM performed an analysis of instance helowin, numbered 1 and hosted at3edfba76f476.Activity During the Analysis Period-----------------------------------Total database time was 263 seconds.The average number of active sessions was .04.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~There are no findings to report.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~          Additional Information          ----------------------Miscellaneous Information-------------------------There was no significant database activity to run the ADDM.End of ReportReport written to addmrpt_1_254_256.txt

2.1 查看oracle容器内生成的ADDM报告

&[root@test ~]# docker psCONTAINER ID   IMAGE                                      COMMAND                  CREATED        STATUS       PORTS                      NAMES3edfba76f476   registry.aliyuncs.com/helowin/oracle_11g   "/bin/sh -c '/home/o…"   2 months ago   Up 3 hours   0.0.0.0:1521-&>1521/tcp     oracle_11g&[root@test ~]# docker exec -it oracle_11g bash&[oracle@3edfba76f476 /]$ su - rootPassword:  helowin&[root@3edfba76f476 ~]# su - oracle&[oracle@3edfba76f476 ~]$ pwd/home/oracle&[oracle@3edfba76f476 ~]$ lsaddmrpt_1_254_256.txt  app  awrrpt_1_253_255.html

2.2 导出oracle容器内部的ADDM报告至之宿主机

&—》docker cp 容器ID:容器内文件路径 ./(宿主机路径)

&[root@test ~]# docker cp 3edfba76f476:/home/oracle/addmrpt_1_254_256.txt ./

其他(RAC):

?因为有的系统一般都是RAC,所以需要在各个节点下的AWR报告,如果你愿意登录各个节点,可以使用一下SQL

?使用addmrpti.sql脚本:@?/rdbms/admin/addmrpt.sql

ASH报告收集:

?ASH即活动会话历史,Active Session History,ASH以VSESSION为基础,每秒采样一次,记录活动会话等待的事件。不活动的会话不会采样, 采样工作由新引入的后台进程MMNL完成。

?Oracle v$active_session_history视图提供了实例中的活动会话采样。通过该视图提供的最详细最完整性能数据,可作为定位性能故障的一手证据。任一连接到数据库时,那些不属于空闲等待类的事件的会话被认为是活动会话。这包括在采样时在CPU上的任何会话。

?@?/rdbms/admin/ashrpt

...SQL&> @?/rdbms/admin/ashrpt    //执行这个SQL就可以开始ASH报告收集Current Instance~~~~~~~~~~~~~~~~   DB Id    DB Name      Inst Num Instance----------- ------------ -------- ------------ 1384114315 HELOWIN             1 helowinSpecify the Report Type~~~~~~~~~~~~~~~~~~~~~~~Enter 'html' for an HTML report, or 'text' for plain textDefaults to 'html'Enter value for report_type:       //提示你输入生成报告类型,默认为HTML,回车即可Type Specified:  htmlInstances in this Workload Repository schema~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   DB Id     Inst Num DB Name      Instance     Host------------ -------- ------------ ------------ ------------  1384114315        1 ORCL         orcl         32e47e645a97  1384114315        1 ORCL         helowin      a444e690ce3e  1384114315        1 ORCL         orcl         a444e690ce3e  1384114315        1 ORCL         helowin      85e4a929d0f8* 1384114315        1 HELOWIN      helowin      85e4a929d0f8* 1384114315        1 HELOWIN      helowin      3edfba76f476Defaults to current databaseUsing database id: 1384114315Enter instance numbers. Enter 'ALL' for all instances in aRAC cluster or explicitly specify list of instances (e.g., 1,2,3).Defaults to current instance.Using instance number(s): 1ASH Samples in this Workload Repository schema~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Oldest ASH sample available:  21-Apr-21 18:00:56   &[    236 mins in the past]Latest ASH sample available:  21-Apr-21 21:57:14   &[      0 mins in the past]Specify the timeframe to generate the ASH report~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Enter begin time for report:       --    Valid input formats:--      To specify absolute begin time:--        &[MM/DD&[/YY]] Hh34:MI&[:SS]--        Examples: 02/23/03 14:30:15--                  02/23 14:30:15--                  14:30:15--                  14:30--      To specify relative begin time: (start with '-' sign)--        -&[Hh34:]MI--        Examples: -1:15  (SYSDATE - 1 Hr 15 Mins)--                  -25    (SYSDATE - 25 Mins)Defaults to -15 minsEnter value for begin_time: 18:00   //输入开始的时间,格式为: 年/月/日 小时/分钟/秒Report begin time specified: 18:00   Enter duration in minutes starting from begin time:Defaults to SYSDATE - begin_timePress Enter to analyze till current timeEnter value for duration: 60Report duration specified:   60Using 21-Apr-21 18:00:00 as report begin timeUsing 21-Apr-21 19:00:00 as report end timeSpecify Slot Width (using ashrpti.sql) for 'Activity Over Time' section~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-- Explanation:--   In the 'Activity Over Time' section of the ASH report,--   the analysis period is pided into smaller slots--   and top wait events are reported in each of those slots.-- Default:--   The analysis period will be automatically split upto 10 slots--   complying to a minimum slot width of--     1 minute,  if the source is V$ACTIVE_SESSION_HISTORY or--     5 minutes, if the source is DBA_HIST_ACTIVE_SESS_HISTORY.Specify Slot Width in seconds to use in the 'Activity Over Time' section:Defaults to a value as explained above:Slot Width specified:Specify Report Targets (using ashrpti.sql) to generate the ASH report~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-- Explanation:--   ASH Report can accept "Report Targets",--   like a particular SQL statement, or a particular SESSION,--   to generate the report on. If one or more report targets are--   specified, then the data used to generate the report will only be--   the ASH samples that pertain to ALL the specified report targets.-- Default:--   If none of the report targets are specified,--   then the target defaults to all activity in the database instance.Specify SESSION_ID (eg: from V$SESSION.SID) report target:Defaults to NULL:SESSION report target specified:Specify SQL_ID (eg: from V$SQL.SQL_ID) report target:Defaults to NULL: (% and _ wildcards allowed)SQL report target specified:Specify WAIT_CLASS name (eg: from V$EVENT_NAME.WAIT_CLASS) report target:&[Enter 'CPU' to investigate CPU usage]Defaults to NULL: (% and _ wildcards allowed)WAIT_CLASS report target specified:Specify SERVICE_HASH (eg: from V$ACTIVE_SERVICES.NAME_HASH) report target:Defaults to NULL:SERVICE report target specified:Specify MODULE name (eg: from V$SESSION.MODULE) report target:Defaults to NULL: (% and _ wildcards allowed)MODULE report target specified:Specify ACTION name (eg: from V$SESSION.ACTION) report target:Defaults to NULL: (% and _ wildcards allowed)ACTION report target specified:Specify CLIENT_ID (eg: from V$SESSION.CLIENT_IDENTIFIER) report target:Defaults to NULL: (% and _ wildcards allowed)CLIENT_ID report target specified:Specify PLSQL_ENTRY name (eg: "SYS.DBMS_LOB.*") report target:Defaults to NULL: (% and _ wildcards allowed)PLSQL_ENTRY report target specified:Specify the Report Name~~~~~~~~~~~~~~~~~~~~~~~The default report file name is ashrpt_1_0421_1900.html.  To use this name,press &<return&> to continue, otherwise enter an alternative.Enter value for report_name:Using the report name ashrpt_1_0421_1900.htmlSummary of All User Input-------------------------Format         : HTMLDB Id          : 1384114315Inst num       : 1Begin time     : 21-Apr-21 18:00:00End time       : 21-Apr-21 19:00:00Slot width     : DefaultReport targets : 0Report name    : ashrpt_1_0421_1900.html&<html&>&<head&>&<title&>ASH Report - From 21-Apr-21 18:00:00 To 21-Apr-21 19:00:00&</title&>&<style type="text/css"&>body.awr {font:bold 10pt Arial,Helvetica,Geneva,sans-serif;color:black; background:White;}pre.awr  {font:8pt Courier;color:black; background:White;}h1.awr   {font:bold 20pt Arial,Helvetica,Geneva,sans-serif;color:#336699;background-color:White;border-bottom:1px solid #cccc99;margin-top:0pt; margin-bottom:0pt;padding:0px 0px 0px 0px;}h3.awr   {font:bold 18pt Arial,Helvetica,Geneva,sans-serif;color:#336699;background-color:White;margin-top:4pt; margin-bottom:0pt;}h3.awr {font:bold 16pt Arial,Helvetica,Geneva,sans-serif;color:#336699;background-color:White;margin-top:4pt; margin-bottom:0pt;}li.awr {font: 8pt Arial,Helvetica,Geneva,sans-serif; color:black; background:White;}th.awrnobg {font:bold 8pt Arial,Helvetica,Geneva,sans-serif; color:black; background:White;padding-left:4px; padding-right:4px;padding-bottom:2px}th.awrbg {font:bold 8pt Arial,Helvetica,Geneva,sans-serif; color:White; background:#0066CC;padding-left:4px; padding-right:4px;padding-bottom:2px}td.awrnc {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:White;vertical-align:top;}td.awrc    {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:#FFFFCC; vertical-align:top;}td.awrnclb {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:White;vertical-align:top;border-left: thin solid black;}td.awrncbb {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:White;vertical-align:top;border-left: thin solid black;border-right: thin solid black;}td.awrncrb {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:White;vertical-align:top;border-right: thin solid black;}td.awrcrb    {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:#FFFFCC; vertical-align:top;border-right: thin solid black;}td.awrclb    {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:#FFFFCC; vertical-align:top;border-left: thin solid black;}td.awrcbb    {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:#FFFFCC; vertical-align:top;border-left: thin solid black;border-right: thin solid black;}a.awr {font:bold 8pt Arial,Helvetica,sans-serif;color:#663300; vertical-align:top;margin-top:0pt; margin-bottom:0pt;}td.awrnct {font:8pt Arial,Helvetica,Geneva,sans-serif;border-top: thin solid black;color:black;background:White;vertical-align:top;}td.awrct   {font:8pt Arial,Helvetica,Geneva,sans-serif;border-top: thin solid black;color:black;background:#FFFFCC; vertical-align:top;}td.awrnclbt  {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:White;vertical-align:top;border-top: thin solid black;border-left: thin solid black;}td.awrncbbt  {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:White;vertical-align:top;border-left: thin solid black;border-right: thin solid black;border-top: thin solid black;}td.awrncrbt {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:White;vertical-align:top;border-top: thin solid black;border-right: thin solid black;}td.awrcrbt     {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:#FFFFCC; vertical-align:top;border-top: thin solid black;border-right: thin solid black;}td.awrclbt     {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:#FFFFCC; vertical-align:top;border-top: thin solid black;border-left: thin solid black;}td.awrcbbt   {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:#FFFFCC; vertical-align:top;border-top: thin solid black;border-left: thin solid black;border-right: thin solid black;}table.tdiff {  border_collapse: collapse; }&</style&>&</head&>&<body class="awr"&>&<h1 class="awr"&>ASH Report For HELOWIN/helowin&</h1&>&<p /&>&<table border="1" width="500"&>&<tr&>&<th class="awrbg"&>DB Name&</th&>&<th class="awrbg"&>DB Id&</th&>&<th class="awrbg"&>Instance&</th&>&<th class="awrbg"&>Inst num&</th&>&<th class="awrbg"&>Release&</th&>&<th class="awrbg"&>RAC&</th&>&<th class="awrbg"&>Host&</th&>&</tr&>&<tr&>&<td class='awrnc'&>HELOWIN&</td&>&<td align="right" class='awrnc'&>1384114315&</td&>&<td class='awrnc'&>helowin&</td&>&<td align="right" class='awrnc'&>1&</td&>&<td class='awrnc'&>11.2.0.1.0&</td&>&<td ......class='awrc'&>&</td&>&<td class='awrc'&>db file sequential read&</td&>&<td align="right" class='awrc'&>1&</td&>&<td align="right" class='awrc'&>2.17&</td&>&</tr&>&</table&>&<p /&>&<br /&>&<a class="awr" href="#top"&>Back to Top&</a&>&<p /&>&<p /&>End of Report&</body&>&</html&>Report written to ashrpt_1_0421_1900.html     //输入报告的名字,默认回车即可

3.1 查看oracle容器内生成的ADDM报告

&[root@test ~]# docker psCONTAINER ID   IMAGE                                      COMMAND                  CREATED        STATUS       PORTS                      NAMES3edfba76f476   registry.aliyuncs.com/helowin/oracle_11g   "/bin/sh -c '/home/o…"   2 months ago   Up 3 hours   0.0.0.0:1521-&>1521/tcp     oracle_11g&[root@test ~]# docker exec -it oracle_11g bash&[oracle@3edfba76f476 /]$ su - rootPassword:  helowin&[root@3edfba76f476 ~]# su - oracle&[oracle@3edfba76f476 ~]$ pwd/home/oracle&[oracle@3edfba76f476 ~]$ lsaddmrpt_1_254_256.txt  app  ashrpt_1_0421_1900.html  awrrpt_1_253_255.html

3.2 导出oracle容器内部的ADDM报告至之宿主机

&—》docker cp 容器ID:容器内文件路径 ./(宿主机路径)

&[root@test ~]# docker cp 3edfba76f476:/home/oracle/ashrpt_1_0421_1900.html ./

其他(RAC):

?因为有的系统一般都是RAC,所以需要在各个节点下的AWR报告,如果你愿意登录各个节点,可以使用一下SQL

@?/rdbms/admin/ashrpti.sql与上边的不同也就是需要输入DBID和实例NUMBER,明白提示的意思就行。

&—注意&— :

?在生成报告期间,不能有数据库重启的操作,如果有会有报错。

查看生成的各项报告:

AWR报告

ADDM报告

ASH报告

“oracle数据文件的存放位置(oracle常用命令)” 的相关文章

产品运营总监主要做什么(32点概括运营总监职责)

运营部总监职责1.协助总经理制定公司的发展战略规划;2.负责制定所属部门的工作计划、管理方案、操作流程;3.制订所负责业务的年度工作计划并监督实施执行;4.制定...

华为手机文件夹在哪里打开(解析文件夹打开方式)

电脑通过数据线查看手机文件时,需要先将手机端的“USB传输方式”更改为“传输文件”,然后再通过电脑访问手机存储。以华为P20Pro为例,具体操作步骤如下:1、使...

华为nova3i怎么样,nova3i优缺点分析

华为nove3i距离发布过去一个月时间了,不过这款机型是近日才正式上市的。一起发布的还有华为nove3旗舰手机。我们知道华为nove3i系列算是之前上一个版本的...

ipad键盘不见了怎么办(ipad电源键下陷自修方法)

摘要:过去的一段时间,极客之选尝试了多款平板的外接键盘,未来我们将陆续为大家推荐一些可以提高输入效率的外设。在娱乐之外,平板电脑到底能不能成为一个合格的「生产力...

品牌kol投放的策略主要是什么(最实用的3大策略)

一条小团团OvO、韩美娟、虎哥说车、浪胃仙这些在18年还不为人知的名字,却在19年迎来大爆并跻身超头部KOL行列。短短一年时间,热门KOL大换血。如此快的更新换...

企业寻找客户的渠道和方法(获取客户信息的途径)

如今所有的商品都是以资金交易商品的形式,但在交易的过程当中,容易出现资金链问题。而物品与物品之间的交易却能解决资金问题,同时还能够改善货物积压。这样的交易模式都...

linux配置网卡文件配置(linux网卡配置文件怎么设置)

通过查资料与工作中的进行一下总结:DEVICE=&”eth1&″网卡名称NM_CONTROLLED=&”yes&”...

2023年cpu最新天梯图(速览显卡性能天梯图新动态)

型号依次是金河田萌兜猫爪粉色¥259,玩嘉铠甲初音粉色¥159,皮卡丘蓝色¥159,萌兜柠檬黄色¥259今天更新的配置单是3000-9000价位主机配置方案,明...

directx最新版是哪一个(win10查看directx版本)

DirectX12其实也是在不断地进行着更新的,虽然微软这次没有再使用像以前的DirectX9.0c、DirectX11.1这样的名字来命名DirectX12的...

创业方向有哪些,2020年值得创业的5个大方向

新的一年就要到来,中国人都是很传统的,在这个重要关头,很多人都会回顾过去,思量未来。对于创业者来说,随时展望行业前景是很重要的。那么,2020赚钱方向在哪里呢?...