Easysoft ODBC-SQL Server Driver Getting Started GuideThis guide shows you how to download, install and license the Easysoft ODBC-SQL Server Driver. The guide also shows you how to access your SQL Server database with the Easysoft ODBC-SQL Server Driver. Note You need root access on the machine where you want to install the Easysoft ODBC-SQL Server Driver. Step 1: What You Need To KnowBefore you begin, contact your database administrator for the following information: - The host name or IP address of the SQL Server machine.
- The name of an instance to connect to or the port that the instance is listening on.
- A valid SQL Server login name and password that can be used to connect to the database you want to access.
Step 2: Download the Easysoft ODBC-SQL Server Driver Distribution- Log in at http://www.easysoft.com.
If you have not yet done so, you need to register first. On the registration form, an asterisk (*) indicates that a field is mandatory. - Download the Easysoft ODBC-SQL Server Driver distribution for your Unix platform.
- Save the distribution file to a temporary directory on the machine where you want to install the Easysoft ODBC-SQL Server Driver.
Step 3: Install the Easysoft ODBC-SQL Server Driver- Log in to your Unix system and
cd into the directory where you downloaded the Easysoft ODBC-SQL Server Driver distribution. For example:
cd /tmp
- Unpack the distribution file:
tar -xvf odbc-sqlserver-version-platform.tar
Replace version and platform with the version number and platform contained in the distribution file name. For example, to unpack the 32-bit Linux distribution:
tar -xvf odbc-sqlserver-0.1.0-linux-x86-glibc.tar
cd into the directory created by unpacking the distribution file. For example:
cd odbc-sqlserver-0.1.0-linux-x86-glibc
- To start the installation, as
root, type:
./install
- Accept the default choices throughout the installation by pressing RETURN. To accept the terms of the Easysoft End User License Agreement, type
Yes. At certain points in the installation, the installation script pauses to report its progress. To continue to the next stage, press RETURN. - When prompted to choose a product to license, choose the Easysoft ODBC-SQL Server Driver by typing its option number:
[0] Exit
[1] View existing licenses
[2] SQLServer ODBC Driver V1.0
Please choose the product you would like a license for by entering its
item number or enter one of the other options.
Option: 2
Next, you need to supply: - Your full name
- Your company name
- An email contact address. This must be the email address you registered on the Easysoft web site.
- Your telephone number (you need to specify this if you telephone the license request to us).
- Your fax number (you need to specify this if you fax the license request to us).
- A reference number. When applying for a trial license just press ENTER. This field is used to enter a reference number we will supply you for full (paid) licenses.
The License Client asks you to choose a method for obtaining the license. To obtain a license automatically, you need to be connected to the Internet and allow outgoing connections to license.easysoft.com on port 8884. If you are not connected to the Internet or do not allow outgoing connections through port 8884, the License Client can create a license request file which you can: - Enter at http://www.easysoft.com/support/licensing/trial_license.html to obtain your license.
- Supply to Easysoft by mail, fax or telephone.
If you choose option [2], the license request is written to a file named license_request.txt and you should exit the License Client (option [0]) and complete the installation. Once you have mailed, faxed or telephoned the license request to us, we will return a license key. Add this to the end of the file /usr/local/easysoft/license/licenses. - The installation searches for SQL Server instances that are listening on your network and displays the instances it finds. For example:
==================================================================
ServerName MYSQLSERVER2000HOST Port 1433 (Default)
ServerName MYSQLEXPRESSHOST\SQLEXPRESS Port 2777
ServerName MYSQLSERVER2005HOST\MYINSTANCEI Port 1510
ServerName MYSQLSERVER2005HOST\MYINSTANCEII Port 1511
==================================================================
The example output shows that: - The default SQL Server instance on a machine named
MYSQLSERVER2000HOST is listening on the default SQL Server TCP port 1433. - The default named SQL Server Express instance on a machine named
MYSQLEXPRESSHOST is listening on port 2777. - There are two named instances running on
MYSQLSERVER2005HOST. The instances are listening on ports 1510 and 1511 respectively. Do one of the following: - Type the host name (or IP address) of the machine where your SQL Server instance is running when prompted. To connect to a named instance, use the format
machinename\instancename. To connect to a SQL Server Express instance, use the format machinename\SQLEXPRESS. To connect to a SQL Server instance that is not listening on the default port (1433), use the format machinename:port. Based on the example output shown earlier, you would type: MYSQLSERVERHOST to connect to the default instance on this machine.MYSQLEXPRESSHOST\SQLEXPRESS to connect to the SQL Server Express instance.MYSQLSERVER2005HOST:1510 to connect to the first named instance on this machine and MYSQLSERVER2005HOST:1511 to connect to the second.
- Type your SQL Server login name when prompted. If you usually connect to SQL Server through your Windows account, type your Windows user name. If the SQL Server instance is running on a machine that is part of a Windows domain, use the format
domain\username. Otherwise, type a valid SQL Server user name. - Type the password for your user name when prompted.
If the installation can successfully connect to the SQL Server instance, a list of databases that you can access is displayed. - Press RETURN to accept the default database for your SQL Server login.
- Press RETURN to accept the default language for SQL Server system messages.
The Easysoft ODBC-SQL Server Driver installation has now gathered enough information to connect to SQL Server. - Type
y when prompted whether to save the connection information in an ODBC data source and then type a DSN name. For example, mysqlserverdsn. You can use this data source to connect to SQL Server now and when the installation completes. The data source is written to /etc/odbc.ini. - Type
y when prompted whether to retrieve a list of tables from the SQL Server databases. The installation uses unixODBC’s isql program and your new data source to retrieve the data. Note If you chose not to license the Easysoft ODBC-SQL Server Driver earlier in the installation, skip this step. The ODBC-SQL Server Driver needs to be licensed before it can be used to connect to a data source. When the installation has finished, you can use isql to test the data source after you have licensed the ODBC-SQL Server Driver. At the end of the installation, you will have installed and licensed the Easysoft ODBC-SQL Server Driver, installed the unixODBC Driver Manager and created an ODBC data source. - Set and export the LD_LIBRARY_PATH environment variable:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/easysoft/sqlserver:/usr/local/easysoft/lib
export LD_LIBRARY_PATH
Note On AIX, replace LD_LIBRARY_PATH with LIBPATH.
Step 4: Access an Easysoft ODBC-SQL Server Driver Data Source- Do one of the following:
- If you interactively created a data source during the Easysoft ODBC-SQL Server Driver installation, skip to step 5.
- If you did not create an data source during the installation, you need to create one. The Easysoft ODBC-SQL Server Driver installation creates a sample data source named
SQLSERVER_SAMPLE that you can use as a starting point.
- As root, open
/etc/odbc.ini in a text editor. - To locate the sample data source, search for
[SQLSERVER_SAMPLE]. - Change these attribute values:
| Attribute | Value |
|---|
| Server | The host name (or IP address) of the machine where your SQL Server instance is running. To connect to a named instance, use the format machinename\instancename. To connect to a SQL Server Express instance, use the format machinename\SQLEXPRESS. | | Port | If the SQL Server instance is listening on the default port, leave this set to 1433. If your database administrator told you to specify a different port, replace 1433 with the new port number. Otherwise, delete 1433. | | Database | Delete the sample entry Northwind to connect to the default database defined for your login. | | User | Your SQL Server login name. If you usually connect to SQL Server through your Windows account, type your Windows user name. If the SQL Server instance is running on a machine that is part of a Windows domain, use the format domain\username. Otherwise, type a valid SQL Server user name. | | Password | The password for the login name specified by User. | Examples This data source uses a Windows user name and password to connect to the default SQL Server instance on a machine named MYSQLSERVER2000HOST.
[SQLSERVER_SAMPLE]
Driver = Easysoft ODBC-SQL Server
Description = Easysoft SQL Server ODBC driver
Server = MYSQLSERVER2000HOST
Port = 1433
Database =
User = mydomain\mywindowsuser
Password = mywindowspassword
This data source uses a SQL Server user name and password to connect to a SQL Server Express instance. The SQL Server port is omitted and the Easysoft ODBC-SQL Server Driver will therefore use the SQL Server Browser to detect the port.
[SQLSERVER_SAMPLE]
Driver = Easysoft ODBC-SQL Server
Description = Easysoft SQL Server ODBC driver
Server = MYSQLEXPRESSHOST\SQLEXPRESS
Port =
Database =
User = mysqlserverusername
Password = mysqlserverpassword
- Use
isql to test the new data source:
cd /usr/local/easysoft/unixODBC/bin
./isql -v dsn_name
where dsn_name is name of your ODBC data source. If you created a data source during the Easysoft ODBC-SQL Server Driver installation, specify that data source name. If you have just edited the sample Easysoft ODBC-SQL Server Driver data source, type SQLSERVER_SAMPLE. If you are unable to connect, see the Easysoft ODBC-SQL Server Driver Knowledge Base for help on solving some common connection problems. - At the prompt, type a select statement or type
help to display a list of tables. To exit, press RETURN in an empty prompt line.
What Next?You are now ready to use the Easysoft ODBC-SQL Server Driver with your own applications and development tools. Further Support |