欢迎来到站长天空!

其它数据库

当前位置: 主页 > 数据库 > 其它数据库

CMD操作oracle数据导库过程图解

时间:2025-12-23 10:00:05|栏目:其它数据库|点击:

1.cmd窗口下,登陆管理员用户:sqlplus sys/1 as sysdba

CMD操作oracle数据导库过程图解

2.创建新用户并为用户授权:

  (1)创建用户

---Create the user
create user Helq3_Pro
identified by "1"
default tablespace MOF
temporary tablespace TEMP
profile DEFAULT;

  (2)为用户授权

SQL> grant dba to helq3_cpbgt_20200714 with admin option;
SQL> grant unlimited tablespace to helq3_cpbgt_20200714 with admin option;
SQL> grant imp_full_database to helq3_cpbgt_20200714;

CMD操作oracle数据导库过程图解

3.数据导入

  (1)imp导入:

imp userid=helq3_cpbgt_20200714/1@orcl file=E:\cpcz.dmp full=yignore=y 

CMD操作oracle数据导库过程图解

  (2)数据泵导入impdp

    首先,创建,并为用户授权此文件夹

CMD操作oracle数据导库过程图解

    数据泵导入:

impdp helq3_cpbgt_20200714/1 dumpfile=cpcz.dmp directory=expdp_dir remap_schema=helq3_cpbgt_20200714(导出时的用户名):helq3_cpbgt_20200714

CMD操作oracle数据导库过程图解

4.数据导出

  (1)exp导出:

exp helq3_cpbgt_20200714/1@orcl file=E:\cpcz.dmp log=cpcz.log

CMD操作oracle数据导库过程图解

    导出带空表的数据库->先做查询,再正常导出:

select 'alter table '||table_name||' allocate extent;' from user_tables where num_rows=0;

  (2)expdp 数据泵导出:

expdp helq3_cpbgt_20200714/1@orclschemas=helq3_cpbgt_20200714 dumpfile=cpcz.dmp directory=expdp_dir logfile=cpcz.log

CMD操作oracle数据导库过程图解

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。

上一篇:Navicat for oracle创建数据库的方法

栏    目:其它数据库

下一篇:Oracle通过LogMiner实现数据同步迁移

本文标题:CMD操作oracle数据导库过程图解

本文地址:https://zz.feitang.co/shujuku/32886.html

广告投放 | 联系我们 | 版权申明

申明:本站所有的文章、图片、评论等,均由网友发表或上传并维护或收集自网络,属个人行为,与本站立场无关。

如果侵犯了您的权利,请与我们联系,我们将在24小时内进行处理、任何非本站因素导致的法律后果,本站均不负任何责任。

联系QQ:257218569 | 邮箱:257218569@qq.com

Copyright © 2018-2025 站长天空 版权所有 Powered by EyouCms冀ICP备14023439号