Solved

SSIS - Executing SQL code modules

Posted on 2012-12-31
3
317 Views
Last Modified: 2012-12-31
I am brand new to SSIS.  I am using MS Visual Studio 2008 Professional Edition. I understand from my few exposures to it that you can set it up to execute several SQL code modules in turn, one after another (not all at the same time).  I have 7 such code files (Pass1.sql, Pass2.sql, ..., Pass7.sql).  

I created an SSIS project and in the control flow section I put in 7 instances of the Control Flow Item "Execute SQL Task".  I tied these together with Precedence constraints.  In each item I set the SQLStatementSourceType property to "FileConnection" and in the SQLStatementSource property I put the full file spec.

When I try to execute this mess SSIS tells me it can't find the source code.  Yet if I copy the entire filespec and paste it into Windows Explorer, SQL Server Mgt Studio fires up and loads my source file correctly (so I know there isn't a mistake in the file spec I put into the property).

I must be missing something.   What is it?  See attached Word Doc with 3 screen shots in it.

Thanks
DocError.docx
0
Comment
Question by:RichNH
  • 2
3 Comments
 
LVL 42

Accepted Solution

by:
EugeneZ earned 500 total points
ID: 38733432
try this example:

Execute .SQL files by using SSIS
http://sqlage.blogspot.com/2012/10/execute-sql-files-by-using-ssis.html
0
 
LVL 42

Expert Comment

by:EugeneZ
ID: 38733439
also make sure you can access to your \\shared folder\file
0
 
LVL 1

Author Closing Comment

by:RichNH
ID: 38733569
I didn't want to use a loop but your link provided me with enough that within a few minutes I figured it out.  She's executing now.   I appreciate the push in the right direction.   Thank you!!!!
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

707 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

18 Experts available now in Live!

Get 1:1 Help Now