SQL Server Agent is a Windows service installed with the SQL Server Standard Edition and above. It provides an automated way of executing or performing administrative task against a SQL Server instance. SQL Server Agent is a tool that every DBA should become familiar with and utilize to its full ...

learn more… | top users | synonyms

1
vote
0answers
32 views

Good SQL Agent job wrapper… TRY/CATCH, Custom logging. (Review and provide input)

I'm looking for input on a small snippet of code i wrote. We use SQL Agent jobs to prepare big databases from production, before we ship the to test-environments. To get better feel for duration of ...
1
vote
0answers
52 views

SQL 2008 R2 Agent stopping sp_who2 running and can't view database or Agent properties

We're experiencing an unusual issue with SQL 2008 R2 SP2 (10.50.4297) where the SQL Agent had stopped but would not restart (this has been fine for months). After investigating the issue we had to ...
1
vote
1answer
23 views

Why do you have to execute a full backup after a new database for trans backup jobs to run [closed]

Playing around on my local sql server at home after an issue occurred at work. We have full backup jobs scheduled on Mondays only. I created a DB on Tuesday (when doffs and trans are scheduled). ...
1
vote
0answers
97 views

How to check particular SQL UserID windows permissions in MS SQL SERVER 2012?

I would like to say as per my network system administrative security of windows Server 2012 R2. I am unable to start SQL Server agent. As per in MS SQL Server 2012 , i have "sysadmin" & "public" ...
1
vote
1answer
99 views

SQL Server : Job not reconnecting to restarted Linked Server

The problem To keep two tables across two servers in sync, we have a trigger that adds a change to a MergeTable. Every so often, a merging job runs on SQL Server to push the changes to the Progress ...
1
vote
0answers
63 views

Sql agent job step to Rename a file in SQL Server 2000 fails with error “ file being used by another process”

We have a SQL agent job configured on Sql Server 2000, which has an initial step of renaming a backupfile coming from a another server (SQl Server 2000) Say coming from \A\B\X.dat to X_back.dat. till ...
1
vote
0answers
415 views

SQL Agent After installation not able to start

SQL Server 2012 SQL Agent will not start after installation. Checked permissions, on surface configurations, all OK, have tried to run it as another account no Joy. The error i am receiving is the ...
1
vote
0answers
71 views

Failed to notify 'DBA Team' via email

I setup a test job to test out my failure notifications and now I'm getting the following stating it did not notify my operator via email. The strange thing is I ran the same exact setup script on ...
1
vote
0answers
27 views

Is it possible for a user that is not the job owner to edit the job or add new steps?

My development lead is ok to revoke the sysadmin privileges he currently has, if there is a way he can still edit/execute/enable-disable/execute application jobs. So far, I see that with the ...
1
vote
0answers
118 views

What are recommended (working) permissions for a user to view all SQL Agent jobs

A new user (associated with an existing login) is created in msdb and assigned membership: use [msdb]; create user [TheUser] for login [AnExistingLogin]; alter role [SQLAgentUserRole] add member ...
1
vote
1answer
603 views

SQL Server Agent - Running SSIS Package with Proxy

I have followed the below article to create credentials/proxy to run a SSIS job from SQL Server Agent. ...
1
vote
0answers
97 views

Differential backup job is working but not the Full daily backup

I have a full backup job for my database that runs once daily, I see it posted daily in the folder that it should go to, but when I check the "View History" for this job in SQL Server Agent, there are ...
1
vote
0answers
1k views

How to debug problems with SQL Server multiserver (Master and Target server) administration?

I've tried to set Mater and Target Servers on various cobinations of SQL Servers 2012 R2 on Window Server 2008 R2 and Windows 7 machines but always getting one or 2 of the following errors during ...
1
vote
1answer
1k views

The specified @job_id does not exist

After deleting a SQL Server Agent job I continue to get notifications that the job attempted to run and failed. I am receiving the following error message. [000] Unable to retrieve steps for job ...
1
vote
0answers
147 views

Requesting advice on creating a table controlled SQL job scheduler

I have been tasked with cleaning up a series of SQL jobs that send email updates about various data and system conditions in my company. Currently, there are a ton of jobs, each with its own SQL code ...
1
vote
0answers
588 views

Why is the next scheduled run date for my SQL Server job NULL? [duplicate]

