Easysoft ODBC-SQL Server Driver

Does the Easysoft ODBC-SQL Server Driver distribution include any diagnostic tools?

Article:
01008
Last Reviewed:
26th January 2024
Revision:
1

The Easysoft ODBC-SQL Server Driver distribution includes the diagnostic program tdshelper, which Easysoft Support may direct you to run to help diagnose connection problems. tdshelper can:

The Easysoft ODBC-SQL Server Driver installation script installs tdshelper in installation_dir/easysoft/sqlserver/bin. By default, installation_dir is /usr/local.

To use tdshelper, you may need to tell the dynamic linker where to find the shared objects that tdshelper depends on. The shared objects are in /usr/local/easysoft/lib.

To do this, set and export the appropriate environment variable for your linker and platform.

Variable Platform
SHLIB_PATH Some versions of HP-UX. For example:
SHLIB_PATH=$SHLIB_PATH:/usr/local/easysoft/lib
export SHLIB_PATH
LD_LIBRARY_PATH Linux, Solaris, some versions of HP-UX. For example:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/easysoft/lib
export LD_LIBRARY_PATH
LIBPATH AIX. For example:
LIBPATH=$LIBPATH:/usr/local/easysoft/lib
export LIBPATH
tdshelper Command Line Options

tdshelper has the following command line:

tdshelper [options]

The options are:

-a --auth password

The password for the SQL Server login name specified with the -u option.

-c --count number

The number of probe packets to send when searching for SQL Server instances. The default is 5.

-d --dblist

List the databases that are available to the login name specified by -u in the SQL Server instance specified by -s. The default database for the login is shown first in the command output.

-l --langlist

List the languages that SQL Server system messages are available in. To retrieve the languages, you also need to specify a SQL Server instance (-s) and login (-u -a). The default language for the login is shown first in the command output.

-n --port port

The TCP port that the SQL Server instance specified with the -s option is listening on.

If you omit the port and are connecting to a named instance, tdshelper will use the SQL Server Browser or listener to detect the port. If you omit the port and are connecting to the default instance, tdshelper will try to connect to port 1433.

-p --probe

Search for SQL Server instances on the network. For each instance found, the commands output displays:

-i --instance

Search for SQL Server instances on the network. The output is more concise than that produced by the -p option. The output lists each instance found using the format machinename\instancename. Default instances are listed as machinename.

Notes

-s --server instance

The SQL Server instance to connect to. To test the connection to the default SQL Server instance, replace instance with the host name or IP address of the machine where the instance is running. To test the connection to a named instance, replace instance with machinename\instance, where:

If the SQL Server Browser or listener service is not running and the instance is not listening on the default port 1433, specify the port with -p.

To test database authentication, you also need to specify a valid SQL Server login name and password for the instance with -u and -a.

-u --user login

A valid SQL Server login name for the instance specified with -s. If you usually connect to SQL Server through your Windows account, type your Windows user name. Use the format domain\username, where domain is the name of the Windows domain to which username belongs. Otherwise, specify a valid SQL Server user name. Use -a to specify the password.

Note You may have to enclose the SQL Server instance name, login name and password with single quotes. Do this to protect any backslashes, spaces or other special characters these settings contain. For example, ./tdshelper -s 'mymachine\myinstance' -v.

-f --dblist database

The database to connect to. Use -s to specify the instance that is serving the database. Use -u and -a to specify a valid SQL Server login and password for the database.

-v --verbose

Display extra status and diagnostic information. Use this option with -s to diagnose connection problems.

-6 --ipv6

Specify this option if you are connecting to a SQL Server instance that is listening on an IPv6 address. For example, ./tdshelper -6 -s 'ABCD:EF12::3456\SQLEXPRESS' -v

Testing your SQL Server Connection Settings

To connect to a SQL Server instance, you need this information:

