sql-server-2005 - 在 SSIS 中使用表达式的 FTP 连接字符串

标签 sql-server-2005 ssis ftp expression

在我的 SSIS 2005 包中,我需要通过表达式提供 FTP 连接字符串,因为我需要从 dtsConfig 文件中为用户配置它。

目前我尝试给出以下表达式:

Connectionstring = @[User::FTPServer] + "."+ @[User::FTPUser] + "."+ @[用户::FTPPass]

对于这种独特的语法,我从 http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/3713e9a5-343a-4c5b-ac5d-1508cd5ab8be 的讨论中获得了一些建议。

我的 FTPServer 变量也有格式为 MYSERVERNAME:21 的端口信息。

但我收到错误“530 匿名用户未知”

知道如何解决此错误吗?

最佳答案

我认为你的变量应该有两个 ::不是一个。
@[User::FTPServer] + "." + @[User::FTPUser] + "." + @[User::FTPPass]
编辑:

您可能会因为 password being cleared 而遇到一些麻烦

我要做的是通过脚本任务预先设置这些细节。运行脚本,然后运行 ​​FTP 任务 - 我认为这应该可行。

Public Class ScriptMain

Public Sub Main()

Dim FTPConnectionManager As ConnectionManager

'Set variable to an existing connection manager
' Replace "FTP Server" with the name of your existing FTP Connection Manager
FTPConnectionManager = Dts.Connections("FTP Server")


FTPConnectionManager.Properties("ServerName").SetValue(FTPConnectionManager, Dts.Variables("FTPServer").Value)

FTPConnectionManager.Properties("ServerPort").SetValue(FTPConnectionManager, Dts.Variables("FTPPort").Value)

FTPConnectionManager.Properties("ServerUserName").SetValue(FTPConnectionManager, Dts.Variables("FTPUserName").Value)

FTPConnectionManager.Properties("ServerPassword").SetValue(FTPConnectionManager, Dts.Variables("FTPPassword").Value)


Dts.TaskResult = Dts.Results.Success

End Sub

End Class

关于sql-server-2005 - 在 SSIS 中使用表达式的 FTP 连接字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3888170/

相关文章:

wordpress - 如何使用 FTP 或 WP 仪表板安装 SSL 证书

c# - 通过 FTP 上传文件 - 服务器返回错误 (550) 文件不可用,找不到文件

sql-server - SSRS 配置新手

sql-server-2005 - 如何获取新创建记录的ID(PK)?

logging - SSIS 脚本任务 : How to log to output using Dts. 日志

sql-server - SSIS无法在OnTaskFailed事件处理程序上移动文件

c# - 如何调试作为 SSIS 项目一部分的脚本?

PHP 表单发布到远程 FTP 上的 TXT 文件

java - 同时为许多用户提供更好的性能

sql-server - SQL Server 存储过程的运行时间比从 Management Studio 中的文本执行相同查询的时间要长得多