导入数据库:
imp demo/123456@orcl file=d:/bak_1023.dmp full=y ignore=y
导出数据库:
exp demo/123456@orcl file=d:/bak_1023.dmp
exp yhtj/123456@127.0.0.1:1521/orcl file=d:\tijian.dmp
 create user lis_xh identified by 123456;
grant create session to lis_xh; --授予用户创建session的权限,即登陆权限
grant CREATE VIEW to lis_xh;--创建视图
--授予dba权限 grant connect,resource,dba to his_nh;
--视图
grant select on lis_xh_clc to lis_xh; --授予
grant select on lis_xh_inp to lis_xh; --授予
grant select on lis_xh_user to lis_xh; --授予
grant select on lis_xh_dept to lis_xh;--授予
grant select on lis_xh_labitem to lis_xh;--授予
grant select on lis_peis_tminfo to lis_xh; --授予
--存储过程
grant execute on lis_xh_return_confirm to lis_xh;
grant execute on peis_transmitresult to lis_xh;
grant execute on peis_saveresult to lis_xh;
grant execute on peis_reverse_audit to lis_xh;
--表
grant select on lis_dangerousnum to lis_xh;
grant insert on lis_dangerousnum to lis_xh;
grant update on lis_dangerousnum to lis_xh;
 查询某个表空间下的表:
Select Table_Name, Tablespace_Name From Dba_Tables Where Tablespace_Name = 'USERS'; dmp文件数据导出:
  1 将数据库TEST完全导出,用户名system 密码manager 导出到D:\daochu.dmp中
   exp system/manager@TEST file=d:\daochu.dmp full=y
  2 将数据库中system用户与sys用户的表导出
   exp system/manager@TEST file=d:\daochu.dmp owner=(system,sys)
  3 将数据库中的表inner_notify、notify_staff_relat导出
   exp aichannel/aichannel@TESTDB2 file= d:\data\newsmgnt.dmp tables=(inner_notify,notify_staff_relat)
  4 将数据库中的表table1中的字段filed1以"00"打头的数据导出
   exp system/manager@TEST file=d:\daochu.dmp tables=(table1) query=\" where filed1 like '00%'\"
  
   上面是常用的导出,对于压缩,既用winzip把dmp文件可以很好的压缩。
   也可以在上面命令后面 加上 compress=y 来实现。
dmp文件数据导入
  1 将D:\daochu.dmp 中的数据导入 TEST数据库中。
   imp system/manager@TEST file=d:\daochu.dmp
   imp aichannel/aichannel@HUST full=y file=file= d:\data\newsmgnt.dmp ignore=y
   上面可能有点问题,因为有的表已经存在,然后它就报错,对该表就不进行导入。
   在后面加上 ignore=y 就可以了。
  2 将d:\daochu.dmp中的表table1 导入
  imp system/manager@TEST file=d:\daochu.dmp tables=(table1)
  基本上上面的导入导出够用了。不少情况要先是将表彻底删除,然后导入。
exp yhtj/123456@orcl file=d:\tijian.dmp full=y

oracle导入和导出和授权的更多相关文章

  1. ORACLE导入、导出命令使用方法

    oracle导入.导出命令使用方法: 给用户增加导入数据权限的操作 第一,启动sql*puls 第二,以system/manager登陆 第三,create user 用户名 IDENTIFIED B ...

  2. Oracle 导入、导出DMP(备份)文件

    首先说明dmp文件: Oracle备份文件是以dmp结尾,这种文件是oracle的逻辑备份文件,常用于数据库逻辑备份,数据库迁移等操作. 一.Oracle导入备份文件步骤:我用的是Oracle 11g ...

  3. ORACLE导入、导出所有数据到文件的SQL语句

    打开cmd窗口,执行如下SQL语句即可 --导出 exp 用户名/密码@localhost/orcl file=d:\111.dump log=d:111.log --或者 1.登录管理员system ...

  4. oracle导入imp导出exp命令的简单使用

    1.登录: 原始: 用户名:sys 密 码:安装oracle设置的口令 数据库:ip:port/数据库名(默认是orcl) 连接为:SYSDBA 用户: 用户名:safe_csmp 密 码:safe_ ...

  5. oracle导入及导出dmp文件

    导出数据库步骤: exp 用户名/密码@实例名 file=导出的dmp文件存放路径(绝对路径) log=导出日志存放路径(建议记录log文件,方便后续核实数据是否完整导出和导入) 导入数据库步骤: 1 ...

  6. Oracle导入和导出

    导出:EXP userid=<username>/<password>@<service_name> file=<dmpname> e.g.exp sa ...

  7. Oracle导入、导出数据库dmp文件

    版本 1.实例数据完全导出 即导出指定实例下的所有数据 exp username/password@192.168.234.73/orcl file=d:/daochu/test.dmp full=y ...

  8. Linux下oracle导入(exp)导出(imp)出现"Failed to open ...for reader/write"错误

  9. Oracle导入导出之dmp

    Oracle导入导出有两种方式,分别是imp/exp与impdp/expdp. 1.imp/exp exp scott/tiger file=d:\test.dmp log=d:\test.log o ...

随机推荐

  1. LeetCode:19. Remove Nth Node From End of List(Medium)

    1. 原题链接 https://leetcode.com/problems/remove-nth-node-from-end-of-list/description/ 2. 题目要求 给出一个链表,请 ...

  2. Andrid 打印调用堆栈

    public static void printCallStatck() { Throwable ex = new Throwable(); StackTraceElement[] stackElem ...

  3. Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. org/apache/hadoop/hbase/

    Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. org/apache/hadoop/hbase/ ...

  4. iOS中如何根据UIView获取所在的UIViewController

    原理 Responder Chain 事件的响应者链 大概的传递规则就是从视图顶层的UIView向下到UIViewController再到RootViewController再到Window最后到Ap ...

  5. 【Swift】日期比较函数 记录下 Comparing date in Swift

    Add this code to your project and comparing dates is easier than ever 扩展NSDATE //swift 3.0.2 extensi ...

  6. centos7使用Gogs搭建Git服务器

    一.初次接触Gogs,记录一下搭建过程 二.平台环境 Linux: CentOS7.5.1804 MySQL: 5.6.35 安装步骤: linux服务器新建git用户: 下载.解压gogs安装包: ...

  7. ASP.NET MVC5.0 OutputCache不起效果

    按照官网文档(https://docs.microsoft.com/en-us/aspnet/mvc/overview/older-versions-1/controllers-and-routing ...

  8. Leetcode 674.最长递增序列

    最长递增序列 给定一个未经排序的整数数组,找到最长且连续的的递增序列. 示例 1: 输入: [1,3,5,4,7] 输出: 3 解释: 最长连续递增序列是 [1,3,5], 长度为3. 尽管 [1,3 ...

  9. 将EXCEL表中的数据轻松导入Mysql数据表

    转载自:http://blog.163.com/dielianjun@126/blog/static/164250113201042310181431/ 在网络上有不较多的方法,在此介绍我已经验证的方 ...

  10. mac下管理论文的工具

    作者:丁香园站友@dlzhangyu链接:http://paper.dxy.cn/article/509726本网站所有注明“来源:丁香园”的文字.图片和音视频资料,版权均属于丁香园所有,非经授权,任 ...