Awr dbms_sqltune package
Hi,
Our company doesn't currently have oem installed on production. This will be done in March. Right now I am working with the sqltune package to access the database on the dev server before I run it on production. I was running the following procedure below and requested the GOLDUSER schema.
Down in the load_sqlset procdure I think I have the load_option and update_option set to the correct values. I could be wrong though. By setting these all I want is to extract the old sql statements and performace tune them.
I get those sql statements listed out and also I get a different named schema under "tables with new potential indices" (LEADUSERS).
Should I be concerned with this? Would someone just look this procedure over to see if it is correct?
I would appreciate your help in this matter.
Thanks in advance.
al
declare
cursor_1 dbms_sqltune.sqlset_cursor;
begin
open cursor_1 for
select value(p)
from table(dbms_sqltune.select_workload_repository)
750,
1501,
'parsing_schema_name= ''GOLDUSER'' AND executions > 25',
null,
null,
null,
null,
null,
10)) p;
dbms_sqltune.load_sqlset(
sqlset_name => 'prod_awr',
populate_cursor => cursor_1,
load_option => 'MERGE',
update_option => 'ACCUMULATE');
end;
/
Check this one:
http://www.oracle-base.com/articles/10g/AutomaticSQLTuning10g.php
OR
DECLARE
ret_val VARCHAR2(4000);
BEGIN
ret_val := dbms_sqltune.create_tuning_task(
task_name=>'t1',
sql_id=>' '); Execute the sql prior to this and get the sql_id in place it here
dbms_sqltune.execute_tuning_task('t1');
END;
check the status by,
SELECT status FROM DBA_ADVISOR_LOG WHERE task_name ='t1';
Upon completion of the above,
SET LONG 100000
SET LONGCHUNKSIZE 99999
SET LINESIZE 20000
SELECT DBMS_SQLTUNE.REPORT_TUNING_TASK( 't1') FROM DUAL;
Similar Messages
-
Using DBMS_SQLTUNE package...
Hi ,
I use Oracle10g v.2 database and i have a sql statement....
I want this to be tuned... so i use the DBMS_SQL_TUNE package to accomplish this task.
I use the following commands:
DECLARE
task_name_var VARCHAR2(30);
sqltext_var CLOB;
BEGIN
sqltext_var :=<select statement> ;
task_name_var := DBMS_SQLTUNE.CREATE_TUNING_TASK(
sql_text => sqltext_var,
user_name => 'HIS',
scope => 'COMPREHENSIVE',
task_name => 'sql_tuning_task_test4',
description => 'This is a tuning task on .... table');
END;
Execute dbms_sqltune.Execute_tuning_task (task_name => 'sql_tuning_task_test4')
SELECT DBMS_SQLTUNE.SCRIPT_TUNING_TASK('sql_tuning_task_test4') FROM DUAL
The last above select statement (in bold) points out some indexes to create....
I create them , analyze all new indexes and indexed columns , but when i execute again the above commands the optimizer again - advise me to create the same indexes as above - which i have created them.....
Why may be the cause of this...?????
thanks ,
SimonHi ,
I use Oracle10g v.2 database and i have a sql statement....
I want this to be tuned... so i use the DBMS_SQL_TUNE package to accomplish this task.
I use the following commands:
DECLARE
task_name_var VARCHAR2(30);
sqltext_var CLOB;
BEGIN
sqltext_var :=<select statement> ;
task_name_var := DBMS_SQLTUNE.CREATE_TUNING_TASK(
sql_text => sqltext_var,
user_name => 'HIS',
scope => 'COMPREHENSIVE',
task_name => 'sql_tuning_task_test4',
description => 'This is a tuning task on .... table');
END;
Execute dbms_sqltune.Execute_tuning_task (task_name => 'sql_tuning_task_test4')
SELECT DBMS_SQLTUNE.SCRIPT_TUNING_TASK('sql_tuning_task_test4') FROM DUAL
The last above select statement (in bold) points out some indexes to create....
I create them , analyze all new indexes and indexed columns , but when i execute again the above commands the optimizer again - advise me to create the same indexes as above - which i have created them.....
Why may be the cause of this...?????
thanks ,
Simon -
ORA-04063: package body "SYS.DBMS_SQLTUNE" error while upgrading
Hi,
i am trying to upgrade oracle database 10.2.0.2 to 11.2.0.1 with dbua tool. While upgrading 'Oracle Server' ORA-04063: package body "SYS.DBMS_SQLTUNE" error has occured.
In oracle server log :
Rem Create the automatic SQL Tuning task
Rem If the task already exists (catproc is being re-run), do not error.
begin
2 sys.dbms_sqltune_internal.i_create_auto_tuning_task;
3 exception
4 when others then
5 if (sqlcode = -13607) then -- task already exists
6 null;
7 else
8 raise;
9 end if;
10 end;
11 /
begin
ERROR at line 1:
ORA-04063: package body "SYS.DBMS_SQLTUNE" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_SQLTUNE"
ORA-06512: at line 8
After unsuccesful upgrade i restore and recover the database. SYS.DBMS_SQLTUNE package and package body were valid. But when i compile them the package body becomes invalid.
I search the error and reach 390221.1 metalink note:
Solution
- Drop synonyms
drop public synonym existsnode;
drop public synonym extract;
But there are no synonyms that is mentioned in this note in my db.
How can i resolve this problem? Thank you.Have you not read the note ORA-04063: package body "SYS.DBMS_SQLTUNE" has errors - Upgrade From 10G To 11G Fails On Dbms_sqltune ID 1271490.1+ ?
Nicolas. -
Errors using DBMS_SQLTUNE Advisors for Oracle 10g
I get errors trying to tune the below query for Oracle 10g using the DBMS_SQLTUNE advisors.
It happens when I wrap either a large block of PL/SQL code that uses bind variables or multiple nested subqueries with multiple JOIN conditions in a SELECT query statement that I wish to tune using the 10g SQLTUNE advisors.
Message was edited by:
benprusinskiHi, I was trying to use the DBMS_SQLTUNE package to tune my sql statements used in the huge procedure. I can successfully create a task and execute it. But when I run report tuning task, I'm always getting error like the one in below example. Two questions I have now.
1) Is this becuase I'm using bind, but not passing any values?
2) Can I able to use to this package to tune a procedures instead of sql statement?
Example output...
SQL> SELECT DBMS_SQLTUNE.REPORT_TUNING_TASK( 'my_sql_tuning_task3')
2 FROM DUAL;
DBMS_SQLTUNE.REPORT_TUNING_TASK('MY_SQL_TUNING_TASK3')
GENERAL INFORMATION SECTION
Tuning Task Name : my_sql_tuning_task3
Tuning Task Owner : SCOTT
Scope : COMPREHENSIVE
Time Limit(seconds) : 3000
Completion Status : COMPLETED
Started at : 02/26/2009 21:44:41
Completed at : 02/26/2009 21:44:41
Number of Errors : 1
DBMS_SQLTUNE.REPORT_TUNING_TASK('MY_SQL_TUNING_TASK3')
Schema Name: KPRAVEEN
SQL ID : 479831s42xj1n
SQL Text : SELECT a.pdrorn, a.pdrcto, a.pdrlln FROM f4311 a
WHERE a.pddoco = receiptsrcrec.prdoco AND a.pddcto = :2 AND
a.pdkcoo = :3 AND a.pdsfxo = :4 AND a.pdlnid = :5
ERRORS SECTION
SQL> -
Hi,
I am using dbms_sqltune package for sql tuning in 10g. In DBMS_SQLTUNE.CREATE_TUNING_TASK one paramter is bind_list.i want to pass the parameter for sql.suppose two dates.Pls tell me how can i do.
Thanks
ReenaHi, this is what I found in teh documantation:
Table 101-14 CREATE_TUNING_TASK Function Parameters
Parameter Description
sql_text The text of a SQL statement
begin_snap Begin snapshot identifier
end_snap End snapshot identifier
sql_id The identifier of a SQL statement
bind_list An ordered list of bind values in ANYDATA type
plan_hash_value The hash value of the SQL execution plan
sqlset_name The SQL tuning set name
basic_filter The SQL predicate to filter the SQL from the SQL tuning set
object_filter The object filter
rank(i) An order-by clause on the selected SQL
result_percentage A percentage on the sum of a ranking measure
result_limit The top L(imit) SQL from the (filtered/ranked) SQL
user_name The username for whom the statement is to be tuned
scope Tuning scope (limited/comprehensive)
time_limit The maximum duration in seconds for the tuning session
task_name An optional tuning task name
description A task of the SQL tuning session to a maximum of 256 characters
plan_filter Plan filter. It is applicable in case there are multiple plans (plan_hash_value) associated with the same statement. This filter allows for selecting one plan (plan_hash_value) only. Possible values are:
LAST_GENERATED: plan with the most recent timestamp
FIRST_GENERATED: plan with the earliest timestamp, the opposite to LAST_GENERATED
LAST_LOADED: plan with the most recent first_load_time statistics information
FIRST_LOADED: plan with the earliest first_load_time statistics information, the opposite to LAST_LOADED
MAX_ELAPSED_TIME: plan with the maximum elapsed time
MAX_BUFFER_GETS: plan with the maximum buffer gets
MAX_DISK_READS: plan with the maximum disk reads
MAX_DIRECT_WRITES: plan with the maximum direct writes
MAX_OPTIMIZER_COST: plan with the maximum optimizer cost
sqlset_owner The owner of the SQL tuning set, or NULL for the current schema owner
Hope it helps,
Lutz -
hi guys,
need some clearification.
to use dbms_space‘s unused_space, space_usage and free_space , do i need to purcahse a license?
I am afraid there are other procedure in the package are linked to the AWR licensing. ( segment/ space advisor ) -> diagnostic pack.
Abit confuse about it cause read that, if your db version is NOT SE version you are free to use?It doesn't require an additional license. You can check that yourself easy with the new parameter control_management_pack_access
SQL> alter system set control_management_pack_access=none;
SQL > variable unf number;
variable unfb number;
variable fs1 number;
variable fs1b number;
variable fs2 number;
variable fs2b number;
variable fs3 number;
variable fs3b number;
variable fs4 number;
variable fs4b number;
variable full number;
variable fullb number;
begin
dbms_space.space_usage('ADAM','SALES',
'TABLE',
:unf, :unfb,
:fs1, :fs1b,
:fs2, :fs2b,
:fs3, :fs3b,
:fs4, :fs4b,
:full, :fullb);
end;
PL/SQL procedure successfully completed.But the dbms_sqltune package is not free:
SQL > declare
tempstring varchar2(300);
task_id varchar2(200);
begin
tempstring := 'select count(*) from adam.sales';
task_id := dbms_sqltune.create_tuning_task(sql_text => tempstring, task_name=>'SQLPROFIL1');
dbms_sqltune.execute_tuning_task('SQLPROFIL1');
end;
declare
ERROR at line 1:
ORA-13717: Tuning Package License is needed for using this feature.
ORA-06512: at "SYS.PRVT_SMGUTIL", line 52
ORA-06512: at "SYS.PRVT_SMGUTIL", line 37
ORA-06512: at "SYS.DBMS_MANAGEMENT_PACKS", line 26
ORA-06512: at "SYS.DBMS_SQLTUNE", line 576
ORA-06512: at line 6Kind regards
Uwe Hesse
http://uhesse.wordpress.com -
Question Regarding SQL logic error!
Hello everyone,
I get the following error when executing an Informatica mapping with teh following SQL in the Source Qualifier.
error - OR- 00936: missing expression.
Can anyone help please!
SELECT
PS_CUSTOMER.SETID
, PS_CUSTOMER.CUST_ID
, PS_CUSTOMER.CUST_STATUS
, PS_CUSTOMER.ADD_DT
, PS_CUSTOMER.NAME1
, PS_CUSTOMER.TAXPAYER_ID
, PS_CUSTOMER.WEB_URL
, PS_CUSTOMER.LAST_MAINT_OPRID
, PS_CUSTOMER.DATE_LAST_MAINT
, PS_CUST_SIC_CODES.SIC_CD_QUAL
, PS_CUST_SIC_CODES.SIC_CODE
, PS_CUST_CGRP_LNK.CUST_GRP_TYPE
, PS_CUST_CGRP_LNK.CUSTOMER_GROUP
, PS_CUST_CGRP_LNK.LASTUPDDTTM
, PS_CUST_ID_NBRS.STD_ID_NUM
, PS_CUSTOMER.SUBCUST_QUAL1
FROM PS_CUSTOMER
select SIC1.SETID, SIC1.CUST_ID, MAX(SIC1.SIC_CODE) SIC_CODE, SIC1.SIC_CD_QUAL
from PS_CUST_SIC_CODES SIC1
where SIC1.SIC_CD_QUAL =
( select MAX(SIC_CD_QUAL)
from PS_CUST_SIC_CODES SIC2
where SIC2.CUST_ID = SIC1.CUST_ID
and SIC2.SETID = SIC1.SETID
group by SETID, CUST_ID, SIC1.SIC_CD_QUAL
) PS_CUST_SIC_CODES
select A.CUST_ID, A.SETID, A.CUST_GRP_TYPE
, MAX(A.CUSTOMER_GROUP) CUSTOMER_GROUP, A.LASTUPDDTTM
from PS_CUST_CGRP_LNK A
where A.CUST_GRP_TYPE =
SELECT MAX(CUST_GRP_TYPE)
FROM PS_CUST_CGRP_LNK B
WHERE A.CUST_ID = B.CUST_ID
AND A.SETID = B.SETID
AND A.LASTUPDDTTM = B.LASTUPDDTTM
AND B.LASTUPDDTTM =
SELECT MAX(LASTUPDDTTM)
FROM PS_CUST_CGRP_LNK C
WHERE C.CUST_ID = B.CUST_ID
AND C.SETID = B.SETID
GROUP BY CUST_ID, SETID, CUST_GRP_TYPE, LASTUPDDTTM
) PS_CUST_CGRP_LNK
select SETID, CUST_ID, STD_ID_NUM
from PS_CUST_ID_NBRS
where STD_ID_NUM_QUAL = 'DNS'
) PS_CUST_ID_NBRS
WHERE
{ PS_CUSTOMER
LEFT OUTER JOIN
PS_CUST_SIC_CODES ON
PS_CUSTOMER.SETID = PS_CUST_SIC_CODES.SETID
AND PS_CUSTOMER.CUST_ID = PS_CUST_SIC_CODES.CUST_ID
LEFT OUTER JOIN
PS_CUST_CGRP_LNK ON
PS_CUSTOMER.SETID = PS_CUST_CGRP_LNK.SETID
AND PS_CUSTOMER.CUST_ID = PS_CUST_CGRP_LNK.CUST_ID
LEFT OUTER JOIN
PS_CUST_ID_NBRS ON
PS_CUSTOMER.SETID = PS_CUST_ID_NBRS.SETID
AND PS_CUSTOMER.CUST_ID = PS_CUST_ID_NBRS.CUST_ID
ORDER BY PS_CUSTOMER.CUST_ID , PS_CUSTOMER.SETID
Thanks,
Ajay.Kramer wrote:
Hi
So.. do we have to pay for the feature regarding sql tuning advisor?
Can we use the dbms_sqltune package for free in oracle?
No, you need the license. Please read below,
http://download.oracle.com/docs/cd/E11882_01/license.112/e10594/options.htm#CIHFIHFG
I `m doing below test on my Linux. I installed an oracle on it and only for study purpose so didn`t pay.
As you can see. I got no output.
SQL> exec dbms_sqltune.execute_tuning_task('TASK_1634');
PL/SQL procedure successfully completed.
SQL> select dbms_sqltune.report_tuning_task('TASK_1634') from dual;
DBMS_SQLTUNE.REPORT_TUNING_TASK('TASK_1634')
GENERAL INFORMATION SECTION
Please read the below link to learn how to use the STA.
http://download.oracle.com/docs/cd/E11882_01/server.112/e16638/sql_tune.htm
HTH
Aman.... -
How to use 10g's SQL tuning support from SQL*Plus
Hi,
I am having problems with my application's SQL queries execution time. I am not tuning guru, I know pretty little about tuning. As I read 10g has a SQL Tuning Advisor. Can I use it from SQL*Plus? I didn't say, but do not have the possibility to access the database, by no other means only SQL*Plus.
TIA
Regards,
Tamas SzecsyIf you have granted the ADVISOR privilege you may use it from SQL*PLUS
Look for examples on the web
(using DBMS_SQLTUNE package) -
SQL Tuning Advisor evaluates statement using wrong plan_hash_value
The execution plan for one of my SQL statements changed this morning. The statement is in a third-party package. The new plan runs worse than the old plan. I had the SQL tuning advisor evaluate the statement. I ran it three times. Each time it evaluated the original plan, not the new one. I can tell that because the plan_hash_value shown in the advisor's recommendations is the old plan's plan_hash_value. The old plan no longer appears in DBA_HIST_SQL_PLAN. I do not understand why the advisor is using the original plan, nor where it is getting it. It does not show up in Oracle Enterprise Manager either.
Has anyone see this before?
Do you have any suggestions how I can force the advisor to evaluate the new execution plan?
I am running Oracle Database Server 10gR2 Enterprise Edition.
Thanks,
BillFollowing advice given earlier, I ran the SQL Tuning Advisor by executing DBMS_SQLTUNE from within a SQL*Plus session instead of via Oracle Enterprise Manager. The problem I originally encountered in OEM also happened using DBMS_SQLTUNE. Using DBMS_SQLTUNE I specified plan_hash_value => '3657286666' but the results of running create_tuning_task shows that the utility used a different plan_hash_value. See below:
Based on this, I think the problem I originally blamed on OEM's creation of a SQL Tuning Advisor job was misdirected. I now believe that OEM supplied the proper information to the advisor, but the advisor did not correctly use what is was given.
Below is what I submitted when I ran create_tuning_task and execute_tuning_task. Note that the value assigned to plan_hash_value is 3657286666. Following the messages from execute_tuning_task, see the output produced by the execution of report_tuning_task. In EXPLAIN PLANS SECTION heading 1 - ORIGINAL, note that Plan Hash Value = 3541843898.
I submitted instructions to use plan_hash_value 3657286666 but instead it used 3541843898. Why did it do this??????
I have not found a published bug that describes this condition.
Thanks,
Bill
SQL> DECLARE
2 stmt_task VARCHAR2(64);
3 BEGIN
4 stmt_task:=dbms_sqltune.create_tuning_task(sql_id => 'ab30ujpshkur3', plan_hash_
value => '3657286666', time_limit => 3600, task_name => 'Tune_ab30ujpshkur3_3657286666'
, description => 'Task to tune sql_id ab30ujpshkur3 plan_hash_value 3657286666');
5 END;
6 /
PL/SQL procedure successfully completed.
SQL> EXECUTE dbms_sqltune.execute_tuning_task('Tune_ab30ujpshkur3_3657286666');
PL/SQL procedure successfully completed.
Here is the output produced by report_tuning_task:
SQL> SET linesize 200
SQL> SET LONG 999999999
SQL> SET pages 1000
SQL> SET longchunksize 20000
SQL> SELECT dbms_sqltune.report_tuning_task('Tune_ab30ujpshkur3_3657286666', 'TEXT', 'ALL') FROM dual;
SELECT dbms_sqltune.script_tuning_task('Tune_ab30ujpshkur3_3657286666', 'ALL')
FROM dual;
DBMS_SQLTUNE.REPORT_TUNING_TASK('TUNE_AB30UJPSHKUR3_3657286666','TEXT','ALL')
GENERAL INFORMATION SECTION
Tuning Task Name : Tune_ab30ujpshkur3_3657286666
Tuning Task Owner : EXPTEST
Tuning Task ID : 110190
Scope : COMPREHENSIVE
Time Limit(seconds) : 3600
Completion Status : COMPLETED
Started at : 08/03/2012 14:47:45
Completed at : 08/03/2012 14:48:54
Number of Index Findings : 1
Schema Name: EXPTEST
SQL ID : ab30ujpshkur3
SQL Text : SELECT ATTACHED_ACC_ID FROM SERVICE_EVENTS WHERE TSERV_ID = :B4
AND EQ_NBR = :B3 AND ASSOC_EQ_NBR = :B2 AND (PERFORMED <= :B1 +
1/1440 AND PERFORMED >= :B1 - 1/1440)
FINDINGS SECTION (1 finding)
1- Index Finding (see explain plans section below)
The execution plan of this statement can be improved by creating one or more
indices.
Recommendation (estimated benefit: 100%)
- Consider running the Access Advisor to improve the physical schema design
or creating the recommended index.
create index EXPTEST.IDX$$_1AE6E0001 on
EXPTEST.SERVICE_EVENTS('EQ_NBR','ASSOC_EQ_NBR');
Rationale
Creating the recommended indices significantly improves the execution plan
of this statement. However, it might be preferable to run "Access Advisor"
using a representative SQL workload as opposed to a single statement. This
will allow to get comprehensive index recommendations which takes into
account index maintenance overhead and additional space consumption.
EXPLAIN PLANS SECTION
1- Original
Plan hash value: 3541843898
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)|
Time |
| 0 | SELECT STATEMENT | | 1 | 32 | 4 (0)|
00:00:01 |
|* 1 | FILTER | | | | |
|
|* 2 | TABLE ACCESS BY INDEX ROWID| SERVICE_EVENTS | 1 | 32 | 4 (0)|
00:00:01 |
|* 3 | INDEX RANGE SCAN | SEVENTS_PERFORMED | 18 | | 2 (0)|
00:00:01 |
Query Block Name / Object Alias (identified by operation id):
1 - SEL$1
2 - SEL$1 / SERVICE_EVENTS@SEL$1
3 - SEL$1 / SERVICE_EVENTS@SEL$1
Predicate Information (identified by operation id):
1 - filter(:B1+.000694444444444444444444444444444444444444>=:B1-.0006944444444444444
444
44444444444444444444)
2 - filter("EQ_NBR"=:B3 AND "ASSOC_EQ_NBR"=:B2 AND "TSERV_ID"=:B4)
3 - access("PERFORMED">=:B1-.000694444444444444444444444444444444444444 AND
"PERFORMED"<=:B1+.000694444444444444444444444444444444444444)
Column Projection Information (identified by operation id):
1 - "ATTACHED_ACC_ID"[VARCHAR2,12]
2 - "ATTACHED_ACC_ID"[VARCHAR2,12]
3 - "SERVICE_EVENTS".ROWID[ROWID,10]
2- Using New Indices
Plan hash value: 2568062050
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| T
ime |
| 0 | SELECT STATEMENT | | 1 | 32 | 2 (0)| 0
0:00:01 |
|* 1 | FILTER | | | | |
|
|* 2 | TABLE ACCESS BY INDEX ROWID| SERVICE_EVENTS | 1 | 32 | 2 (0)| 0
0:00:01 |
|* 3 | INDEX RANGE SCAN | IDX$$_1AE6E0001 | 1 | | 2 (0)| 0
0:00:01 |
Query Block Name / Object Alias (identified by operation id):
1 - SEL$1
2 - SEL$1 / SERVICE_EVENTS@SEL$1
3 - SEL$1 / SERVICE_EVENTS@SEL$1
Predicate Information (identified by operation id):
1 - filter(:B1+.000694444444444444444444444444444444444444>=:B1-.0006944444444444444
4
4444444444444444444444)
2 - filter("TSERV_ID"=:B4 AND "PERFORMED">=:B1-.000694444444444444444444444444444444
4
44444 AND "PERFORMED"<=:B1+.000694444444444444444444444444444444444444)
3 - access("EQ_NBR"=:B3 AND "ASSOC_EQ_NBR"=:B2)
Column Projection Information (identified by operation id):
1 - "ATTACHED_ACC_ID"[VARCHAR2,12]
2 - "ATTACHED_ACC_ID"[VARCHAR2,12]
3 - "SERVICE_EVENTS".ROWID[ROWID,10]
SQL> 2
DBMS_SQLTUNE.SCRIPT_TUNING_TASK('TUNE_AB30UJPSHKUR3_3657286666','ALL')
-- Script generated by DBMS_SQLTUNE package, advisor framework --
-- Use this script to implement some of the recommendations --
-- made by the SQL tuning advisor. --
-- NOTE: this script may need to be edited for your system --
-- (index names, privileges, etc) before it is executed. --
create index EXPTEST.IDX$$_1AE6E0001 on EXPTEST.SERVICE_EVENTS('EQ_NBR','ASSOC_EQ_NBR')
; -
OEM explain plan sown on SQL Details vs Tuning Advisor
In OEM, if I go to "Top SQL" and then get the "SQL Details" for a specific SQL Id there is a tab which shows the execution plan.
For the SQL I'm interested in, this plan shows very low values for cost, number of rows, etc. It also shows all table access being through indexes. It shows no values in the Time column.
Now on this page, if I click the button "Run SQL Tuning Advisor" and run an advisor it comes back with a recommendation that I'll ignore for now. Here's my real question. On the recommendations page there is a button "Original Explain Plan". If I click this the execution plan I get is similar but not exactly the same as the one I mentioned above on the SQL Details page. This one has very high values for cost, number of rows, etc. Some of the tables show as not using indexes.
What are the differences between these 2 pages? Is the first one an estimated plan and the second one the actual?
I've searched trying to find an explanation for this, but haven't. Thanks for any help explaining this.I tired running SQL Tuning Advisor with DBMS_SQLTUNE package, I think the output will help you understand.
Oracle 10g SQL Tuning
Adith -
Trying to write a package wrapper to dbms_workload_repository.
dbms_workload repository contains many functions and procedures. We are trying to code a version of the package that only allows the elements we want to be seen by developers and to protect the functions / procedures we do not want them to see. SO developers cant alter how many days of awr data etc but can run an awr from within grid control.
To do this I took the headers from the package and formed my own version. For the body I have either got my body doing calls to the sys package or else returning an application error. This all works, below is an example function:
CREATE OR REPLACE TYPE output AS table of varchar2(4000);
create or replace FUNCTION awr_report_text(l_dbid IN NUMBER,l_inst_num IN NUMBER,l_bid IN NUMBER,l_eid IN NUMBER,l_options IN NUMBER DEFAULT 0) RETURN output PIPELINED
IS
cursor c1 is select output from table(dbms_workload_repository.awr_report_text(l_dbid,l_inst_num,l_bid,l_eid,l_options));
BEGIN
for c1rec in c1
loop
pipe row(c1rec.output);
end loop;
return;
END;
However the package dbms_workload has the header for the function awr_report_text as follows:
FUNCTION AWR_REPORT_TEXT RETURNS AWRRPT_TEXT_TYPE_TABLE
Argument Name Type In/Out Default?
L_DBID NUMBER IN
L_INST_NUM NUMBER IN
L_BID NUMBER IN
L_EID NUMBER IN
L_OPTIONS NUMBER IN DEFAULT
I cannot get my function above to work to return the "awrrpt_text_type_table" as dbms_workload_repository does. It works fine with the output returned.
Can anyone assist with this?
The reason I want it to return as dbms_workload_repository does, is that I will create a private synonym to my package for users, then within grid control the calls will be as if running dbms_workload_repository, but the reality is the call would be to my package instead. (only for developers). Users without the synonym (dba team) would run the package normally. This means we can stop developers from changing baselines etc, i.e the parts of the package that are not for developer /tuners.
If anyone can help with this I would appreciate it.
thanks in advance.Assuming the right privileges are in place you can do:
SQL> create or replace package pkg
as
function awr_report_text (l_dbid in number,
l_inst_num in number,
l_bid in number,
l_eid in number,
l_options in number default 0
return awrrpt_text_type_table
pipelined;
end pkg;
Package created.
SQL> create or replace package body pkg
as
function awr_report_text (l_dbid in number,
l_inst_num in number,
l_bid in number,
l_eid in number,
l_options in number default 0
return awrrpt_text_type_table
pipelined
is
begin
for c in (select t.output
from table (dbms_workload_repository.awr_report_text (l_dbid, l_inst_num, l_bid, l_eid, l_options)) t)
loop
pipe row (awrrpt_text_type (c.output));
end loop;
return;
end awr_report_text;
end pkg;
Package body created. -
Error While Generating AWR reports
Hi All,
I am new to Oracle 10g. Whenever I try to run the AWR report using awrrpt.sql script I am getting below error messages. I am running this script as SYS user. Please help to generate the AWR reports. Thanks for the help in advance.
Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is awrrpt_1_22128_22131.html. To use this name,
press <return> to continue, otherwise enter an alternative.
Enter value for report_name: awrrpt_test.html
Using the report name awrrpt_test.html
select output from table(dbms_workload_repository.awr_report_html( :dbid,
ERROR at line 1:
ORA-04063: package body "SYS.DBMS_SWRF_REPORT_INTERNAL" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_SWRF_REPORT_INTERNAL"
ORA-06512: at "SYS.DBMS_WORKLOAD_REPOSITORY", line 309
ORA-06512: at line 1
Regards,
NanaiahHi,
When i tried to compile below packages. It gave 'Warning: Package altered with compilation errors.' message for both.
DBMS_SWRF_REPORT_INTERNAL
DBMS_SWRF_INTERNAL
Again i came back to original position. Now again all 4 objects are in INVALID state. Please advice.
Regards -
Hi, friends ..
I am using Oracle 11g standars edition(11.2.0.1.0) on solaris 10 platform.I do have a very strange probleem..when iam trying to capture awr report i am getting a blank
awr report contain ing nothing...like below section
---------------------------------------------------------------------------->
WARNING: Since the DB Time is less than one second, there was minimal foreground activity in the snapshot period. Some of the percentage values will be invalid.
WORKLOAD REPOSITORY report for
DB Name DB Id Instance Inst num Startup Time Release RAC
DISDB 771054785 disdb 1 30-Dec-10 10:12 11.2.0.1.0 NO
Host Name Platform CPUs Cores Sockets Memory (GB)
dissemination-new Solaris Operating System (x86-64) .00
Snap Id Snap Time Sessions Cursors/Session
Begin Snap: 1 30-Dec-10 11:30:21
End Snap: 2 30-Dec-10 12:30:52
Elapsed: 60.51 (mins)
DB Time: 0.00 (mins)
Report Summary
Cache Sizes
Begin End
Buffer Cache: M M Std Block Size: K
Shared Pool Size: 0M 0M Log Buffer: K
Load Profile
Per Second Per Transaction Per Exec Per Call
DB Time(s): 0.0 0.0 0.00 0.00
DB CPU(s): 0.0 0.0 0.00 0.00
Redo size:
Logical reads: 0.0 1.0
Block changes: 0.0 1.0
Physical reads: 0.0 1.0
Physical writes: 0.0 1.0
User calls: 0.0 1.0
Parses: 0.0 1.0
Hard parses:
W/A MB processed: 0.0 0.0
Logons:
Executes: 0.0 1.0
Rollbacks:
Transactions: 0.0
Instance Efficiency Percentages (Target 100%)
Buffer Nowait %: Redo NoWait %:
Buffer Hit %: In-memory Sort %:
Library Hit %: Soft Parse %:
Execute to Parse %: 0.00 Latch Hit %:
Parse CPU to Parse Elapsd %: % Non-Parse CPU:
Shared Pool Statisitics Not Available
Top 5 Timed Foreground Events
Event Waits Time(s) Avg wait (ms) % DB time Wait Class
DB CPU 0 100.00
Host CPU (CPUs: Cores: Sockets: )
Load Average Begin Load Average End %User %System %WIO %Idle
Instance CPU
%Total CPU %Busy CPU %DB time waiting for CPU (Resource Manager)
Memory Statistics
Begin End
Host Mem (MB):
SGA use (MB):
PGA use (MB):
% Host Mem used for SGA+PGA:
Main Report
Report Summary
Wait Events Statistics
SQL Statistics
Instance Activity Statistics
IO Stats
Buffer Pool Statistics
Advisory Statistics
Wait Statistics
Undo Statistics
Latch Statistics
Segment Statistics
Dictionary Cache Statistics
Library Cache Statistics
Memory Statistics
Streams Statistics
Resource Limit Statistics
Shared Server Statistics
init.ora Parameters
Back to Top
Wait Events Statistics
Time Model Statistics
Operating System Statistics
Operating System Statistics - Detail
Foreground Wait Class
Foreground Wait Events
Background Wait Events
Wait Event Histogram
Wait Event Histogram Detail (64 msec to 2 sec)
Wait Event Histogram Detail (4 sec to 2 min)
Wait Event Histogram Detail (4 min to 1 hr)
Service Statistics
Service Wait Class Stats
Back to Top
Time Model Statistics
No data exists for this section of the report.
Back to Wait Events Statistics
Back to Top
Operating System Statistics
No data exists for this section of the report.
Back to Wait Events Statistics
Back to Top
Operating System Statistics - Detail
No data exists for this section of the report.
Back to Wait Events Statistics
Back to Top
Foreground Wait Class
s - second, ms - millisecond - 1000th of a second
ordered by wait time desc, waits desc
%Timeouts: value of 0 indicates value was < .5%. Value of null is truly 0
Captured Time accounts for % of Total DB time .00 (s)
Total FG Wait Time: (s) DB CPU time: .00 (s)
Wait Class Waits %Time -outs Total Wait Time (s) Avg wait (ms) %DB time
DB CPU 0 100.00
Back to Wait Events Statistics
Back to Top
Foreground Wait Events
No data exists for this section of the report.
Back to Wait Events Statistics
Back to Top
Background Wait Events
No data exists for this section of the report.
Back to Wait Events Statistics
Back to Top
Wait Event Histogram
No data exists for this section of the report.
Back to Wait Events Statistics
Back to Top
Wait Event Histogram Detail (64 msec to 2 sec)
No data exists for this section of the report.
Back to Wait Events Statistics
Back to Top
Wait Event Histogram Detail (4 sec to 2 min)
No data exists for this section of the report.
Back to Wait Events Statistics
Back to Top
Wait Event Histogram Detail (4 min to 1 hr)
No data exists for this section of the report.
Back to Wait Events Statistics
Back to Top
Service Statistics
No data exists for this section of the report.
Back to Wait Events Statistics
Back to Top
Service Wait Class Stats
No data exists for this section of the report.
Back to Wait Events Statistics
Back to Top
SQL Statistics
SQL ordered by Elapsed Time
SQL ordered by CPU Time
SQL ordered by User I/O Wait Time
SQL ordered by Gets
SQL ordered by Reads
SQL ordered by Physical Reads (UnOptimized)
SQL ordered by Executions
SQL ordered by Parse Calls
SQL ordered by Sharable Memory
SQL ordered by Version Count
Complete List of SQL Text
Back to Top
SQL ordered by Elapsed Time
No data exists for this section of the report.
Back to SQL Statistics
Back to Top
SQL ordered by CPU Time
No data exists for this section of the report.
Back to SQL Statistics
Back to Top
SQL ordered by User I/O Wait Time
No data exists for this section of the report.
Back to SQL Statistics
Back to Top
SQL ordered by Gets
No data exists for this section of the report.
Back to SQL Statistics
Back to Top
SQL ordered by Reads
No data exists for this section of the report.
Back to SQL Statistics
Back to Top
SQL ordered by Physical Reads (UnOptimized)
No data exists for this section of the report.
Back to SQL Statistics
Back to Top
SQL ordered by Executions
No data exists for this section of the report.
Back to SQL Statistics
Back to Top
SQL ordered by Parse Calls
No data exists for this section of the report.
Back to SQL Statistics
Back to Top
SQL ordered by Sharable Memory
No data exists for this section of the report.
Back to SQL Statistics
Back to Top
SQL ordered by Version Count
No data exists for this section of the report.
Back to SQL Statistics
Back to Top
Complete List of SQL Text
No data exists for this section of the report.
Back to SQL Statistics
Back to Top
Instance Activity Statistics
Instance Activity Stats
Instance Activity Stats - Absolute Values
Instance Activity Stats - Thread Activity
Back to Top
Instance Activity Stats
No data exists for this section of the report.
Back to Instance Activity Statistics
Back to Top
Instance Activity Stats - Absolute Values
No data exists for this section of the report.
Back to Instance Activity Statistics
Back to Top
Instance Activity Stats - Thread Activity
No data exists for this section of the report.
Back to Instance Activity Statistics
Back to Top
IO Stats
IOStat by Function summary
IOStat by Filetype summary
IOStat by Function/Filetype summary
Tablespace IO Stats
File IO Stats
Back to Top
IOStat by Function summary
No data exists for this section of the report.
Back to IO Stats
Back to Top
IOStat by Filetype summary
No data exists for this section of the report.
Back to IO Stats
Back to Top
IOStat by Function/Filetype summary
No data exists for this section of the report.
Back to IO Stats
Back to Top
Tablespace IO Stats
No data exists for this section of the report.
Back to IO Stats
Back to Top
File IO Stats
No data exists for this section of the report.
Back to IO Stats
Back to Top
Buffer Pool Statistics
Buffer Pool Statistics
Checkpoint Activity
Back to Top
Buffer Pool Statistics
No data exists for this section of the report.
Back to Buffer Pool Statistics
Back to Top
Checkpoint Activity
No data exists for this section of the report.
Back to Buffer Pool Statistics
Back to Top
Advisory Statistics
Instance Recovery Stats
MTTR Advisory
Buffer Pool Advisory
PGA Aggr Summary
PGA Aggr Target Stats
PGA Aggr Target Histogram
PGA Memory Advisory
Shared Pool Advisory
SGA Target Advisory
Streams Pool Advisory
Java Pool Advisory
Back to Top
Instance Recovery Stats
No data exists for this section of the report.
Back to Advisory Statistics
Back to Top
MTTR Advisory
No data exists for this section of the report.
Back to Advisory Statistics
Back to Top
Buffer Pool Advisory
No data exists for this section of the report.
Back to Advisory Statistics
Back to Top
PGA Aggr Summary
No data exists for this section of the report.
Back to Advisory Statistics
Back to Top
PGA Aggr Target Stats
No data exists for this section of the report.
Back to Advisory Statistics
Back to Top
PGA Aggr Target Histogram
No data exists for this section of the report.
Back to Advisory Statistics
Back to Top
PGA Memory Advisory
No data exists for this section of the report.
Back to Advisory Statistics
Back to Top
Shared Pool Advisory
No data exists for this section of the report.
Back to Advisory Statistics
Back to Top
SGA Target Advisory
No data exists for this section of the report.
Back to Advisory Statistics
Back to Top
Streams Pool Advisory
No data exists for this section of the report.
Back to Advisory Statistics
Back to Top
Java Pool Advisory
No data exists for this section of the report.
Back to Advisory Statistics
Back to Top
Wait Statistics
Buffer Wait Statistics
Enqueue Activity
Back to Top
Buffer Wait Statistics
No data exists for this section of the report.
Back to Wait Statistics
Back to Top
Enqueue Activity
No data exists for this section of the report.
Back to Wait Statistics
Back to Top
Undo Statistics
Undo Segment Summary
Undo Segment Stats
Back to Top
Undo Segment Summary
No data exists for this section of the report.
Back to Undo Statistics
Back to Top
Undo Segment Stats
No data exists for this section of the report.
Back to Undo Statistics
Back to Top
Latch Statistics
Latch Activity
Latch Sleep Breakdown
Latch Miss Sources
Mutex Sleep Summary
Parent Latch Statistics
Child Latch Statistics
Back to Top
Latch Activity
No data exists for this section of the report.
Back to Latch Statistics
Back to Top
Latch Sleep Breakdown
No data exists for this section of the report.
Back to Latch Statistics
Back to Top
Latch Miss Sources
No data exists for this section of the report.
Back to Latch Statistics
Back to Top
Mutex Sleep Summary
No data exists for this section of the report.
Back to Latch Statistics
Back to Top
Parent Latch Statistics
No data exists for this section of the report.
Back to Latch Statistics
Back to Top
Child Latch Statistics
No data exists for this section of the report.
Back to Latch Statistics
Back to Top
Segment Statistics
Segments by Logical Reads
Segments by Physical Reads
Segments by Physical Read Requests
Segments by UnOptimized Reads
Segments by Optimized Reads
Segments by Direct Physical Reads
Segments by Physical Writes
Segments by Physical Write Requests
Segments by Direct Physical Writes
Segments by Table Scans
Segments by DB Blocks Changes
Segments by Row Lock Waits
Segments by ITL Waits
Segments by Buffer Busy Waits
Back to Top
Segments by Logical Reads
Total Logical Reads: 1
Captured Segments account for 4.6E+06% of Total
Owner Tablespace Name Object Name Subobject Name Obj. Type Logical Reads %Total
SYS SYSTEM I_SYSAUTH1 INDEX 15,008 1500800.00
SYS SYSTEM I_OBJ2 INDEX 4,752 475200.00
SYS SYSTEM TAB$ TABLE 2,176 217600.00
SYS SYSTEM I_JOB_NEXT INDEX 1,856 185600.00
SYS SYSTEM SYS_C00646 INDEX 1,664 166400.00
Back to Segment Statistics
Back to Top
Segments by Physical Reads
Total Physical Reads: 1
Captured Segments account for 400.0% of Total
Owner Tablespace Name Object Name Subobject Name Obj. Type Physical Reads %Total
SYS SYSAUX WRH$_SYSMETRIC_SUMMARY_INDEX INDEX 3 300.00
SYS SYSTEM KOTAD$ TABLE 1 100.00
Back to Segment Statistics
Back to Top
Segments by Physical Read Requests
Total Physical Read Requests: 1
Captured Segments account for 400.0% of Total
Owner Tablespace Name Object Name Subobject Name Obj. Type Phys Read Requests %Total
SYS SYSAUX WRH$_SYSMETRIC_SUMMARY_INDEX INDEX 3 300.00
SYS SYSTEM KOTAD$ TABLE 1 100.00
Back to Segment Statistics
Back to Top
Segments by UnOptimized Reads
Total UnOptimized Read Requests: 1
Captured Segments account for 400.0% of Total
Owner Tablespace Name Object Name Subobject Name Obj. Type UnOptimized Reads %Total
SYS SYSAUX WRH$_SYSMETRIC_SUMMARY_INDEX INDEX 3 300.00
SYS SYSTEM KOTAD$ TABLE 1 100.00
Back to Segment Statistics
Back to Top
Segments by Optimized Reads
No data exists for this section of the report.
Back to Segment Statistics
Back to Top
Segments by Direct Physical Reads
No data exists for this section of the report.
Back to Segment Statistics
Back to Top
Segments by Physical Writes
Total Physical Writes: 1
Captured Segments account for 1.1E+04% of Total
Owner Tablespace Name Object Name Subobject Name Obj. Type Physical Writes %Total
SYSMAN SYSAUX MGMT_METRICS_RAW_PK INDEX 27 2700.00
SYS SYSAUX WRH$_SYSMETRIC_HISTORY TABLE 16 1600.00
SYS SYSAUX WRH$_SYSMETRIC_HISTORY_INDEX INDEX 16 1600.00
SYSMAN SYSAUX MGMT_SYSTEM_PERF_LOG_IDX_01 INDEX 9 900.00
SYS SYSAUX SMON_SCN_TIME TABLE 9 900.00
Back to Segment Statistics
Back to Top
Segments by Physical Write Requests
Total Physical Write Requestss: 1
Captured Segments account for 5.1E+03% of Total
Owner Tablespace Name Object Name Subobject Name Obj. Type Phys Write Requests %Total
SYSMAN SYSAUX MGMT_METRICS_RAW_PK INDEX 11 1100.00
SYS SYSAUX SMON_SCN_TIME TABLE 9 900.00
SYSMAN SYSAUX MGMT_SYSTEM_PERF_LOG_IDX_01 INDEX 6 600.00
SYSMAN SYSAUX MGMT_CURRENT_METRICS_PK INDEX 4 400.00
SYS SYSTEM I_JOB_NEXT INDEX 2 200.00
Back to Segment Statistics
Back to Top
Segments by Direct Physical Writes
No data exists for this section of the report.
Back to Segment Statistics
Back to Top
Segments by Table Scans
Total Table Scans: 1
Captured Segments account for 900.0% of Total
Owner Tablespace Name Object Name Subobject Name Obj. Type Table Scans %Total
SYS SYSTEM I_OBJ2 INDEX 9 900.00
Back to Segment Statistics
Back to Top
Segments by DB Blocks Changes
% of Capture shows % of DB Block Changes for each top segment compared
with total DB Block Changes for all segments captured by the Snapshot
Owner Tablespace Name Object Name Subobject Name Obj. Type DB Block Changes % of Capture
SYS SYSTEM I_JOB_NEXT INDEX 896 58.95
SYSMAN SYSAUX MGMT_METRICS_RAW_PK INDEX 160 10.53
SYSMAN SYSAUX MGMT_CURRENT_METRICS_PK INDEX 112 7.37
SYS SYSAUX SMON_SCN_TIME TABLE 80 5.26
SYSMAN SYSAUX MGMT_SYSTEM_PERF_LOG_IDX_01 INDEX 64 4.21
Back to Segment Statistics
Back to Top
Segments by Row Lock Waits
No data exists for this section of the report.
Back to Segment Statistics
Back to Top
Segments by ITL Waits
No data exists for this section of the report.
Back to Segment Statistics
Back to Top
Segments by Buffer Busy Waits
No data exists for this section of the report.
Back to Segment Statistics
Back to Top
Dictionary Cache Stats
No data exists for this section of the report.
Back to Top
Library Cache Activity
No data exists for this section of the report.
Back to Top
Memory Statistics
Memory Dynamic Components
Memory Resize Operations Summary
Memory Resize Ops
Process Memory Summary
SGA Memory Summary
SGA breakdown difference
Back to Top
Memory Dynamic Components
No data exists for this section of the report.
Back to Memory Statistics
Back to Top
Memory Resize Operations Summary
No data exists for this section of the report.
Back to Memory Statistics
Back to Top
Memory Resize Ops
No data exists for this section of the report.
Back to Memory Statistics
Back to Top
Process Memory Summary
No data exists for this section of the report.
Back to Memory Statistics
Back to Top
Back to Memory Statistics
Back to Top
SGA breakdown difference
No data exists for this section of the report.
Back to Memory Statistics
Back to Top
Streams Statistics
Streams CPU/IO Usage
Streams Capture
Streams Capture Rate
Streams Apply
Streams Apply Rate
Buffered Queues
Buffered Queue Subscribers
Rule Set
Persistent Queues
Persistent Queues Rate
Persistent Queue Subscribers
Back to Top
Streams CPU/IO Usage
No data exists for this section of the report.
Back to Streams Statistics
Back to Top
Streams Capture
No data exists for this section of the report.
Back to Streams Statistics
Back to Top
Streams Capture Rate
No data exists for this section of the report.
Back to Streams Statistics
Back to Top
Streams Apply
No data exists for this section of the report.
Back to Streams Statistics
Back to Top
Streams Apply Rate
No data exists for this section of the report.
Back to Streams Statistics
Back to Top
Buffered Queues
No data exists for this section of the report.
Back to Streams Statistics
Back to Top
Buffered Queue Subscribers
No data exists for this section of the report.
Back to Streams Statistics
Back to Top
Rule Set
No data exists for this section of the report.
Back to Streams Statistics
Back to Top
Persistent Queues
No data exists for this section of the report.
Back to Streams Statistics
Back to Top
Persistent Queues Rate
No data exists for this section of the report.
Back to Streams Statistics
Back to Top
Persistent Queue Subscribers
No data exists for this section of the report.
Back to Streams Statistics
Back to Top
Resource Limit Stats
No data exists for this section of the report.
Back to Top
Shared Server Statistics
Shared Servers Activity
Shared Servers Rates
Shared Servers Utilization
Shared Servers Common Queue
Shared Servers Dispatchers
Back to Top
Shared Servers Activity
No data exists for this section of the report.
Back to Shared Server Statistics
Back to Top
Shared Servers Rates
No data exists for this section of the report.
Back to Shared Server Statistics
Back to Top
Shared Servers Utilization
No data exists for this section of the report.
Back to Shared Server Statistics
Back to Top
Shared Servers Common Queue
No data exists for this section of the report.
Back to Shared Server Statistics
Back to Top
Shared Servers Dispatchers
No data exists for this section of the report.
Back to Shared Server Statistics
Back to Top
init.ora Parameters
No data exists for this section of the report.
Back to Top
Dynamic Remastering Stats
No data exists for this section of the report.
Back to Top
End of Report
---------------------------------------------->>
here intresting is that i also can't have the memory section view also.i trien to clear awr repositary and recreate it..bounce database,also tried taking different snap value.But does notmake any change.can u tell me why tha happening..and how can i get a good awr report.Hi there,
I have covered this in my blog entry on the subject. Check that link out for more licensing information and other resources.
The problem you are experiencing is caused by the fact that AWR is part of the DIAGNOSTIC and TUNING packs of Oracle 11g, which as of 11g is no longer a standard feature of the database but rather an optional extra which must be licensed in addition to your default Oracle Standard Edition package. In terms of the licensing, you just need to license it as an optional extra so that you will actually be using it legally, and then you can go ahead and enable it.
While it may be an additional licensed item, it is actually installed on your DB by default, but is just not enabled. So, once you have cleared the licensing issue, you will be free to enable diagnostics by setting the new database parameter, CONTROL_MANAGEMENT_PACK_ACCESS. You can do this by running the following as a dba:
<pre>alter system set control_management_pack_access="DIAGNOSTIC+TUNING" scope=both;</pre>
After running this command, your database will start accumulating diagnostic information. Note that you will need to wait until new snapshots are created in which the new diagnostic information will be available. I found that although most of the information became available after setting CONTROL_MANAGEMENT_PACK_ACCESS, it was only once the database was restarted that all of the information became available. I have seen many people reporting similar behavior.
Old snapshots will obviously continue to give the errors because they did not have the diagnostic information available at the time. -
Hello folks
I have the invalid package PERFSTAT.STATSPACK because the error Compilation errors for PACKAGE BODY PERFSTAT.STATSPACK because the errorr: PL/SQL: ORA-00980: synonym translation is no longer valid stats$x$ksppsv sv
Someone has an idea?
Tks
SpaulonciIt sounds like you upgraded your database but did not upgrade the statspack package.
Look to see if you have any recent sp data - look in stats$snapshot
There are upgrade scripts provided in $ORACLE_HOME/rdbms/admin/spup*.sql
If you are on 10g, try looking at AWR data - it's much like statspack and is enabled by default.
I usually disable statspack collection after upgrading to 10g and just use AWR data (e.g. dba_hist_*)
for a standard AWR report run $ORACLE_HOME/rdbms/admin/awrrpt.sql
Cheers -
AWR report problem after cluster node switch.
Hello all. I have some strange problem, can any one advice what to do....
I have OracleDB (Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 on Solaris x86_64), we have two server nodes and one shared storage attached to them, db is running on node1 and if it dies db will be switched to node2, classic cluster.
Some time ago we tested this switching, so i shut downed db and switch it to node2, and startup it there (oracle_homes are identical), every thing was ok, soo i switched it back to node1. But now i can't run awrrpt.sql or awrinfo.sql, it gives error like this:
Using the report name awrinfo.txt
No errors.
create or replace package body AWRINFO_UTIL as
ERROR at line 1:
ORA-03113: end-of-file on communication channel
No errors.
ERROR:
ORA-03114: not connected to ORACLE
And in alert log:
ORA-07445: exception encountered: core dump [SIGSEGV] [Address not mapped to object] [509] [] [] []
I tried to drop AWR with catnoawr.sql and recreate it with catawrtb.sql, everything seems to be fine, but still can't run awrrpt.sql or awrinfo.sql, same error.
Any one familiar with such problem ?
Thanks for advice.I understand that I provided less than satisfactory amount of info.
So here is more.
I am installing the two node cluster and during scinstall one of the nodes is being rebooted
and goes through (what I am suppose to be) an initial configuration. At the very end of the
boot process there is a message
obtaining access to all attached disksAt this point the boot disk activity LED is lit constantly. After some longish timeout
the following message is printed to console
NOTICE: /pci@0,0/pci1014,2dd@1f,2: port 0: device reset
WARNING: /pci@0,0/pci1014,2dd@1f,2/disk@0,0 (sd1):
Error for Command: read(10) Error Level: Retryable
Requested Block: 135323318 Error Block: 135323318
Vendor: ATA Serial Number:
Sense Key: No Additional Sense
ASC: 0x0 (no additional sense info), ASCQ: 0x0, FRU: 0x0and the disk activity LED is turned off. After that nothing more happens. The system isn't
hard hang, since the keyboard is working, and it responds to ping, but other than that
nothing seems to be functioning.
I understand that diagnosing such a problem isn't easy, but I am willing to invest some
time into getting it working. I would rally appreciate some help with this issue.
Regards,
Cyril
Maybe you are looking for
-
Can not find my Program in Lion Activity Monitor until reboot again
Hi, I have tried to installed the datacard driver and user interface program in Lion and reboot; however, the resident program to detect the device of datacard does not exist in Activity Monitor. I need to reboot again, then I can find it exits i
-
How to delete an app off iTunes that is no longer available
I am getting the error "An app xxxx was not installed on iphone xxxx because the app could not be found." I get this error at every sync. Basically the app is on iTune but not on the phone. I want to delete this app from iTunes - it is a sports ap
-
MacOS 10.5 Compatibility with ChemDraw
I am having problems with ChemDraw Ultra 9.0 and the ability to save documents using Leopard. Each time I try to save a document, the application crashes. The console log indicates a bus error. I have found a work around. In the ChemDraw Ultra 9 Pref
-
Basis Support package level of ECC 6.0
Dear All, I use SAP Version ECC 6.0 (700 Kernel, 64bit) Database SQL. My question is what should be the support package level of ECC 6.0? SAP recommends for the latest support package level always. But, whether the latest support package level will b
-
Migration to OX Server from Linux HA Cluster
Hello. I'm not sure if this is the correct forum for this topic, but I am looking for some friendly opinions on a possible solution to my organization's infrastructure. Basically I am looking to consolidate resources and reduce energy usage. I curren