SQL-ftpd SITE command


Note: Your ftp client may be case sensitive

The site command allows you to tailor the SQL-ftpd server to your needs. There are five basic configuration changes you can make which will tailor the way the SQL-ftpd server reads your input, or outputs data to your client.

The most basic of the configurations are:

Command Cause and Effect
site tabs Toggles the tab delimiters for a get function
site messages Toggles the output of SQL server messages
site delim Sets the delimiter character for a put command
site batch Sets the batch size for a put command

Below are examples of the usage of each specific site command.


SITE TABS

The site tabs command is used to toggle the tab character delimiters on the output of a get command. By default a get statement will return the data from the columns of a table, delimited by the tab character. This command allows you to turn off the delimiter character and receive the data undelimited. Be aware that without delimiters, you will need to know the structure of the table, and the
Output Formats that the SQL-ftpd server returns data in.

An example of its usage is:

Note that this command is a toggle. When you start your ftp session, they are turned on. The first invocation of this command turns them off (as shown above). The 2nd invocation of this command will turn them back on. Further invocations will turn them off and on again, respectively.


SITE MSGS

The site messages command is used to enable or disable messages from the SQL server. It is primarily used for the use of a stored procedure which uses the OpenServer product used here at NC State.

This function allows you to turn off the SQL server messages which are returned whenever an error occurs. Be careful using this command, for you could generate a SQL server error and not know the difference. You should provide a method of checking your results instead of depending on an error code or message - because this command disables them!

This command was provided for the use of openserver calls within a select stored procedure. Like the SITE TABS command, this command is a toggle. The default is to enable SQL server messages. The first invocation will cause them to be disabled. A message is printed, showing the state of SQL server messaging.

An example of usage follows:


SITE DELIM

The site delim command allows you to set the delimiter character for a put operation. By default, the put command expects the datafile to have the column data delimited by the tab character. With this command you are able to send a file which is delimited by nearly any character, such as the colon (:), comma (,), or any other printable character. Of course, if you change the delimiter and wish to return to the tab character, you may do so by specifying tab as your delimiter character.

An example of usage follows:


SITE BATCH

The site batch command allows you to adjust the batchsize of a put operation. By default the SQL-ftpd server gathers batches of up to 1000 rows during a put operation, before committing them to a table. With this command you can tailor that (for optimizing use of log space, for example) so that you can have as little as 1 row per batch (slow), or 10,000 rows per batch (uses lots of log space if indexes are present).

An example of usage follows:


Forward to the SQL-ftpd Output Formats manual page.
Return to the SQL-ftpd Commands Page