自动执行每月运行的 SQL 查询

发布于 2024-09-25 06:25:39 字数 154 浏览 0 评论 0原文

我有一个简单的 SQL 查询,可以更新 SQL Express 实例上记录中的一些日期字段。

我想让它每月自动运行一次。在 SQL Server 2005 Express 中使用 Management Studio 实现此目的的最佳方法是什么?

I have a simple SQL query that updates some date fields in a record, on a SQL Express instance.

I'd like to have it run automatically every month. What is the best way of accomplishing this in SQL Server 2005 Express using the Management Studio?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

疏忽 2024-10-02 06:25:39

对于 SQL Server Express,有几种可能性。不幸的是,它们都不涉及 Management Studio:

  1. 使用 Windows 的组合
    调度程序、sqlcmd.exe 和 .bat
    文件
  2. 使用 SQL Server Service Broker
  3. 使用SQL 代理使用的 Codeplex 变体
  4. SQL 调度程序(免费
    下载)

For SQL Server Express, there are a few possibilities. Unfortunately none of them involve Management Studio:

  1. Use a combination of Windows
    Scheduler, sqlcmd.exe, and .bat
    files
  2. Use SQL Server Service Broker
  3. Use a Codeplex variation of SQL Agent
  4. Use SQL Scheduler (free
    download)
梦里的微风 2024-10-02 06:25:39

在 Sql Agent 中创建具有每月计划的作业,并使用此查询为其分配 T-Sql 任务。

Create a job with monthly schedule in Sql Agent and assign a T-Sql task to it with this query.

○闲身 2024-10-02 06:25:39

您可以使用 sqlcmd.exe 使用 bat 文件连接到 sql express,然后在 Windows 调度程序中设置该 bat 文件以在所需的时间间隔运行它。

you can make use of bat file to connect to your sql express using sqlcmd.exe and then set that bat file in windows scheduler to run it at desired time of interval.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文