Skip to main content

restore_points

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

Overview

Namerestore_points
TypeResource
Idazure.sql.restore_points

Fields

NameDatatypeDescription
databaseNametextfield from the properties object
earliest_restore_datetextfield from the properties object
locationtextResource location.
resourceGroupNametextfield from the properties object
restorePointNametextfield from the properties object
restore_point_creation_datetextfield from the properties object
restore_point_labeltextfield from the properties object
restore_point_typetextfield from the properties object
serverNametextfield from the properties object
subscriptionIdtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTdatabaseName, resourceGroupName, restorePointName, serverName, subscriptionIdGets a restore point.
list_by_databaseSELECTdatabaseName, resourceGroupName, serverName, subscriptionIdGets a list of database restore points.
createINSERTdatabaseName, resourceGroupName, serverName, subscriptionId, data__restorePointLabelCreates a restore point for a data warehouse.
deleteDELETEdatabaseName, resourceGroupName, restorePointName, serverName, subscriptionIdDeletes a restore point.

SELECT examples

Gets a list of database restore points.

SELECT
databaseName,
earliest_restore_date,
location,
resourceGroupName,
restorePointName,
restore_point_creation_date,
restore_point_label,
restore_point_type,
serverName,
subscriptionId
FROM azure.sql.vw_restore_points
WHERE databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.sql.restore_points (
databaseName,
resourceGroupName,
serverName,
subscriptionId,
data__restorePointLabel,
restorePointLabel
)
SELECT
'{{ databaseName }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ data__restorePointLabel }}',
'{{ restorePointLabel }}'
;

DELETE example

Deletes the specified restore_points resource.

/*+ delete */
DELETE FROM azure.sql.restore_points
WHERE databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND restorePointName = '{{ restorePointName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';