Questions tagged [sql-server-agent]

SQL Server Agent is a Microsoft Windows service that executes scheduled administrative tasks, which are called jobs. SQL Server Agent uses SQL Server to store job information. Jobs contain one or more job steps. Each step contains its own task, for example, backing up a database. SQL Server Agent can run a job on a schedule, in response to a specific event, or on demand.

From Microsoft.com:

SQL Server Agent is a Microsoft Windows service that executes scheduled administrative tasks, which are called jobs. SQL Server Agent uses SQL Server to store job information. Jobs contain one or more job steps. Each step contains its own task, for example, backing up a database. SQL Server Agent can run a job on a schedule, in response to a specific event, or on demand.

483 questions
78
votes
3 answers

Will a SQL Server Job skip a scheduled run if it is already running?

If you schedule a SQL Server job to run every X number of minutes, and it does not finish the previous call before the # of minutes is up, will it skip the run since it is already running, or will it run two instances of the job doing the same…
Sam Schutte
  • 6,666
  • 6
  • 44
  • 54
68
votes
3 answers

SQL Server Agent Job - Exists then Drop?

How can I drop sql server agent jobs, if (and only if) it exists? This is a well functioning script for stored procedures. How can I do the same to sql server agent jobs? if exists (select * from dbo.sysobjects where id =…
madcolor
  • 8,105
  • 11
  • 51
  • 74
51
votes
7 answers

Cannot bulk load because the file could not be opened. Operating System Error Code 3

I'm trying to set up a Stored Procedure as a SQL Server Agent Job and it's giving me the following error, Cannot bulk load because the file "P:\file.csv" could not be opened. Operating system error code 3(failed to retrieve text for this error.…
user1345260
  • 2,151
  • 12
  • 33
  • 42
46
votes
1 answer

SQL 2008 SQL Server Agents Jobs, how to populate email for Notifications

I am trying to add my email address to notifications for SQL Server Agent Job when it fails.. So I go SQL Server agent, open up the jobs, right click on the job and select properties and then notifications. I can check email there and have to select…
StevieB
  • 6,263
  • 38
  • 108
  • 193
44
votes
2 answers

How do I execute a stored procedure in a SQL Agent job?

I am using SQL Server 2008 and I need to run a SQL Job from SQL Server Agent. I am new to SQL Server Job and I want to execute a stored procedure regularly from a SQL Server Job. But I did not find where to specify the executed stored procedure…
George2
  • 44,761
  • 110
  • 317
  • 455
43
votes
9 answers

Could not obtain information about Windows NT group user

I am creating a SQL Server Replication using a script. When I try to execute The job failed. Unable to determine if the owner (STAR\moorer7) of job L3BPT2M-Atlas-14 has server access (reason: Could not obtain information about Windows NT…
Raj More
  • 47,048
  • 33
  • 131
  • 198
37
votes
7 answers

SQL Server Agent Job Notify multiple operators on failure

I have a Job setup in SQL Server 2008 which sends a notification email to one operator when the job fails. Question: Is it possible to setup a notification email being sent to multiple operators for that specific job? I believe a possible…
Mike
  • 8,137
  • 6
  • 28
  • 46
31
votes
2 answers

Enable/Disable Sql Server Agent using a t-sql script

Is it possible to enable or disable the sql server agent using t-sql?
Jill
  • 473
  • 3
  • 7
  • 15
20
votes
5 answers

SQL Server Agent Jobs: How to execute a job step without executing the entire job

I have a SQL Server Agent Job that previously had two steps. Today, I've had to integrate the third step, and soon I'll need to integrate a fourth. I want to be sure that the step will execute properly but I do not want to execute the entire…
RLH
  • 15,230
  • 22
  • 98
  • 182
19
votes
4 answers

"The specified '@notify_email_operator_name' is invalid" error

I have a scripted SQL Server Agent job I'm trying to transfer over to my local database from a server, but I receive this error message: Msg 14234, Level 16, State 1, Procedure sp_verify_job, Line 243 The specified '@notify_email_operator_name' is…
broke
  • 8,032
  • 16
  • 54
  • 83
19
votes
1 answer

SQL Server Agent not running

None of the SQL Jobs on my server are running. I've looked into this and got the message: SQLServerAgent is not currently running so it cannot be notified of this action How can I get SQL Server Agent to start running on SQL Server 2008?
Curtis
  • 101,612
  • 66
  • 270
  • 352
19
votes
7 answers

Notify Operator if ANY step in job fails

Can I (How do I) configure Sql Server 2008 to notify an operator if any step in the Job fails? I have a Sql Server job with several steps to update data from multiple different sources, followed by one final step which performs several calculations…
18
votes
1 answer

Can't start sql server Agent

I want to start the SQL Server Agent (sql server 2008 R2 Enterprise edition), then I did: Open SQL Server configuration manager. SQL Server services. Right click on sql server agent. but when I right click the start item is disable.
SajjadZare
  • 2,487
  • 4
  • 38
  • 68
18
votes
1 answer

SQL Server: should I use an "Agent Job" or a "Maintenance Plan" to delete old data?

I'm looking for a way to periodically (e.g. weekly) run some SQL statements in a database to delete old data. As far as I can see, there are (at least) two ways to do this: using a "Maintenance Plan" and a "Execute T-SQL Statement Task" using an…
M4N
  • 94,805
  • 45
  • 217
  • 260
15
votes
2 answers

SQL Server Agent Job Timeout

I have just had a scheduled SQL Server job run for longer than normal, and I could really have done with having set a timeout to stop it after a certain length of time. I might be being a bit blind on this, but I can't seem to find a way of setting…
Iain Hoult
  • 3,889
  • 5
  • 25
  • 39
1
2 3
32 33