# SQL Server

## Creating a connection

To connect to SQL Server, you'll need to provide the below details:

{% hint style="info" %}
Fill in following details in the form. We use Azure SQL service as an example here:
{% endhint %}

1. **Server**: The server name. It can be found in Azure Portal: *SQL Server -> Server Name -> Overview -> Server Name*
2. **Database**: The database name. This can be found in the Azure Portal at the following location: *SQL Server -> Server Name -> Overview -> Available Resources -> (x) databases*.
3. **Database or Schema**: The schema to connect to
4. **User**: The username
5. **Password** : The password

<figure><img src="https://604868671-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkO3-a8YVu1iq1jP__S%2Fuploads%2FXhqiRNyRH1PPcwDOxDbi%2Fimage.png?alt=media&#x26;token=ca5991c6-1af4-46d7-a134-2f21f31af9f0" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Note:

* The User and Password above are for the SQL Authentication.
* In order to connect to a privately hosted instance, the customer will need to whitelist the IPs from Telmai. Please reach out to Telmai support for the updated list of IP’s for whitelisting.
  {% endhint %}

## Connecting an asset

Once a connection is defined, you can start using it to create assets. To create assets, you will need to select existing table, or run a custom SQL query.

<figure><img src="https://604868671-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkO3-a8YVu1iq1jP__S%2Fuploads%2F2I4Sd589yf7blhbO66cm%2Fimage.png?alt=media&#x26;token=1b69d027-0f04-4bff-95de-7bb83aa78914" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
JSON data type is not supported for SQL Server connections out of the box. Please reach out to Telmai support if it needs to be enabled
{% endhint %}

{% hint style="info" %}
Please ensure that your environment has whitelisted [Telmai IP list](https://docs.telm.ai/telmai/api-reference/telmai-ip-list).
{% endhint %}
