Toad World Blog

SQL Navigator Team Coding with Git

Jun 8, 2016 10:19:29 AM by Brad Wulf

Quick overview of how to install GitHub and then interact with it directly through the SQL Navigator tool via the Team Coding feature.

0

So let’s get started!  Following is a list of all of the tools that you may need to Download and Install to complete configuration of SQL Navigator Team Coding with Version Control provided by Git/GitHub

  • Install GitHub Desktop (Its Git but for the server).  You might have to create an account, go for it, it’s ok, try something new!
  • Download and install GitHub command line client (be sure to select the ‘Windows command line’ option)
  • Install SQL Navigator

With those apps downloaded and ready to install, here’s a summary of what we’re going to do:

  1. Install and configure GitHub command line
  2. Install and configure GitHub Desktop
  3. Install SQL Navigator
  4. Configure SQL Navigator Team Coding to connect to GitHub Repository
  5. Configure SQL Navigator Team Coding to ignore certain objects by type and name
  6. Check out a schema object, alter it, check that change back into version control and observe updates

…and here are the detailed steps…


Install GitHub Command Line and be sure to choose the following two non default options when given the chance (all other pages choose the defaults):

1

2

Launch GitHub Desktop and create a repository, I’ll call mine ‘SQLNavRepo’ (the local path is up to you, I just used the default because I don’t like to make things more complicated than they need to be)

3

With repository ‘SQLNavRepo’ selected in the left-hand side, create a new Branch (this is your own private sandbox version of the repository where you can make mistakes and experiment before committing changes from your branch into the main branch)

4

In SQL Navigator – Connect to the repo you just created

5

In SQL Navigator, select Team Coding | Administer | Team Projects | Right Click | Create a new Team Project…

6

Name the project then click the ellipsis (…) then ‘New…’

7

Name the project then OK

8

Select the newly created project and then click OK 

9

Now specify the objects to be controlled.  Here we can either choose by object type (Tables, Views, Procs) or by wildcard text name filter which objects to place under control of the new project.

Click the ‘New’ icon…

10

Choose the schema you want to manage and click OK

11

By default all schema objects regardless of name are to be added to the Team Project.  You can uncheck schema objects or click the ellipse (…) to filter by regex terms.

12

All Done, click OK to continue:

13

Depending on the number of DB Objects you’ve chosen to manage via Team Coding, you may need to wait a tic or two for the creation of the project to complete, but when you’re done just click OK to dismiss the previous dialog, then from the SQL Nav menu, select Team Coding | Team Coding Manager to confirm that the expected objects were added to your new team project (The big green checkmark tells me everything worked):

14

Now, we can finally start using Team Coding.  If you are developer, the first thing you’ll want to do is check out some procedural code and start working.  So it’s simple, just Right click controlled objects to Check-out (or later Check-in, Get latest version, Compare contents, etc.)

15

Now I’m asked to log into my Git account – do that and click OK

16

Now add a comment (optional), confirm objects to be checked out, and then click OK…

17

Visual cue in SQL Navigator that the procedure is now checked out:

18

Launch Github, I can see the same information…stored proc HR.ADD_JOB_HISTORY is checked out:

19

Now open the stored proc in SQL Nav editor and make some changes, then save

20

Satisfied with the changes (maybe do some unit testing, code quality checks), return to the Team Coding Manager, right click and select Compare contents.

21

Confirm that your local file is different than the Version controlled one…

22

And if you’re like me, sometimes I’d like to double check by making sure that GitHub sees the same change…it does…

23

Finally, back to the SQL Navigator Team Coding manager to check the new change in.  Just right click on the stored proc and choose ‘Check in’

24

Add your comment and click OK

25

And that’s all there is to it.  To learn more check out the SQL Navigator user community.

 

Tags: Oracle SQL Navigator

Brad Wulf

Written by Brad Wulf

Brad Wulf has held in numerous roles over the past 15 years within the Database world including Technical Support, Build Management, Development and Presales.