Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle: put existing db to version control

I have existing oracle database. I want to put it under source control (Subversion). The only solution I know - create 'DROP/CREATE/INSERT' text scripts and store them to SVN.

May be there is better way to manage schema and data? I'm using Oracle SQL Developer and I have seen there Migration/Repository management features. Should I use them? And how to use them?

like image 593
Igor Konoplyanko Avatar asked Aug 14 '12 13:08

Igor Konoplyanko


1 Answers

Disclaimer: I work for Red Gate

Source Control for Oracle can link your existing schemas to Subversion (Windows only): http://www.red-gate.com/source-control-for-oracle/

This allows you to check in a baseline of CREATE files, and any changes to those moving forwards. It also allows you to apply changes from source control to your schemas, handling the changes as ALTER statements and thus preserving data when modifying tables. This also allows you to spin up private/dedicated schemas per developer creating a sand-boxed environment (if you are working in a team).

We currently don't support adding your static/reference data to source control, but we plan to.

like image 200
michristofides Avatar answered Oct 06 '22 14:10

michristofides