Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm very new to Oracle. It looks like all the Oracle DBA use binary only dumps. This sometimes cause problems, and seems rather useless to me (performance gain is bound to be negligible), but what do I know.

  1. Is there a good reason that escapes me?

  2. Is there a tool like pg_dump for Postgres that can generate SQL statements from a database?

One of the application could be moving from one version to another, or converting the data to another DB.

share|improve this question

2 Answers 2

I am not aware of any tool provided by Oracle that does what you ask. While I have in the past used DbVisualizer to export smaller tables/schemas from oracle (DDL and and insert statements) it isn't quite the same as pg_dump.

However, if you are planing on "converting the data to another DB" where the other DB is postgres then take a look at ora2pg.

share|improve this answer

You can use datapump for this. Use expdp with option content=metadat_only, this creates a export with no data. You can use an export file containing data if available, but if you need to create one just for this writing the data is needless. Use impdp with option sqlfile=file_name.sql. This writes all DDL to file_name.sql.

See this link for details

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.