Solved

SSIS Package containing XCopy will not run as Job in Mgmt Studio

Posted on 2008-06-22
6
1,108 Views
Last Modified: 2012-05-05
I have an SSIS package which runs fine thru BIDS, as well as when I log on to Mgmt Studio and Execute it manually as a Package.  However when set up as a Job, it doesn't seem to run, although it does not fail.  It just continues to display "Executing."  Research thus far seems to indicate that it is related to the particular step within the package which contains a literal filename path (I'm performing an XCopy).  I've tried all different encryption options within the package security settings but it still doesn't run as a job.  Does anyone know if I need to set up a Proxy Account, and if so, can you explain exactly how to do this?  I am more of a developer than a DBA, but I'm hoping I can at least get enough information to work with our DBA toward a resolution.
0
Comment
Question by:VDanner
  • 3
  • 2
6 Comments
 
LVL 13

Expert Comment

by:rickchild
ID: 21841762
What account is the SQL Service (MSSQLSERVER) and the SQL Agent running as?
Are they set to the default of something like "NT Network Service".

You could try running thes services as a user with permission to access the file path.
0
 
LVL 6

Expert Comment

by:DocCan11
ID: 21841855
ok.. this is actually a three step process..

1) I would create a user account that has permission to the directories in question..
2) go in to SQL 2005 Managment Studio(MS), under security, credentials right click and choose new credential.. fill in a name and then link to the user account you created in step 1.. Fill in the password..
3)  in SQL MS click on sql server agent, proxies, Operating System. Right click and and choose new proxy, fill in a name and point to the credential you created in step 2..

now all you need to do is allow the user who is running the job access to the proxy by clicking on principals and choosing who can use it..

This will give your code the needed permissions to run an OS step.. by linking it up to the credential..

If you tell me how you run the step I will try and help you with that as well
0
 

Author Comment

by:VDanner
ID: 21842170
DocCan11 - thanks for your response.  Remember I'm not much on security so here are my questions:
Since I have access to this path can I not just use my Windows user account?  I'm hoping that I can although the way I have attempted it thus far hasn't worked.  Not sure how to create a new user account.
Whatever account I do use in Step 2, do I precede this with the DOMAIN?  ie DOMAIN\User?
In Step 3 I also added option to Run SSIS packages, because when editing the Job, in the Step page, I can change from  "Run As SQL Server Agent" to "Run As proxyname".  
Do I need to change anything else within the Job properties, such as name of owner?
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 6

Accepted Solution

by:
DocCan11 earned 500 total points
ID: 21842469
If you are not worried about security you can use your own account.. and it should be a domain account (although you can use a local account depending on what the package does).. you would enter it in the format domain\user.
 
you should not need to change anything else .. but if you run into problems we can deal with that..
0
 

Author Comment

by:VDanner
ID: 21850680
DocCan11: In working more with our DBA, we tried another approach.  The troublesome task within the package seemed to be the one running an executable bat file.  The bat file is on the same machine as SQL Server.  When building the SSIS package on MY machine, I included the full UNC pathname to the file, tested it, then deployed it to the Server machine's SSIS Package Store.  It ran fine as a package, but not as a Job.  Our DBA tried redoing the package, modifying the bat file pathname to just the drive letter and filename, then saving out to the file system of the server machine.  It now runs as a job!
I don't understand why the UNC approach would not work, but at least we have the problem fixed.
Thank you for your time and thoughts on a resolution.
0
 

Author Closing Comment

by:VDanner
ID: 31469564
I'm not sure if your approach would have worked since I needed to go with what our DBA recommended, but thanks very much for your help.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

If you having speed problem in loading SQL Server Management Studio, try to uncheck these options in your internet browser (IE -> Internet Options / Advanced / Security):    . Check for publisher's certificate revocation    . Check for server ce…
Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now