1. Home
  2. Docs
  3. Documentation
  4. Getting Started

Getting Started

Prerequisites

A couple of things before we get started:

Want a quick database just for testing? Try SQL Server Express LocalDB

Installing

Download and run the VersionSQL installer. After installation has completed, open SQL Server Management Studio and connect to your database. Verify that “VersionSQL” now appears in the top menu bar.

If you’re connecting to anything more powerful than SQL Server Express, VersionSQL will automatically start a free trial.

Not seeing the menu? If SSMS was open during the installation, close all open SSMS windows and reopen it to load VersionSQL.

Choosing a Version Control System

If you already have a version control system in place, just skip right on to the next section.

If you’re new to the world of version control, welcome! Like any new field, at first there seems to be an overwhelming number of options. The simplest way to move forward is opening a GitHub account and creating a private repository there. Done that? The URL in your browser address bar is your “repository path”. Copy that to your clipboard; you’ll need it in a minute.

Want to skip the strange and new for now? Select Folder under Repository Type when configuring VersionSQL. All your SQL will be written to disk without having to mess with any of this version control stuff.

Connecting

In the Object Explorer pane, right-click on your database and select “Connect to Version Control” from the context menu. Paste in your repository path and click OK. VersionSQL will prompt you for your version control login credentials, either directly or through your web browser. Follow directions and in no time you’ll see a message confirming that VersionSQL is connected.

This assumes you plan on connecting to Git. To connect to a Subversion server, make sure that Subversion underneath Repository Type is checked. To use another version control system like TFS or Mercurial via the command line, or to dump SQL files straight to disk, pick the Folder option
Not working? Clear as mud? Send me an email and I’ll do my best to straighten it out for you

Committing

Now we get to the fun part. The first time you commit, VersionSQL will ask if you want to send everything to version control. Click Yes and you’ll be off to the races. Sit back and enjoy the sensation of progress! (Or Alt+Tab back to SSMS and let VersionSQL churn while you do something more important.)

Once it’s all processed, another window will pop up asking for your thoughts on the operation. Give it a piece of your mind and press OK to push all that out to the version control system. Done!

To do it again later, right-click on a database, folder, or object inside the Object Explorer pane. There will be a new option labeled Commit.

Integrating into your Workflow

Ah yes, this was for work.

Version control is like insurance: When you need it, the history is there — if you kept up with the premiums. The premium here is remembering to commit your code. Just ALTERed an SP? Give it a quick commit. The week flown by and you’re not sure what you changed? Run a full-DB commit for good measure. Then when disaster strikes and management needs to know when that critical stored proc stopped writing to the finance tables, you’ll be the hero with an audit trail that shows it all.

But what does it look like?

Grab your popcorn, it’s movie night!

Video

Short and action-packed.

Was this article helpful to you? Yes 3 No

How can we help?