2024-04-03 09:23:31 +00:00
|
|
|
NAME
|
|
|
|
|
gcloud database-migration connection-profiles create sqlserver - create a
|
|
|
|
|
Database Migration Service connection profile for SQL Server
|
|
|
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
|
gcloud database-migration connection-profiles create sqlserver
|
2025-01-23 10:02:29 +00:00
|
|
|
(CONNECTION_PROFILE : --region=REGION) [--no-async]
|
2025-03-26 10:55:24 +00:00
|
|
|
[--database=DATABASE] [--display-name=DISPLAY_NAME]
|
|
|
|
|
[--labels=[KEY=VALUE,...]] [--role=ROLE]
|
|
|
|
|
[--ca-certificate=CA_CERTIFICATE --ssl-type=SSL_TYPE]
|
|
|
|
|
[[--gcs-bucket=GCS_BUCKET
|
|
|
|
|
: --gcs-prefix=GCS_PREFIX --provider=PROVIDER]
|
|
|
|
|
| --host=HOST --port=PORT]
|
|
|
|
|
[--private-connection=PRIVATE_CONNECTION | --static-ip-connectivity
|
|
|
|
|
| [--forward-ssh-hostname=FORWARD_SSH_HOSTNAME
|
|
|
|
|
--forward-ssh-username=FORWARD_SSH_USERNAME
|
|
|
|
|
(--forward-ssh-password=FORWARD_SSH_PASSWORD
|
|
|
|
|
| --forward-ssh-private-key=FORWARD_SSH_PRIVATE_KEY)
|
|
|
|
|
: --forward-ssh-port=FORWARD_SSH_PORT; default=22]]
|
2025-01-23 10:02:29 +00:00
|
|
|
[--username=USERNAME (--password=PASSWORD | --prompt-for-password)
|
|
|
|
|
: --cloudsql-instance=CLOUDSQL_INSTANCE
|
|
|
|
|
--cloudsql-project-id=CLOUDSQL_PROJECT_ID] [GCLOUD_WIDE_FLAG ...]
|
2024-04-03 09:23:31 +00:00
|
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
|
Create a Database Migration Service connection profile for SQL Server.
|
|
|
|
|
|
|
|
|
|
EXAMPLES
|
|
|
|
|
To create a source connection profile my-source-profile for SQL Server:
|
|
|
|
|
|
|
|
|
|
$ gcloud database-migration connection-profiles create sqlserver \
|
|
|
|
|
my-source-profile --region=us-central1 \
|
|
|
|
|
--gcs-bucket=bucket-name --gcs-prefix=prefix/path
|
|
|
|
|
|
|
|
|
|
To create a destination connection profile my-dest-profile for SQL Server:
|
|
|
|
|
|
|
|
|
|
$ gcloud database-migration connection-profiles create sqlserver \
|
|
|
|
|
my-dest-profile --region=us-central1 \
|
|
|
|
|
--cloudsql-instance=cloudsql-id
|
|
|
|
|
|
|
|
|
|
POSITIONAL ARGUMENTS
|
|
|
|
|
Connection profile resource - The connection profile to create. The
|
|
|
|
|
arguments in this group can be used to specify the attributes of this
|
|
|
|
|
resource. (NOTE) Some attributes are not given arguments in this group but
|
|
|
|
|
can be set in other ways.
|
|
|
|
|
|
|
|
|
|
To set the project attribute:
|
|
|
|
|
◆ provide the argument connection_profile on the command line with a
|
|
|
|
|
fully specified name;
|
|
|
|
|
◆ provide the argument --project on the command line;
|
|
|
|
|
◆ set the property core/project.
|
|
|
|
|
|
|
|
|
|
This must be specified.
|
|
|
|
|
|
|
|
|
|
CONNECTION_PROFILE
|
|
|
|
|
ID of the connection_profile or fully qualified identifier for the
|
|
|
|
|
connection_profile.
|
|
|
|
|
|
|
|
|
|
To set the connection_profile attribute:
|
|
|
|
|
▸ provide the argument connection_profile on the command line.
|
|
|
|
|
|
|
|
|
|
This positional argument must be specified if any of the other
|
|
|
|
|
arguments in this group are specified.
|
|
|
|
|
|
|
|
|
|
--region=REGION
|
|
|
|
|
The Cloud region for the connection_profile.
|
|
|
|
|
|
|
|
|
|
To set the region attribute:
|
|
|
|
|
▸ provide the argument connection_profile on the command line with
|
|
|
|
|
a fully specified name;
|
|
|
|
|
▸ provide the argument --region on the command line.
|
|
|
|
|
|
2025-01-23 10:02:29 +00:00
|
|
|
FLAGS
|
|
|
|
|
--no-async
|
|
|
|
|
Waits for the operation in progress to complete before returning.
|
2024-09-11 09:52:17 +00:00
|
|
|
|
2025-03-26 10:55:24 +00:00
|
|
|
--database=DATABASE
|
|
|
|
|
The specific database within the host.
|
|
|
|
|
|
2025-01-23 10:02:29 +00:00
|
|
|
--display-name=DISPLAY_NAME
|
|
|
|
|
A user-friendly name for the connection profile. The display name can
|
|
|
|
|
include letters, numbers, spaces, and hyphens, and must start with a
|
|
|
|
|
letter.
|
2024-09-11 09:52:17 +00:00
|
|
|
|
2025-01-23 10:02:29 +00:00
|
|
|
--labels=[KEY=VALUE,...]
|
|
|
|
|
List of label KEY=VALUE pairs to add.
|
2024-09-11 09:52:17 +00:00
|
|
|
|
2025-01-23 10:02:29 +00:00
|
|
|
Keys must start with a lowercase character and contain only hyphens
|
|
|
|
|
(-), underscores (_), lowercase characters, and numbers. Values must
|
|
|
|
|
contain only hyphens (-), underscores (_), lowercase characters, and
|
|
|
|
|
numbers.
|
2024-09-11 09:52:17 +00:00
|
|
|
|
2025-01-23 10:02:29 +00:00
|
|
|
--role=ROLE
|
|
|
|
|
The role of the connection profile. ROLE must be one of: SOURCE,
|
|
|
|
|
DESTINATION.
|
2024-09-11 09:52:17 +00:00
|
|
|
|
2025-03-26 10:55:24 +00:00
|
|
|
--ca-certificate=CA_CERTIFICATE
|
|
|
|
|
x509 PEM-encoded certificate of the CA that signed the database
|
|
|
|
|
server's certificate. The value for this flag needs to be the content
|
|
|
|
|
of the certificate file, not the path to the file. For example, on a
|
|
|
|
|
Linux machine you can use command substitution:
|
|
|
|
|
<code>--ca-certificate=$(</path/to/certificate_file.pem)</code>.
|
|
|
|
|
Database Migration Service will use this certificate to verify it's
|
|
|
|
|
connecting to the correct host. Database Migration Service encrypts the
|
|
|
|
|
value when storing it.
|
|
|
|
|
|
|
|
|
|
--ssl-type=SSL_TYPE
|
|
|
|
|
The type of SSL configuration. SSL_TYPE must be one of: SERVER_ONLY,
|
|
|
|
|
REQUIRED, NONE.
|
|
|
|
|
|
2025-01-23 10:02:29 +00:00
|
|
|
At most one of these can be specified:
|
2024-09-11 09:52:17 +00:00
|
|
|
|
2024-04-03 09:23:31 +00:00
|
|
|
--gcs-bucket=GCS_BUCKET
|
|
|
|
|
Cloud Storage bucket for the source SQL Server connection profile
|
2024-05-30 09:26:18 +00:00
|
|
|
where the backups are stored. This flag is used only for SQL Server
|
|
|
|
|
to Cloud SQL migrations.
|
2024-04-03 09:23:31 +00:00
|
|
|
|
|
|
|
|
This flag argument must be specified if any of the other arguments in
|
|
|
|
|
this group are specified.
|
|
|
|
|
|
|
|
|
|
--gcs-prefix=GCS_PREFIX
|
|
|
|
|
Cloud Storage prefix path within the bucket for the source SQL Server
|
2024-05-30 09:26:18 +00:00
|
|
|
connection profile where the backups are stored. This flag is used
|
|
|
|
|
only for SQL Server to Cloud SQL migrations.
|
2024-04-03 09:23:31 +00:00
|
|
|
|
|
|
|
|
--provider=PROVIDER
|
2025-01-15 09:50:59 +00:00
|
|
|
Database provider, for managed databases. PROVIDER must be one of:
|
|
|
|
|
CLOUDSQL, RDS.
|
2024-04-03 09:23:31 +00:00
|
|
|
|
2025-03-26 10:55:24 +00:00
|
|
|
--host=HOST
|
|
|
|
|
IP or hostname of the database. When --psc-service-attachment is also
|
|
|
|
|
specified, this field value should be: 1. For Cloud SQL PSC enabled
|
|
|
|
|
instance - the dns_name field (e.g <uid>.<region>.sql.goog.). 2. For
|
|
|
|
|
Cloud SQL PSA instance (vpc peering) - the private ip of the
|
|
|
|
|
instance.
|
|
|
|
|
|
|
|
|
|
This flag argument must be specified if any of the other arguments in
|
|
|
|
|
this group are specified.
|
|
|
|
|
|
|
|
|
|
--port=PORT
|
|
|
|
|
Network port of the database.
|
|
|
|
|
|
|
|
|
|
This flag argument must be specified if any of the other arguments in
|
|
|
|
|
this group are specified.
|
|
|
|
|
|
|
|
|
|
At most one of these can be specified:
|
|
|
|
|
|
|
|
|
|
Private connection resource - Resource ID of the private connection.
|
|
|
|
|
This represents a Cloud resource. (NOTE) Some attributes are not given
|
|
|
|
|
arguments in this group but can be set in other ways.
|
|
|
|
|
|
|
|
|
|
To set the project attribute:
|
|
|
|
|
▸ provide the argument --private-connection on the command line with
|
|
|
|
|
a fully specified name;
|
|
|
|
|
▸ provide the argument --project on the command line;
|
|
|
|
|
▸ set the property core/project.
|
|
|
|
|
|
|
|
|
|
To set the region attribute:
|
|
|
|
|
▸ provide the argument --private-connection on the command line with
|
|
|
|
|
a fully specified name;
|
|
|
|
|
▸ provide the argument --region on the command line.
|
|
|
|
|
|
|
|
|
|
--private-connection=PRIVATE_CONNECTION
|
|
|
|
|
ID of the private_connection or fully qualified identifier for the
|
|
|
|
|
private_connection.
|
|
|
|
|
|
|
|
|
|
To set the private_connection attribute:
|
|
|
|
|
▫ provide the argument --private-connection on the command line.
|
|
|
|
|
|
|
|
|
|
--static-ip-connectivity
|
|
|
|
|
use static ip connectivity
|
|
|
|
|
|
|
|
|
|
--forward-ssh-hostname=FORWARD_SSH_HOSTNAME
|
|
|
|
|
Hostname for the SSH tunnel.
|
|
|
|
|
|
|
|
|
|
This flag argument must be specified if any of the other arguments in
|
|
|
|
|
this group are specified.
|
|
|
|
|
|
|
|
|
|
--forward-ssh-username=FORWARD_SSH_USERNAME
|
|
|
|
|
Username for the SSH tunnel.
|
|
|
|
|
|
|
|
|
|
This flag argument must be specified if any of the other arguments in
|
|
|
|
|
this group are specified.
|
|
|
|
|
|
|
|
|
|
--forward-ssh-port=FORWARD_SSH_PORT; default=22
|
|
|
|
|
Port for the SSH tunnel, default value is 22.
|
|
|
|
|
|
|
|
|
|
Exactly one of these must be specified:
|
|
|
|
|
|
|
|
|
|
--forward-ssh-password=FORWARD_SSH_PASSWORD
|
|
|
|
|
SSH password.
|
|
|
|
|
|
|
|
|
|
--forward-ssh-private-key=FORWARD_SSH_PRIVATE_KEY
|
|
|
|
|
SSH private key..
|
|
|
|
|
|
2025-01-23 10:02:29 +00:00
|
|
|
--username=USERNAME
|
|
|
|
|
Username that Database Migration Service uses to connect to the
|
|
|
|
|
database for metrics and observability. We highly recommend that you
|
|
|
|
|
use the sqlserver user for this. Database Migration Service encrypts
|
|
|
|
|
the value when storing it.
|
2024-04-03 09:23:31 +00:00
|
|
|
|
2025-01-23 10:02:29 +00:00
|
|
|
--cloudsql-instance=CLOUDSQL_INSTANCE
|
|
|
|
|
If the source or destination is a Cloud SQL database, then use this
|
|
|
|
|
field to provide the respective Cloud SQL instance ID.
|
2024-04-03 09:23:31 +00:00
|
|
|
|
2025-01-23 10:02:29 +00:00
|
|
|
--cloudsql-project-id=CLOUDSQL_PROJECT_ID
|
|
|
|
|
The project id of the Cloud SQL instance. Only needed if the Cloud SQL
|
|
|
|
|
instance is in a different project than the connection profile. This is
|
|
|
|
|
only supported for source connection profiles for SQL Server.
|
2024-04-03 09:23:31 +00:00
|
|
|
|
2025-01-23 10:02:29 +00:00
|
|
|
Exactly one of these must be specified:
|
2024-04-03 09:23:31 +00:00
|
|
|
|
2025-01-23 10:02:29 +00:00
|
|
|
--password=PASSWORD
|
|
|
|
|
Password for the user that Database Migration Service uses to connect
|
|
|
|
|
to the database. Database Migration Service encrypts the value when
|
|
|
|
|
storing it, and the field is not returned on request.
|
|
|
|
|
|
|
|
|
|
--prompt-for-password
|
|
|
|
|
Prompt for the password used to connect to the database.
|
2025-01-08 10:03:00 +00:00
|
|
|
|
2024-04-03 09:23:31 +00:00
|
|
|
GCLOUD WIDE FLAGS
|
|
|
|
|
These flags are available to all commands: --access-token-file, --account,
|
|
|
|
|
--billing-project, --configuration, --flags-file, --flatten, --format,
|
|
|
|
|
--help, --impersonate-service-account, --log-http, --project, --quiet,
|
|
|
|
|
--trace-token, --user-output-enabled, --verbosity.
|
|
|
|
|
|
|
|
|
|
Run $ gcloud help for details.
|