当前位置: 首页 > ORA > 正文

ORA-06553: PLS-213: package STANDARD not accessible

       今天在自己的测试环境把9.2.0.4升级到9.2.0.8遇到ORA-06553: PLS-213: package STANDARD not accessible的报错。

       测试环境:OS:RHEL 4.8

1,执行catpatch.sql的时候报下面错误

SQL> STARTUP MIGRATE
ORACLE instance started.

Total System Global Area 1075282424 bytes
Fixed Size                   741880 bytes
Variable Size             419430400 bytes
Database Buffers          654311424 bytes
Redo Buffers                 798720 bytes
Database mounted.
Database opened.
SQL> @?/rdbms/admin/catpatch.sql
下面这样的错误,有很多

xdb.xdb$Extname2Intname(s.xmldata.schema_url,s.xmldata.schema_owner),
              *
ERROR at line 7:
ORA-04045: errors during recompilation/revalidation of XDB.XDB$EXTNAME2INTNAME
ORA-06553: PLS-213: package STANDARD not accessible
ORA-06553: PLS-213: package STANDARD not accessible


grant select on dba_xml_schemas to select_catalog_role
                *
ERROR at line 1:
ORA-04045: errors during recompilation/revalidation of SYS.DBA_XML_SCHEMAS
ORA-06553: PLS-213: package STANDARD not accessible
ORA-06553: PLS-213: package STANDARD not accessible

随便做任何操作基本上都要报ORA-06553的错误,open错误的时候也会报这个错误,但是数据库能正常打开。

2,禁用触发器

SQL> alter system set "_system_trig_enabled"=false; 
                                                    
System altered.                                     

再次升级还是报相同的错误。

3,查询无效对象

SQL> SELECT * FROM DBA_OBJECTS WHERE OWNER = 'SYS'                              
  2  AND OBJECT_NAME = 'STANDARD';                                              
                                                                                
OWNER                                                                           
------------------------------                                                  
OBJECT_NAME                                                                     
--------------------------------------------------------------------------------
SUBOBJECT_NAME                  OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE            
------------------------------ ---------- -------------- ------------------     
CREATED   LAST_DDL_ TIMESTAMP           STATUS  T G S                           
--------- --------- ------------------- ------- - - -                           
SYS                                                                             
STANDARD                                                                        
                                      647                PACKAGE                
10-MAR-04 24-APR-13 2001-11-19:00:00:00 INVALID N N N                           
                                                                                
SYS                                                                             
STANDARD                                                                        
                                      648                PACKAGE BODY           
10-MAR-04 10-MAR-04 2004-03-10:12:18:22 INVALID N N N                           

编译无效对象,使用系统自带的utlrp.sql来编译,仍然报相同的错误。使用命令来手动编译

SQL> Alter package sys.standard compile;                
                                                        
Warning: Package altered with compilation errors.       
                                                        
SQL> show error                                         
Errors for PACKAGE SYS.STANDARD:                        
                                                        
LINE/COL                                                
--------------------------------------------------------
ERROR                                                   
--------------------------------------------------------
0/0                                                     
PLS-00920: parameter plsql_native_library_dir is not set

发现了plsql_native_library_dir,突然想起了,上次在做11G迁移到9I的时候,好像弄个plsql相关的参数

SQL> show parameter plsql                                                    
                                                                             
NAME_COL_PLUS_SHOW_PARAM                                         TYPE        
---------------------------------------------------------------- ----------- 
VALUE_COL_PLUS_SHOW_PARAM                                                    
--------------------------------------------------------------------------
plsql_compiler_flags                                             string    
NATIVE                                                                     
plsql_native_c_compiler                                          string    
plsql_native_library_dir                                         string    
plsql_native_library_subdir_count                                integer   
0                                                                         
plsql_native_linker                                              string    
plsql_native_make_file_name                                      string    
plsql_native_make_utility                                        string    
plsql_v2_compatibility                                           boolean     
FALSE                                                                       
SQL> alter system set plsql_compiler_flags=INTERPRETED,NON_DEBUG scope=both;  
System altered.                                                      
SQL> Alter package sys.standard compile;                                                                   
Package altered.                                                             

编译通过,再次执行catpatch.sql没有再报于此相关的错误。

本文固定链接: http://www.htz.pw/2013/04/25/ora-06553-pls-213-package-standard-not-accessible.html | 认真就输

该日志由 huangtingzhong 于2013年04月25日发表在 ORA 分类下, 通告目前不可用,你可以至底部留下评论。
原创文章转载请注明: ORA-06553: PLS-213: package STANDARD not accessible | 认真就输
关键字: ,