SQL Gemini

Installing and setting up

(warning) Be careful

SQL Gemini isn't in beta yet, or even alpha– it's just a prototype.

  • SQL Gemini doesn't warn you when it applies changes that might result in data loss. 
  • It might have other unexpected effects on the databases you use it with.
  • There's no user interface.

Don't use SQL Gemini for serious database development! (warning)

Installing

  1. Close Management Studio.
  2. Download the SQL Gemini installer and run it.
  3. Create a folder on your computer. This is the folder SQL Gemini will use to read and write SQL scripts.

  4. Add the folder to your version control repository using your version control client.
  5. Go to %programdata%\Red Gate\SQL Gemini and open DDLTrigger.sql in Management Studio.

    By the way...

    When you open Management Studio, SQL Gemini opens a console window:

    You can ignore it for now.

  6. In Management Studio, run DDLTrigger.sql on the server you want to use with SQL Gemini.
  7. Go to %appdata%\Red Gate\SQL Gemini and open config_V0.json in a text editor. This file contains:

    config_V0.json

    {
    	"MyServerName\\SQLInstanceName\\DatabaseName": "C:\\Full\\Path\\To\\ScriptsFolder", 
    }
  8. Replace MyServerName, SQLInstanceName, and DatabaseName with the names of the SQL server, SQL instance (optional), and database you want to use with SQL Gemini.
    You only need to specify a SQL instance if it's a named instance and not the default. If you're not using a named instance, delete SQLInstanceName\\.

    Using more than one database

    If you want to use more than one database with SQL Gemini, add it on a new line separated by a comma. For example:

    config_V0.json

    {
    	"MyServerName\\SQLInstanceName\\DatabaseName": "C:\\Full\\Path\\To\\ScriptsFolder", 
    	"MyServerName\\SQLInstanceName\\DatabaseName2": "C:\\Full\\Path\\To\\ScriptsFolder2"
    }

    The databases can be on different servers.

  9. Replace C:\\Full\\Path\\To\\ScriptsFolder with the full path to the folder you created in step 3.

  10. Save the file.

  11. Restart Management Studio.

Using SQL Gemini with a database for the first time

When you open Management Studio, SQL Gemini opens a console window:

The console window reports SQL Gemini operations. You don't need to interact with it.

If you close the console window, SQL Gemini will stop running.

SQL Gemini will write scripts to the folder you specified in step 3 above. However, it won't create the scripts until you modify the database. We recommend you make a dummy change to create the files, then do an initial commit using your version control client.


Didn't find what you were looking for?