2

I'm familiar with Git, I use it every day for web projects. But I'm trying to use it with an Oracle DB, mainly to track different procedures and packages.

This Oracle DB lives on a different server, not my local machine, and I am not the DBA.

Is it still possible for me to configure a solution to track this information, and if so, how? I wouldn't have the first clue as to what folder I would initialize as the repo.

1

Really what you're asking for is how can I deploy code/schema/data to a Oracle DB in a remote server, from a Git repo. This can also be known as orchestration if done as part of a bigger process, or automated code deployment which leads to Continuous Integration/Deployment.

There are there are tons of solutions from your own homebrew options such as scripting it out. The more commonly used tools for this are Jenkins, and you use .Net, Octopus is great. Easiest solution is to write a Python/Powershell/whatever script to pull down the latest build, validate it, and execute it as statements then evaluate the return.

These tools work similarly together. They often provide a web UI for you to communicate with multiple machines across domains and trusts with agents and users executing remotely or directly on the machine as the user.

For example, Octopus which works for .Net, deploys an agent known as a tentacle on the machine that all actions are executed under and under it's user on the remote machines (Oracle DB Server). You can then have actions such as 'git pull' directly to your prod ops folder, then the next step verifies it and passes in variables directly from Octopus and continues executing statements.

Moving fwd, you could use these as a central part of moving to the SDLC best practices involving C.I. Jenkins could be used in similar methods for other software. It is used extensively in management software such as Cloudera Manager to manage big Hadoop clusters.

| improve this answer | |
  • Really, I just want to track changes to our packages + procedures over time. Someone suggested, I just make a new folder and copy the PL/SQL files to text and then track them like that? – Jonnny Nov 17 '16 at 18:34
  • Correct, you want to track changes in your version control system which in this case is Git, then you want to deploy a build (usually the latest) to the database(s). Thus as long as you write your deployment scripts in git where they are backwards compatible (such as alter proc instead of create proc without dropping) you can do this. The solution you presented is option 1. Make sure to review the output manually or have your script evaluate the returns for self healing. – Ali Razeghi Nov 17 '16 at 18:39
1

We built a solution that integrates Git with the Oracle Database (using DDL triggers) that can track every change to the Oracle Database and update a Git repository.

It is a server side solution, so you will need the co-operation of your DBA. Version control is a pain for many DBA's so I guess they'd be interested to work with you.

Full disclosure, we built the product and sell it.

You can find more information on the Gitora web site: http://www.gitora.com

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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