You are not logged in Log in Join
You are here: Home » Members » dpetersen » Access MS-SQL Server DB with SQLRelay/Debian LINUX

Log in
Name

Password

 
 

History for Access MS-SQL Server DB with SQLRelay/Debian LINUX

??changed:
-
Access MSSQL Server Database from ZOPE on Debian LINUX

* Install sqlrelay, freetds and sqsh:
  
apt-get install sqlrelay-freetds sqsh

* Edit  /etc/freetds/freetds.conf and uncomment your favorite config: 
	# A typical MS SQL Server 7.0 configuration
	;[sqlserver70]
	;	host = 192.168.1.1
	;	port = 1433
	;	tds version = 7.0

	# A typical MS SQL Server 2000 configuration
	;[sqlserver2000]
	;	host = 192.168.1.1
	;	port = 1433
	;	tds version = 8.0

* Test your freetds-connection to mssql server with SQSH

sqsh -I /etc/freetds/freetds.conf -U MSSQL_USERNAME -P "MSSQL_PASSWORD" -D MSSQL_DATABASE -S sqlServer70 -C "Select top 10 * from sysobjects;"

### The table sysobjects should display right away, if not your configuration of freetds.conf or sqsh is wrong ###

* Edit  /etc/sqlrelay/sqlrelay.conf :

<?xml version="1.0"?>
<!DOCTYPE instances SYSTEM "sqlrelay.dtd">
<instances>
   <instance id="mssql" port="9000" socket="/tmp/examplesocket" dbase="freetds" connections="1" maxconnections="15" maxqueuelength="5" growby="1" ttl="60" endofsession="commit" sessiontimeout="600" runasuser="nobody" runasgroup="nobody" cursors="5" authtier="listener" handoff="pass" debug="none">
      <users>
         <user user="mssql1" password="mssql1"/>
      </users>
      <connections>
         <connection connectionid="db1" string="sybase=/etc/freetds/freetds.conf;user=sa;password=;server=sqlserver70;db=Northwind;" metric="1"/>
      </connections>
   </instance>	
</instances>


* Add the following new line to /etc/sqlrelay/instances :

mssql /etc/sqlrelay/sqlrelay.conf

* Start SQL Relay

sqlr-start -id mssql or 
/etc/init.d/sqlrelay start


* Install ZOPE SQLRelay-DA 

apt-get install zope-sqlrelayda


* Connect to ZOPE with your browser and add a new Z SQLRelay Database Connection:

Connection String: 127.0.0.1 9000 mssql1 mssql1

Enjoy !