Dakota Kincer
Dakota Kincer

Reputation: 448

Azure SQL maintenance

Im currently working with a quickly growing Azure SQL database. As I've read here and Microsoft docs that there is no SQL Server Agent to schedule tasks such as rebuilding indexes. My question is what is the best practice for setting up some sort of maintenance and whats the best way to rebuild the indexes without pegging the DB or making the table unavailable? Rebuilding indexes on some of these tables are freeing 5 - 30GBS of space depending on size, but taking the table offline.

Upvotes: 1

Views: 724

Answers (2)

franzo
franzo

Reputation: 1469

Another option is to use an Azure Automation Runbook, as discussed here:

Azure Automation: Automate Azure SQL Database indexes and statistics maintenance

Upvotes: 0

TheGameiswar
TheGameiswar

Reputation: 28890

you can use Elastic Database jobs.

below is what elastic jobs does

Elastic Database jobs is currently a customer-hosted Azure Cloud Service that enables the execution of ad-hoc and scheduled administrative tasks, which are called jobs. With jobs, you can easily and reliably manage large groups of Azure SQL Databases by running Transact-SQL scripts to perform administrative operations.

below are the links which can help you in getting started

https://learn.microsoft.com/en-us/azure/sql-database/sql-database-elastic-jobs-service-installation

You also can create linked servers to azure and do these administrative tasks

https://stackoverflow.com/a/41145784/2975396

Upvotes: 3

Related Questions