Solved

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

Posted on 2008-06-22
6
1,125 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

729 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