<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>acloudtree &#187; Macintosh</title>
	<atom:link href="http://www.acloudtree.com/category/macintosh/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.acloudtree.com</link>
	<description>Programming, Computers, Writing, Economics, and Life</description>
	<lastBuildDate>Tue, 07 Feb 2012 00:03:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How To: Install FreeTDS and UnixODBC On OSX Using Homebrew For Use With Ruby, Php, And Perl</title>
		<link>http://www.acloudtree.com/how-to-install-freetds-and-unixodbc-on-osx-using-homebrew-for-use-with-ruby-php-and-perl/</link>
		<comments>http://www.acloudtree.com/how-to-install-freetds-and-unixodbc-on-osx-using-homebrew-for-use-with-ruby-php-and-perl/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 17:44:52 +0000</pubDate>
		<dc:creator>jared.folkins</dc:creator>
				<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.acloudtree.com/?p=1149</guid>
		<description><![CDATA[This little project started out as a basic script to connect to a Microsoft SqlServer and get data. It was a nightmare as I probably spent 15 hours learning about and troubleshooting both FreeTDS and UnixODBC. My pain is now your gain. NOTICE: I have homebrew configured to install all packages into my local directory [...]]]></description>
			<content:encoded><![CDATA[<p>This little project started out as a basic script to connect to a Microsoft SqlServer and get data. It was a nightmare as I probably spent 15 hours learning about and troubleshooting both FreeTDS and UnixODBC. My pain is now your gain.</p>
<p>NOTICE: I have homebrew configured to install all packages into my local directory /Users/jared/.homebrew/</p>
<p><strong>1) Install UnixODBC</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>jared<span style="color: #000000; font-weight: bold;">@</span>localhost<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ brew <span style="color: #c20cb9; font-weight: bold;">install</span> unixodbc
==<span style="color: #000000; font-weight: bold;">&gt;</span> Downloading http:<span style="color: #000000; font-weight: bold;">//</span>www.unixodbc.org<span style="color: #000000; font-weight: bold;">/</span>unixODBC-2.3.0.tar.gz
File already downloaded <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>jared<span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Caches<span style="color: #000000; font-weight: bold;">/</span>Homebrew
==<span style="color: #000000; font-weight: bold;">&gt;</span> .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--disable-debug</span> <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>jared<span style="color: #000000; font-weight: bold;">/</span>.homebrew<span style="color: #000000; font-weight: bold;">/</span>Cellar<span style="color: #000000; font-weight: bold;">/</span>unixodbc<span style="color: #000000; font-weight: bold;">/</span>2.3.0 <span style="color: #660033;">--enable-gui</span>=no
==<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
<span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>jared<span style="color: #000000; font-weight: bold;">/</span>.homebrew<span style="color: #000000; font-weight: bold;">/</span>Cellar<span style="color: #000000; font-weight: bold;">/</span>unixodbc<span style="color: #000000; font-weight: bold;">/</span>2.3.0: <span style="color: #000000;">24</span> files, 932K, built <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000;">22</span> seconds
<span style="color: #7a0874; font-weight: bold;">&#91;</span>jared<span style="color: #000000; font-weight: bold;">@</span>localhost<span style="color: #7a0874; font-weight: bold;">&#93;</span>$</pre></div></div>

<p><strong>2) Edit the FreeTDS formula And install</strong></p>
<p>What we are doing is changing the default tds version, enabling the msdblib, and pointing out where unixodbc installed.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'formula'</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">class</span> Freetds <span style="color:#006600; font-weight:bold;">&gt;</span> Formula
url <span style="color:#996600;">'http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-0.91.tar.gz'</span>
homepage <span style="color:#996600;">'http://www.freetds.org/'</span>
md5 <span style="color:#996600;">'b14db5823980a32f0643d1a84d3ec3ad'</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">def</span> install
<span style="color:#CC0066; font-weight:bold;">system</span> <span style="color:#996600;">&quot;./configure&quot;</span>,·
<span style="color:#996600;">&quot;--prefix=#{prefix}&quot;</span>,·
<span style="color:#996600;">&quot;--with-tdsver=7.0&quot;</span>,·
<span style="color:#996600;">&quot;--enable-msdblib&quot;</span>,
<span style="color:#996600;">&quot;--with-unixodbc=/Users/USERNAME/.homebrew/Cellar/unixodbc/2.3.0&quot;</span>,
<span style="color:#996600;">&quot;--mandir=#{man}&quot;</span>
<span style="color:#CC0066; font-weight:bold;">system</span> <span style="color:#996600;">'make'</span>
ENV.<span style="color:#9900CC;">j1</span> <span style="color:#008000; font-style:italic;"># Or fails to install on multi-core machines</span>
<span style="color:#CC0066; font-weight:bold;">system</span> <span style="color:#996600;">'make install'</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>jared<span style="color: #000000; font-weight: bold;">@</span>localhost<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ brew <span style="color: #c20cb9; font-weight: bold;">install</span> freetds</pre></div></div>

