I want the PL/SQL tuning material
Hi,
I need to learn to pl/sql tuning.can anyone provide me the PL/SQL TUNING material ASAP.
Plz mail to the following id : [email protected]
Thanks
Ravindra
http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96533/sqltrace.htm#1018
Similar Messages
-
I want the list sql queries performed someone in one session based
V$SESSION V$SQLTEXT and audsid (taken from sys_context('USERENV','SESSIONID') ) are great .. session_id be generated by a trigger when the application logs on) but then uploading the list of sql queries made by that user (application) until they log off seems impossible.
I've tried creating triggers that check if V$SESSION changes with respect to an audsid number and sql_hash_value but it didn't work. I'm trying to work out why.
In the meantime I thought I'd post this to see if anyone else foudn another way.
I don't want to use sql trace that just gives load of info, I just want simple sql queries.
Auditting seemed a bit complicated, can that list ALL DML and DDL commands made by a user? if so how?
thanks
Bobbyquite right.
Oracle enterprise dedicated server 9.2.0.8 on solaris 10.
I just want to log all command DML and DDL, without stats or anything like that, simply a list, in a chronological order would be nice.
I found something called dbms_fga package but not sure if thats what I want. Seems I have to implement it on specific tables. which is not good if the application hasn't created the tables yet.
Thanks in advance. -
How to Run SQL Tuning Advisor on the SQL statement with SQL_ID?
Can you give the steps to run the SQL tuning advisor on the SQL statement with SQL_ID?
Database version: 10g Release 2Hi,
You can use either the automatic SQL tuning features that are accessible from Enterprise Manager Database Console on the "Advisor Central" page or trough SQL*PLUS using the DBMS_SQLTUNE pakage:
-- creating the tuning task
set serveroutput on
declare
l_sql_tune_task_id varchar2(100);
begin
l_sql_tune_task_id := dbms_sqltune.create_tuning_task (
sql_id => '<your_sql_id>',
scope => dbms_sqltune.scope_comprehensive,
time_limit => 60,
task_name => '<your_tuning_task_name>',
description => 'tuning task for statement your_sql_id.');
dbms_output.put_line('l_sql_tune_task_id: ' || l_sql_tune_task_id);
end;
-- executing the tuning task
exec dbms_sqltune.execute_tuning_task(task_name => '<your_tuning_task_name>');
-- displaying the recommendations
set long 100000;
set longchunksize 1000
set pagesize 10000
set linesize 100
select dbms_sqltune.report_tuning_task('<your_tuning_task_name>') as recommendations from dual;For more information, take a look at link provided by Jaffy.
Cheers
Legatti -
I am hoping for a quick easy answer on this. grin
We have been generating a number of Sql Tuning Sets via Grid Control and now we want to export them. Of course, they all have these awful, non-descriptive names. How do we list them? I was unable to find any help in the "automatic SQL tuning" guide (Chapter 12) of the Performance Guide, and browsing the DBA_* and other fixed views has not revealed anything, yet.Does this help?
BANPROD_SQL > select id,name,owner,description,created from WRI$_SQLSET_DEFINITIONS order by 1 desc;
ID NAME OWNER DESCRIPTION CREATED
10 TUNING_SET_1141930799317 ORACLE Automatically generated by ADDM 09-MAR-06
9 TUNING_SET_1141921159123 ORACLE Automatically generated by ADDM 09-MAR-06
8 TUNING_SET_1141831053351 ORACLE Automatically generated by ADDM 08-MAR-06
7 TUNING_SET_1141826801391 ORACLE Automatically generated by ADDM 08-MAR-06
6 TOP_SQL_1141752418284 ORACLE Automatically generated by Top SQL 07-MAR-06
5 TOP_SQL_1141749589578 ORACLE Automatically generated by Top SQL 07-MAR-06
4 TOP_SQL_1141747575814 ORACLE Automatically generated by Top SQL 07-MAR-06
2 TOP_SQL_1141746930242 ORACLE Automatically generated by Top SQL 07-MAR-06
1 TUNING_SET_1141660362671 ORACLE Automatically generated by ADDM 06-MAR-06
9 rows selected. -
We have activated the Oracle 'SQL Tuning pack' however only one function "SQL Tuning Advisor" is activated/visible in ST04
and other functionality is not visible. We have already taken license of 'SQL Tuning pack' .
Other then this we want to use following oracle supported features.
1) Automatic SQL Tuning Advisor
2) Real-time SQL Monitoring
3) Object Reorganization Wizard
As I know we can use "oracle enterprise manager" to use such oracle features, If SAP allow use of OEM in SAP environment.
can someone help here please..?
Thanks,
Kapil PandeyHello Kapil,
which other options did you expect to find in ST04? SAP note 1028068 speaks only of the "SQL Tuning Advisor" which will be activated:
As of Enhancement Package 1 for Basis Release 7.00 (that is, Basis Release 7.01), the function "SQL Tuning Advisor" is contained in the DBA Cockpit. This optional function requires the Oracle Tuning Pack to be licensed.
The other features should be used via the OEM, because they are not integrated in the DBACOCKPIT transaction:
- Automatic SQL Tuning Advisor
- Real-time SQL Monitoring (with OEM you even get a really useful visualization)
- Object Reorganization Wizard -> better use brspace because it is supported by SAP
Regards,
Mark -
hello everyone i am an oracle developer working in oracle Forms and reports i have a keen interest in this database and would like to become a DBA.. pls suggest me some good books which can teach me about the whole oracle architecture and the other details.
Apart from that i want to study Sql tuning too for oracle 10g database.. please suggest me some good books regarding both these two topics.Hi,
Apart from that i want to study Sql tuning too for oracle 10g database.. please suggest me some good books regarding both these two topics.Apart from Oracle Documentation, there are many good references available in the market, go through the review and check the table of contents before deciding which book(s) you want to go with.
Oracle 10g DBA
http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=Oracle+10g+DBA
Oracle SQL Tuning
http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=Oracle+SQL+Tuning
Regards,
Hussein -
How to check SQL Tuning Advisor task is exist or not
How to check SQL Tuning Advisor task is exist or not using DBMS_SQLTUNE,
I want to remove SQL Tuning Advisor task only if it is exist using DBMS_SQLTUNE.DROP_TUNING_TASK functionTwo approaches.
1. Look up in DBA/USER_ADVISOR_TASKS, if it exists, drop it.
2. Drop it, ignore the exception
3. Drop it, catch the exception (specific exception if you want to rightly avoid such constructs as when others then null) obviously within an inner block is you want to catch and then move on to do other work.
SQL> declare
2 e_no_such_task exception;
3 pragma exception_init(e_no_such_task,-13605);
4 procedure forgetaboutit
5 as
6 begin
7 null;
8 end;
9 begin
10 begin
11 dbms_sqltune.drop_tuning_task('NON_EXISTENT_TASK');
12 exception
13 when e_no_such_task then
14 forgetaboutit;
15 end;
16 -- do something else
17 null;
18 end;
19 /
PL/SQL procedure successfully completed.
SQL> P.S. Ignore procedure forgetaboutit - just amusing myself... -
About Automatic SQL Tuning.
Hii all,
I have tuned one query by using SQL Tuning Advisor in SQL Developer Tool. I have seen much improvement in Explain plan in advisor .. After tuning finished i executed following script.
{code}
select dbms_sqltune.report_tuning_task('staName47421') as Rems
from dual;
{code}
I seen an explain plan but i am not able to see recommended changes in query .. Is it possible to get the query directly from any view ..
I tried and checked in many dynamic views by keeping plan_hash_value as reference .. I found records in some dynamic views like dba_sqltune_plans and dba_advisor_sqlstats but i am unable to find exact sqltext .. Kindly advice if possible to get that query .. My query was taking 17 mins but it got reduced to 2 mins by seeing sql tuned explain plan so i want to see as what are the changes been done .
Regards,
Nitesh.I would rather accept what is in the documentation:
"If a SQL profile is recommended, the database tests the new profile by executing the SQL statement both with and without the profile. If the performance improvement improves at least threefold, then the database accepts the SQL profile, but only if the ACCEPT_SQL_PROFILES task parameter is set to TRUE. Otherwise, the automatic SQL tuning reports merely report the recommendation to create a SQL profile." Automatic SQL Tuning
"If automatic implementation of SQL profiles is enabled (the default is disabled), then the database implements any SQL profiles that promise a great performance benefit. The implementation occurs at tuning time so that the database can immediately benefit from the new plan. You can enable or disable automatic implementation by using the SET_AUTO_TUNING_TASK_PARAMETER API to set the ACCEPT_SQL_PROFILES parameter." DBMS_AUTO_SQLTUNE -
ORA-13754: "SQL Tuning Set" "" does not exist for user "SYS"
While calling dbms_stats.seed_col_usage I got the following error. Can someone help me on how to resolve it
sqlplus
SQL*Plus: Release 11.2.0.1.0 Production on Thu Apr 14 14:37:38 2011
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Enter user-name: / as sysdba
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for IBM/AIX RISC System/6000: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
SQL> show user
USER is "SYS"
SQL> begin
2 dbms_stats.seed_col_usage(null,null,400);
3 end;
4 /
begin
ERROR at line 1:
ORA-13754: "SQL Tuning Set" "" does not exist for user "SYS".
ORA-06512: at "SYS.DBMS_SQLTUNE_INTERNAL", line 17379
ORA-06512: at "SYS.DBMS_STATS", line 28451
ORA-06512: at line 2
Thank You
SarayuAccording to the documentation:
SEED_COL_USAGE ProcedureThis procedure iterates over the SQL statements in the specified SQL tuning set, compiles them and seeds column usage information for the columns that appear in these statements.
Syntax
DBMS_STATS.SEED_COL_USAGE (
sqlset_name IN VARCHAR2,
owner_name IN VARCHAR2,
time_limit IN POSITIVE DEFAULT NULL);>
It looks like you need to provide a SQLSET_NAME and OWNER_NAME to use this procedure correctly, to which you've provided NULLs. I don't see any exceptions in the documentation that indicate special processing when NULLs are provided. -
Enterprise Manager - sql tuning advisor , Access advisor for SQL Tuning
Hi,
NO I mean in oracle 10g you have the enterprise manager which can be used to tune sql statements using the SQL ADvisor and SQL access advisor.
I believe in oracle 10g the process of SQL Tuning is slightly easier using the Enterprise Manager ...so if some one could explain me that process...
Again thanking you in advance
regds
Manoj GokhaleHi Manoj,
tune sql statements using the SQL ADvisor and SQL access advisor.Do you have the OEM extra cost "performance pack"?
The OEM screens are fairly self-explainatory, but here are some references on the 10 SQL tuning advisors:
http://www.oracle-base.com/articles/10g/AutomaticSQLTuning10g.php
http://www.remote-dba.net/oracle_10g_tuning/t_oracle_sql_tuning_advisor_session_example.htm -
[OCP exam] doubt about Automatic SQL Tuning Advisor
Hi,
Sorry for my poor english.
I am currently preparing for the OCP 11g exam.
For that, I have bought some training tools to help me prepare the exam.
But, in the chapter related to the SQL tuning advisor, some explanation really confuse me .
Extract :
<<
the SQL automatic tuning job runs every night during the maintenance window.
By default, the job makes SQL profile recommendations, tests them, and automatically implements them if they provide better performance improvement)
>>
I was persuaded it was the opposite.
I check several databases/documentation, and it's seems to be always the opposite.
By default,new sql profile are tested but not implemented automatically (you have to set a parameter ACCEPT_SQL_PROFILES TO TRUE to activate this option)
But the exam is validated on oracle 11.2.0.1, and I only have 11.2.0.2/11.2.0.3 db available.
So may be oracle changed the value of the default parameter in the new releases.
Can someone confirm if I am right or not ?I would rather accept what is in the documentation:
"If a SQL profile is recommended, the database tests the new profile by executing the SQL statement both with and without the profile. If the performance improvement improves at least threefold, then the database accepts the SQL profile, but only if the ACCEPT_SQL_PROFILES task parameter is set to TRUE. Otherwise, the automatic SQL tuning reports merely report the recommendation to create a SQL profile." Automatic SQL Tuning
"If automatic implementation of SQL profiles is enabled (the default is disabled), then the database implements any SQL profiles that promise a great performance benefit. The implementation occurs at tuning time so that the database can immediately benefit from the new plan. You can enable or disable automatic implementation by using the SET_AUTO_TUNING_TASK_PARAMETER API to set the ACCEPT_SQL_PROFILES parameter." DBMS_AUTO_SQLTUNE -
SQL Tuning Advisor on a specific SQL statement
Hi all,
How can I used SQL Tuning Advisor in Oracle EM Database Control to tune a specific SQL statement; i.e. the statement is not any of: Top SQL, SQL Tuning Sets, Snapshots Preserved Snapshot Sets.
Thanks in advance,
Ahmed B.Hi,
You can use either the automatic SQL tuning features that are accessible from Enterprise Manager Database Console on the "Advisor Central" page or trough SQL*PLUS using the DBMS_SQLTUNE pakage:
-- creating the tuning task
set serveroutput on
declare
l_sql_tune_task_id varchar2(100);
begin
l_sql_tune_task_id := dbms_sqltune.create_tuning_task (
sql_id => '<your_sql_id>',
scope => dbms_sqltune.scope_comprehensive,
time_limit => 60,
task_name => '<your_tuning_task_name>',
description => 'tuning task for statement your_sql_id.');
dbms_output.put_line('l_sql_tune_task_id: ' || l_sql_tune_task_id);
end;
-- executing the tuning task
exec dbms_sqltune.execute_tuning_task(task_name => '<your_tuning_task_name>');
-- displaying the recommendations
set long 100000;
set longchunksize 1000
set pagesize 10000
set linesize 100
select dbms_sqltune.report_tuning_task('<your_tuning_task_name>') as recommendations from dual;For more information, take a look at link provided by Jaffy.
Cheers
Legatti -
1Z0-117: Oracle Database 11g Release 2: SQL Tuning Need Materia and Dumps
Hi all,
We are preparing for 1Z0-117: Oracle Database 11g Release 2: SQL Tuning, There is shortage of material available on net.
Can anybody please provide books or Sample question answers and share more idea about the exan.
mail id XXXXXXXXXXXXX
Thanks in Advance
Sandeep
Edited by: 1005555 on 13 May, 2013 4:54 AM+
Mod: email deleted, don't draw discussion away from the forum.
Edited by: PhHein on 13.05.2013 14:16
Edited by: 1005555 on 13 May, 2013 10:16 PMWe are preparing for 1Z0-117: Oracle Database 11g Release 2: SQL Tuning, There is shortage of material available on net.There are actually a fair number of articles about the material covered on 117 on the net, but yes, the test is new enough that cheaters have not had much of a chance to email around illegal material such as dumps yet.
Can anybody please provide books or Dumps and share more idea about the exan.There is a significant amount of legitimate material you can use to study for the exam here:
http://www.oraclecertificationprep.com/apex/f?p=OCPSG:EXAM_DETAILS:0::NO::P2_EXAM:1Z0-117
As for ideas about the exam -- it's probably the hardest Oracle certification exam I have ever taken:
http://ocprep.blogspot.com/2013/03/1z0-117-this-exam-is-rough.html -
SQL Tuning Advisor against the session (is it poosible)
My Company customer has observed that there is job that are running longer than expected running(5 days).
They did not gave any information.they want me to run
SQL Tuning Advisor against the session running this job.
can you run sql tunning advisor against running session?
if so how
Please suggest me your valuable tips so that I approach this work properly.
DB = 11g
OS= Solaris 10>
...SQL Tuning Advisor against the session running this job.
can you run sql tunning advisor against running session?
>
SQL Tuning Advisor is run on statements and not sessions. I don't do much with SQL Tuning Advisor, but I'd consider that current running sessions a lost cause until it completes or you kill it. You can see the "estimate" of how long that current running SQL is going to take in v$session_longops. You can use a script like Tanel's sw.sql
http://blog.tanelpoder.com/2008/01/08/updated-session-wait-script/
to see what the wait interface has to say.
>
Please suggest me your valuable tips so that I approach this work properly.
>
My approach for this would be to determine what the current explain plan is and compare it to one that ran (correctly) in the past and then try to determine why it changed. (bad stats, dropped index, parameter changes, etc).
Cheers. -
Hi
I am using OS 10.6.8 and just installing logic pro 9. I am downloading the extra 20gig of material - the additional content packages. I am installing Logic on my laptop as well and dont want to download the extra 20 gig again. How do i go about transferring it from the computer to the laptop?
ThanksAnd now a second newbie question. I have downloaded the additional content and booted up logic for the first time, but the apple loops have not installed and logic is asking me to reinstall the apple loops. But how do I do that? I can see they are in the libray so have downloaded.
Thanks
Maybe you are looking for
-
I Own a 7th generation iPod classic. I dropped it the other day, and now when I plug in my headphones audio only comes out from one side . I used multiple headphones so , I know the problem is the iPod. I looked in the headphone jack and one side is
-
Jpegs won't open in Dreamweaver cs4 or Dreamweaver 8
I was using dreamweaver 8 just fine and then all of a sudden my newly created jpegs won't transfer to dreamweaver. They won't open no matter what program I create the jpeg in. The old ones that are saved on my desktop or image folders will still op
-
Some software not working anymore,,,,
Hi I dont knwo if I am in the right topic... I have a mac 10.6 and these software dont seem to work anymore... anfter i double lcick they seem to open for 1sec and then just close without any message or so... --------------roxio toast lite ----------
-
How do I create a link on some text which when clicked, prompts the download of a file stored on the site (in this case a .mpg)?
-
Hello, I have asked this question years ago and unfortunately I dont remember the answer. When I do the following code Employee employee = new Employee(); Employee empClone = (Employee)uow.registerObject(employee); Does TopLink Unit Of Work framework