Create a destination connection profile

To create a destination connection profile for your Cloud SQL for SQL Server instance, follow these steps:

Console

  1. In the Google Cloud console, go to the Connection profiles page.

    Go to Connection profiles

  2. Click CREATE PROFILE.
  3. Supply the following information for your connection profile:
    • Connection profile name
    • Connection profile ID
    • Region
    • Backup files location

    For more information on these fields, see Connection profiles overview.

  4. (Optional) In the Test connection profile section, click Run test.

    Database Migration Service performs a quick check to verify that the connection details you supplied are sufficient to reach your data.

  5. Click CREATE at the bottom of the page.

    The Connection profiles page appears, and the newly created connection profile is displayed.

gcloud

This sample uses the optional --no-async flag so that all operations are performed synchronously. This means that some commands might take a while to complete. You can skip the --no-async flag to run commands asynchronously. If you do, you need to use the gcloud database-migration operations describe command to verify if your operation is successful.

Before using any of the command data below, make the following replacements:

  • CONNECTION_PROFILE_ID with a machine-readable identifier for your connection profile.
  • REGION with the identifier of the region where you want to save the connection profile.
  • CONNECTION_PROFILE_NAME with a human-readable name for your connection profile. This value is displayed in Database Migration Service in the Google Cloud console.
  • CLOUDSQL_INSTANCE_ID with the instance identifier of your destination Cloud SQL for SQL Server instance. For information on how to view Cloud SQL instance details, see View instance information in the Cloud SQL documentation.
For more information on these values, see Connection profiles overview.

Execute the following command:

Linux, macOS, or Cloud Shell

gcloud database-migration connection-profiles \
create sqlserver CONNECTION_PROFILE_ID \
  --no-async
  --display-name=CONNECTION_PROFILE_NAME \
  --cloudsql-instance=CLOUDSQL_INSTANCE_ID \
  --region=REGION

Windows (PowerShell)

gcloud database-migration connection-profiles `
create sqlserver CONNECTION_PROFILE_ID `
  --no-async
  --display-name=CONNECTION_PROFILE_NAME `
  --cloudsql-instance=CLOUDSQL_INSTANCE_ID `
  --region=REGION

Windows (cmd.exe)

gcloud database-migration connection-profiles ^
create sqlserver CONNECTION_PROFILE_ID ^
  --no-async
  --display-name=CONNECTION_PROFILE_NAME ^
  --cloudsql-instance=CLOUDSQL_INSTANCE_ID ^
  --region=REGION

You should receive a response similar to the following:

Waiting for connection profile [CONNECTION_PROFILE_ID]
to be created with [OPERATION_ID]

Waiting for operation [OPERATION_ID] to complete...done.

Created connection profile CONNECTION_PROFILE_ID [OPERATION_ID]