# Microsoft SQL ServerV2

OvalEdge uses Java Database Connectivity (JDBC) to connect to SQL ServerV2, which allows it to crawl and profile data objects (Tables, Table Columns, etc.) and build Lineage.

**SQL ServerV2 vs. SQL Server**

<table><thead><tr><th width="346.5">SQL ServerV2</th><th>SQL Server</th></tr></thead><tbody><tr><td><p>This is a Case-sensitive database.</p><p>Example: Ignores case differences in identifiers and data during comparisons.</p><p>For example, SELECT * FROM MyTable and SELECT * FROM mytable would be treated the same.</p><p><br></p></td><td><p>This is a Case-insensitive database.</p><p>Example: Distinguishes between uppercase and lowercase letters in identifiers (like table names and column names) and data.</p><p>For example, SELECT * FROM MyTable and SELECT * FROM mytable would be treated as separate queries if the database is case-sensitive.</p></td></tr></tbody></table>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfvfFlyBeKXVuP5u-E-PEmoahsAFwhK1VCJSijxNDBiYTBFM6dHVgSPJggtwYb8fFtTjd-3Igo_ehFouiq8kkcNkU2hiz9UFerPzJG_-V-xaFutWeuIwIM69bg5ww9gAyho6QqH?key=ic6or8xOHbeOxu3ChOEAXO36" alt=""><figcaption></figcaption></figure>

## Overview

### Connector Details

| Connector Category                                                | RDBMS System       |
| ----------------------------------------------------------------- | ------------------ |
| Connector Version                                                 | 6.3.4              |
| OvalEdge Releases Supported (Available from)                      | Release4.3 onwards |
| <p>Connectivity</p><p>\[How OvalEdge connects to SQL Server ]</p> | JDBC               |
| SQL Server Versions Verified                                      | SQL Server 2019    |

| Note: The SQL Server connector has been verified internally with SQL Server 2019 and is expected to be compatible with other supported SQL Server versions. If you have any issues with different SQL Server versions, please contact CSM. |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |

{% hint style="info" %}

{% endhint %}

## Connector Features

| <ul><li>Crawling</li></ul>                              | ✅ |
| ------------------------------------------------------- | - |
| <ul><li>Delta Crawl</li></ul>                           | ❌ |
| <ul><li>Profiling</li></ul>                             | ✅ |
| <ul><li>Query Sheet</li></ul>                           | ✅ |
| <ul><li>Data Preview</li></ul>                          | ✅ |
| <ul><li>Auto Lineage </li></ul>                         | ✅ |
| <ul><li>Manual Lineage</li></ul>                        | ✅ |
| <ul><li>Authentication via Credential Manager</li></ul> | ✅ |
| <ul><li>Data Quality</li></ul>                          | ✅ |
| <ul><li>DAM (Data Access Management)</li></ul>          | ❌ |
| <ul><li>Bridge</li></ul>                                | ✅ |

### Getting Ready to Establish a Connection

### Prerequisites

The following are the prerequisites to establish a connection between SQL Server and OvalEdge:

**Service Account User Permissions**

| We recommend having a separate service account to establish a connection from OvalEdge to the data source with the following minimal set of permissions. |
| -------------------------------------------------------------------------------------------------------------------------------------------------------- |

| Operation               | Access Permission |
| ----------------------- | ----------------- |
| Connection Validation   | SELECT            |
| Crawl Schemas           | SELECT            |
| Crawl Tables            | SELECT            |
| Profile Schemas, Tables | SELECT            |
| Lineage Building        | View DEFINITION   |
| View Source Code        | View DEFINITION   |
| Relationships           | REFERENCES        |

