|Subject:||Connecting to InterSystems IRIS SQL with ODBC|
|Creation date:||4/2/21 9:04 AM|
|Last modified on:||4/5/21 12:49 PM|
If you use InterSystems IRIS SQL server you may have experienced a lack of features with it's built in SQL Query tool. The good news is that IRIS provides ODBC connection functionality, meaning you can use an ODBC query tool to perform the same queries in addition to getting access to all of the features your chosen program provides. In this document you will see how to connect to IRIS SQL using an ODBC query tool, such as WinSQL.
There are a plethora of benefits when using WinSQL with IRIS:
The first step in connecting to your IRIS SQL database via ODBC is to give users permissions to interact with your SQL database. This is done within the IRIS Management Center web portal.
Go to your IRIS Management Center and navigate to SYSTEM > SECURITY MANAGEMENT > USERS.
The next step is to select a user and grant it SQL privileges. You can tailor each user's access privileges to your specific needs and security constraints.
Once you have a user account configured, the next step is to configure your ODBC query tool to connect to your IRIS SQL database.
The first phase of this process is to setup a User DSN to use the IRIS Driver. In WinSQL, this is quite easy. You can obtain the IRIS ODBC driver when you install IRIS on the machine, however, if you are on a separate machine you will need to obtain this from your administrator.
Once the driver is installed on your machine you can simply click ADD and select the InterSystems IRIS ODBC driver that will appear in the list.
Once you’ve selected the driver you need to specify your connection parameters within a System DSN. To do this, select the System DSN for IRIS that matches your System Architecture from the SYSTEM DSN tab.
Once all of the information is filled out, click OK.
Once you’ve filled out the connection parameters you are ready to connect.
In WinSQL you can do this by clicking FILE > NEW CONNECTION.
On this window, select the IRIS DSN you just created from the drop down and enter in the User Name and Password and click OK.
If there are no issues, you will successfully connect to the SQL Database running on IRIS and can begin to run queries.