Questions tagged [sql-server-agent]
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 potential.
564 questions
1
vote
1
answer
74
views
SQL Server Agent can't be started on fresh SQL Server 2019 Installation - [Error 1053]
I read many posts on this and I think I've tried everything I could be able to find, so I post my issue here.
I installed a fresh new instance of MSSQL 2019 Standard x64 from the official ISO on a ...
1
vote
1
answer
61
views
execute job only on primary replica ( R/W) of Azure SQL MI failover groups
I am trying to setup SQL agent job that will only execute if it is primary replica of Azure SQL MI of failover groups.
I am trying to get primary replica using sys.dm_hadr_database_replica_states ...
2
votes
2
answers
325
views
Permissions needed to start/stop SQL Agent in SSMS
I'm working on a new SQL Server instance, but the SSMS options to start/stop/restart the SQL Agent are grayed out.
I am connected from another PC. My user is in a group that has sysadmin permissions ...
0
votes
1
answer
81
views
How can I make CDC stop capturing a seemingly infinite amount of agent job history?
My most important production server uses Change Data Capture (CDC) a lot, maybe for about 25 tables. The relevant agent job shows well over 1,000 steps as in progress. Because they are in progress, ...
0
votes
0
answers
35
views
Managing Memory Usage by SQL Server Agent Jobs and SSIS Packages
I have an SSIS package deployed on a server that has been running fine for some time until recently when it's been failing with a reported buffer failure. "A buffer failed while allocating 10 GB&...
-1
votes
1
answer
68
views
Bug in how CDC jobs record run_duration in sysjobhistory
Normally SQL Agent job history is recorded in msdb.dbo.sysjobhistory with run_duration in the format DD:MM:HH:SS, -- so for example a value of 105 means 1 minute and 5 seconds.
However the CDC capture ...
8
votes
6
answers
3k
views
How can we prevent Agent Jobs running twice when the clocks change?
Context
I have no idea where this is documented and was shocked that I could not find a duplicate. I only know it from seeing it go wrong several years in a row.
The Problem
On the day when the clocks ...
0
votes
1
answer
91
views
SQL Server instance upgrade impacting on other instance maintenance plan jobs
I have two instances on a single server. Instances are named TEST and LIVE for simplicity. Both are running SQL Server 2019. Only the LIVE instance has SQL Agent jobs running (Basic backup jobs via ...
0
votes
1
answer
192
views
SQLServerAgent could not be started (reason: Unable to connect to server ‘------’; SQLServerAgent cannot start)
Firstable I would like to mention about this question.
I saw many post in Google about this incident but seems that every solution does not help me and that's why I make this question here.
So here is ...
2
votes
2
answers
65
views
Export SQL Server Agent Jobs from a drive
I have a bit of a pickle here. Our old server with SQL Server 2008 was malware infected and been shut down. We've restored the databases from backup into a new server. However, Agent Jobs have not ...
0
votes
1
answer
92
views
How can high severity alerts be configured in Amazon RDS SQL Server?
Per the RDS documentation,
SQL Server Agent alerts and operators aren't supported.
But on any sensible SQL Server, you really want these for the high severity alerts.
So, I'm here to ask: How can ...
0
votes
1
answer
45
views
Sessions killed when AG group connection terminated
We had a strange incident last night on our SQL Server 2014 AG group. We have a two-node group setup in asynchronous mode. The clock on the secondary was off by about 30 seconds and adjusted itself ...
0
votes
0
answers
18
views
Running an Agent Job using Azure Shared Access Key Credential
I'd like to have a SQL agent job that copies a file up to Azure Storage using a Shared Access Key Credential.
The credential is set up and works for backup and restore process, but I'd like to use it ...
0
votes
1
answer
376
views
"Login failed for user 'AD\MyUser'." ... 0x80004005 "Cannot open database "MyDatabase" requested by the login. The login failed."
The full error message:
MyPackageName:Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
an OLE DB record is available. Source: "Microsoft SQL Server ...
0
votes
1
answer
281
views
How do I know which user runs a package in the Integration Services Catalog (SSISDB) from the SQL Server Agent?
I need to find out the user that runs the SSIS packages in the SSISDB but cannot find it. There are so many users and system users attached to the other databases that I cannot learn from that pattern ...