-
-
Save mldeveloper01/4f20ef6a6eda55037be4d5c59d02721a to your computer and use it in GitHub Desktop.
Revisions
-
arvsrao revised this gist
Apr 22, 2013 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,9 +2,9 @@ Since I spent essentially two full days figuring out how to access a corporate M These instructions and the commands that follow, were executed on a MAC OS 10.8.3 system. Additionally, I found this blog [post][1] especially helpful during the debugging process. On mac os, there is a default ODBC manager, iODBC. Other Unix based systems tend to use [unixODBC][2]. Look elsewhere for a discussion about the differences between these driver managers. The only feature we care about is being able to connect to SQL databases through [pyodbc][3], and at the time of this writing [pyodbc][3] requires iODBC as its manager. Start by installing freeTDS libraries. FreeTDS allows unix programs to talk natively with MS SQL and SyBase databases. brew intsall freetds @@ -34,7 +34,7 @@ The driver is setup, so now install pyodbc: Now try to hit your DB: import pyodbc as p conn = p.connect("DSN=mysql01;UID=username;PWD=password") Should resolve without a problem. See pyodbc [docs][3] for help with executing queries, etc. -
arvsrao revised this gist
Apr 22, 2013 . 1 changed file with 19 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,7 +18,25 @@ Under **# A typical Microsoft server** you'll see *host*, *port*, and *tds versi port = 1433 tds version = 7.2 (for MS SQL 2008) Create `~/Library/ODBC/odbc.ini` and fill out the file like so: [MyDB] Description = Company MS SQL TDS_Version = 7.2 Driver = /usr/local/lib/libtdsodbc.so Server = ********* Port = 1433 The driver is setup, so now install pyodbc: sudo pip install pyodbc Now try to hit your DB: import pyodbc as p blah = p.connect("DSN=mysql01;UID=username;PWD=password") Should resolve without a problem. See pyodbc [docs][3] for help with executing queries, etc. [1]: http://blog.nguyenvq.com/2013/04/06/guide-to-accessing-ms-sql-server-and-mysql-server-on-mac-os-x/ -
arvsrao revised this gist
Apr 22, 2013 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,6 +13,7 @@ FreeTDS needs to be configured, so edit your freetds.conf in /usr/local/etc/ or nano ~/.freetds.conf Under **# A typical Microsoft server** you'll see *host*, *port*, and *tds version* variables. These and these only should be set. host = myserver.company.com port = 1433 tds version = 7.2 (for MS SQL 2008) -
arvsrao revised this gist
Apr 22, 2013 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,6 +16,8 @@ Under **# A typical Microsoft server** you'll see *host*, *port*, and *tds versi host = myserver.company.com port = 1433 tds version = 7.2 (for MS SQL 2008) asdfasdf [1]: http://blog.nguyenvq.com/2013/04/06/guide-to-accessing-ms-sql-server-and-mysql-server-on-mac-os-x/ -
arvsrao revised this gist
Apr 22, 2013 . 1 changed file with 9 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,8 +6,16 @@ On mac os, there is a default ODBC manager, iODBC. Other Unix based systems tend Start by installing freeTDS libraries. FreeTDS allows unix programs to talk natively to MS SQL and SyBase databases. brew intsall freetds FreeTDS needs to be configured, so edit your freetds.conf in /usr/local/etc/ or ~/.freetds.conf nano ~/.freetds.conf Under **# A typical Microsoft server** you'll see *host*, *port*, and *tds version* variables. These and these only should be set. host = myserver.company.com port = 1433 tds version = 7.2 (for MS SQL 2008) [1]: http://blog.nguyenvq.com/2013/04/06/guide-to-accessing-ms-sql-server-and-mysql-server-on-mac-os-x/ -
arvsrao revised this gist
Apr 22, 2013 . 1 changed file with 6 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,12 @@ Since I spent essentially two full days figuring out how to access a corporate M These instructions and the commands that follow, were executed on a MAC OS 10.8.3 system. Additionally, I found this blog [post][1] especially helpful during the debugging process. On mac os, there is a default ODBC manager, iODBC. Other Unix based systems tend to use [unixODBC][2]. Look elsewhere for a discussion about the differences between these diver manager. The only feature we care about is being able to connect to SQL databases through [pyodbc][3], and at the time of this writing, the pyodbc requires iODBC as its manager. Start by installing freeTDS libraries. FreeTDS allows unix programs to talk natively to MS SQL and SyBase databases. brew intsall freetds [1]: http://blog.nguyenvq.com/2013/04/06/guide-to-accessing-ms-sql-server-and-mysql-server-on-mac-os-x/ -
arvsrao renamed this gist
Apr 22, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
arvsrao renamed this gist
Apr 22, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
arvsrao revised this gist
Apr 22, 2013 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,6 @@ These instructions and the commands that follow, were executed on a MAC OS 10.8. On mac os, there is a default ODBC manager, iODBC. Other Unix based systems tend to use [unixODBC][2]. Look elsewhere for a discussion about the differences between these diver manager. The only feature we care about is being able to connect to SQL databases through [pyodbc][3], and at the time of this writing, the [1]: http://blog.nguyenvq.com/2013/04/06/guide-to-accessing-ms-sql-server-and-mysql-server-on-mac-os-x/ [2]: http://www.unixodbc.org [3]: https://code.google.com/p/pyodbc/ -
arvsrao revised this gist
Apr 22, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ Since I spent essentially two full days figuring out how to access a corporate M These instructions and the commands that follow, were executed on a MAC OS 10.8.3 system. Additionally, I found this blog [post][1] especially helpful during the debugging process. On mac os, there is a default ODBC manager, iODBC. Other Unix based systems tend to use [unixODBC][2]. Look elsewhere for a discussion about the differences between these diver manager. The only feature we care about is being able to connect to SQL databases through [pyodbc][3], and at the time of this writing, the -
arvsrao created this gist
Apr 22, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ Since I spent essentially two full days figuring out how to access a corporate MS SQL database pythonicly, I figured I should leave some notes, for future reference and to aid other souls looking to do the same. These instructions and the commands that follow, were executed on a MAC OS 10.8.3 system. Additionally, I found this blog [post][1] especially helpful during the debugging process. On mac os, there is a default ODBC manager, iODBC. Other Unix based systems tend to use [unixODBC] [2]. Look elsewhere for a discussion about the differences between these diver manager. The only feature we care about is being able to connect to SQL databases through [pyodbc][3], and at the time of this writing, the [1]: http://blog.nguyenvq.com/2013/04/06/guide-to-accessing-ms-sql-server-and-mysql-server-on-mac-os-x/ [2]: http://www.unixodbc.org [3]: https://code.google.com/p/pyodbc/