10g 升级到11g 失效对象2则

########SAMPLE 0

Invalid X_$ Views & Synonyms After Upgrading to 11g (文档 ID 878623.1)

Those views and synonyms should be dropped in 11g as they do not exist.

This can be shown in a testcase using DBCA to create a new 11.1.0.7 database instance.
The new instance shows:


SQL> SELECT OWNER, OBJECT_NAME, OBJECT_TYPE, STATUS
FROM DBA_OBJECTS
WHERE OBJECT_NAME LIKE '%$KSLEI%';

no rows selected

So drop the views and any synonyms related to $kslei as they are not used in 11g.


The same applies when upgrading to 11GR2, e.g. after upgrading from 10.2.0.3 to 11.2.0.1, the following objects are invalid


OWNER OBJECT_NAME OBJECT_TYPE
------ ----------- -----------
SYS X_$KGLLK VIEW
PUBLIC X$KGLLK SYNONYM


Trying to compile the view X_$KGLLK fails like below:


SQL> alter view SYS.X_$KGLLK compile;

Warning: View altered with compilation errors.

SQL> select text from dba_errors where name='X_$KGLLK';

ORA-00904: "KGLLKHTB": invalid identifier


As of 11g, the column KGLLKHTB no longer exists in the table X$KGLLK and the public synonym X$KGLLK is no longer defined:


SQL> desc sys.X$KGLLK
Name Null? Type
----------------------------------------- -------- --------------------------
ADDR RAW(8)
INDX NUMBER
INST_ID NUMBER
KGLLKADR RAW(8)
KGLLKUSE RAW(8)
KGLLKSES RAW(8)
KGLLKSNM NUMBER
KGLLKHDL RAW(8)
KGLLKPNC RAW(8)
KGLLKPNS RAW(8)
KGLLKCNT NUMBER
KGLLKMOD NUMBER
KGLLKREQ NUMBER
KGLLKFLG NUMBER
KGLLKSPN NUMBER
KGLNAHSH NUMBER
KGLLKSQLID VARCHAR2(13)
KGLHDPAR RAW(8)
KGLHDNSP NUMBER
USER_NAME VARCHAR2(30)
KGLNAOBJ VARCHAR2(60)
KGLLKEST DATE
KGLLKEXC NUMBER
KGLLKCTP VARCHAR2(64)


SQL> select owner, synonym_name, table_name
from all_synonyms
where synonym_name='X$KGLLK';

no rows selected


Given the above, both the public synonym X$KGLLK and invalid view SYS.X_$KGLLK can be dropped in 11G.

###############SAMPLE 2:

猜你喜欢

转载自www.cnblogs.com/feiyun8616/p/10745648.html