You can use Sequenchel to download files from an FTP server or upload files to an FTP server. Sequenchel can create a stored procedure with the settings of your FTP server as defaults. After creating the stored procedure you can use parameters to override the defaults when needed.

FTP Download
- FTP Server: The name or the IP address of your FTP server.
- FTP User Name: The login name for your FTP server.
- FTP password: The password that goes with the login name.
- Upload Source Path: The location for the files to be uploaded to the FTP server.
This setting is only used in the FTP upload procedure. - FTP Location / Path: The path where the files are / will be stored on the FTP server.
- Download Destination Path: The location for the files when downloading from the FTP server.
This setting is only used for the FTP download procedure. - Target File(s) Name / Mask: The file name(s) for the files you wish to upload or download. You can use a mask here like *.* or *.bak or sequenchel.*.
- FTP Mode: asccii or binary. Binary is the default and usually works.
- Remove Source Files from FTP Server After Download: every file downloaded from the FTP server will be removed from the FTP server after download.
This setting is only used for the FTP download procedure. - Encrypt Procedure to Protect Password: If you enter a username and password, they will be visible in the source code of the FTP procedure in SQL Server. Use encryption to protect those sensitive data.
- Automatically Enable / Disable cmdshell: FTP from SQL requires the cmdshell setting to be enabled. If you select this option, the procedure will enable this option at the start and disable it at the end of the procedure. This could interfere with other procedures that require cmdshell to be enabled but keeps your server better secured than always having this option enabled.
All these settings can be overruled every time the procedure is run. There is no need to create multiple FTP procedures with different defaults.
FTP Upload
To run the procedure using the defaults simply run:
EXECUTE [Sequenchel].[dbo].[usp_PutFTPfiles];
To run the procedure with values other than the defaults use the following script:
DECLARE @FTPServer varchar(128)
DECLARE @FTPUser varchar(128)
DECLARE @FTPPwd varchar(128)
DECLARE @SourcePath varchar(128)
DECLARE @SourceFiles varchar(128)
DECLARE @DestPath varchar(128)
DECLARE @FTPMode varchar(10)
SET @FTPServer = ‘yourFTPserver’
SET @FTPUser = ‘username’
SET @FTPPwd = ‘password’
SET @SourcePath = ‘localdrive’
SET @SourceFiles = ‘*.*’
SET @DestPath = ‘FTPlocation’
SET @FTPMode = ‘binary’
EXECUTE [Sequenchel].[dbo].[usp_PutFTPfiles]
@FTPServer
,@FTPUser
,@FTPPwd
,@SourcePath
,@SourceFiles
,@DestPath
,@FTPMode
;