惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Simon Willison's Weblog
Simon Willison's Weblog
G
Google Developers Blog
Spread Privacy
Spread Privacy
I
InfoQ
V
V2EX
S
Schneier on Security
小众软件
小众软件
C
CERT Recently Published Vulnerability Notes
博客园 - 聂微东
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Stack Overflow Blog
Stack Overflow Blog
T
Threat Research - Cisco Blogs
L
Lohrmann on Cybersecurity
Recent Announcements
Recent Announcements
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Attack and Defense Labs
Attack and Defense Labs
云风的 BLOG
云风的 BLOG
The Hacker News
The Hacker News
S
SegmentFault 最新的问题
C
Cybersecurity and Infrastructure Security Agency CISA
NISL@THU
NISL@THU
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
GbyAI
GbyAI
Latest news
Latest news
S
Secure Thoughts
Project Zero
Project Zero
MongoDB | Blog
MongoDB | Blog
I
Intezer
Security Latest
Security Latest
Apple Machine Learning Research
Apple Machine Learning Research
Vercel News
Vercel News
N
Netflix TechBlog - Medium
V2EX - 技术
V2EX - 技术
量子位
T
Threatpost
T
The Blog of Author Tim Ferriss
Y
Y Combinator Blog
T
Tor Project blog
A
Arctic Wolf
Microsoft Security Blog
Microsoft Security Blog
T
The Exploit Database - CXSecurity.com
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
C
Check Point Blog
博客园 - Franky
Google DeepMind News
Google DeepMind News
The Register - Security
The Register - Security
The GitHub Blog
The GitHub Blog
L
LINUX DO - 热门话题

博客园 - lining

输出的客户端 - lining - 博客园 List<T> - lining - 博客园 DateTime 赋空值 配色达人速成 批处理文件,删除文件及文件夹 - lining - 博客园 Source Code中pfx的密码 查找所有有某一列的表 如何修改 app.config 的配置信息 用例的获得 如何oracle调试存储过程 C# 中String 和 string 有什么区别 ora-00997:非法使用LONG数据类型 oracle如何判断一个字符串是否为数字或日期 C# 中的计时器 populate a listbox on winform with values from database winform技巧,listbox绑定,value,text, - lining - 博客园 查看oracle执行计划 “Windows Workflow Foundation开发实战系列课程”中的数据库恢复 ASP.NET多语言版的开发
oracle数据导入导出imp/exp命令
lining · 2010-04-06 · via 博客园 - lining

oracle数据导入导出imp/exp就相当于oracle数据还原与备份。exp命令可以把数据从远程数据库服务器导出到本地的dmp文件,

imp命令可以把dmp文件从本地导入到远处的数据库服务器中。 利用这个功能可以构建两个相同的数据库,一个用来测试,一个用来正式使用。

执行环境:可以在sqlplus.exe或者dos(命令行)中执行,
dos中可以执行时由于 在oracle 8i 中  安装目录\ora81\bin被设置为全局路径,
该目录下有exp.exe与imp.exe文件被用来执行导入导出。
oracle用java编写,sqlplus.exe、exp.exe、imp.exe这两个文件有可能是被包装后的类文件。
sqlplus.exe 调用exp.exe、imp.exe所包裹的类,完成导入导出功能。

>>>>>>>>>>>>>>>>>>>>>>>>>>>>

数据导出:
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 来实现。

>>>>>>>>>>>>>>>>>>>>>>>>>>>
数据的导入
1 将d:\daochu.dmp 中的数据导入 test数据库中。
   imp system/manager test  file=d:\daochu.dmp
   上面可能有点问题,因为有的表已经存在,然后它就报错,对该表就不进行导入。在后面加上 ignore=y 就可以了。

    imp aichannel/aichannel hust full=y  file=file= d:\data\newsmgnt.dmp ignore=y


2 将 d:\daochu.dmp中的表table1 导入
imp system/manager test  file=d:\daochu.dmp  tables=(table1)

(完)