Questions tagged [sql-agent-job]

this tag is used to discuss about the issues are occurred when add or modify the job steps, schedules, alerts, and notifications of sql server agent jobs.

SQL Server Agent job can be create in SQL Server by using SQL Server Management Studio, Transact-SQL, or SQL Server Management Objects (SMO).

421 questions
2
votes
1 answer

SQL Server Agent Job Can't Read Shared File

I've been stuck on this for sometime now. I have an SSIS package thats supposed to read a file and populate a database. I need to run it from a SQL Server Agent Job and the source files to read are located on a folder in another server that I have…
Coda759
  • 107
  • 14
2
votes
2 answers

Will archiving lots of old data lock my Database?

I need to move the data that is a month old from a logging table to a logging-archive table, and remove data older than a year from the later. There are lots of data (600k insert in 2 months). I was considering to simply call (batch) a stored proc…
Kraz
  • 6,910
  • 6
  • 42
  • 70
2
votes
2 answers

Whose logon is being used in a SQL Server 2008 Agent Job

I have an SSIS package that transfers some tables to CSV files on a network drive; it runs fine from my computer manually. I store it on the server in the MSDB database and execute it from there and it runs fine, but when I create a job that has one…
markA
  • 1,609
  • 2
  • 17
  • 26
2
votes
1 answer

SSIS, fire events and the execution reports

I have an SSIS package with a script task that fires various information and warning messages, for example: Dts.Events.FireWarning(1, taskName, "Common Version API URL not specified", null, 0); This works fine on my laptop where I have it running…
Andvik
  • 119
  • 1
  • 12
2
votes
2 answers

SSIS package - Script task does not get executed when triggered through SQL Job Agent

I have an SSIS package that creates 2 text files using a data flow component. It connects to an SQL database and if the query returns data, the 2 files are created. After that, a script task loops through the folder where the 2 files are written…
Daniel227
  • 127
  • 9
2
votes
3 answers

error with ssis package in sql server job

Help solve the problem. There is a ssis package which in visual studio runs without problems, but returns an error in the sql task. The packet in the work takes the data from sql server and writes in mysql. The error is this: It is executed on…
noanother
  • 53
  • 7
2
votes
0 answers

ODBC error when executed by SQL JOB AGENT

I am getting an error when I try to execute my SSIS Package by the Job Agent. If I run through Visual Studio it runs perfectly. The error is: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on ODBC Source returned error code…
2
votes
1 answer

How does a variable like `User::filePath` get passed to a script in an SSIS package that's run by an SQL Agent Job?

If I look directly at the script, the call to sp_add_jobstep when using CREATE SCRIPT for this is: @command=N'/FILE "" /CONNECTION "FlatFileConnection;"" /CHECKPOINTING OFF /REPORTING E' So it…
leeand00
  • 25,510
  • 39
  • 140
  • 297
2
votes
1 answer

Error 0xC0011008 the package failed to load

I'm facing a strange behavior of SQL Server Agent when executing SSIS packages. I have a job that includes many steps (mainly SSIS packages). Some steps fail mostly every day even the configuration is the same for all the steps. I tried to…
2
votes
0 answers

SQL server jobs history - job execution id?

I'm trying to figure out how SQL server groups their job history hierarchy to relate an outcome to all job steps. I'm using a data visualization tool to track errors in a dashboard, but the whole (Job outcome) step is driving me crazy. Is there no…
henhen
  • 23
  • 9
2
votes
1 answer

Error Handling in SSIS

I have created a SSIS package which gets the XML file from a folder and checks with the schema, if the schema fails, the package logs the error and moves the file to a error folder. Currently, I have done all the requirements, and is working fine…
Ranjith Varatharajan
  • 1,596
  • 1
  • 33
  • 76
2
votes
3 answers

How to continue executing SSIS SQL job even after task fails?

Scenario The scenario is to connect to multiple POS terminals and fetch data and save to a table in a staging Db. For instance, there are 10 POS terminals, each terminal has different IP and Database name. However the table where the select query…
Isha
  • 121
  • 2
  • 11
2
votes
3 answers

How to Efficiently Document SQL Server Agent Jobs

My team is pretty much all new and we inherited several automated jobs which we have little or no documentation on (nothing in the job description either). We have hundreds of automated jobs that run on the SQL Server Agent and various servers so I…
2
votes
1 answer

Permissions issue while running SqlAgent Job

When I try to run a Sql agent job, I am making a check that, there are no prior instances running at the same time. The query is given below: IF NOT EXISTS(SELECT 1 FROM msdb.dbo.sysjobactivity ja…
2
votes
1 answer

PowerShell [wmiclass] Win32_Process.Create() then wait for batch file to complete

I have scheduled a SQLserver agent job that execute a PowerShell script that calls a batch process to start. However, when PowerShell is executed, it did not wait for the batch file to complete before moving to the next job step. What can I do to…