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
12
votes
4 answers

Problem using SQL Agent to run SSIS Packages - fails with "DTSER_FAILURE(1)"

I have an SSIS Package stored in the MSDB database which works fine when I execute it. It will run under SA account or will use Windows security. I want to schedule this job to run with SQL Agent, but when I do I get a strange error and whatever…
Phil
  • 265
  • 2
  • 4
  • 11
11
votes
1 answer

Executing the same SSIS Package with different parameters at different time

I have a SSIS package running at 8 PM in the evening for the Year 2011. I would like to run the same package at 8:30 PM for the Year 2010. I made a SSIS Package configuration file and accept the "Year" as a parameter. Whenever I run, I need to open…
TTCG
  • 8,805
  • 31
  • 93
  • 141
11
votes
7 answers

Get date of last successful job run?

I have a single step job that executes a stored procedure. I would like get the date of the last successful job execution time so that I can just update a delta instead of the whole set of data. Right now I have the job setup to run once every day,…
David
  • 19,389
  • 12
  • 63
  • 87
10
votes
3 answers

How to accurately detect if a SQL Server job is running and deal with the job already running?

I'm currently using code like this to detect if a SQL server job is running. (this is SQL Server 2005, all SP's) return (select isnull( (select top 1 CASE WHEN current_execution_status = 4 THEN 0 ELSE 1 END from openquery(devtestvm,…
DarinH
  • 4,868
  • 2
  • 22
  • 32
10
votes
2 answers

Can you run an SSIS task from .net?

I have scheduled sql agent task which runs an SSIS package. I want to be able to run the SSIS package from .net. Is there a way to either run the SSIS package directly or at least run the SQL agent task which would in turn run the SSIS package. If…
ArchieVersace
  • 203
  • 2
  • 6
10
votes
2 answers

How to backup SQL Server Agent jobs?

How can I backup and restore SQL Server 2005 Agent job schedules?
Firas Assaad
  • 25,006
  • 16
  • 61
  • 78
9
votes
3 answers

The SELECT permission was denied on the object 'sysjobs', database 'msdb', schema 'dbo'

I'm getting the following error when trying to read a SQL Job. The SELECT permission was denied on the object 'sysjobs', database 'msdb', schema 'dbo' How can I fix this?
Curtis
  • 101,612
  • 66
  • 270
  • 352
9
votes
1 answer

How to Prevent Sql Server Jobs to Run simultaneously

I have some scheduled jobs in my SQL Agent: Job1, executing every 2 minutes Job2, executing every 10 minutes Job3, executing every 15 minutes As you can see, multiple jobs can run simultaneously. When these jobs do run simultaneously, it is…
ehsan
  • 787
  • 3
  • 13
  • 26
9
votes
6 answers

How to monitor SQL Server Agent Job info in C#

I need to create an application for monitoring SQL Server 2000 Agent Job status and info when Job occur same as show on Windows application event log. Now I connect to the database already via a connection string, but I don't know how to get the…
Fernatit
  • 179
  • 1
  • 3
  • 12
9
votes
3 answers

Where does SQL Server Agent save jobs?

My server is down and I can only get the harddisk from it. I found my database and copied it but where I can find agent jobs? Where are they saved?
Std_Net
  • 1,076
  • 3
  • 12
  • 25
8
votes
2 answers

Are end dates for sql server job schedules inclusive or exclusive

I have a schedule that does something daily, every two hours in a time interval. I want to set an end date for this schedule, but I'm wondering if it is inclusive or exclusive. In other words, if I set the end date at march 26, will today be the…
Martijn
  • 11,964
  • 12
  • 50
  • 96
8
votes
6 answers

The proper way to disable/enable SQLServer Agent Jobs

I have a number of SQLServer agent scheduled jobs, one of them performs a full database backup. I want to disable some other jobs when backup begins and re-enable them once backup is done. What is the right way to do so? I was thinking about adding…
a1ex07
  • 36,826
  • 12
  • 90
  • 103
8
votes
4 answers

The MSSQLSERVER service on Local Computer started and then stopped. Some services stop automatically

I have created one sample of node js . But when I start the application is going to connection of sql server then not give response by sql server. When i going in service panel and start sql server agent then give blow error.... This service on…
surendra Kandira
  • 587
  • 2
  • 5
  • 22
8
votes
2 answers

The Messenger service has not been started - NetSend notifications will not be sent

In my SQL Server agent, I did not set any notifications, then why this error is coming? I run pakg through dtsexec it executes successfully, and also I run a simple job for inserting record it runs successfully, but when in job step I select file…
user1222614
  • 91
  • 1
  • 1
  • 3
7
votes
2 answers

How enable SQL Server Agent in docker container existing

I have a running SQL Server image on Docker, however I need to enable SQL Server Agent to run some jobs, but I have not succeeded. The main problem is that the container has quite a few databases and settings that need to be maintained. The command…
1
2
3
32 33