Рет қаралды 3,911
Step 1: Setting the with right subscription
Set-AzContext -subscription yoursubscriptionid
Step2:To check the events
get-AzSqlDatabaseAudit -ResourceGroupName "urresorucegroupname" -ServerName "ursqlservername" -DatabaseName "urdbname"
Step3:Configure audit on selected events.
Set-AzSqlDatabaseAudit -ResourceGroupName test -ServerName testdemo07 -DatabaseName test -BlobStorageTargetState Enabled -StorageAccountResourceId "/subscriptions/aa9b3e61-1d08-430e-9e19-3ebd6e25bb2/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/testingtest123" -RetentionInDay 10 -PredicateExpression "statement like 'INSERT%' or statement like 'select%'"