3,把测试数据导入到11G SCOTT用户下面
- [Oracle11g@rhel4 sql]$ impdp scott/oracle directory=dumpdumpfile=test1.dmp TABLE_EXISTS_ACTION=appendlogfile=imdp.log
- Import: Release 11.2.0.3.0 - Production on Sat Apr 6 21:51:08 2013
- Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
- Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- Master table "SCOTT"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
- Starting "SCOTT"."SYS_IMPORT_FULL_01": scott/******** directory=dumpdumpfile=test1.dmp TABLE_EXISTS_ACTION=appendlogfile=imdp.log
- Processing object type TABLE_EXPORT/TABLE/TABLE
- Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
- . . imported "SCOTT"."TEST1" 4.636 MB 50091 rows
- Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
- Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
- Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
- Job "SCOTT"."SYS_IMPORT_FULL_01" successfully completed at 21:51:12
4,把stored outline数据导入到11G OUTLN用户中
- [oracle11g@rhel4 sql]$ impdp outln/oracle directory=dumpdumpfile=outln.dmp TABLE_EXISTS_ACTION=append
- Import: Release 11.2.0.3.0 - Production on Sat Apr 6 21:51:52 2013
- Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
- Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- Master table "OUTLN"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
- Starting "OUTLN"."SYS_IMPORT_FULL_01": outln/******** directory=dumpdumpfile=outln.dmp TABLE_EXISTS_ACTION=append
- Processing object type TABLE_EXPORT/TABLE/TABLE
- Table "OUTLN"."OL$" exists. Data will be appended to existing table but all dependent metadata will be skipped due to table_exists_action of append
- Table "OUTLN"."OL$NODES" exists. Data will be appended to existing table but all dependent metadata will be skipped due to table_exists_action of append
- Table "OUTLN"."OL$HINTS" exists. Data will be appended to existing table but all dependent metadata will be skipped due to table_exists_action of append
- Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
- . . imported "OUTLN"."OL$HINTS" 11.59 KB 5 rows
- . . imported "OUTLN"."OL$" 9.070 KB 1 rows
- . . imported "OUTLN"."OL$NODES" 7.078 KB 1 rows
- Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
- Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
- Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
- Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
- Processing object type TABLE_EXPORT/TABLE/POST_TABLE_ACTION
- Job "OUTLN"."SYS_IMPORT_FULL_01" successfully completed at 21:52:00
- 查看是否已经生成new_outline_1
- SQL> @sql_outline
- Wrote file sqlplusset
- CATEGORY
- ---------------
- DEFAULT
- Enter value for owner: scott
- Enter value for category: default
- Enter value for used:
- CREATE
- NAME OWNER CATEGORY USED TIME COMPATIBLE ENABLED FORMAT SQL_TEXT
- ----------------------------- --------------- --------------- ------ -------- ------------ -------- ------ ----------------------------------------------------------------------
- NEW_OUTLINE_1 SCOTT DEFAULT USED 13 04-06 COMPATIBLE ENABLED NORMAL select /*+ full(t)*/ count(*) from test1 t where object_id=1
