zoukankan      html  css  js  c++  java
  • dmp文件导入的方法

    1,使用oracle的imp命令导入*.dmp文件
    
    首先要明确知道,使用oracle的imp命令进行导入,要在一个空的数据库下,才是最好的,否则,数据表存在的话,就要先删除数据表中的数据
    步骤1:禁用约束 alter table table disable constraint FK_ForeignKey ;
    使用sqlplus命令登录到oracle数据库,举例如下:
    比如你要用scott这个用户进行导入数据,首先要保证这个用户有dba权限,因此要用oracle的system用户登录数据库,对scott用户授权
    sqlplus system/123456
    grant dba to scott
    退出sqlplus 注:exit命令

    sqlplus scott/tiger
    删除表数据 truncate table table_name
    退出sqlplus

    使用这个导入命令将备份导入
    imp scott/tiger@testdb full=y file=d:scott.dmp ignore=y log=d:log.txt
    testdb :数据库名字 log=d:log.txt为报错的时候日志记录 scott/tiger:登录用户名和密码
    导出成功后,再次登录oracle
    sqlplus scott/tiger
    执行启用约束
    alter table table enable constraint FK_ForeignKey ;
  • 相关阅读:
    Mahout推荐算法ItemBased
    ALSA安装编程指南
    windbg更改cmd的token提升其特权
    至尊问题
    什么是“Bash”破绽?
    hdu 1548 A strange lift
    C 循环链表
    C++ 链表
    C_数据结构_链表的链式实现
    C _数据结构 _线性表的顺序存储
  • 原文地址:https://www.cnblogs.com/yanhan/p/3317354.html
Copyright © 2011-2022 走看看