ITPub博客

首页 > 数据库 > Oracle > dbms_aq 堵塞处理

dbms_aq 堵塞处理

原创 Oracle 作者:weiranjie 时间:2009-06-18 10:26:23 0 删除 编辑

dbms_aq 堵塞处理 步骤:

今天数据迁移的时候,需要做赋权操作

grant execute on dbms_aq to aaaaa;

到这个地方就死到这里啦

处理步骤如下:

[@more@]

今天数据迁移的时候,需要做赋权操作

grant execute on dbms_aq to aaaaa;

到这个地方就死到这里啦

处理步骤如下:

SQL> set linesize 300;
SQL> select 'kill -9 '||a.spid,b.program,b.username,b.osuser from v$process a, v$session b,v$access c where a.addr=b.paddr and b.sid=c.sid and c.object like '%DBMS_AQ%' ;


查出使用DBMS_AQ 的这个包,告诉开发人员,杀掉程序,并且 kill 掉对应的spid

同时在进行数据迁移的过程中,type 不能正常的导入,需要借助 pl/sql 导出对应的 type

下面的语句是得出用户的权限

select 'grant '||tt.granted_role||' to '||tt.grantee||';' as SQL_text
from dba_role_privs tt where tt.grantee=(upper('c2g'))
union all
select 'grant '||tt.privilege||' to '||tt.grantee||';'
from dba_sys_privs tt where tt.grantee=(upper('c2g'))
union all
select 'grant '||tt.privilege||' on '||owner||'.'||table_name||' to '||tt.grantee||';'
from dba_tab_privs tt where tt.grantee=(upper('c2g'))
union all
select 'alter user '||tt.user_name||' quota '||maxblocks*blocksize||' on '||ts_name||';'
from KU$_TSQUOTA_VIEW tt where tt.user_name=(upper('c2g'));

详细的过程不再详细记录,再出问题的地方记录下来,作为备忘

迁移SEQUECE 数据脚本

select 'CREATE SEQUENCE ' || SEQUENCE_NAME || ' MINVALUE ' || MIN_VALUE || case
when Max_VALUE is not null then
' MAXVALUE ' || MAX_VALUE
else
' '
end || ' INCREMENT BY ' || INCREMENT_BY ||
decode(cycle_flag, 'Y', 'cycle ', ' ') ||
decode(order_flag, 'Y', 'order ', ' ') || 'cache ' || cache_size ||
' start with ' || to_number(last_number + 100) || ';'
from user_sequences;

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

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

注册时间:2011-02-24

  • 博文量
    70
  • 访问量
    246752