Click here to Skip to main content
Click here to Skip to main content

How to Schedule and Run a SSIS package ( DTS ) Job in SQL Server 2005

By , 9 Jun 2006
 

Introduction

How to Schedule and Run a SSIS package ( DTS ) Job

 

In the SQL Server 2005, after you create a SSIS package ( DTS), you want to create a job and schedule to run it. You will get the error to prevent you to run the job. What is the problem?

 

Here is why: SQL Server 2005 is quite different from SQL Server 2000. In SQL Server 2000, you can create the job and run it without problem. In SQL Server 2005, you need to go through the security layer in order to run the job.

 

The logic is like this:

Ø      The job executor account needs the roles of sysadmin,  SQLAgentUserRole, SQLAgentReaderRole,  SQLAgentOperatorRole

Ø      The job needs to be run under Proxy account

Ø      The job executor account is better to be used to create SSIS package and so you are sure the job executor account has the right to run this SSIS package.

 

The following steps can be followed to get the job done.

The work environment is MS SQL Server Management Studio and you log in as sa.

 

I. Create job executor account

Highlight Security->New Login, say to make login as devlogin, type your password, default database can be your target database.

Server roles: check “sysadmin

User mapping: your target database

Msdb database: you make sure to include SQLAgentUserRole, SQLAgentReaderRole,  SQLAgentOperatorRole

Then click OK

 

II. Create SQL proxy account and associate proxy account with job executor account

Here is the code and run it the query window.

 

Use master

CREATE CREDENTIAL [MyCredential] WITH IDENTITY = 'yourdomain\myWindowAccount', secret = 'WindowLoginPassword'

Use msdb

Sp_add_proxy @proxy_name='MyProxy', @credential_name='MyCredential'

Sp_grant_login_to_proxy @login_name=' devlogin', @proxy_name='MyProxy'

Sp_grant_proxy_to_subsystem @proxy_name='MyProxy', @subsystem_name='SSIS'

 

III. Create SSIS package

In MS SQL Server Business Intelligence Development Studio, you use job executor account devlogin to create the SSIS package (DTS) and make sure you can execute this package in SQL Server Business Intelligence Development Studio. Compile/build this package.

 

IV. Create the job, schedule the job and run the job

In SQL Server Management Studio, highlight SQL Server Agent -> Start. Highlight Job ->New Job…, name it , myJob.

Under Steps, New Step, name it, Step1,

Type: SQL Server Integration Service Package

Run as: myProxy

Package source: File System

Browse to select your package file xxx.dtsx

Click Ok

Schedule your job and enable it

 

Now you can run your job.

 

If you think this is very helpful, please leave your comments online. If you have any questions or suggestions, please email me at hong_wei_li@yahoo.com.

 

Happy SQLing!

 

- Hongwei Li

 

 

 

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

hong_wei_li@yahoo.com
Web Developer
United States United States
Member
.Focus on database (SQL Server 2005/2000/7/6.5 and Oracle 10g) development with C#,
 
ASP.NET, ASP, Java, PHP.
.Like to work with MS Server 2005 SSIS and report service
.Like full cycle software design, development and deployment
.Microsoft Certified SQL Server Developer and DBA.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
QuestionThis just saved me from madnessmemberglynrb16 Jan '13 - 0:22 
I'd been struggling to get an SSIS package to run in a very complex environment. In the end I decided to act stupid and simply follow these instructions. It works (yes there is the message about sysadmins), and as long as you don't stupidly add a space before the name of your login (well I did say that I had decided to act stupid) it works first time.
 
Thank so much.
 
Glyn
GeneralMembers of sysadmin server role are allowed to use any proxy.memberMohammed Raheem23 Jul '12 - 1:55 
'devlogin' is a member of sysadmin server role and cannot be granted to or revoked from the proxy. Members of sysadmin server role are allowed to use any proxy.
 
sfdsfsdfsd
QuestionCreate SSIS with job executor, how?memberzhuangrich17 Jul '11 - 20:39 
Hi
 
Your info is very useful and serve a good guidance...it is precise and concise. Thank you for your article.
 
I have a query, from your article:
 
"In MS SQL Server Business Intelligence Development Studio, you use job executor account devlogin to create the SSIS package..."
 
When I open my BIDS, there is no User & Password prompt for me to enter. I can create new SSIS directly. Hence, how do I ensure I use my job executor account to create SSIS package?
 
Regards,
Rich
GeneralThanks a lot - Muchas GraciasmemberMember 358032614 Jan '11 - 8:23 
IT works...thank you
 
Muchas Gracias.
GeneralWow... Thanks its worksmemberanakbinus17 Aug '09 - 17:40 
Thanks A lot Mr. Hong, now i can run shedule ssis package
GeneralGreat help!memberOmoba28 Apr '09 - 5:07 
thanks a lot, your article really helped me with scheduling my SSIS package. Thumbs Up | :thumbsup:
 
Is life easier, with or without technology?

Generalfaster extraction and loading on SSIS.memberblackpower2k725 Apr '09 - 19:54 
hi...
check out the below link for getting some tips over faster extraction and loading on SSIS.
 
http://www.sqllion.com/
 
You will know me better sooner...

GeneralSSIS execution from SQL agentmembermmohsin20 Jan '09 - 6:40 
Hi,
 
The article very precise and a good one. I am trying to implement the same on my servers and I have two issues here,
 
1) I created all my packages in my local servers and now I have to move these to dev, UAT and prod servers where I do not have the username under which these packages were created.
- How to convert the package creator name to a executor name?
2) When I running the package, the job start but it never calls the SSIS itself. In the sense the job monitor shows that it is running but but won't trigger the package at all.
 
Please advice.
 
Thanks,
-Mohsin
QuestionDo I need a NT account for creating an credential?memberChris sc Lee9 Dec '08 - 14:55 
Hi,
 
In step 2:
II. Create SQL proxy account and associate proxy account with job executor account
 
CREATE CREDENTIAL [MyCredential] WITH IDENTITY = 'yourdomain\myWindowAccount', secret = 'WindowLoginPassword'
 
So does it mean I need a Windows account before creating a credential? Thanks.
 
Chris
GeneralSSIS OLE DB Source oracle proc callmemberWTurcios27 Aug '08 - 9:49 
hong wei li,
I am designing an SSIS package with Data Flow that will call an oracle proc.
 
Currently on my Data flow i have the following:
 
* OLE DB Source - using Microsoft OLE DB for oracle driver for OLEDB connection
*Data Access mode - SQL Command
 
* SQL Command text - {call report.usp_get_unit_info}
 
If I click preview I get a window and see the top 200 rows.
But when I click Columns I cannot see the columns to map to an OLE DB Destination.
 
In PL/SQL I would run the following block.
begin
report.usp_get_unit_info(out_cursor => :out_cursor);
end;
 
I can write this in a script task but can't figure out why this won't work.
I could not find any information calling io cursor procs in oracle.
 
WT

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web02 | 2.6.130523.1 | Last Updated 9 Jun 2006
Article Copyright 2006 by hong_wei_li@yahoo.com
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid