Home > Oracle > using quick tune feature of DBMS_ADVISOR

using quick tune feature of DBMS_ADVISOR

  • create a directory for the output

CREATE OR REPLACE DIRECTORY advisor
AS '/dbbackup/advisor'';

GRANT READ,WRITE ON DIRECTORY advisor TO PUBLIC;

  • Execute the sql statement using advisor

EXECUTE dbms_advisor.quick_tune ( -  DBMS_ADVISOR.SQLACCESS_ADVISOR, -
  task_name => 'job1', -  attr1 => 'SELECT jobid  FROM jobtag WHERE clientid = :c1');

  • generate the advice script

EXECUTE dbms_advisor.create_file (  buffer => dbms_advisor.get_task_script (task_name => 'job1'),   location => 'ADVISOR', -
  filename => 'job1.sql');

Advertisements
Categories: Oracle
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: