2010年2月19日星期五

expdp實驗

仰慕expdp,impdp很久,一直沒有動手做過,記錄一下expdp的實驗的內容:

[oracle@localhost ~]$ expdp scott/tiger DIRECTORY=dump_dir dumpfile=emp.dmp tables=emp
Export: Release 10.2.0.1.0 - 64bit Production on 星期六, 27 2月, 2010 7:12:40
Copyright (c) 2003, 2005, Oracle.  All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-39087: directory name DUMP_DIR is invalid

報錯了

[oracle@localhost ~]$ sqlplus scott/tiger
SQL*Plus: Release 10.2.0.1.0 - Production on 星期六 2月 27 07:18:57 2010
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> create directory dump_dir as '/u01';
create directory dump_dir as '/u01'
*
ERROR at line 1:
ORA-01031: insufficient privileges

SQL> conn / as sysdba;
Connected.
SQL> create directory dump_dir as '/u01/dump';
Directory created.
SQL> grant read, write on directory dump_dir to scott;
Grant succeeded.
SQL>

 

[oracle@localhost ~]$ expdp scott/tiger DIRECTORY=dump_dir dumpfile=emp.dmp tables=emp
Export: Release 10.2.0.1.0 - 64bit Production on 星期六, 27 2月, 2010 7:22:27
Copyright (c) 2003, 2005, Oracle.  All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
Starting "SCOTT"."SYS_EXPORT_TABLE_01":  scott/******** DIRECTORY=dump_dir dumpfile=emp.dmp tables=emp
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
. . exported "SCOTT"."EMP"                               7.820 KB      14 rows
Master table "SCOTT"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SCOTT.SYS_EXPORT_TABLE_01 is:
  /u01/dump/emp.dmp
Job "SCOTT"."SYS_EXPORT_TABLE_01" successfully completed at 07:22:49
[oracle@localhost ~]$

 

[oracle@localhost dump]$ ls
emp.dmp  export.log
[oracle@localhost dump]$
[oracle@localhost dump]$ strings  emp.dmp |less
<CHARSET>WE8ISO8859P1</CHARSET>
//字符集

<NCHARSET
>AL16UTF16</NCHARSET>國家字符集

 

這個表的數據不大,體現不出來優勢,不過基本上跑過了,呵呵!

春節後的第一貼!

没有评论:

发表评论