Guides
SQL Server

Connect to a SQL Server database

MOSTLY AI can use a SQL Server database as a source for original data and deliver synthetic data to another SQL Server database. You can create separate connectors for the source and delivery of synthetic data.

Prerequisites

Obtain the SQL Server connection details.

  • hostname
  • port
  • credentials
  • database name
  • database schema

Steps

  1. From the Connectors* tab, click Create connector. Click Create connector button The Create connector drawer appears on the right.
  2. On the Connect to database tab, select SQL Server. Select SQL Server connector
  3. On the Create SQL Server connector page, configure the connector.
    1. For Connector name, enter a name that you can distinguish from other connectors.

      A combination of SQL Server + _DATABASE_ + _SCHEMA_ might help you identify this connector among other SQL Server connectors.

    2. For Connection type, select whether you want to use the connector as a source or destination.

      You can select only data source connectors when you create a new catalog.

      Similarly, you can select only data destination connectors when you configure a destination for the new synthetic dataset.

    3. For Hostname, enter the SQL Server database hostname.

    4. For Port, enter the database port.

      By default, the port for SQL Server databases is 1433.

    5. For Username and Password, enter your SQL Server database credentials.

    6. For Database, enter the name of the database.

    7. For Schema, enter the name of the database schema.

      Configure SQL Server connector
  4. Click Test connection to make sure the configuration is correct. If you see a successful connection message, then MOSTLY AI connected to your SQL Server database successfully and found the database in the provided schema.
  5. Click Save to save your new SQL Server connector.

What's next

You can now use the SQL Server connector as a data source when you create a new catalog.

You can also use the SQL Server connector as a destination.

You can use different types of data sources and destinations for a synthetic dataset. For example, if your data source is a SQL Server database, you can deliver the generated synthetic to any of the supported databases or cloud storage providers.