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

SQL Server Agent new Job dependency on existing Step of an existing Job

I have 2 jobs; Job2 is dependant on the completion of Step16 of Job1. All these steps are performing data refresh for different systems. Job1: has 25 steps in a sequenced manner i.e. Step 1 completes then Step2 starts and so on Job2: has only 1…
0
votes
1 answer

SQL Server Agent fails when using sp_send_dbmail to execute a stored procedure containing a linked server

Starting July 1st, 2021, SQL Server Agent fails when using sp_send_dbmail to execute a stored procedure containing a linked server. If I remove the linked server portion of the code from the stored procedure the job runs successfully. The job simply…
Andy
  • 21
  • 3
0
votes
0 answers

T-SQL :: how make query kill itself

With the help of a user I've created a SQL Server Agent Job that stalks a few servers on my network every 10 minutes to collect all connections: USE [msdb]; GO DECLARE @ServerName varchar(50), @DynamicSQL NVARCHAR(MAX) DECLARE @myTableVariable…
Francesco Mantovani
  • 10,216
  • 13
  • 73
  • 113
0
votes
1 answer

SQL Server agent backup SSAS database

I want to use the SQl Server agent to backup one of my Analysis servers databases. However, when I connect to my Analysis Services I have to access to the SQL server agent. It only shows up when I connect to my Database Engine. So now when I try to…
0
votes
1 answer

Run a query automatically SSMS without SQL server agent

I'm a new PowerBI developer. I am inserting data from the Azure SQL database via SSMS. I don't have access to a server agent for being able to create jobs. I just want to run 4-5 queries (1 query = 1 step for my job). Is there a simple way to do…
mas
  • 3
  • 1
0
votes
1 answer

SQL Agent Notify on Step Error but Continue to Next Step

In my company's SQL Server (2005), there's a job that has about 20 steps. Each step is set to go to the next step on error. What's the best method for getting a notification sent out if a step has an error?
Erik
  • 161
  • 2
  • 12
0
votes
1 answer

SQL Server Agent not executing part of Python script where it runs a third party exe file

I am trying to run a python script from a powershell script inside SQL Server Agent. I was able to execute most job of a python script (Task1-Task2) except the last portion (Task3) where it runs a third party exe file called SQBConverter (from…
Java
  • 1,208
  • 3
  • 15
  • 29
0
votes
2 answers

SSIS DTSX package losing data in a SQL Server Agent job

I have an SSIS job which takes files from an input FTP directory and unzips the contents into a temp directory for further processing. I'm using a For-Each directory loop over the input FTP directory, and within that there is a call to Winzip. The…
Mel Padden
  • 983
  • 1
  • 9
  • 21
0
votes
1 answer

Running Powershell script (that runs other exe file) from SQL Server Agent

I am not sure why this part of Python script does not do the job when I run within SQL Server Agent. This python script is from "ConvertToBAK.py". for f in glob.glob(r'Z:\\TestPCC\\Yesterday\\*.SQB'): os.system( f'SQBConverter "{f}"…
Java
  • 1,208
  • 3
  • 15
  • 29
0
votes
1 answer

How will I know specifically when the tasks in my packages have run successfully in SSIS also how can I show that in a log tablet in SQL table

Let's there is a master package and several tasks run in it on a daily basis, I want to specifically determine when those tasks have finished like table load completed and cuble load completed, these steps run daily but I have to show this in a SQL…
Nikki
  • 1
  • 1
0
votes
0 answers

Micro Focus Reflection SFTP.exe unable to connect issue

Currently having an issue in SQL Server Agent batch jobs running the Reflections SFTP.exe command. Upon execution we are continually receiving the unable to connect to host Ext code 43. The account running the batch job has the permissions defined…
0
votes
1 answer

Unable to run SSIS package using SQL Server Agent Job - Error 0x80040154

I have some SSIS package that I am trying to run using SQL Server Agent Job. The package gets executed without any issues when run from Visual Studio. But when I create a job and run in the SQL Server Agent it gets failed with the below error. I…
Karthik Venkatraman
  • 1,619
  • 4
  • 25
  • 55
0
votes
1 answer

SQL Server 2005 - Linked Servers & Agent Jobs

I have a strange scenario that I am currently unable to explain. I live in hope that it's just "the Friday feeling" or that some kindly sole here will bail my brain out and save me from endless loops of "but why!?" :) Two servers, running SQL…
MatBailie
  • 83,401
  • 18
  • 103
  • 137
0
votes
1 answer

Powershell-Command to download a file with admin rights

I try do download a file via a powershell command. The command I use is simple: Start-BitsTransfer -Source 'https://download.com/file.zip' -Destination 'E:\test\file.zip' I can run the command in PS succesfully. But now I want to run it with…
Schnurres
  • 152
  • 7
0
votes
1 answer

Cannot start SQL server Agent on windows 10

I'm trying to start SQL server Agent on windows 10, I'm getting following error. - SQL server Agent have installed with SQL express - custom installation Following things which I tried to resolve this issue with no luck. :( Change Built in…
ISHIDA
  • 4,700
  • 2
  • 16
  • 30