将oracle数据库导出到sql文件吗? [英] Export oracle database to sql file?

查看:196
本文介绍了将oracle数据库导出到sql文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个位于oracle 8i中的数据库,我想将用户的整个数据库导出到.sql文件,并将其导入到安装了oracle 10g的另一个系统中.

I have a database that is in oracle 8i and i want to export the entire database of a user to a .sql file and the import it to another system that has oracle 10g installed on it.

推荐答案

要导出数据库,必须使用8i exp实用程序:

To export your database, you must use the 8i exp utility:

exp full=y compress=N userid=system/system_pw file=dumpfilename.dmp log=explog.txt

要导入数据库,必须使用10g imp实用程序:

To import your database, you must use the 10g imp utility:

imp full=y file=dumpfilename.dmp userid=system/system_pw log=implog.txt

10g imp实用程序与以前的版本向后兼容,因此您应该能够使用8i exp实用程序进行导出,并使用10g imp进行导入.这两个实用程序都有一个"help = y"参数,它将显示您可以指定的参数列表.有很多;在大多数情况下,默认值是可以的.根据数据库的大小,这可能需要一段时间.

The 10g imp utility is backward compatible with previous releases, so you should be able to export using the 8i exp utility and import with the 10g imp. Both utilities have a "help=y" parameter that will display a list of parameters you can specify. There are quite a few; for the most part the defaults are fine. Depending on the size of your database, this could take a while.

由于某些对象的循环依赖性,创建一个SQL文件并不像乍看起来那样容易.另外,创建或执行效率不高-exp/imp更是如此.如果您的目标只是将数据库移至新版本的Oracle,则exp/imp是最简单的方法.

Creating a single SQL file is not as easy as it may seem at first, due to circular dependencies of certain objects. Plus, it's not as efficient to create or execute - exp/imp is far more so. If your goal is simply to move the database to a new version of Oracle, exp/imp is the simplest way to go.

一些帮助您的文档: orafaq.com; Oracle 10g实用程序(oracle.com).

Some documents to help you out: orafaq.com; Oracle 8i Utilities (oracle.com); Oracle 10g utilities (oracle.com).

这篇关于将oracle数据库导出到sql文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