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

SQL Server 2005 Job - Call PLSQL procedure using connection string from registry

I hope I am asking a reasonably easy question - just trying to save myself some time to be honest. :) All I want is to call a PL/SQL procedure from a SQL Server job. I already have the connection string in a registry string and I have the procedure…
1
vote
2 answers

How to remove part of previous string

I'm currently working on a SQL Server JOB file that contains the following code @active_end_date = 99991231, @active_start_time = 0, @active_end_time = 235959, @schedule_uid = N'59cbfb7d-67c7-495c-810d-0ca7a6357f9c' IF (@@ERROR <> 0 OR…
Jarno343
  • 91
  • 1
  • 7
1
vote
1 answer

Schedule importing flat files with different names into SQL server 2014

As I am a beginner in SQL Server and my scripting is not very polished yet. I need suggestions on the below issue. I receive files from a remote server to my machine (around 700/day) as follows…
Ayaz
  • 151
  • 3
  • 13
1
vote
1 answer

How to iterate through table for an sql job?

PerformanceReview prID reviewDate passed notes successStrategy empID nextReviewDate above is my table I am working with, my goal is to get the nextReviewDate check to see if it is within 7 days of the current date ( I will do this using DATEDIFF() )…
ImDeveloping
  • 101
  • 9
1
vote
1 answer

Re-execute SQL Server job in case of failure

Currently I am creating a SQL Server job. My requirement is whenever the job fails, it needs to run one more time. Is it possible in SQL Server?
bmsqldev
  • 2,627
  • 10
  • 31
  • 65
1
vote
1 answer

Linux server: Send mail to my users

I am fairly new to creating server scripts and jobs that the server runs every day. My problem is as follow: I want to send an email to my users reminding them of a specific job they have to do. My idea: Database -> collect all users who needs to be…
Marc Rasmussen
  • 19,771
  • 79
  • 203
  • 364
0
votes
1 answer

Accessing files on different server through SQL Server Job Agent

I have a SQL Server Job running on server X. Now I have to delete the existing AS(Analysis Services) backup files on server Y and create a fresh backup again. I wrote the required code in a batch file and saved it on hard drive of server X. I am…
Vamshi Vangapally
  • 1,972
  • 6
  • 21
  • 25
0
votes
0 answers

How do I pass a string argument with spaces to a powershell script called by cmdexec in SQL Server Agent Job?

Any other time this works C:\Windows\System32\WindowsPowerShell\v1.0\Powershell.exe -ExecutionPolicy RemoteSigned -File "C:\Users\me\Documents\SQL Server Management Studio\Powershell Scripts\ps_A_PowerShell_Script.ps1 " But if this needs…
On The Net Again
  • 265
  • 4
  • 16
0
votes
0 answers

What happens if a SQL server update job is still running at the end of the scheduled time?

I have an update statement I need to run on a table, however due to the size of this table the update takes an incredibly long time to run. I want to create a SQL server job to run this update script for 3 hours every morning before business…
0
votes
0 answers

SQL Job failed with Connection Error (SSIS)

I have a SSIS project deployed in SQL Server SSIS 2015. I also have a scheduled job which runs the project in SQL Server 2016 (SQL Server Agent JOB). When I run the project in the SQL Server Agent Job, I get this error (ADO NET Source has failed to…
dodo
  • 13
  • 1
  • 1
  • 7
0
votes
1 answer

Get error trying to create SQL Server Agent Job with XMLA command

I am trying to run an XMLA command that kicks off an Xevent trace as a SQL Agent Job. (below) The command works fine in SSMS as an XMLA query. When I try to save this step as an SSAS Command in an agent job, it throws an exception - An exception…
Bill Park
  • 3
  • 2
0
votes
1 answer

SQL Server Integration Package Conversion Error only when calling from job, not when executing in SQL Server Data Tools

Maybe somebody can provide assistance for the following question: I have a SSIS package with Target SQL Server Version 2014. I am not 100% sure which version my target server is running, but it is at least 2014, but i assume its 2016. I have…
0
votes
0 answers

Common property file for multiple SQL Server Jobs

In our project, we have a lot of SQL Server Jobs (Local SSIS package) and in all of them, we have some common properties. We don't find a way to "place" these properties somewhere to be used by all the SQL Server Jobs. For now, we used to set up…
ElRoro
  • 203
  • 1
  • 13
0
votes
1 answer

Can't open properly a SSIS package based job from SSMS in Visual Studio

I need to understand what a certain job in SQL Server 2012 does. It's a job someone created and left the company before I started to work here, and nobody on my team knows what this job does also. The job isn't SQL command based but SSIS Package…
Emily
  • 11
  • 2
0
votes
0 answers

A successfully failed SQL Server Agent job? - The statement has been terminated. Message 3621. The step succeeded

I have a SQL Server Job which has some steps include execution of store procedures. The job ran successfully. However, some steps which executes store procedure did not run fully as per my understanding. The message is The statement has been…
Jay Desai
  • 821
  • 3
  • 15
  • 42