SQL Server

The SQL Server connector lets you perform insert, delete, update, and read operations on a SQL Server database.

Supported versions

SQL Server versions: 2008, 2012, 2014, 2016, 2017, 2019, and 2022

Before you begin

Before using the SQL Server connector, do the following tasks:

Configure the connector

A connection is specific to a data source. It means that if you have many data sources, you must create a separate connection for each data source. To create a connection, do the following:

  • In the Cloud console, go to the Integration Connectors > Connections page and then select or create a Google Cloud project.

    Go to the Connections page

  • Click + Create new to open the Create Connection page.
  • In the Location section, choose the location for the connection.
    1. Region: Select a location from the drop-down list.

      For the list of all the supported regions, see Locations.

    2. Click Next.
  • In the Connection Details section, complete the following:
  • Connector: Select SQL Server from the drop down list of available Connectors.
  • Connector version: Select the Connector version from the drop down list of available versions.
  • In the Connection Name field, enter a name for the Connection instance.

    Connection names must meet the following criteria:

  • Optionally, enter a Description for the connection instance.
  • Optionally, enable Cloud logging, and then select a log level. By default, the log level is set to Error.
  • Service Account: Select a service account that has the required roles.
  • Optionally, configure the Connection node settings:

    A node is a unit (or replica) of a connection that processes transactions. More nodes are required to process more transactions for a connection and conversely, fewer nodes are required to process fewer transactions. To understand how the nodes affect your connector pricing, see Pricing for connection nodes. If you don't enter any values, by default the minimum nodes are set to 2 (for better availability) and the maximum nodes are set to 50.

  • (Optional) In the Advanced settings section, select the Use proxy checkbox to configure a proxy server for the connection and configure the following values:
  • ApplicationIntent: The application intent connection string property expresses the client application's request to be directed either to a read-write or read-only version of an availability group database. To use read-only routing, a client must use an application intent of read-only in the connection string when connecting to the availability group listener. Without the read-only application intent, connections to the availability group listener are directed to the database on the primary replica.
  • ApplicationName: The application name connection string property expresses the client application's name.
  • Database: The name of the SQL Server database.
  • Encrypt: This field sets whether SSL is enabled.
  • Optionally, click + Add label to add a label to the Connection in the form of a key/value pair.
  • Optionally, if you want to use SSL, select Enable SSL. This displays the SSL configuration details.
    1. Select a trust store type. It can be either Public, Private, or Insecure Connection.
    2. Select the certificates as displayed based on your trust store selection.
    3. If you are using mTLS, select the key store certificates in the Key Store section.
  • Click Next.
  • In the Destinations section, enter details of the remote host (backend system) you want to connect to.
    1. Destination Type: Select a Destination Type.
      • To specify the destination hostname or IP address, select Host address and enter the address in the Host 1 field.
      • To establish a private connection, select Host Address and add the endpoint attachment created for the SAP Gateway using the HTTPS protocol.

      If you want to establish a public connection to your backend systems with additional security, you can consider configuring static outbound IP addresses for your connections, and then configure your firewall rules to allowlist only the specific static IP addresses.

      To enter additional destinations, click +Add destination.

    2. Click Next.
  • In the Authentication section, enter the authentication details.
    1. Select an Authentication type and enter the relevant details.

      The following authentication types are supported by the SQL Server connection:

      • Username and password
    2. To understand how to configure these authentication types, see Configure authentication.

    3. Click Next.
  • Review: Review your connection and authentication details.
  • Click Create.
  • Configure authentication

    Enter the details based on the authentication you want to use.

    Entities, operations, and actions

    All the Integration Connectors provide a layer of abstraction for the objects of the connected application. You can access an application's objects only through this abstraction. The abstraction is exposed to you as entities, operations, and actions.

    System limitations

    The SQL Server connector can process a maximum of 90 transactions per second, per node, and throttles any transactions beyond this limit. By default, Integration Connectors allocates 2 nodes (for better availability) for a connection.

    For information on the limits applicable to Integration Connectors, see Limits.

    Supported data types

    The following are the supported data types for this connector:

    Actions

    This connector supports execution of the following actions:

    Create connections using Terraform

    You can use the Terraform resource to create a new connection.

    To learn how to apply or remove a Terraform configuration, see Basic Terraform commands.

    To view a sample terraform template for connection creation, see sample template.

    When creating this connection by using Terraform, you must set the following variables in your Terraform configuration file:

    Parameter name Data type Required Description
    application_intent STRING False The application intent connection string property expresses the client application's request to be directed either to a read-write or read-only version of an availability group database. To use read-only routing, a client must use an application intent of read-only in the connection string when connecting to the availability group listener. Without the read-only application intent, connections to the availability group listener are directed to the database on the primary replica.
    application_name STRING False The application name connection string property expresses the client application's name.
    database STRING False The name of the SQL Server database.
    encrypt BOOLEAN False This field sets whether SSL is enabled.
    enable_logging ENUM False Enables verbosity for logging during a connection by selecting a level between 1 (least verbose) and 5 (most verbose). This feature can aid in troubleshooting error messages or other unexpected behavior. However, please be aware that this option will log all communication details, including requests, responses, and SSL certificates, between the connector and backend. Therefore, it is not advisable to utilize this function in a live production environment. Supported values are: 1, 2, 3, 4, 5
    proxy_enabled BOOLEAN False Select this checkbox to configure a proxy server for the connection.
    proxy_auth_scheme ENUM False The authentication type to use to authenticate to the ProxyServer proxy. Supported values are: BASIC, DIGEST, NONE
    proxy_user STRING False A user name to be used to authenticate to the ProxyServer proxy.
    proxy_password SECRET False A password to be used to authenticate to the ProxyServer proxy.
    proxy_ssltype ENUM False The SSL type to use when connecting to the ProxyServer proxy. Supported values are: AUTO, ALWAYS, NEVER, TUNNEL

    Use the SQL Server connection in an integration

    After you create the connection, it becomes available in both Apigee Integration and Application Integration. You can use the connection in an integration through the Connectors task.

    Also, see the Perform CRUD operations on a MySQL database tutorial that shows how to create a MySQL connection, and use the connection in an integration to perform read and write operations.

    Get help from the Google Cloud community

    You can post your questions and discuss this connector in the Google Cloud community at Cloud Forums.

    What's next