Solved

FTP

Posted on 2011-09-06
3
290 Views
Last Modified: 2012-05-12
Hi,

I have query in sql gives me xml result
So I need to use that result query by  FTP Task in SSIS

Thanks
0
Comment
Question by:samprg
  • 2
3 Comments
 
LVL 14

Expert Comment

by:Christopher Gordon
ID: 36491609
Are you looking to export the contents of an XML result of a stored proc into a file that you can then use by the FTP task in SSIS?  If so...

Normally, I'll use bcp to handle this in a "process task" in  SSIS.  You can create a batch file that calls the BCP command and refer to that .bat in your "process task".

The .bat file would look something like this...

bcp "select * FROM YourDatabase.YourSchema.YourObject FOR XML RAW" queryout c:\OutputMyData.xml -S MyServerName -T -w -r -t

Note: XML RAW is just an example, you can use whatever options you'd need based on the requirements.



0
 

Author Comment

by:samprg
ID: 36491733
I wanna use task in SSIS like T-sql to create an XML file,
but How I can save queryout in xml file to use it in FTP task?
0
 
LVL 14

Accepted Solution

by:
Christopher Gordon earned 500 total points
ID: 36491801
hi samprg,

I've used the "Process Task" to execute BCP in a .bat file in order to create the XML Output file.  There may be a task that allows you to export the stored procedure to xml file in a data flow task, but I've never used it.  

As a second step, I use the "FTP task" to use the file created in the previous "Process Task" step to FTP the XML Output file to an FTP destination.

Sorry if this wasn't what you were looking for!  I'll be offline until l8r this evening.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Long way back, we had to take help from third party tools in order to encrypt and decrypt data.  Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

685 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