File: README.Debian

package info (click to toggle)
sqlrelay 1%3A0.37.1-3.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 13,084 kB
  • ctags: 6,691
  • sloc: cpp: 48,136; python: 10,118; ansic: 9,673; java: 9,195; php: 8,839; perl: 8,827; sh: 8,554; ruby: 8,516; tcl: 5,039; makefile: 3,665
file content (245 lines) | stat: -rw-r--r-- 9,232 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
SQL Relay for Debian
--------------------

			       SUPPORT

The official SQL Relay web page is at

		 http://sqlrelay.sourceforge.net/

There is a mailing list for SQL Relay; for historical reasons it is
hosted at Yahoo Groups.  Click on the Yahoo icon on the SQL Relay web
page to join. If you are careful with the check boxes and disable all
mailing offers you won't be getting advertisements. The archives are
not searchable without online ads, though. Still, David Muse and other
knowledgeable people hang out on the list, so it is a good idea to
join if you are looking for support.

Development of SQL Relay used to be hosted at sourceforge, but now
only ancient versions can be found there.

----------------------------------------------------------------------

			PACKAGING INFORMATION

sqlrelay		core daemons

sqlrelay-freetds        FreeDTS connection daemon
sqlrelay-postgresql     PostgreSQL connection daemon
sqlrelay-mysql	        mySQL connection daemon
sqlrelay-odbc	        ODBC connection daemon
sqlrelay-sqlite         SQLite connection daemon

sqlrelay-doc	        documentation
sqlrelay-config-gtk     configuration GUI
sqlrelay-test	        test suite

sqlrelay-dev	        C and C++ API
python2.3-sqlrelay      Python 2.3 API
python2.4-sqlrelay      Python 2.4 API
python-sqlrelay         (empty packagage demanded by python policy)
zope-sqlrelayda	        Zope Database Adapter
libdbd-sqlrelay-perl    Perl DBD API
libfirstworks-sqlr-perl Perl API
libsqlrelay-ruby	Ruby API
php4-sqlrelay           PHP4 API

You need to install "sqlrelay" and one of the connection packages to
do anything useful. You will also want to install one or more API
packages, although you can access your data bases with the cli
tools. If you like, you can install "sqlrelay-config-gtk" to manage
your config file. The test suite may help you get going, and the
documentation is highly recommended.

----------------------------------------------------------------------

			 DEBIAN CONFIGURATION

The file /etc/sqlrelay/instances controls which instances (defined in
/etc/sqlrelay/sqlrelay.conf) get started by the init script,
/etc/init.d/sqlrelay.

Lines in /etc/sqlrelay/instances can have the following forms:

	empty (ignored)
	comments (hash mark in the first column; ignored)
	<instance id>
	<instance id> <config file>

If the <config file> is missing, /etc/sqlrelay/sqlrelay.conf is assumed.
Each instance specified is under control of the init script.

/etc/sqlrelay/sqlrelay.conf and /etc/sqlrelay/instances are config
files, and as such are not touched by the debian package system.

----------------------------------------------------------------------

			    SECURITY NOTE

The file /etc/sqlrelay/sqlrelay.conf is owned by root and
world-readable; if you do not like this (because it contains database
passwords), you can

	chown root:sqlrelay /etc/sqlrelay/sqlrelay.conf
	chmod 640 /etc/sqlrelay/sqlrelay.conf

If you do this, you will also want to create a (stripped-down) copy of
this file for your own use, because passing passwords via the command
line to tools like sqlrsh will make them visible to anyone who typing
'ps -ef'

Future packages may make this type of configuration the default.

----------------------------------------------------------------------

			      POSTGRESQL

If you are having problems with getting PostgreSQL and SQL Relay to
talk, you should check if the user you are specifying in the
connection string is the same user the connection daemon is running
as. The following passage from the PostgreSQL README.Debian file may
clarify this:

> As of 7.1release-3, the default access policy for the Debian packages is that
> users connecting through Unix sockets are authenticated against their
> Unix login names.  (That is, they can connect to PostgreSQL
> only with names that match their Unix login names.)

Make sure the sqlrelay user is known to PostgreSQL (adding him if
necessary with CREATE USER or the script create_user), and also make
sure he is GRANTed the privileges you need for accessing the data base
through SQL Relay, if he isn't the owner.

----------------------------------------------------------------------

			    MS SQL SERVER

This configuration was contributed by Ulf Engstrm. Here is his
accompanying mail:

