ODBC access from Windows Server Core

Server Core is an installation option available in Windows Server that eliminates any services and features that are not essential to provide the most commonly used server roles. For example, a Windows Server machine that runs in Server Core mode has no graphical user interface, for example, there's no Windows desktop.

The advantages of Server Core are: reduced hardware requirements, much smaller attack surface, and a reduction in the need for updates.

By default, Easysoft ODBC drivers have a GUI-based licensing program on Windows. This blog shows how to license an Easysoft driver in a GUI-less environment.

When testing, we used the Salesforce ODBC driver on Windows Server version 1709. If you want to uses another Easysoft ODBC driver on Windows Server Core, please contact our Support team.

  1. Download the Windows Salesforce ODBC driver, and copy the installer to the Windows Server Core machine.
  2. Run the Easysoft installer by changing to the folder where you copied the program and running:
    odbc-salesforce-version-windows.exe /exenoui /qn

    where version must be 1_1_12 or higher.

  3. In a PowerShell window, run:
    & 'C:\Program Files (x86)\Easysoft Limited\Easysoft SalesForce ODBC Driver\libs\siteinfo.exe'

    This will get the site number for your machine.

    If you didn't install the driver on your C drive or in the default location, amend the command accordingly.

  4. Obtain a trial license or purchased license using the Easysoft web site.
  5. When you have the license in PowerShell, run:
    $path='HKLM:\SOFTWARE\WOW6432Node\Easysoft\Licences'
    Set-Location -Path $path
    cd ..
    Get-ChildItem

    The output of this command will be similar to:

    Name                           Property
    ----                           --------
    Info                           LICENCEAPP  : "C:\Program Files (x86)\Common Files\Easysoft\License Manager\eslicap.exe"
                                   LicenceHelp :
                                   Company     :
                                   Email       :
                                   FaxNo       :
                                   PhoneNo     :
                                   Name        : Administrator
    Licences                       l1 : LMKMR-JW4BQ-2CLPG-3UG82-RWGC2-FXU2Q-WJPBU-Q8R3Q-WG9VC-8KYR8
    
  6. To add the license key, in PowerShell, run:
    New-ItemProperty -Path $path -Name $name -Value $key -PropertyType string

    where:

    • $name='ln'

      If your machine has not been licensed before, the Licences line will be missing from the command output generated in the previous step, and you should set n to 1. For example, $name='l1'.

      If your machine has been licensed before, set n to the next number in the sequence. For example, $name='l2'.

    • $key='Your license key goes here'

    Repeat the New-ItemProperty command for each key you need to add, incrementing n in $name and putting your new key in $key.

  7. When you have added the key, run:
    Get-ChildItem

    If the previous step was successful, the command's output will show you your keys.

  8. When the software is licensed, you can either set up an ODBC data source or use a DSN-less connection. (For example, DRIVER={Easysoft Salesforce ODBC Driver};User=myuser@easysoft.com;Password=mypassword; TOKEN=ABCDEFGH123456;.)

    To set up a 32-bit ODBC data source (do this if your application is 32-bit), run:

    drive:\Windows\SysWOW64\odbcad32.exe

    To set up a 64-bit ODBC data source (do this if your application is 64-bit), run:

    drive:\Windows\System32\odbcad32.exe

To create a Salesforce ODBC driver data source:

  1. Choose the System DSN tab, and then choose Add.
  2. In the Create New Data Source dialog box, choose Easysoft ODBC-Salesforce driver, and then choose Finish.
  3. Complete the DSN Setup dialog box:
    Setting Value
    DSN Salesforce
    User Name The name of your Salesforce user. For example, myuser@mydomain.com.
    Password The password for your Salesforce user.
    Token The security token for your Salesforce user, if required.

    To find out whether you need to supply a security token, choose the Test button. If the connection attempt fails with an error which contains LOGIN_MUST_USE_SECURITY_TOKEN, you need to supply one.

    Salesforce emails the security token to the email address associated with your Salesforce user account. If you have not received a security token, you can regenerate it. Salesforce will then email the new security token to you. To regenerate your security token, log in to Salesforce and then choose Setup from the user menu. Search for "security token" in the Quick Find box. Choose Reset Security Token in the Reset Security Token page. When you receive the token in your email client, copy it and then paste it into the Token field.

  4. Use the Test button to verify that you can successfully connect to Salesforce.