1

Is there a Java program to dump a table as a set of insert statements. I want to save state of a database table.

All I have is JDBC URL to DB which is located on network. Don't have Oracle installed thus no utilities and no SSH access either.

Looking for something similar to mysqldump or CSVWRITE in H2.

Kshitiz Sharma
  • 15,851
  • 23
  • 83
  • 148

1 Answers1

0

To save a state of a table you have several options:

  • Make a copy of the table data in another table.

  • Export using the oracle EXP or EXPDMP utilities.

  • Export into insert statements using external tools such as Toad,
    SQLDeveloper (free from Oracle), PLSQL Developer. Or look for an online example and/or write your own.

It all depends on how you want to use the copy of your data and how much it is. For quick testing work a copy of the data in another table works best for me. With a simple sql script your table is back to it's original state.

Rene
  • 9,989
  • 5
  • 29
  • 44