Skip to main content

sql_sites_controllers

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

Overview

Namesql_sites_controllers
TypeResource
Idazure.migrate.sql_sites_controllers

Fields

NameDatatypeDescription
discovery_scenariotextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
service_endpointtextfield from the properties object
siteNametextfield from the properties object
site_appliance_properties_collectiontextfield from the properties object
sqlSiteNametextfield from the properties object
subscriptionIdtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, siteName, sqlSiteName, subscriptionIdMethod to get a site.
list_by_master_siteSELECTresourceGroupName, siteName, subscriptionIdMethod to get all sites.
createINSERTresourceGroupName, siteName, sqlSiteName, subscriptionIdMethod to create a SQL site.
deleteDELETEresourceGroupName, siteName, sqlSiteName, subscriptionIdDeletes the SQL site.
updateUPDATEresourceGroupName, siteName, sqlSiteName, subscriptionIdMethod to update an existing site.
error_summaryEXECresourceGroupName, siteName, sqlSiteName, subscriptionIdMethod to get error summary from SQL site.
export_sql_server_errorsEXECresourceGroupName, siteName, sqlSiteName, subscriptionIdMethod to generate report containing SQL servers.
export_sql_serversEXECresourceGroupName, siteName, sqlSiteName, subscriptionIdMethod to generate report containing SQL servers.
refreshEXECresourceGroupName, siteName, sqlSiteName, subscriptionIdMethod to refresh a site.
summaryEXECresourceGroupName, siteName, sqlSiteName, subscriptionIdMethod to get site usage/summary.

SELECT examples

Method to get all sites.

SELECT
discovery_scenario,
provisioning_state,
resourceGroupName,
service_endpoint,
siteName,
site_appliance_properties_collection,
sqlSiteName,
subscriptionId
FROM azure.migrate.vw_sql_sites_controllers
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND siteName = '{{ siteName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.migrate.sql_sites_controllers (
resourceGroupName,
siteName,
sqlSiteName,
subscriptionId,
properties
)
SELECT
'{{ resourceGroupName }}',
'{{ siteName }}',
'{{ sqlSiteName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

UPDATE example

Updates a sql_sites_controllers resource.

/*+ update */
UPDATE azure.migrate.sql_sites_controllers
SET
properties = '{{ properties }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND siteName = '{{ siteName }}'
AND sqlSiteName = '{{ sqlSiteName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified sql_sites_controllers resource.

/*+ delete */
DELETE FROM azure.migrate.sql_sites_controllers
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND siteName = '{{ siteName }}'
AND sqlSiteName = '{{ sqlSiteName }}'
AND subscriptionId = '{{ subscriptionId }}';