SQL代码从FTP下载文件 [英] SQL code to download a file from an FTP

查看:112
本文介绍了SQL代码从FTP下载文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人有办法可以使用SQL Server 2008从FTP下载文件(不想使用SSIS)?

有没有更好的方法比使用SQL更容易吗?

解决方案

您可以在.NET中编写存储过程。 b $ b

在C#(或VB.NET)中使用FTP很容易。几年前我们有一个项目,我们需要完全一样的东西。因此,我们创建了几个.NET存储过程,如:
$ b

ftpGetList(serverAdress,username,password,remotePath) - 它返回给我们列表或远程文件和文件夹作为行集



和下一个是



ftpGetFile(serverAdress,用户名,密码,remotePath,localPath) - 下载并保存文件到本地。使用C#有一个优点,因为你可以控制凭证,FTP模式和代理设置。


Does anyone have a way I can download a file from an FTP using SQL Server 2008 (don't want to use SSIS)?

Is there a better way to do this than using SQL?

解决方案

You can write stored procedure in .NET.

Working with FTP in C# (or VB.NET) is pretty easy. We had a project a couple of years ago where we needed exactly the same. So we have created several .NET stored procedures like:

ftpGetList(serverAdress, username, password, remotePath) - it returned us the list or remote files and folders as rowset

and next one was

ftpGetFile(serverAdress, username, password, remotePath, localPath) - it downloaded and saved the file locally.

Using C# has an advantage, because you can control credential, ftp mode and proxy settings.

这篇关于SQL代码从FTP下载文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