----------------------------------------------------------------------------------------------------------------------------------------------
' Microsoft SQL Server Integration Services Script Task
' Write scripts using Microsoft Visual Basic
' The ScriptMain class is the entry point of the Script Task.
Imports System
Imports Microsoft.SqlServer.Dts.Runtime
Imports CozyRoc.SqlServer.SSIS
Public Class ScriptMain
Public Sub Main()
Dim oSsh As SshExecTask
oSsh = New SshExecTask()
oSsh.ExecConnection = "SSH"
oSsh.CommandType = SshExecTask.CommandTypes.DirectInput
oSsh.Command = "ls"
oSsh.Output = "Koko"
Call oSsh.Execute(Dts.Connections, Dts.VariableDispenser,
Dts.Events, Dts.Logging, Dts.Transaction)
Dts.TaskResult = Dts.Results.Success
End Sub
End Class
----------------------------------------------------------------------------------------------------------------------------------------------
Where
- ExecConnection variable contains the name of the SSH Connection
Manager.
- CommandType variable specifies where your command comes from. In the
sample it is directly specified in the "Command" variable.
- Output variable contains name of variable, which holds the result of
the executed command.
Regards,
Ivan
----------------------------------------------------------------------------------------------------------------------------------------------
Dim connManager As ConnectionManager
connManager = Dts.Connections("SSH")
connManager.ConnectionString =
"ServerHost=;ServerPort=22;ServerUser=;ServerPassword=;ServerKeyFile=;ServerTimeout=30;ProxyType=None;ProxyHost=;ProxyPort=80;ProxyUser=;ProxyPassword="
----------------------------------------------------------------------------------------------------------------------------------------------
Regards,
Ivan