The task appears daunting, not helped by the usual documentation overload.
# compiling the current version is straightforward on snow leopard (10.6.6) $ ./configure $ sudo make $ sudo make install
Intermediate files can be removed with $make clean
After installation the configuration file freetds.conf will exist in both the current build folder and the default location /usr/local/etc/freetds.conf
It is recommended that these files be renamed .old and copy made to the user profile ~/.freetds.conf The config file should be edited as indicated within the file. Recommended global defaults are;
tds version = 8 port = 1433
The tsql command can now be used to test the connection. For SQL servers using integrated security the user name is specified within single quotes as 'DOMAIN\username'
Examples of tsql connection commands;
$TDSVER=8 tsql -H myserver.fqdn -p 1433 -U mat -P password tsql -H myserver.fqdn -p 1433 -U 'MSSS\mat' Note the tcp port must be specified when the hostname -H option is used. To use a sever specified in the freetds.conf file tsql -S mssql -U 'MSSS\mat'
Once connected, SQL can be entered at the prompt, remembering to USE the correct database and GO execute each command
[b]Taken from www.stata.com help resources[/b] This FAQ provides an overview of the steps you need to take to configure ODBC on Unix and Linux. Most steps are common to both platforms, but some are specific to the database to which you are connecting. Before you start configuring the driver manager, make sure you know which database you are using.
On both Mac and Linux, make sure that your system is running the iODBC driver manager, which stores and manages all the information you need to connect to an ODBC data source. iODBC is an Open Source driver manager that is maintained by OpenLink Software and is released under a dual LGPL/BSD license.
If you are using a Linux/Unix machine and Stata 10 or later, you can also connect to a database with the unixODBC driver manager. In Stata, type set odbcmgr unixodbc to use the unixODBC driver manager. To change back to the default iODBC driver manager, type set odbcmgr iodbc.
At this point, you should have either iODBC or unixODBC installed and running on your system. To configure an ODBC DSN, you will need to specify several parameters, which may vary, depending on the database. Here are a few of the most common parameters (items in bold are usually required):
You can configure the ODBC data source either by using the iODBC Administrator utility or by modifying the ODBC configuration files manually.
[ODBC Data Sources] Bug = PostgreSQL [Bug] Debug = 1 CommLog = 1 ReadOnly = no Driver = /usr/local/lib/psqlodbc.so Servername = 64.xxx.xxx.xx FetchBufferSize = 99 Username = kevin Password = passwordforkevin Port = 5432 Database = bugdb [Default] Driver = /home/kst/tmp/libiodbc-3.0.5/odbcsdk/lib/oplodbc.so.1
Usually, iODBC ships with a small test application that you can use to test the connection parameters of any DSN you define.
« Go back
Powered by Help Desk Software HESK, in partnership with SysAid Technologies