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
0
votes
2 answers

Is there a mechanism in SQL Server Agent that can send alert notification if a Job does not complete by a cut-off time?

A job usually completes in an hour. But sometimes, it takes longer or gets stuck. Is there a way to configure a notification in SQL Server Agent if the job does not complete in 1 hour ?
anonxen
  • 794
  • 1
  • 8
  • 24
0
votes
1 answer

Send an email to current user in SQL Server Agent job when job fails

I have a SQL Job where I want to send an email alert if job fails. I know that for this functionalty I have to Configure Database Mail and than Adjust the properties within the SQL Server Agent. This article gives pretty good detail…
GThree
  • 2,708
  • 7
  • 34
  • 67
0
votes
1 answer

SSIS task succeeding but SQL Agent reporting failure

The SQL Agent job is returning DTSER_COMPLETION (2) after running an SSIS package. The task of SSIS is completing correctly but is showing many of the following errors: ......Removing this unused output column can increase Data Flow task…
markum
  • 119
  • 2
  • 8
0
votes
1 answer

Do Not Execute another SQL Server Agent Job unless the other finishes the execution properly

My requirement is to run SSIS package from SQL Server agent job, I have 3 SSIS packages 2 packages loading the data to SQL Table and 3rd package processing the cube. I have created a 2 SQL Server Agent Job, one to run the package which is loading…
BIDeveloper
  • 767
  • 3
  • 14
  • 28
0
votes
1 answer

SSIS Package run from SQL Server Agent Job no longer do Logging

I Have a package stored in SQL Server which works properly with logging when I run it directly by right-clicking it in SQL Server, with logging. Logging is set to 'SSIS log provider for Text File'. When I run it from an SQL Server Agent Job, it…
moi_meme
  • 9,180
  • 4
  • 44
  • 63
0
votes
0 answers

Creating a SQL server agent job via C# throws an "permission was denied on the object 'sp_add_operator' error

I am trying to create a SQL Server Agent job from simple windows console application but I'm receiving an The EXECUTE permission was denied on the object 'sp_add_operator', database 'msdb', schema 'dbo'. error. Steps are, define & create operator,…
GThree
  • 2,708
  • 7
  • 34
  • 67
0
votes
0 answers

Scheduled jobs didn't trigger as per the daily schedule

My production environment is set up to run jobs on a daily basis and they have been running as per the schedule for years. Today they did not trigger, and I don't know what the reason could be. I found recommendations online to go through SQL…
Deepak
  • 103
  • 2
  • 3
  • 11
0
votes
0 answers

Changing proxy account to run Scheduled SQL Server Agent Job

I have to update new account to run SQL Server Agent job. This job is running under users account and his password will expire. That user no longer associated with company. I have created new login, I have also created new credentials. also mapped…
supritshah1289
  • 839
  • 8
  • 15
0
votes
1 answer

Issue with SQL Server Credential mapped to Network Service account

On SQL Server 2008 R2 Standard Edition, I created a credential TestCredential with identity as NT AUTHORITY\NETWORK SERVICE as explained here. Then I followed this article to create a proxy account and a SQL server job using that proxy account. But…
nam
  • 21,967
  • 37
  • 158
  • 332
0
votes
0 answers

SQL Server Job - how to generate script for Alert System Settings

In our SQL Server 2008 Agent properties dialog box we have set an Alert System settings as shown below. But when we try to generate a script for that we get the following message - hence unable to generate a T-SQL script. Is there a T-SQL script or…
nam
  • 21,967
  • 37
  • 158
  • 332
0
votes
1 answer

How to use SQL Server agent to run a Powershell command to generate a CSV file?

I have a PowerShell command like this: Search-ADAccount -AccountDisabled -UsersOnly | FT Name > C:\Users\hou\Downloads\DisabledAccount.csv This command can grab all disabled account names from AD and put it into a .CSV file. I want to set up…
Jack
  • 281
  • 1
  • 3
  • 17
0
votes
0 answers

SOAP web service call within SSIS Script task failing when ran from SQL server Agent

I have a SSIS 2008 script task. I have added a Web Reference to a SOAP webservice on the script editor and have the following code to instantiate the service and call a method MyWebService.Service ox = new MyWebService.Service(); string…
nonojojo
  • 13
  • 5
0
votes
1 answer

How to increase data retrieval capacity of SQL Server Agent 2005

I got a stored proc to retrieve XML data from web service It works as I expected. After test for a while, I want to use this stored proc as SCHEDULED JOB then I created new one with T-SQL 'EXEC sp_GetData;' and got failed results (error 9400). I…
SweNz
  • 53
  • 6
0
votes
1 answer

SQL Server Agent error - Connection "DatabaseName" is not found?

Some modifications were made to an SSIS package and I can't seem to figure out what is wrong. The SQL server agent job which involves execution of one of these packages was running fine until a couple of days ago. The error I am seeing is…
molecule
  • 93
  • 1
  • 2
  • 8
0
votes
1 answer

Steps to export the SQL Server returned result set to an Excel file

I have a stored procedure that I am going to run every weekend, it produces a result set that I need to export into an Excel file. For the above problem I want to automate this process, so I am going to create a SQL Job and I am going to run this…
RaviKumar
  • 13
  • 3