<p><strong>3) Start a new terminal session to make sure all your paths update</strong></p>
<p><strong>4) Confirm that you can connect to the server</strong></p>
<p>We need to make sure that you can connect to the sqlserver and that the port is open and available to you.</p>
<p>To do this we use telnet. If you see the following, success! The port is open on the server.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>jared<span style="color: #000000; font-weight: bold;">@</span>localhost<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ telnet server.example.com <span style="color: #000000;">1433</span>
Trying 192.168.1.101...
Connected to server.example.com.
Escape character is <span style="color: #ff0000;">'^]'</span>.</pre></div></div>

<p>If you see the following. You failed. Check the Sqlserver configuration, firewalls, or network configuration.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>jared<span style="color: #000000; font-weight: bold;">@</span>localhost<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ telnet server.example.com <span style="color: #000000;">1433</span>
Trying 192.168.1.101...
telnet: connect to address 192.168.1.101: Connection refused
telnet: Unable to connect to remote host</pre></div></div>

<p>Note: Press the ctrl + ] keys to break to a prompt and then type exit.</p>
<p><strong>5) Tsql</strong></p>
<p>FreeTDS comes with a couple cli applications. One of them is tsql. It isn&#8217;t great, but I use it test and see if at least FreeTDS is working correctly. After you install FreeTDS using homebrew try and connect to the host using the following command.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>jared<span style="color: #000000; font-weight: bold;">@</span>localhost<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ tsql <span style="color: #660033;">-H</span> server.example.com <span style="color: #660033;">-U</span> USERNAME <span style="color: #660033;">-P</span> PASSWORD <span style="color: #660033;">-v</span>
&nbsp;
locale is <span style="color: #ff0000;">&quot;en_US.UTF-8&quot;</span>
locale charset is <span style="color: #ff0000;">&quot;UTF-8&quot;</span>
using default charset <span style="color: #ff0000;">&quot;UTF-8&quot;</span>
<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #7a0874; font-weight: bold;">exit</span></pre></div></div>

<p>If you see a prompt, you haz awesome!</p>
<p><strong>6) Sym link the FreeTDS and UnixODBC conf files</strong></p>
<p>I create 3 sym links to the following files just for simplicity.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>jared<span style="color: #000000; font-weight: bold;">/</span>.homebrew<span style="color: #000000; font-weight: bold;">/</span>Cellar<span style="color: #000000; font-weight: bold;">/</span>freetds<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0.91</span><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>freetds.conf ~<span style="color: #000000; font-weight: bold;">/</span>.freetds.conf
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>jared<span style="color: #000000; font-weight: bold;">/</span>.homebrew<span style="color: #000000; font-weight: bold;">/</span>Cellar<span style="color: #000000; font-weight: bold;">/</span>unixodbc<span style="color: #000000; font-weight: bold;">/</span>2.3.0<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>odbc.ini ~<span style="color: #000000; font-weight: bold;">/</span>.odbc.ini
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>jared<span style="color: #000000; font-weight: bold;">/</span>.homebrew<span style="color: #000000; font-weight: bold;">/</span>Cellar<span style="color: #000000; font-weight: bold;">/</span>unixodbc<span style="color: #000000; font-weight: bold;">/</span>2.3.0<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>odbcinst.ini ~<span style="color: #000000; font-weight: bold;">/</span>.odbcinst.ini</pre></div></div>

<p><strong>7) edit the .freetds.conf and add the following</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>example<span style="color: #7a0874; font-weight: bold;">&#93;</span>
host = server.example.com
port = <span style="color: #000000;">1433</span>
tds version = <span style="color: #000000;">7.0</span></pre></div></div>