> Files are attached, but I'm not so sure they are very good. If you notice
> anything that's really wrong, just let me know.
> At least it's working pretty well :)
> 
> (Just a little explanation of my files and setup, I let sqlrelay connect to
> 3 servers. The first two are heavily used whereas the third one is not used
> very much, it's used for updates and it replicates to the other two. That's
> why the third one has lower settings then the first two.
> Also, the names, usernames and such are changed, but they follow that
> pattern, which made it very easy for me to connect from python, given the
> server name. That mean I easily can put on new servers, and all I have to do
> is add the server to the sql-relay conf-file and to my own python conf-file.
> conn = PySQLRClient.sqlrconnection('localhost',0,db+'_socket',db,db,0,1)


*** freetds.conf: 

#Since freetds is only used for my MsSQL-connections, this is
#all the configure that I use
#Only thing to note is version 7.0
#(./configure takes a --with-tds-version or something)

[global]
        # TDS protocol version
        tds version = 7.0

        initial block size = 512

        swap broken dates = no

        swap broken money = no

        # Database server login method, if both server and domain
        # logins are enabled, domain login is tried first if a domain
        # is specified, and if that fails the server login will be used.
        try server login = yes
        try domain login = no

        # The default authentication domain, can be overridden by
        # specifying a username with a domain prefix, e.g. DOMAIN\username
;       nt domain = WORKGROUP

        # If the server responds with different domain try that one?
        cross domain login = no

        # Whether to write a TDSDUMP file for diagnostic purposes
        # (setting this to /tmp is insecure on a multi-user system)
;       dump file = /tmp/freetds.log
;       debug level = 10

        # Command and connection timeouts
;       timeout = 10;
;       connect timeout = 10;

*** sqlrelay.conf ***

<?xml version="1.0"?>
<!DOCTYPE instances SYSTEM "sqlrelay.dtd">

<instances>

        <instance id="db_1" socket="/tmp/db_1_socket" dbase="freetds" connections="150" maxconnections="300" maxqueuelength="3"
+growby="10" ttl="600" endofsession="commit" sessiontimeout="600" runasuser="nobody" runasgroup="nobody" cursors="150"
+authtier="listener" handoff="pass" debug="none">
                <users>
                        <user user="db_1" password="db_1"/>
                </users>
                <connections>
                        <connection connectionid="db_1" string="server=db_1;db=db;user=user;password=password;" metric="1"/>
                </connections>
        </instance>

        <instance id="db_2" socket="/tmp/db_2_socket" dbase="freetds" connections="150" maxconnections="300" maxqueuelength="3"
+growby="10" ttl="600" endofsession="commit" sessiontimeout="600" runasuser="nobody" runasgroup="nobody" cursors="150"
+authtier="listener" handoff="pass" debug="none">
                <users>
                        <user user="db_2" password="db_2"/>
                </users>
                <connections>
                        <connection connectionid="db_2" string="server=db_2;db=db;user=user;password=password;" metric="1"/>
                </connections>
        </instance>


        <instance id="db_3" socket="/tmp/db_3_socket" dbase="freetds" connections="15" maxconnections="30" maxqueuelength="1" growby="2"
+ttl="60" endofsession="commit" sessiontimeout="60" runasuser="nobody" runasgroup="nobody" cursors="15" authtier="listener"
+handoff="pass" debug="none">
                <users>
                        <user user="db_3" password="db_3"/>
                </users>
                <connections>
                        <connection connectionid="db_3" string="server=db_3;db=db;user=user;password=password;" metric="1"/>
                </connections>
        </instance>

</instances>

----------------------------------------------------------------------

				 JAVA

NOTE: the Java API is not currently included. You need the source
package for the following.

I had partial success with the gcj compiler and gij vm. The test
in postgresql.class broke off at "COLUMN TYPES", though. It was the
only one I tested.

The java package included in the Debian SQL Relay distribution is
compiled with jikes.

Here is how I compiled the postgresql.java test with jikes:

$ cd test
$ gcj -C -classpath /usr/share/java/firstworks-sqlr.jar postgresql.java

And how I ran it with kaffe:

$ cd test
$ export LD_LIBRARY_PATH /usr/share/java
$ kaffe -classpath /usr/share/kaffe/Klasses.jar:/usr/share/java/firstworks-sqlr.jar:. postgresql localhost 9000 "" user passwd

----------------------------------------------------------------------

Florian M. Weps <fmw@debian.org>  Tue, 22 Oct 2002 21:59:07 +0200
Matthias Klose <doko@debian.org>