且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何自动更新数据库.

更新时间:2023-02-08 17:34:24

您需要为操作创建一个Store Proc.然后在您的SQL Server数据库中创建一个计划作业.然后设置计划时间"以在此时间后运行Store Proc,并将"Store Proc to Schedule"命令设置为
. 说明:
打开您的服务器的SQL Server企业管理器.依次展开管理,SQL Server代理,然后单击作业.右键单击它,然后选择新建作业.您将获得一个屏幕,您可以在其中安排各种SQL Server命令,包括运行SQL代码.对于该过程,创建一个Transact SQL Script类型的新步骤,然后键入该过程的名称...
You need to create a Store Proc for your operation. Then Create a Schedule Job in your SQL Server database. Then set Schedule time to run your Store Proc after that time and set your Store Proc to Schedule command.
Instruction:
Open the SQL Server Enterprise manager for your server. Expand Management, then SQL Server agent and then click Jobs. Right-click it and choose New Job. You get a screen where you can schedule various SQL Server commands, including running SQL code. For the procedure, create a new step of type Transact SQL Script and type the name of the procedure...