I've been dealing with the Microsoft SQL Server Agent with regards to scheduling jobs. I'm trying to find out what the next scheduled run date for a bunch of jobs that were created where the job ids ...
0
votes
3answers
96 views

Resume job 'A' at some step till job 'B' is completed

I have two SQL Agent jobs 'A' and 'B' Job 'A' has 10 Steps and it starts at 5:00 Am as per schedule, job 'B' has 5 Steps and it Starts by using trigger in step 3 of job 'A', job 'B' should be ...
0
votes
2answers
1k views

Can SQL Agent job notifications be sent to one operator for success and another for failure?

We have a requirement that some people are sent notification on success, and other on failure. But the UI seems to only allow a combination of 1 operator + 1 condition. So I was wondering if we ...
0
votes
2answers
200 views

Sql Server Agent fails to run batch from desktop

I’m using SQL Server 2008 and running a batch file from SQL Server Agent. The batch file is located in my desktop. When I try to run the job I get an error: “access is denied.” The batch file runs ...
0
votes
1answer
5k views

How to give SQL Server Job Owner permission to Proxy a Credential

I've created a Credential Cred1 (DOMAIN\USER1 with the secret = domain password) I've created a SQL Agent job with owner to NT AUTHORITY\SYSTEM The job needs to proxy as credential Cred1 So when I ...
0
votes
2answers
85 views

Start Sql Server agent when sql server starts

Is it possible to automatically start the agent when sql server starts? When you boot the server than both windows services get started. But when you stop the main sql server service agent also ...
0
votes
2answers
28 views

can i secure sql server agent job with password

I want to secure SQL Server Agent jobs with password or any other method is it possible?
0
votes
1answer
362 views

Stop agent job after executing for a certain number of hours

I have a scheduled job which runs nightly. I want it to stop itself at 07:00AM in the morning whether or not it is completed. I have seen some duplicates in the site but they don't exactly address the ...
0
votes
1answer
5k views

Sql Server Backup Job failed

I have a sql agent job setup for taking full backup every night. Last night the job failed with the following error message. Sql Server Error Log Message BackupIoRequest::ReportIoError: write ...
0
votes
1answer
396 views

Minimum Permission to Restart SQL Services

Occasionally, our developers need to restart SQL services. We do not want said developers to be local admins on each server if not necessary. What is the minimum permission required so that the ...
0
votes
1answer
214 views

Export SQL Agent jobs with steps and scripts

I recently saw some kind of export of SQL jobs configured under SQL Server Agent that I would like to achieve as well. Unfortunately I don't have any trace to author of that report to ask him\her ...
0
votes
2answers
680 views

How to provision the SQL Server Agent service after SQL Server Edition upgrade

I have upgraded SQL Server 2008 R2 Express to SQL Server Standard Edition. After I have upgraded it, the SQL Server Agent was stopped. I have tried to start but it fails. Only when I have changed ...
0
votes
1answer
467 views

Blocked access to batch file

I am unable to execute batch files to copy backups from SQL Server 2008 R2 hosted on Windows 2008 R2 to a file share. Error: Access denied SQL Server Agent service has full control on the ...
0
votes
1answer
160 views

Run job in agent based on table data

Is there a way to start a SQL Server agent job if a table is not empty? Basically, first I want to check a table, and if the table is not empty then start the job. If it is empty, then check every 1 ...
0
votes
1answer
341 views

Differences between CMS and MSX/TSX?

What is the differences between Central Management Servers and Master Server (MSX) / Targer Server (TSX) concepts in SQL Server? I know that MSX/TSX is related to SQL Agent and the basic idea is to ...
0
votes
1answer
60 views

SQL Job to be run earlier on last work day of month

Right now, I have a SQL job (within SQL Server 2008 R2) that dumps a complex select statement into a table every weeknight (excluding weekends) and it works great. Due to our company's Month End ...
0
votes
2answers
232 views

How to use sqlcmd to create file names for output based on the day of the week or the date?

I have a SQL agent job that queries the database and exports the results into a csv file. It needs to run daily and The output file (Output.csv) gets overwritten everytime the job runs. Is there a way ...
0
votes
2answers
124 views

What is the Query to display the failed sql jobs

What is the Query to display the failed sql jobs,so that I can get all the failed job information with one query
0
votes
1answer
81 views

Notification when the status on sql server replication is “Not Running”