<p><strong>8 ) edit the odbcinst.ini and add the following</strong></p>
<p>You are telling unixodbc where your FreeTDS drivers are located using this configuration file.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>FreeTDS<span style="color: #7a0874; font-weight: bold;">&#93;</span>
Description = FreeTDS
Driver = <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>jared<span style="color: #000000; font-weight: bold;">/</span>.homebrew<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libtdsodbc.so
Setup = <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>jared<span style="color: #000000; font-weight: bold;">/</span>.homebrew<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libtdsodbc.so
UsageCount = <span style="color: #000000;">1</span></pre></div></div>

<p><strong>9) edit the .odbc.ini and add the following</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>myexample<span style="color: #7a0874; font-weight: bold;">&#93;</span>
Driver = FreeTDS <span style="color: #000000; font-weight: bold;">//</span> we just <span style="color: #000000; font-weight: bold;">set</span> this up a second ago
Description = MyExample
ServerName = example <span style="color: #000000; font-weight: bold;">//</span> this is the name of the configuration we used <span style="color: #000000; font-weight: bold;">in</span> the .freetds.conf <span style="color: #c20cb9; font-weight: bold;">file</span>
UID = USERNAME
PWD = PASSWORD</pre></div></div>

<p><strong>10) isql should work</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>jared<span style="color: #000000; font-weight: bold;">@</span>localhost<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ isql sqlinternal USERNAME PASSWORD
+---------------------------------------+
<span style="color: #000000; font-weight: bold;">|</span> Connected<span style="color: #000000; font-weight: bold;">!</span>
<span style="color: #000000; font-weight: bold;">|</span> sql-statement
<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #7a0874; font-weight: bold;">help</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>tablename<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #000000; font-weight: bold;">|</span> quit
+---------------------------------------+
SQL<span style="color: #000000; font-weight: bold;">&gt;</span>quit</pre></div></div>

<p><strong>11) Osql Error</strong></p>
<p>If you try osql, it throws an error.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>jared<span style="color: #000000; font-weight: bold;">@</span>localhost<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ osql <span style="color: #660033;">-S</span> myexample <span style="color: #660033;">-U</span> USERNAME <span style="color: #660033;">-P</span> PASSWORD
checking shared odbc libraries linked to isql <span style="color: #000000; font-weight: bold;">for</span> default directories...
<span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>jared<span style="color: #000000; font-weight: bold;">/</span>.homebrew<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>osql: line <span style="color: #000000;">53</span>: <span style="color: #c20cb9; font-weight: bold;">ldd</span>: <span style="color: #7a0874; font-weight: bold;">command</span> not found
<span style="color: #c20cb9; font-weight: bold;">strings</span>: can<span style="color: #ff0000;">'t open file: (No such file or directory)
osql: problem: no potential directory strings in &quot;/Users/jared/.homebrew/bin/isql&quot;
osql: advice: use &quot;osql -I DIR&quot; where DIR unixODBC\'</span>s <span style="color: #c20cb9; font-weight: bold;">install</span> prefix e.g. <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">local</span>
isql <span style="color: #c20cb9; font-weight: bold;">strings</span> are:
checking odbc.ini files
reading <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>jared<span style="color: #000000; font-weight: bold;">/</span>.odbc.ini
<span style="color: #7a0874; font-weight: bold;">&#91;</span>myexample<span style="color: #7a0874; font-weight: bold;">&#93;</span> found <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>jared<span style="color: #000000; font-weight: bold;">/</span>.odbc.ini
found this section:
<span style="color: #7a0874; font-weight: bold;">&#91;</span>myexample<span style="color: #7a0874; font-weight: bold;">&#93;</span>
Driver = FreeTDS
Description = MyExample
Servername = example
UID = USERNAME
PWD = PASSWORD
&nbsp;
looking <span style="color: #000000; font-weight: bold;">for</span> driver <span style="color: #000000; font-weight: bold;">for</span> DSN <span style="color: #7a0874; font-weight: bold;">&#91;</span>myexample<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>jared<span style="color: #000000; font-weight: bold;">/</span>.odbc.ini
found driver line: <span style="color: #ff0000;">&quot; Driver = FreeTDS&quot;</span>
driver <span style="color: #ff0000;">&quot;FreeTDS&quot;</span> found <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>myexample<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">in</span> .odbc.ini
found driver named <span style="color: #ff0000;">&quot;FreeTDS&quot;</span>
<span style="color: #ff0000;">&quot;FreeTDS&quot;</span> is not an executable <span style="color: #c20cb9; font-weight: bold;">file</span>
looking <span style="color: #000000; font-weight: bold;">for</span> entry named <span style="color: #7a0874; font-weight: bold;">&#91;</span>FreeTDS<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>odbcinst.ini
found driver line: <span style="color: #ff0000;">&quot; Driver = /Users/jared/.homebrew/lib/libtdsodbc.so&quot;</span>
found driver <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>jared<span style="color: #000000; font-weight: bold;">/</span>.homebrew<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libtdsodbc.so <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>FreeTDS<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">in</span> odbcinst.ini
<span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>jared<span style="color: #000000; font-weight: bold;">/</span>.homebrew<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libtdsodbc.so is not an executable <span style="color: #c20cb9; font-weight: bold;">file</span>
osql: error: no driver found <span style="color: #000000; font-weight: bold;">for</span> sqlinternal
<span style="color: #7a0874; font-weight: bold;">&#91;</span>jared<span style="color: #000000; font-weight: bold;">@</span>localhost<span style="color: #7a0874; font-weight: bold;">&#93;</span>$</pre></div></div>