tdshelper lets you confirm that your connection settings are valid before you use the information in an Easysoft ODBC-SQL Server Driver data source. If the SQL Server Browser or listener is running, you can also use tdshelper to verify that the SQL Server instance is running and visible from the machine where the Easysoft ODBC-SQL Server Driver is installed.

  1. cd /usr/local/easysoft/sqlserver/bin
  2. If the SQL Server Browser or listener is running, check that your SQL Server instance is running by typing the following command. Otherwise, skip this step.
    ./tdshelper -i -c 1

    If the instance is running, it will be listed in the tdshelper output. In the following example output, the default SQL Server instance is running on the machine MYSQLSERVER2000HOST; the default named SQL Server Express instance is running on the machine MYSQLEXPRESSHOST; a named SQL Server instance is running on the machine MYSQLSERVER2005HOST:

    ServerName MYSQLSERVER2000HOST Port 1433 (Default)
    
    ServerName MYSQLEXPRESSHOST\SQLEXPRESS Port 2777
    
    ServerName MYSQLSERVER2005HOST\MYINSTANCEI Port 1510

    The output also shows the TCP port that each instance is listening on.

  3. Do one of the following:
    • To test the connection to a default SQL Server instance, type:
      ./tdshelper -s machinename -n port -v

      Replace machinename with the host name of the SQL Server machine. Replace port with the TCP port on which the instance is listening. For example, tdshelper -s MYSQLSERVER2000HOST -n 1433 -v.

    • To test the connection to a named SQL Server instance, type:
      ./tdshelper -s 'machinename\instance' -n port -v

      Replace machinename with the host name of the SQL Server machine and instance with the instance name. Replace port with the TCP port on which the instance is listening. For example, tdshelper -s 'MYSQLSERVER2005HOST\MYINSTANCEI' -n 1510 -v.

      If tdshelper can connect to SQL Server, you will see output similar to this:

      tdshelper: connecting to MYSQLSERVER2000HOST on port 1433
      
       tdshelper: succesfully opened connection

      When configuring an Easysoft ODBC-SQL Server Driver data source to connect to this instance, use the value you specified with the -s option for the Server attribute value.

    If tdshelper is unable to connect and displays a "Connection refused" error, the SQL Server instance may not be running, be listening on the port you specified or allow remote TCP/IP connections. For more information, see Why do I get error "Client unable to establish connection: OS Error: 'Connection refused'" and Why do I get error "Client unable to establish connection: Server not configured for TCP connection".

  4. To check that you can access the instance with your SQL Server login name and password, use the -u and -a options.

    If you usually connect to SQL Server through your Windows account, specify your Windows user name with -u. Use the format domain\username, where domain is the name of the Windows domain to which username belongs. Otherwise, specify a valid SQL Server user name.

    Specify the password for your user name with -a.

    For example:

    ./tdshelper -s 'MYSQLSERVER2005HOST\MYINSTANCEI' -u 'mydomain\mywindowsuser' -a mywindowspassword -v

    –OR–

    ./tdshelper -s MYSQLSERVER2000HOST -u mysqlserveruser -a mysqlserverpassword -v

    If tdshelper can successfully access the SQL Server instance with your user name and password, the output will contain the following line:

    tdshelper: succesfully logged into server with diagnostic records

    When configuring an Easysoft ODBC-SQL Server Driver data source to connect to this instance, the User and Password attribute values should be the same as the values you specified with the -u and -a options.

If tdshelper is unable to connect and displays a Login failed for user ''. The user is not associated with a trusted SQL Server connection. error, check that you specified a valid Windows user name and password. If tdshelper fails with an Login failed for user 'myuser'. error, check that you specified a valid SQL Server user name and password.

For information about other situations in which these errors display, see Why do I get error "Login failed for user ''. The user is not associated with a trusted connection" and Why do I get error "Login failed for user 'myuser'".

Applies To

Knowledge Base Feedback

* Did this content help you?
* Please select one option based on your first choice:

(* Required Fields)