oracle 数据库学习笔记
Giser-Yu
1、导入命令
imp Test/Test@ORCL file='D:\bdcdata\Test.DMP' log='D:\bdcdata\Test_in.log' full=y;
参数tables=(table1,table2)设置部分表导出/导入
2、导出命令
exp userid=scott/tiger@orcl file=D:\BACK01.dmp log=D:\BACK01.log
3、数据泵导入、导出操作
1.使用管理员身份登陆:
sqlplus username/password@SID as sysdba
2.创建路径:
create or replace directory cad as 'E:\oracle';
3.给用户授权
grant read,write on directory cad to username(指定用户)/public(所有用户);
grant read,write on directory cad to Test;
4.数据还原(在cmd窗口运行):
impdp username/password@ORCL directory=cad dumpfile=xxx.dmp logfile=xxx_impdp.log full=y;
可选参数
schemas=username
remap_schema= Test:Test
remap_tablespace= Test:Test
5.数据库备份(cmd窗口运行):<