499
questions
0
votes
1
answer
52
views
How to find value for SSIS package project parameter manually set in the SQL Server Agent job?
I have a package called MyPackage. It is part of the project MyProject.
It has three parameters:
ParameterA, ParameterB, ParameterC
ParameterA is set through an environment
ParameterB is using the ...
2
votes
1
answer
87
views
What does "include step output in history"-setting control in SQL Server Agent for TSQL steps?
When you create a TSQL job step, there's an advanced setting called: "Include step output in history", but I don't understand what this setting controls:
A sample job script:
DECLARE @jobId ...
0
votes
0
answers
37
views
SQL Server Agent Job cannot run a query on audit log
I would like to send the result of the following query by mail every 15 minutes.
select
event_time, server_principal_name, application_name,
database_name, statement
from
sys....
0
votes
1
answer
54
views
Call log file viewer from T-SQL
I am viewing historic stored procedures in SQL Server by opening "Job Activity Monitor":
Right click on my job and select "View history":
which returns a table, which I then ...
0
votes
0
answers
70
views
How do you set a Parameter for an SSIS task in SQL Server Agent Job to Null when Required is set to False
When you first deploy a package and set up a job I can see some parameters are defaulted to NULL and it appears in italics so you know it is NULL value and not a NULL text. However, when you view the ...
0
votes
0
answers
63
views
SQL Server Agent Job Execution Based on a Trigger
I have following scenario to tackle some Production data gaps for various reports in a Datawarehouse:
We have few reporting tables, which get refreshed everyday with SQL server agent jobs. Jobs are ...
0
votes
0
answers
40
views
SSIS Package Generates Correct File Name in SSDT, but SQL Server Agent Job Uses Default Name
I have an SSIS package that generates a CSV output file with a dynamically generated name based on the current date and time. The expression for the file name is set in the FilePath variable within ...
0
votes
0
answers
55
views
SSIS Upgrade from 2016 to 2022 - Script Task Not refreshing Excel File while running the package from SQL Server Agent
We have upgraded our package and integration services from 2016 to 2022.
Package is running fine from local and from cmd using DTEXE, but same package is failed while running from SQL server agent.
...
0
votes
1
answer
59
views
Job step dependent on the availability of the database
I have a procedure that should be run just after databases are restored. For that, I want to make a job with 2 steps:
Checking the databases' status at time intervals
Procedure, triggering after Step ...
0
votes
0
answers
28
views
SQL Agent step with cursor not excuting for all databases [duplicate]
I have a SQL Agent job with a step that uses a cursor to run a DBCC CHECKDB for all databases. However, it randomly stops before it runs for all databases. The job succeeds, and I see no errors in ...
0
votes
2
answers
151
views
Disable SQL Server Agent job on failure
I have a daily scheduled SQL job on SSMS with multiple steps, if any of these steps fail, I want to disable the job in order to prevent the scheduled job from running the following day.
I have ...
2
votes
1
answer
655
views
SSIS Job randomly succeeding, usually resulting in "Unexpected Termination"?
The Job looks like this, with a Script Task checking a directory for an (.xlsx) file of interest available for processing, and if found, marks a boolean variable for Precedence Constraint as {True}. ...
0
votes
0
answers
177
views
SSIS Package with 7-zip exe not working in SQL Server Agent
I created a SSIS package to extract zip files (which contains Csv files) using 7-zip then uploads the data into SQL Server. When I run it in Visual Studio, it worked perfectly, but when I run the job ...
0
votes
1
answer
120
views
Missing data in the SQL Server Agent Job Output to a File
I have below script which would give me the definitions of all the views in one of my DBs.
SELECT OBJECT_DEFINITION(object_id) FROM sys.objects WHERE[type] = 'V'
This works real good when I run it as ...
0
votes
0
answers
40
views
Asci.SqlDmo.Interop, Version=14.0.0.0' not found when running SQL Server Agent job
I am attempting to run a SQL Server agent job from an outside scheduler on SQL Server 2017 (v14) and when doing so I am encountering the following error(s):
SMO failed with the following exception:
...