博客
关于我
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/

你可能感兴趣的文章
nginx常用命令及简单配置
查看>>
Nginx常用屏蔽规则,让网站更安全
查看>>
nginx开机启动脚本
查看>>
nginx异常:the “ssl“ parameter requires ngx_http_ssl_module in /usr/local/nginx/conf
查看>>
nginx总结及使用Docker创建nginx教程
查看>>
nginx报错:the “ssl“ parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf:128
查看>>
nginx报错:the “ssl“ parameter requires ngx_http_ssl_module in usrlocalnginxconfnginx.conf128
查看>>
nginx日志分割并定期删除
查看>>
Nginx日志分析系统---ElasticStack(ELK)工作笔记001
查看>>
Nginx映射本地json文件,配置解决浏览器跨域问题,提供前端get请求模拟数据
查看>>
nginx最最最详细教程来了
查看>>
Nginx服务器---正向代理
查看>>
Nginx服务器上安装SSL证书
查看>>
Nginx服务器基本配置
查看>>
Nginx服务器的安装
查看>>
Nginx标准配置文件(包括反向代理、大文件上传、Https证书配置、文件预览等)
查看>>
Nginx模块 ngx_http_limit_conn_module 限制连接数
查看>>
Nginx模块 ngx_http_limit_req_module 限制请求速率
查看>>
nginx添加允许跨域header头
查看>>
nginx添加模块与https支持
查看>>