Every software product has a feature or widget that is extremely powerful, but finds a way to confuse more people than it enlightens. That is not to say that the feature is poorly designed or implemented, but who can really say they understand and use 100% of an item’s potential?
A few of my personal examples would be Office macros, regular expressions in vi, or collections in Oracle’s PL/SQL language. For Toad®, it seems that the one universal feature that eludes most users is the Team Coding feature. To be honest, it’s not that I am not smart enough to force my fingers to figure out how to use Regex in vi, it’s that I’m too lazy to take the time to figure it out. I can get away with not knowing that. However, if I DID understand it, how much more productive could I be? Let’s take a quick look at Team Coding together, and maybe I can convince you it’s worth a 2nd or 3rd look. John POcknell has already dedicated a blog to Team Coding, but I wanted to take a step back and look at it from a slightly different perspective.
Just What Exactly IS Team Coding?
Team Coding is a technology that was originally developed for SQL Navigator. It allows a developer to work on his or her stored procedure without worrying about a co-worker coming in and clobbering their work. This is such a common occurrence that the feature was frequently requested by our Nav friends when they started using Toad.
Most developers work in an environment where the programs they write are stored in a Source Control system. If a developer wants to work on program X, they login to the repository and ‘CHECK OUT’ program X. At this point, no one else can make changes to program X until the person who has it checked out is finished and checks it back in. This type of control is achieved by file locking.
The challenge for PL/SQL developers lies in the fact that the code for Oracle is evaluated at run-time and is stored in the database – not in a file. Team Coding was developed to achieve two things:
1. Allow Developers to control their PL/SQL objects in the database
2. Allow Developers to associate their controlled PL/SQL programs to their complimentary OS files in their Source Control system.
Controlling PL/SQL objects in the database
Team Coding can operate without a 3rd party Source Control system. In its simplest form, Team Coding consists of a series of database objects which tell Toad which PL/SQL programs are available. When a Toad user opens a Function into the Editor, Toad will tell them if it is controlled and if it is available. If the object is controlled by Team Coding, and if it is available, the user can then check it out. Once checked out, Toad will allow the user to compile their changes to the database. If the object is already checked out, Toad will tell you so and prevent you from making changes to the object.

Notice the compile button is disabled and the status of the object is listed below.
Team Coding is much easier to use if you have enabled the Toolbar. Right-Mouse-Click in the main toolbar/menu area of Toad and toggle it on. Once opened, you will be able to tell if your session is being affected by Team Coding.

The ‘checkmark’ button on the toolbar will show you the status for your session. You can see for my connection that Team Coding is available AND enabled. I also have the ability to create code control groups AND access the object control.
Team Coding requires a series of Server Side Objects in the database that you are connected to. These can be created using Toad’s Server Side Object Wizard, which is located on the Database > Administer menu flyout.
Once these items are created, you will see the ‘Team Coding Support Installed’ item marked with a green arrow on the Team Coding Status window.
Before we can start using Team Coding, we need to create something called a ‘Code Control Group’ or CCG. You can think of a CCG as a category or a logical grouping of database objects. Defining one allows the Toad user to create define multiple groups of objects in the database that can be controlled in different ways. This is extremely important if you are using a 3rd party file-based Source Control system. Having multiple CCGs allows you to assign multiple projects or workspaces (or different directories on your PC) that contain the files associated with your database objects.

Code Control Group (CCG) Diagram. Thanks for the awesome help topic Gretchen!
Creating a CCG is basically a 2-3 step process:
1. Create/Name the CCG
2. Define the mask properties
a. Object Type
b. Schema
c. Define an optional filter based on object name
3. If you are using a file-based system, you can now export the
objects in the CCG as files to the defined workspace.

You can see all of the objects being controlled by using the Team Coding Viewer.

Team Coding records the user who last touched the object and allows the developer to add comments that describe the changes made.
A Quick Example
I have a stored procedure compiled with errors in our development environment. My Development Manager has assigned me the work order specifying what needs to be done.
-
Step1: Make sure the object is available. I can see this with the Team Coding Viewer. If ‘Available’ I can check it out and proceed with fixing the errors.
-
Step2: Load the object into the Editor.
-
Step3: Check Out the Object.

When you load the object to the editor, if the object is under control and available, then the Team Coding toolbar will activate the Check Out button.
While performing the Check Out operation, Toad will prompt me for a comment. Try to use good comments as this will help you later when you try to track down why a change was implemented for a particular revision. It will also prevent ‘Why do you have XYZ checked out?” emails from your co-workers J
-
Step4: Fix the code.
-
Step5: Compile. This will overwrite the source of the object in the database.
-
Step6: Check In. Once you have made a change to the database source, the Check In button will activate. Again, you will be prompted for a comment.
I tried to describe this process in as few words as possible, but I’ve already exceed 1,000 words! The steps involved for setting up Team Coding to work with a 3rd party source control provider are a bit more involved. I’d like to propose the following: If you enjoyed this blog and are interested in implementing this in your environment with the file support enabled, then leave a comment on the blog. I’ll then follow-up this topic with a PTII that talks about the file support.
If you can’t wait that long, then I highly recommend reading the Help Topic. It’s quite substantial and it’s what I read when I have questions and don’t want to bother the poor developer.