<p>If you go through the error you will find that a certain driver is not executable. You just need to chmod the file.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>jared<span style="color: #000000; font-weight: bold;">@</span>localhost<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">554</span> <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>jared<span style="color: #000000; font-weight: bold;">/</span>.homebrew<span style="color: #000000; font-weight: bold;">/</span>Cellar<span style="color: #000000; font-weight: bold;">/</span>freetds<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0.91</span><span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libtdsodbc.0.so</pre></div></div>

<p>Now run it again.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>jared<span style="color: #000000; font-weight: bold;">@</span>localhost<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ osql <span style="color: #660033;">-S</span> myexample <span style="color: #660033;">-U</span> USERNAME <span style="color: #660033;">-P</span> PASSWORD
checking shared odbc libraries linked to isql <span style="color: #000000; font-weight: bold;">for</span> default directories...
<span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>jared<span style="color: #000000; font-weight: bold;">/</span>.homebrew<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>osql: line <span style="color: #000000;">53</span>: <span style="color: #c20cb9; font-weight: bold;">ldd</span>: <span style="color: #7a0874; font-weight: bold;">command</span> not found
<span style="color: #c20cb9; font-weight: bold;">strings</span>: can<span style="color: #ff0000;">'t open file: (No such file or directory)
osql: problem: no potential directory strings in &quot;/Users/jared/.homebrew/bin/isql&quot;
osql: advice: use &quot;osql -I DIR&quot; where DIR unixODBC\'</span>s <span style="color: #c20cb9; font-weight: bold;">install</span> prefix e.g. <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">local</span>
isql <span style="color: #c20cb9; font-weight: bold;">strings</span> are:
checking odbc.ini files
reading <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>jared<span style="color: #000000; font-weight: bold;">/</span>.odbc.ini
<span style="color: #7a0874; font-weight: bold;">&#91;</span>myexample<span style="color: #7a0874; font-weight: bold;">&#93;</span> found <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>jared<span style="color: #000000; font-weight: bold;">/</span>.odbc.ini
found this section:
<span style="color: #7a0874; font-weight: bold;">&#91;</span>myexample<span style="color: #7a0874; font-weight: bold;">&#93;</span>
Driver = FreeTDS
Description = myexamples
Servername = myexample
UID = USERNAME
PWD = PASSWORD
&nbsp;
looking <span style="color: #000000; font-weight: bold;">for</span> driver <span style="color: #000000; font-weight: bold;">for</span> DSN <span style="color: #7a0874; font-weight: bold;">&#91;</span>myexample<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>jared<span style="color: #000000; font-weight: bold;">/</span>.odbc.ini
found driver line: <span style="color: #ff0000;">&quot; Driver = FreeTDS&quot;</span>
driver <span style="color: #ff0000;">&quot;FreeTDS&quot;</span> found <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>myexample<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">in</span> .odbc.ini
found driver named <span style="color: #ff0000;">&quot;FreeTDS&quot;</span>
<span style="color: #ff0000;">&quot;FreeTDS&quot;</span> is not an executable <span style="color: #c20cb9; font-weight: bold;">file</span>
looking <span style="color: #000000; font-weight: bold;">for</span> entry named <span style="color: #7a0874; font-weight: bold;">&#91;</span>FreeTDS<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>odbcinst.ini
found driver line: <span style="color: #ff0000;">&quot; Driver = /Users/jared/.homebrew/lib/libtdsodbc.so&quot;</span>
found driver <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>jared<span style="color: #000000; font-weight: bold;">/</span>.homebrew<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libtdsodbc.so <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>FreeTDS<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">in</span> odbcinst.ini
<span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>jared<span style="color: #000000; font-weight: bold;">/</span>.homebrew<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libtdsodbc.so is an executable <span style="color: #c20cb9; font-weight: bold;">file</span>
Using ODBC-Combined strategy
DSN <span style="color: #7a0874; font-weight: bold;">&#91;</span>myexample<span style="color: #7a0874; font-weight: bold;">&#93;</span> has servername <span style="color: #ff0000;">&quot;myexample&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>from <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>jared<span style="color: #000000; font-weight: bold;">/</span>.odbc.ini<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>jared<span style="color: #000000; font-weight: bold;">/</span>.freetds.conf is a readable <span style="color: #c20cb9; font-weight: bold;">file</span>
looking <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>myexample<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>jared<span style="color: #000000; font-weight: bold;">/</span>.freetds.conf
found this section:
<span style="color: #7a0874; font-weight: bold;">&#91;</span>myexample<span style="color: #7a0874; font-weight: bold;">&#93;</span>
host = myexample.bendcable.net
port = <span style="color: #000000;">1433</span>
tds version = <span style="color: #000000;">7.0</span>
&nbsp;
Configuration looks OK. Connection details:
&nbsp;
DSN: myexample
odbc.ini: <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>jared<span style="color: #000000; font-weight: bold;">/</span>.odbc.ini
Driver: <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>jared<span style="color: #000000; font-weight: bold;">/</span>.homebrew<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libtdsodbc.so
Server <span style="color: #c20cb9; font-weight: bold;">hostname</span>: myexample.bendcable.net
Address: 192.168.12.103
&nbsp;
Attempting connection <span style="color: #c20cb9; font-weight: bold;">as</span> username ...
+ isql myexample USERNAME PASSWORD <span style="color: #660033;">-v</span>
+---------------------------------------+
<span style="color: #000000; font-weight: bold;">|</span> Connected<span style="color: #000000; font-weight: bold;">!</span>
<span style="color: #000000; font-weight: bold;">|</span> sql-statement
<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #7a0874; font-weight: bold;">help</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>tablename<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #000000; font-weight: bold;">|</span> quit
+---------------------------------------+
SQL<span style="color: #000000; font-weight: bold;">&gt;</span> quit</pre></div></div>

