Bo's Oracle Station

查看: 1567|回复: 0

第23次:2014-08-12-1.sql

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2014-8-13 08:32:09 | 显示全部楼层 |阅读模式
  1. select * from dba_sql_profiles;

  2. begin
  3.    dbms_advisor.quick_tune(
  4.    advisor_name => 'SQL Access Advisor',
  5.    task_name => 'MYQUICK1',attr1 => 'select count(*)  from hr.tbig  group by type',template => 'SQLACCESS_WAREHOUSE') ;
  6.   end;
  7.   
  8.   begin
  9.      dbms_Stats.gather_table_stats('HR','TBIG');
  10.   end;
  11.   
  12.   begin
  13.    dbms_advisor.quick_tune(
  14.    advisor_name => 'SQL Access Advisor',
  15.    task_name => 'MYQUICK2',attr1 => 'select count(*)  from hr.tbig  group by type',template => 'SQLACCESS_WAREHOUSE') ;
  16.   end;
  17.   
  18.   
  19.     begin
  20.    dbms_advisor.quick_tune(
  21.    advisor_name => 'SQL Access Advisor',
  22.    task_name => 'MYQUICK3',attr1 => 'select count(*)  from hr.tbig  group by type',template => 'SQLACCESS_OLTP') ;
  23.   end;
  24.   
  25.   
  26.      begin
  27.    dbms_advisor.quick_tune(
  28.    advisor_name => 'SQL Access Advisor',
  29.    task_name => 'MYQUICK4',
  30.    attr1 => 'select  *   from hr.tbig  where  text like ''create or replace%'' ',template => 'SQLACCESS_OLTP') ;
  31.   end;
  32.   
  33.   
  34.   select  * from dba_scheduler_jobs  j  order  by  j.job_name;
  35.   
  36.   select  * from dba_outstanding_alerts;
  37.   
  38.   select * from dba_alert_history;
复制代码



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-12-5 02:46 , Processed in 0.028077 second(s), 24 queries .

快速回复 返回顶部 返回列表