Please refer to [Appendix A ](https://docs.google.com/document/d/1a-lJrT5PmgcauqDzl8m0_V4i3prgQVScaEYmX-BCzJg/edit?tab=t.0#heading=h.qbmcgzlx7q7w)for guidelines on creating a service account with the required permissions.

### Setup a Connection

| Important: You must have the [Connector Creator role](https://docs.google.com/document/d/1XUh6g4GAC4DNeldKJjw_f5fJSa1GlD5wbl_fhnOcHiU/edit?tab=t.0#bookmark=id.iusym27g6f4c) to set up a connection in OvalEdge. |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

1. Log into OvalEdge, go to Administration > Connectors, click + (New Connector), search for SQL Server, and complete the specific parameters.

Note: Fields marked with an asterisk (\*) are mandatory for establishing a connection.

| Field Name                     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Connector Type                 | By default, "SQL Server" is displayed as the selected connector type.                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| Connector Settings             |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| Authentication                 | <p>OvalEdge supports the following three types of authentication for SQL Server:</p><ul><li>SQL Server Authentication</li><li>Windows Authentication</li><li>Azure Active Directory - Password</li></ul>                                                                                                                                                                                                                                                                                                               |
| OvalEdge Installed Environment | <p>Select the installed environment from the drop-down list:</p><p>Options: </p><ul><li>Linux/Unix</li><li>Windows</li></ul><p>Note: This Field is available when the Authentication mechanism is selected as "Windows Authentication." This field refers to where the OvalEdge application is installed.</p>                                                                                                                                                                                                          |
| Credential Manager\*           | <p>Select the desired credentials manager from the drop-down list. Relevant parameters will be displayed based on your selection.</p><p>Supported Credential Managers:</p><ul><li>OE Credential Manager</li><li>AWS Secrets Manager</li><li>HashiCorp Vault</li><li>Azure Key Vault</li></ul>                                                                                                                                                                                                                          |
| License Add Ons                | <p><br>Select the checkbox for Auto Lineage Add-On to build data lineage automatically.</p><ul><li>Select the checkbox for Data Quality Add-On to identify data quality issues using data quality rules and anomaly detection.</li></ul>                                                                                                                                                                                                                                                                               |
| Auto Lineage                   | Supported                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| Data Quality                   | Supported                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| Data Access                    | Not Supported                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Connector Name\*               | <p>Enter a unique name for the SQL Server connection              </p><p>(Example: "SQL Server\_Prod").</p>                                                                                                                                                                                                                                                                                                                                                                                                            |
| Connector Environment          | Select the environment (Example: PROD, STG) configured for the connector.                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| Server\*                       | Enter the SQL Server database Server name or IP address (Example: xxxx-sqlserver.xxxx4ijtzasl.xx-south-1.rds.amazonaws.com or 192.168.1.10).                                                                                                                                                                                                                                                                                                                                                                           |
| Port\*                         | By default, the port number for the SQL Server database "1433" is auto-populated. If necessary, you can change this to a different port number.                                                                                                                                                                                                                                                                                                                                                                        |
| Database\*                     | Enter the database name to which the service account user has access within the SQL Server.                                                                                                                                                                                                                                                                                                                                                                                                                            |
| Domain                         | <p>Enter the Qualified SQLServer Domain name.</p><p>Note: This field is available when the authentication mechanism is set to Windows Authentication, and the OvalEdge installed environment is Linux.</p>                                                                                                                                                                                                                                                                                                             |
| Driver\*                       | <p>By default, the SQL Server driver details </p><p>(Example: com.microsoft.sqlserver.jdbc.SQLServerDriver) are auto-populated. OvalEdge artifacts include the required drivers for supported databases.</p>                                                                                                                                                                                                                                                                                                           |
| Username\*                     | Enter the service account username set up to access the SQL Server database (Example: "oesauser").                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Password\*                     | Enter the password associated with the service account user (Example: "password").                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Connection String              | <p>Configure the connection string for the SQL Server database:</p><ul><li>Automatic Mode: The system generates a connection string based on the provided credentials.</li><li>Example (SQL Server): </li></ul><p>jdbc:sqlserver://{server}:1433;database={sid}</p><ul><li>Manual Mode: Manually enter a valid connection string.</li><li>Example (SQL Server): jdbc:sqlserver://{server}:{Port};database={sid}</li></ul><p>Replace placeholders with actual database details.</p><p>{sid} refers to Database Name</p> |

2. After entering all connection details, you can perform the following actions:

* Click Validate to verify the connection.
* Click Save to store the connection for future use.
* Click Save & Configure to apply additional settings before saving.

3. The saved connection will appear on the Connectors home page.

#### Connectivity Troubleshooting

If incorrect parameters are provided, you may encounter error messages. To resolve these issues, ensure all input is correct. If problems persist, contact your assigned OvalEdge support team.

| S.No. | Error Message(s)                                              | Error Description / Resolution                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ----- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1     | Login failed for user. ClientConnectionId:xxx                 | <p>Error Description: </p><p>Either username and password might be wrong.</p><p>Resolution:</p><ul><li>You provided an incorrect username or password in the setup form's User or Password fields or formatted the User field value incorrectly.</li><li>The authorizing user has the permission required to connect the database to ovaledge.</li><li>The authorizing user is not locked out of their account or required to reset their password.</li></ul> |
| 2     | <p>SQLServerException: Login failed for user. </p><p><br></p> | <p>Error Description:<br>This issue occurs when the authorized user's password has expired or must be changed due to SQL Server's password policy. </p><p>Resolution: In SQL Server, change the password for the user referenced in the error message. For more information, see <a href="https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-login-transact-sql?view=sql-server-ver16">Microsoft's Alter Login documentation</a>.</p>               |

### Manage Connector Operations

#### Crawl/Profile

| Important: You must have the [Integration Admin role](https://docs.google.com/document/d/1XUh6g4GAC4DNeldKJjw_f5fJSa1GlD5wbl_fhnOcHiU/edit?tab=t.0#bookmark=id.e1kbdzt96zrb) in OvalEdge for crawl/profile operations. |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

A Crawl/Profile button allows you to select one or more schemas for crawling.&#x20;

1. Navigate to the Connectors page and click Crawl/Profile. It allows you to select the schemas that need to be crawled.
2. The crawl option is selected by default.
3. Click on the Run button, which gathers all metadata from the connected source and puts it into the OvalEdge Data Catalog. After a successful crawl, all the information is displayed in the Data Catalog > Databases tab.

#### Other Operations

The Connectors page in OvalEdge provides a centralized view of all configured connectors, including their health status.

Managing connectors includes:

* Connectors Health: Displays performance with a green (active) or red (inactive) icon, helping monitor data flow and address issues early.
* Viewing: Shows connector details (e.g., Databases, Tables, Table Columns, Codes, etc) via the View icon.

Nine Dots Menu Options:

You can view, edit, validate, and delete connectors using the Nine Dots menu.

* Edit Connector: Update and revalidate the data source.
* Validate Connector: Check the connection's integrity.
* Settings: Modify connector settings.
* Crawler: Configure data that needs to be extracted.
* Profiler: Customize data profiling rules and methods.
* Query Policies: Define rules for executing queries based on roles.&#x20;
* Access Instructions: Specify how data can be accessed as a note.&#x20;
* Business Glossary Settings: Manage term associations at the connector level.
* Anomaly Detection Settings: Configure anomaly detection preferences at the connector level.
* Others: Configure notification recipients for metadata changes.
* Build Lineage: Automatically build data lineage using source code parsing.
* Delete Connector: Remove connectors with confirmation.

### Metadata Mapping

| Source Object Name | OvaEdge Data Object | OvalEdge Data Object Type |
| ------------------ | ------------------- | ------------------------- |
| Schemas            | Schemas             | -                         |
| Tables             | Tables              | Table                     |
| Columns            | Columns             | Column                    |
| Views              | Tables              | View                      |
| Functions          | Codes               | Function                  |
| Triggers           | Codes               | Trigger                   |
| Stored Procedures  | Codes               | Procedure                 |

### Limitations

| S.No.        | Description                                |
| ------------ | ------------------------------------------ |
| Crawling     | Not supporting SSH tunneling in SQL Server |
| Profiling    | -                                          |
| Lineage      | -                                          |
| Data Quality | NA                                         |
| Data Preview | -                                          |

### Appendix A

Please refer to the below sample queries to create a service account user and grant the required permissions. For more information, please refer to the [SQL Server documentation](https://learn.microsoft.com/en-us/sql/t-sql/statements/create-login-transact-sql?view=sql-server-ver16) or Consult your SQL Server  DBA to check and execute these queries.

1. Create a SQL Server Login and a database user.

| <ul><li>CREATE LOGIN <\<Loginname>> WITH PASSWORD = '<\<password>>';</li><li>CREATE USER <\<username>> FOR LOGIN <\<Loginname>>;</li></ul> |
| ------------------------------------------------------------------------------------------------------------------------------------------ |

2. Grant Connection Permission.

| GRANT CONNECT TO <\<username>>; |
| ------------------------------- |

3. Grant SELECT Permission on the Schema.

| GRANT SELECT ON SCHEMA::<\<schemaname>> TO <\<username>>; |
| --------------------------------------------------------- |

4. Grant REFERENCES Permission.

| GRANT REFERENCES TO <\<username>>; |
| ---------------------------------- |

5. Grant VIEW DEFINITION Permission.

| GRANT VIEW DEFINITION TO <\<username>>; |
| --------------------------------------- |

<br>
