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.

Filter by
Sorted by
Tagged with
0
votes
1answer
35 views

DBCC CHECKDB job failed on SQL Server 2014

We have a DBCC CHECKDB job that runs weekly on Saturdays. This job was created thorugh Maintenance Plan wizard. Typical duration for this job is 1.5 hours. This past weekend the job failed with the ...
-2
votes
1answer
43 views

SQL Agent job gets Cancelled [closed]

I have an ETL process that runs nightly (that I inherited). About 1 out of 5 times the job will fail and have a failed status in the Job Activity monitor. No other discernable message there. I ...
0
votes
1answer
38 views

SQL Server create cron job without SQL Server Agent

I'm creating a cron job on SQL Server. As per my knowledge, the only way possible to create a job is through SQL Server Agent. However, the services(listed on services.msc) of VM assigned to me do not ...
0
votes
0answers
30 views

Sql Job Failing with Timeout Error

Recently I have noticed that a job is failing on our Production 2014 SQL Server with this error text: Timeout error [258]. [SQLSTATE 42000] (Error 258) OLE DB provider "SQLNCLI11" for ...
0
votes
0answers
20 views

SSIS and SQL Agent - running jobs using proxy vs using MSA

We have multiple servers, each with its own SQL Server instance. We have external companies that develop applications for us. This companies deploy SSIS packages and run them via SQL Agent. I'm ...
0
votes
2answers
68 views

Does changing database growth rate force a new execution plan?

For many years there has been a long running SQL Agent job that has taken nearly two hours to complete. Approximately two weeks ago on a slight whim a decision was made to change the growth rate on ...
0
votes
0answers
55 views

Stored Procedure fails on tempdb-diskspace when executed by SQL Agent

I developed a bunch of ETL procedures which are executed by an overlaying SQL Script and write Data to separate DB. The Script uses a single Transaction, ensuring we only get complete data. This ...
1
vote
0answers
33 views

