I wrote the best practices based on my experience in my first project. Now, I’ve worked a little more than that in my second project. Here, I give you some best practices in Bulk export, and FTP.
1. Bulk Export – In order to export the records from one or more tables or views, we can use bcp command. The syntax goes like
<query along with the database name> queryout <file name> -c –S <DBserver name> –U <username of the db server> -P <password of the db server
Include the options that you need.
Write this bcp command in a bat file and with the help command argument variables %1, %2, %3, etc. So that you can execute this bat file using Execute Process Task (EPT) and make use of expression tab to pass arguments to this bat file.
2. FTP – If you like to capture the error occurred in FTP server explicitly then you can go for EPT. I’ll give you some examples. Errors like login failed, invalid remote directory cannot be distinguishable in FTP task.
Pre-requisites to understand: Should know dos commands such as “echo”, “>”, “>>” and how to pass arguments to a bat file, standard output file and standard output error file.
Pass arguments to the bat file with the ftp credentials and “echo” those credentials to a file and execute the file having ftp command using “ftp –s:<file_name> <server_name>”
If you want to know more, write to ramjip.ramji@gmail.com


