|
|
Sponsor |
Fwd: Re: Final Take: connecting SQL server on W and PHP/MYSQL on Unix: msg#00063db.mysql.odbc
Hi All again, Has any body seen the following? Any comments on this'll be highly appreciated. Thx. ==================================== have a look at http://odbtp.sourceforge.net/. it works very well, it's 10x better than the built in PHP ODBC, and the author is very helpful (the PHP extension is about to go into PECL). basically, you install it as a service on the Windows box, and connect to it over TCP/IP through PHP from the Unix client Daniel Kasak <dkasak@xxxxxxxxxxxxxxxxxxxx> wrote: Date: Thu, 11 Mar 2004 15:52:44 +1100 From: Daniel Kasak To: lalit jairath , myodbc@xxxxxxxxxxxxxxx CC: grant.reid@xxxxxxxxxxxxxx, MikeH@xxxxxxxxxxxxxx, pwr@xxxxxxxxxxxxx Subject: Re: Final Take: connecting SQL server on W and PHP/MYSQL on Unix lalit jairath wrote: >Hey Guys, > >I'd appreciate to have yours final take on this one. Here's my scenario: > >i've a LAM(PHP) architecture on tru64 unix machine that i'd like to connect to >SQL server. So, what I'm looking up here is a cross-platform cross DB >connection. From MySQL we'd primarily be interested in making simple queries >to SQL server. In addition as well we'd like to keep the two databases in sync. > > Keeping the databases in sync? It sounds nice, but the implementation is going to be tricky, especially since MySQL doesn't support triggers. You will just complicate things, with no benefit. Keep in mind that there are still posts in the MySQL lists about replication problems between 2 MySQL servers of the same version, and they are using binary logs, which is much easier to implement than intercepting changes to one DB server and re-writing it to work with the other. > >What I'm asking here are the following: > >1)what additional software (DB drivers?) do I need to install in addition to >php/mysql, sql server. > > FreeTDS is the only open source option I'm aware of. Easysoft make a bridging ODBC driver, which has parts which get installed on the SQL Server system and the client system. But FreeTDS works well for me. > >2)what configs. I'll have to have on both systems/db's. > > > You basically need FreeTDS on the client machine ( ie the one *requesting* stuff from SQL Server - in this case it will be your tru64 unix box with MySQL ). I don't know whether FreeTDS compiles on that system, but I would expect it to. There are instructions for installing / configuring it on the FreeTDS website. You'll have to recompile PHP after FreeTDS is installed ... use the --with-sybase=/path/to/freetds/install switch. >3)what're the different options, ways to achieve it, pros/cons etc.? Freetds >or dts or something else. > > > Don't know of any. DTS bites big time. It's slow and buggy and certainly not something you'd want to use as the basis of regular processing. See email below re: using SQL server to set up cross-db queries with linked servers. I haven't tried this, but it sounds good :) Dan >Please remember the architecture (Linux (tru64)PHP/MySQL)/SQL server while >answering your response. > >Thank you so much for your time and input. That's great! > >Lalit > >Mike Harknett wrote: >From: Mike Harknett >To: Daniel Kasak , lalit jairath >, myodbc@xxxxxxxxxxxxxxx >Subject: RE: connecting SQL server on W and PHP/MYSQL on Unix >Date: Thu, 11 Mar 2004 11:13:08 +1300 > >I found that if I set up views in SQL Server using My SQL as a linked server >(which is equivelant to link tables in Access) the I could create queries >that joined the data from both sources, this, for me, gave the advantage of >a single data source for Crystal. which is what the dbrief I had was, >performance seems ok and it gives me the advantage (such as it is) of being >able to use stored procs etc in SQL server > >cheers > >Mike >-----Original Message----- >From: Daniel Kasak [mailto:dkasak@xxxxxxxxxxxxxxxxxxxx] >Sent: Thursday, 11 March 2004 11:12 >To: lalit jairath; myodbc@xxxxxxxxxxxxxxx >Subject: Re: connecting SQL server on W and PHP/MYSQL on Unix > > >lalit jairath wrote: > >Hi Mike, > > > >So is it possible to communicate both ways- accessing MSSQL from MySQL (unix >machine) as well as MySQL from MSSQL. I'm more interested in accessing MSSQL >server from MySQL. > > > >Could you please point me to a detailed doc/code. I'm not very familiar >with MSSQL (un)fortunately. > > > >Thank you much. > > > >Lalit > > > >MySQL can't talk to MS SQL directly. >You have to do the communication via a language which has drivers for both. >I use the FreeTDS libraries to talk to SQL Server from both Perl and PHP. >It works in the limited cases I've had to do it in, but note that you can't >run cross-database queries ... MS Access is the only app I know of that lets >you do that. > >As for examples, if you can talk to MySQL in Perl, then it's exactly the >same deal with SQL Server. >Under PHP, it's a little different. There are separate, db-specific >functions, eg: > >MySQL: >mysql_connect, mysql_query, mysql_fetch_array > >SQL Server: >mssql_connect, mssql_query, mssql_fetch_array > >Pretty annoying if you want to move your data elsewhere. There are a couple >of wrappers around php's db functions that give you a db-neutral set of >tools. I think one of them is ADODB ( not to be confused with M$'s ADO / >ADODB stuff ). Have a look at it if you don't want pain when migrating your >data. > >For speed ( query speed and development speed ) I recommend having all your >data in one database, or at the least all of the data that is typically >queried together. Running queries against multiple DBs is a major pain, >inefficient, and yucky. > >Dan > > -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: dkasak@xxxxxxxxxxxxxxxxxxxx website: http://www.nusconsulting.com.au -- MySQL ODBC Mailing List For list archives: http://lists.mysql.com/myodbc To unsubscribe: http://lists.mysql.com/myodbc?unsub=lkjairath@xxxxxxxxx Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Fwd: Re: Final Take: connecting SQL server on W and PHP/MYSQL on Unix, lalit jairath |
|---|---|
| Next by Date: | My Forum for MySql, Mandar Oak |
| Previous by Thread: | Fwd: Re: Final Take: connecting SQL server on W and PHP/MYSQL on Unix, lalit jairath |
| Next by Thread: | MS Access / ODBC / MySQL, rn |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |
Home | sitemap
| advertise | OSDir is
an inevitable website.
|