Solved

SSIS - Executing SQL code modules

Posted on 2012-12-31
3
323 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
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.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

770 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