From sales@lookelu.com Sat Jul 1 14:00:32 2000 From: sales@lookelu.com (The Western Web) Date: Sat, 1 Jul 2000 13:00:32 Subject: [DB-SIG] The Western Web has just finished our new classified ad section. Please check it out and make sure that your classified ad has been moved. We are in the process of moving ads at this time, but would appreciate your help to insure that if your ad has been moved. If it hasn't been moved or you would like to place a new ad feel free to do so. We have added new sections in the classifieds, hay/feed/shavings, livestock, camelids, cattle, deer and elk, poultry, rabbits, sheep, livestock equipment, swine, donkeys, dogs and mules. We are currently receiving 100 new ads a day, and over 20,000 unique hits a day. Message-ID: <20000701195939.567A21CD77@dinsdale.python.org> The Western Web has just finished our new classified ad section. Please check it out and make sure that your classified ad has been moved. We are in the process of moving ads at this time, but would appreciate your help to insure that if your ad has been moved. If it hasn't been moved or you would like to place a new ad feel free to do so. We have added new sections in the classifieds, hay/feed/shavings, livestock, camelids, cattle, deer and elk, poultry, rabbits, sheep, livestock equipment, swine, donkeys, dogs and mules. We are currently receiving 100 new ads a day, and over 20,000 unique hits a day. http://www.thewesternweb.com The new classified section is automated now and your ads will be posted immediatly. You can also add Multi-Media files (photos, sound and video) on line. This is a free service to you so use it at your will. http://www.westernwebclassified.com We have also finished the Western Web Search Engine, which is solely optimized for the western way of life. Please stop by the search engine add your site. http://www.lookelu.com Our message board is also now up and running so please use it . http://www.westernmessageboard.com/cgi-bin/Ultimate.cgi We are sorry for any inconvenience. Thank you, http://www.thewesternweb.com This ad is being sent in compliance with Senate bill 1618, Title 3, section 301. http://www.senate.gov/ ~murkowski/commercialemail/S771index.html Here is a more detailed version of the legal notice above: This message is sent in compliance of the new e-mail bill: SECTION 301. Per Section 301, Paragraph (a)(2)(C) of S. 1618, http://www.senate.gov/~murkowski/commercialemail/S771index.html Further transmissions to you by the sender of this email may be stopped at no cost to you by sending a reply to this email address with the word "remove" in the subject line. From wilson@visi.com Fri Jul 7 22:29:18 2000 From: wilson@visi.com (Timothy Wilson) Date: Fri, 7 Jul 2000 16:29:18 -0500 (CDT) Subject: [DB-SIG] Mirroring DBs with Python Message-ID: Hi everyone, I'm interested is putting Python to work at my school doing what would seem to be a relatively straight-forward task. I'd appreciate it if someone would comment on the feasiblity of this or the best general approach. Let's assume I've got Oracle running on Solaris at a remote site, accessible via the Internet. The database is made of many tables with data referring to many different schools. I'd like to do a query on that remote database, pulling out the data that refers to my school only, and mirror the results to a local DB running on Linux while maintaining the exact same table structure. The local DB would likely be PostgreSQL or MySQL. (The overall goal is to make that data accessible via Zope.) That local DB could be read-only. Does this sound reasonable? Would it make a difference if Oracle was on NT instead of Solaris? -Tim -- Tim Wilson | Visit Sibley online: | Check out: Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/ W. St. Paul, MN | | http://slashdot.org/ wilson@visi.com | | http://linux.com/ From tbryan@starship.beopen.com Sun Jul 9 18:46:16 2000 From: tbryan@starship.beopen.com (Tom Bryan) Date: Sun, 9 Jul 2000 10:46:16 -0700 (PDT) Subject: [DB-SIG] Mirroring DBs with Python In-Reply-To: Message-ID: On Fri, 7 Jul 2000, Timothy Wilson wrote: > I'm interested is putting Python to work at my school doing what would > seem to be a relatively straight-forward task. I'd appreciate it if > someone would comment on the feasiblity of this or the best general > approach. Very feasible, assuming that the speed of your link is fast enough to suck down the data you need. > Let's assume I've got Oracle running on Solaris at a remote site, > accessible via the Internet. Hmm...does that mean that you have a user account on the database? That is, can you login to the Oracle database yourself? Or is this some sort of Web database accessible via some CGI/HTML forms interface? It's still feasible, but it will greatly affect your approach. > The database is made of many tables with data referring to many > different schools. I'd like to do a query on that remote database, > pulling out the data that refers to my school only, and mirror the > results to a local DB running on Linux while maintaining the exact > same table structure. The local DB would likely be PostgreSQL or > MySQL. (The overall goal is to make that data accessible via Zope.) > That local DB could be read-only. There are multiple ways to accomplish this task, and the way you choose depends at least partially on the details of your situation. Here's one example: 1. You have Oracle for Linux installed on your machine. 2. You have Postgre/My-SQL for Linux installed on your machine. 3. You build DCOracle on your machine. 4. You bulid the Postgre/My-SQL Python extensions on your machine. 5. You write a Python program to a) log into the other database to extract the data b) log into your database to populate the data Other options might include using mxODBC to interface with both databases, or using Python to extract data to flat text files that will later be bulk loaded, or using Python to extract data and write an SQL file of insert statements. > Does this sound reasonable? Yes, depending upon which solution you choose. The reasonable choice will make sense given your resources (hardware and bandwidth), your experience with Python and with databases, and the amount of data that you're trying to mirror. > Would it make a difference if Oracle was on NT instead of Solaris? For most of the solutions proposed above...not much. You could also "push" the data from the machine where the Oracle database is installed. In that case, you may choose to use a different extension to interface with Oracle on Windows NT, and you could play with COM on Windows NT. For the most part, it should be mostly transparent to your code. ---Tom From wilson@visi.com Sun Jul 9 19:21:50 2000 From: wilson@visi.com (Timothy Wilson) Date: Sun, 9 Jul 2000 13:21:50 -0500 (CDT) Subject: [DB-SIG] Mirroring DBs with Python In-Reply-To: Message-ID: On Sun, 9 Jul 2000, Tom Bryan wrote: > Very feasible, assuming that the speed of your link is fast enough to suck > down the data you need. We've got a T1 between the machines. That shouldn't be a problem. > > Let's assume I've got Oracle running on Solaris at a remote site, > > accessible via the Internet. > > Hmm...does that mean that you have a user account on the database? That > is, can you login to the Oracle database yourself? Well, presumably we would set up a user account on the Oracle database for this purpose. I suspected that this would probably work, and since a couple people have given the same opinion I'll dig in and figure out the specifics with the folks who own the Oracle DB. > There are multiple ways to accomplish this task, and the way you choose > depends at least partially on the details of your situation. Here's one > example: > 1. You have Oracle for Linux installed on your machine. > 2. You have Postgre/My-SQL for Linux installed on your machine. > 3. You build DCOracle on your machine. > 4. You bulid the Postgre/My-SQL Python extensions on your machine. > 5. You write a Python program to > a) log into the other database to extract the data > b) log into your database to populate the data I don't really have enough details to figure out which is the best approach, but I suspect that it would be easiest to run the query on the remote machine and save the result to a flat text file that could be imported into our local DB. > > Does this sound reasonable? > > Yes, depending upon which solution you choose. The reasonable choice will > make sense given your resources (hardware and bandwidth), your experience > with Python and with databases, and the amount of data that you're trying > to mirror. Suffice it to say that this will be a good learning experience. :-) Thanks to you and others who provided helpful feeback. I'll let you all know how it works out. -Tim -- Tim Wilson | Visit Sibley online: | Check out: Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/ W. St. Paul, MN | | http://slashdot.org/ wilson@visi.com | | http://linux.com/ From bradh@mediaone.net Sun Jul 9 21:37:43 2000 From: bradh@mediaone.net (Brad Howes) Date: 09 Jul 2000 16:37:43 -0400 Subject: [DB-SIG] Mirroring DBs with Python In-Reply-To: Timothy Wilson's message of "Fri, 7 Jul 2000 16:29:18 -0500 (CDT)" References: Message-ID: Timothy Wilson writes: > Let's assume I've got Oracle running on Solaris at a remote site, accessible > via the Internet. The database is made of many tables with data referring to > many different schools. I'd like to do a query on that remote database, > pulling out the data that refers to my school only, and mirror the results > to a local DB running on Linux while maintaining the exact same table > structure. The local DB would likely be PostgreSQL or MySQL. (The overall > goal is to make that data accessible via Zope.) That local DB could be > read-only. Oracle now(?) sells a product called iCache, which does just this. My company is trying it out. The nice thing about it (apart from the performance boost) is that it is all managed thru their Java Enterprise Manager. As to your specific goal, it is doable -- just takes time and effort migrating the data from one DB to another. Brad -- "Were people this stupid before TV?" -- _White Noise_ by Don DeLillo From hernan@orgmf.com.ar Mon Jul 10 01:26:36 2000 From: hernan@orgmf.com.ar (Hernan Martinez Foffani) Date: Sun, 9 Jul 2000 21:26:36 -0300 Subject: [DB-SIG] Mirroring DBs with Python In-Reply-To: Message-ID: <000a01bfea05$8237e320$c101010a@pez-volador> From: Of Timothy Wilson >> On Sun, 9 Jul 2000, Tom Bryan wrote: > > We've got a T1 between the machines. That shouldn't be a problem. > > > There are multiple ways to accomplish this task, and the way you choose > > depends at least partially on the details of your situation. Here's one > > example: .... > > 3. You build DCOracle on your machine. .... > > I don't really have enough details to figure out which is the > best approach, .... I think the easiest way is access the remote Oracle Database from Zope directly. Note that Zope has a SQL cache specially designed for read (selects) access. If your tests then shows that the link between Zope and the Oracle backend needs a local database you can program it later. You might save yourself a lot of time. Regards, Hernan From tbryan@starship.beopen.com Mon Jul 10 02:29:02 2000 From: tbryan@starship.beopen.com (Tom Bryan) Date: Sun, 9 Jul 2000 18:29:02 -0700 (PDT) Subject: [DB-SIG] Mirroring DBs with Python In-Reply-To: Message-ID: On Sun, 9 Jul 2000, Timothy Wilson wrote: > On Sun, 9 Jul 2000, Tom Bryan wrote: [...snip...] > > Hmm...does that mean that you have a user account on the database? That > > is, can you login to the Oracle database yourself? > > Well, presumably we would set up a user account on the Oracle database > for this purpose. I suspected that this would probably work, and since > a couple people have given the same opinion I'll dig in and figure out > the specifics with the folks who own the Oracle DB. Good. I wasn't sure whether the people who owned the Oracle database were a involved with this effort, or whether you were mirroring their data without their cooperation. > > There are multiple ways to accomplish this task, and the way you choose > > depends at least partially on the details of your situation. Here's one > > example: > > 1. You have Oracle for Linux installed on your machine. > > 2. You have Postgre/My-SQL for Linux installed on your machine. > > 3. You build DCOracle on your machine. > > 4. You bulid the Postgre/My-SQL Python extensions on your machine. > > 5. You write a Python program to > > a) log into the other database to extract the data > > b) log into your database to populate the data > > I don't really have enough details to figure out which is the best > approach, but I suspect that it would be easiest to run the query on > the remote machine and save the result to a flat text file that could > be imported into our local DB. Maybe, but if you have an Oracle guru, then you should be able to install the client libraries for Oracle, build something like DCOracle or mxODBC, and connect across the network. I suppose that part of the question is whether your primary goal is "get it done" or "learn as much as possible." :) > Thanks to you and others who provided helpful feeback. I'll let you > all know how it works out. Thanks. I always like to hear new hack^H^H^H^Htricks to add to my bag. ;-) ---Tom From wilson@visi.com Mon Jul 10 04:58:54 2000 From: wilson@visi.com (Timothy Wilson) Date: Sun, 9 Jul 2000 22:58:54 -0500 (CDT) Subject: [DB-SIG] Mirroring DBs with Python In-Reply-To: <000a01bfea05$8237e320$c101010a@pez-volador> Message-ID: On Sun, 9 Jul 2000, Hernan Martinez Foffani wrote: > I think the easiest way is access the remote Oracle Database from Zope > directly. > Note that Zope has a SQL cache specially designed for read (selects) access. > If your tests then shows that the link between Zope and the Oracle backend > needs a local database you can program it later. You might save yourself a > lot of time. Yes, I considered that as my first option, but tentatively ruled it out given the general unreliability of the network between these machines. Zope will have to be getting data from this DB almost constantly. I'm not prepared to count on accessing Oracle directly to make everything fly. Note: It's not Oracle's problem, but it seems to be rather less than ideal system administration on the part of the folks with contract with. -tim -- Tim Wilson | Visit Sibley online: | Check out: Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/ W. St. Paul, MN | | http://slashdot.org/ wilson@visi.com | | http://linux.com/ From brunson@level3.net Fri Jul 14 18:05:17 2000 From: brunson@level3.net (Eric Brunson) Date: Fri, 14 Jul 2000 11:05:17 -0600 Subject: [DB-SIG] Whence oci? Message-ID: <20000714110517.A29973@level3.net> I just installed Oracle 8.1.5i on my Linux box and I was trying to compile DCOracle, but oci doesn't seem to be installed and I can't find it listed in the installer. Can anyone tell me if this should be part of the Oracle distro, and if so, what is it part of? Thanks, e. -- Eric Brunson - brunson@level3.net - page-eric@level3.net "When governments fear the people there is liberty. When the people fear the government there is tyranny." - Thomas Jefferson From brunson@level3.net Fri Jul 14 19:57:24 2000 From: brunson@level3.net (Eric Brunson) Date: Fri, 14 Jul 2000 12:57:24 -0600 Subject: [DB-SIG] DCOracle - prepare samples needed. In-Reply-To: <036401bfdb87$9a149010$1ce8f5c8@itanet.com.br>; from lhonda@zip.net on Wed, Jun 21, 2000 at 10:50:03AM -0300 References: <036401bfdb87$9a149010$1ce8f5c8@itanet.com.br> Message-ID: <20000714125724.A6997@level3.net> It's pretty simple with DCOracle. Assuming a valid connection object named 'dbc': h = dbc.prepare( sql ) # a handle always takes a tuple of positional parameters h.execute( ( 1, ) ) # Now it acts just like a cursor object for ( name, ) in h.fetchall(): print name e. * Luiz Tadao Honda (lhonda@zip.net) [000621 09:30]: > Hi, > > I trying to prepare a query with input parameters like: > > sql='select name from user where id=:p1' > > to let Oracle make the execution plan only once and then substitute the > variable p1 with the real values. > Does anyone have some samples to help me? > > Thanks. > > Regards > > Luiz Honda > > > > > _______________________________________________ > DB-SIG maillist - DB-SIG@python.org > http://www.python.org/mailman/listinfo/db-sig -- Eric Brunson - brunson@level3.net - page-eric@level3.net "When governments fear the people there is liberty. When the people fear the government there is tyranny." - Thomas Jefferson From tbryan@starship.beopen.com Sat Jul 15 13:56:56 2000 From: tbryan@starship.beopen.com (Tom Bryan) Date: Sat, 15 Jul 2000 05:56:56 -0700 (PDT) Subject: [DB-SIG] Whence oci? In-Reply-To: <20000714110517.A29973@level3.net> Message-ID: On Fri, 14 Jul 2000, Eric Brunson wrote: > I just installed Oracle 8.1.5i on my Linux box and I was trying to > compile DCOracle, but oci doesn't seem to be installed and I can't > find it listed in the installer. Can anyone tell me if this should be > part of the Oracle distro, and if so, what is it part of? When you're trying to build an extension, it's best to paste exactly what error you're getting during the build into your message. Then tell us what your configuration is and what you've already tried. It's possible that you have everything that you need but that the compiler can't find the libraries that it needs. For example, I think that the build assumes that your ORACLE_HOME environment variable has been set properly. Without more details, I can't really tell what you might be missing or what else could be wrong. ---Tom From j.andrusaitis@konts.lv Mon Jul 17 08:49:14 2000 From: j.andrusaitis@konts.lv (=?us-ascii?Q?Jckabs_Andru=3Faitis?=) Date: Mon, 17 Jul 2000 00:49:14 -0700 Subject: [DB-SIG] Something funny In-Reply-To: <21C329F5D668D211BFAF004033902B6309B745@NTBARONS> Message-ID: <21C329F5D668D211BFAF004033902B6309AD7B@NTBARONS> I am using OLD Oracle module (it header says Copyright 1996 by Digital Creations). I assume it might be outdated version of DCOracle or something :-) Well, it works for me right, and I have patched it to meet my needs (ability to create Python Oracle connection object from connection established by Embedded SQL in C file - I use Python as embedded scripting language and in order to speed things up I connect to Oracle only once - at program boot). Anyhow, all this was just some background information. My problem is following. In that Oracle module there is a method (for cursor object) - execute() - yeah, you guessed - it is function which parses and executes SQL statements ;). If statement is update/delete, it does return number of rows affected. It is done by: PyInt_FromLong(cur->cda[0].rpc); Where cur->cda[0].rpc is that needed number of rows (defined as 'unsigned int' in structure definition). From Python I am executing statement like: a= dbc.execute("update xxx set yyy='Mooo' where zzz=:1",('Meee',)) if a!=0: dbc.execute("insert into xxx values('Mooo',:1)",('Meee',)) The problem is that second statement NEVER executes in my example as dbc.execute() returns None, not the number! In addition must say, that in stand-alone Python interpreter (without embedding this code into my C application it seems to work all right). Also, I added some debug information to this Oracle module, and before 'return res;' statement in execute() method return value IS number (checked it by printing it out using Python functions)!!! I am a bit confused, as I cannot think of what could possibly be wrong. Mayhaps the problem is improperly linked binary file (I link Oracle module statically into python/libpython, and then link it statically to my executable). Anyhow - any ideas are welcome. Jekabs From j.andrusaitis@konts.lv Mon Jul 17 11:00:24 2000 From: j.andrusaitis@konts.lv (=?us-ascii?Q?Jckabs_Andru=3Faitis?=) Date: Mon, 17 Jul 2000 03:00:24 -0700 Subject: [DB-SIG] Something funny In-Reply-To: <21C329F5D668D211BFAF004033902B6309B746@NTBARONS> Message-ID: <21C329F5D668D211BFAF004033902B6309AD7C@NTBARONS> Forget about this mail - I found the problem. Some time ago I implemented a descendant class of cursor (in Python) to log SQL statements I was executing and their time consumption. This descendant class was the one, which lost the return values for execute() method. Jekabs From bzimmer@ziclix.com Tue Jul 25 13:54:55 2000 From: bzimmer@ziclix.com (brian zimmer) Date: Tue, 25 Jul 2000 07:54:55 -0500 Subject: [DB-SIG] additional database module Message-ID: This is a multi-part message in MIME format. ------=_NextPart_000_0000_01BFF60D.9F6EA6E0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit Hello, Sorry to post to the whole group, but since I am not sure who maintains the Python Database Modules listing I am posting my request here. I would like to have a link added to the list for zxJDBC, my JPython DB API 2.0 compliant database module. JDBC provides a bridge for ODBC, so you can use the module from JPython/Java and still have access to the same ODBC drivers currently being used as well as, of course, using native JDBC drivers. I have also added a number of extensions to come as close as possible to duplicating the additional functionality of mxODBC so as to allow seamless use of both Python platforms. It can be found at http://ziclix.com/zxjdbc. thanks, brian brian zimmer bzimmer@ziclix.com ------=_NextPart_000_0000_01BFF60D.9F6EA6E0 Content-Type: text/x-vcard; name="brian zimmer.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="brian zimmer.vcf" BEGIN:VCARD VERSION:2.1 N:zimmer;brian FN:brian zimmer EMAIL;PREF;INTERNET:bzimmer@ziclix.com REV:20000112T072755Z END:VCARD ------=_NextPart_000_0000_01BFF60D.9F6EA6E0-- From jsturman@cvtci.com.ar Wed Jul 26 19:59:49 2000 From: jsturman@cvtci.com.ar (Javier Sturman) Date: Wed, 26 Jul 2000 15:59:49 -0300 (ART) Subject: [DB-SIG] sql server module Message-ID: Hi, I'm new in python programming. Is there any module to access Ms SqlServer 7? is it better to use odbc? In that case where can I get the module? thanks. From tbryan@starship.beopen.com Thu Jul 27 01:27:20 2000 From: tbryan@starship.beopen.com (Tom Bryan) Date: Wed, 26 Jul 2000 17:27:20 -0700 (PDT) Subject: [DB-SIG] sql server module In-Reply-To: Message-ID: On Wed, 26 Jul 2000, Javier Sturman wrote: > Hi, I'm new in python programming. Welcome. :) > Is there any module to access Ms SqlServer 7? > is it better to use odbc? In that case where can I get the module? If you're programming on a Windows machine, there are two modules: odbc and dbi. They are included with the Windows win32 extensions. There's an old but useful example of how to use them at http://www.python.org/windows/win32/odbc.html ---Tom From webmaster@lookelu.com Sun Jul 30 03:07:44 2000 From: webmaster@lookelu.com (The Western Web) Date: Sun, 30 Jul 2000 02:07:44 Subject: [DB-SIG] The Western Web Newsletter Message-ID: <20000730090544.B8AE11CD17@dinsdale.python.org> THE WESTERN WEB WEEKLY NEWS LETTER Week of July 24, 2000 Serving Over 75000 Recipients With your assistance "The Western Web" continues to improve and your input is helpful.Our goal is to make "The Western Web" THE one place stop for all your Horse, Livestock and Western Life Style needs. If You have added your site to our search engine, please make sure everything is correct. If you haven't noticed we have upgraded the look and capabilities of The Western Web search engine. You can now type in your search word and find all related site links. Don't forget to add your Web Site to our search engine too. http://www.searchthewesternweb.com This week you might take a look at our "Events Calendar" in our Classified Ad section. You can post your upcoming events in subcategories such as: Events, Shows, Cuttings, Team Roping, Gymkhana, Clinics, Trail, Auctions, Rodeos, Reining, Barrel Racing, Team Penning and Performance & Halter. We also have a subcategory for "Other" to place any event not categorized. These ads are free and you can add pictures, video and audio. A note to our subscribers who have posted ads, with you User Name and Password you can update your events. http://www.westernwebclassified.com/cgi-bin/classifieds/classifieds.cgi At last, an online service available with the horse lover in mind, The Sale Barn.Com (www.thesalebarn.com). The Sale Barn offers an online auction specifically for horse-related items, whether you are buying or selling. The Sale Barn auctions off 100s of items daily with many items in the Hot Items Listing starting at $1.00! Usually there are from 150 to 200 items starting at only $1.00. From saddles, bridles, bits, spurs and unique gift items. Register now to qualify for our weekly drawing. The current prize is a 34 x 36 Wool Blend Show Blanket with wear leathers and silver conchos valued at $99.95! This item is featured on our Home Page at www.thesalebarn.com. Registration is free on our secure site with no credit card necessary. The Sale Barn is amongst the top 10 visited horse sites on the Internet with over 10,000 hits a day. A perfect opportunity to turn unneeded horse related items in to cash. The Sale Barn is the ebay of the horse world with categories directed to specific items such as saddles, headstalls, bits, spurs, ropes, gift items, horse trailers, etc. http://www.thesalebarn.com We appreciate you patronizing our sponsors. You to can have your web site on our front page along with Banks Power, Roo-hyde Saddlery, GMC, Bootbarn.com,Truckloads.net, Zig Zigler, Comforce, The Gaited Horse, Cowboy Tack, Painted Acres Ranch,The ShawnOshine,Tom Balding Bits & Spurs, Centenary of Federation and Stoxrus.com. You can find our reasonable rates at: http://www.thewesternweb.com/Advertising/Advertising.htm While at The Western Web site take a look at our message board: http://www.westernmessageboard.com/cgi-bin/Ultimate.cgi We can Design & Host your web site. Check out our low domain name registration prices at: http://www.thewesternweb.com/Web_Design/Domain_Name_Registration.htm For you convenience, there are links to these sites and more, from The Western Web Home Page. http://www.thewesternweb.com/ If you receive this message in error or want us to remove you from our newsletter e-mail list, please reply to this email address with the word "Remove" in the subject line. Thank You, http://www.thewesternweb.com