Skip to main content

database_migrations_sql_dbs

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

Overview

Namedatabase_migrations_sql_dbs
TypeResource
Idazure.data_migration.database_migrations_sql_dbs

Fields

NameDatatypeDescription
idtextfield from the properties object
nametextfield 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
sqlDbInstanceNametextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
table_listtextfield from the properties object
targetDbNametextfield from the properties object
target_database_collationtextfield from the properties object
target_sql_connectiontextfield from the properties object
typetextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, sqlDbInstanceName, subscriptionId, targetDbNameRetrieve the Database Migration resource.
create_or_updateINSERTresourceGroupName, sqlDbInstanceName, subscriptionId, targetDbNameCreate or Update Database Migration resource.
deleteDELETEresourceGroupName, sqlDbInstanceName, subscriptionId, targetDbNameDelete Database Migration resource.
cancelEXECresourceGroupName, sqlDbInstanceName, subscriptionId, targetDbNameStop on going migration for the database.

SELECT examples

Retrieve the Database Migration resource.

SELECT
id,
name,
migration_status_details,
offline_configuration,
resourceGroupName,
source_database_name,
source_server_name,
source_sql_connection,
sqlDbInstanceName,
subscriptionId,
system_data,
table_list,
targetDbName,
target_database_collation,
target_sql_connection,
type
FROM azure.data_migration.vw_database_migrations_sql_dbs
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND sqlDbInstanceName = '{{ sqlDbInstanceName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND targetDbName = '{{ targetDbName }}';

INSERT example

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

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

DELETE example

Deletes the specified database_migrations_sql_dbs resource.

/*+ delete */
DELETE FROM azure.data_migration.database_migrations_sql_dbs
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND sqlDbInstanceName = '{{ sqlDbInstanceName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND targetDbName = '{{ targetDbName }}';