1. Home
  2. Docs
  3. SQL Server
  4. Export Database to Source Control

Export Database to Source Control

1. Connect

Connect to the database you wish to export from


The example screenshot shows a connection to an SQL Server Express instance on the network.


Leave the Server field empty if the instance is on the same computer from where you are running gitSQL.

Are you connecting to a full instance of SQL Server?

Try leaving the instance field empty and enter ‘localhost’ or the Computer IP/Name you wish to connect to.

A test button is available at the bottom right of the screen. This needs to be pressed before we can continue to the next stage.


Any connection issues will be shown in the console to help diagnose problems.

2. Select

Select the database you wish to export.


You will now have options to select all objects and data, None, Schema Only or Data Only.

Alternatively you may select items individually through the treeview control.

3. gitSQL

Select the source control path you wish to export to.


Select Export.


Review the objects that you wish to export. Press back if you wish to make amendments – otherwise press Run.


You will now see a progress bar and completed items in the object list in the colour green once they have been completed.


gitSQL will create a DB folder, and then a folder inside that which is the database name.

All exported objects will be in their type folders respectively as .SQL files.


The DATA will be exported to the Tables\Data folder.

Thats it!

You are now free to use a source control client or command line to commit your files into source control.

How can we help?