Using Console
Using CLI
<resource-group-name>
, <server-name>
, <database-name>
and <number-of-days>
with the appropriate values for your environment.
For example, if you want to set the retention period to 30 days for a database named “mydatabase” on a server named “myserver” in a resource group named “myresourcegroup”, you would run the following command:
Using Python
azure-mgmt-monitor
and azure-common
Python packages. You can do this using the following command:
ServicePrincipalCredentials
class from the azure.common.credentials
package. You will need to provide your AZURE subscription ID, client ID, client secret, and tenant ID. Here’s an example:
MonitorManagementClient
class from the azure.mgmt.monitor
package to update the threat detection retention period for your SQL Servers. You will need to provide the name of your AZURE resource group, the name of your SQL Server, and the new retention period in days. Here’s an example: