本文主要是介绍oracle 11g导入\导出(expdp impdp)之导入过程,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
《oracle11g导入导出(expdpimpdp)之导入过程》导出需使用SEC.DMP格式,无分号;建立expdir目录(E:/exp)并确保存在;导入在cmd下执行,需sys用户权限;若需修...
上一个环节,我们讲了导出(expdp )操作,这个环节则讲导出操作
准备文件
注意:扩展名SEC.DMP
,不可为SEC.DMP;
,必须把;
去掉。
可变量 | 详细 | ||
---|---|---|---|
expdir | directory对象名 | ||
E:/exp | expdir对象导入文件储存位置 | ||
sec.dmp | 导入的文件名 | ||
system | 系统用户 |
导入(impdp)
1、建立directory
首先建立 directory – expdir (导入导出都要建立,expdir为directory 对象名,对应的 E:/exp 文件夹如果不存在,需要手工建立) 注意:该步骤在sys用户下完成
SQL> create or replace directory expdir as 'E:/exp'; 目录已创建。 SQL> grant read,write on directory expdir to system; 授权成功。 SQL> select * from dba_directories;
2、导入语句
注意:该步骤在cmd下完成
C:\Users\TTOM>impdp system/1234 directory=expdir dumpfile=SEC.dmp Import: Release 11.2.0.1.0 - Productionphp on 星期三 7月 17 21:55:47 2019 Copyright (c) 1982, 2009, oracle and/or its affiliates. All rights reserved. 连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options 已成功加载/卸载了主表 "SYSTEM"."SYjsS_IMPORT_FULL_01" ...... . . 导入了 "TEST"."T1" 5.015 KB 1 行 . . 导入了 "TEST"."T2" 5.015 KB 1 行 . . 导入了 "TEST"."T3" 5.015 KB 1 行 作业 "SYSTEM"."SYS_IMPORT_FULL_01" php已于 21:55:49 成功完成 XzLmaJI
3、更改密码
如果不知道TEST用户的密码,则我们需要更改该用户的密码,需要登录超级用户(sysdba)
注意:该步骤在sys用户下完成
C:\Users\TTOM>sqlplus sys/1234 as sysdba; 连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> alter user test ideandroidntified by 1234; 用户已更改。
总结
这篇关于oracle 11g导入\导出(expdp impdp)之导入过程的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!