Export oracle database to sql file?

允我心安 提交于 2019-12-04 20:28:08

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).

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