We have a lot of replications set up. Sometimes for some reason, the status of the replication changes to "Not Running/Expired Soon or Expired". Could you please let me know if there is a way we can ...
0
votes
1answer
153 views

If you schedule a TSQL Job in SQL Server 2008 R2 and additionally need to copy files with it, is it better just to use a script?

I noticed that alot of backup jobs are scheduled using SQL Server 2008 R2, but we have a system here at work that also requires the backup of a directory in addition to the database contents. I've ...
0
votes
1answer
149 views

sysadmin security error creating Reporting Services cache refresh plan in Report Manager

On SQL Server 2012 (SP1) Reporting Services (native), when creating a cache refresh plan in Report Manager, I receive the error: Only members of sysadmin role are allowed to update or delete jobs ...
0
votes
1answer
142 views

Backup of Job's List only

Goal: Reuse the SQL server agent jobs list. Problem: The list contains a lot of jobs and I need to reuse the jobs list in a another time without recreating it. Based on the example of the picture, ...
0
votes
1answer
336 views

Is the [NT Service\SQLSERVERAGENT] a supported type for SQL Server Agent service?

Reading and re-reading MSDN "Select an Account for the SQL Server Agent Service". NT Service\SQLSERVERAGENT is not listed in the "Supported Service Account Types" section. And, if not, what is it ...
0
votes
1answer
3k views

Copy files using script to a network share

Is there a simple script I can use to copy files in a particular folder to a network share? This is for use with SQL Server Agent so I can run it as a step after backups. Thanks
0
votes
1answer
634 views

Make SQL Server Agent retry failed script with Try/Catch

I have a script that has a try catch in it so that if it fails I can roll back the transaction. It runs on a job scheduled through SQL Server Agent. But when it fails SQL Server Agent does not see ...
0
votes
0answers
27 views

Analysis Services job step error: The specified file could not be decrypted

We have a daily SQL Server Agent Job that's failing intermittently. Between May 27th and Jun 16th, it has failed twice. The error message we receive (listed below) references "The file could not ...
0
votes
1answer
29 views

Where to look for Agent history in Replication?

In SQL server 2008R2 replication configuration, "agent history cleanup distribution" job by default runs every 10 minutes and deletes any historical data older the 48hrs. If I increase the retention ...
0
votes
1answer
77 views

How do I pass or fail a job in SQL Server agent based on a return value from a stored procedure?

What do I need to do in order to execute a step in a SQL Server 2012 agent job that returns a bit value back? Basically, I want to fail the job or pass to the next step based on the results from the ...
0
votes
0answers
32 views

Incoming Tabular Data Stream Error

I created a SQL Server Agent Job with two different schedules. One is at 6 AM, the other is at 11 AM. When it runs at 11AM, it works fine; but at 6 AM it fails and gives this error message; The ...
0
votes
2answers
92 views

Sql Agent Jobs executes too slow

I have posted a question like this before but is seems that I did not explain the whole story clear. So I made this one to explain it in details. Here's the stored procedure USE [xxxx] GO /****** ...
0
votes
0answers
46 views

Can't see any services listed in Configuration Manager [closed]

I am using SQL Server 2014 and am logged in my desktop as my user account with admin rights. When opening Config Mgr, I do not see any services listed whatsoever. Could this be an issue that ...
0
votes
1answer
46 views

SSIS Package not retaining parameters in SQL Server agent job

I have an SSIS package stored in the Integration Services catalogs on a SQL server instance. This package is used as a step in a SQL Server agent job. The package has 4 required parameters. Using ...
0
votes
2answers
78 views

Executing sp in ssms much faster than executing in job step

My stored procedure takes 23 secs in ssms but takes 4 minutes when exec via job. Can you please help me in finding out. Below is SP code ALTER procedure [ops].[trailers_sitting_builder_mod] --WITH ...
0
votes
0answers
59 views

Can I change “Category_Id” & “Current_execution_status” value in SQL Server 2012 through stored procedure?

I have created one job in SQL Server 2012 through SQL Server agent, and that job is not running due to some security privileges. When I am seeing through below SQL query to that my created job ...
0
votes
0answers
124 views

SQL Server Job Database name

I am trying to find and write a query for what database is affected by a SQL Server job. I have checked the following: Get a list of SQL Server Agent Jobs and SQL Server Agent Tables and have been ...