Re: [gnome-db] FreeTDS DSN configuration



El jue, 04-11-2004 a las 16:19, Robert Davis escribió:
libgda:
<?xml version="1.0"?>
<libgda-config>
  <section path="/apps/libgda/Datasources/testweb">
    <entry name="DSN" type="string" value="HOST=ucweb"/> (freetds name)
    <entry name="Description" type="string" value=""/>
    <entry name="Password" type="string" value="xXpasswordXx"/>
    <entry name="Provider" type="string" value="FreeTDS"/>
    <entry name="Username" type="string" value="xXUserXx"/>
  </section>
</libgda-config>

freetds.conf:
[global]
        # TDS protocol version
        tds version = 4.2
[ucweb]
        host=jacket
        port=1433

That's it.  Set up an alias in freetds.conf (ucweb) and then have libgda
uses that alias for FreeTDS.  Also, was your rpm compiled with freetds
support?

Robert Davis
Yes, I have libgda compiled with freeTDS support (freeTDS is a RPM)
Can be a problem of my version of freeTDS? (freetds-0.62.3-1.1.fc2.dag)
Must I compile the latest stable release of freetds? (0.62.4)

I am conectig with SQL Server DE 2000. Must I install any service pack?

I have this configuration:

<?xml version="1.0"?>
<libgda-config> 
 <section path="/apps/libgda/Datasources/sql3">
    <entry name="DSN" type="string" value="DATABASE=IPTutorial;HOST=portatil;TDS_MINVER=0;TDS_MAJVER=8;TDS_FREETDSCONF=/etc/freetds.conf"/>
    <entry name="Description" type="string" value="sql3"/>
    <entry name="Password" type="string" value="xxxx"/>
    <entry name="Provider" type="string" value="FreeTDS"/>
    <entry name="Username" type="string" value="sa"/>
  </section>
</libgda-config>

freetds.conf:
[global]
        # TDS protocol version
	tds version = 8.0 
	dump file = /tmp/freetds.log
	debug level = 10
	text size = 64512
[portatil]
	host = 192.168.2.3
	port = 1433
	tds version = 8.0


tsql -I /etc/freetds.conf -S portatil -U sa
Works good (I can make selects, inserts ...).

a libgda program: 
	my own program: core dumped every time I make a  	
connection =gda_client_open_connection (client, "sql3", NULL, NULL,
					    GDA_CONNECTION_OPTIONS_READ_ONLY);
(this command works with Postgres, but I only tryed with an older version of libgda)

mergeant: I get a core dumped too.

The freetds log with libgda is:

Starting log file for FreeTDS 0.62.3
        on 2004-11-04 23:02:17 with debug level 99.
