Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I retrieve information about a SQL Server Agent job scheduled against databases on SQL server 2005?

share|improve this question

migrated from Jan 3 '12 at 16:26

This question came from our site for professional and enthusiast programmers.

Jobs are DB agnostic: the steps that comprise a job may have a database context

sysjobsteps has a database_name column

Name of the database in which command is executed if subsystem is TSQL.

You can join this back to sysjobs and the other related tables to get what you need.

share|improve this answer
Thanks for your reply, but if the subsystem is SSIS then the Database Name in the sysjobsteps is null. – John Jan 3 '12 at 15:03
@John: of course. These details are in the SSIS package... – gbn Jan 3 '12 at 15:04
can u please help how I can retrive the same details if the Subsystem is SSIS – John Jan 4 '12 at 9:55
@John: sorry, you can't from SQL Server. – gbn Jan 4 '12 at 10:19
What is the other Way??? – John Jan 5 '12 at 10:07

Based on your comment string with gbn, I'd recommend that you connect to the SSIS instance using SSMS. Then you would find the specific package (under "Stored Packages" and either "File System" or "MSDB") and right-click the package and export it. You'd wand to choose "File System" for the destination. The you can edit the package inVS.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.