Solved

FTP

Posted on 2011-09-06
3
289 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

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, …
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

790 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