Line 4: |
Line 4: |
| Adding support in SME Server for a universal connection to foreign datebase servers using Open Database Connectivity (ODBC) with focus on PHP. | | Adding support in SME Server for a universal connection to foreign datebase servers using Open Database Connectivity (ODBC) with focus on PHP. |
| | | |
− | We will assume that you have an Ms SQL Server 2000/2005 running somewhere. The SQL Server should allow remote access and support connections using TCP/IP. As of my knowledge, connections using named pipes are unsupported. Of course; you will want a login id and password. | + | We will assume that you have an Microsoft SQL Server 2000/2005 running somewhere. The SQL Server should allow remote access and support connections using TCP/IP. As of my knowledge, connections using named pipes are unsupported. Of course; you will want a login id and password. |
| | | |
| It should be similar with Sybase and other versions of SQL Server, consult FreeTDS and unixODBC documentation for details. | | It should be similar with Sybase and other versions of SQL Server, consult FreeTDS and unixODBC documentation for details. |
Line 52: |
Line 52: |
| | | |
| wget http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-0.82.tar.gz | | wget http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-0.82.tar.gz |
− |
| |
| gzip -d freetds-0.82.tar.gz | | gzip -d freetds-0.82.tar.gz |
− |
| |
| tar -xvf freetds-0.82.tar | | tar -xvf freetds-0.82.tar |
− |
| |
| cd freetds-0.82 | | cd freetds-0.82 |
− |
| |
| ./configure --sysconfdir=/etc --prefix=/usr --with-tdsver=8.0 | | ./configure --sysconfdir=/etc --prefix=/usr --with-tdsver=8.0 |
− |
| |
| make | | make |
− |
| |
| make install | | make install |
− |
| |
| make clean | | make clean |
− |
| |
| signal-event post-upgrade; signal-event reboot | | signal-event post-upgrade; signal-event reboot |
− |
| |
| {{Warning box|msg=Leaving gcc on a production server is considered a security risk, if you do not really need it you should not install it, if you need it you should seriously consider uninstalling gcc when you no longer need it. Removing gcc can be done using the following command: | | {{Warning box|msg=Leaving gcc on a production server is considered a security risk, if you do not really need it you should not install it, if you need it you should seriously consider uninstalling gcc when you no longer need it. Removing gcc can be done using the following command: |
| yum remove gcc}} | | yum remove gcc}} |
Line 140: |
Line 131: |
| | | |
| [FreeTDS] | | [FreeTDS] |
− | Description = Access Ms SQL Server with FreeTDS driver | + | Description = Access Microsoft SQL Server with FreeTDS driver |
| Driver = /usr/lib/libtdsodbc.so | | Driver = /usr/lib/libtdsodbc.so |
| | | |
Line 230: |
Line 221: |
| FreeTDS [http://www.freetds.org/userguide/ user guide] with [http://www.freetds.org/userguide/troubleshooting.htm troubleshooting section]. | | FreeTDS [http://www.freetds.org/userguide/ user guide] with [http://www.freetds.org/userguide/troubleshooting.htm troubleshooting section]. |
| | | |
− | [http://se2.php.net/manual/en/book.uodbc.php php.net ODBC] | + | unixODBC [http://www.unixODBC.org official site] |
| + | |
| + | [http://php.net/manual/en/book.uodbc.php php.net ODBC] |
| | | |
| Input from, and credit to, Nick Critten [http://bends.se/it/smeserver/filer/HowTo_NickCritten_freetds.html unofficial copy of his HowTo] and [http://www.calio.it/docs/doku.php/sqlserver calio.it] [http://translate.google.se/translate?u=http%3A%2F%2Fwww.calio.it%2Fdocs%2Fdoku.php%2Fsqlserver&sl=it&tl=en&hl=sv&ie=UTF-8 translated] | | Input from, and credit to, Nick Critten [http://bends.se/it/smeserver/filer/HowTo_NickCritten_freetds.html unofficial copy of his HowTo] and [http://www.calio.it/docs/doku.php/sqlserver calio.it] [http://translate.google.se/translate?u=http%3A%2F%2Fwww.calio.it%2Fdocs%2Fdoku.php%2Fsqlserver&sl=it&tl=en&hl=sv&ie=UTF-8 translated] |
Line 248: |
Line 241: |
| ./osql -S xp3c -U dbuser -P dbpass | | ./osql -S xp3c -U dbuser -P dbpass |
| | | |
− | ====Ms SQL Server==== | + | On some systems (RISC) the drivers in /usr/local/lib/ may have the extension .sl rather than .so for shared libraries. |
| + | |
| + | ====Microsoft SQL Server==== |
| If your SQL Server are using instances, replace <port = 1433> with <instance = MyInstanceName> in your freetds.conf template fragment. Maybe adding the instance name after host in freetds.conf like this: <Server = xp3c\MyInstanceName> would aid too. | | If your SQL Server are using instances, replace <port = 1433> with <instance = MyInstanceName> in your freetds.conf template fragment. Maybe adding the instance name after host in freetds.conf like this: <Server = xp3c\MyInstanceName> would aid too. |
| | | |
| From SQL Server 2000 TDS version 8.0 should be used. Add the line <tds version = 8.0> in your template fragment for freetds.conf | | From SQL Server 2000 TDS version 8.0 should be used. Add the line <tds version = 8.0> in your template fragment for freetds.conf |
| | | |
− | Ms SQL Server might not allow the db system user "sa" to connect from outside the server, create another account with proper permissions.
| + | Microsoft SQL Server might not allow the db system user "sa" to connect from outside the server, create another account with proper permissions. |
| | | |
| Express edition have remote access disabled by default. Can be changed in the menu "Surface Area Configuration". [http://support.microsoft.com/kb/914277 More info here] | | Express edition have remote access disabled by default. Can be changed in the menu "Surface Area Configuration". [http://support.microsoft.com/kb/914277 More info here] |