dbms_aq 堵塞处理

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博客 ” ,链接:http://blog.itpub.net/66233/viewspace-1023247/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/66233/viewspace-1023247/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值