0

I am using a SQL Server 2008 database. I have these SQL query:

update CommonMst set CTypeValue='107' where CommonType='Current OrderNo'

I need to create batch file to execute this query every month's 1st date using schedule. How can i get this?

Purvesh Desai
  • 1,797
  • 2
  • 15
  • 39

2 Answers2

0

You can create SQL Schedule job to run this every 1st of each month.

Steps to schedule a job. Check this URL.

Note: In order to keep this task running on every first of the month, you need to be sure that SQL Server Agent is running.

Paresh J
  • 2,401
  • 3
  • 24
  • 31
0

As above said, you need to set schedule for timing in Sql-Jobs via sqlserver agent.

But you need the above version of Sqlserver express. Express version does not have this feature.

http://msdn.microsoft.com/en-IN/library/ms187910.aspx

How do I create a step in my SQL Server Agent Job which will run my SSIS package?

http://technet.microsoft.com/en-us/library/ms190223%28v=sql.110%29.aspx

Community
  • 1
  • 1
Ajay2707
  • 5,690
  • 6
  • 40
  • 58