Skip to main content

database_migrations_sql_vms

Creates, updates, deletes, gets or lists a database_migrations_sql_vms resource.

Overview

Namedatabase_migrations_sql_vms
TypeResource
Idazure.data_migration.database_migrations_sql_vms

Fields

NameDatatypeDescription
idtextfield from the properties object
nametextfield from the properties object
backup_configurationtextfield from the properties object
migration_status_detailstextfield from the properties object
offline_configurationtextfield from the properties object
resourceGroupNametextfield from the properties object
source_database_nametextfield from the properties object
source_server_nametextfield from the properties object
source_sql_connectiontextfield from the properties object
sqlVirtualMachineNametextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
targetDbNametextfield from the properties object
target_database_collationtextfield from the properties object
typetextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, sqlVirtualMachineName, subscriptionId, targetDbNameRetrieve the specified database migration for a given SQL VM.
create_or_updateINSERTresourceGroupName, sqlVirtualMachineName, subscriptionId, targetDbNameCreate a new database migration to a given SQL VM.
cancelEXECresourceGroupName, sqlVirtualMachineName, subscriptionId, targetDbNameStop in-progress database migration to SQL VM.
cutoverEXECresourceGroupName, sqlVirtualMachineName, subscriptionId, targetDbNameInitiate cutover for in-progress online database migration to SQL VM.

SELECT examples

Retrieve the specified database migration for a given SQL VM.

SELECT
id,
name,
backup_configuration,
migration_status_details,
offline_configuration,
resourceGroupName,
source_database_name,
source_server_name,
source_sql_connection,
sqlVirtualMachineName,
subscriptionId,
system_data,
targetDbName,
target_database_collation,
type
FROM azure.data_migration.vw_database_migrations_sql_vms
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND sqlVirtualMachineName = '{{ sqlVirtualMachineName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND targetDbName = '{{ targetDbName }}';

INSERT example

Use the following StackQL query and manifest file to create a new database_migrations_sql_vms resource.

/*+ create */
INSERT INTO azure.data_migration.database_migrations_sql_vms (
resourceGroupName,
sqlVirtualMachineName,
subscriptionId,
targetDbName,
properties
)
SELECT
'{{ resourceGroupName }}',
'{{ sqlVirtualMachineName }}',
'{{ subscriptionId }}',
'{{ targetDbName }}',
'{{ properties }}'
;