Controlling changes to database - Team Coding

Controlling changes to database - Team Coding

Hi Norm,

I guess I have to pay better attention to how I reply as my question did not go to the list; must have gone out to you only. I may repost it so it goes out.

The information you provided is very helpful and what I was looking for. I do have a couple of questions. When you indicate you are working on the files in your local repository, we do this too with our C sharp repository, but the local files (solution) is opened in Visual Studio this way by default. This makes it easy to open the solution, edit the files, then check in. With TOAD it is not so cut and dry. Most of our developers are accustomed to opening the schema browser then double clicking on an object to open it in the editor. Now we need to do a check out, but this may not be keeping our svn repository up to date.

How do you open the local files in TOAD typically if you need to update some object? I realize, I can open a file in TOAD, but I use the schema browser to locate what I am looking for, say a package and then can see the script. It would seem then, we need to open that file from the local repository to edit this. Also, does this keep the Team Coding piece in synch with the repository?

Sorry for so many newbie questions, but really need to fix our sloppy control process.

Best Regards

Timothy Bryan
We are what we repeatedly do. Excellence, therefore, is not an act but a habit.
Aristotle

Timothy,

I’d like to chime in here if I may. ‘Not cut and dry …’ is
apt . First Please see my comments below to your original post .

Some General Stuff :

Toad makes a distinction between Team Coding and File Based Source Control. See
the help under Use Source Control – About Source Control, which gives a
very useful breakdown of the options and advantages / disadvantages of each
system. It also helps to outline how each works .

File based source control does not require any server side objects, and simply
interfaces with the VCS Provider to manages source files.

Team Coding manages objects centrally in Toad and requires that you install the
Team Coding Server Side Objects for each database that you wish to control. In
addition Team Coding performs a ‘lock’ on controlled objects in the
database. In reality it is keeping a local copy of the source for each object
and using SVN (in your case) to manage version history and locking source
locking centrally. There is also Server Side Table, usually in the Toad Schema
,which manages the locking of objects. The source is controlled in the SVN
repository, and each user checks out a local copy of the source when he checks
out the object (e.g in the Schema Browser). When the user has an object
‘checked out’ Toad automatically opens the local copy of the object
for editing.

In your case I would also read up on the help for Mirroring in Team Coding. This
enables each user to create Sandbox in his own schema without effecting the
production object. Toad manages locking etc. I’m not sure if this is
appropriate for you dev environment or not.

I hope this helps

Stephen

Very helpful Stephen,

We use subversion for other things and very familiar with how it works, but not
integrated with TOAD. It was my understanding initially that TOAD would lock the
objects in the database and prevent changes unless checked out. Then over the
past couple of days, actions we have been able to do made me wonder about the
entire process.

Our situation: We have two Dev databases, a QA database, and a production
database. I only installed Team Coding with subversion integration on one of the
Dev Databases. It was my intention to maintain control over the dev database for
changes and then would be able to create a more accurate change script in some
manner that would be deployed to QA. Typically we refresh the QA database from
production prior to a major deployment so it is our intention the scripts run in
QA would also be run in production once testing is complete. The problem for us
has been the multiple developers making changes in the dev database without
proper tracking. It then takes some additional update scripts to QA after
deployment in order to fix the things we missed. Once done, we deploy all those
to production and occasionally something still is missed.

I now have the Team Coding installed and configured with Code Collection Groups
and everything is in the svn repository with my local repository on my machine.
I need to duplicate this setup to the others. What I am trying to make sure of
is the process and training to verify no developer can or does change the
database without the Team Coding / subversion managing the change. I was able to
run a few scripts to change some types etc. and re-compile the database. These
objects are not changed in subversion. For instance this script was run:

alter type SS_ROUTEORDER add attribute assetnum number cascade;

commit;

I checked the type in my local repository and this type does not include the new
attribute.

What I need is a process to train the developers that provides a path to change
without this occurring.

Thanks for your input and to Norm. I am making progress in understanding.

Best Regards

Timothy Bryan

We are what we repeatedly do. Excellence, therefore, is not an act but a habit.

Aristotle

If my svn repository is no longer in synch with the database objects, what is
the best way to correct this? I have Code Collection Groups setup in TC.

Best Regards

Timothy Bryan

We are what we repeatedly do. Excellence, therefore, is not an act but a habit.

Aristotle

In the Code Collections dialog there are two options that can help with this…

If the database revision is correct – you can use ‘Create new
revision’ which creates a new revision in SVN of all database objects

‘Compile latest revision’ compiles all objects from the source in
SVN.

Stephen

Thanks Stephen,

I used Create New Revision initially to create the objects in the svn
repository. I presume then using this again would update them to the latest? The
other option would do the opposite of what I would want as it would back rev the
objects in the database based on the title.

Best Regards

Timothy Bryan

We are what we repeatedly do. Excellence, therefore, is not an act but a habit.

Aristotle