Installing and Configuring sfsql


SnowSQL is intended to eventually replace sfsql. We will continue to support sfsql; however, we do not plan to actively enhance it in the future.

This topic describes how to install and configure sfsql.

In this Topic:


sfsql uses the Snowflake JDBC driver to connect to Snowflake. The driver does not need to be downloaded and installed before installing sfsql because the driver is automatically installed along with sfsql; however, the JDBC driver requires the 64-bit version of Java 1.7 (or higher).

If the required version of Java is not installed on the client machine where sfsql will be installed, it must be installed. For more information, see Java Requirements for the JDBC Driver.

Step 1: Download the Client

  1. In the Snowflake web interface, go to Help » Download… to display the Downloads dialog.

  2. Click CLI Client (sfsql) in the dialog, then click the download icon for the client:

    Snowflake Command Line Client option in Downloads dialog

Step 2: Install the Client

  1. Unpack the downloaded package into a local directory on your client machine.

The resulting client directory contains all the required HenPlus directories and files, as well as the following files for configuring and starting the client:

  • login.defaults: Login configuration file.
  • sfsql: Bash script for starting the client in Mac OS and Linux environments.
  • sfsql.cmd: Batch file for starting the client in MS Windows environments.


In an MS Windows environment, the client directory must be located in a directory path that contains no blank spaces. We recommend putting the directory in a top-level directory (e.g. c:\Apps\...). In addition, we recommend adding the directory to the Windows PATH system variable.

Step 3: Configure Client Login

sfsql provides various parameters for configuring client connection and login. The client/login.defaults file can be used to define default connection parameters which can be overridden on the command line when starting the client.

When you download the client from Snowflake, the following parameters are preset in login.defaults:


where <account_name> is the name assigned to your account by Snowflake.

To set additional defaults, add the corresponding parameters to the file, using the same structure/format described above. For a complete list of the defaults you can set in the file, see Starting and Stopping sfsql.