暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

impdp数据泵导入使用table_exists_action=SKIP存在的问题及如何接着导入后续的索引等信息

DB宝 2022-12-15
1565

引言

我们在使用数据泵导入数据库时,可能存在这种情况:

数据泵已经跑了8个小时了,而且表的数据都已经入库了,就剩后边的索引、约束和触发器等,那难道我还得重新从头接着导入吗?答案不是的,我们有办法,就是结合“table_exists_action=SKIP content=metadata_only sqlfile=index.sql
”这几个参数来解决。

实验1:使用skip选项

lhr用户下t1和t3表,t1表含有1个索引:

  1[root@lhr ~]# docker start lhrora11204
2lhrora11204
3[root@lhr ~]# docker exec -it lhrora11204 bash
4[root@lhrora11204 /]#
5[root@lhrora11204 /]#
6[root@lhrora11204 /]# su - oracle
7[oracle@lhrora11204 ~]$ sas
8
9SQL*Plus: Release 11.2.0.4.0 Production on Sat Dec 10 01:30:51 2022
10
11Copyright (c) 19822013, Oracle.  All rights reserved.
12
13Connected to an idle instance.
14
15SYS@LHR11G> startup
16ORACLE instance started.
17
18Total System Global Area  325685248 bytes
19Fixed Size                  2252944 bytes
20Variable Size             188747632 bytes
21Database Buffers          130023424 bytes
22Redo Buffers                4661248 bytes
23Database mounted.
24Database opened.
25SYS@LHR11G>
26SYS@LHR11G>
27SYS@LHR11G> conn lhr/lhr
28Connected.
29LHR@LHR11G>
30LHR@LHR11G>
31LHR@LHR11G> select * from tab;
32
33TNAME                                                        TABTYPE         CLUSTERID
34------------------------------------------------------------ -------------- ----------
35T1                                                           TABLE
36T3                                                           TABLE
37
38
39LHR@LHR11G> create index idx_1 on t1(owner);
40
41Index created.
42
43LHR@LHR11G> select count(*) from user_indexes;
44
45  COUNT(*)
46----------
47         1
48
49LHR@LHR11G> exit
50Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
51With the Partitioning, OLAP, Data Mining and Real Application Testing options
52[oracle@lhrora11204 ~]$
53[oracle@lhrora11204 ~]$
54
55[oracle@lhrora11204 ~]$
56ECTORY=D[oracle@lhrora11204 ~]$ expdp  system/lhr DIRECTORY=DATA_PUMP_DIR dumpfile=a.dmp schemas=lhr
57
58ExportRelease 11.2.0.4.0 - Production on Sat Dec 10 01:37:06 2022
59
60Copyright (c) 19822011Oracle and/or its affiliates.  All rights reserved.
61Connected toOracle Database 11Enterprise Edition Release 11.2.0.4.0 - 64bit Production
62With the Partitioning, OLAP, Data Mining and Real Application Testing options
63Starting "LHR"."SYS_EXPORT_SCHEMA_01":  lhr/lhr DIRECTORY=DATA_PUMP_DIR dumpfile=a.dmp schemas=lhr
64Estimate in progress using BLOCKS method...
65Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
66Total estimation using BLOCKS method: 20 MB
67Processing object type SCHEMA_EXPORT/USER
68Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
69Processing object type SCHEMA_EXPORT/ROLE_GRANT
70Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
71Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
72Processing object type SCHEMA_EXPORT/TABLE/TABLE
73Processing object type SCHEMA_EXPORT/TABLE/COMMENT
74Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
75Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
76Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
77Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
78. . exported "LHR"."T1"                                  8.431 MB   86960 rows
79. . exported "LHR"."T3"                                  8.431 MB   86962 rows
80Master table "LHR"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
81******************************************************************************
82Dump file set for LHR.SYS_EXPORT_SCHEMA_01 is:
83  /u01/app/oracle/admin/LHR11G/dpdump/a.dmp
84Job "LHR"."SYS_EXPORT_SCHEMA_01" successfully completed at Sat Dec 10 01:37:41 2022 elapsed 0 00:00:23
85
86[oracle@lhrora11204 ~]$ sas
87
88SQL*Plus: Release 11.2.0.4.0 Production on Sat Dec 10 01:44:00 2022
89
90Copyright (c) 19822013, Oracle.  All rights reserved.
91
92
93Connected to:
94Oracle Database 11Enterprise Edition Release 11.2.0.4.0 - 64bit Production
95With the Partitioning, OLAP, Data Mining and Real Application Testing options
96
97SYS@LHR11G> alter user  system identified by lhr;
98
99User altered.
100
101SYS@LHR11G> conn lhr/lhr
102Connected.
103LHR@LHR11G> drop table t1;
104
105Table dropped.
106
107LHR@LHR11G> create table t1 as select * from dba_objects;
108
109Table created.
110
111LHR@LHR11G> exit
112Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
113With the Partitioning, OLAP, Data Mining and Real Application Testing options
114[oracle@lhrora11204 ~]$
115[oracle@lhrora11204 ~]$
116[oracle@lhrora11204 ~]$ sas
117
118SQL*Plus: Release 11.2.0.4.0 Production on Sat Dec 10 01:44:51 2022
119
120Copyright (c) 19822013, Oracle.  All rights reserved.
121
122
123Connected to:
124Oracle Database 11Enterprise Edition Release 11.2.0.4.0 - 64bit Production
125With the Partitioning, OLAP, Data Mining and Real Application Testing options
126
127SYS@LHR11G> conn lhr/lhr
128Connected.
129LHR@LHR11G> select count(*) from user_indexes;
130
131  COUNT(*)
132----------
133         0
134
135LHR@LHR11G> exit
136Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
137With the Partitioning, OLAP, Data Mining and Real Application Testing options
138[oracle@lhrora11204 ~]$
139[oracle@lhrora11204 ~]$
140[oracle@lhrora11204 ~]$ impdp  system/lhr DIRECTORY=DATA_PUMP_DIR dumpfile=a.dmp table_exists_action=SKIP schemas=lhr
141
142ImportRelease 11.2.0.4.0 - Production on Sat Dec 10 01:45:13 2022
143
144Copyright (c) 19822011Oracle and/or its affiliates.  All rights reserved.
145
146Connected toOracle Database 11Enterprise Edition Release 11.2.0.4.0 - 64bit Production
147With the Partitioning, OLAP, Data Mining and Real Application Testing options
148Master table "SYSTEM"."SYS_IMPORT_SCHEMA_01" successfully loaded/unloaded
149Starting "SYSTEM"."SYS_IMPORT_SCHEMA_01":  system/lhr DIRECTORY=DATA_PUMP_DIR dumpfile=a.dmp table_exists_action=SKIP schemas=lhr
150Processing object type SCHEMA_EXPORT/USER
151ORA-31684Object type USER:"LHR" already exists
152Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
153Processing object type SCHEMA_EXPORT/ROLE_GRANT
154Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
155Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
156Processing object type SCHEMA_EXPORT/TABLE/TABLE
157Table "LHR"."T1" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
158Table "LHR"."T3" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
159Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
160Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
161Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
162Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
163Job "SYSTEM"."SYS_IMPORT_SCHEMA_01" completed with 1 error(s) at Sat Dec 10 01:45:15 2022 elapsed 0 00:00:02
164
165[oracle@lhrora11204 ~]$ sas
166
167SQL*Plus: Release 11.2.0.4.0 Production on Sat Dec 10 01:45:27 2022
168
169Copyright (c) 19822013, Oracle.  All rights reserved.
170
171
172Connected to:
173Oracle Database 11Enterprise Edition Release 11.2.0.4.0 - 64bit Production
174With the Partitioning, OLAP, Data Mining and Real Application Testing options
175
176SYS@LHR11G> select count(*) from user_indexes;
177
178  COUNT(*)
179----------
180      1251
181
182SYS@LHR11G> conn lhr/lhr
183Connected.
184LHR@LHR11G> select count(*) from user_indexes;
185
186  COUNT(*)
187----------
188         0
189
190LHR@LHR11G> exit
191Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
192With the Partitioning, OLAP, Data Mining and Real Application Testing options
193[oracle@lhrora11204 ~]$ impdp  system/lhr DIRECTORY=DATA_PUMP_DIR dumpfile=a.dmp table_exists_action=replace schemas=lhr
194
195ImportRelease 11.2.0.4.0 - Production on Sat Dec 10 01:46:23 2022
196
197Copyright (c) 19822011Oracle and/or its affiliates.  All rights reserved.
198
199Connected toOracle Database 11Enterprise Edition Release 11.2.0.4.0 - 64bit Production
200With the Partitioning, OLAP, Data Mining and Real Application Testing options
201Master table "SYSTEM"."SYS_IMPORT_SCHEMA_01" successfully loaded/unloaded
202Starting "SYSTEM"."SYS_IMPORT_SCHEMA_01":  system/lhr DIRECTORY=DATA_PUMP_DIR dumpfile=a.dmp table_exists_action=replace schemas=lhr
203Processing object type SCHEMA_EXPORT/USER
204ORA-31684Object type USER:"LHR" already exists
205Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
206Processing object type SCHEMA_EXPORT/ROLE_GRANT
207Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
208Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
209Processing object type SCHEMA_EXPORT/TABLE/TABLE
210Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
211. . imported "LHR"."T1"                                  8.431 MB   86960 rows
212. . imported "LHR"."T3"                                  8.431 MB   86962 rows
213Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
214Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
215Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
216Job "SYSTEM"."SYS_IMPORT_SCHEMA_01" completed with 1 error(s) at Sat Dec 10 01:46:27 2022 elapsed 0 00:00:03
217
218[oracle@lhrora11204 ~]$ sas
219
220SQL*Plus: Release 11.2.0.4.0 Production on Sat Dec 10 01:46:35 2022
221
222Copyright (c) 19822013, Oracle.  All rights reserved.
223
224
225Connected to:
226Oracle Database 11Enterprise Edition Release 11.2.0.4.0 - 64bit Production
227With the Partitioning, OLAP, Data Mining and Real Application Testing options
228
229SYS@LHR11G> conn lhr/lhr
230Connected.
231LHR@LHR11G> select count(*) from user_indexes;
232
233  COUNT(*)
234----------
235         1
236
237LHR@LHR11G> exit
238Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
239With the Partitioning, OLAP, Data Mining and Real Application Testing options
240[oracle@lhrora11204 ~]$
241[oracle@lhrora11204 ~]$
242[oracle@lhrora11204 ~]$
243[oracle@lhrora11204 ~]$ expdp  system/lhr DIRECTORY=DATA_PUMP_DIR dumpfile=b.dmp schemas=lhr  content=metadata_only
244
245ExportRelease 11.2.0.4.0 - Production on Sat Dec 10 01:57:59 2022
246
247Copyright (c) 19822011Oracle and/or its affiliates.  All rights reserved.
248
249Connected toOracle Database 11Enterprise Edition Release 11.2.0.4.0 - 64bit Production
250With the Partitioning, OLAP, Data Mining and Real Application Testing options
251Starting "SYSTEM"."SYS_EXPORT_SCHEMA_01":  system/lhr DIRECTORY=DATA_PUMP_DIR dumpfile=b.dmp schemas=lhr content=metadata_only
252Processing object type SCHEMA_EXPORT/USER
253Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
254Processing object type SCHEMA_EXPORT/ROLE_GRANT
255Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
256Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
257Processing object type SCHEMA_EXPORT/TABLE/TABLE
258Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
259Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
260Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
261Master table "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
262******************************************************************************
263Dump file set for SYSTEM.SYS_EXPORT_SCHEMA_01 is:
264  /u01/app/oracle/admin/LHR11G/dpdump/b.dmp
265Job "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully completed at Sat Dec 10 01:58:06 2022 elapsed 0 00:00:07
266
267
268[oracle@lhrora11204 ~]$
269[oracle@lhrora11204 ~]$ sas
270
271SQL*Plus: Release 11.2.0.4.0 Production on Sat Dec 10 01:58:45 2022
272
273Copyright (c) 19822013, Oracle.  All rights reserved.
274
275
276Connected to:
277Oracle Database 11Enterprise Edition Release 11.2.0.4.0 - 64bit Production
278With the Partitioning, OLAP, Data Mining and Real Application Testing options
279
280SYS@LHR11G> conn lhr/lhr
281Connected.
282LHR@LHR11G>
283LHR@LHR11G>
284LHR@LHR11G> drop table t1;
285
286Table dropped.
287
288LHR@LHR11G> create table t1 as select * from dba_objects;
289
290Table created.
291
292LHR@LHR11G> exit
293Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
294With the Partitioning, OLAP, Data Mining and Real Application Testing options
295
296
297Disconnected from Oracle Database 11Enterprise Edition Release 11.2.0.4.0 - 64bit Production
298With the Partitioning, OLAP, Data Mining and Real Application Testing options
299[oracle@lhrora11204 ~]$
300[oracle@lhrora11204 ~]$
301hr DIRECTORY=DATA_PUMP_DIR dumpfil[oracle@lhrora11204 ~]$ impdp  system/lhr DIRECTORY=DATA_PUMP_DIR dumpfile=b.dmp table_exists_action=SKIPschemas=lhr
302
303ImportRelease 11.2.0.4.0 - Production on Sat Dec 10 02:00:18 2022
304
305Copyright (c) 19822011Oracle and/or its affiliates.  All rights reserved.
306
307Connected toOracle Database 11Enterprise Edition Release 11.2.0.4.0 - 64bit Production
308With the Partitioning, OLAP, Data Mining and Real Application Testing options
309Master table "SYSTEM"."SYS_IMPORT_SCHEMA_01" successfully loaded/unloaded
310Starting "SYSTEM"."SYS_IMPORT_SCHEMA_01":  system/lhr DIRECTORY=DATA_PUMP_DIR dumpfile=b.dmp table_exists_action=SKIP schemas=lhr
311Processing object type SCHEMA_EXPORT/USER
312ORA-31684Object type USER:"LHR" already exists
313Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
314Processing object type SCHEMA_EXPORT/ROLE_GRANT
315Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
316Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
317Processing object type SCHEMA_EXPORT/TABLE/TABLE
318Table "LHR"."T1" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
319Table "LHR"."T3" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
320Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
321Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
322Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
323Job "SYSTEM"."SYS_IMPORT_SCHEMA_01" completed with 1 error(s) at Sat Dec 10 02:00:21 2022 elapsed 0 00:00:02
324
325[oracle@lhrora11204 ~]$ sas
326
327SQL*Plus: Release 11.2.0.4.0 Production on Sat Dec 10 02:00:26 2022
328
329Copyright (c) 19822013, Oracle.  All rights reserved.
330
331
332Connected to:
333Oracle Database 11Enterprise Edition Release 11.2.0.4.0 - 64bit Production
334With the Partitioning, OLAP, Data Mining and Real Application Testing options
335
336
337SYS@LHR11G> conn lhr/lhr
338Connected.
339LHR@LHR11G> select count(*) from user_indexes;
340
341  COUNT(*)
342----------
343         0
344
345LHR@LHR11G> exit
346Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
347With the Partitioning, OLAP, Data Mining and Real Application Testing options
348
349[oracle@lhrora11204 dpdump]$ impdp  system/lhr DIRECTORY=DATA_PUMP_DIR dumpfile=b.dmp schemas=lhr content=metadata_only  table_exists_action=append
350
351ImportRelease 11.2.0.4.0 - Production on Sat Dec 10 03:01:49 2022
352
353Copyright (c) 19822011Oracle and/or its affiliates.  All rights reserved.
354
355Connected toOracle Database 11Enterprise Edition Release 11.2.0.4.0 - 64bit Production
356With the Partitioning, OLAP, Data Mining and Real Application Testing options
357Master table "SYSTEM"."SYS_IMPORT_SCHEMA_01" successfully loaded/unloaded
358Starting "SYSTEM"."SYS_IMPORT_SCHEMA_01":  system/lhr DIRECTORY=DATA_PUMP_DIR dumpfile=b.dmp schemas=lhr content=metadata_only table_exists_action=append
359Processing object type SCHEMA_EXPORT/USER
360ORA-31684Object type USER:"LHR" already exists
361Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
362Processing object type SCHEMA_EXPORT/ROLE_GRANT
363Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
364Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
365Processing object type SCHEMA_EXPORT/TABLE/TABLE
366Table "LHR"."T1" exists. Data will be appended to existing table but all dependent metadata will be skipped due to table_exists_action of append
367Table "LHR"."T3" exists. Data will be appended to existing table but all dependent metadata will be skipped due to table_exists_action of append
368Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
369Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
370Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
371Job "SYSTEM"."SYS_IMPORT_SCHEMA_01" completed with 1 error(s) at Sat Dec 10 03:01:53 2022 elapsed 0 00:00:03
372
373[oracle@lhrora11204 dpdump]$ sas
374
375SQL*Plus: Release 11.2.0.4.0 Production on Sat Dec 10 03:02:30 2022
376
377Copyright (c) 19822013, Oracle.  All rights reserved.
378
379
380Connected to:
381Oracle Database 11Enterprise Edition Release 11.2.0.4.0 - 64bit Production
382With the Partitioning, OLAP, Data Mining and Real Application Testing options
383
384SYS@LHR11G> conn lhr/lhr
385Connected.
386LHR@LHR11G> select count(*) from user_indexes;
387
388  COUNT(*)
389----------
390         0
391
392LHR@LHR11G>
393
394[oracle@lhrora11204 ~]$ impdp  system/lhr DIRECTORY=DATA_PUMP_DIR dumpfile=b.dmp schemas=lhr sqlfile=index.sql
395
396Import: Release 11.2.0.4.0 - Production on Sat Dec 10 02:02:24 2022
397
398Copyright (c) 19822011Oracle and/or its affiliates.  All rights reserved.
399
400Connected toOracle Database 11Enterprise Edition Release 11.2.0.4.0 - 64bit Production
401With the Partitioning, OLAP, Data Mining and Real Application Testing options
402Master table "SYSTEM"."SYS_SQL_FILE_SCHEMA_01" successfully loaded/unloaded
403Starting "SYSTEM"."SYS_SQL_FILE_SCHEMA_01":  system/lhr DIRECTORY=DATA_PUMP_DIR dumpfile=b.dmp schemas=lhr sqlfile=index.sql
404Processing object type SCHEMA_EXPORT/USER
405Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
406Processing object type SCHEMA_EXPORT/ROLE_GRANT
407Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
408Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
409Processing object type SCHEMA_EXPORT/TABLE/TABLE
410Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
411Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
412Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
413Job "SYSTEM"."SYS_SQL_FILE_SCHEMA_01" successfully completed at Sat Dec 10 02:02:26 2022 elapsed 0 00:00:01
414
415[oracle@lhrora11204 ~]$ sas
416
417SQL*Plus: Release 11.2.0.4.0 Production on Sat Dec 10 02:02:32 2022
418
419Copyright (c) 19822013, Oracle.  All rights reserved.
420
421
422Connected to:
423Oracle Database 11Enterprise Edition Release 11.2.0.4.0 - 64bit Production
424With the Partitioning, OLAP, Data Mining and Real Application Testing options
425
426SYS@LHR11G> conn lhr/lhr
427Connected.
428LHR@LHR11G> select count(*) from user_indexes;
429
430  COUNT(*)
431----------
432         0
433LHR@LHR11G>
434LHR@LHR11G> exit
435Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
436With the Partitioning, OLAP, Data Mining and Real Application Testing options
437
438[oracle@lhrora11204 ~]$ cd /u01/app/oracle/admin/LHR11G/dpdump/
439[oracle@lhrora11204 dpdump]$ ll
440total 17732
441-rw-r----- 1 oracle oinstall 17907712 Dec 10 01:37 a.dmp
442-rw-r----- 1 oracle oinstall   221184 Dec 10 01:58 b.dmp
443-rw-r----- 1 oracle oinstall      116 Jul 24  2020 dp.log
444-rw-r--r-- 1 oracle oinstall     1317 Dec 10 01:58 export.log
445-rw-r--r-- 1 oracle oinstall     1146 Dec 10 02:02 import.log
446-rw-r--r-- 1 oracle oinstall    15946 Dec 10 02:02 index.sql
447[oracle@lhrora11204 dpdump]$ more index.sql
448-- CONNECT SYSTEM
449ALTER SESSION SET EVENTS '10150 TRACE NAME CONTEXT FOREVER, LEVEL 1';
450ALTER SESSION SET EVENTS '10904 TRACE NAME CONTEXT FOREVER, LEVEL 1';
451ALTER SESSION SET EVENTS '25475 TRACE NAME CONTEXT FOREVER, LEVEL 1';
452ALTER SESSION SET EVENTS '10407 TRACE NAME CONTEXT FOREVER, LEVEL 1';
453ALTER SESSION SET EVENTS '10851 TRACE NAME CONTEXT FOREVER, LEVEL 1';
454ALTER SESSION SET EVENTS '22830 TRACE NAME CONTEXT FOREVER, LEVEL 192 ';
455-- new object type path: SCHEMA_EXPORT/USER
456 CREATE USER "LHR" IDENTIFIED BY VALUES 'S:072AA6DEB5DA3D824222DE075DEA77DB5107CD66984BE2C2551A719546E8;157AE4BCFD41976D'
457      DEFAULT TABLESPACE "USERS"
458      TEMPORARY TABLESPACE "TEMP";
459-- new object type path: SCHEMA_EXPORT/SYSTEM_GRANT
460GRANT UNLIMITED TABLESPACE TO "LHR";
461-- new object type path: SCHEMA_EXPORT/ROLE_GRANT
462 GRANT "DBA" TO "LHR";
463-- new object type path: SCHEMA_EXPORT/DEFAULT_ROLE
464 ALTER USER "LHR" DEFAULT ROLE ALL;
465-- new object type path: SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
466-- CONNECT LHR
467
468BEGIN
469sys.dbms_logrep_imp.instantiate_schema(schema_name=>SYS_CONTEXT('USERENV','CURRENT_SCHEMA'), export_db_name=>'LHR11G', inst_scn=>'1336883');
470COMMIT;
471END;
472/
473-- new object type path: SCHEMA_EXPORT/TABLE/TABLE
474-- CONNECT SYSTEM
475CREATE TABLE "LHR"."T1"
476   (    "OWNER" VARCHAR2(30 BYTE),
477        "OBJECT_NAME" VARCHAR2(128 BYTE),
478        "SUBOBJECT_NAME" VARCHAR2(30 BYTE),
479        "OBJECT_ID" NUMBER,
480        "DATA_OBJECT_ID" NUMBER,
481        "OBJECT_TYPE" VARCHAR2(19 BYTE),
482        "CREATED" DATE,
483        "LAST_DDL_TIME" DATE,
484        "TIMESTAMP" VARCHAR2(19 BYTE),
485        "STATUS" VARCHAR2(7 BYTE),
486        "TEMPORARY" VARCHAR2(1 BYTE),
487        "GENERATED" VARCHAR2(1 BYTE),
488        "SECONDARY" VARCHAR2(1 BYTE),
489        "NAMESPACE" NUMBER,
490        "EDITION_NAME" VARCHAR2(30 BYTE)
491   ) SEGMENT CREATION IMMEDIATE
492  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
493 NOCOMPRESS LOGGING
494  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
495  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
496  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
497  TABLESPACE "USERS" ;
498CREATE TABLE "LHR"."T3"
499   (    "OWNER" VARCHAR2(30 BYTE),
500        "OBJECT_NAME" VARCHAR2(128 BYTE),
501        "SUBOBJECT_NAME" VARCHAR2(30 BYTE),
502        "OBJECT_ID" NUMBER,
503        "DATA_OBJECT_ID" NUMBER,
504        "OBJECT_TYPE" VARCHAR2(19 BYTE),
505        "CREATED" DATE,
506        "LAST_DDL_TIME" DATE,
507        "TIMESTAMP" VARCHAR2(19 BYTE),
508        "STATUS" VARCHAR2(7 BYTE),
509        "TEMPORARY" VARCHAR2(1 BYTE),
510        "GENERATED" VARCHAR2(1 BYTE),
511        "SECONDARY" VARCHAR2(1 BYTE),
512        "NAMESPACE" NUMBER,
513        "EDITION_NAME" VARCHAR2(30 BYTE)
514   ) SEGMENT CREATION IMMEDIATE
515  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
516 NOCOMPRESS LOGGING
517  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
518  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
519  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
520  TABLESPACE "USERS" ;
521-- new object type path: SCHEMA_EXPORT/TABLE/INDEX/INDEX
522-- CONNECT LHR
523CREATE INDEX "LHR"."IDX_1" ON "LHR"."T1" ("OWNER")
524  PCTFREE 10 INITRANS 2 MAXTRANS 255
525  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
526  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
527  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
528  TABLESPACE "USERS" PARALLEL 1 ;
529
530  ALTER INDEX "LHR"."IDX_1" NOPARALLEL;
531-- new object type path: SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
532-- CONNECT SYSTEM
533DECLARE I_N VARCHAR2(60);
534  I_O VARCHAR2(60);
535  NV VARCHAR2(1);
536  c DBMS_METADATA.T_VAR_COLL;
537  df varchar2(21) := 'YYYY-MM-DD:HH24:MI:SS';
538 stmt varchar2(300) := ' INSERT INTO "SYS"."IMPDP_STATS" (type,version,flags,c1,c2,c3,c5,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,d1,cl1) VALU
539ES (''I'',6,:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,NULL,:14,:15,NULL,:16,:17)';
540BEGIN
541  DELETE FROM "SYS"."IMPDP_STATS";
542  i_n := '
IDX_1';
543  i_o := '
LHR';
544  EXECUTE IMMEDIATE stmt USING 2,I_N,NV,NV,I_O,86960,204,30,6,77,2337,1,86960,NV,NV,TO_DATE('
2022-12-10 01:32:35',df),NV;
545
546  DBMS_STATS.IMPORT_INDEX_STATS('
"' || i_o || '"','"' || i_n || '"',NULL,'"IMPDP_STATS"',NULL,'"SYS"');
547  DELETE FROM "SYS"."IMPDP_STATS";
548END;
549/
550-- new object type path: SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
551DECLARE
552  c varchar2(60);
553  nv varchar2(1);
554  df varchar2(21) := '
YYYY-MM-DD:HH24:MI:SS';
555  s varchar2(60) := '
LHR';
556  t varchar2(60) := '
T1';
557  p varchar2(1);
558  sp varchar2(1);
559  stmt varchar2(300) := '
INSERT INTO "SYS"."IMPDP_STATS" (type,version,c1,c2,c3,c4,c5,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,d1,r1,r2,ch1,flags,
560cl1) VALUES (:1,6,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,:15,:16,:17,:18,:19,:20,:21,:22,:23)';
561BEGIN
562  DELETE FROM "SYS"."IMPDP_STATS";
563  INSERT INTO "SYS"."IMPDP_STATS" (type,version,flags,c1,c2,c3,c5,n1,n2,n3,n4,n9,n10,n11,n12,d1) VALUES ('
T',6,2,t,p,sp,s,
564               86960,1270,98,86960,0,NULL,NULL,NULL,
565               TO_DATE('
2022-12-03 06:00:07',df));
566  c := '
OWNER';
567  EXECUTE IMMEDIATE stmt USING '
C',t,p,sp,c,s,
568               30,.0333333333333333,30,86960,0,3.39127382666026E+35,4.58306556462839E+35,6,0,nv,nv,
569               TO_DATE('
2022-12-03 06:00:07',df),'415045585F303330323030','584442',nv,2,nv;
570  c := '
OBJECT_NAME';
571  EXECUTE IMMEDIATE stmt USING '
C',t,p,sp,c,s,
572               52172,.0000191673694702139,52172,86960,0,2.45035608287067E+35,6.29634626559793E+35,25,0,nv,nv,
573               TO_DATE('
2022-12-03 06:00:07',df),'2F31303030333233645F44656C6567617465496E766F636174696F6E4861','794362437253756253616D706C6
57496E67547970653232395F54',nv,2,nv;
575  c := '
SUBOBJECT_NAME';
576  EXECUTE IMMEDIATE stmt USING '
C',t,p,sp,c,s,
577               141,.00709219858156028,141,513,86447,1.88673574325567E+35,4.53398699964451E+35,2,0,nv,nv,
578               TO_DATE('
2022-12-03 06:00:07',df),'2456534E5F31','575248245F5741495453545F323030373934373535315F30',nv,2,nv;
579  c := '
OBJECT_ID';
580  EXECUTE IMMEDIATE stmt USING '
C',t,p,sp,c,s,
581               86960,.0000114995400183993,86960,86958,2,2,92227,5,0,nv,nv,
582               TO_DATE('
2022-12-03 06:00:07',df),'C103','C30A171C',nv,2,nv;
583
584END;
585/
586
587DECLARE
588  c varchar2(60);
589  nv varchar2(1);
590  df varchar2(21) := '
YYYY-MM-DD:HH24:MI:SS';
591  s varchar2(60) := '
LHR';
592  t varchar2(60) := '
T1';
593  p varchar2(1);
594  sp varchar2(1);
595  stmt varchar2(300) := '
INSERT INTO "SYS"."IMPDP_STATS" (type,version,c1,c2,c3,c4,c5,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,d1,r1,r2,ch1,flags,
596cl1) VALUES (:1,6,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,:15,:16,:17,:18,:19,:20,:21,:22,:23)';
597BEGIN
598  NULL;
599  c := '
DATA_OBJECT_ID';
600  EXECUTE IMMEDIATE stmt USING '
C',t,p,sp,c,s,
601               9073,.000110217127741651,9073,9145,77815,0,92227,2,0,nv,nv,
602               TO_DATE('
2022-12-03 06:00:07',df),'80','C30A171C',nv,2,nv;
603  c := '
OBJECT_TYPE';
604  EXECUTE IMMEDIATE stmt USING '
C',t,p,sp,c,s,
605               46,.0217391304347826,46,86960,0,3.49432112834658E+35,4.58489900435076E+35,9,0,nv,nv,
606               TO_DATE('
2022-12-03 06:00:07',df),'434C5553544552','584D4C20534348454D41',nv,2,nv;
607  c := '
CREATED';
608  EXECUTE IMMEDIATE stmt USING '
C',t,p,sp,c,s,
609               1059,.000944287063267233,1059,86960,0,2456529.48443287,2459917.05729167,8,0,nv,nv,
610               TO_DATE('
2022-12-03 06:00:07',df),'787108180C2624','787A0C0302171F',nv,2,nv;
611  c := '
LAST_DDL_TIME';
612  EXECUTE IMMEDIATE stmt USING '
C',t,p,sp,c,s,
613               1143,.000874890638670166,1143,86958,2,2452549.52903935,2459917.05729167,8,0,nv,nv,
614               TO_DATE('
2022-12-03 06:00:07',df),'78660A010D2A32','787A0C0302171F',nv,2,nv;
615  c := '
TIMESTAMP';
616  EXECUTE IMMEDIATE stmt USING '
C',t,p,sp,c,s,
617               1205,.000829875518672199,1205,86958,2,2.55583174330788E+35,2.60592375524727E+35,20,0,nv,nv,
618               TO_DATE('
2022-12-03 06:00:07',df),'313939302D30382D32363A31313A32353A3030','323032322D31322D30333A30313A32323A3330',nv,2,nv;
619
620END;
621/
622
623DECLARE
624  c varchar2(60);
625  nv varchar2(1);
626  df varchar2(21) := '
YYYY-MM-DD:HH24:MI:SS';
627  s varchar2(60) := '
LHR';
628  t varchar2(60) := '
T1';
629  p varchar2(1);
630  sp varchar2(1);
631  stmt varchar2(300) := '
INSERT INTO "SYS"."IMPDP_STATS" (type,version,c1,c2,c3,c4,c5,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,d1,r1,r2,ch1,flags,
632cl1) VALUES (:1,6,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,:15,:16,:17,:18,:19,:20,:21,:22,:23)';
633BEGIN
634  NULL;
635  c := '
STATUS';
636  EXECUTE IMMEDIATE stmt USING '
C',t,p,sp,c,s,
637               1,1,1,86960,0,4.47861930473196E+35,4.47861930473196E+35,6,0,nv,nv,
638               TO_DATE('
2022-12-03 06:00:07',df),'56414C4944','56414C4944',nv,2,nv;
639  c := '
TEMPORARY';
640  EXECUTE IMMEDIATE stmt USING '
C',t,p,sp,c,s,
641               2,.5,2,86960,0,4.04999154965717E+35,4.62114420409600E+35,2,0,nv,nv,
642               TO_DATE('
2022-12-03 06:00:07',df),'4E','59',nv,2,nv;
643  c := '
GENERATED';
644  EXECUTE IMMEDIATE stmt USING '
C',t,p,sp,c,s,
645               2,.5,2,86960,0,4.04999154965717E+35,4.62114420409600E+35,2,0,nv,nv,
646               TO_DATE('
2022-12-03 06:00:07',df),'4E','59',nv,2,nv;
647  c := '
SECONDARY';
648  EXECUTE IMMEDIATE stmt USING '
C',t,p,sp,c,s,
649               2,.5,2,86960,0,4.04999154965717E+35,4.62114420409600E+35,2,0,nv,nv,
650               TO_DATE('
2022-12-03 06:00:07',df),'4E','59',nv,2,nv;
651  c := '
NAMESPACE';
652  EXECUTE IMMEDIATE stmt USING '
C',t,p,sp,c,s,
653               21,.0476190476190476,21,86958,2,1,64,3,0,nv,nv,
654               TO_DATE('
2022-12-03 06:00:07',df),'C102','C141',nv,2,nv;
655
656END;
657/
658
659DECLARE
660  c varchar2(60);
661  nv varchar2(1);
662  df varchar2(21) := '
YYYY-MM-DD:HH24:MI:SS';
663  s varchar2(60) := '
LHR';
664  t varchar2(60) := '
T1';
665  p varchar2(1);
666  sp varchar2(1);
667  stmt varchar2(300) := '
INSERT INTO "SYS"."IMPDP_STATS" (type,version,c1,c2,c3,c4,c5,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,d1,r1,r2,ch1,flags,
668cl1) VALUES (:1,6,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,:15,:16,:17,:18,:19,:20,:21,:22,:23)';
669BEGIN
670  NULL;
671  c := '
EDITION_NAME';
672  EXECUTE IMMEDIATE stmt USING '
C',t,p,sp,c,s,
673               0,0,0,nv,86960,nv,nv,0,0,nv,nv,
674               TO_DATE('
2022-12-03 06:00:07',df),nv,nv,nv,2,nv;
675
676  DBMS_STATS.IMPORT_TABLE_STATS('
"LHR"','"T1"',NULL,'"IMPDP_STATS"',NULL,NULL,'"SYS"');
677  DELETE FROM "SYS"."IMPDP_STATS";
678END;
679/
680
681DECLARE
682  c varchar2(60);
683  nv varchar2(1);
684  df varchar2(21) := '
YYYY-MM-DD:HH24:MI:SS';
685  s varchar2(60) := '
LHR';
686  t varchar2(60) := '
T3';
687  p varchar2(1);
688  sp varchar2(1);
689  stmt varchar2(300) := '
INSERT INTO "SYS"."IMPDP_STATS" (type,version,c1,c2,c3,c4,c5,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,d1,r1,r2,ch1,flags,
690cl1) VALUES (:1,6,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,:15,:16,:17,:18,:19,:20,:21,:22,:23)';
691BEGIN
692  DELETE FROM "SYS"."IMPDP_STATS";
693  INSERT INTO "SYS"."IMPDP_STATS" (type,version,flags,c1,c2,c3,c5,n1,n2,n3,n4,n9,n10,n11,n12,d1) VALUES ('
T',6,2,t,p,sp,s,
694               86962,1270,98,86962,0,NULL,NULL,NULL,
695               TO_DATE('
2022-12-03 06:00:08',df));
696  c := '
OWNER';
697  EXECUTE IMMEDIATE stmt USING '
C',t,p,sp,c,s,
698               31,.032258064516129,31,86962,0,3.39127382666026E+35,4.58306556462839E+35,6,0,nv,nv,
699               TO_DATE('
2022-12-03 06:00:08',df),'415045585F303330323030','584442',nv,2,nv;
700  c := '
OBJECT_NAME';
701  EXECUTE IMMEDIATE stmt USING '
C',t,p,sp,c,s,
702               52172,.0000191673694702139,52172,86962,0,2.45035608287067E+35,6.29634626559793E+35,25,0,nv,nv,
703               TO_DATE('
2022-12-03 06:00:08',df),'2F31303030333233645F44656C6567617465496E766F636174696F6E4861','794362437253756253616D706C6
70496E67547970653232395F54',nv,2,nv;
705  c := '
SUBOBJECT_NAME';
706  EXECUTE IMMEDIATE stmt USING '
C',t,p,sp,c,s,
707               141,.00709219858156028,141,513,86449,1.88673574325567E+35,4.53398699964451E+35,2,0,nv,nv,
708               TO_DATE('
2022-12-03 06:00:08',df),'2456534E5F31','575248245F5741495453545F323030373934373535315F30',nv,2,nv;
709  c := '
OBJECT_ID';
710  EXECUTE IMMEDIATE stmt USING '
C',t,p,sp,c,s,
711               86962,.0000114992755456406,86962,86960,2,2,92229,5,0,nv,nv,
712               TO_DATE('
2022-12-03 06:00:08',df),'C103','C30A171E',nv,2,nv;
713
714END;
715/
716
717DECLARE
718  c varchar2(60);
719  nv varchar2(1);
720  df varchar2(21) := '
YYYY-MM-DD:HH24:MI:SS';
721  s varchar2(60) := '
LHR';
722  t varchar2(60) := '
T3';
723  p varchar2(1);
724  sp varchar2(1);
725  stmt varchar2(300) := '
INSERT INTO "SYS"."IMPDP_STATS" (type,version,c1,c2,c3,c4,c5,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,d1,r1,r2,ch1,flags,
726cl1) VALUES (:1,6,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,:15,:16,:17,:18,:19,:20,:21,:22,:23)';
727BEGIN
728  NULL;
729  c := '
DATA_OBJECT_ID';
730  EXECUTE IMMEDIATE stmt USING '
C',t,p,sp,c,s,
731               9075,.000110192837465565,9075,9147,77815,0,92229,2,0,nv,nv,
732               TO_DATE('
2022-12-03 06:00:08',df),'80','C30A171E',nv,2,nv;
733  c := '
OBJECT_TYPE';
734  EXECUTE IMMEDIATE stmt USING '
C',t,p,sp,c,s,
735               46,.0217391304347826,46,86962,0,3.49432112834658E+35,4.58489900435076E+35,9,0,nv,nv,
736               TO_DATE('
2022-12-03 06:00:08',df),'434C5553544552','584D4C20534348454D41',nv,2,nv;
737  c := '
CREATED';
738  EXECUTE IMMEDIATE stmt USING '
C',t,p,sp,c,s,
739               1061,.000942507068803016,1061,86962,0,2456529.48443287,2459917.05780093,8,0,nv,nv,
740               TO_DATE('
2022-12-03 06:00:08',df),'787108180C2624','787A0C0302180F',nv,2,nv;
741  c := '
LAST_DDL_TIME';
742  EXECUTE IMMEDIATE stmt USING '
C',t,p,sp,c,s,
743               1145,.000873362445414847,1145,86960,2,2452549.52903935,2459917.05780093,8,0,nv,nv,
744               TO_DATE('
2022-12-03 06:00:08',df),'78660A010D2A32','787A0C0302180F',nv,2,nv;
745  c := '
TIMESTAMP';
746  EXECUTE IMMEDIATE stmt USING '
C',t,p,sp,c,s,
747               1207,.000828500414250207,1207,86960,2,2.55583174330788E+35,2.60592375524727E+35,20,0,nv,nv,
748               TO_DATE('
2022-12-03 06:00:08',df),'313939302D30382D32363A31313A32353A3030','323032322D31322D30333A30313A32333A3134',nv,2,nv;
749
750END;
751/
752
753DECLARE
754  c varchar2(60);
755  nv varchar2(1);
756  df varchar2(21) := '
YYYY-MM-DD:HH24:MI:SS';
757  s varchar2(60) := '
LHR';
758  t varchar2(60) := '
T3';
759  p varchar2(1);
760  sp varchar2(1);
761  stmt varchar2(300) := '
INSERT INTO "SYS"."IMPDP_STATS" (type,version,c1,c2,c3,c4,c5,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,d1,r1,r2,ch1,flags,
762cl1) VALUES (:1,6,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,:15,:16,:17,:18,:19,:20,:21,:22,:23)';
763BEGIN
764  NULL;
765  c := '
STATUS';
766  EXECUTE IMMEDIATE stmt USING '
C',t,p,sp,c,s,
767               1,1,1,86962,0,4.47861930473196E+35,4.47861930473196E+35,6,0,nv,nv,
768               TO_DATE('
2022-12-03 06:00:08',df),'56414C4944','56414C4944',nv,2,nv;
769  c := '
TEMPORARY';
770  EXECUTE IMMEDIATE stmt USING '
C',t,p,sp,c,s,
771               2,.5,2,86962,0,4.04999154965717E+35,4.62114420409600E+35,2,0,nv,nv,
772               TO_DATE('
2022-12-03 06:00:08',df),'4E','59',nv,2,nv;
773  c := '
GENERATED';
774  EXECUTE IMMEDIATE stmt USING '
C',t,p,sp,c,s,
775               2,.5,2,86962,0,4.04999154965717E+35,4.62114420409600E+35,2,0,nv,nv,
776               TO_DATE('
2022-12-03 06:00:08',df),'4E','59',nv,2,nv;
777  c := '
SECONDARY';
778  EXECUTE IMMEDIATE stmt USING '
C',t,p,sp,c,s,
779               2,.5,2,86962,0,4.04999154965717E+35,4.62114420409600E+35,2,0,nv,nv,
780               TO_DATE('
2022-12-03 06:00:08',df),'4E','59',nv,2,nv;
781  c := '
NAMESPACE';
782  EXECUTE IMMEDIATE stmt USING '
C',t,p,sp,c,s,
783               21,.0476190476190476,21,86960,2,1,64,3,0,nv,nv,
784               TO_DATE('
2022-12-03 06:00:08',df),'C102','C141',nv,2,nv;
785
786END;
787/
788
789DECLARE
790  c varchar2(60);
791  nv varchar2(1);
792  df varchar2(21) := '
YYYY-MM-DD:HH24:MI:SS';
793  s varchar2(60) := '
LHR';
794  t varchar2(60) := '
T3';
795  p varchar2(1);
796  sp varchar2(1);
797  stmt varchar2(300) := '
INSERT INTO "SYS"."IMPDP_STATS" (type,version,c1,c2,c3,c4,c5,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,d1,r1,r2,ch1,flags,
798cl1) VALUES (:1,6,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,:15,:16,:17,:18,:19,:20,:21,:22,:23)';
799BEGIN
800  NULL;
801  c := '
EDITION_NAME';
802  EXECUTE IMMEDIATE stmt USING '
C',t,p,sp,c,s,
803               0,0,0,nv,86962,nv,nv,0,0,nv,nv,
804               TO_DATE('
2022-12-03 06:00:08',df),nv,nv,nv,2,nv;
805
806  DBMS_STATS.IMPORT_TABLE_STATS('
"LHR"','"T3"',NULL,'"IMPDP_STATS"',NULL,NULL,'"SYS"');
807  DELETE FROM "SYS"."IMPDP_STATS";
808END;
809/
810
811[oracle@lhrora11204 dpdump]$
812[oracle@lhrora11204 dpdump]$
813[oracle@lhrora11204 dpdump]$
814[oracle@lhrora11204 dpdump]$ more index.sql
815-- CONNECT SYSTEM
816ALTER SESSION SET EVENTS '
10150 TRACE NAME CONTEXT FOREVER, LEVEL 1';
817ALTER SESSION SET EVENTS '
10904 TRACE NAME CONTEXT FOREVER, LEVEL 1';
818ALTER SESSION SET EVENTS '
25475 TRACE NAME CONTEXT FOREVER, LEVEL 1';
819ALTER SESSION SET EVENTS '
10407 TRACE NAME CONTEXT FOREVER, LEVEL 1';
820ALTER SESSION SET EVENTS '
10851 TRACE NAME CONTEXT FOREVER, LEVEL 1';
821ALTER SESSION SET EVENTS '
22830 TRACE NAME CONTEXT FOREVER, LEVEL 192 ';
822-- new object type path: SCHEMA_EXPORT/USER
823 CREATE USER "LHR" IDENTIFIED BY VALUES '
S:072AA6DEB5DA3D824222DE075DEA77DB5107CD66984BE2C2551A719546E8;157AE4BCFD41976D'
824      DEFAULT TABLESPACE "USERS"
825      TEMPORARY TABLESPACE "TEMP";
826-- new object type path: SCHEMA_EXPORT/SYSTEM_GRANT
827GRANT UNLIMITED TABLESPACE TO "LHR";
828-- new object type path: SCHEMA_EXPORT/ROLE_GRANT
829 GRANT "DBA" TO "LHR";
830-- new object type path: SCHEMA_EXPORT/DEFAULT_ROLE
831 ALTER USER "LHR" DEFAULT ROLE ALL;
832-- new object type path: SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
833-- CONNECT LHR
834
835BEGIN
836sys.dbms_logrep_imp.instantiate_schema(schema_name=>SYS_CONTEXT('USERENV','CURRENT_SCHEMA'), export_db_name=>'LHR11G', inst_scn=>'1336883');
837COMMIT;
838END;
839/
840-- new object type path: SCHEMA_EXPORT/TABLE/TABLE
841-- CONNECT SYSTEM
842CREATE TABLE "LHR"."T1"
843   (    "OWNER" VARCHAR2(30 BYTE),
844        "OBJECT_NAME" VARCHAR2(128 BYTE),
845        "SUBOBJECT_NAME" VARCHAR2(30 BYTE),
846        "OBJECT_ID" NUMBER,
847        "DATA_OBJECT_ID" NUMBER,
848        "OBJECT_TYPE" VARCHAR2(19 BYTE),
849[oracle@lhrora11204 dpdump]$
850[oracle@lhrora11204 dpdump]$
851[oracle@lhrora11204 dpdump]$ sas
852
853SQL*Plus: Release 11.2.0.4.0 Production on Sat Dec 10 02:05:27 2022
854
855Copyright (c) 19822013, Oracle.  All rights reserved.
856
857
858Connected to:
859Oracle Database 11Enterprise Edition Release 11.2.0.4.0 - 64bit Production
860With the Partitioning, OLAP, Data Mining and Real Application Testing options
861
862SYS@LHR11G> @index.sql
863
864Session altered.
865
866
867Session altered.
868
869
870Session altered.
871
872
873Session altered.
874
875
876Session altered.
877
878
879Session altered.
880
881 CREATE USER "LHR" IDENTIFIED BY VALUES 'S:072AA6DEB5DA3D824222DE075DEA77DB5107CD66984BE2C2551A719546E8;157AE4BCFD41976D'
882             *
883ERROR at line 1:
884ORA-01920user name 'LHR' conflicts with another user or role name
885
886
887
888Grant succeeded.
889
890
891Grant succeeded.
892
893
894User altered.
895
896
897PL/SQL procedure successfully completed.
898
899CREATE TABLE "LHR"."T1"
900                   *
901ERROR at line 1:
902ORA-00955name is already used by an existing object
903
904
905CREATE TABLE "LHR"."T3"
906                   *
907ERROR at line 1:
908ORA-00955name is already used by an existing object
909
910
911
912Index created.
913
914
915Index altered.
916
917
918PL/SQL procedure successfully completed.
919
920
921PL/SQL procedure successfully completed.
922
923
924PL/SQL procedure successfully completed.
925
926
927PL/SQL procedure successfully completed.
928
929
930PL/SQL procedure successfully completed.
931
932
933PL/SQL procedure successfully completed.
934
935
936PL/SQL procedure successfully completed.
937
938
939PL/SQL procedure successfully completed.
940
941
942PL/SQL procedure successfully completed.
943
944SYS@LHR11G> conn lhr/lhr
945Connected.
946LHR@LHR11G>
947LHR@LHR11G> select count(*) from user_indexes;
948
949  COUNT(*)
950----------
951         1
952
953LHR@LHR11G> exit
954Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
955With the Partitioning, OLAP, Data Mining and Real Application Testing options
956[oracle@lhrora11204 dpdump]$ more index.sql | grep drop
957[oracle@lhrora11204 dpdump]$
958[oracle@lhrora11204 dpdump]$
959[oracle@lhrora11204 dpdump]$ more index.sql | grep drop -i
960[oracle@lhrora11204 dpdump]$ more index.sql | grep create -i
961 CREATE USER "LHR" IDENTIFIED BY VALUES 'S:072AA6DEB5DA3D824222DE075DEA77DB5107CD66984BE2C2551A719546E8;157AE4BCFD41976D'
962CREATE TABLE "LHR"."T1"
963        "CREATED" DATE,
964CREATE TABLE "LHR"."T3"
965        "CREATED" DATE,
966CREATE INDEX "LHR"."IDX_1" ON "LHR"."T1" ("OWNER")
967  c := 'CREATED';
968  c := 'CREATED';

实验2:导入一半后强制停止数据库

先导出sh用户的数据:

  1[oracle@lhrora11204 dpdump]$ expdp \'/ AS SYSDBA\' directory=DATA_PUMP_DIR dumpfile=SYSTEM.dmp SCHEMAS=SH
2
3Export: Release 11.2.0.4.0 - Production on Mon Dec 12 15:56:00 2022
4
5Copyright (c) 19822011Oracle and/or its affiliates.  All rights reserved.
6
7Connected toOracle Database 11Enterprise Edition Release 11.2.0.4.0 - 64bit Production
8With the Partitioning, OLAP, Data Mining and Real Application Testing options
9Starting "SYS"."SYS_EXPORT_SCHEMA_01":  "/******** AS SYSDBA" directory=DATA_PUMP_DIR dumpfile=SYSTEM.dmp SCHEMAS=SH 
10Estimate in progress using BLOCKS method...
11Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
12Total estimation using BLOCKS method: 273.8 MB
13Processing object type SCHEMA_EXPORT/USER
14Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
15Processing object type SCHEMA_EXPORT/ROLE_GRANT
16Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
17Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
18Processing object type SCHEMA_EXPORT/TABLE/TABLE
19Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
20Processing object type SCHEMA_EXPORT/TABLE/COMMENT
21Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
22Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
23Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
24Processing object type SCHEMA_EXPORT/VIEW/VIEW
25Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
26Processing object type SCHEMA_EXPORT/TABLE/INDEX/BITMAP_INDEX/INDEX
27Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/BITMAP_INDEX/INDEX_STATISTICS
28Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
29Processing object type SCHEMA_EXPORT/TABLE/INDEX/DOMAIN_INDEX/INDEX
30Processing object type SCHEMA_EXPORT/MATERIALIZED_VIEW
31Processing object type SCHEMA_EXPORT/DIMENSION
32. . exported "SH"."CUSTOMERS"                            9.853 MB   55500 rows
33. . exported "SH"."COSTS":"COSTS_Q1_1998"                139.5 KB    4411 rows
34. . exported "SH"."COSTS":"COSTS_Q1_1999"                183.5 KB    5884 rows
35. . exported "SH"."COSTS":"COSTS_Q1_2000"                120.6 KB    3772 rows
36. . exported "SH"."COSTS":"COSTS_Q1_2001"                227.8 KB    7328 rows
37. . exported "SH"."COSTS":"COSTS_Q2_1998"                79.52 KB    2397 rows
38. . exported "SH"."COSTS":"COSTS_Q2_1999"                132.5 KB    4179 rows
39. . exported "SH"."COSTS":"COSTS_Q2_2000"                119.0 KB    3715 rows
40. . exported "SH"."COSTS":"COSTS_Q2_2001"                184.5 KB    5882 rows
41. . exported "SH"."COSTS":"COSTS_Q3_1998"                131.1 KB    4129 rows
42. . exported "SH"."COSTS":"COSTS_Q3_1999"                137.3 KB    4336 rows
43. . exported "SH"."COSTS":"COSTS_Q3_2000"                151.4 KB    4798 rows
44. . exported "SH"."COSTS":"COSTS_Q3_2001"                234.4 KB    7545 rows
45. . exported "SH"."COSTS":"COSTS_Q4_1998"                144.7 KB    4577 rows
46. . exported "SH"."COSTS":"COSTS_Q4_1999"                159.0 KB    5060 rows
47. . exported "SH"."COSTS":"COSTS_Q4_2000"                160.2 KB    5088 rows
48. . exported "SH"."COSTS":"COSTS_Q4_2001"                278.4 KB    9011 rows
49. . exported "SH"."SALES":"SALES_Q1_1998"                1.412 MB   43687 rows
50. . exported "SH"."SALES":"SALES_Q1_1999"                2.071 MB   64186 rows
51. . exported "SH"."SALES":"SALES_Q1_2000"                2.012 MB   62197 rows
52. . exported "SH"."SALES":"SALES_Q1_2001"                1.965 MB   60608 rows
53. . exported "SH"."SALES":"SALES_Q2_1998"                1.160 MB   35758 rows
54. . exported "SH"."SALES":"SALES_Q2_1999"                1.754 MB   54233 rows
55. . exported "SH"."SALES":"SALES_Q2_2000"                1.802 MB   55515 rows
56. . exported "SH"."SALES":"SALES_Q2_2001"                2.051 MB   63292 rows
57. . exported "SH"."SALES":"SALES_Q3_1998"                1.633 MB   50515 rows
58. . exported "SH"."SALES":"SALES_Q3_1999"                2.166 MB   67138 rows
59. . exported "SH"."SALES":"SALES_Q3_2000"                1.909 MB   58950 rows
60. . exported "SH"."SALES":"SALES_Q3_2001"                2.130 MB   65769 rows
61. . exported "SH"."SALES":"SALES_Q4_1998"                1.581 MB   48874 rows
62. . exported "SH"."SALES":"SALES_Q4_1999"                2.014 MB   62388 rows
63. . exported "SH"."SALES":"SALES_Q4_2000"                1.814 MB   55984 rows
64. . exported "SH"."SALES":"SALES_Q4_2001"                2.257 MB   69749 rows
65. . exported "SH"."SUPPLEMENTARY_DEMOGRAPHICS"           697.3 KB    4500 rows
66. . exported "SH"."FWEEK_PSCAT_SALES_MV"                 419.8 KB   11266 rows
67. . exported "SH"."PROMOTIONS"                           58.89 KB     503 rows
68. . exported "SH"."TIMES"                                380.8 KB    1826 rows
69. . exported "SH"."CAL_MONTH_SALES_MV"                   6.312 KB      48 rows
70. . exported "SH"."CHANNELS"                              7.25 KB       5 rows
71. . exported "SH"."COUNTRIES"                            10.20 KB      23 rows
72. . exported "SH"."PRODUCTS"                             26.17 KB      72 rows
73. . exported "SH"."COSTS":"COSTS_1995"                       0 KB       0 rows
74. . exported "SH"."COSTS":"COSTS_1996"                       0 KB       0 rows
75. . exported "SH"."COSTS":"COSTS_H1_1997"                    0 KB       0 rows
76. . exported "SH"."COSTS":"COSTS_H2_1997"                    0 KB       0 rows
77. . exported "SH"."COSTS":"COSTS_Q1_2002"                    0 KB       0 rows
78. . exported "SH"."COSTS":"COSTS_Q1_2003"                    0 KB       0 rows
79. . exported "SH"."COSTS":"COSTS_Q2_2002"                    0 KB       0 rows
80. . exported "SH"."COSTS":"COSTS_Q2_2003"                    0 KB       0 rows
81. . exported "SH"."COSTS":"COSTS_Q3_2002"                    0 KB       0 rows
82. . exported "SH"."COSTS":"COSTS_Q3_2003"                    0 KB       0 rows
83. . exported "SH"."COSTS":"COSTS_Q4_2002"                    0 KB       0 rows
84. . exported "SH"."COSTS":"COSTS_Q4_2003"                    0 KB       0 rows
85. . exported "SH"."DIMENSION_EXCEPTIONS"                     0 KB       0 rows
86. . exported "SH"."SALES":"SALES_1995"                       0 KB       0 rows
87. . exported "SH"."SALES":"SALES_1996"                       0 KB       0 rows
88. . exported "SH"."SALES":"SALES_H1_1997"                    0 KB       0 rows
89. . exported "SH"."SALES":"SALES_H2_1997"                    0 KB       0 rows
90. . exported "SH"."SALES":"SALES_Q1_2002"                    0 KB       0 rows
91. . exported "SH"."SALES":"SALES_Q1_2003"                    0 KB       0 rows
92. . exported "SH"."SALES":"SALES_Q2_2002"                    0 KB       0 rows
93. . exported "SH"."SALES":"SALES_Q2_2003"                    0 KB       0 rows
94. . exported "SH"."SALES":"SALES_Q3_2002"                    0 KB       0 rows
95. . exported "SH"."SALES":"SALES_Q3_2003"                    0 KB       0 rows
96. . exported "SH"."SALES":"SALES_Q4_2002"                    0 KB       0 rows
97. . exported "SH"."SALES":"SALES_Q4_2003"                    0 KB       0 rows
98Master table "SYS"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
99******************************************************************************
100Dump file set for SYS.SYS_EXPORT_SCHEMA_01 is:
101  /u01/app/oracle/admin/LHR11G/dpdump/SYSTEM.dmp
102Job "SYS"."SYS_EXPORT_SCHEMA_01" successfully completed at Mon Dec 12 15:56:34 2022 elapsed 0 00:00:31

然后再导入sh用户的数据到lhr用户,在导入一半的时候将数据库重启:

 1[oracle@lhrora11204 dpdump]$ impdp \'/ AS SYSDBA\' directory=DATA_PUMP_DIR dumpfile=SYSTEM.dmp FULL=Y REMAP_SCHEMA=SH:LHR
2
3Import: Release 11.2.0.4.0 - Production on Mon Dec 12 15:57:32 2022
4
5Copyright (c) 19822011Oracle and/or its affiliates.  All rights reserved.
6
7Connected toOracle Database 11Enterprise Edition Release 11.2.0.4.0 - 64bit Production
8With the Partitioning, OLAP, Data Mining and Real Application Testing options
9Master table "SYS"."SYS_IMPORT_FULL_02" successfully loaded/unloaded
10Starting "SYS"."SYS_IMPORT_FULL_02":  "/******** AS SYSDBA" directory=DATA_PUMP_DIR dumpfile=SYSTEM.dmp FULL=Y REMAP_SCHEMA=SH:LHR 
11Processing object type SCHEMA_EXPORT/USER
12ORA-31684Object type USER:"LHR" already exists
13Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
14Processing object type SCHEMA_EXPORT/ROLE_GRANT
15Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
16Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
17Processing object type SCHEMA_EXPORT/TABLE/TABLE
18Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
19. . imported "LHR"."CUSTOMERS"                           9.853 MB   55500 rows
20. . imported "LHR"."COSTS":"COSTS_Q1_1998"               139.5 KB    4411 rows
21. . imported "LHR"."COSTS":"COSTS_Q1_1999"               183.5 KB    5884 rows
22. . imported "LHR"."COSTS":"COSTS_Q1_2000"               120.6 KB    3772 rows
23. . imported "LHR"."COSTS":"COSTS_Q1_2001"               227.8 KB    7328 rows
24. . imported "LHR"."COSTS":"COSTS_Q2_1998"               79.52 KB    2397 rows
25. . imported "LHR"."COSTS":"COSTS_Q2_1999"               132.5 KB    4179 rows
26. . imported "LHR"."COSTS":"COSTS_Q2_2000"               119.0 KB    3715 rows
27. . imported "LHR"."COSTS":"COSTS_Q2_2001"               184.5 KB    5882 rows
28. . imported "LHR"."COSTS":"COSTS_Q3_1998"               131.1 KB    4129 rows
29. . imported "LHR"."COSTS":"COSTS_Q3_1999"               137.3 KB    4336 rows
30. . imported "LHR"."COSTS":"COSTS_Q3_2000"               151.4 KB    4798 rows
31. . imported "LHR"."COSTS":"COSTS_Q3_2001"               234.4 KB    7545 rows
32
33UDI-03113: operation generated ORACLE error 3113
34ORA-03113end-of-file on communication channel
35Process ID1330
36Session ID190 Serial number17
37
38
39UDI-03114: operation generated ORACLE error 3114
40ORA-03114not connected to ORACLE

在导入一半的时候,强制重启数据库,此时已经导入了2个表。

在强制重启完数据库后,进入数据库查看:

 1SYS@LHR11G> conn lhr/lhr
2Connected.
3LHR@LHR11G> select * from tab;
4
5TNAME                                                        TABTYPE         CLUSTERID
6------------------------------------------------------------ -------------- ----------
7CAL_MONTH_SALES_MV                                           TABLE
8CHANNELS                                                     TABLE
9COSTS                                                        TABLE
10COUNTRIES                                                    TABLE
11CUSTOMERS                                                    TABLE
12DIMENSION_EXCEPTIONS                                         TABLE
13FWEEK_PSCAT_SALES_MV                                         TABLE
14PRODUCTS                                                     TABLE
15PROMOTIONS                                                   TABLE
16SALES                                                        TABLE
17SALES_TRANSACTIONS_EXT                                       TABLE
18SUPPLEMENTARY_DEMOGRAPHICS                                   TABLE
19TIMES                                                        TABLE
20
2113 rows selected.
22
23LHR@LHR11G> conn sh/sh
24Connected.
25SH@LHR11G> select * from tab;
26
27TNAME                                                        TABTYPE         CLUSTERID
28------------------------------------------------------------ -------------- ----------
29CAL_MONTH_SALES_MV                                           TABLE
30CHANNELS                                                     TABLE
31COSTS                                                        TABLE
32COUNTRIES                                                    TABLE
33CUSTOMERS                                                    TABLE
34DIMENSION_EXCEPTIONS                                         TABLE
35FWEEK_PSCAT_SALES_MV                                         TABLE
36PRODUCTS                                                     TABLE
37PROMOTIONS                                                   TABLE
38SALES                                                        TABLE
39SALES_TRANSACTIONS_EXT                                       TABLE
40SUPPLEMENTARY_DEMOGRAPHICS                                   TABLE
41TIMES                                                        TABLE
42
4313 rows selected.

可以看到,LHR用户的表都已经创建完成了。由此可以推断出,尽管数据没有导入完成,但是在执行完“SCHEMA_EXPORT/TABLE/TABLE” 这个步骤后,其实数据库中的所有表都已经创建完成了。整个impdp导入过程是先创建所有表
,然后再插入数据,而不是边建表边插入数据。

总结

1、使用参数table_exists_action=SKIP
时需要特别注意,若表已存在,那么表上的索引不会被导入,所以可能导致索引丢失的问题。类似的提示:ORA-39151: Table "LHR"."T1" exists. All dependent metadata and data will be skipped due to table_exists_action of skip

2、参数table_exists_action
的默认值为SKIP,

TABLE_EXISTS_ACTION
默认为:SKIP
作用:定义了如果要导入的表已经存在,impdp的动作
值及其含义:
SKIP:不管已经存在的表,直接跳过,会导致表上的索引、触发器、约束等缺失问题,也可能会导致数据丢失
APPEND:保持现有数据不变,导入源数据
TRUNCATE:删掉现有数据,导入源数据
REPLACE:删掉现有表,并重建,导入源数据

3、若需要重新做导入操作,而不导入之前已经导入的数据,那么可以使用如下的办法:

 1-- 导出导入
2expdp  system/lhr DIRECTORY=DATA_PUMP_DIR dumpfile=a.dmp schemas=lhr
3impdp  system/lhr DIRECTORY=DATA_PUMP_DIR dumpfile=a.dmp schemas=lhr
4
5
6-- 若报错需要从头开始导入(重复入库,比较慢)
7impdp  system/lhr DIRECTORY=DATA_PUMP_DIR dumpfile=a.dmp schemas=lhr table_exists_action=REPLACE
8
9
10
11-- 若报错重复导入跳过之前已经导入的表
12impdp  system/lhr DIRECTORY=DATA_PUMP_DIR dumpfile=a.dmp table_exists_action=SKIP schemas=lhr
13
14-- 最后再把元数据导出导入一下(必须)
15expdp  system/lhr DIRECTORY=DATA_PUMP_DIR dumpfile=b.dmp schemas=lhr content=metadata_only
16
17impdp  system/lhr DIRECTORY=DATA_PUMP_DIR dumpfile=b.dmp schemas=lhr sqlfile=ddl.sql
18@ddl.sql
19
20-- 或者直接导入索引、约束和触发器
21impdp  system/lhr DIRECTORY=DATA_PUMP_DIR dumpfile=b.dmp schemas=lhr INCLUDE=INDEX,CONSTRAINT,TRIGGER sqlfile=ddl.sql
22@ddl.sql

注意:

1、最后的sqlfile=ddl.sql
也不能加 EXCLUDE=TABLE,否则也会排除掉索引

2、也可以只导最后的索引和约束。

3、在跑脚本建索引时需要注意临时表空间的使用率。

4、在执行完“SCHEMA_EXPORT/TABLE/TABLE” 这个步骤后,其实数据库中的所有表都已经创建完成了。整个impdp导入过程是先创建所有表
,然后再插入数据,而不是边建表边插入数据。

5、最后需要特别注意的一点,使用方法3的前提条件是,必须保证所有的表和数据都已经导入完成了,否则会造成数据丢失,这个问题非常严峻。所以,若时间允许,我们强烈建议使用replace或truncate选项进行重新导入。


文章转载自DB宝,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论