ITPub博客

首页 > 数据库 > Oracle > unlock table

unlock table

Oracle 作者:season0891 时间:2014-01-13 16:35:04 0 删除 编辑
DECLARE CURSOR X1 IS 
select owner,table_name from dba_tab_statistics 
where owner='MVUSER2010' AND STATTYPE_LOCKED is not null and rownum <100;
v_eowner dba_tab_statistics.owner%type;
v_tname  dba_tab_statistics.table_name%type;
begin
open X1;
loop
fetch X1 INTO v_eowner,v_tname;
exit when X1%notfound;
dbms_output.put_line('exec dbms_stats.unlock_table_stats('||chr(39)||v_eowner||chr(39)||','||chr(39)||v_tname||chr(39)||');');
end loop;
close X1;
end;

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/90618/viewspace-1070085/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-06-10

  • 博文量
    790
  • 访问量
    2098024