names for ISO-8859-1: ISO-8859-1
names for UTF-8: UTF-8
names for UCS-2LE: UCS-2LE
names for UCS-2BE: UCS-2BE
iconv to convert client-side data to the "iso_1" character set
23:02:17.536961 tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
23:02:17.537077 tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
23:02:17.537145 Connecting to 192.168.2.3 port 1433, TDS 8.0.
23:02:17.537957 tds_put_string converting 15 bytes of "miquel_portatil"
23:02:17.538029 tds_put_string wrote 30 bytes
23:02:17.538046 tds_put_string converting 2 bytes of "sa"
23:02:17.538061 tds_put_string wrote 4 bytes
23:02:17.538088 tds_put_string converting 6 bytes of "libgda"
23:02:17.538105 tds_put_string wrote 12 bytes
23:02:17.538119 tds_put_string converting 8 bytes of "portatil"
23:02:17.538134 tds_put_string wrote 16 bytes
23:02:17.538148 tds_put_string converting 11 bytes of "TDS-Library"
23:02:17.538163 tds_put_string wrote 22 bytes
23:02:17.538177 tds_put_string converting 10 bytes of "us_english"
23:02:17.538192 tds_put_string wrote 20 bytes
23:02:17.538206 tds_put_string wrote 0 bytes
23:02:17.538299 tds_process_login_tokens()
Received header @ 23:02:17.539517
0000 04 01 01 ab 00 34 01 00-                        |.....4..|
 
 
Received packet @ 23:02:17.539585
0000 e3 1b 00 01 06 6d 00 61-00 73 00 74 00 65 00 72 |.....m.a .s.t.e.r|
0010 00 06 6d 00 61 00 73 00-74 00 65 00 72 00 ab 8c |..m.a.s. t.e.r...|
0020 00 45 16 00 00 02 00 31-00 43 00 61 00 6d 00 62 |.E.....1 .C.a.m.b|
0030 00 69 00 61 00 64 00 6f-00 20 00 65 00 6c 00 20 |.i.a.d.o . .e.l. |
0040 00 63 00 6f 00 6e 00 74-00 65 00 78 00 74 00 6f |.c.o.n.t .e.x.t.o|
0050 00 20 00 64 00 65 00 20-00 62 00 61 00 73 00 65 |. .d.e.  .b.a.s.e|
0060 00 20 00 64 00 65 00 20-00 64 00 61 00 74 00 6f |. .d.e.  .d.a.t.o|
0070 00 73 00 20 00 61 00 20-00 27 00 6d 00 61 00 73 |.s. .a.  .'.m.a.s|
0080 00 74 00 65 00 72 00 27-00 2e 00 0f 4d 00 49 00 |.t.e.r.' ....M.I.|
0090 51 00 55 00 45 00 4c 00-5f 00 50 00 4f 00 52 00 |Q.U.E.L. _.P.O.R.|
00a0 54 00 41 00 54 00 49 00-4c 00 00 00 00 e3 08 00 |T.A.T.I. L.......|
00b0 07 05 0a 0c d0 00 00 00-e3 17 00 02 0a 75 00 73 |........ .....u.s|
00c0 00 5f 00 65 00 6e 00 67-00 6c 00 69 00 73 00 68 |._.e.n.g .l.i.s.h|
00d0 00 00 ab 78 00 47 16 00-00 01 00 27 00 43 00 68 |...x.G.. ...'.C.h|
00e0 00 61 00 6e 00 67 00 65-00 64 00 20 00 6c 00 61 |.a.n.g.e .d. .l.a|
00f0 00 6e 00 67 00 75 00 61-00 67 00 65 00 20 00 73 |.n.g.u.a .g.e. .s|
0100 00 65 00 74 00 74 00 69-00 6e 00 67 00 20 00 74 |.e.t.t.i .n.g. .t|
0110 00 6f 00 20 00 75 00 73-00 5f 00 65 00 6e 00 67 |.o. .u.s ._.e.n.g|
0120 00 6c 00 69 00 73 00 68-00 2e 00 0f 4d 00 49 00 |.l.i.s.h ....M.I.|
0130 51 00 55 00 45 00 4c 00-5f 00 50 00 4f 00 52 00 |Q.U.E.L. _.P.O.R.|
0140 54 00 41 00 54 00 49 00-4c 00 00 00 00 ad 36 00 |T.A.T.I. L.....6.|
0150 01 71 00 00 01 16 4d 00-69 00 63 00 72 00 6f 00 |.q....M. i.c.r.o.|
0160 73 00 6f 00 66 00 74 00-20 00 53 00 51 00 4c 00 |s.o.f.t.  .S.Q.L.|
0170 20 00 53 00 65 00 72 00-76 00 65 00 72 00 00 00 | .S.e.r. v.e.r...|
0180 00 00 08 00 02 f8 e3 11-00 04 03 35 00 31 00 32 |........ ...5.1.2|
0190 00 04 34 00 30 00 39 00-36 00 fd 00 00 00 00 00 |..4.0.9. 6.......|
01a0 00 00 00               -                        |...|
                                                                                                                                                             
                                                                                                                                                             
23:02:17.539911 looking for login token, got  e3(ENVCHANGE)
23:02:17.539938 tds_process_default_tokens() marker is e3(ENVCHANGE)
tds_get_string: reading 12 from wire to give 6 to client.
tds_get_string: reading 12 from wire to give 6 to client.
23:02:17.540036 looking for login token, got  ab(INFO)
23:02:17.540052 tds_process_default_tokens() marker is ab(INFO)
tds_get_string: reading 98 from wire to give 49 to client.
tds_get_string: reading 30 from wire to give 15 to client.
23:02:17.540509 looking for login token, got  e3(ENVCHANGE)
23:02:17.540537 tds_process_default_tokens() marker is e3(ENVCHANGE)
23:02:17.540893 tds_iconv_info_init: converting "ISO-8859-1"->"CP1252"
23:02:17.540939 looking for login token, got  e3(ENVCHANGE)
23:02:17.540957 tds_process_default_tokens() marker is e3(ENVCHANGE)
tds_get_string: reading 20 from wire to give 10 to client.
23:02:17.541036 looking for login token, got  ab(INFO)
23:02:17.541053 tds_process_default_tokens() marker is ab(INFO)
tds_get_string: reading 78 from wire to give 39 to client.
tds_get_string: reading 30 from wire to give 15 to client.
23:02:17.541174 looking for login token, got  ad(LOGINACK)
tds_get_string: reading 44 from wire to give 22 to client.
23:02:17.541209 looking for login token, got  e3(ENVCHANGE)
23:02:17.541224 tds_process_default_tokens() marker is e3(ENVCHANGE)
tds_get_string: reading 6 from wire to give 3 to client.
tds_get_string: reading 8 from wire to give 4 to client.
23:02:17.541264 looking for login token, got  fd(DONE)
23:02:17.541279 tds_process_default_tokens() marker is fd(DONE)
23:02:17.541295 tds_process_end: more_results = 0
                was_cancelled = 0
                error = 0
                done_count_valid = 0
