admin 管理员组

文章数量: 1086019


2024年4月24日发(作者:关于fifo描述正确的是)

一、创建逻辑目录,该命令不会在操作系统创建真正的目录,最好以system等管理

员创建。

create directory dpdata1 as 'd:testdump';

二、查看管理理员目录(同时查看操作系统是否存在,因为Oracle并不关心该目录是

否存在,如果不存在,则出错)

select * from dba_directories;

三、给scott用户赋予在指定目录的操作权限,最好以system等管理员赋予。

grant read,write on directory dpdata1 to scott;

四、导出数据

1)按用户导

expdp scott/tiger@orcl schemas=scott dumpfile= DIRECTORY=dp

data1;

2)并行进程parallel

expdp scott/tiger@orcl directory=dpdata1 dumpfile= parallel=40

job_name=scott3

3)按表名导

expdp scott/tiger@orcl TABLES=emp,dept dumpfile= DIRECTORY

=dpdata1;

4)按查询条件导

expdp scott/tiger@orcl directory=dpdata1 dumpfile= Tables=em

p query='WHERE deptno=20';

5)按表空间导

expdp system/manager DIRECTORY=dpdata1 DUMPFILE= TA

BLESPACES=temp,example;

6)导整个数据库

expdp system/manager DIRECTORY=dpdata1 DUMPFILE= FULL=y;

五、还原数据

1)导到指定用户下

impdp scott/tiger DIRECTORY=dpdata1 DUMPFILE= SCHEMAS=s

cott;


本文标签: 目录 指定 查看 数据