如何在微软的Azure截断SQL数据库定期 [英] How to truncate SQL database on Microsoft Azure periodically

查看:165
本文介绍了如何在微软的Azure截断SQL数据库定期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对微软Azure上运行SQL数据库。以$ P $变得过于大pventing吧,我一定要定期截断它(例如,一两天)。
截断表XXX 是我需要执行的SQL。

I have a SQL database running on Microsoft Azure. To preventing it from getting too big, I have to truncate it periodically (e.g., a day or two). truncate table xxx is the SQL that I need to execute.

那么,什么是实现这一目标的最简单的方法?我preFER没有写任何C#code,除非我必须这样做。我可以用它连续运行截断SQL语句中的网络工作?或者,我可以使用Azure的SQL数据库的内置功能来实现这一目标?谢谢!

So what is the easiest way to achieve this? I prefer not writing any C# code unless I have to do so. Can I use a web job which continuously running a truncate SQL statement? Or can I use a built-in functionality of SQL database on the Azure to achieve this? Thanks!

推荐答案

SQL Azure中还没有任何形式的SQL代理功能,所以你必须创建一个Web作业(或一些JavaScript的执行您需要执行的SQL ),然后使用Azure的计划来安排工作。

SQL Azure does not yet have any sort of SQL Agent functionality so you'll have to create a web job (or some JavaScript that executes the SQL you need executed) and then use Azure Scheduler to schedule the job.

您还可以使用Azure的自动化,涉及PowerShell来做到同样的事情。

You can also use Azure Automation that involves Powershell to do the same thing.

这篇关于如何在微软的Azure截断SQL数据库定期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