Oracle: add existing db for version control

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

Maybe there is a better way to manage the schema and data? I use Oracle SQL Developer, and I saw migration / repository management functions there. Should I use them? And how to use them?

+5
source share
4 answers

I'm not sure if I'm really answering your question here or just spewing out random things :)

, , , - . SCM .

SQL Developer Version, , Jenkins CI, , , , .

, , .

<database>
    |_____<schema>
    |         |____<DDL>
    |         |____<DML>
    |         |____<PLSQL>
    |         |____<Indexes>
    |         |____<Constraints>
    |____<schema>
    ...

Oracle. PLSQL DDL , - , PLSQL -.

OBJECTNAME.TYPEEXTENSION, ( ) :

Table           .tbl
Package Spec    .pks
Package Body    .pkb
Trigger         .trg
View            .vw
...

, , .

  • , ?
  • ?
  • ?

, .

, .. CREATE REPLACE .

PLSQL- , , , , , , script.

, DROP/CREATE/INSERT. .

+3

: Red Gate

Source Control Oracle Subversion ( Windows): http://www.red-gate.com/source-control-for-oracle/

CREATE . , ALTER . / , ( ).

/ , .

+5

, , Subversion Oracle. : www.dbapply.com.

Windows, Linux. , :

dbapply --paths <local svn repository> <local SVN repository> ... --database <database connection string>

:

dbapply --paths /space/svn/oracle/scripts --database scott/tiger@localhost/orcl

DbApply , ( ) .

. , DbApply, .

, SVN . SQL * Plus , DbApply .

, , , SQL:

/* ignore_error(955) */ CREATE TABLE a (n NUMBER);

"" . - , , DbApply "ORA-00955" .

. , . .

!

+1

oracle-ddl2svn - DDL- SVN.

+1

All Articles