SQL Server Agent Job
I want to learn how to create a SQL Server Agent Job. After I googled it, I see that it can be found under Databases under Object Explorer, But I don't see that option. Can someone tell me where is it or how can i create one? I also need to understand the steps to create one. (I just have basic knowledge of SQL Server of using small queries like Update, Delete, Select statements, etc). A plain english explanation would be very helpful.
March 25th, 2015 2:47pm

On the assumption you are running SQL Server 2005 or greater; SQL Server Agent Jobs are created under the SQL Server Agent structure; this is totally separate from the Database Engine.

However if you are using something like SQL Server Express then SQL Server Agent is not an available component and as such you cannot create

Free Windows Admin Tool Kit Click here and download it now
March 25th, 2015 2:52pm

BOL: "Create a Job

This topic describes how to create a SQL Server Agent job in SQL Server 2014 by using SQL Server Management Studio, Transact-SQL, or SQL Server Management Objects (SMO)."

https://msdn.microsoft.com/en-us/library/ms190268.aspx

See SSMS image for new job:

March 25th, 2015 2:54pm

I want to learn how to create a SQL Server Agent Job. After I googled it, I see that it can be found under Databases under Object Explorer, But I don't see that option. Can someone tell me where is it or how can i create one?

Please run the below command to check SQL Server Edition.

SELECT SERVERPROPERTY('Edition') 

If it is SQL Server Express then there is no way you can see SQL Server Agent.

If it is Standard or Enterprise, then you are not granted to see SQL Agent. Login should have sysadmin or at least SQLAgentUserRole fixed D

Free Windows Admin Tool Kit Click here and download it now
March 25th, 2015 4:39pm

Adding to what Vaibhav said make sure you have sysadmin rights to create a job and see and modify others jobs.

March 25th, 2015 4:48pm

Right, if you have SQL Server Express, you can't create a job through SQL Server.  Nevertheless, you can create a batch file to run a stored procedure, and you can call the batch file using Windows Task Scheduler. 

#1)  Create a batch file

sqlcmd -E -S yoursqlinstance -i backup.sql

-E uses trusted connection, replace with -U and -P if you need to specify a SQL username and password.

#2)  Run the batch file via Windows Task Scheduler.

http://windows.microsoft.com/en-us/windows/schedule-task#1TC=windows-7

Free Windows Admin Tool Kit Click here and download it now
April 3rd, 2015 2:27pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics