Google Cloud SQL Server is a fully-managed database service that helps you set up, maintain, manage, and administer your SQL Server relational databases on Google Cloud Platform.
You can ingest data from your Google Cloud SQL Server database using Hevo Pipelines and replicate it to a Destination of your choice.
Prerequisites
-
The Google Cloud SQL Server instance is running. To check this, access your Google Cloud SQL Instances page and look for an Active indication next to the instance ID.
-
The SQL Server version is 2017.
Perform the following steps to configure your Google Cloud SQL Server Source:
Add Hevo IP Addresses to your Database Allowlist
You need to allowlist the Hevo IP address for your region to enable Hevo to connect to your Google Cloud SQL Server database. To do this:
-
Access the Google Cloud SQL Instances page and click the Instance ID that you want to use.
-
In the left navigation pane, under Overview, click Connections.
-
In the Connections page, select the Public IP check box, and then, click + Add Network.
-
Specify the following in the Edit Network section:
-
Name: A name for this connection. For example, all or Hevo IP address.
-
Network: The IP address of the site to grant access to. Specify 0.0.0.0/0 to authorize all sites or your region’s IP address to specifically whitelist Hevo’s IP address.
This adds the IP address to the list of Authorized networks.
-
-
(Optional) Click + Add network to add another IP address.
-
Click Save.
Create a User and Grant Privileges
Option 1. Configuring the user account using Google Cloud console
-
Click the master Google Cloud SQL Server instance.
-
In the left navigation pane, under Connections, click the Users tab, and then, click + ADD USER ACCOUNT.
-
Specify the user account information and click ADD.
You will specify this username and password while creating your Hevo Pipeline.
Option 2. Configuring the user account using SQL Server client
Log in to your SQL Server instance as masteruser
using your preferred SQL Server client tool, and enter the following commands:
-
Log in to the database schema where you want to add the user:
USE <schema_name>;
-
(Optional) Create a login user.
Note: You can skip this step if you want to use the existing login user to create a new database user.
CREATE LOGIN '<login_user>' WITH PASSWORD = '<password>';
-
Create a new database user and grant
read
privileges:CREATE USER hevo for login <master_username>; EXEC sp_addrolemember 'db_datareader', 'hevo';
Retrieve the Configuration Details (Optional)
Refer to the steps below to gather the configuration details required to create your Hevo Pipeline:
1. Retrieve the hostname and port number
Note: Following is an example of Google Cloud SQL Server hostname and port number:
Host : 35.220.150.0
Port : 1433
-
Access the Google Cloud SQL Instances page.
-
Locate the hostname of the master instance under the Public IP address column.
The default port value is 1433.
You will specify these while creating your Hevo Pipeline.
2. Retrieve the username and password
To retrieve your username and password, follow the steps in section, Create a User and Grant Privileges.
3. Retrieve the database names
-
Access the Google Cloud SQL Instances page.
-
Click your database instance, and then, click the Databases tab.
In this page, you can locate the name of your database under the Name column.
Specify Google Cloud SQL Server Connection Settings
-
In the Configure your Google Cloud SQL Server Source page, specify the following:
-
Source Name: A unique name for your Source, not exceeding 50 characters. For example, Google Cloud SQL Server.
-
Database Host: SQL Server host’s IP address or DNS.
Note: For URL-based hostnames, exclude the http:// or https:// part. For example, if the hostname URL is https://mssql.database.windows.net, enter mssql.database.windows.net.
-
Database Port: The port on which your SQL Server is listening for connections. Default value: 1433.
-
Database User: The read-only user who has the permissions to read tables in your database.
-
Database Password: The password for the read-only user.
-
Database Name: The database that you wish to replicate.
-
Connect through SSH: Enable this option to connect to Hevo using an SSH tunnel, instead of directly connecting your SQL Server database host to Hevo. This provides an additional level of security to your database by not exposing your SQL Server setup to the public. Read Connecting Through SSH.
If this option is disabled, you must configure your Source to accept connections from Hevo’s IP addresses.
-
Additional Settings
-
Connect through SSH: Enable this option to connect to Hevo using an SSH tunnel instead of directly connecting your Google Cloud SQL Server database host to Hevo. This provides an additional level of security to your database by not exposing your Google Cloud SQL Server setup to the public. Read Connecting Through SSH.
If this option is turned off, you must configure your Source to accept connections from Hevo’s IP addresses. -
Use SSL: Enable this option to use an SSL-encrypted connection. Specify the following:
-
CA File: The file containing the SSL server certificate authority (CA).
-
Client Certificate: The client’s public key certificate file.
-
Client Key: The client’s private key file.
-
-
-
-
Click Test & Continue.