在没有sql服务器代理的情况下自动运行存储过程是否可能? [英] Is it possiple to run a stored procedure automatically without sql sever Agent?

查看:136
本文介绍了在没有sql服务器代理的情况下自动运行存储过程是否可能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我正在使用MS SQL Management Studio express 2005,我需要一个存储过程来激活每日。



但是我没有SQL代理。 p>

Managemnet工作室不会每天打开,所以我无法使用启动脚本。



任何人都知道如何没有代理人吗?



提前感谢。

解决方案

你可以使用sqlcmd



http://msdn.microsoft.com/en-us/library/ms162773.aspx



然后将它放在批处理文件中,并通过Windows调度程序



以下示例

  sqlcmd -E -S localhost -q从databasename.dbo.tablename中选择count(1)

这将连接到本地机器上的sql并在数据库


中的表上执行行计数

Hello I am using MS SQL Management Studio express 2005 and I need to have a stored procedure to activate daily.

However I do not have SQL agent.

The Managemnet studio will not be opened daily so I can't use a startup script.

Anyone know how to do this without the Agent?

Thanks in advance.

解决方案

you can use sqlcmd

http://msdn.microsoft.com/en-us/library/ms162773.aspx

then have that in a batch file and scheduled via windows scheduler

example below

sqlcmd -E -S localhost -q "select count(1) from databasename.dbo.tablename"

this will connect to sql on the local machine and perform a rowcount on the table in the database

这篇关于在没有sql服务器代理的情况下自动运行存储过程是否可能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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