Azure SQL maintenance

人盡茶涼 提交于 2019-12-24 07:38:23

问题


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.


回答1:


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://docs.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



来源:https://stackoverflow.com/questions/42762616/azure-sql-maintenance

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!