Questions tagged [sql-job]

A job is a specified series of operations performed sequentially

Jobs define an administrative task that can be executed one or more times (manually or via a schedule) and monitored for success or failure each time it executes

272 questions
0
votes
0 answers

SSIS error caused by 'EXECUTE master.dbo.xp_sqlagent_is_starting @retval OUTPUT'

I have a ssis package (and configuration file) developed for sql2012 to start sql agent job. The following commands are used throughout the package: msdb.dbo.sp_start_job msdb.dbo.sp_help_job msdb.dbo.sp_help_jobhistory And, i get the error…
To Do
  • 151
  • 11
0
votes
2 answers

Best way to purge multi million data in SQL Server

I have around 10 billion system (infrastructure) data in SQL Server of last 5 years, and I want to purge that data incrementally on every weekend, same time other jobs also running which doing maintenance and inserting data of that particular day…
0
votes
0 answers

SSIS Package Failing during Job

I have a SSIS Package that run's fine locally but it is failing while I run it on a job with the following error Error Occured ..Please see the error Message :Object reference not set to an instance of an object. The code is below using…
Alexander
  • 313
  • 7
  • 20
0
votes
1 answer

SQL Server Agent job: Run T-SQL query and then send email?

We currently have a SQL Server Agent Job that has one step: to execute a stored procedure at 10AM daily that populates a SQL Server table. Using only SSMS, I want to modify that job to do the following: send an email where the email contents will be…
0
votes
0 answers

CDC job still tracking changes done on table(enabled with CDC) SQL server

I currently have CDC enabled on a table for tracking changes done, however while playing around with it. I found out that even though I disable the CDC capture jobs associated with the table, the CT table still tracks all the INSERT and UPDATE done…
nciacrklo
  • 83
  • 2
  • 9
0
votes
2 answers

How to check a database table frequently?

I am working on a leveling system where user will be leveled up whenever they reached certain amount of points, says when he/she gained 100 points will be leveled up to Level 2. For this I was able to do the leveling "real time", as I will check if…
Leonz
  • 141
  • 12
0
votes
2 answers

Powershell Job Step in SQL Error

I'm new to PowerShell and still early in SQL Server, but I'm trying to write a PowerShell step for a SQL Agent job that looks at a CSV file that contains names of .sql files. It should then look at a different directory and if the names from the…
Aerobane
  • 85
  • 9
0
votes
1 answer

ACE Oledb 12.0 issue in SSIS package while exporting data to excel

I have developed a simple SSIS Package which exports some 10000 rows to an Excel .xlsx file. This package is running fine in my Local BIDS but when scheduled on server using Proxy account It is running successfully but Excel is not loading. After…
0
votes
1 answer

SQL Jobs not being listed with Powershell

Using the powershell code below, the script runs and nothing happens. There ARE existing Jobs. And the Server name is correct. No error, it just runs and immediately returns. $srv = New-Object Microsoft.SqlServer.Management.Smo.Server("sql01")…
A.G.
  • 2,089
  • 3
  • 30
  • 52
0
votes
1 answer

How to control flow of steps in task scheduler

As we know in SQL job agent, we can manage the control of steps for ex:- lets a job has following steps:- step 1 step 2 step 3 step 4 we can control the flow as if step1 is success go to step 2 else go to step 4 Can something like this be done in…
Tyler Durden
  • 207
  • 1
  • 5
  • 10
0
votes
1 answer

SQL Server Log File Viewer Fails

We have about 100 Automatic Tasks in SQL Server, and for about the past 3 days a few of them have been failing. Is it possible with the log viewer to know which one has been failing? The log only shows Message [298] SQL Server Error: 15404, Could…
0
votes
1 answer

SQL Server 2012 Job Failure - send email

After doing some research here and elsewhere, and trying a few troubleshooting attempts, I come to you good folks for help. In SQL Server 2012, I have a job, with (currently) only one step. That step goes something like this: EXEC…
0
votes
1 answer

SQL Agent Job runtime alert

I was hoping i could get some help on how i can setup an e-mail alert for a specific agent job, such that it sends an e-mail alert when the run duration exceeds 30 minutes. Would it be easier to add this step in the job itself? Are there any…
samalkobi
  • 77
  • 1
  • 10
0
votes
1 answer

Why can't I add SQLUserAgentRole to "sa" user on msdb?

I'm trying to schedule an sql query to run daily. For that I need (according to this) to use a user with the SQLUserAgentRole database role. So I've tried to add the SQLUserAgentRole to the "sa" user on the msdb database but I get the error 15405:…
belyid
  • 841
  • 2
  • 12
  • 28
0
votes
1 answer

SQL job to clear LDF file

I've created a SQL job to clear LDF file which runs once in a week. Below is the screen shot for steps i've done. Also I've tried below queries DBCC SHRINKFILE ('C:\MSSQLDATA\LOG\HDE.ldf', 1); USE HDE; GO DBCC SHRINKFILE…
nag
  • 920
  • 6
  • 27
  • 51