Questions tagged [sql-server-job]

A SQL Server Job is a task that can be executed by the SQL Server Agent

SQL Server allows the creation of individual jobs, repeatable processes which can be run on-demand or via a preset schedule.

Each job consists of one or more job steps, which are executed in sequence. A job step can be one of the following:

  • Executable programs and operating system commands.

  • Transact-SQL statements, including stored procedures and extended stored procedures.

  • PowerShell scripts.

  • Microsoft ActiveX scripts.

  • Replication tasks.

  • Analysis Services tasks.

  • Integration Services packages.

SQL Server jobs are operated through the SQL Server Agent. Frequent uses include database maintenance tasks, ETL package execution, cube processing, and script execution.

55 questions
0
votes
0 answers

Which "Run As" to choose in SQL Server Agent T-SQL job step

I have a SSIS package that I want to run in SQL Server Agent T-SQL job using Stored Procedure since I have a permission issue described in my other post: Using Proxy to give SQL Server Agent windows credential to access to azure db not…
0
votes
0 answers

SQL Server Agent Job executed but the log date show future time

I have a SQL Server(2014) Job scheduled run at "AM 11:00" on everyday. I saw the job's log at "2020/01/08 AM 11:40", the Windows server's clock tool displayed right. But I find out the job's last record executed at "2020/01/08 PM 06:12", I have no…
Mortiz.H
  • 1
  • 1
0
votes
1 answer

Hanging SQL job step when running python executable created from pyinstaller

Summary: I've setup a python script (simplified in this case, removing all ODBC/SQL statements) that creates two log files in a child directory. I then created a exe file off of this named TestApp.exe using PyInstaller. Manually running the…
0
votes
0 answers

What is background job queue in sql server? How to create a background job?

While exploring the SQL server I came up with following system tables: sys.dm_exec_background_job_queue; sys.dm_exec_background_job_queue_stats; Official site tells that It Returns a row for each query processor job that is scheduled for…
Santosh Kale
  • 113
  • 12
0
votes
1 answer

SSIS Execute Process Task fails with SQL agent

I have a SSIS package with a Execute Process Task that runs an exe. All code and executables are located on the same server. The SSIS package runs inside the project but not when I upload to SSIS and run via SQL Server Agent. Unsure why it wont…
0
votes
1 answer

Executing windows shell command involving a VB script via SQL Server Job Agent or Windows Scheduler

I am having a problem with execution of a shell command involving a VB script via a SQL Server Agent and also Windows Scheduler (I am trying to get at least one of these options to work). The command runs and completes fine when executed manually…
bda
  • 372
  • 1
  • 7
  • 22
0
votes
0 answers

Trying to update SVN using Powershell in a SQL Server Job as the Service account

I have a powershell script that I developed and can run fine manually. However when I put the script into a sql server job and attempt to run the following line... SET-LOCATION "$NewTargetPath\" TortoiseProc /command:update /path:$SVNRepository…
Lumpy
  • 115
  • 7
0
votes
0 answers

SQL Server Jobs and it's steps completion duration on single and multiple server

I have enabled RSS on few SQL Server recently. I need detailed output of job with it's steps completion duration pre and post enabling RSS. If anyone have the script, please do share. Script for single as well as multiple servers will be…
Iam_NC
  • 45
  • 6
0
votes
0 answers

Sql Server 2014 Stored Procedure blocked by Job

I Have a Sql Server 2014 Stored Procedure (SearchArticleByNumber) that I'm using for searching data and which works fine until Job schedule starts which job executes additional (five) stored procedures which inserts, update or delete data from…
0
votes
1 answer

SSIS send mail task doesn't run through SQL Server agent job

I have created SSIS package with Send mail task It works (sends one email with multiple attachments) when I run SSIS package on SQL Server Data tools for Visual Studio But when I run same package through SQL Server Agent -> Job it doesn't send…
user2331670
  • 335
  • 2
  • 6
  • 15
0
votes
1 answer

Can we run job through SSIS packages in server1 which scheduled in server2?

Can we run job through SSIS packages in Server1 which scheduled in server2(that job is currently disabled in server 2) Kindly give me suggestions.
Hell Boy
  • 971
  • 2
  • 12
  • 28
0
votes
1 answer

Surface Area Configuration - component is turned off as part of the security configuration for this server

I'm getting this error when running a SQL Server job: Description: Executing the query "EXEC Stgs.sp_SendEmail ?" failed with the following error: "SQL Server blocked access to procedure 'dbo.sp_send_dbmail' of component 'Database Mail XPs' because…
AskMe
  • 2,495
  • 8
  • 49
  • 102
0
votes
1 answer

Issue with SQL Server Credential mapped to Network Service account

On SQL Server 2008 R2 Standard Edition, I created a credential TestCredential with identity as NT AUTHORITY\NETWORK SERVICE as explained here. Then I followed this article to create a proxy account and a SQL server job using that proxy account. But…
nam
  • 21,967
  • 37
  • 158
  • 332
0
votes
0 answers

SQL Server Job - how to generate script for Alert System Settings

In our SQL Server 2008 Agent properties dialog box we have set an Alert System settings as shown below. But when we try to generate a script for that we get the following message - hence unable to generate a T-SQL script. Is there a T-SQL script or…
nam
  • 21,967
  • 37
  • 158
  • 332
0
votes
1 answer

Which User will be invoking SQL Server Agent Job when using a Windows Task Scheduler to automate the Job to run daily?

I am using SQL Server 2008 to create a job to calculate some values from an external db and store to another db table. A task scheduler has been created for automating this to run daily and update results to the 2nd table. The job is getting failed…