<p>SUCCESS!!!</p>
<p>Some other useful commands.</p>
<p>Useful commands</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">odbcinst <span style="color: #660033;">-j</span>
&nbsp;
odbcinst <span style="color: #660033;">-q</span> <span style="color: #660033;">-d</span>
&nbsp;
odbcinst <span style="color: #660033;">-q</span> <span style="color: #660033;">-s</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.acloudtree.com/how-to-install-freetds-and-unixodbc-on-osx-using-homebrew-for-use-with-ruby-php-and-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To: Install The HomeBrew Package Management Utility Locally On Mac OSX</title>
		<link>http://www.acloudtree.com/how-to-install-the-homebrew-package-management-utility-locally-on-mac-osx/</link>
		<comments>http://www.acloudtree.com/how-to-install-the-homebrew-package-management-utility-locally-on-mac-osx/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 18:20:30 +0000</pubDate>
		<dc:creator>jared.folkins</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[homebrew]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://www.acloudtree.com/?p=1051</guid>
		<description><![CDATA[I was tired of having to compile my shiz by hand and not being a fan of Macports, I decided to give HomeBrew a try. Not knowing if I would like it, I wanted to install it locally in my home directory so that I could blow it away should it upset me. Here are [...]]]></description>
			<content:encoded><![CDATA[<p>I was tired of having to compile my shiz by hand and not being a fan of Macports, I decided to give <a title="HomeBrew" href="https://github.com/mxcl/homebrew/wiki/installation">HomeBrew</a> a try. Not knowing if I would like it, I wanted to install it locally in my <em><strong>home</strong></em> directory so that I could blow it away should it upset me.</p>
<p>Here are the steps I used to make it happen.</p>
<p>Assuming that you have <strong><em>git</em></strong> and all other dependancies (<em>Intel CPU 2, OS X 10.5 or higher, Xcode with X11 3, Java Developer Update 4</em>) installed.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">jared<span style="color: #000000; font-weight: bold;">@</span>localhost$ <span style="color: #7a0874; font-weight: bold;">cd</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">jared<span style="color: #000000; font-weight: bold;">@</span>localhost$ <span style="color: #c20cb9; font-weight: bold;">git</span> clone https:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>mxcl<span style="color: #000000; font-weight: bold;">/</span>homebrew.git</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">jared<span style="color: #000000; font-weight: bold;">@</span>localhost$ <span style="color: #c20cb9; font-weight: bold;">vi</span> ~<span style="color: #000000; font-weight: bold;">/</span>.bash_profile</pre></div></div>

<p>Add the following line then :wq</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=<span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>homebrew<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #007800;">$PATH</span></pre></div></div>

<p>Open a new shell session and type brew.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">jared<span style="color: #000000; font-weight: bold;">@</span>localhost$ brew
Example usage:
  brew <span style="color: #c20cb9; font-weight: bold;">install</span> FORMULA...
  brew uninstall FORMULA...
  brew search <span style="color: #7a0874; font-weight: bold;">&#91;</span>foo<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  brew list <span style="color: #7a0874; font-weight: bold;">&#91;</span>FORMULA...<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  brew update
  brew upgrade <span style="color: #7a0874; font-weight: bold;">&#91;</span>FORMULA...<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  brew <span style="color: #7a0874; font-weight: bold;">&#91;</span>info <span style="color: #000000; font-weight: bold;">|</span> home<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>FORMULA...<span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
Troubleshooting:
  brew doctor
  brew <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-vd</span> FORMULA
  brew <span style="color: #7a0874; font-weight: bold;">&#91;</span>--env <span style="color: #000000; font-weight: bold;">|</span> --config<span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
Brewing:
  brew create <span style="color: #7a0874; font-weight: bold;">&#91;</span>URL <span style="color: #7a0874; font-weight: bold;">&#91;</span>--no-fetch<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
  brew edit <span style="color: #7a0874; font-weight: bold;">&#91;</span>FORMULA...<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  open https:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>mxcl<span style="color: #000000; font-weight: bold;">/</span>homebrew<span style="color: #000000; font-weight: bold;">/</span>wiki<span style="color: #000000; font-weight: bold;">/</span>Formula-Cookbook
&nbsp;
Further <span style="color: #7a0874; font-weight: bold;">help</span>:
  <span style="color: #c20cb9; font-weight: bold;">man</span> brew
  brew home</pre></div></div>

<p>You are all set!</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.acloudtree.com/how-to-install-the-homebrew-package-management-utility-locally-on-mac-osx/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Macifier.com &#8211; FREE Mac App That Locks Your Keyboard And Mouse</title>
		<link>http://www.acloudtree.com/macifier-com-free-mac-app-that-locks-your-keyboard-and-mouse/</link>
		<comments>http://www.acloudtree.com/macifier-com-free-mac-app-that-locks-your-keyboard-and-mouse/#comments</comments>
		<pubDate>Sat, 05 Feb 2011 19:38:57 +0000</pubDate>
		<dc:creator>jared.folkins</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Keyboard]]></category>
		<category><![CDATA[Lock]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[Mouse]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Toddler]]></category>

		<guid isPermaLink="false">http://www.acloudtree.com/?p=956</guid>
		<description><![CDATA[My daughter Gracie was routinely disabling our family laptop while she skyped with her Grandparents. So I wrote a small Macintosh application that locks the keyboard and mouse. After showing the initial app to my buddy Mike Brisk, he created an awesome logo. Head over to http://macifier.com and download it for free.]]></description>
			<content:encoded><![CDATA[<div id="attachment_957" class="wp-caption alignleft" style="width: 282px"><a href="http://www.acloudtree.com/wp-content/uploads/2011/02/macifier_logo.png"><img class="size-full wp-image-957" title="macifier_logo" src="http://www.acloudtree.com/wp-content/uploads/2011/02/macifier_logo.png" alt="" width="272" height="223" /></a><p class="wp-caption-text">Macifier - Pacifying Your Keyboard And Mouse</p></div>
<p>My daughter Gracie was routinely disabling our family laptop while she skyped with her Grandparents. So I wrote a small Macintosh application that locks the keyboard and mouse. After showing the initial app to my buddy Mike Brisk, he created an awesome logo.</p>
<p>Head over to <a title="Macifier - Lock Your Keyboard And Mouse For Free" href="http://macifier.com">http://macifier.com</a> and download it for free.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.acloudtree.com/macifier-com-free-mac-app-that-locks-your-keyboard-and-mouse/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>(Nerd) Logitec MX Mouse &amp; Snow Leopard 10.6 functionality</title>
		<link>http://www.acloudtree.com/nerd-logitec-mx-functionality-under-snow-leopard-106/</link>
		<comments>http://www.acloudtree.com/nerd-logitec-mx-functionality-under-snow-leopard-106/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 18:04:35 +0000</pubDate>
		<dc:creator>jared.folkins</dc:creator>
				<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[106]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[Logitech]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[Mouse]]></category>
		<category><![CDATA[Mx]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[Snow]]></category>
		<category><![CDATA[symbolic]]></category>
		<category><![CDATA[X]]></category>

		<guid isPermaLink="false">http://www.acloudtree.com/nerd-logitec-mx-functionality-under-snow-leopard-106/</guid>
		<description><![CDATA[For hard core geeks out there, nothing is more important than peripherals. Having a solid setup makes life a lot easier when your livelihood is working on the computer day in and day out. Keyboard = link Mouse = link Recently we have been testing the new and (Not Really) improved Mac operating system. I [...]]]></description>
			<content:encoded><![CDATA[<p>For hard core geeks out there, nothing is more important than peripherals. Having a solid setup makes life a lot easier when your livelihood is working on the computer day in and day out.</p>
<p>Keyboard = <a href="http://www.amazon.com/Microsoft-Natural-Ergo-Keyboard-4000/dp/B000A6PPOK/ref=sr_1_1?ie=UTF8&amp;s=electronics&amp;qid=1251827907&amp;sr=1-1" title="Keyboard">link</a></p>
<p>Mouse = <a href="http://www.amazon.com/Logitech-Revolution-Cordless-Laser-Mouse/dp/B000HCT12O/ref=sr_1_1?ie=UTF8&amp;s=electronics&amp;qid=1251827946&amp;sr=1-1" title="Mouse">link</a></p>
<p>Recently we have been testing the new and (Not Really) improved Mac operating system. I use my mouse to bounce in between virtual desktops by assigning several of my mouse buttons to the applications &#8216;Spaces.app&#8217; and &#8216;Expose.app&#8217;. After upgrading to 10.6 (Snow Leopard) those features ended up broken. The reason is that Snow Leopard moved the applications &#8216;Spaces.app&#8217; and &#8216;Expose.app&#8217; into the &#8216;Utilities&#8217; directory. The good news is that the fix is simple, all you have to to is create a couple of Symbolic links.</p>
<p>This is assuming you have the Logitech software installed for the mac.</p>
<p>1) Open the application &#8216;Terminal&#8217;</p>
<p>2) From the command line, run the following commands. You may be prompted for your password.</p>
<p><code><br />
sudo ln -s /Applications/Utilities/Spaces.app /Applications/Spaces.app<br />
</code></p>
<p><code><br />
sudo ln -s /Applications/Utilities/Expose.app /Applications/Expose.app<br />
</code></p>
<p>And that should do it!</p>
<p>You may need to reassign your mouse buttons again in;<br />
&#8216;System Preferences&#8217;-&gt;&#8217;Logitech Control Center&#8217;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.acloudtree.com/nerd-logitec-mx-functionality-under-snow-leopard-106/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

