Solved

FTP

Posted on 2011-09-06
3
286 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

763 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

15 Experts available now in Live!

Get 1:1 Help Now