Solved

ssis execute sql task how to ?

Posted on 2011-03-02
3
469 Views
Last Modified: 2012-05-11
In my dtsx packages. I have bulk insert task and execute sql task how do I link between this two ? and what option I have in execute sql task to save the query results to txt file and how to configure it ?
0
Comment
Question by:motioneye
3 Comments
 
LVL 7

Assisted Solution

by:lozzamoore
lozzamoore earned 50 total points
ID: 35016181
You need to explain in a bit more detail what you mean by "link the two".

Generally tasks are "linked" to a "Connection". Once a connection is created, then the corresponding Connection property can be set in each of the Tasks.

As for results to txt file, if you are running a SQL query that produces results, then you would typically run this within a Data Flow task, and not a SQL Task.

Hope this helps,

L
0
 
LVL 17

Accepted Solution

by:
Barry Cunney earned 450 total points
ID: 35016189
Hi MotionEye,
To get query results to text file, the best approach is to drag an OLEDB Source object  and a Flat File  Destination object into the Control Flow section  in Designer.
Edit the OLEDB source to execute an SQL Command and enter the SQL statement that gets the required result set.
Edit the flat file destination and enter the path of the required text file
I have attached a print screen as an aid
SSIS.jpg
0
 

Author Closing Comment

by:motioneye
ID: 35016479
Thanks for the quick help :)
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

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…
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 extract information from SQL Server on Database, Connection and Server properties
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

825 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