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. Linux源码编译安装nginx

    ps:一切从简 一.安装所需环境: yum -y install gcc gcc-c++ automake pcre pcre-devel zlip zlib-devel openssl openss ...

  2. ClickOnce部署,修改deploymentProvider

    打开 以.application 为后缀的文件,找到并修改 <deploymentProvider codebase="" /> 即可

  3. 用python实现文件加密功能

    生活中,有时候我们需要对一些重要的文件进行加密,Python 提供了诸如 hashlib,base64 等便于使用的加密库. 但对于日常学习而言,我们可以借助异或操作,实现一个简单的文件加密程序,从而 ...

  4. web前端技能考核(阿里巴巴)

  5. 红帽RHCE培训-课程2笔记目录

    目录 1 kickstart自动安装 DHCP+TFTP(syslinux) +FTP +KICKSTART ~/anaconda-ks.cfg system-config-kickstart 2 g ...

  6. 1022_Digital_Library (30分)

    这里提供两种写法, 其实都是一样的,第一种比较快. #include <bits/stdc++.h> using namespace std; map<string,set<s ...

  7. Python--比较两个字典部分value是否相等(可以用于接口自动化)

    eg:例如你调用了一个新增的接口,以往功能测试的话,你再web端新增一个店铺之后,你肯定要去数据库中查看,这些数据插入的对不对,是否正确的插入了每个字段 # 比较两个字典部分是否相等 def comp ...

  8. iframe多层嵌套时,Jquery获取元素

    在项目中,尤其是后台管理项目,会使用到iframe嵌套的网页,说起iframe,真的是个让人头疼的东西,能避开是最好避开.不然要请随身备好氧气瓶哈(因为管理和调试过程中往往会被气缺氧!!!哈哈哈~~~ ...

  9. div 悬浮

    一个小需求,鼠标移动一个产品那, 显示这个产品的具体信息 代码如下: <a href="javascript:void(0);" onclick="frameSea ...

  10. php集成环境、基础标记符

    集成环境:wamp windows apache mysql php lamp linux apache mysql php 标记符: 1.<?php ...... ?> 2.<?p ...