23:02:17.541312 tds_process_end() state set to TDS_IDLE
23:02:17.541324 leaving tds_process_login_tokens() returning 1
23:02:17.541440 tds_put_string converting 22 bytes of "set textsize 50000000 "
23:02:17.541464 tds_put_string wrote 44 bytes
Sending packet @ 23:02:17.541480
0000 01 01 00 34 00 00 01 00-73 00 65 00 74 00 20 00 |...4.... s.e.t. .|
0010 74 00 65 00 78 00 74 00-73 00 69 00 7a 00 65 00 |t.e.x.t. s.i.z.e.|
0020 20 00 35 00 30 00 30 00-30 00 30 00 30 00 30 00 | .5.0.0. 0.0.0.0.|
0030 30 00 20 00            -                        |0. .|
                                                                                                                                                             
                                                                                                                                                             
Received header @ 23:02:17.542735
0000 04 01 00 11 00 34 01 00-                        |.....4..|
                                                                                                                                                             
                                                                                                                                                             
Received packet @ 23:02:17.542776
0000 fd 00 00 be 00 00 00 00-00                      |........ .|
                                                                                                                                                             
                                                                                                                                                             
23:02:17.542801 processing result tokens.  marker is  fd(DONE)
23:02:17.542817 tds_process_end: more_results = 0
                was_cancelled = 0
                error = 0
                done_count_valid = 0
23:02:17.542891 tds_process_end() state set to TDS_IDLE
23:02:17.542908 tds_process_result_tokens() state is COMPLETED
23:02:17.543076 tds_put_string converting 14 bytes of "USE IPTutorial"
23:02:17.543099 tds_put_string wrote 28 bytes
Sending packet @ 23:02:17.543114
0000 01 01 00 24 00 00 01 00-55 00 53 00 45 00 20 00 |...$.... U.S.E. .|
0010 49 00 50 00 54 00 75 00-74 00 6f 00 72 00 69 00 |I.P.T.u. t.o.r.i.|
0020 61 00 6c 00            -                        |a.l.|
                                                                                                                                                             
                                                                                                                                                             
Received header @ 23:02:17.543650
0000 04 01 00 c1 00 34 01 00-                        |.....4..|
                                                                                                                                                             
                                                                                                                                                             
Received packet @ 23:02:17.543686
0000 e3 23 00 01 0a 69 00 70-00 74 00 75 00 74 00 6f |.#...i.p .t.u.t.o|
0010 00 72 00 69 00 61 00 6c-00 06 6d 00 61 00 73 00 |.r.i.a.l ..m.a.s.|
0020 74 00 65 00 72 00 ab 7c-00 45 16 00 00 01 00 29 |t.e.r..| .E.....)|
0030 00 43 00 68 00 61 00 6e-00 67 00 65 00 64 00 20 |.C.h.a.n .g.e.d. |
0040 00 64 00 61 00 74 00 61-00 62 00 61 00 73 00 65 |.d.a.t.a .b.a.s.e|
0050 00 20 00 63 00 6f 00 6e-00 74 00 65 00 78 00 74 |. .c.o.n .t.e.x.t|
0060 00 20 00 74 00 6f 00 20-00 27 00 69 00 70 00 74 |. .t.o.  .'.i.p.t|
0070 00 75 00 74 00 6f 00 72-00 69 00 61 00 6c 00 27 |.u.t.o.r .i.a.l.'|
0080 00 2e 00 0f 4d 00 49 00-51 00 55 00 45 00 4c 00 |....M.I. Q.U.E.L.|
0090 5f 00 50 00 4f 00 52 00-54 00 41 00 54 00 49 00 |_.P.O.R. T.A.T.I.|
00a0 4c 00 00 01 00 e3 08 00-07 05 0a 0c d0 00 00 00 |L....... ........|
00b0 fd 00 00 e2 00 00 00 00-00                      |........ .|
                                                                                                                                                             
                                                                                                                                                             
23:02:17.543840 processing result tokens.  marker is  e3(ENVCHANGE)
23:02:17.543856 tds_process_default_tokens() marker is e3(ENVCHANGE)
tds_get_string: reading 20 from wire to give 10 to client.
tds_get_string: reading 12 from wire to give 6 to client.
23:02:17.543900 processing result tokens.  marker is  ab(INFO)
23:02:17.543930 tds_process_default_tokens() marker is ab(INFO)
tds_get_string: reading 82 from wire to give 41 to client.
tds_get_string: reading 30 from wire to give 15 to client.
23:02:17.544034 processing result tokens.  marker is  e3(ENVCHANGE)
23:02:17.544051 tds_process_default_tokens() marker is e3(ENVCHANGE)
23:02:17.544074 processing result tokens.  marker is  fd(DONE)
23:02:17.544089 tds_process_end: more_results = 0
                was_cancelled = 0
                error = 0
                done_count_valid = 0
23:02:17.544142 tds_process_end() state set to TDS_IDLE



Thank you for your help
Miguel Angel



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]