前言:ORACLE的 DIRECTORY在数据库中是个目录的路径,需要在操作系统中有相应的目录与之对应;ORACLE目录的作用就是让ORACLE数据库和操作系统之前进行文件的交互,最常见的就是数据泵的导入和导出;
DIRECTORY的管理步骤:
1、创建:CREATE [OR REPLACE] DIRECTORY directory AS 'pathname' ;
例如:CREATE OR REPLACE DIRECTORY DIR AS 'F:\expbak';
2、赋权:GRANT READ[,WRITE] ON DIRECTORY directory TO username;
例如:grant read, write on directory exp_dir to john;
3、查询directory的方法
select * from dba_directories;
4、删除:drop directory DATACHK_DUMP;
5、通过数据泵导出数据到相应的目录
expdp john/john directory=dir dumpfile=FULL.dmp schemas=datachk
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
本文作者:JOHN
ORACLE技术博客:ORACLE 猎人笔记 数据库技术群:367875324 (请备注ORACLE管理 )
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++