Take the 2-minute tour ×
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. It's 100% free, no registration required.

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

share|improve this question
add comment

migrated from stackoverflow.com Jan 3 '12 at 16:26

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

2 Answers

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
show 1 more comment

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
add comment

Your Answer

 
discard

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.