SFTP a file created on SQL Server with a Stored Procedure to a UNIX Server -
i'm trying create sql server stored procedure generate xml file. once file generated, has sftp file unix server. i've never done sftp stuff before here i'm seeking help. please take @ below stored procedure i've written , me out.
use [mydb] go set ansi_nulls on go set quoted_identifier on go create proc [dbo].[generatexml] select fileid, systemid, filename dbo.file xml raw('file'), elements, root('file') declare @cmd varchar(255) set @cmd = 'osql -e /q “exec generatexmlproc” /o usadevenv01:/home/xml/file.xml' exec xp_cmdshell @cmd go
i facing similar problem , solved using ssis , free tool called winscp.
first shuold know that:
by default, sql server integration services (ssis) not support access sftp sites. 1 way of getting done using third party software, there's free tool called winscp provides command line utility communicate sftp sites. has scripted command line , executed ssis.
then...
the first step download , install winscp, need on sql server running ssis package. once have installed winscp should create connection distant sftp server in winscp can test , confirm can connect it. create , name saved session can call session script later.
finally...
deploy , execute ssis packages using stored procedures
http://www.codeproject.com/articles/23740/sftp-with-ssis-packages
http://gregcaporale.wordpress.com/2012/02/23/using-sftp-in-sql-server-ssis/
http://technet.microsoft.com/en-us/library/jj820152.aspx
good luck!
Comments
Post a Comment