Connect to all databases via ODBC aliases with SQLMerger

How-to: Connecting to all databases via ODBC aliases

One way to connect to a database in SQLMerger is by using an "ODBC" alias.
An ODBC alias identifies a collection of settings that Windows keeps track of which ultimately makes it possible to connect to a database via the alias name.
You create ODBC aliases in the "Windows Control Panel".

First, let's see the database we want to connect to represented in the native tool for the database type. In this example it is a SQL Server database, so I opened "SQL Server Management Studio", from Microsoft.

The database listed in the SQL Server Management Studio.

This is just to let you see there is this database "SQLMergerExamplesSource". In the real world the database could exist on another computer/database on the network, and this tool might not exist on the computer from where we want to connect to the database.

As mentioned before, adding a ODBC alias is done through "Control Panel", so we'll start with:

Do:

1. Open "Control Panel". Double click "Administrative Tools".

Notice this may look different depending on your Windows version. Here it is the XP version.

 

2. Double click "Data Sources (ODBC)".

 

3. Click the [Add] button.

Locating the [Add] button. Don't be confused by the list of existing aliases.

 

4. Select the type of database you want to connect to.

List of ODBC database drivers installed in the system. Some comes preinstalled with Windows. Others you might need to find elsewhere, e.g. on the Internet.

 

5. Enter a name for your alias.

You can choose any name. This is a name you create for identifying the settings you're about to create.

Pick a Server (the computer hosting/running the database). If it is the same computer, enter "(local)".

 

6. Set up the way you log into the database.

If you run local, you may be able to use the settings shown below:

 

7. Select one of the databases that the server hosts.

In our example here it is the "SQLMergerExamples" database. Remember from the beginning?

 

8. Click the [Finish] button and you're almost done.

 

9. Click the [Test Data Source] button to verify that you can connect.

If it is ok, you are now ready to go to SQLMerger. Otherwise you may be able to find some help on the Internet.

 

 

10. In SQLMerger select the "Database" tab. In the "Target" area, select "ODBC Alias" as the "Database Type", in the dropdown.

 

11. Enter the name of the ODBC alias you created previously. Finally you can click the "Connected" check box for actually connecting SQLMerger to a target database.

Connected!

You're ready.

 

Tip:

If you do not click the "Connected" checkbox, SQLMerger will connect you on demand later automatically, e.g. when you merge a table.