Export oracle database to sql file?

我们两清 提交于 2019-12-06 13:27:38

问题


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.


回答1:


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

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

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.

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.

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



来源:https://stackoverflow.com/questions/6138815/export-oracle-database-to-sql-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!