Sql Server Agent Job - Unable to start execution of step 1 (reason: Error authenticating proxy "user", system error: The user's account has expired.)

My predecessor created several "Intergration Services Catalogs" dtsx packages which are scheduled / run via SQL Server Agent -> Jobs using an SSISFileProxy which is using ...
0
votes
1answer
71 views

SQL Server Agent Not Executing Job

We tried to schedule job in Sql server to take database backup. But it has been failed to execute. While checking logs we could see 2 different errors. SQL Agent error logs Error,[382] Logon to server ...
1
vote
1answer
31 views

Where can I find sql server agent service logs?

I am using SQL server 2014. I notice that - occasionally, the sql server agent service gets automatically stopped. Where can I find logs to check the timing of when the service stop has happened and ...
2
votes
1answer
93 views

Job to stop other job at specific time

We have a job which imports data daily from a remote SQL Server every night, I'll call it Import-Job. Most of the time this job runs through in about 15 minutes and everything is fine but due to a ...
0
votes
0answers
32 views

Sql Error Message ID 3013 & 4305 for Standby / Read-Only database that we use for import data heavily

Sorry. I am not a DBA, but a SQL Developer, so I am trying to get some general support/feedback on my case (and when I Googled the issue, remedy seems so scattered so I decided to post here). I got ...
0
votes
0answers
118 views

Permissions to run SQL Server Agent Job

I am getting the following error message: Message Executed as user: fin\jdoe. The server principal "fin\jdoe" is not able to access the database "abc" under the current security ...
0
votes
1answer
160 views

Run T-SQL Script Using Powershell via SQL Agent Job

Tried to think of the best subject title; however having a problem getting this done. I'll give my preferred way, but open to any best method to get this done. I have a tsql script that is done, ...
0
votes
1answer
42 views

SQL job sending email even if not configured to send notifications

I am using this version of SQL Server. Microsoft SQL Server 2016 (SP2-CU12) (KB4536648) - 13.0.5698.0 (X64) Feb 15 2020 01:47:30 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on ...
2
votes
1answer
112 views

SQL Agent stopped recording history (SQL Server 2017)

I have a Dev server that has been running without issue for at least 2 years. This dev machine was a VM Clone of the Production server. On 2021-06-05 something happened on this server that altered ...
0
votes
0answers
42 views

Phantom SQL Agent Job - Reports Running But Isn't Actully Doing Anything

I have a very similar issue to what is presented here. Periodically on one of my production servers a SQL agent job of some sort (that are responsible for calling several EXE's) will report running ...
1
vote
1answer
333 views

Security best practices for SSIS package execution via SQL Agent job

We're trying to rein in the number of sysadmins on our servers, and one of the issues we're running into pertains to SQL Agent security -- especially with regard to SSIS jobs and our ETL team. I ...
2
votes
2answers
21 views

In a mirror, how can I keep the SQL Server Agent offline, but have it start automatically in the event of a failover on the Principal?

In this scenario there are three MS SQL servers. ServerA has a series of jobs that write data to databases on ServerB. I want to set up ServerC as a mirror of ServerA, with all the same jobs available....
2
votes
1answer
47 views

Jobs on the Mirror are running against the Primary

I have a mirrored set of jobs between the my current primary and mirrored failover SQL Server setup. In the past, the jobs on the mirrored server, when they are enabled, fail as they are not able to ...
0
votes
1answer
27 views

Missing Target Local Server in Job

SQL Server 2016 Enterprise, CU15 + GDR. Client recently started using OPCON in production and I noticed that when OPCON creates jobs, it doesn't add the Local Server as the target. This prevents the ...
-1
votes
1answer
65 views

How to kill agent job if it does not finish after x min

I want to create an agent job and collect some data on my server, e.g. every 10 minutes. But I would like to kill the job if it does not finish within a specified time period, e.g. after 5 min. I have ...
0
votes
0answers
26 views

Aborting long running query under AG configuration [duplicate]

Currently we have a process where any query running over 2 mins (only select) in primary database participating in db mirroring is killed, running every 5 mins. As we have moved to Availability groups ...
0
votes
0answers
26 views

SQL Server Agent on Linux Failover Cluster

We have set up FCI on Linux-SQL server, Everything is working except SQL server agent. Agent is Enable and running but Job are not executing. And Agent also getting stopped very often. Below are some ...
1
vote
1answer
387 views

SSMS Not showing Status and Scheduled Jobs Not Running

Recently in SSMS, I have started getting a blue question mark next to the database and SQL Server Agent, when previously all was showing running. At the same time my scheduled jobs have stopped ...
0
votes
3answers
270 views

SQL Server Agent & sp_send_dbmail failing on permissions

I have set up a SQL Server Agent job to call sp_send_dbmail with a very simple select on a certain table in a certain database. Within the properties > permissions of the target database, the ...
-1
votes
2answers
50 views

Rebuild Indexes [duplicate]

We have a database named WSS_Us_App in our Production SQL Server 2014. In this database all of the indexes need to be rebuilt as most have a fragmentation level greater than 50%. I plan to rebuild ...
2
votes
1answer
137 views

Can't take backup to the shared folder

Need your help. My sql job is not able to take backup to the shared folder although the domain account, under which the sql agent service account is running, has full permission on that shared folder. ...
1
vote
2answers
50 views

SQL SERVER Detailed Backup Report

I need to create a script that gives the report for the following information: Backup Job Name Databases that have been backed up in the last 24 hours Size of each DB backup Start time of backup End ...
0
votes
2answers
59 views

How to get job start time inside of a TSQL agent job step?

Is there a good way to query the job start time inside of a given sql agent job step (TSQL)? This will help with step 3 in the following scenario. Job Foo (Run Daily @ 11:30pm) Step1 - StartTime = ...
1
vote
1answer
67 views

Query agent jobs for a given notification operator name

Is there a good way to query sql agent jobs for success / failure notification to a given operator name? One of the operators is no longer with the company and need to fix up all agent jobs sending ...
0
votes
1answer
117 views

Global Temp Table Error when Stored Proc run by SQL Job on a Schedule

I have a puzzling situation I am trying to confirm/solve. A stored procedure I have written creates a series of Global Temp Tables and fires off an email if any records show up in the final one. This ...
0
votes
1answer
39 views

Report server scheduled job location

I inherited a SQL Server environment. In (database engine) SQL Server Agent are two jobs defined that apparently belong to the report server. First and only step in the first job: exec [ReportServer]....
0
votes
1answer
104 views

Only a sysadmin can specify '@output_file_name'

I have developed an async batch system using the Agent Jobs in SQL Server 2017. It is working really well. I have one issue with setting up the operations staff to run this. We get the following error ...
1
vote
1answer
73 views

Which server actually runs the SSIS package when SQL Agent and SSISDB are on 2 different servers

We have a SQL Server where we deployed the SSIS packages to its Integration Service Catalog (SSIS DB). And we have another SQL Server where we scheduled SQL Agent to run those SSIS packages. My ...
0
votes
1answer
283 views

sp_update_schedule says @schedule_id does not exist

I wrote a script that reads job schedules from msdb.dbo.sysschedules and runs sp_update_schedule to change the active_start_time for a given subset of jobs. In each case, sp_update_schedule fails with ...
1
vote
2answers
78 views

Halting a multi-step Agent job without resorting to "Quit the job reporting success"?

I have a multi-step process that sometime should stop in the middle, not because of any failure but for business reasons which are not failures. How can I tell Agent to successfully exit the whole job?...
0
votes
1answer
70 views

SQL Server 2016 -number of SQL agent replication jobs(transaction log repl)

So I have a SQL server 2016 on a Windows Server 2012 instance. We have 140 databases(small to med). So the SQL instance was setup for self replication and in the process we have 140 SQL agent ...
1
vote
1answer
154 views

SQL Server Agent Alerts and Severity Errors

I've setup alerts in SQL Agent for errors of severity level 15-16 for testing, and found out that these are not always triggered To be more exact, these seem to trigger only when given error number ...
1
vote
2answers
102 views

Schedule Job to Start at Different Steps

I am working on a system that generates a number of recurring emails as parts of various jobs scheduled in SQL Server Agent. The emails contain text-based reports that are loosely associated to the ...
0
votes
1answer
1k views

How to run Sql Server stored procedure in Async mode?

Is there a way to run SQL Server 2019 stored procedures with parameters asynchronously? Calls to this SP will be made several times a day, i.e. this is not one time requirement. Service Broker can be ...
-1
votes
1answer
67 views

How does sql server agent access the azure storage blob [duplicate]

Good morning all , I must configure an automated backup to an azure blob storage in the backup script I have correctly configured the credential now what right is needed for the sql server agent ...
1
vote
1answer
232 views

How to fix SQL Agent Job using Windows Security after password change

I have some sql agent jobs that are using Windows NT Integrated Security to run (as specified in the Maintenance Plan's Manage Connections window)...eg. Translog backups. While logged in as this ...
0
votes
1answer
29 views

Where to find the whole log of a maintenance plan package job that failed with error?

I have a maintenance plan that runs on SQL Server agent as a the job and finishes with error. However the error is not visible in job history in SSMS, the text of Message is seemingly truncated. How ...
-1
votes
1answer
36 views

Complex SQL Agent Job

I would like to tun the Stored Procedures on the following dates. 1st sept 2020 1st Nov 2020 1st Dec 2020 1st Feb 2021 1st March 2021 1st May 2021 1st june 2021 1st august ...
0
votes
2answers
480 views

Grant an AD Group permission to edit all MSSQL Agent jobs

We have a team of people, we all log in MSSQL Server from SSMS using our Active Directory accounts, by Windows Authentication. Our AD accounts are added to an AD group, which is used to grant all ...
1
vote
1answer
130 views

User on SQLAgentOperatorRole unable to edit jobs

My Active Directory account is on an AD group that is on msdb's SQLAgentOperatorRole. I'm able to list existing MSSQL Agent jobs, but I can only view their steps and schedules, I'm unable to edit them ...
1
vote
1answer
234 views

SQL Server - Unable to Enlist Target to SQL Server Agent (MSX) after Collation Change

After changing the Collation of SQL Server to Latin1_General_CI_AI from QL_Latin1_General_CP1_CI_AS I'm trying to add the server back to MSX as target in CMS but Enlisting is failing. One thing I ...
0
votes
2answers
138 views

Is it possible to prevent SQL Agent Job from running if related job or previous instance has not finished?

I have three SQL Agent jobs, one for each of three registries being managed. These go off on a staggered schedule every two hours (i.e. Reg 1 at 9am, 3pm; Reg 2 at 11am, 5pm; Reg 3 at 1pm, 7pm). In ...
0
votes
1answer
235 views

SQL Server Agent unable to view network drives

I am unable to get agent jobs to output to a network path. I have pushed the IT guy to set up a domain authenticated user that logs in when the agent starts. That login does have access to the domain ...

1
2 3 4 5
11