博客
关于我
Oracle-impdp 按照用户导出,导入后发现存在部分索引不存在,缺失索引是关联其它用户创建的?
阅读量:445 次
发布时间:2019-03-06

本文共 2399 字,大约阅读时间需要 7 分钟。

 

疑问:Oracle-impdp 按照用户导出,导入后发现存在部分索引不存在,缺失索引是关联其它用户创建的?

???

如下测试一下:

11G 单实例测试了一下,数据泵按照用户导出,如果存在用户索引关联其它用户的表,不会被导入;SQL> show userUSER is “SYS”SQL> create table system.test1 tablespace users as select * from dba_objects;SQL> grant select on system.test1 to test_usr;SQL> create table system.test2 as select * from dba_objects;SQL> grant select on system.test2 to test_usr;SQL> select tablespace_name from dba_segments where owner=‘SYSTEM’ and segment_name=‘TEST2’;TABLESPACE_NAMESYSTEMSQL> create index test_usr.ind_object_id on system.test1(object_id);SQL> create index test_usr.ind_object_id2 on system.test2(object_id);$ expdp ‘/ as sysdba’ directory=TMP dumpfile=test.dmp owner=TEST_USR CONTENT=METADATA_ONLYProcessing object type SCHEMA_EXPORT/USERProcessing object type SCHEMA_EXPORT/SYSTEM_GRANTProcessing object type SCHEMA_EXPORT/ROLE_GRANTProcessing object type SCHEMA_EXPORT/DEFAULT_ROLEProcessing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMAProcessing object type SCHEMA_EXPORT/TABLE/TABLEProcessing object type SCHEMA_EXPORT/TABLE/INDEX/INDEXProcessing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICSMaster table “SYS”.“SYS_EXPORT_SCHEMA_01” successfully loaded/unloaded$ impdp ‘/ as sysdba’ directory=TMP dumpfile=test.dmp sqlfile=tmp.sqlProcessing object type SCHEMA_EXPORT/USERProcessing object type SCHEMA_EXPORT/SYSTEM_GRANTProcessing object type SCHEMA_EXPORT/ROLE_GRANTProcessing object type SCHEMA_EXPORT/DEFAULT_ROLEProcessing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMAProcessing object type SCHEMA_EXPORT/TABLE/TABLEProcessing object type SCHEMA_EXPORT/TABLE/INDEX/INDEXProcessing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS$ impdp ‘/ as sysdba’ directory=TMP dumpfile=test.dmp sqlfile=tmp1.sql INCLUDE=index$ cat /tmp/tmp1.sql– new object type path: SCHEMA_EXPORT/TABLE/INDEX/INDEX– CONNECT TEST_USRCREATE INDEX “TEST_USR”.“IND_C” ON “TEST_USR”.“PARTTAB001” (“COL001”)PCTFREE 10 INITRANS 2 MAXTRANS 255STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)TABLESPACE “TEST_TBS” PARALLEL 1 ;ALTER INDEX “TEST_USR”.“IND_C” NOPARALLEL;CREATE INDEX “TEST_USR”.“A_ID_1” ON “TEST_USR”.“A” (“ID”)PCTFREE 10 INITRANS 2 MAXTRANS 255TABLESPACE “TEST_TBS” PARALLEL 1 ;ALTER INDEX “TEST_USR”.“A_ID_1” NOPARALLEL;

 

转载地址:http://colyz.baihongyu.com/

你可能感兴趣的文章
No Datastore Session bound to thread, and configuration does not allow creation of non-transactional
查看>>
No fallbackFactory instance of type class com.ruoyi---SpringCloud Alibaba_若依微服务框架改造---工作笔记005
查看>>
No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalanc
查看>>
No mapping found for HTTP request with URI [/...] in DispatcherServlet with name ...的解决方法
查看>>
No mapping found for HTTP request with URI [/logout.do] in DispatcherServlet with name 'springmvc'
查看>>
No module named 'crispy_forms'等使用pycharm开发
查看>>
No module named 'pandads'
查看>>
No module named cv2
查看>>
No module named tensorboard.main在安装tensorboardX的时候遇到的问题
查看>>
No module named ‘MySQLdb‘错误解决No module named ‘MySQLdb‘错误解决
查看>>
No new migrations found. Your system is up-to-date.
查看>>
No qualifying bean of type XXX found for dependency XXX.
查看>>
No qualifying bean of type ‘com.netflix.discovery.AbstractDiscoveryClientOptionalArgs<?>‘ available
查看>>
No resource identifier found for attribute 'srcCompat' in package的解决办法
查看>>
no session found for current thread
查看>>
No static resource favicon.ico.
查看>>
no such file or directory AndroidManifest.xml
查看>>
No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android
查看>>
NO.23 ZenTaoPHP目录结构
查看>>
no1
查看>>