Using Salesforce SOQL from Linux

  1. If you have not already done so, register on the Easysoft web site.

    You need to do this in order to license the Salesforce SOQL driver.

  2. Download the Salesforce SOQL driver.

    Currently, the driver is only available on 64-bit Linux platforms, which means that you must use the driver with a 64-bit application on this platform.

  3. Install and license the Salesforce SOQL driver on the Linux machine. For example:
    $ cd /tmp
    tar -xvf odbc-sfsl-2.0.1-linux-x86-64-ul64.tar
    cd odbc-sfsl-2.0.1-linux-x86-64-ul64	    
    $ su
    # ./install

    If you do not want to install the product as root, refer to this article.

    Note You need the unixODBC Driver Manager installed on your machine. The Easysoft distribution includes a version of the unixODBC Driver Manager that the Easysoft Salesforce driver has been tested with. The Easysoft driver setup program gives you the option to install unixODBC.

  4. Create an ODBC data source in /etc/odbc.ini that connects to your Salesforce instance you want to access from Linux. For example:
    [SFSL_SAMPLE]
    Driver=Easysoft SalesforceSlim
    Description=Easysoft Salesforce Slim ODBC driver
    Uri=https://login.salesforce.com/services/Soap/u/37
    User=myuser@mydomain
    Password=mypassword
    Token=ABC123DEF345
    Archive=
    Logging=0
    LogFile=

    For a list of other SOQL driver attributes, refer to the driver documentation.

  5. Use isql to test the new data source. For example:
    cd /usr/local/easysoft/unixODBC/bin
    ./isql.sh -v SFSL_SAMPLE

    At the prompt, type a SOQL statement. For example:

    SELECT Account.Name, (SELECT Contact.LastName FROM Account.Contacts) FROM Account

    To exit, press Return in an empty prompt line.

    If you are unable to connect, refer to this article.

You should now be able to connect other Linux applications to Salesforce and use SOQL from these applications.