导出oracle数据库
我在 Windows Server 2003 上的 oracle 上有一个数据库。如何将其与所有数据一起导出并将其放入其他 Windows 服务器中?
I have a DB on oracle on Windows Server 2003. How do I export it with all the data and put it into other Windows server?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用 RMAN 进行完整备份。然后在新服务器上恢复。
请参阅使用 RMAN 克隆文章
Use RMAN to take a full backup. Then restore it on the new server.
See Clone using RMAN Article
您可以使用 Oracle Data Pump 用于导出和导入数据库。引用自文档:
过程如下:
expdp
实用程序导出现有数据库impdp
实用程序在新服务器上导入数据库检查此链接:Oracle 数据泵< /a>.在那里您将找到如何使用此实用程序的完整文档和示例。
You can use Oracle Data Pump to export and import database. Quote from documentation:
Procedure is like this:
expdp
utilityimpdp
utilityCheck this link: Oracle Data Pump. There you will find complete documentation and examples how to use this utility.
如果您想要在同一操作系统(尽管不一定是相同的操作系统版本)和相同的 Oracle 版本的新服务器上创建现有数据库的精确副本,最快且问题最少的方法是仅复制数据库文件。这通常称为数据库克隆,是 DBA 用于设置开发和测试数据库的常用方法,这些数据库旨在成为生产数据库的精确副本。
在新服务器上,您必须运行 oradim 实用程序。 (注意:oradim 是特定于 Windows 的 Oracle 实用程序,用于创建、维护和删除实例服务。)以下是示例命令:
使用 SQLPlus 启动数据库,然后您就可以开始工作了。< /p>
这是该过程的总体概述,但它应该可以帮助您快速轻松地完成工作。其他工具的问题是在通过任何方式加载数据之前需要在目标服务器上创建一个空数据库。如果目标服务器有不同版本的Oracle,则需要运行数据字典脚本来升级或降级数据库。 (注意:降级可能并不总是可能的。)如果新服务器具有不同的操作系统,则上述过程将需要额外的步骤,这将显着增加其复杂性。
还可以使用 RMAN 复制数据库。谷歌“使用 rman 克隆 Oracle 数据库”一词,可以找到一些关于如何使用该工具完成此操作的好网站。如果您尚未使用 RMAN,我上面描述的过程可能是正确的选择。
If you are wanting to create an exact copy of an existing database on a new sever of the same operating system (though not necessarily the same O/S version) and the same Oracle version, the quickest and least problematic method is to just copy the database files. This is often referred to as database cloning, and it is a common method DBAs use to setup development and test databases that are intended to be exact duplicates of production databases.
On the new sever, you must run the oradim utility. (Note: oradim is an Oracle utility that is specific to Windows and is used to create, maintain, and delete instance services.) Here is a sample command:
Startup the database with SQLPlus, and you should be in business.
This is a general overview of the process, but it should help you get the job done quickly and easily. The problem with other tools is the need to create an empty database on the target server before loading the data by whatever means. If the target server has a different version of Oracle, it will be necessary to run data dictionary scripts to upgrade or downgrade the database. (Note: A downgrade may not always be possible.) If the new server has a different O/S, then the above procedure would require additional steps that would significantly increase its complexity.
It also possible to duplicate a database using RMAN. Google the words "clone oracle database using rman" to get some good sites on how this is done using that tool. If you are not already using RMAN, the procedure I have described above would probably be the way to go.