Oracle DDL / DML script, PL / SQL in source management

I am looking for recommendations / recommendations on how best to store DDL / DML and PL / SQL script in Source Control (we use Microsoft Visual Studio TFS) for my own developed SaaS application.

We have a team of 7 developers working on a project that is based on a fairly direct model of the Dev / Main branch. There are dependencies (mostly execution order) between scripts.

What worked well under similar circumstances for you?

+3
source share
6 answers

See my answer to How should you create your database from a source control? . It is mainly based on the excellent K. Scott Allen on the subject.

0
source

We created a tool that can manipulate PL / SQL code (or any other object that can be created using the CREATE OR REPLACE command) in an Oracle database. It hooks Git into an Oracle database.

You can perform basic Git tasks such as committing, flushing, branching, cloning, merging, pulling, etc ... and Gitora automatically updates the PL / SQL code in the database.

It does not process tables, so this is still a manual task.

Gitora . '14. , www.gitora.com

+1

DDL , DML - : http://dbdeploy.com/, Perl, .

0

:

\DatabasePatches
  \Core
  \Data
\DatabaseSource
  \Core
    \SchemaA
    \SchemaB
    \SchemaC

DDL DML/ . ( 10 , ), "DATAPATCH01530 - xyz.sql".

, . DML , .

, FINAL ( PVCS FINAL), , . .

, , .. DatabaseSource. , , (, SELECT '1' FROM dual, ), .. , .

0

LiquiBase (http://en.wikipedia.org/wiki/LiquiBase) LiquiBase - , . (XML )

, -. , - . , .

DML, PLSQL GIT.

0

DDL? . , . , DDL ( ), - , . diff , .

I checked in DDL on many projects and found that by creating changes on top of checking the source code instead of what is in prod. we have lost the change.

DB is different from the source code. You have people with the ability to connect to the database and make changes through sql-plus or toad to fix the emergency problem, and you will not get changes in source code management. Database administrators can make changes ....

In my opinion, this sounds good, but in practice it does not work.

0
source

Source: https://habr.com/ru/post/1714910/


All Articles