oracle创建目录的命令,切记create directory命令不会创建操作系统的目录(expdp实验1)...

连接到:

Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 -

Production

With the Partitioning, OLAP and Data Mining options

SQL> alter user scott account unlock;

用户已更改。

SQL> conn scott/tiger

已连接。

SQL> conn / as sysdba

已连接。

SQL> show user

USER 为 "SYS"

SQL> create directory dmpdir as 'G:\dmpdir';

目录已创建。

SQL> grant read,write on directory to

scott;

grant read,write on directory to scott

*

第 1 行出现错误:

ORA-00942: 表或视图不存在

SQL> grant read,write on directory dmpdir to

scott;

授权成功。

SQL>

另外一个cmd窗口:

C:\Documents and Settings\Administrator>expdp

scott/tiger dumpfile=scott.dmp

directory=dmpdir schemas=scott

Export: Release 10.1.0.2.0 - Production on 星期四, 03 5月, 2012

9:59

Copyright (c) 2003, Oracle. All rights

reserved.

连接到: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0

-

Production

With the Partitioning, OLAP and Data Mining options

ORA-39002: 操作无效

ORA-39070: 无法打开日志文件。

ORA-29283: 文件操作无效

ORA-06512: 在 "SYS.UTL_FILE", line 475

ORA-29283: 文件操作无效

SQL> select directory_name, directory_path from

dba_directories;

DIRECTORY_NAME DIRECTORY_PATH

------------------------------ ------------------------------

DM_PMML_DIR D:\oracle\product\10.1.0\db_1\

dm\admin

LOG_FILE_DIR D:\oracle\product\10.1.0\db_1\

demo\schema\log\

DATA_FILE_DIR D:\oracle\product\10.1.0\db_1\

demo\schema\sales_history\

MEDIA_DIR D:\oracle\product\10.1.0\db_1\

demo\schema\product_media\

DIRECTORY_NAME DIRECTORY_PATH

------------------------------ ------------------------------

DMPDIR G:\dmpdir

C:\Documents and Settings\Administrator>G:

G:\>dir

驱动器 G 中的卷是 办公

卷的序列号是 000A-B577

G:\ 的目录

2012-02-23 14:07 9 id.txt

2011-08-09 20:20 

2012-04-13 13:51 

2011-10-20 12:34 

2012-03-21 17:05 

2012-05-03 09:41 

2012-04-17 17:13 

2012-04-13 15:35 

2011-08-22 17:11 960,000 [IMS培训].ppt

2011-11-04 13:54 

2

个文件 960,009 字节

8 个目录 28,626,407,424 可用字节

G:\>mkdir dmpdir

G:\>cd dmpdir

G:\dmpdir>expdp scott/tiger dumpfile=scott.dmp

directory=dmpdir

schemas=scott

Export: Release 10.1.0.2.0 - Production on 星期四, 03 5月, 2012

10:10

Copyright (c) 2003, Oracle. All rights

reserved.

连接到: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0

-

Production

With the Partitioning, OLAP and Data Mining options

自动启用 FLASHBACK 以保持数据库完整性。

启动 "SCOTT"."SYS_EXPORT_SCHEMA_01": scott/********

dumpfile=scott.dmp

director

y=dmpdir schemas=scott

正在使用 BLOCKS 方法进行估计...

处理对象类型 SCHEMA_EXPORT/TABLE/TABLE_DATA

使用 BLOCKS 方法的总估计: 384 KB

处理对象类型 SCHEMA_EXPORT/USER

处理对象类型 SCHEMA_EXPORT/SYSTEM_GRANT

处理对象类型 SCHEMA_EXPORT/ROLE_GRANT

处理对象类型 SCHEMA_EXPORT/DEFAULT_ROLE

处理对象类型 SCHEMA_EXPORT/SE_PRE_SCHEMA_PROCOBJACT/PROCACT_SCHEMA

处理对象类型 SCHEMA_EXPORT/TABLE/TABLE

处理对象类型 SCHEMA_EXPORT/TABLE/INDEX/INDEX

处理对象类型 SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT

处理对象类型 SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS

处理对象类型 SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS

处理对象类型 SCHEMA_EXPORT/TABLE/COMMENT

处理对象类型 SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT

. . 导出了

"SCOTT"."TEST3" 112.9 KB 5001

. . 导出了

"SCOTT"."DEPT" 5.656

KB 4 行

. . 导出了

"SCOTT"."EMP" 7.820

KB 14 行

. . 导出了

"SCOTT"."SALGRADE" 5.585

KB 5 行

. . 导出了

"SCOTT"."BONUS" 0

KB 0 行

已成功加载/卸载了主表 "SCOTT"."SYS_EXPORT_SCHEMA_01"

****************************************************************************

**

SCOTT.SYS_EXPORT_SCHEMA_01 的转储文件集为:

G:\DMPDIR\SCOTT.DMP

作业 "SCOTT"."SYS_EXPORT_SCHEMA_01" 已于 10:10 成功完成

G:\dmpdir>dir

驱动器 G 中的卷是 办公

卷的序列号是 000A-B577

G:\dmpdir 的目录

2012-05-03 10:10 

2012-05-03 10:10 

2012-05-03 10:10 1,762 export.log

2012-05-03 10:10 368,640 SCOTT.DMP

2

个文件 370,402 字节

2 个目录 28,626,034,688 可用字节

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值