From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 11:13:23 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 11:13:23 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Jan 13 15:13:55 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:55 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:55 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Jan 13 15:13:55 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Fri Jan 13 15:13:55 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:55 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 15:13:55 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 15:13:55 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 13 15:13:55 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 15:13:55 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 13 15:13:55 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 15:13:55 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 13 15:13:55 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 15:13:55 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 15:13:55 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 15:13:55 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 15:21:18 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 15:21:18 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 15:21:18 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Jan 13 20:01:44 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:44 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:44 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Jan 13 20:01:44 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Fri Jan 13 20:01:44 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:44 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 20:01:44 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 20:01:44 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 13 20:01:44 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 20:01:44 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 13 20:01:44 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 20:01:44 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 13 20:01:44 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 20:01:44 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 20:01:44 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 20:01:44 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Jan 14 12:00:49 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:49 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:49 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Jan 14 12:00:49 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sat Jan 14 12:00:49 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:49 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 12:00:49 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 12:00:49 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 14 12:00:49 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 12:00:49 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 14 12:00:49 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 12:00:49 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 14 12:00:49 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 12:00:49 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 12:00:49 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 12:00:49 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 14 20:00:46 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 20:00:46 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 20:00:46 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 20:00:46 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Jan 15 08:02:10 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 08:02:10 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 08:02:10 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Jan 15 08:02:10 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sun Jan 15 08:02:10 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 08:02:10 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 08:02:10 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 08:02:10 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 15 08:02:10 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 08:02:10 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 15 08:02:10 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 08:02:10 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 15 08:02:10 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 08:02:10 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 08:02:10 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 08:02:10 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Jan 15 16:00:46 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:46 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:46 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Jan 15 16:00:46 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sun Jan 15 16:00:46 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:46 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 16:00:46 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 16:00:46 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 15 16:00:46 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 16:00:46 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 15 16:00:46 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 16:00:46 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 15 16:00:46 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 16:00:46 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 16:00:46 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 16:00:46 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Jan 15 20:00:46 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:46 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:46 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Jan 15 20:00:46 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sun Jan 15 20:00:46 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:46 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 20:00:46 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 20:00:46 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 15 20:00:46 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 20:00:46 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 15 20:00:46 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 20:00:46 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 15 20:00:46 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 20:00:46 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 20:00:46 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 20:00:46 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Jan 16 08:02:34 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:34 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:34 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Jan 16 08:02:34 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Mon Jan 16 08:02:34 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:34 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 08:02:34 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 08:02:34 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 16 08:02:34 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 08:02:34 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 16 08:02:34 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 08:02:34 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 16 08:02:34 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 08:02:34 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 08:02:34 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 08:02:34 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 12:01:04 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 17 12:01:04 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 12:01:04 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 12:01:04 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 12:01:04 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Jan 17 20:00:53 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:53 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:53 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Jan 17 20:00:53 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Tue Jan 17 20:00:53 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:53 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 20:00:53 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 20:00:54 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 17 20:00:54 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 20:00:54 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 17 20:00:54 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 20:00:54 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 17 20:00:54 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 20:00:54 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 20:00:54 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 20:00:54 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Jan 18 08:04:20 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:20 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:20 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Jan 18 08:04:20 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Wed Jan 18 08:04:20 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:20 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 08:04:21 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 08:04:21 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Jan 18 08:04:21 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 08:04:21 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Jan 18 08:04:21 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 08:04:21 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Jan 18 08:04:21 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 08:04:21 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 08:04:21 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 08:04:21 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Jan 18 12:01:07 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 12:01:07 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 12:01:07 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Jan 18 12:01:07 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Wed Jan 18 12:01:07 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 12:01:07 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 12:01:07 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 12:01:07 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Jan 18 12:01:07 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 12:01:07 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Jan 18 12:01:07 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 12:01:07 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Jan 18 12:01:07 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 12:01:07 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 12:01:07 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 12:01:07 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Jan 18 16:01:32 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:32 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:32 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Jan 18 16:01:32 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Wed Jan 18 16:01:32 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:32 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 16:01:32 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 16:01:33 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Jan 18 16:01:33 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 16:01:33 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Jan 18 16:01:33 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 16:01:33 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Jan 18 16:01:33 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 16:01:33 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 16:01:33 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 16:01:33 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Jan 18 20:00:58 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 20:00:58 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Jan 18 20:00:58 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 20:00:58 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 20:00:58 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 20:00:58 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 08:04:42 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Jan 19 08:04:42 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 08:04:42 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 08:04:42 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 08:04:42 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 12:01:03 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Jan 19 16:03:06 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 16:03:06 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 16:03:06 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Jan 19 16:03:06 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Thu Jan 19 16:03:07 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 16:03:07 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 16:03:07 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 16:03:07 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Jan 19 16:03:07 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 16:03:07 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Jan 19 16:03:07 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 16:03:07 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Jan 19 16:03:07 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 16:03:07 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 16:03:07 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 16:03:07 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Jan 19 20:00:51 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:51 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:51 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Jan 19 20:00:51 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Thu Jan 19 20:00:51 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:51 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 20:00:51 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 20:00:51 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Jan 19 20:00:51 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 20:00:51 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Jan 19 20:00:51 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 20:00:51 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Jan 19 20:00:51 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 20:00:51 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 20:00:51 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 20:00:51 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Jan 20 08:07:12 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 08:07:13 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 08:07:13 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Jan 20 08:07:13 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Fri Jan 20 08:07:13 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 08:07:13 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 08:07:13 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 08:07:13 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 20 08:07:13 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 08:07:13 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 20 08:07:13 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 08:07:13 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 20 08:07:13 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 08:07:13 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 08:07:13 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 08:07:13 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Jan 20 12:02:08 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 12:02:08 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 12:02:08 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Jan 20 12:02:08 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Fri Jan 20 12:02:08 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 12:02:08 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 12:02:08 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 12:02:08 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 20 12:02:09 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 12:02:09 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 20 12:02:09 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 12:02:09 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 20 12:02:09 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 12:02:09 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 12:02:09 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 12:02:09 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Jan 20 20:00:49 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:50 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:50 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Jan 20 20:00:50 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Fri Jan 20 20:00:50 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:50 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 20:00:50 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 20:00:50 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 20 20:00:50 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 20:00:50 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 20 20:00:50 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 20:00:50 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 20 20:00:50 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 20:00:50 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 20:00:50 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 20:00:50 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Jan 21 08:03:57 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:57 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:57 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Jan 21 08:03:57 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sat Jan 21 08:03:57 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:57 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 08:03:57 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 08:03:57 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 21 08:03:57 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 08:03:57 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 21 08:03:58 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 08:03:58 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 21 08:03:58 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 08:03:58 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 08:03:58 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 08:03:58 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Jan 21 16:00:53 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:53 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:53 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Jan 21 16:00:54 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sat Jan 21 16:00:54 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:54 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 16:00:54 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 16:00:54 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 21 16:00:54 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 16:00:54 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 21 16:00:54 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 16:00:54 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 21 16:00:54 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 16:00:54 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 16:00:54 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 16:00:54 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Jan 22 08:02:49 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:49 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:49 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Jan 22 08:02:49 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sun Jan 22 08:02:49 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:49 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 08:02:49 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 08:02:49 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 22 08:02:49 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 08:02:49 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 22 08:02:49 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 08:02:49 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 22 08:02:49 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 08:02:49 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 08:02:49 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 08:02:49 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Jan 22 12:00:53 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:53 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:53 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Jan 22 12:00:53 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sun Jan 22 12:00:54 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:54 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 12:00:54 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 12:00:54 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 22 12:00:54 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 12:00:54 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 22 12:00:54 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 12:00:54 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 22 12:00:54 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 12:00:54 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 12:00:54 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 12:00:54 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Jan 22 16:01:24 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:24 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:24 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Jan 22 16:01:24 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sun Jan 22 16:01:24 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:24 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 16:01:24 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 16:01:24 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 22 16:01:24 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 16:01:24 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 22 16:01:24 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 16:01:24 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 22 16:01:24 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 16:01:24 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 16:01:24 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 16:01:24 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Jan 22 20:01:19 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:19 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:19 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Jan 22 20:01:19 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sun Jan 22 20:01:19 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:19 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 20:01:19 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 20:01:19 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 22 20:01:19 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 20:01:19 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 22 20:01:19 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 20:01:19 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 22 20:01:19 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 20:01:19 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 20:01:19 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 20:01:19 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Jan 23 08:02:45 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:45 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:45 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Jan 23 08:02:45 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Mon Jan 23 08:02:45 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:45 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 08:02:45 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 08:02:45 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 23 08:02:45 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 08:02:45 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 23 08:02:45 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 08:02:45 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 23 08:02:45 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 08:02:45 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 08:02:45 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 08:02:45 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 12:00:59 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 23 12:00:59 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 12:00:59 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 12:00:59 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 12:00:59 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Jan 23 16:01:52 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:52 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:52 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Jan 23 16:01:52 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Mon Jan 23 16:01:52 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:52 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 16:01:52 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 16:01:52 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 23 16:01:52 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 16:01:52 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 23 16:01:52 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 16:01:52 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 23 16:01:52 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 16:01:52 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 16:01:52 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 16:01:52 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Jan 24 08:03:17 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 08:03:17 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 08:03:17 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Jan 24 08:03:17 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Tue Jan 24 08:03:17 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 08:03:17 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 08:03:17 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 08:03:17 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 24 08:03:17 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 08:03:17 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 24 08:03:17 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 08:03:17 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 24 08:03:17 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 08:03:17 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 08:03:17 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 08:03:17 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Jan 24 12:03:06 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 12:03:06 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 12:03:06 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Jan 24 12:03:06 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Tue Jan 24 12:03:06 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 12:03:06 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 12:03:06 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 12:03:06 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 24 12:03:06 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 12:03:06 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 24 12:03:06 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 12:03:07 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 24 12:03:07 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 12:03:07 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 12:03:07 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 12:03:07 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Jan 24 16:01:26 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:26 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:26 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Jan 24 16:01:26 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Tue Jan 24 16:01:26 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:26 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 16:01:26 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 16:01:26 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 24 16:01:26 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 16:01:26 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 24 16:01:26 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 16:01:26 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 24 16:01:26 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 16:01:26 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 16:01:26 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 16:01:26 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Jan 25 08:02:06 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 08:02:06 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 08:02:06 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Jan 25 08:02:06 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Wed Jan 25 08:02:06 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 08:02:06 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 08:02:07 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 08:02:07 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Jan 25 08:02:07 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 08:02:07 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Jan 25 08:02:07 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 08:02:07 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Jan 25 08:02:07 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 08:02:07 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 08:02:07 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 08:02:07 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Jan 25 16:01:02 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 16:01:02 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 16:01:02 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Jan 25 16:01:02 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Wed Jan 25 16:01:02 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 16:01:02 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 16:01:03 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 16:01:03 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Jan 25 16:01:03 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 16:01:03 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Jan 25 16:01:03 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 16:01:03 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Jan 25 16:01:03 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 16:01:03 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 16:01:03 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 16:01:03 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Jan 25 20:00:55 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:56 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:56 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Jan 25 20:00:56 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Wed Jan 25 20:00:56 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:56 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 20:00:56 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 20:00:56 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Jan 25 20:00:56 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 20:00:56 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Jan 25 20:00:56 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 20:00:56 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Jan 25 20:00:56 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 20:00:56 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 20:00:56 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 20:00:56 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Jan 26 08:05:55 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 08:05:55 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 08:05:55 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Jan 26 08:05:55 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Thu Jan 26 08:05:55 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 08:05:55 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 08:05:55 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 08:05:55 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Jan 26 08:05:55 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 08:05:55 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Jan 26 08:05:55 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 08:05:55 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Jan 26 08:05:55 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 08:05:55 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 08:05:55 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 08:05:56 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Jan 26 12:01:08 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 12:01:08 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 12:01:08 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Jan 26 12:01:08 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Thu Jan 26 12:01:08 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 12:01:08 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 12:01:08 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 12:01:08 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Jan 26 12:01:08 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 12:01:08 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Jan 26 12:01:08 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 12:01:08 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Jan 26 12:01:08 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 12:01:08 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 12:01:08 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 12:01:08 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Jan 26 16:00:56 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:56 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:56 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Jan 26 16:00:56 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Thu Jan 26 16:00:56 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:56 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 16:00:56 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 16:00:56 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Jan 26 16:00:56 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 16:00:56 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Jan 26 16:00:56 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 16:00:56 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Jan 26 16:00:57 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 16:00:57 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 16:00:57 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 16:00:57 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Jan 26 20:00:49 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:49 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:49 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Jan 26 20:00:49 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Thu Jan 26 20:00:49 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:49 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 20:00:49 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 20:00:49 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Jan 26 20:00:49 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 20:00:49 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Jan 26 20:00:49 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 20:00:49 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Jan 26 20:00:49 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 20:00:49 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 20:00:49 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 20:00:49 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Jan 27 08:06:50 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 08:06:51 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 08:06:51 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Jan 27 08:06:51 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Fri Jan 27 08:06:51 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 08:06:51 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 08:06:51 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 08:06:51 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 27 08:06:51 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 08:06:51 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 27 08:06:51 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 08:06:51 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 27 08:06:51 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 08:06:51 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 08:06:51 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 08:06:51 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Jan 27 12:02:13 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 12:02:13 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 12:02:13 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Jan 27 12:02:13 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Fri Jan 27 12:02:13 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 12:02:13 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 12:02:13 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 12:02:13 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 27 12:02:13 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 12:02:13 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 27 12:02:13 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 12:02:13 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 27 12:02:13 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 12:02:13 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 12:02:13 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 12:02:13 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Jan 27 16:01:09 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 16:01:09 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 16:01:09 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Jan 27 16:01:09 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Fri Jan 27 16:01:09 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 16:01:09 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 16:01:09 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 16:01:09 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 27 16:01:09 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 16:01:09 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 27 16:01:09 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 16:01:09 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 27 16:01:09 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 16:01:09 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 16:01:09 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 16:01:09 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Jan 27 20:00:58 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:58 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:58 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Jan 27 20:00:58 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Fri Jan 27 20:00:58 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:58 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 20:00:59 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 20:00:59 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 27 20:00:59 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 20:00:59 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 27 20:00:59 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 20:01:01 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Jan 27 20:01:01 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 20:01:01 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 20:01:01 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 20:01:01 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Jan 28 08:05:47 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:47 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:47 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Jan 28 08:05:47 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sat Jan 28 08:05:48 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:48 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 08:05:48 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 08:05:48 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 28 08:05:48 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 08:05:48 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 28 08:05:48 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 08:05:48 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 28 08:05:48 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 08:05:48 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 08:05:48 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 08:05:48 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Jan 28 12:01:56 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:56 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:56 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Jan 28 12:01:56 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sat Jan 28 12:01:56 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:56 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 12:01:56 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 12:01:57 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 28 12:01:57 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 12:01:57 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 28 12:01:57 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 12:01:57 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 28 12:01:57 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 12:01:57 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 12:01:57 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 12:01:57 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Jan 28 16:00:58 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:58 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:59 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Jan 28 16:00:59 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sat Jan 28 16:00:59 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:59 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 16:00:59 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 16:00:59 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 28 16:00:59 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 16:00:59 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 28 16:00:59 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 16:00:59 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 28 16:00:59 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 16:00:59 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 16:00:59 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 16:00:59 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Jan 29 08:07:36 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 08:07:36 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 08:07:36 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Jan 29 08:07:36 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sun Jan 29 08:07:36 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 08:07:36 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 08:07:37 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 08:07:37 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 29 08:07:37 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 08:07:37 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 29 08:07:37 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 08:07:37 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 29 08:07:37 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 08:07:37 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 08:07:37 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 08:07:37 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Jan 29 12:01:04 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 12:01:04 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 12:01:04 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Jan 29 12:01:04 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sun Jan 29 12:01:04 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 12:01:04 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 12:01:04 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 12:01:04 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 29 12:01:04 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 12:01:04 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 29 12:01:04 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 12:01:04 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 29 12:01:04 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 12:01:04 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 12:01:04 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 12:01:04 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Jan 29 16:00:56 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:56 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:56 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Jan 29 16:00:56 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sun Jan 29 16:00:56 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:56 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 16:00:57 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 16:00:57 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 29 16:00:57 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 16:00:57 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 29 16:00:57 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 16:00:57 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 29 16:00:57 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 16:00:57 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 16:00:57 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 16:00:57 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Jan 29 20:01:00 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 20:01:00 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 20:01:00 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 20:01:00 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Jan 30 08:09:04 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 08:09:04 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 08:09:04 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Jan 30 08:09:04 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Mon Jan 30 08:09:05 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 08:09:05 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 08:09:05 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 08:09:05 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 30 08:09:05 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 08:09:05 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 30 08:09:05 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 08:09:05 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 30 08:09:05 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 08:09:06 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 08:09:06 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 08:09:06 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Jan 30 12:03:59 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:59 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:59 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Jan 30 12:03:59 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Mon Jan 30 12:03:59 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:59 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 12:03:59 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 12:03:59 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 30 12:03:59 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 12:03:59 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 30 12:03:59 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 12:03:59 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 30 12:03:59 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 12:03:59 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 12:03:59 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 12:03:59 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Jan 30 16:04:16 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 16:04:16 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 16:04:16 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Jan 30 16:04:16 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Mon Jan 30 16:04:16 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 16:04:16 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 16:04:17 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 16:04:17 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 30 16:04:17 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 16:04:17 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 30 16:04:17 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 16:04:17 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 30 16:04:17 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 16:04:17 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 16:04:17 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 16:04:17 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Jan 30 20:02:16 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 20:02:17 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 20:02:17 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Jan 30 20:02:17 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Mon Jan 30 20:02:17 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 20:02:17 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 20:02:17 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 20:02:17 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 30 20:02:17 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 20:02:17 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 30 20:02:17 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 20:02:17 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Jan 30 20:02:17 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 20:02:17 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 20:02:17 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 20:02:17 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Jan 31 08:07:57 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:57 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:57 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Jan 31 08:07:57 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Tue Jan 31 08:07:57 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:57 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 08:07:57 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 08:07:57 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 31 08:07:57 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 08:07:57 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 31 08:07:57 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 08:07:57 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 31 08:07:57 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 08:07:57 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 08:07:57 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 08:07:57 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Jan 31 12:04:20 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 12:04:20 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 12:04:20 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Jan 31 12:04:20 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Tue Jan 31 12:04:20 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 12:04:21 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 12:04:21 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 12:04:21 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 31 12:04:21 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 12:04:21 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 31 12:04:21 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 12:04:22 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 31 12:04:22 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 12:04:22 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 12:04:22 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 12:04:22 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Jan 31 20:01:12 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 20:01:12 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 20:01:12 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Jan 31 20:01:12 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Tue Jan 31 20:01:12 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 20:01:12 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 20:01:12 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 20:01:12 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 31 20:01:12 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 20:01:12 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 31 20:01:12 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 20:01:12 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Jan 31 20:01:12 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 20:01:12 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 20:01:12 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 20:01:12 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Feb 1 08:09:55 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:55 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:56 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Feb 1 08:09:56 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Wed Feb 1 08:09:56 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:56 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 08:09:56 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 08:09:56 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 1 08:09:56 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 08:09:56 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 1 08:09:56 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 08:09:56 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 1 08:09:56 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 08:09:56 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 08:09:56 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 08:09:57 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 1 12:02:47 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 12:02:47 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 12:02:47 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 12:02:47 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 1 20:01:05 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 20:01:05 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 1 20:01:06 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 20:01:06 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 20:01:06 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 20:01:06 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Feb 2 08:12:57 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 08:12:58 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 08:12:58 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Feb 2 08:12:58 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Thu Feb 2 08:12:58 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 08:12:58 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 08:12:59 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 08:12:59 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Feb 2 08:12:59 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 08:12:59 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Feb 2 08:12:59 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 08:12:59 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Feb 2 08:12:59 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 08:12:59 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 08:12:59 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 08:12:59 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Feb 2 12:02:53 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:53 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:53 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Feb 2 12:02:53 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Thu Feb 2 12:02:53 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:53 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 12:02:53 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 12:02:53 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Feb 2 12:02:53 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 12:02:53 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Feb 2 12:02:53 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 12:02:53 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Feb 2 12:02:53 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 12:02:53 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 12:02:53 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 12:02:53 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Feb 2 16:01:15 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 16:01:15 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 16:01:15 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Feb 2 16:01:15 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Thu Feb 2 16:01:15 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 16:01:15 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 16:01:15 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 16:01:15 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Feb 2 16:01:15 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 16:01:15 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Feb 2 16:01:16 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 16:01:16 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Feb 2 16:01:16 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 16:01:16 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 16:01:16 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 16:01:16 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Feb 2 20:01:05 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 20:01:05 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 20:01:05 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Feb 2 20:01:05 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Thu Feb 2 20:01:05 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 20:01:05 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 20:01:05 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 20:01:05 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Feb 2 20:01:05 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 20:01:05 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Feb 2 20:01:05 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 20:01:05 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Feb 2 20:01:06 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 20:01:06 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 20:01:06 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 20:01:06 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Feb 3 08:12:25 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 08:12:27 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 08:12:27 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Feb 3 08:12:27 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Fri Feb 3 08:12:27 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 08:12:27 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 08:12:27 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 08:12:27 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Feb 3 08:12:27 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 08:12:27 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Feb 3 08:12:27 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 08:12:27 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Feb 3 08:12:27 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 08:12:28 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 08:12:28 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 08:12:28 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Feb 3 12:02:43 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:44 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:44 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Feb 3 12:02:44 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Fri Feb 3 12:02:44 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:44 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 12:02:44 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 12:02:44 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Feb 3 12:02:44 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 12:02:44 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Feb 3 12:02:44 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 12:02:44 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Feb 3 12:02:44 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 12:02:44 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 12:02:44 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 12:02:44 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Feb 3 16:01:06 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 16:01:06 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 16:01:06 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Feb 3 16:01:06 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Fri Feb 3 16:01:06 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 16:01:06 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 16:01:06 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 16:01:06 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Feb 3 16:01:06 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 16:01:06 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Feb 3 16:01:06 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 16:01:06 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Feb 3 16:01:06 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 16:01:06 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 16:01:06 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 16:01:06 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Feb 3 20:01:11 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 20:01:11 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 20:01:11 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Feb 3 20:01:11 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Fri Feb 3 20:01:11 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 20:01:11 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 20:01:11 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 20:01:11 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Feb 3 20:01:11 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 20:01:11 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Feb 3 20:01:11 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 20:01:11 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Feb 3 20:01:11 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 20:01:11 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 20:01:11 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 20:01:11 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Feb 4 08:08:11 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 08:08:12 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 08:08:12 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Feb 4 08:08:12 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sat Feb 4 08:08:12 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 08:08:12 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 08:08:12 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 08:08:12 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Feb 4 08:08:12 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 08:08:12 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Feb 4 08:08:12 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 08:08:12 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Feb 4 08:08:12 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 08:08:12 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 08:08:12 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 08:08:13 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Feb 4 12:02:47 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:47 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:47 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Feb 4 12:02:47 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sat Feb 4 12:02:47 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:47 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 12:02:47 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 12:02:47 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Feb 4 12:02:47 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 12:02:47 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Feb 4 12:02:47 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 12:02:47 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Feb 4 12:02:47 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 12:02:47 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 12:02:47 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 12:02:47 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Feb 4 16:01:15 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:15 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:15 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Feb 4 16:01:15 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sat Feb 4 16:01:15 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:15 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 16:01:15 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 16:01:15 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Feb 4 16:01:15 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 16:01:15 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Feb 4 16:01:15 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 16:01:15 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Feb 4 16:01:15 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 16:01:15 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 16:01:15 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 16:01:15 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Feb 4 20:01:08 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 20:01:08 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 20:01:08 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Feb 4 20:01:08 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sat Feb 4 20:01:08 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 20:01:08 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 20:01:08 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 20:01:08 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Feb 4 20:01:08 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 20:01:08 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Feb 4 20:01:08 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 20:01:08 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Feb 4 20:01:08 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 20:01:08 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 20:01:08 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 20:01:08 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Feb 5 08:08:00 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 08:08:00 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 08:08:00 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Feb 5 08:08:00 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sun Feb 5 08:08:00 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 08:08:00 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 08:08:00 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 08:08:00 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Feb 5 08:08:00 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 08:08:00 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Feb 5 08:08:00 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 08:08:00 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Feb 5 08:08:00 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 08:08:00 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 08:08:00 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 08:08:00 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Feb 5 12:02:47 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:47 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:47 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Feb 5 12:02:47 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sun Feb 5 12:02:47 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:47 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 12:02:47 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 12:02:47 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Feb 5 12:02:47 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 12:02:47 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Feb 5 12:02:47 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 12:02:47 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Feb 5 12:02:47 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 12:02:47 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 12:02:47 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 12:02:47 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Feb 5 16:01:13 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 16:01:13 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 16:01:13 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Feb 5 16:01:13 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sun Feb 5 16:01:13 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 16:01:13 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 16:01:13 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 16:01:13 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Feb 5 16:01:13 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 16:01:13 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Feb 5 16:01:13 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 16:01:13 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Feb 5 16:01:13 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 16:01:13 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 16:01:13 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 16:01:13 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Feb 5 20:01:03 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 20:01:03 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Feb 5 20:01:03 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 20:01:03 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 20:01:03 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 20:01:03 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Feb 6 08:15:38 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 08:15:40 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 08:15:40 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Feb 6 08:15:40 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Mon Feb 6 08:15:40 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 08:15:40 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 08:15:40 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 08:15:40 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Feb 6 08:15:40 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 08:15:40 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Feb 6 08:15:40 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 08:15:40 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Feb 6 08:15:41 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 08:15:41 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 08:15:41 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 08:15:41 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Feb 6 12:02:46 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:47 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:47 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Feb 6 12:02:47 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Mon Feb 6 12:02:47 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:47 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 12:02:47 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 12:02:47 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Feb 6 12:02:47 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 12:02:47 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Feb 6 12:02:47 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 12:02:47 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Feb 6 12:02:47 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 12:02:47 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 12:02:47 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 12:02:47 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 16:01:10 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Feb 6 16:01:10 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 16:01:10 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 16:01:10 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 16:01:10 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Feb 7 08:24:02 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 08:24:06 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 08:24:06 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Feb 7 08:24:06 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Tue Feb 7 08:24:06 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 08:24:07 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 08:24:07 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 08:24:07 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Feb 7 08:24:07 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 08:24:08 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Feb 7 08:24:08 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 08:24:08 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Feb 7 08:24:08 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 08:24:08 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 08:24:10 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 08:24:10 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Feb 7 12:03:22 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 12:03:23 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 12:03:23 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Feb 7 12:03:23 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Tue Feb 7 12:03:23 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 12:03:23 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 12:03:23 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 12:03:23 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Feb 7 12:03:23 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 12:03:23 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Feb 7 12:03:23 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 12:03:23 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Feb 7 12:03:23 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 12:03:23 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 12:03:23 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 12:03:23 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Feb 7 16:01:13 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 16:01:13 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 16:01:13 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Feb 7 16:01:13 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Tue Feb 7 16:01:13 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 16:01:13 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 16:01:13 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 16:01:13 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Feb 7 16:01:13 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 16:01:13 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Feb 7 16:01:13 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 16:01:13 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Feb 7 16:01:13 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 16:01:13 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 16:01:13 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 16:01:13 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Feb 7 20:01:08 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 20:01:08 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 20:01:09 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Feb 7 20:01:09 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Tue Feb 7 20:01:09 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 20:01:09 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 20:01:09 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 20:01:09 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Feb 7 20:01:09 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 20:01:09 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Feb 7 20:01:09 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 20:01:09 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Feb 7 20:01:09 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 20:01:09 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 20:01:09 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 20:01:09 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Feb 8 08:22:53 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 08:23:01 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 08:23:01 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Feb 8 08:23:01 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Wed Feb 8 08:23:01 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 08:23:01 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 08:23:01 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 08:23:01 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 8 08:23:01 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 08:23:03 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 8 08:23:03 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 08:23:03 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 8 08:23:03 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 08:23:03 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 08:23:03 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 08:23:03 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Feb 8 12:03:25 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 12:03:25 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 12:03:25 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Feb 8 12:03:25 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Wed Feb 8 12:03:25 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 12:03:25 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 12:03:26 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 12:03:26 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 8 12:03:26 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 12:03:26 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 8 12:03:26 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 12:03:26 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 8 12:03:26 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 12:03:26 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 12:03:26 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 12:03:26 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Feb 8 16:01:17 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:17 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:17 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Feb 8 16:01:17 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Wed Feb 8 16:01:17 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:17 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 16:01:17 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 16:01:17 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 8 16:01:17 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 16:01:19 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 8 16:01:19 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 16:01:19 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 8 16:01:19 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 16:01:19 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 16:01:19 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 16:01:19 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Feb 9 08:09:29 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 08:09:30 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 08:09:30 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Feb 9 08:09:30 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Thu Feb 9 08:09:30 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 08:09:32 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 08:09:32 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 08:09:32 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Feb 9 08:09:32 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 08:09:32 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Feb 9 08:09:32 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 08:09:32 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Feb 9 08:09:32 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 08:09:32 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 08:09:32 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 08:09:33 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Feb 9 12:03:18 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 12:03:19 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 12:03:19 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Feb 9 12:03:19 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Thu Feb 9 12:03:19 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 12:03:19 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 12:03:19 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 12:03:19 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Feb 9 12:03:19 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 12:03:19 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Feb 9 12:03:19 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 12:03:19 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Feb 9 12:03:19 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 12:03:19 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 12:03:20 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 12:03:20 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Feb 9 16:01:18 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:18 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:18 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Feb 9 16:01:18 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Thu Feb 9 16:01:18 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:18 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 16:01:18 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 16:01:18 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Feb 9 16:01:18 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 16:01:18 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Feb 9 16:01:18 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 16:01:18 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Feb 9 16:01:18 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 16:01:18 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 16:01:18 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 16:01:18 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Feb 9 20:01:13 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 20:01:13 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 20:01:13 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Feb 9 20:01:13 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Thu Feb 9 20:01:14 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 20:01:14 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 20:01:14 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 20:01:14 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Feb 9 20:01:14 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 20:01:16 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Feb 9 20:01:16 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 20:01:16 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Feb 9 20:01:16 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 20:01:16 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 20:01:16 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 20:01:16 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Feb 10 08:20:31 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 08:20:33 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 08:20:33 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Feb 10 08:20:33 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Fri Feb 10 08:20:33 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 08:20:34 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 08:20:34 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 08:20:34 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Feb 10 08:20:34 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 08:20:34 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Feb 10 08:20:34 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 08:20:34 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Feb 10 08:20:34 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 08:20:34 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 08:20:34 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 08:20:34 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Feb 10 12:03:42 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:42 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:42 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Feb 10 12:03:42 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Fri Feb 10 12:03:42 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:42 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 12:03:42 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 12:03:42 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Feb 10 12:03:42 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 12:03:42 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Feb 10 12:03:43 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 12:03:43 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Feb 10 12:03:43 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 12:03:43 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 12:03:43 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 12:03:43 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Feb 10 20:01:16 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:16 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:16 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Feb 10 20:01:16 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Fri Feb 10 20:01:16 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:16 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 20:01:17 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 20:01:17 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Feb 10 20:01:17 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 20:01:17 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Feb 10 20:01:17 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 20:01:17 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Feb 10 20:01:17 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 20:01:17 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 20:01:17 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 20:01:17 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Feb 11 08:13:01 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 08:13:02 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 08:13:02 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Feb 11 08:13:02 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sat Feb 11 08:13:03 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 08:13:03 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 08:13:03 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 08:13:03 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Feb 11 08:13:03 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 08:13:03 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Feb 11 08:13:03 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 08:13:03 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Feb 11 08:13:03 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 08:13:03 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 08:13:03 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 08:13:03 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Feb 11 12:02:42 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:42 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:42 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Feb 11 12:02:42 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sat Feb 11 12:02:42 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:42 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 12:02:42 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 12:02:42 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Feb 11 12:02:42 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 12:02:42 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Feb 11 12:02:42 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 12:02:42 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Feb 11 12:02:42 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 12:02:42 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 12:02:42 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 12:02:42 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Feb 11 16:01:10 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 16:01:10 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 16:01:10 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Feb 11 16:01:10 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sat Feb 11 16:01:10 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 16:01:10 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 16:01:10 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 16:01:10 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Feb 11 16:01:10 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 16:01:10 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Feb 11 16:01:10 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 16:01:10 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Feb 11 16:01:10 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 16:01:10 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 16:01:10 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 16:01:10 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Feb 11 20:01:01 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 20:01:01 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 20:01:01 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sat Feb 11 20:01:01 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sat Feb 11 20:01:01 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 20:01:01 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 20:01:01 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 20:01:01 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Feb 11 20:01:01 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 20:01:01 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Feb 11 20:01:01 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 20:01:01 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sat Feb 11 20:01:01 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 20:01:01 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 20:01:01 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 20:01:01 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Feb 12 08:09:30 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 08:09:31 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 08:09:31 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Feb 12 08:09:31 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sun Feb 12 08:09:31 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 08:09:32 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 08:09:32 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 08:09:32 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Feb 12 08:09:32 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 08:09:33 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Feb 12 08:09:33 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 08:09:33 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Feb 12 08:09:33 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 08:09:33 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 08:09:33 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 08:09:33 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Feb 12 12:02:51 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:51 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:52 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Feb 12 12:02:52 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sun Feb 12 12:02:52 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:52 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 12:02:52 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 12:02:52 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Feb 12 12:02:52 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 12:02:53 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Feb 12 12:02:53 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 12:02:53 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Feb 12 12:02:53 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 12:02:53 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 12:02:53 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 12:02:53 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Feb 12 16:01:14 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 16:01:14 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 16:01:14 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Feb 12 16:01:14 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sun Feb 12 16:01:14 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 16:01:14 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 16:01:14 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 16:01:14 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Feb 12 16:01:14 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 16:01:14 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Feb 12 16:01:14 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 16:01:14 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Feb 12 16:01:14 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 16:01:14 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 16:01:14 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 16:01:14 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Feb 12 20:01:07 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 20:01:07 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 20:01:07 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Sun Feb 12 20:01:07 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Sun Feb 12 20:01:07 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 20:01:07 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 20:01:07 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 20:01:07 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Feb 12 20:01:07 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 20:01:07 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Feb 12 20:01:07 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 20:01:07 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Sun Feb 12 20:01:07 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 20:01:07 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 20:01:07 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 20:01:07 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Feb 13 08:17:17 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 08:17:17 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 08:17:17 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Feb 13 08:17:17 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Mon Feb 13 08:17:18 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 08:17:18 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 08:17:18 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 08:17:18 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Feb 13 08:17:18 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 08:17:18 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Feb 13 08:17:18 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 08:17:18 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Feb 13 08:17:18 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 08:17:18 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 08:17:18 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 08:17:18 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Feb 13 16:01:30 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:30 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:30 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Feb 13 16:01:30 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Mon Feb 13 16:01:30 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:30 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 16:01:30 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 16:01:30 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Feb 13 16:01:30 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 16:01:30 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Feb 13 16:01:30 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 16:01:30 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Feb 13 16:01:30 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 16:01:30 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 16:01:30 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 16:01:30 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Feb 13 20:01:12 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 20:01:12 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 20:01:12 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Mon Feb 13 20:01:12 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Mon Feb 13 20:01:12 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 20:01:12 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 20:01:13 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 20:01:13 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Feb 13 20:01:13 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 20:01:13 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Feb 13 20:01:13 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 20:01:13 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Mon Feb 13 20:01:13 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 20:01:13 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 20:01:13 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 20:01:13 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Feb 14 08:19:34 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 08:19:35 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 08:19:35 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Feb 14 08:19:35 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Tue Feb 14 08:19:35 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 08:19:35 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 08:19:35 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 08:19:35 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Feb 14 08:19:35 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 08:19:35 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Feb 14 08:19:35 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 08:19:35 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Feb 14 08:19:35 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 08:19:35 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 08:19:35 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 08:19:36 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Feb 14 12:03:26 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 12:03:26 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 12:03:26 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Feb 14 12:03:26 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Tue Feb 14 12:03:26 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 12:03:27 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 12:03:27 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 12:03:27 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Feb 14 12:03:27 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 12:03:27 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Feb 14 12:03:27 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 12:03:27 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Feb 14 12:03:27 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 12:03:27 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 12:03:27 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 12:03:27 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Feb 14 16:01:36 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:40 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:40 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Feb 14 16:01:40 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Tue Feb 14 16:01:40 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:40 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 16:01:40 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 16:01:40 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Feb 14 16:01:40 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 16:01:40 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Feb 14 16:01:40 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 16:01:41 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Feb 14 16:01:41 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 16:01:41 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 16:01:41 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 16:01:41 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Feb 14 20:01:15 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:15 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:15 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Tue Feb 14 20:01:15 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Tue Feb 14 20:01:15 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:15 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 20:01:15 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 20:01:15 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Feb 14 20:01:15 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 20:01:15 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Feb 14 20:01:15 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 20:01:15 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Tue Feb 14 20:01:15 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 20:01:15 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 20:01:15 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 20:01:15 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Feb 15 08:28:16 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 08:28:19 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 08:28:19 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Feb 15 08:28:19 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Wed Feb 15 08:28:19 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 08:28:19 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 08:28:19 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 08:28:19 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 15 08:28:19 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 08:28:20 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 15 08:28:20 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 08:28:20 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 15 08:28:20 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 08:28:20 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 08:28:21 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 08:28:21 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Feb 15 12:05:32 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 12:05:33 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 12:05:33 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Feb 15 12:05:33 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Wed Feb 15 12:05:33 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 12:05:33 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 12:05:33 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 12:05:33 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 15 12:05:33 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 12:05:33 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 15 12:05:33 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 12:05:33 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 15 12:05:33 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 12:05:33 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 12:05:34 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 12:05:34 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Feb 15 16:01:37 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:37 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:37 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Feb 15 16:01:37 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Wed Feb 15 16:01:37 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:37 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 16:01:37 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 16:01:37 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 15 16:01:37 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 16:01:37 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 15 16:01:37 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 16:01:37 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 15 16:01:37 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 16:01:37 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 16:01:37 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 16:01:37 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Feb 15 19:28:11 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 19:28:12 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 19:28:12 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Feb 15 19:28:12 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Wed Feb 15 19:28:12 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 19:28:12 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 19:28:12 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 19:28:12 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 15 19:28:12 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 19:28:12 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 15 19:28:12 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 19:28:12 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 15 19:28:12 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 19:28:12 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 19:28:12 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 19:28:12 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Feb 15 20:13:48 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 20:13:49 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 20:13:49 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Wed Feb 15 20:13:49 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Wed Feb 15 20:13:49 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 20:13:49 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 20:13:49 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 20:13:50 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 15 20:13:50 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 20:13:50 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 15 20:13:51 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 20:13:51 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Wed Feb 15 20:13:51 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 20:13:51 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 20:13:51 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 20:13:51 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Feb 16 08:46:40 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 16 08:46:40 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 16 08:46:40 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Thu Feb 16 08:46:41 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Thu Feb 16 08:46:41 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 16 08:46:41 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 16 08:46:41 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 16 08:46:41 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Feb 16 08:46:41 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 16 08:46:41 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Feb 16 08:46:41 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 16 08:46:41 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Thu Feb 16 08:46:41 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 16 08:46:41 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 16 08:46:41 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 16 08:46:41 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie From jerry at Westrick.com Tue May 18 03:11:11 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 Message-ID: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Hello there... I have the follwoing problem: When mxODBC tries to access a postgresql database Zope hangs. In order to get into the "manage" page I need to start Zope while postgress is down. Then start postgress, then open connection, then use test to execute simple select. The select works with isql, and in Datamanager (unixODBC). An error is shown in the postgress log: ERROR: 'ksqo' is not a valid option name Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc loaded, so I had to select unixODBC driver from the corresponding Properties dropdown box. Any Ideas on how to proceed with this problem? Jerry From mal at egenix.com Tue May 18 10:43:44 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084839071.19898.7.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> Message-ID: <40A9BEB0.8030105@egenix.com> Jerome R. Westrick wrote: > Hello there... > > I have the follwoing problem: > > When mxODBC tries to access a postgresql database > Zope hangs. Are you referring to the mxODBC Zope DA or the mxODBC Python Extension product ? > In order to get into the "manage" page > I need to start Zope while postgress is down. > Then start postgress, then open connection, then > use test to execute simple select. > > The select works with isql, and in Datamanager (unixODBC). > > An error is shown in the postgress log: > > ERROR: 'ksqo' is not a valid option name > > Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > loaded, so I had to select unixODBC driver from the corresponding > Properties dropdown box. > > Any Ideas on how to proceed with this problem? Sounds like a problem with the postgresql ODBC driver to me... mxODBC doesn't use any option "ksqo". -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue May 18 12:47:36 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <1084867997.23832.20.camel@jerry.jerry.westrick.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> Message-ID: <40A9DBB8.3030705@egenix.com> [adding egenix-users again, since this information may be useful for others as well] Jerome R. Westrick wrote: > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > >>Jerome R. Westrick wrote: >> >>>Hello there... >>> >>>I have the follwoing problem: >>> >>>When mxODBC tries to access a postgresql database >>>Zope hangs. >> >>Are you referring to the mxODBC Zope DA or the mxODBC >>Python Extension product ? > > > The mxODBC Zope DA product > > >>>In order to get into the "manage" page >>>I need to start Zope while postgress is down. >>>Then start postgress, then open connection, then >>>use test to execute simple select. >>> >>>The select works with isql, and in Datamanager (unixODBC). >>> >>>An error is shown in the postgress log: >>> >>>ERROR: 'ksqo' is not a valid option name >>> >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc >>>loaded, so I had to select unixODBC driver from the corresponding >>>Properties dropdown box. >>> >>>Any Ideas on how to proceed with this problem? >> >>Sounds like a problem with the postgresql ODBC driver to >>me... mxODBC doesn't use any option "ksqo". > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > product. And it don't happen when I issue the same select from > Datmanager (the UnixODBC test program)... > > Any Idea where to look? > Any confirmed usages on SuSE 9.0? Not from eGenix. We have to stick to older versions in order to avoid library dependency issues, e.g. the Zope DA is built on SuSE 8.0. > I'd hate to have to fall back to SuSE 8.2, > just for of the mxODBC! I don't think that's necessary. Your problem sounds unrelated to the mxODBC or the ODBC manager you are using. Instead you should look at the ODBC driver that comes with SuSE 9.0. Google'ing on the error message brings up a few messages suggesting that an old ODBC driver or ODBC DSN is being used. The KSQO option was removed from the PostgreSQL which is causing the error message. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 18 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 19 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jerry at Westrick.com Tue May 18 12:51:33 2004 From: jerry at Westrick.com (Jerome R. Westrick) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] Problems with mxODBC on SuSE 9.0 In-Reply-To: <40A9DBB8.3030705@egenix.com> References: <1084839071.19898.7.camel@jerry.jerry.westrick.com> <40A9BEB0.8030105@egenix.com> <1084867997.23832.20.camel@jerry.jerry.westrick.com> <40A9DBB8.3030705@egenix.com> Message-ID: <1084873893.23832.25.camel@jerry.jerry.westrick.com> On Tue, 2004-05-18 at 11:47, M.-A. Lemburg wrote: > [adding egenix-users again, since this information may be useful > for others as well] > > Jerome R. Westrick wrote: > > On Tue, 2004-05-18 at 09:43, M.-A. Lemburg wrote: > > > >>Jerome R. Westrick wrote: > >> > >>>Hello there... > >>> > >>>I have the follwoing problem: > >>> > >>>When mxODBC tries to access a postgresql database > >>>Zope hangs. > >> > >>Are you referring to the mxODBC Zope DA or the mxODBC > >>Python Extension product ? > > > > > > The mxODBC Zope DA product > > > > > >>>In order to get into the "manage" page > >>>I need to start Zope while postgress is down. > >>>Then start postgress, then open connection, then > >>>use test to execute simple select. > >>> > >>>The select works with isql, and in Datamanager (unixODBC). > >>> > >>>An error is shown in the postgress log: > >>> > >>>ERROR: 'ksqo' is not a valid option name > >>> > >>>Additionally, SuSE 9.0 forces me to have both iodbc and unix odbc > >>>loaded, so I had to select unixODBC driver from the corresponding > >>>Properties dropdown box. > >>> > >>>Any Ideas on how to proceed with this problem? > >> > >>Sounds like a problem with the postgresql ODBC driver to > >>me... mxODBC doesn't use any option "ksqo". > > > > > > Hmmm, It happens when I issue the test select from the mxODBC Zope Da > > product. And it don't happen when I issue the same select from > > Datmanager (the UnixODBC test program)... > > > > Any Idea where to look? > > Any confirmed usages on SuSE 9.0? > > Not from eGenix. We have to stick to older versions in order > to avoid library dependency issues, e.g. the Zope DA is > built on SuSE 8.0. > > > I'd hate to have to fall back to SuSE 8.2, > > just for of the mxODBC! > > I don't think that's necessary. Your problem sounds unrelated to > the mxODBC or the ODBC manager you are using. Instead you should > look at the ODBC driver that comes with SuSE 9.0. > > Google'ing on the error message brings up a few messages > suggesting that an old ODBC driver or ODBC DSN is being used. The > KSQO option was removed from the PostgreSQL which is causing > the error message. (G)OOgling... Will report my results (to the list 8-)... Jerry BTW... Thanks for your support From erik.myllymaki at aviawest.com Fri May 21 18:36:18 2004 From: erik.myllymaki at aviawest.com (Erik Myllymaki) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA Message-ID: <40AEA082.1030700@aviawest.com> I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. I am getting the following error from a query that worked well on the there machine: Error Type: ValueError Error Value: only the last statement in an SQL batch may generate a result set the query looks something like this(simplified): select * into #temp_table1 from some_table select * into #temp_table2 from some_other_table select * from #temp_table1 t1 join #temp_table2 t2 on t1.id = t2.id drop table #temp_table1 drop table #temp_table2 Thanks for any advice From mal at egenix.com Sat May 22 12:23:02 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] trouble with intermediary results sets and Zope DA In-Reply-To: <40AEA082.1030700@aviawest.com> References: <40AEA082.1030700@aviawest.com> Message-ID: <40AF1BF6.6070603@egenix.com> Erik Myllymaki wrote: > I am moving from Zope 2.3.2 on Windows NT 4.0, w ZODBCDA->MSSQL7.0 SP3 > to Zope 2.7 on Win2k w mxODBCDA->SQL Server 2000 SP3a. > > I am getting the following error from a query that worked well on the > there machine: > > Error Type: ValueError > Error Value: only the last statement in an SQL batch may generate a > result set I think the error message is clear: only the last statement may generate a result set. In your case the select is embedded into a series of statements (the drop being the last statement). > the query looks something like this(simplified): > > select * into #temp_table1 from some_table > > select * into #temp_table2 from some_other_table > > select * from > #temp_table1 t1 > join > #temp_table2 t2 > on > t1.id = t2.id > > drop table #temp_table1 > > drop table #temp_table2 Why don't you join the tables directly and let the database optimizer figure out which parts to copy and which not ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 22 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 15 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 15:27:07 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] RFC: mxODBCZopeDA & ZEO Message-ID: <20040524142707.1083.3@wonderland.1085398396.fake> Dear all, we have recently been testing the mxODBCZopeDA together with ZEO. While our tests indicate that there are no significant problems in this combination we think that there are possible issues to address and would like some feedback from those Zope users who use ZEO and an RDBMS-DA as we have so far no ZEO installations in production. ZEO essentially replicates the ZODB across various ZEO clients. While this is fine for applications which are heavily dependent upon content from the ZODB, it may not be the best solution for RDBMS driven data or indeed any Zoep product that is dependent on external libraries. ie. might it not make more sense to centralise the connection object to reduce configuration and maintenance overhead and security risks? Comments appreciated Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Mon May 24 20:48:48 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16562.10702.739175.686692@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> Message-ID: <20040524194848.462.1@wonderland.1085420448.fake> On 2004-05-24 at 18:58:54 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 14:27 +0200: > > ... > >ZEO essentially replicates the ZODB across various ZEO clients. While this > >is fine for applications which are heavily dependent upon content from the > >ZODB, it may not be the best solution for RDBMS driven data or indeed any > >Zoep product that is dependent on external libraries. ie. might it not make > >more sense to centralise the connection object to reduce configuration and > >maintenance overhead and security risks? > > Why do you think so? > > We are using ZEO together with PostgreSQL, MySQL and Oracle. > We did not yet observe any (ZEO related) problem. Well, the following struck while we were testing and installing: 1) each Zope Product has to be installed and possibly configured locally 2) each DB has to be configured to accept connections from the various clients 3) heterogeneous clients may in some circumstances confuse each other configuration In the case of a DB connection object it is arguable that a single connection object running a pool of connections probably to a DB cluster makes more sense. Clients could be added at will without reconfiguration of the server. Little configuration management of the clients needed with Zope or Product updates. This would, of course, largely depend upon the load placed the individual object. Charlie From tim at se.linux.org Tue May 25 12:01:43 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? Message-ID: I want to connect to remote servers running oracle and sybase. I downloaded mxODBC, but is this the right package for this task? First I tried several different connectionstrings with ODBC.Windows.DriverConnect(), but I suspect that's just for connecting to existing data sources on local computer? I'd like to connect to remote databases without having the data sources specified. According to DB-API there is a connect() method that takes host and database name as arguments, that's promising. But on what module can I use this method? I tried ODBC.Windows.connect(), but that doesn't work. I then thought I should get a sybase subpackage, but the website says it's only for unix and I use Windows. So how should I go about this? I thought python was easy... ;) Thanks, Tim From charlie at egenix.com Tue May 25 12:07:29 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525110729.2892.5@wonderland.1085466811.fake> Dear Mr. Terleg?rd, On 2004-05-25 at 11:01:43 [+0200], Tim Terleg?rd wrote: > I want to connect to remote servers running oracle and sybase. I > downloaded mxODBC, but is this the right package for this task? Maybe. > First I tried several different connectionstrings with > ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > to existing data sources on local computer? I'd like to connect to > remote databases without having the data sources specified. mxODBC talks to ODBC sources which are always local but the databases can be remote. You need to set them up in the "Administration" part of the Control Panel in Windows or using unixODBC or iODBC in Unix. > According to DB-API there is a connect() method that takes host and > database name as arguments, that's promising. But on what module can I > use this method? I tried ODBC.Windows.connect(), but that doesn't work. > I then thought I should get a sybase subpackage, but the website says > it's only for unix and I use Windows. This is correct but applies to "native" drivers such as DCOracle2 or a Python Sybase driver. > So how should I go about this? I thought python was easy... ;) It is! But that isn't the problem. Please provide more details about which DB is on which computer and which computer needs to connect. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 12:20:29 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <20040525110729.2892.5@wonderland.1085466811.fake> Message-ID: > > I then thought I should get a sybase subpackage, but the website says > > it's only for unix and I use Windows. > > This is correct but applies to "native" drivers such as DCOracle2 or a > Python Sybase driver. Uhm, what do you mean? Does eGenix have a sybase python module I can use on Windows? > Please provide more details about which DB is on which computer and which > computer needs to connect. There are several servers each running several databases, both Sybase and Oracle. I'd like to connect to them from my workstation and run SQL queries. It's an ordinary TCP/IP network. Tim From charlie at egenix.com Tue May 25 12:37:52 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: References: Message-ID: <20040525113752.3106.7@wonderland.1085466811.fake> On 2004-05-25 at 11:20:29 [+0200], Tim Terleg?rd wrote: > > > I then thought I should get a sybase subpackage, but the website says > > > it's only for unix and I use Windows. > > > > This is correct but applies to "native" drivers such as DCOracle2 or a > > Python Sybase driver. > > Uhm, what do you mean? Does eGenix have a sybase python module I can use > on Windows? No, but mxODBC can talk to pretty much any database which has an ODBC driver. Please read up on what ODBC is. > > Please provide more details about which DB is on which computer and which > > computer needs to connect. > > There are several servers each running several databases, both Sybase > and Oracle. I'd like to connect to them from my workstation and run > SQL queries. It's an ordinary TCP/IP network. What platforms? It's usually quite easy to use mxODBC from Windows. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From tim at se.linux.org Tue May 25 16:07:17 2004 From: tim at se.linux.org (=?iso-8859-1?Q?Tim_Terleg=E5rd?=) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] How to connect to a remote oracle/sybase? In-Reply-To: <40B33199.6090002@holdenweb.com> Message-ID: > >First I tried several different connectionstrings with > >ODBC.Windows.DriverConnect(), but I suspect that's just for connecting > >to existing data sources on local computer? I'd like to connect to > >remote databases without having the data sources specified. > I made the same mistake, but in fact DriverConnect is able to connect to > remote databases, given that they will accept remote connections and > that you've got the connection string correct. I got Sybase working now. Finally I got the connection string right. For sybase this did work: mx.ODBC.Windows.DriverConnect('DRIVER={Sybase SQL Anywhere 5.0};ENG=serverx;DBN=dbx;UID=kalle;PWD=kalle') I've tried many combinations for Oracle, but can't get it right. Oracle help file says it should be like this: mx.ODBC.Windows.DriverConnect('DRIVER={Oracle ODBC Driver};DBQ=tnsname; UID=kalle;PWD=kalle') This fails. Anyone have a connection string that works for Oracle? (not using installed data sources) Tim From charlie at egenix.com Tue May 25 17:34:41 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B356AF.6050309@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> Message-ID: <20040525163441.5740.29@wonderland.1085466811.fake> On 2004-05-25 at 16:22:39 [+0200], Chris Withers wrote: > Charlie Clark wrote: > > 1) each Zope Product has to be installed and possibly configured locally > > Deployment of clusters is always "fun" ;-) yes, maybe. Can it be improved? > > 2) each DB has to be configured to accept connections from the various > > clients > > See my previous comment ;-) > > > 3) heterogeneous clients may in some circumstances confuse each other > > configuration > > How? take the mxODBCZopeDA for example: if a connection is configured to talk to DSN=Chris or use a specific driver then this may not on all clients. > > In the case of a DB connection object it is arguable that a single > > connection > > object running a pool of connections probably to a DB cluster makes more > > sense. Clients could be added at will without reconfiguration of the > > server. > > Depends where the load in your syustem is. If it's rendering that's killing > the > speed, multiple Zope instances running as clients on seperate hardware makes > things much better... > > But then again, I think I'm failing to understand the point you're trying to > make :-S This is an RFC targetted at those with real-life ZEO installations with RDBMS. The example you cite is one where I think it might make more sense to have a single connection talking to several clients which do the rendering. But we don't really know how much ZEO is out there and how much of it uses Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could work better. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:29:55 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <16563.31693.881553.271687@gargle.gargle.HOWL> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <16563.31693.881553.271687@gargle.gargle.HOWL> Message-ID: <20040526192955.5436.29@wonderland.1085556738.fake> On 2004-05-25 at 19:01:01 [+0200], Dieter Maurer wrote: > Charlie Clark wrote at 2004-5-24 19:48 +0200: > > ... > >Well, the following struck while we were testing and installing: > >1) each Zope Product has to be installed and possibly configured locally > > We let all hosts be servered via NFS (from the same source). Yes, that makes sense. More difficult for products like mxODBCZopeDA to check licence use but heyho! > >2) each DB has to be configured to accept connections from the various > >clients > > We trust the remaining hosts at least as much as the Web gateway. > The complete subnet has the same database access. Yes, I imagine this would generally be the case. > >3) heterogeneous clients may in some circumstances confuse each other > >configuration > > ??? > Avoid heterogenous clients? In general, yes. In practice, in testing this wasn't possible and maybe not a bad thing to have done this: threw up a problem with possible iODBC and UnixODBC conflicts. We still think that in such an environment it might still make sense to have a single connection object communicate with the database and are open for discussion on this and a possible ZSQL replacement together with other issues at EuroPython in two weeks. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Wed May 26 20:39:57 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] Re: [Zope-DB] RFC: mxODBCZopeDA & ZEO In-Reply-To: <40B3767B.8010808@simplistix.co.uk> References: <20040524142707.1083.3@wonderland.1085398396.fake> <16562.10702.739175.686692@gargle.gargle.HOWL> <20040524194848.462.1@wonderland.1085420448.fake> <40B356AF.6050309@simplistix.co.uk> <20040525163441.5740.29@wonderland.1085466811.fake> <40B3767B.8010808@simplistix.co.uk> Message-ID: <20040526193957.5499.30@wonderland.1085556738.fake> On 2004-05-25 at 18:38:19 [+0200], Chris Withers wrote: > Network shares, Subversion, etc... > > Myself? I setup a whole instance in Subversion and check it out onto any > machien > I want a client one... Interesting. I assume this involves using some kind of file storage? > >>>3) heterogeneous clients may in some circumstances confuse each other > >>>configuration > >> > >>How? > > > > take the mxODBCZopeDA for example: if a connection is configured to talk > > to > > DSN=Chris or use a specific driver then this may not on all clients. > > Ooo... ouch, yeah. Sounds like a system architecture problem. This is part > of > cluster "being hard". Generally, having homogeneous nodes in a cluster is > the > way to go, in which case the situation you describe shouldn't apply... Yes, wasn't possible in the test configuration but maybe useful for support enquiries. Non-heterogeneous clients are likely to cause problems in load-balancing anyway. > > This is an RFC targetted at those with real-life ZEO installations with > > RDBMS. The example you cite is one where I think it might make more sense > > to > > have a single connection > > explain what you mean by connection. >From website to cluster. The current state sets up identical copies of the connection object in the various ZEO clients. They have to communicate through a local ODBC manager with the database. In a sense this goes against something like the mxODBCZopeDA which should be able to handle all necessary connections from all ZEO clients in a single object. This looks like it's going to remain a theoretical difference as there is unlikely to be any performance difference either way. We're essentially looking at the question: what does ZEO give you and how does it work? However, it looks like the common setup avoids the pitfalls of separate physical installations. > > talking to several clients which do the rendering. > > explain what you mean by client. ZEO-client > > But we don't really know how much ZEO is out there and how much of it uses > > Zope-DAs. We know that the mxODBCZopeDA works with ZEO but maybe it could > > work better. > > explain what you mean by "works with zeo" > > And there's PLENTY of ZEO out there ;-) That's good to hear. There doesn't seem to be much running with the mxODBCZopeDA which seems to suggest that such sites primarily use the ZODB for storage. Charlie