linux18008端口无法访问,ORA-18008: cannot find OUTLN schema问题处理

腊月二十,快过年了接到某用户现场同事的电话,数据库无法使用,感觉很揪心,年前问题不断。。。

处理过程做个记录。

微信发过来的图片如下

f8132b251a23f3c66e03a4dabab1654b.png

据说是操作系统重启后就成了这个样子,可以登录,但是操作数据即会报这个错误。

根据错误提示是OUTLN用户神秘失踪了,现场是数据库版本为10.2

随远程协助其进行了处理,重建OUTLN用户

mos上解决办法如下:

Solution

Disable the problem trigger.

alter trigger MDSYS.SDO_ST_SYN_CREATE disable;https://www.cndba.cn/hehdba/article/3993

Create OUTLN user. (use Note 422983.1 or pull sql from sql.bsq file, in 11.2 the doptim.bsq file)

create user outln identified by outln;

Re-enable the trigger.

alter trigger MDSYS.SDO_ST_SYN_CREATE enable;

https://www.cndba.cn/hehdba/article/3993https://www.cndba.cn/hehdba/article/3993

按照文档10.2版本需要使用Doc ID 422983.1中的脚本

脚本如下:

set serveroutput on https://www.cndba.cn/hehdba/article/3993

DECLARE

user_exists EXCEPTION;

outln_user number;

outln_tables number;

extra_outln_tables number;

DDL_CURSOR integer;

BEGIN

select count(*) into outln_user from user$ where name=’OUTLN’; https://www.cndba.cn/hehdba/article/3993

select count(*) into outln_tables from obj$ where name in

(‘OL$’, ‘OL$HINTS’,’OL$NODES’) and owner#=

(select user# from user$ where name=’OUTLN’);

select count(*) into extra_outln_tables from obj$ where name not in

(‘OL$’, ‘OL$HINTS’,’OL$NODES’) and type#=2 and owner#=

(select user# from user$ where name=’OUTLN’);

DDL_CURSOR := dbms_sql.open_cursor;

IF outln_user = 0 THEN

dbms_sql.parse(DDL_CURSOR, ‘create user outln identified by outln’,

dbms_sql.native);

dbms_sql.parse(DDL_CURSOR,

‘grant connect, resource, execute any procedure to outln’,

dbms_sql.native);

dbms_sql.parse(DDL_CURSOR, ‘create table outln.ol$ ( ‘||

‘ol_name varchar2(30), ‘ ||

‘sql_text long, ‘ ||

‘textlen number, ‘ ||

‘signature raw(16), ‘ ||

‘hash_value number, ‘ ||

‘hash_value2 number, ‘ ||

‘category varchar2(30), ‘ ||

‘version varchar2(64), ‘ ||

‘creator varchar2(30), ‘ ||

‘timestamp date, ‘ ||

‘flags number, ‘ ||

‘hintcount number, ‘ ||

‘spare1 number, ‘ ||

‘spare2 varchar2(1000))’, dbms_sql.native);

dbms_sql.parse(DDL_CURSOR, ‘create table outln.ol$hints ( ‘||

‘ol_name varchar2(30), ‘||

‘hint# number, ‘||

‘category varchar2(30), ‘||

‘hint_type number, ‘||

‘hint_text varchar2(512), ‘||

‘stage# number, ‘||

‘node# number, ‘||

‘table_name varchar2(30), ‘||

‘table_tin number, ‘||

‘table_pos number, ‘||

‘ref_id number, ‘||

‘user_table_name varchar2(64), ‘||

‘cost FLOAT(126),’||

‘cardinality FLOAT(126),’||

‘bytes FLOAT(126),’||

‘hint_textoff number, ‘||

‘hint_textlen number,’||

‘join_pred varchar2(2000),’||

‘spare1 number, ‘||

‘spare2 number, ‘||

‘hint_string clob)’, dbms_sql.native);

dbms_sql.parse(DDL_CURSOR, ‘create table outln.ol$nodes ( ‘||

‘ol_name varchar2(30), ‘||

‘category varchar2(30), ‘||

‘node_id number, ‘||

‘parent_id number, ‘||

‘node_type number, ‘||

‘node_textlen number, ‘||

‘node_textoff number, ‘||

‘node_name varchar2(64))’, dbms_sql.native);

dbms_sql.parse(DDL_CURSOR, ‘create unique index outln.ol$name ‘||

‘on outln.ol$(ol_name)’, dbms_sql.native);

dbms_sql.parse(DDL_CURSOR, ‘create unique index outln.ol$signature ‘||

‘ on outln.ol$(signature,category)’, dbms_sql.native);

dbms_sql.parse(DDL_CURSOR, ‘create unique index outln.ol$hnt_num ‘||

‘ on outln.ol$hints(ol_name, hint#)’, dbms_sql.native);

dbms_output.put_line(‘OUTLN CREATION SUCCESSFUL’);

ELSE

IF outln_tables!=3 or extra_outln_tables!=0 THEN

dbms_output.put_line(‘ERROR - OUTLN USER ALREADY EXISTS’);

RAISE user_exists;

ELSE

dbms_output.put_line(‘OUTLN CREATION SUCCESSFUL’);

END IF;

END IF;

EXCEPTION

WHEN user_exists THEN

RAISE; https://www.cndba.cn/hehdba/article/3993

END;

/

参考Recreating Dropped Outln Schema Errors With Ora-00604 And Ora-18008 (Doc ID 790116.1)

参考Script to Create User OUTLN in 10.2 (Doc ID 422983.1)https://www.cndba.cn/hehdba/article/3993https://www.cndba.cn/hehdba/article/3993

版权声明:本文为博主原创文章,未经博主允许不得转载。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值