ADDMRPT
Hi all,
11.2.0.1
Aix 6.1
This is on our DEV/UAT Server.
Can you comment on my ADDM REPORT because the programmer is experiencing slow performance in her batch test run. She said it is not like last week.
======
Activity During the Analysis Period
Total database time was 2145 seconds.
The average number of active sessions was .45.
Summary of Findings
Description Active Sessions Recommendation
s
Percent of Activity
1 Virtual Memory Paging .45 | 100 1
2 Top SQL Statements .39 | 87.02 5
3 Top Segments by "User I/O" and "Cluster" .01 | 2.37 1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Findings and Recommendations
Finding 1: Virtual Memory Paging
Impact is .45 active sessions, 100% of total activity.
Significant virtual memory paging was detected on the host operating system.
Recommendation 1: Host Configuration
Estimated benefit is .45 active sessions, 100% of total activity.
Action
Host operating system was experiencing significant paging but no
particular root cause could be detected. Investigate processes that do
not belong to this instance running on the host that are consuming
significant amount of virtual memory. Also consider adding more physical
memory to the host.
=======================
Why is that our addm report always finds number 1 cause as Virtual Memory Paging? If I run "topas" I can not see any paging in swap.
What does it mean by > The average number of active sessions was .45? Is there a fraction session?
Which of the tool in addm that recommends creation of indexes on certain column table?
Thanks,
pK
Hi,
Actually its a batch compiled pro*c program so she can not issue the sqltrace at session level.
As dba can I run sqltrace at schema level or database level instead?
ADDMRPT
Similar Messages
-
Error trying to generate addmrpt (ADDM Report) on Oracle 10.1.0.4
Hello,
When I launch $ORACLE_HOME/rdbms/admin/addmrpt.sql on my Fedora 3 Oracle 10g connected using sys as sysdba (or system), I get the following error :
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Entrez une valeur pour begin_snap : 210
Begin Snapshot Id specified: 210
Entrez une valeur pour end_snap : 211
End Snapshot Id specified: 211
Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is addmrpt_1_210_211.txt. To use this name,
press <return> to continue, otherwise enter an alternative.
Entrez une valeur pour report_name :
Using the report name addmrpt_1_210_211.txt
Running the ADDM analysis on the specified pair of snapshots ...
begin
ERREUR a la ligne 1 :
ORA-13711: Des statistiques de cle sont absentes de certains cliches dans la
plage [210, 211].
ORA-06512: a "SYS.PRVT_ADVISOR", ligne 1283
ORA-06512: a "SYS.DBMS_ADVISOR", ligne 190
ORA-06512: a ligne 27
Generating the ADDM report for this analysis ...
ERROR:
ORA-14552: operation DDL, COMMIT ou ROLLBACK interdite dans une instruction DML
ou une interrogation
ORA-06512: a "SYS.PRVT_ADVISOR", ligne 1750
ORA-13608: Le nom de tache ou d'objet NULL n'est pas valide.
ORA-06512: a "SYS.DBMS_ADVISOR", ligne 569
ORA-06512: a ligne 1
Any help to solve this problem ?
Oups, when I use awrrpt on the same snapshot, I get a correct report.
Regards,
FreddyPlease refer to the patchnote.htm that is bundled with 10.1.0.4.0 patch set. Only you are aware of what type of database configuration you have. You will want to pay close attention to "7.2.1.3 Set the SHARED_POOL_SIZE and JAVA_POOL_SIZE Initialization Parameters" and "7.2.2 Upgrade the Release 10.1 Database".
Basically, I believe you have missed these required steps after installing the 10.1.0.4.0 patch set from the OUI:
(pasted from the patchnote.htm)
13. Enter the following SQL*Plus commands:
14. SQL> STARTUP UPGRADE
15. SQL> SPOOL patch.log
16. SQL> @ORACLE_BASE\ORACLE_HOME\rdbms\admin\catpatch.sql
17. SQL> SPOOL OFF
18.
19. Review the patch.log file for errors and inspect the list of components that is displayed at the end of catpatch.sql script.
This list provides the version and status of each SERVER component in the database.
20. If necessary, rerun the catpatch.sql script after correcting any problems.
21. Restart the database:
22. SQL> SHUTDOWN
23. SQL> STARTUP
24.
25. Run the utlrp.sql script to recompile all invalid PL/SQL packages now instead of when the packages are accessed for the first time. This step is optional but recommended.
26. SQL> @ORACLE_BASE\ORACLE_HOME\rdbms\admin\utlrp.sql -
Hi,
I loaded tables by insert and noticed it is very slow. after 6 hours loading finished and addmrpt tells :
RECOMMENDATION 2: Host Configuration, 27% benefit (699 seconds)
ACTION: Investigate the possibility of improving the performance of I/O
to the online redo log files.
RATIONALE: The average size of writes to the online redo log files was 3
K and the average time per write was 1 milliseconds.
My question is how can I take that ACTION? I have 50M redo log file now.Dear Betty,
How many log switches you have per hour?
Run this scrip to see it:
>>>
spool logs.log
set echo on
set linesize 150
set pagesize 500
column day format a16 heading 'Dia'
column d_0 format a3 heading '00'
column d_1 format a3 heading '01'
column d_2 format a3 heading '02'
column d_3 format a3 heading '03'
column d_4 format a3 heading '04'
column d_5 format a3 heading '05'
column d_6 format a3 heading '06'
column d_7 format a3 heading '07'
column d_8 format a3 heading '08'
column d_9 format a3 heading '09'
column d_10 format a3 heading '10'
column d_11 format a3 heading '11'
column d_12 format a3 heading '12'
column d_13 format a3 heading '13'
column d_14 format a3 heading '14'
column d_15 format a3 heading '15'
column d_16 format a3 heading '16'
column d_17 format a3 heading '17'
column d_18 format a3 heading '18'
column d_19 format a3 heading '19'
column d_20 format a3 heading '20'
column d_21 format a3 heading '21'
column d_22 format a3 heading '22'
column d_23 format a3 heading '23'
column Total format 9999
column status format a8
column member format a40
column archived heading 'Archived' format a8
column bytes heading 'Bytes|(MB)' format 9999
Ttitle 'Log Info' skip 2
select l.group#,f.member,l.archived,l.bytes/1078576 bytes,l.status,f.type
from v$log l, v$logfile f
where l.group# = f.group#
Ttitle off
prompt =========================================================================================================================
Ttitle 'Log Switch on hour basis' skip 2
select to_char(FIRST_TIME,'DY, DD-MON-YYYY') dia,
decode(sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'00',1,0)),0,'-',sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'00',1,0))) d_0,
decode(sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'01',1,0)),0,'-',sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'01',1,0))) d_1,
decode(sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'02',1,0)),0,'-',sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'02',1,0))) d_2,
decode(sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'03',1,0)),0,'-',sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'03',1,0))) d_3,
decode(sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'04',1,0)),0,'-',sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'04',1,0))) d_4,
decode(sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'05',1,0)),0,'-',sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'05',1,0))) d_5,
decode(sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'06',1,0)),0,'-',sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'06',1,0))) d_6,
decode(sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'07',1,0)),0,'-',sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'07',1,0))) d_7,
decode(sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'08',1,0)),0,'-',sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'08',1,0))) d_5,
decode(sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'09',1,0)),0,'-',sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'09',1,0))) d_9,
decode(sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'10',1,0)),0,'-',sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'10',1,0))) d_10,
decode(sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'11',1,0)),0,'-',sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'11',1,0))) d_11,
decode(sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'12',1,0)),0,'-',sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'12',1,0))) d_12,
decode(sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'13',1,0)),0,'-',sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'13',1,0))) d_13,
decode(sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'14',1,0)),0,'-',sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'14',1,0))) d_14,
decode(sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'15',1,0)),0,'-',sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'15',1,0))) d_15,
decode(sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'16',1,0)),0,'-',sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'16',1,0))) d_16,
decode(sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'17',1,0)),0,'-',sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'17',1,0))) d_17,
decode(sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'18',1,0)),0,'-',sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'18',1,0))) d_18,
decode(sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'19',1,0)),0,'-',sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'19',1,0))) d_19,
decode(sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'20',1,0)),0,'-',sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'20',1,0))) d_20,
decode(sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'21',1,0)),0,'-',sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'21',1,0))) d_21,
decode(sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'22',1,0)),0,'-',sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'22',1,0))) d_22,
decode(sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'23',1,0)),0,'-',sum(decode(substr(to_char(FIRST_TIME,'HH24'),1,2),'23',1,0))) d_23,
count(trunc(FIRST_TIME)) Total
from v$log_history
group by to_char(FIRST_TIME,'DY, DD-MON-YYYY')
order by to_date(substr(to_char(FIRST_TIME,'DY, DD-MON-YYYY'),5,15) )
Ttitle off
prompt
spool off
>>>
Cheers,
Francisco Munoz Alvarez -
i executed this addm sciprt
SQL>@C:\oracle\product\10.2.0\db_1\RDBMS\ADMIN\addmrpt.sql
I get list of all the snapshot ids.....
But as soon i enter the second snap shot id2: the whole closes down... i,e it crashses ...i have to login again......
can any1 help me out to know whats the exact reason@asif
it was working fine last weekend for the same snapshots...
@XAHEER
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Sun Feb 21 07:11:11 2010
Picked latch-free SCN scheme 2
Using LOG_ARCHIVE_DEST_10 parameter default value as USE_DB_RECOVERY_FILE_DEST
Autotune of undo retention is turned on.
IMODE=BR
ILAT =18
LICENSE_MAX_USERS = 0
SYS auditing is disabled
ksdpec: called for event 13740 prior to event group initialization
Starting up ORACLE RDBMS Version: 10.2.0.1.0.
System parameters with non-default values:
processes = 150
__shared_pool_size = 167772160
__large_pool_size = 4194304
__java_pool_size = 4194304
__streams_pool_size = 0
spfile = D:\ORACLE\PRODUCT\10.2.0\DB_1\DBS\SPFILEORCL1.ORA
sga_target = 591396864
control_files = D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL1\CONTROL01.CTL, D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL1\CONTROL02.CTL, D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL1\CONTROL03.CTL
db_block_size = 8192
__db_cache_size = 406847488
compatible = 10.2.0.1.0
db_file_multiblock_read_count= 16
db_recovery_file_dest = D:\oracle\product\10.2.0/flash_recovery_area
db_recovery_file_dest_size= 2147483648
undo_management = AUTO
undo_tablespace = UNDOTBS1
remote_login_passwordfile= EXCLUSIVE
db_domain =
dispatchers = (PROTOCOL=TCP) (SERVICE=orcl1XDB)
job_queue_processes = 10
audit_file_dest = D:\ORACLE\PRODUCT\10.2.0\ADMIN\ORCL1\ADUMP
background_dump_dest = D:\ORACLE\PRODUCT\10.2.0\ADMIN\ORCL1\BDUMP
user_dump_dest = D:\ORACLE\PRODUCT\10.2.0\ADMIN\ORCL1\UDUMP
core_dump_dest = D:\ORACLE\PRODUCT\10.2.0\ADMIN\ORCL1\CDUMP
db_name = orcl1
open_cursors = 300
pga_aggregate_target = 196083712
PMON started with pid=2, OS id=3304
PSP0 started with pid=3, OS id=3616
MMAN started with pid=4, OS id=3084
DBW0 started with pid=5, OS id=3704
LGWR started with pid=6, OS id=1108
CKPT started with pid=7, OS id=2336
SMON started with pid=8, OS id=1320
RECO started with pid=9, OS id=1120
CJQ0 started with pid=10, OS id=3716
MMON started with pid=11, OS id=3720
Sun Feb 21 07:11:25 2010
starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
Sun Feb 21 07:11:25 2010
starting up 1 shared server(s) ...
MMNL started with pid=12, OS id=3724
Sun Feb 21 07:11:30 2010
alter database mount exclusive
Sun Feb 21 07:11:38 2010
Setting recovery target incarnation to 2
Sun Feb 21 07:11:39 2010
Successful mount of redo thread 1, with mount id 1096036450
Sun Feb 21 07:11:39 2010
Database mounted in Exclusive Mode
Completed: alter database mount exclusive
Sun Feb 21 07:11:40 2010
alter database open
Sun Feb 21 07:11:44 2010
Beginning crash recovery of 1 threads
parallel recovery started with 2 processes
Sun Feb 21 07:11:49 2010
Started redo scan
Sun Feb 21 07:11:51 2010
Completed redo scan
*115 redo blocks read, 41 data blocks need recovery*
Sun Feb 21 07:11:51 2010
Started redo application at
Thread 1: logseq 319, block 11083
Sun Feb 21 07:11:52 2010
Recovery of Online Redo Log: Thread 1 Group 3 Seq 319 Reading mem 0
Mem# 0 errs 0: D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL1\REDO03.LOG
Sun Feb 21 07:11:52 2010
Completed redo application
Sun Feb 21 07:11:52 2010
Completed crash recovery at
Thread 1: logseq 319, block 11198, scn 206243184
*41 data blocks read, 41 data blocks written, 115 redo blocks read*
Sun Feb 21 07:11:57 2010
Thread 1 advanced to log sequence 320
Thread 1 opened at log sequence 320
Current log# 1 seq# 320 mem# 0: D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL1\REDO01.LOG
Successful open of redo thread 1
Sun Feb 21 07:11:58 2010
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Sun Feb 21 07:11:58 2010
SMON: enabling cache recovery
Sun Feb 21 07:12:12 2010
Successfully onlined Undo Tablespace 1.
Sun Feb 21 07:12:12 2010
SMON: enabling tx recovery
Sun Feb 21 07:12:14 2010
Database Characterset is WE8MSWIN1252
replication_dependency_tracking turned off (no async multimaster replication found)
Starting background process QMNC
QMNC started with pid=18, OS id=2004
Sun Feb 21 07:12:51 2010
Completed: alter database open
Sun Feb 21 07:12:57 2010
db_recovery_file_dest_size of 2048 MB is 0.00% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup. -
please tell me any suggestion ,to increase the sizes or any suggestions please
SYMPTOMS THAT LED TO THE FINDING:
SYMPTOM: Wait class "User I/O" was consuming significant database time.
(27% impact [6162 seconds])
FINDING 7: 3.1% impact (693 seconds)
Wait class "Other" was consuming significant database time.
NO RECOMMENDATIONS AVAILABLE
ADDITIONAL INFORMATION:
Database latches in the "Other" wait class were not consuming
significant database time.
FINDING 8: 2.8% impact (630 seconds)
The PGA was inadequately sized, causing additional I/O to temporary
tablespaces to consume significant database time.
NO RECOMMENDATIONS AVAILABLE
ADDITIONAL INFORMATION:
The value of parameter "pga_aggregate_target" was "5000 M" during the
analysis period.
SYMPTOMS THAT LED TO THE FINDING:
SYMPTOM: Wait class "User I/O" was consuming significant database time.
(27% impact [6162 seconds])
FINDING 9: 2.7% impact (595 seconds)
Inter-instance messaging was consuming significant database time on this
instance.
NO RECOMMENDATIONS AVAILABLEHello PointOnePa,
What examples were you trying to run? Here's a good example on how to create report in Excel
http://zone.ni.com/devzone/cda/epd/p/id/1001
Which version of LabVIEW and Report Gen you do you have? For Reort Gen 2009, it offers support for MS Office 2007/2003/XP
http://digital.ni.com/public.nsf/allkb/45E349F79A55EAE6862575EF00614134
Andy Chang
National Instruments
LabVIEW Control Design and Simulation -
Awrrpt and addmrpt report or any report
Hi all,
Good day..
Is that possible to get the sql or module generating number of archives in any of the report in DB version 10.2.0.4
thanks,
baskar.lThanks for your input...Every day b/w 8 am to 9 am i could see the number of archives generated was way above normal...So need to find out which sql or module is generating archives...
regards,
baskar.l -
Logical i/o and physical i/o in terms of cpu usage
Hi Guys,
I understand that
LIO = logical = buffer cache. LIO may have incurred a PIO in order to get into the cache in the first place.
PIO = physical = disk read
I understand that physical i/o will read from disk causing increase in disk i/o and result in long elapsed time.
My question here is whether pure LIOs (data detected in cache, read from memory) or physical IOs will consume more cpu?
I'm just curious whether an increase of cpu high ulization is due to high number of physical i/o perhaps due to shortage of ram allocated to the db or actually more towards the high number of pure LIOs (memory is sufficient to cache the data, very less PIO).
thanksthanks. I have a db that is running in production for several months. The average utilization cpu per day is only about 20%+
Just notice from my utilization report that the cpu is near 98% yesterday from 4am to 5pm yesterday. Today the cpu is fine again.
From the awr, i can see the db hit ratio and also all the sql elasped time iis healthy.
I'm wondering what actually cause the cpu to be so high on that specific day.
Apps is not able to provide any information to me.
As in the addmrpt report, it also shows:
ADDITIONAL INFORMATION:
Host CPU consumption was 98%. The instance spent significant time on
CPU. However, there were no predominant SQL statements responsible for
the CPU load.
Any suggestion on finding the culprits?
thanks -
Snapshots not getting generated automatically
Hi all,
I want to generate an ADDM report. For that, I am running the addmrpt.sql script in $ORACLE_HOME/rdbms/admin
While running, i am being asked for the begin_snap ID and end_snap ID. The problem is I have only one snap_id. The snapshots are not getting generated automatically for every 1 hr, as they shd be. I have to manually create a snapshot and run the ADDM script. I know that the database has to be open for atleast next 1 hr for getting the snapshot. I have not closed my database for the whole day.
Now, I want to know what exactly I shd be looking at, or rather be doing to get my snapshots generate automatically.
Please help me in this regard.
Thanx in advance....
Regards,
ORA_SRIHmm, you probably want to ask questions about ADDM in the [Database General Forum|http://forums.oracle.com/forums/forum.jspa?forumID=61]
-
Shell script for Automatic Awr Report
Hi Good Morning,
I have a requirement to generate the AWR report daily between (10AM - 06PM , 10AM - 01PM , 01PM - 10PM) . I have the below script for this . But the issue is this script is working only when i run it two times and before running i have to delete snap_list.lst file. Please let me know what is the problem in this script and how to resolve it.
Script :
dt=`date +%d%m%Y`
cd /orabkp/awr_report
chmod 777 *
rm -rf snap_list.lst
touch snap_list.lst
#rm -rf snap_list.lst
#rm -rf snap_list.lst
sqlplus -s " /as sysdba " <<EOF > snap_list.lst
host sleep 10
@/oracle/scripts/cron_scripts/rpt1.sql;
@?/rdbms/admin/awrrpt.sql
HTML
1
`cat snap_list.lst | grep "10:0" | awk '{print $1}'`
`cat snap_list.lst | grep "13:0" | awk '{print $1}'`
awrrpt\_$dt\_10AM\-01PM.html
prompt 2
@?/rdbms/admin/awrrpt.sql
HTML
1
`cat snap_list.lst | grep "13:0" | awk '{print $1}'`
`cat snap_list.lst | grep "18:0" | awk '{print $1}'`
awrrpt\_$dt\_01PM\-06PM.html
@?/rdbms/admin/awrrpt.sql
HTML
1
`cat snap_list.lst | grep "10:0" | awk '{print $1}'`
`cat snap_list.lst | grep "18:0" | awk '{print $1}'`
awrrpt\_$dt\_10AM\-06PM.html
@?/rdbms/admin/addmrpt.sql
`cat snap_list.lst | grep "06:0" | awk '{print $1}'`
`cat snap_list.lst | grep "12:0" | awk '{print $1}'`
ADDM_REPORT\_$dt\_10AM\-06PM.txt
EOF
exit
cat /oracle/scripts/cron_scripts/rpt1.sql
host echo 1
host sleep 10
@?/rdbms/admin/awrrpt.sql
HTML
1
`cat snap_list.lst | grep "10:0" | awk '{print $1}'`
`cat snap_list.lst | grep "13:0" | awk '{print $1}'`
awrrpt\_$dt\_10AM\-01PM.html
Regards
RajasekarHi,
Modify & Try this script used for rac awr ..
#!/bin/ksh
set -x
ORACLE_SID=DBSID
ORACLE_HOME=/u01/app/ora11g/product/11.2.0/db_1
export ORACLE_HOME
TERM=vt100
export TERM
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/local/bin:/usr/bin/X11:/bin:/sbin:.
PATH=$ORACLE_HOME/bin:$PATH
export DT=`date '+%d_%b_%Y_%HH_%MM'`
export ORACLE_BASE ORACLE_SID ORACLE_HOME PATH DT
echo $DT
MAIL="[email protected]"
CMAIL="[email protected]"
AWRR="/u01/DBA_Scripts/AWR_REPO"
sqlplus -s "/ as sysdba"<<EOFSQL
set head off
set feed off
spool /tmp/bsnap.lst
select max(SNAP_ID)- 3 from dba_hist_snapshot;
spool off
spool /tmp/esnap.lst
select max(SNAP_ID) from dba_hist_snapshot;
spool off
spool /tmp/iname.lst
select instance_name from v\$instance;
spool off
spool /tmp/dname.lst
select database_name from v\$database;
spool off
spool /tmp/inum.lst
select instance_number from v\$instance;
spool off
spool /tmp/dbid.lst
select dbid from v\$database;
spool off
EOFSQL
BSNAP=`cat /tmp/bsnap.lst | tail -1 | awk '{ print $1}'`;export BSNAP
ESNAP=`cat /tmp/esnap.lst | tail -1 | awk '{ print $1}'`;export ESNAP
INAME=`cat /tmp/iname.lst | tail -1 | awk '{ print $1}'`;export INAME
DNAME=`cat /tmp/dname.lst | tail -1 | awk '{ print $1}'`;export DNAME
INUM=`cat /tmp/inum.lst | tail -1 | awk '{ print $1}'`;export INUM
DID=`cat /tmp/dbid.lst| tail -1 | awk '{ print $1}'`;export DID
echo "Begin Snap : $BSNAP"
echo "End Snap : $ESNAP"
#echo "InstanceName: $INAME"
echo "DB Name : $DNAME"
#echo "InstanceId : $INUM"
echo "DB ID : $DID"
sqlplus -s "/ as sysdba"<<EOFSQL
define inst_num = $INUM;
define num_days = 12;
define inst_name = 'ALL';
define db_name = '$DNAME';
define dbid = $DID;
define begin_snap = $BSNAP;
define end_snap = $ESNAP;
define report_type = 'html';
define report_name = $AWRR/Awr_report_$DT.html
@@?/rdbms/admin/awrgrpti
EOFSQL
cat /u01/DBA_Scripts/mail_body.txt | mailx -a $AWRR/Awr_report_$DT.html -c $CMAIL -s "DB Report - DB " $MAILThanks,
Ajay More
http://www.moreajays.com -
Cannot generate AWR/ADDM reports in Oracle 10g
Hi,
We are running 10.2.0.3.0 and troublshooted the performance problem for some queries. But when tried to run AWR/ADDM reports from OEM and got the following messages:
Insufficient Data in Interval. For displaying data on this page, two historical snapshots are needed. Make sure that two snapshots are present in the target database instance. In addition modify the interval so that it is contained within two available snapshots
I checked the scheduled jobs in this DB,
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Oracle Label Security and Data Mining options
SQL> select JOB_NAME from dba_scheduler_jobs;
JOB_NAME
PURGE_LOG
FGR$AUTOPURGE_JOB
GATHER_STATS_JOB
AUTO_SPACE_ADVISOR_JOB
Has anyone anyidea why AWR/ADDM reports cannot be run? Thanks
LizHi,
If you want you can execute snapshot at your required time as suggested by people.
However Oracle 10g by default take snap at every one hour.
To check
select snap_id, to_char(BEGIN_INTERVAL_TIME,'DD-MON-YYYY HH24:MI') BEGIN_INTERVAL_TIME,
to_char(END_INTERVAL_TIME,'DD-MON-YYYY HH24:MI') END_INTERVAL_TIME
from dba_hist_snapshot
You can generate AWR Report by executing following SQL, Connect as SYS
SQL> @$ORACLE_HOME/rdbms/admin/awrrpt.sql
Input required details it asks, you can get AWR report in HTML or text format.
ADDM Report:
@$ORACLE_HOME/rdbms/admin/addmrpt.sql -
ADDM Report is not produced by SQL DEV 4.0 if logged in user does not have SYSDBA privilege
Hello -
In SQLDEV 4.0 (Early Adapter), I logged in as user with no SYSDBA privilege granted. But ADVISOR granted and execute on DBMS_ADDM granted and "select any dictionary" granted, etc.
Then i go to the menu View --> DBA --> Performance --> Automatic Database Diagnostic Monitor
Select ADDM report from the available choices.
Out of 3 menu options: Summary, Findings and ADDM Report, I can see the first two, but I am getting a grey screen for ADDM Report.
^^^^^^^^^^^^^^^^^^^^^
If i do exactly the same but login as SYSDBA, then ADDM Report can be produced and can be seen. So the issue is in the missing grants and privileges.
^^^^^^^^^^^^^^^^^^^^^^
The goal that we are pursuing in our shop is to empower developers to work with ADDM reports by having them login as non-SYSDBA user.
^^^^^^^^^^^^^^^^^^^^^^^^
Please advise what privilege should be granted to get this working for non-SYSDBA login
The same user can successfully execute $ORACLE_HOME/rdbms/admin/addmrpt.sql and produce file with complete ADDM report. But not able to get the ADDM from SQL DEV 4.0
Thank you,
vrThank you, Phil.
This worked for me in my quick test case.
Great help, as DBA group wants to allow NON-privileged users (like Developers and QA) to execute ADDM on demand.
Here is my observation for RAC database with two instances.
I have followed your instructions:
"Performance / Automatic Database Diagnostic Monitor -> Run ADDM"
Then
- Uncheck box "By Creating New Snapshot" (this box was checked by default)
- Provide new "Task Name" (let's say "vr1")
- Select "Start Snapshot" (this is where my first confusion is: each screen shot # is shown twice, may be because i have two instances of RAC)
- Select "End Snapshot" (the same way: each SNAP_ID is shown twice)
- and finally APPLY button is pressed
This creates 3 reports:
vr1
vr1$1 (for instance_id=1)
vr1$2 (for instance_id=2_
So, my question is: this expected and normal behavior of the tool?
What if my RAC database has 8 instances? Then I would generate 9 separate ADDM reports?
Is this correct observation?
Thank you,
vr -
Performance issue reported in ADDM output
When I run addmrpt on PROD, I get this line frequently reported.
SQL statements consuming significant database time were found.
RECOMMENDATION 1: SQL Tuning, 22% benefit (2456 seconds)
ACTION: Tune the PL/SQL block with SQL_ID "1tu3twp1maf9j". Refer to the
"Tuning PL/SQL Applications" chapter of Oracle's "PL/SQL User's Guide
and Reference"
RELEVANT OBJECT: SQL statement with SQL_ID 1tu3twp1maf9j
BEGIN wf_local_synch.bulksynchronization_conc( :errbuf,
:rc,:A0,:A1,:A2,:A3); END;
RATIONALE: SQL statement with SQL_ID "1tu3twp1maf9j" was executed 27
times and had an average elapsed time of 91 seconds.I also searched in metalink, nothing seems to be available.
Regards,
SAHi;
What is your Db and EBS version ,also please mention OS
If you search as RELEVANT OBJECT: SQL statement with SQL_ID in metalink there are 8 doc avaliable, but i belive its better to move your post on:
Forum Home » Database » SQL and PL/SQL
Regard
Helios -
Just curious to know what is the difference between running *{color:#808000}awrrpt.sql{color}* and *{color:#808000}addmrpt.sql{color}*?
I could not get right information googling out.
Thanks for your time!1)addmrpt.sql -- Generates "DETAILED ADDM REPORT" which reports findings and gives recommendations about activities impacting the db most. It generates a text file.
2)awrrpt.sql -- Generates a "WORKLOAD REPOSITORY REPORT" which is like a statspack report. You can generate a html file from this script
Kev -
ADDM Findings Top SQL Statements
Hi,
I have run addmrpt.sql for 1 month of time using snapshots and every ADDM report says that sql statement having id **** listed under top sql statements findings and recommendation is to tune using sql tunning advisor. It has 2-4 seconds elapsed time.But when i go through AWR report instance efficiency report and all are normal.
Can anyone please confirm whether I should recommend to tune this SQL statement to my vendor ?
Thanks,
TKbelow is the sql I found in ADDM. As I understood it is an intername SQL not an application SQL. When i searched it in internet found that it is related with check_oracle_health plugin. can you please help me to understand this nagios concept and the relationship it has with oracle software. And also how should I identify which methods we are using to monitor database internally?
SELECT
a.tablespace_name "Tablespace",
b.status "Status",
b.contents "Type",
b.extent_management "Extent Mgmt",
a.bytes bytes,
a.maxbytes bytes_max,
c.bytes_free + NVL(d.bytes_expired,0) bytes_free
FROM
-- belegter und maximal verfuegbarer platz pro datafile
-- nach tablespacenamen zusammengefasst
-- => bytes
-- => maxbytes
SELECT
a.tablespace_name,
SUM(a.bytes) bytes,
SUM(DECODE(a.autoextensible, 'YES', a.maxbytes, 'NO', a.bytes))
maxbytes
FROM
dba_data_files a
GROUP BY
tablespace_name
) a,
sys.dba_tablespaces b,
-- freier platz pro tablespace
-- => bytes_free
SELECT
a.tablespace_name,
SUM(a.bytes) bytes_free
FROM
dba_free_space a
GROUP BY
tablespace_name
) c,
-- freier platz durch expired extents
-- speziell fuer undo tablespaces
-- => bytes_expired
SELECT
a.tablespace_name,
SUM(a.bytes) bytes_expired
FROM
dba_undo_extents a
WHERE
status = 'EXPIRED'
GROUP BY
tablespace_name
) d
WHERE
a.tablespace_name = c.tablespace_name
AND a.tablespace_name = b.tablespace_name@@@@@@@@
AND a.tablespace_name = d.tablespace_name
UNION ALL
SELECT
d.tablespace_name "Tablespace",
b.status "Status",
b.contents "Type",
b.extent_management "Extent Mgmt",
sum(a.bytes_free + a.bytes_used) bytes, -- allocated
SUM(DECODE(d.autoextensible, 'YES', d.maxbytes, 'NO', d.bytes))
bytes_max,
SUM(a.bytes_free + a.bytes_used - NVL(c.bytes_used, 0)) bytes_free
FROM
sys.v_$TEMP_SPACE_HEADER a,
sys.dba_tablespaces b,
sys.v_$Temp_extent_pool c,
dba_temp_files d
WHERE
c.file_id(+) = a.file_id
and c.tablespace_name(+) = a.tablespace_name
and d.file_id = a.file_id
and d.tablespace_name = a.tablespace_name
and b.tablespace_name = a.tablespace_name
GROUP BY
b.status,
b.contents,
b.extent_management,
d.tablespace_name
ORDER BY
1 -
Top sql elasped time, how true is that
hi guys,
i am viewing an addm report and is concern about a top sql activity.
i have an sql having top elasped time.
<i>
2,372 2,275 128,690,535 0.00 4.28 fphtjnquzzpud [email protected] (TNS V1-V3) SELECT USER_ID FROM SUBSCRIBER...
</i>
q1) what is the meaning of elasped time ?
the time taken per execution of an sql statement ?
q2) is the elasped time in the report shown above = sum of all the the elapsed time per execution of the sql ?
if that the case, the most/frequently i run a SQL statement, the higher the elasped time it will be and thus higher db time.
but how can we say that it is an inefficient sql since it has the most elasped time just because it is run way too frequently then other sqls ?
Please advise
Regards,
NoobHi,
It is
in the below addmrpt.sql the time which show 20393 is the elapsed time of the sql..
SQL statements consuming significant database time were found.
RECOMMENDATION 1: SQL Tuning, 24% benefit (20393 seconds)
ACTION: Run SQL Tuning Advisor on the SQL statement with SQL_ID
"9tkc7559d5drs".
RELEVANT OBJECT: SQL statement with SQL_ID 9tkc7559d5drs and
PLAN_HASH 1303522576But in awrrrpt.sql the elapsed time showing is for the total number of times the sql is executed in the DB.
^LSQL ordered by Elapsed Time DB/Inst: STEELP/STEELP1 Snaps: 13011-13012
-> Resources reported for PL/SQL code includes the resources used by all SQL
statements called by the code.
-> % Total DB Time is the Elapsed Time of the SQL statement divided
into the Total Database Time multiplied by 100
Elapsed CPU Elap per % Total
Time (s) Time (s) Executions Exec (s) DB Time SQL Id
6,761 1,869 1 6761.3 11.2 4hsz1t5dsmhy4
Module: XXLOTDETSo check the addmrpt report.
thanks.
baskar.l
Maybe you are looking for
-
Topology Services with Windows Vista (x32) Client
Hi, we've client using windows vista, that it's unable to access to Topology Services (LMS3.1) He is using Java version 6u5. But he is still getting the error: JRE Version:1.6.0_05 ERROR ClientUICache: Image not found(1), fileName = fatalerror_32.gif
-
Low Disk space (0 Bytes) in BI Server.
Dear All, I am working on BI Publishers, i am facing the problem of Low Disk space (0 Bytes) in BI Server. I found that the xml files which are in the following path occupied 45 GB D:\OracleBI\oc4j_bi\j2ee\home\applications\xmlpserver\xmlpserver\xml
-
Urgent Group Policy Issue - not applying despite saying it does
Thank you for this urgent help. Auditors checking this out tomorrow morning. We have a GPO that sets the eventlog audit settings for success or failure security events. The scope is set to Authenticated Users. When I run the group policy wizard in GP
-
Functions in select statements - time consuming?!
Hi All, I have a fairly complex view that uses a char based date (last business day) as one of the selection criteria. We have a report (based on the view) that needs to be run on a daily basis but the date will be different each day. I don't want to
-
Upload control in Visual Composer
Hi guys, We here are wondering whether an upload control is something that's needed or not. We are considering implementing this for EhP2. Can you please comment on this? Do you find such control helpful? Thanks, Natty