sql server 2008 - execute script automatically at 2:00 a.m? -


Text after "

I get executed every day in this process 2:00 a.m. Besides, I want to pass the date parameter for the process. Suppose today is July 28, 2010, so I am for the 27th of July, 2:00 process. In this way, I want to record all records that are inserted at 2:00 p.m. after 27th July in any other table. This is my process. Go to

  Alter process set GO set on spBackupRows QUOTED_IDENTIFIER (@date datetime) set as ANSI_NULLS declared @ItemId integer, @ItemName varchar (100), @Description varchar (50), @ ItemCreatedDateTime declares my cursor cursor for datetime declaration * tblItems where ItemCreatedDateTime & gt; @date Open myCursor Next check myCursor @ itemid, @ ITEMNAME, @ Description, @ ItemCreatedDateTime while @@ FETCH_STATUS = 0 check tblBackUpData (Itemid, ITEMNAME, Description, ItemCreatedDateTime) Enter Value (@ Itemid, @ ITEMNAME, @ Description, @ItemCreatedDateTime) @ itemId, @ itemName, @ from my concert, close @ itemcreatedDateTime end, end my consonor end my cursor  

My problem is that I would like to process this process How do I automatically? And also passed the date parameter for the process

thanks in advance :)

  1. In Object Explorer, connect an instance of the SQL Server database engine, and then expand that instance.
  2. Expand SQL Server Agent, Expand Jobs, Right-click Work You want to schedule, and click Properties.
  3. Select the Schedules page, and then click New in the Name box.
  4. , type a name for the new schedule
  5. Clear the active check box if you do not want to be effective immediately after the schedule is created.
  6. For the schedule type, select one of the following:

    • Automate SQL Server Agent starts when SQL Server Agent starts to start the job Click Start in the form.
    • Whenever CPUs become inactive, click Start, start the job when the CPU reaches a passive state.
    • If you want to use recurring click repeatedly to set a program recurring schedule, complete the frequency, daily frequency and duration group on the dialog.
    • Click once to set the schedule once you want to run the schedule only, complete the one-time event group on the dialog.

Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -