45M用EXPDP导出了用户的DMP,然后在另一台机器进行恢复,没有报错
但是发现目标端的dba_source这个表中的所导入用户的type
的NAME发生了改变
具体的是TYPE类型,NAME名称类似于 SYS_PLSQL_ 开头的TYPE。
目标端和源端的数据库版本都是11.2.0.4
还有一个问题:就是dba_type表中用户的type个数和dba_source表中的对应个数不一致,dba_source中的type数量要多一些类型SYS_PLSQL_开头的TYPE。(就是多出的这些TYPE导入后名称发生了变化))
比如源端和目标端分别执行语句:
select name from dba_source where owner=‘HSCON’ and type=‘TYPE’ order by name
源端输出节选:

目标端输出节选

其中name列的部分数字部分发生了变化,但是具体的type的内容还是一样的。
在dba_ojjects里面也能查到这几个TYPE,目标端和源端的object_name不一致。都是类似于SYS_PLSQL开头的
并且dba_types表中的个数和dba_objects的个数不一样,导入后不一致的type名称就是dba_objects表中多出的这几个
评论
有用 0各位有什么想法请说说,一起探讨,谢谢.
查询oracle网站关于dba_objects和dba_type不一致的给出了解释如下:
Behavior has been introduced in Oracle11g
Rows of type$ shows the explanation why the objects are not shown in 11g:
properties value of such an object in 10.2: 128
properties value of such an object in 11g:2176
A where clause as present in {ALL|DBA|USER}_types to exclude system-generated types (2176)
Thus, objects are present in type$ but not shown in {ALL|DBA|USER}_types.
NO inconsistency exists in the data dictionary.
=== ODM Cause Justification ===
New system-generated types introduced in 11.2
SOLUTION
This is expected behavior and is working as designed.
REFERENCES
BUG:10630029 - EXISTING OBJECT “TYPE” EXISTS IN DBA_OBJECTS BUT NOT IN DBA_TYPES AFTER UPGRADE
评论
有用 0经查询,当创建或者执行PIPELINE函数时,系统会自动生成SYS_PLSQL_开头的TYPE,源端有类似的函数,恢复到目标端以后,系统自动生成了TYPE。感觉对数据和应用没有影响。相关连接参考:
https://blog.csdn.net/cqu63737/article/details/100237123
1,当引用pipelined functions时,且引用的pipelined包含引用了包体变更(record),会自动创建该包体变量sys_plsql_*对象。
2,当定义pipelined functions时,如果该过程引用了包体变量(record),会自动创建该包体变量相对应的sys_plsql_*对象。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11990065/viewspace-772105/,如需转载,请注明出处,否则将追究法律责任。
https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=ndql9rigo_4&_afrLoop=97452196605727
SQL> show user
USER is “SCOTT”
SQL> SELECT type_name, typecode
FROM user_types
WHERE type_name LIKE ‘SYS_PLSQL%’ ;
no rows selected
SQL> CREATE PACKAGE scott.TEST_PIPE AS
TYPE test_rows IS TABLE OF emp%ROWTYPE;
FUNCTION pipelined_test(c IN SYS_REFCURSOR)
RETURN test_rows PIPELINED;
END TEST_PIPE;
/
Package created.
SELECT type_name, typecode
FROM user_types
WHERE type_name LIKE ‘SYS_PLSQL%’ ; 2 3
TYPE_NAME TYPECODE
SYS_PLSQL_46288_66_1 OBJECT
SYS_PLSQL_46288_DUMMY_1 COLLECTION
SYS_PLSQL_51910_9_1 COLLECTION
SYS_PLSQL_51910_DUMMY_1 COLLECTION
Debra want to find the package assocuated to this TYPE say fpr example : SYS_PLSQL_51910_9_1 or SYS_PLSQL_51910_DUMMY_1
If i use the query which i provided in my last update i will get the assocaited Package name TEST_PIPE.
select a.object_name, object_type,b.type_name
from user_objects a, (SELECT distinct type_name, substr(type_name,11,5)id FROM user_types WHERE type_name LIKE ‘SYS%’)b
where object_id = b.id
and b.type_name=‘SYS_PLSQL_51910_9_1’;
OBJECT_NAME
OBJECT_TYPE TYPE_NAME
TEST_PIPE
PACKAGE SYS_PLSQL_51910_9_1
If you use SYS_PLSQL_46288_66_1 (Type code OBJECT) or SYS_PLSQL_46288_DUMMY_1 you will get object associcated with TYPE test_rows. i.e EMP.
select a.object_name, object_type,b.type_name
from user_objects a, (SELECT distinct type_name, substr(type_name,11,5)id FROM user_types WHERE type_name LIKE ‘SYS%’)b
where object_id = b.id
and b.type_name=‘SYS_PLSQL_46288_DUMMY_1’;
OBJECT_NAMe
OBJECT_TYPE TYPE_NAME
EMP
TABLE SYS_PLSQL_46288_DUMMY_1
评论
有用 0类似于SYS_PLSQL_开头的 是系统自动建立的格式为"SYS_PLSQL_%i_%c" , 其中%i 为object id ,如果其发生过变化, 导入时就会发生改变,不会对数据库造成任何影响
we additionally create a type with a name of the form “SYS_PLSQL_%i_%c” where “%i” represents the object id of the underlying object (table, package).
When importing an object its object id changes. All imported objects get a new objects id and the “SYS_PLSQL_%i_%c” types will also reflect the new object id.
评论
有用 0
墨值悬赏

