https://pulumi.com logo
#dotnet
Title
# dotnet
c

clever-addition-88333

06/12/2023, 7:04 AM
Hi. I need to set the "create Index" to off in the Automatic tuning tab of my sql Db ( the automatic index disturbing the performance of the database). How to do that with pulumi?
e

echoing-dinner-19531

06/12/2023, 9:41 AM
sql db on which provider? There's probably a resource property, but can't go look at docs unless we know what sql resource your using.
c

clever-addition-88333

06/12/2023, 10:33 AM
We use sql server in azure
I would like to turn off the createindex in the red frame:
With pulumi on db create
e

echoing-dinner-19531

06/12/2023, 10:50 AM
I think you can do this with azure-native and the DatabaseAdvisor resource: https://www.pulumi.com/registry/packages/azure-native/api-docs/sql/databaseadvisor/ I don't think it supported for the old azure provider.
c

clever-addition-88333

06/12/2023, 10:55 AM
Thanks, I will try it out.
yes. The Databaseadvisor did the work. Thank you 🙂 - Example:
Copy code
var databaseAdvisor = new AzureNative.Sql.DatabaseAdvisor("sqlDatabaseAdvisor", new AzureNative.Sql.DatabaseAdvisorArgs
        {
            ResourceGroupName = resourceGroup.Name,
            ServerName = server.Name,
            DatabaseName = database.Name,
            AdvisorName = "CreateIndex",
            AutoExecuteStatus = AzureNative.Sql.AutoExecuteStatus.Disabled,
        });
2 Views