Skip to main content Skip to complementary content

Prerequisites

The following section lists the prerequisites for working with a Google Cloud SQL for SQL Server source.

Client Prerequisites

Qlik Replicate for Windows

Install Microsoft ODBC Driver 18.1 for Windows on the Qlik Replicate Server machine.

Qlik Replicate for Linux

The procedure below assumes that you have installed a single default instance of Replicate on Linux (areplicate). If you have installed multiple instances, replace areplicate with the name of the instance running the task with a Microsoft SQL Server source. If several instances are running such as task, the procedure needs to be repeated for each instance.

Install Microsoft ODBC Driver 18.1 for Linux on the Replicate machine.

Then, open a Unix shell and do the following:

  1. Change the working directory to <Replicate-Install-Dir>/bin.

  2. Stop the Replicate service:

    ./areplicate stop
  3. Optionally, confirm that the service has stopped:

    ./areplicate status
  4. Copy the driver location to the site_arep_login.sh file as follows:

    echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/microsoft/msodbcsql18/lib64/" >> site_arep_login.sh

    This will add the driver to "LD_LIBRARY_PATH" and update the driver location in the site_arep_login.sh file.

  5. Optionally, confirm that the driver location was copied:

    cat site_arep_login.sh
  6. Start the Replicate service:

    ./areplicate start
  7. Optionally confirm that the service has started:

    ./areplicate status
  8. Replicate requires the following ODBC library: libmsodbcsql-18.1.so.1.1

    To check which library version is currently installed Issue the following command:

    ls /opt/microsoft/msodbcsql/lib64/

    If the existing library has a different version number (e.g. libmsodbcsql-18.0.so.1.1), you need to create a symbolic link between the existing library and the required library.

    To do this, issue the following commands:

    cd /opt/microsoft/msodbcsql18/lib64/
    ln -s existing_library_name libmsodbcsql-18.1.so.1.1

    where existing_library_name is the name of the currently installed library (e.g. libmsodbcsql-18.0.so.1.1).

Preparing the database for CDC

The following section explains how to set up the database for CDC.

To set up the database for CDC:

  1. Set up the database for MS-CDC by executing the following:

    EXEC msdb.dbo.gcloudsql_cdc_enable_db '[DATABASE_NAME]'

    where source_db_name is the name of the source database.

  2. The replication task automatically enables MS-CDC for all the source tables. However, if you prefer to enable MS-CDC manually, execute the following script (for each of the intended source tables):

    exec sys.sp_cdc_enable_table

    @source_schema = N'schema_name',

    @source_name = N'table_name',

    @role_name = NULL

    where schema_name and table_name are the names of the source schema and the source table respectively.

    Information note
    • The CT table names must use the default naming format: <SchemaName>_<TableName>_CT
    • The CT table must include the following columns: [__$start_lsn], [__$end_lsn], [__$seqval], [__$operation], [__$update_mask], <all the data columns>, [__$command_id]

  3. Make sure the MS-CDC capture and cleanup jobs are running.

    Information note
    • You can control the jobs using sys.sp_cdc_change_job. For additional information, see the Microsoft Help.
    • To reduce latency, you might want to set the @pollinginterval parameter to a small value.

TLS 1.2 prerequisites

If your environment matches the following:

  • Microsoft SQL Server 2014
  • Microsoft ODBC Driver 18 installed on Red Hat 8.1 or later

Then, in order to work with TLS 1.2, you must install a specific Service Pack on the Windows machine where Microsoft SQL Server is installed.

For more information, see https://support.microsoft.com/en-us/help/3135244/tls-1-2-support-for-microsoft-sql-server.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!