Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7735701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:34:01+00:00 2026-06-01T07:34:01+00:00

I know how to create a job dynamically from this create-sql-server-job-automatically The issue I

  • 0

I know how to create a job dynamically from this create-sql-server-job-automatically

The issue I have with this technique is clean up is required to delete all these jobs I create
What I am looking for is a way to pass in a parameter to a Job or change a Job step dynamically

Background
I have a series of SSIS jobs I need a tester to run. I was shot down in creating a webpage to call a WCF service that sits on the DB Server to execute the package. I can not use xp_cmdshell. So the third option was calling the package through a sql job. Now while I can create one job per package ideally I would like one job where I can pass in the package name, a config file, and maybe some dynamic variables.

Looking at this post Calling SSIS Package from Stored Procedure in SQL Server 2008
I can see how I create the dynamic package, again the concern is cleaning up the jobs.

Constraints
The reason I am going down the road of creating a job dynamically is a result of the following constraints

The testers do not have Sql installed on there machine so they do not have access
to the BIDS environment nor DTEXEC

For reasons not completely logical I am restricted from using c# and building a 
WCF service that would call the package through code

I can not use xp_cmdshell due to permission and security issues.

Now if there is a better way to handle this without Sql Jobs I am open to that possibility but the main goal is to create a form (web or windows) that the tester can choose a package, run it and see the internal logs of the package run that we record.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T07:34:02+00:00Added an answer on June 1, 2026 at 7:34 am

    For starters I proposed a ‘cleaner’ version on how to solve the question you linked too. Going from there it’s only a small step to here : sp_add_job where you’ll find the explanation for @delete_level

    Value Description
    ----- -----------
    0     Never
    1     On success
    2     On failure
    3     Always
    

    So in short, if you want jobs to clean up after themselves, use @delete_level 1 or 3 according to your needs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this SQL Job (in SQL Server 2005) that creates a backup every
I know how to create simple object and add dynamically properties to it. object
I know how to create a PrintWriter and am able to take strings from
Does anyone know how to create an entire database from a visual studio database
this is what I mean: job has many docs. I want to create a
I'm new to MVC and wanted to know how we can create controls dynamically
How do you create a cron job from the command line, so that it
don't know if this is possible.. I'm using sqlite3 schema: CREATE TABLE docs (id
I have a SQL Agent Job that has multiple steps which are scheduled to
What kind of skills should a WPF developer know to create MVVM applications? Things

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.