zoukankan      html  css  js  c++  java
  • 针对Oracle的一系列操作

    一、有关于数据库导出dmp的语句。

    1 将数据库TEST完全导出,用户名system 密码manager 导出到D:daochu.dmp中
    exp system/manager@TEST file=d:daochu.dmp full=y

    例子:exp 用户名/密码@192.168.1.1 /ORCL file=d:daochu.dmp owner=用户名
    2 将数据库中system用户与sys用户的表导出
    exp system/manager@TEST file=d:daochu.dmp owner=(system,sys)
    3 将数据库中的表table1 、table2导出
    exp system/manager@TEST file=d:daochu.dmp tables=(table1,table2)
    4 将数据库中的表table1中的字段filed1以"00"打头的数据导出
    exp system/manager@TEST file=d:daochu.dmp tables=(table1) query=" where filed1 like '00%'"

    二、有关于数据库导入dmp的语句。

    这里以Linux下导入oralce dmp举例:

    $ su root 切换用户
    $ chmod 777 /home/oracle/database.dmp

    再切换oracle 用户执行
    $ cd /root
    $ su oracle
    imp 用户名/密码@orcl  file=/home/oracle/database.dmp ignore=y full=y;
    打印 successfully表示导入成功

    三、有关于数据库.sql脚本导出的语句。

    四、有关于数据库.sql脚本导入的语句(还没有实验)。

    比如说我在oracle家目录下有a.sql文件

    命令行sqlplus / as sysdba,进入后

    SQL>@/home/oracle/a.sql;

  • 相关阅读:
    探索需求14
    周总结5
    周总结4
    探索需求13
    Java——迭代器
    Java——Collection集合
    Java——包装类
    Java——Arrays
    Java——BigInteger、BigDecimal
    Java——System
  • 原文地址:https://www.cnblogs.com/xusp/p/11750477.html
Copyright © 2011-2022 走看看