create directory dump_dir as 'd:\dump';
grant read,write on directory dump_dir to scott;
--在cmd下
expdp scott/1qaz2wsx directory=dump_dir dumpfile=tab.dmp tables=emp,dept
expdp system/1qaz2wsx directory = dump_dir dumpfile=schema.dmp schemas = scott,hr
expdp system/1qaz2wsx directory = dump_dir dumpfile = tablespace.dmp tablespaces = tbsp_1
expdp system/1qaz2wsx directory=dump_dir dumpfile=fulldatabase.dmp full=y
expdp scott/1qaz2wsx directory=dump_dir dumpfile=content.dmp content=data_only
expdp scott/1qaz2wsx directory=dump_dir dumpfile=query.dmp tables=dept query='where deptno=10'
impdp system/1qaz2wsx directory=dump_dir dumpfile=tab.dmp tables=scott.dept,scott.emp remap_schema=scott:system
impdp system/1qaz2wsx directory=dump_dir dumpfile=schema.dmp schemas=scott remap_schema=scott:system;
impdp system/1qaz2wsx directory=dump_dir dumpfile=tablespace.dmp tablespaces=tbsp_1
impdp system/1qaz2wsx directory=dump_dir dumpfile=fulldatabase.dmp full=y
impdp scott/1qaz2wsx directory=dump_dir dumpfile=sqlfile.dmp sqlfile=test.sql
impdp system/1qaz2wsx directory=dump dumpfile=tran_datafiles.dmp transport_datafiles='d:\OracleData\test.dbf'
--在sqlplus环境下
create table student
(stuno number(4),
stuname varchar2(20),
sex varchar2(4),
old number(4)
); ---在cmd环境下
sqlldr system/1qaz2wsx control=d:\data\student.ctl log=d:\data\stu_log

1001 东方 男 30
1002 开心 女 25
1003 JACK 男 23
1004 ROSE 女 20

--在sqlplus环境下
create table persons
(code number(4),
name varchar2(20),
sex varchar2(4),
old number(4)
); --在cmd环境下
sqlldr system/1qaz2wsx control=d:\data\persons.ctl

1005,east,女,26
1006,west,男,25
1007,happy,男,24
1008,mary,女,20

--创建目录
create directory dump_dir as 'd:\dump'; --给hr授权
grant read,write on directory dump_dir to hr; --在cmd下导出表
expdp hr/hr directory=dump_dir dumpfile=tab.dmp tables=employees
--在cmd下导入
impdp scott/1qaz2wsx directory=dump_dir dumpfile=tab.dmp tables=hr.employees remap_schema=hr:scott

吴裕雄--天生自然ORACLE数据库学习笔记:数据导出与导入的更多相关文章

  1. 吴裕雄--天生自然ORACLE数据库学习笔记:Oracle数据备份与恢复

    run{ allocate channel ch_1 device type disk format = 'd:\oraclebf\%u_%c.bak'; backup tablespace syst ...

  2. 吴裕雄--天生自然ORACLE数据库学习笔记:过程、函数、触发器和包

    create procedure pro_insertDept is begin ,'市场拓展部','JILIN'); --插入数据记录 commit; --提交数据 dbms_output.put_ ...

  3. 吴裕雄--天生自然ORACLE数据库学习笔记:PL/SQL编程

    set serveroutput on declare a ; b ; c number; begin c:=(a+b)/(a-b); dbms_output.put_line(c); excepti ...

  4. 吴裕雄--天生自然ORACLE数据库学习笔记:Oracle 11g的闪回技术

    alter system set db_recovery_file_dest_size=4g scope=both; connect system/1qaz2wsx as sysdba; archiv ...

  5. 吴裕雄--天生自然ORACLE数据库学习笔记:优化SQL语句

    create or replace procedure trun_table(table_deleted in varchar2) as --创建一个存储过程,传入一个表示表名称的参数,实现清空指定的 ...

  6. 吴裕雄--天生自然ORACLE数据库学习笔记:Oracle系统调优

    --修改 alter system set large_pool_size=64m; --显示 show parameter large_pool_size; select sum(getmisses ...

  7. 吴裕雄--天生自然ORACLE数据库学习笔记:用户管理与权限分配

    create user mr identified by mrsoft default tablespace users temporary tablespace temp; create user ...

  8. 吴裕雄--天生自然ORACLE数据库学习笔记:表分区与索引分区

    create table ware_retail_part --创建一个描述商品零售的数据表 ( id integer primary key,--销售编号 retail_date date,--销售 ...

  9. 吴裕雄--天生自然ORACLE数据库学习笔记:其它数据对象

    create index emp_deptno_index on emp(deptno) pctfree tablespace users; create bitmap index emp_salar ...

随机推荐

  1. Python 多任务(线程) day1

    多任务就是可以让一台电脑同时执行多个命令. 以前的单核cpu是怎么做到同时执行多个命令的?(时间片轮转) ——其实以前的单核CPU是让操作系统交替执行命令,每个任务执行0.01秒,这样看起来就像是在同 ...

  2. Python - CentOS 下 yum 安装 python3

    1. 概述 CentOS 7 自带 python2(python 以下正文简写为 py, 命令行中依然是 python) 尝试用 yum 安装 py3 2. 环境 os centos7 3. 步骤 1 ...

  3. Go_type

    1. type的定义和使用 Go语言支持函数式编程,可以使用高阶编程语法.一个函数可以作为另一个函数的参数,也可以作为另一个函数的返回值,那么在定义这个高阶函数的时候,如果函数的类型比较复杂,我们可以 ...

  4. 【Vue组件系统】

    目录 全局组件 局部组件 注册 子组件的用法 父子组件的通讯 子父组件的通讯 非父子组件的通讯 混入 插槽 具名插槽 使用组件的注意事项 使用组件实现导航栏 "vue.js既然是框架,那就不 ...

  5. SpringMVC重定向(redirect)传参数,前端EL表达式接受值

    由于重定向相当于2次请求,所以无法把参数加在model中传过去.在上面例子中,页面获取不到msg参数.要想获取参数,可以手动拼url,把参数带在后面.Spring 3.1 提供了一个很好用的类:Red ...

  6. 01-Spring的概述

    Spring概述 ①Spring是一个开源框架 ②Spring为简化企业级开发而生,使用Spring开发可以将Bean对象,Dao组件对象,Service组件对象等交给Spring容器来管理,这样使得 ...

  7. shell脚本编程学习笔记(三)编写邮件报警脚本

    一.shell编写邮件报警脚本 1.POSTFIX邮件服务器准备 a.首先卸载服务器上自带的sendmail rpm -qa sendmail* //查看安装的sendmail rpm -e send ...

  8. go语言下载及安装

    go语言下载地址:https://studygolang.com/dl 在cmd输入go 如果显示这样,说明安装成功 go env -w GOPROXY=https://goproxy.cn,dire ...

  9. 【题解】Rusty String [CF827E]

    [题解]Rusty String [CF827E] 传送门:\(\text{Rusty String}\) \(\text{[CF827E]}\) [题目描述] 多组数据,每组数据给出一个由 \(V, ...

  10. Laravel Vuejs 实战:开发知乎 (2)用户注册

    1.本节需要发送验证邮件 2.教程使用SendCloud发送邮件 [我使用的是mailtrap] 3. composer require laravel/ui 安装完成后 php artisan ui ...