# Troubleshooting

If you encounter any of the following issues or errors, SailPoint recommends that you follow the guidance provided below to resolve the error before contacting SailPoint Support.

For issues or errors that are not addressed in this connector guide, refer to the following resources for troubleshooting information:

- [SailPoint Identity Services Documentation](<https://documentation.sailpoint.com/saas/help/index.html>)
- [SailPoint Support Knowledge Base](<https://support.sailpoint.com/csm?id=kb_view2&amp;kb_id=05ff44289f011200550bf7b6077fcfa3>)
- [SailPoint Developer Community](<https://developer.sailpoint.com/>)

## The Test Connection Fails with the Connection is Closed Error

The logs show error: com.microsoft.sqlserver.jdbc.SQLServerException: The "variant" data type is not supported.

**Resolution**: The issue arises when the application is using an older version of the mssql jar that does not support the variant data type. Upgrade to the latest mssql jar provided by Microsoft to resolve the issue.

## Aggregation Error

When a login user is created in Microsoft SQL Server and is granted permission only on some of the Databases present on the server and if aggregation task is run for that source, Aggregation fails as the user is not able to access other databases.

**Resolution**: In configuration under the **Include Databases** section, provide the complete list of databases (comma separated list) for which the login user have accesses.

This completes the aggregation successfully, and only details of the users present in the list of included database will be fetched.

## Kerberos Login Failed

**Issue :** Integrated authentication failed. ClientConnectionId:f5aec66e-a9d2-48f1-8bce-b894a3a9bb65 due to javax.security.auth.login.LoginException (Client not found in Kerberos database (6))

**Resolution**: Make sure login to Active Directory machine check the UPN name of the service account configured. The same should be configured in source.

## Server Name Error

During aggregation if the SERVERNAME variable has not been declared in the Microsoft SQL Server database, connector displays the following error message:

`"SQLServerException: Must declare the scalar variable "@@SERVERNAME"`

**Resolution**: The SERVERNAME variable must be declared and defined in the Microsoft SQL Server database before performing the aggregation.

## Delete Provisioning Operation Fails with an Error Message

Delete provisioning operation fails with the following error message when the service account does not have **db\_owner** permission on the Microsoft SQL Server database along with **Alter any login** permission on it:

`"Logins other than the current user can only be seen by members of the sysadmin role."`

**Resolution**: A service account must have the **db\_owner** permission on the Microsoft SQL Server database along with **Alter any login** permission.

## Data Out of Order Exception While Merging When the Index Column Contains Special Characters

When the index column contains special characters, during merging it shows the following error:

`[ InvalidConfigurationException ] [ Possible suggestions ] For data merging, data should be ordered. Please add order by clause in aggregation query or set disableOrderingCheck as true. [ Error details ] java.lang.Exception: Data out of order exception. Data should be sorted in ascending order.`

**Resoultion:** SailPoint uses the `java.text.Collator` class to check for ascending (or descending) order. The JVM instance uses the environment locale setting of language, country, and variant when comparing the records.

If the database `ResultSet` does not comply with the collator instance, then the exception occurs. The recommended resolution is to align the locale settings between SailPoint and your database instance. As an alternative, adjusting the dataset also resolves the ordering constraint.

**Method 1:**

1. In order to add a collator class, you need to write one and add the compiled class to your library path for the web application and add it to your JDBC app definition.
2. Add the following entry to the source XML using the REST APIs:

   `POST https://{orgName}.api.identitynow.com/cc/api/source/update/{source ID}`

   In the body of the POST, use the form-data as follows:

   - Key: `collatorClassName`
   - Value: `something.collators.MyCollator`

   > **Note**
   >
   > For more information on SailPoint's REST APIs, refer to [Best Practices: REST API Authentication](<https://developer.sailpoint.com/docs/api/authentication/>) and [REST API - Update Source (Partial)](<https://developer.sailpoint.com/docs/api/update-source-v-1/>) in the SailPoint Developer Community.
3. Drop the `MyCollator.class` in WEB-INF\\classes\\something\\collators

   For more information, refer to [RuleBasedCollator (Java Platform SE 7)](<https://docs.oracle.com/javase/7/docs/api/java/text/RuleBasedCollator.html>).

   You will want to extend your custom collator off of this class.

**Method 2:**

1. Remove the check for sorting and make sure that the ordering in the SQL query is correct.
2. Add the following entry to the source XML using the REST APIs:

   `POST https://{orgName}.api.identitynow.com/cc/api/source/update/{source ID}`

   In the body of the POST, use the form-data as follows:

   - Key: `disableOrderingCheck`
   - Value: `true`

   > **Note**
   >
   > For more information on SailPoint's REST APIs, refer to [Best Practices: REST API Authentication](<https://developer.sailpoint.com/docs/api/authentication/>) and [REST API - Update Source (Partial)](<https://developer.sailpoint.com/docs/api/update-source-v-1/>) in the SailPoint Developer Community.

You should know that is your data is out of order in your query, then there is the possibility of the aggregation missing information with this option, but if you are sure your data is in order, then this workaround should be able to work for you.

## The Test Connection Fails with an Error Even When SSL is Not Configured for the Connection

The test connection fails with the following error even when SSL is not configured for the connection:

`The driver could not enable secure connection to SQL server by using SSL encryption. pkix path validation failed java.security.cert.certpathvalidatorexception validity check failed`

**Resolution**: By default, in versions 4.0.0 or above, Microsoft set the value for encrypt as true. For these versions you must pass `encrypt=false;` in the URL.

For example:

`jdbc.sqlserver://<SQL server hostname>:<port>;encrypt=false;`

## Test Connection Using Windows Authentication Fails

After configuring Windows authentication, test connections fail.

**Resolution** - Refer to the [Kerberos Setup Checklist](<https://community.sailpoint.com/knowledge/Kerberos-Authentication-Setup-Checklist>) and confirm that Windows authentication and Kerberos are configured correctly.

## Test Connection Error While Using Windows Authentication

**Issue:** during test connection for SQLJDBCDriver.config file this error occurs:

```text
java.io.IOException: Configuration Error:
Line 3: expected [option key]
```

**Resolution:** This file is in Window format (with CR LF) and convert it into Unix format (with LF only).

## The Following Errors are Only Applicable When Using an Azure Managed Instance

### You Receive a Pooled Connection Error When Trying to Test the Connection 10 to 15 Minutes After Previously Configuring and Testing the Connection

**Resolution**: This is expected system behavior as cloud databases periodically reconfigure themselves. If you connect to it in this time span, you will get a **transient error**. Wait a couple of minutes and retry the connection.

### When Trying to Connect to an On-Prem Machine to Azure SQL You Get a Connectivity Error

**Resolution**: For a connection to an Azure SQL Managed Instance, check the following to resolve the error:

- If the endpoint is a private endpoint (for example, if you are using an Azure ExpressRoute or other VPN connection), ensure that the tcp/3342 port is open to the managed instance private endpoint DNS address (for example, this could be an application gateway or dedicated IP address depending on your configuration).
- If the endpoint is a public endpoint, ensure that the tcp/3342 port is open to the public endpoint DNS address (for example, this could be an application gateway or a dedicated IP address depending on your configuration).
