oracle 将oracle数据库导出到sql文件?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6138815/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Export oracle database to sql file?
提问by Jin
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.
我有一个在 oracle 8i 中的数据库,我想将用户的整个数据库导出到一个 .sql 文件,然后将其导入另一个安装了 oracle 10g 的系统。
回答by DCookie
To export your database, you must use the 8i exp utility:
要导出数据库,您必须使用 8i exp 实用程序:
exp full=y compress=N userid=system/system_pw file=dumpfilename.dmp log=explog.txt
To import your database, you must use the 10g imp utility:
要导入数据库,您必须使用 10g imp 实用程序:
imp full=y file=dumpfilename.dmp userid=system/system_pw log=implog.txt
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.
10g imp 实用程序向后兼容以前的版本,因此您应该能够使用 8i exp 实用程序导出并使用 10g imp 导入。这两个实用程序都有一个“help=y”参数,它将显示您可以指定的参数列表。有不少;大多数情况下,默认值都很好。根据数据库的大小,这可能需要一段时间。
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.
由于某些对象的循环依赖关系,创建单个 SQL 文件并不像起初看起来那么容易。另外,创建或执行效率不高——exp/imp 更是如此。如果您的目标只是将数据库移动到新版本的 Oracle,那么 exp/imp 是最简单的方法。
Some documents to help you out: orafaq.com;Oracle 8i Utilities (oracle.com); Oracle 10g utilities (oracle.com).
一些可以帮助您的文档:orafaq.com;Oracle 8i 实用程序 (oracle.com);Oracle 10g 实用程序 (oracle.com)。