database_migrations_sql_dbs
Creates, updates, deletes, gets or lists a database_migrations_sql_dbs
resource.
Overview
Name | database_migrations_sql_dbs |
Type | Resource |
Id | azure.data_migration.database_migrations_sql_dbs |
Fields
- vw_database_migrations_sql_dbs
- database_migrations_sql_dbs
Name | Datatype | Description |
---|---|---|
id | text | field from the properties object |
name | text | field from the properties object |
migration_status_details | text | field from the properties object |
offline_configuration | text | field from the properties object |
resourceGroupName | text | field from the properties object |
source_database_name | text | field from the properties object |
source_server_name | text | field from the properties object |
source_sql_connection | text | field from the properties object |
sqlDbInstanceName | text | field from the properties object |
subscriptionId | text | field from the properties object |
system_data | text | field from the properties object |
table_list | text | field from the properties object |
targetDbName | text | field from the properties object |
target_database_collation | text | field from the properties object |
target_sql_connection | text | field from the properties object |
type | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
id | string | |
name | string | |
properties | object | Database Migration Resource properties for SQL database. |
systemData | object | |
type | string |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | resourceGroupName, sqlDbInstanceName, subscriptionId, targetDbName | Retrieve the Database Migration resource. |
create_or_update | INSERT | resourceGroupName, sqlDbInstanceName, subscriptionId, targetDbName | Create or Update Database Migration resource. |
delete | DELETE | resourceGroupName, sqlDbInstanceName, subscriptionId, targetDbName | Delete Database Migration resource. |
cancel | EXEC | resourceGroupName, sqlDbInstanceName, subscriptionId, targetDbName | Stop on going migration for the database. |
SELECT
examples
Retrieve the Database Migration resource.
- vw_database_migrations_sql_dbs
- database_migrations_sql_dbs
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 }}';
SELECT
id,
name,
properties,
systemData,
type
FROM azure.data_migration.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.data_migration.database_migrations_sql_dbs (
resourceGroupName,
sqlDbInstanceName,
subscriptionId,
targetDbName,
properties
)
SELECT
'{{ resourceGroupName }}',
'{{ sqlDbInstanceName }}',
'{{ subscriptionId }}',
'{{ targetDbName }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: systemData
value:
- name: createdBy
value: string
- name: createdByType
value: string
- name: createdAt
value: string
- name: lastModifiedBy
value: string
- name: lastModifiedByType
value: string
- name: lastModifiedAt
value: string
- name: properties
value:
- name: sourceSqlConnection
value:
- name: dataSource
value: string
- name: authentication
value: string
- name: userName
value: string
- name: password
value: string
- name: encryptConnection
value: boolean
- name: trustServerCertificate
value: boolean
- name: sourceDatabaseName
value: string
- name: sourceServerName
value: string
- name: targetDatabaseCollation
value: string
- name: migrationStatusDetails
value:
- name: migrationState
value: string
- name: sqlDataCopyErrors
value:
- string
- name: listOfCopyProgressDetails
value:
- - name: tableName
value: string
- name: status
value: string
- name: parallelCopyType
value: string
- name: usedParallelCopies
value: integer
- name: dataRead
value: integer
- name: dataWritten
value: integer
- name: rowsRead
value: integer
- name: rowsCopied
value: integer
- name: copyStart
value: string
- name: copyThroughput
value: number
- name: copyDuration
value: integer
- name: offlineConfiguration
value:
- name: offline
value: boolean
- name: tableList
value:
- string
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 }}';