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
1 answer

Executing a stored procedure iIn SQL Server Agent with an automated parameter for all steps

I have a series of stored procedures (27 in total) that I would like to execute sequentially in an automated way. I have created the required 27 job steps in SQL Server Agent (each step executing a stored procedure). However, some of these…
Sam
  • 47
  • 1
  • 7
0
votes
1 answer

How to copy a database backup file to another server in SQL Server Agent job

I realize I'm probably missing something simple, but I can't figure it out. If I use the following "copy" command in a batch file on the destination server, it works fine. However, if I add it in a step on the SQL Server Agent job that does the…
John Pasquet
  • 1,824
  • 15
  • 20
0
votes
0 answers

What is the proper way of running access macro from sql server agent job scheduler

I have requirement of automating the process of running macros to fill sql tables. I am using a sql server job scheduling agent for this. Here is my macros batch file: "C:\Program Files\Microsoft Office\root\Office16\MSACCESS.EXE"…
Sahil Tiwari
  • 159
  • 2
  • 12
0
votes
1 answer

Error while using variable in SQL Server stored procedure

I am trying to take a full backup of the database and get an error that I must declare scalar variable. Below is my code; I don't know if I am using variables right in the stored procedure parameters. Any help would be appreciated DECLARE…
simer
  • 47
  • 4
0
votes
2 answers

How to expose more information about the failure of a stored proc in SQL agent

I have a SQL agent job setup and in that job there is a step to execute a stored proc. If that stored proc fails then the SQL agent job will display an error message but there is no other information. Something like a stacktrace or at least the…
Chris Herring
  • 3,675
  • 3
  • 33
  • 50
0
votes
1 answer

Stored procedure works when exec, fails in agent job

I have a stored procedure that works fine when run using EXEC, but fails when added as a step to an Agent job. The stored procedure requires no parameters. It is used to process a bunch of geographic shapes in a vendor database and cache the…
Hecatonchires
  • 1,009
  • 4
  • 13
  • 42
0
votes
1 answer

Reasons to turn off SQL Server Agent and disabling of CDC

We are using Change Data Capture on SQL Server for a database to capture changes. We enable this using: exec sys.sp_cdc_enable_db A requirement for this to work and for us to pull back the changes recorded is that SQL Server Agent is running. Over…
B.Hawkins
  • 353
  • 5
  • 13
0
votes
1 answer

How to automatically execute a stored procedure every day at a particular time in MS Azure SQL?

I know how to create a JOB in SQL Server via SQL Server Agent. But but but, I'm very new to MS Azure and I have deployed my SQL database on MS Azure. Here I want to create a job which can run a stored procedure automatically on a specific time of…
0
votes
2 answers

Alternative to SQL Server Agent for running jobs on hosting service

What is the alternative for running jobs when the hosting company that provides shared SQL Server services blocks access to SQL Server Agent?
hassona
  • 27
  • 1
  • 9
0
votes
1 answer

Job Schedule SSAS Command Cannot Open Database Requested by the Login

I've tried everything I can think of and now need help. I'm trying to run a SQL Server Agent job that has one step in it which executes a SSAS Command that processes a dimension. When running it, the job fails with the following error:
ptownbro
  • 1,240
  • 3
  • 26
  • 44
0
votes
0 answers

Running Powershell Script from SQL Server Agent

How different should the programming be when you execute a powershell script from SQL Server Agent. I have been seeing very weird behavior. Any object call fails Can't we use powershell functions in these scripts. The parameters go empty if we…
Adarsh
  • 52
  • 7
0
votes
0 answers

SSL Error Encountered When Executing SSIS Package (Containing Call to Python Code) from SQL Server Agent Job

My SSIS package consists of an Execute Process Task which executes some compiled python code which downloads files from a Web API. The code works. The package executes succesfully from Visual Studio. Once deployed to my localhost sql server 2012…
adamcunnington
  • 292
  • 1
  • 3
  • 16
0
votes
0 answers

SSIS Job Error : ADO NET Source has failed to acquire the connection

SQL server agent Job Error : ADO NET Source has failed to acquire the connection - with the following error message: "Could not create a managed connection manager.". Hi Guys, I have create a ssis package where the source is mysql ( Ado net source)…
MBSQL.MSBI
  • 71
  • 1
  • 1
  • 9
0
votes
0 answers

Separating a PowerShell command across SQL Server Agent job steps

I have tried without success but I suspect I have many errors at the moment. However, can anyone tell me if it is possible to separate PowerShell scripts across a series of SQL Server Agent job steps, i.e. Job 1 Step 1 --> declare & assign a…
beehive
  • 93
  • 3
  • 11
0
votes
2 answers

SQL Server stored procedure works but failes while running job

I have a problem with my stored procedure in SQL Server 2017 Developer. It gets file's modification date using xp_cmdshell, returns varchar into temp table and trying to convert this to date. The stored procedure is working when I execute it in SSMS…