Re: Building DBD::Oracle with one version but deploying with another

2013-04-19 Thread Martin J. Evans

On 18/04/13 18:41, Jan Dubois wrote:

Sorry, I can't remember the details. I think you must use clients for
the same version of Oracle on the server, e.g. if you compiled
DBD::Oracle with an Oracle 10 instant client, then it doesn't seem to
work with an Oracle 11 client. But my memories of that are foggy; I
don't know if this is just a limitation on Windows, or if it applies
everywhere.

I also never tried to run DBD::Oracle compiled against the instant
client with a server that has the regular client installed. I kind of
expect it to work, if they are the same versions, but haven't verified
it.

Cheers,
-Jan


DBD::Oracle attempts to find the version of your client using sqlplus etc. Once 
it knows the version it sets macros which affect what support is built into 
DBD::Oracle.

e.g.,

Installing on a linux, Ver#2.6
Using Oracle in /home/martin/instantclient_11_2/
DEFINE _SQLPLUS_RELEASE = 1102000200 (CHAR)
Oracle version 11.2.0.2 (11.2)
Looks like an Instant Client installation, okay
Your LD_LIBRARY_PATH env var is set to '/home/martin/instantclient_11_2/'

DEFINE= -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\11.2.0.2\ 
-DORA_OCI_102 -DORA_OCI_112

Notice the ORA_OCI_102 and ORA_OCI_112 macros are defined in this case since 
this was Oracle 11.2. If you search the source for those macros you'll see 
loads of places where code is only included if they are defined and hence it 
affects what you can do with DBD::Oracle.

So if you built against a 10.2 client and then attempted to run against a 11.2 
client there are a) things you would not be able to do and b) possibly 
DBD::Oracle would make a different set of OCI calls (you'd need to read the 
code to see what).

If you did it the other way around it is quite likely some things won't work.

The instant client files required to run DBD::Oracle (as opposed to build it) 
are quite small. What cannot you distribute those with the DBD::Oracle you 
build.

Martin


On Thu, Apr 18, 2013 at 10:16 AM, John Wiersba jrw32...@yahoo.com wrote:

Yes, I'm doing that.  Each server can have a different environment than the
server the original DBD:Oracle was built on.  Or the question still applies
if I want to use a different version of Oracle installed on the original
build server, especially if I remove the version of Oracle that was used to
build the original DBD::Oracle.


From: Jan Dubois j...@activestate.com
To: John Wiersba jrw32...@yahoo.com
Cc: Lyle webmas...@cosmicperl.com; dbi-dev@perl.org dbi-dev@perl.org
Sent: Thursday, April 18, 2013 1:09 PM

Subject: Re: Building DBD::Oracle with one version but deploying with
another

I think you also need to add the ORACLE_HOME directory to
LD_LIBRARY_PATH (on the deployment machine) to make it work.

Cheers,
-Jan

On Thu, Apr 18, 2013 at 9:04 AM, John Wiersba jrw32...@yahoo.com wrote:

Thanks, Lyle.  I'm trying to build DBD::Oracle on Linux/AIX/Solaris for
distribution to another server (assume the OS and perl versions on both
servers) which will have a different ORACLE_HOME, possibly a different
version of the Oracle client and likely in a different location.  The target
server may not have a C compiler.

That's the same situation that ActiveState must have encountered, building
DBD::Oracle with whatever version of Oracle they had downloaded and
installed in some random location, but deploying it on the user's server
which likely has a different version of Oracle installed in a different
location.






From: Lyle webmas...@cosmicperl.com
To: dbi-dev@perl.org
Sent: Thursday, April 18, 2013 11:43 AM
Subject: Re: Building DBD::Oracle with one version but deploying with
another


On 18/04/2013 16:22, John Wiersba wrote:

[A previous version of this question was asked on dbi-users -- I haven't
gotten any response there.  Not sure which list to post to.]

Hi, I'd like to find out how to build/install DBD::Oracle with one
version of Oracle client but then deploy it with a potentially different
client version, say on a server without the original client version (or with
it installed in a different location).  It seems like the Oracle
client libraries can be loaded dynamically at runtime, based on
ORACLE_HOME, so there doesn't need to be a dependency on those exact
client libraries that were used at build/install time.

Another
way of asking:  How does ActiveState deploy DBD::Oracle without needing
to build it (maybe no C compiler is available), on servers with
different versions of the Oracle client libraries installed?


I built DBD::Oracle on windows recently. I did need the Oracle client
libraries for the tests to pass, and ActiveState would have too. Once built
they package up the binaries for distribution, and expect the target system
to have the appropriate libraries. If I remember correctly, I had to
download the appropriate libraries from Oracle. I spoke to the vanilla Perl
people about this, as they currently don't have a DBD::Oracle bundled in

Re: SQL-Statement

2013-04-19 Thread Jens Rehsack

On 18.04.13 17:17, H.Merijn Brand wrote:

On request from Jens:

$ git clone github.com:perl5-dbi/dbi.git SQL-Statement

is now a full copy of https://github.com/rehsack/SQL-Statement


$ pwd
/tmp/SQL-Statement
$ git push --tags
Everything up-to-date
$ git branch -a
* master
  remotes/origin/master
  remotes/tags/1.16_01
  remotes/tags/1.16_02
  remotes/tags/1.16_04
  remotes/tags/1.17
  remotes/tags/1.18_01
  remotes/tags/1.18_02
  remotes/tags/1.20
  remotes/tags/1.21
  remotes/tags/1.21_1
  remotes/tags/1.21_2
  remotes/tags/1.21_3
  remotes/tags/1.21_4
  remotes/tags/1.21_6
  remotes/tags/1.21_8
  remotes/tags/1.22
  remotes/tags/1.23
  remotes/tags/1.24
  remotes/tags/1.25
  remotes/tags/1.26
  remotes/tags/1.27
  remotes/tags/1.27_01
  remotes/tags/1.28
  remotes/tags/1.29
  remotes/tags/1.30
  remotes/tags/1.31
  remotes/tags/1.32
  remotes/tags/1.33
  remotes/tags/1.400_001
  remotes/tags/1.400_002
  remotes/tags/1.400_003
  remotes/tags/1.401
  remotes/tags/1.402
  remotes/trunk
$

$ cd -
/data/Projects/OSS/SQL-Statement
$ git branch -a
* master
  remotes/origin/HEAD - origin/master
  remotes/origin/master
$ git tag -l
$

Looks not so full as I would had expected :/

Well, even if the original svn clone marks some tags as
branches, thery're identified. Is it possible to move that
to the perl5-dbi clone?

 The new location does NOT know about the old, as it can now be
 used as the new decisive source: that is up to Jens.

 Enjoy!

Regarding the statement from Tim, that he'd prefer to gather the
dbi related stuff into that orga (perl5-dbi) and I prefer that,
too - I hereby declare that in not to distant future
github.com:perl5-dbi/SQL-Statement.git will be the decisive
source.

Cheers
--
Jens Rehsack


Re: DBD::mysql - bit worrying

2013-04-19 Thread Patrick Galbraith
Hi Paul!

Very good to hear from you! Wow, another book - that takes a LOT of one's life 
as I know. I look forward to reading another of your works.

Regards,

Patrick

On Apr 18, 2013, at 3:09 PM, Paul DuBois p...@snake.net wrote:

 
 On Apr 18, 2013, at 12:07 PM, Patrick Galbraith wrote:
 
 Lyle,
 
 To be certain, they don't wish to kill DBD::mysql. They are really trying 
 to define what Oracle supports and what they do not. The were very helpful 
 in painstakingly migrating the bugs from their system manually to RT. 
 Albeit, I have my work cut out for me now :)
 
 I'm not an official spokesman for Oracle, although I do work for them.
 
 I am unaware of any effort against DBD::mysql. Nor has Oracle made any effort 
 to dissuade me from writing about DBD::mysql, e.g., at 
 http://www.kitebird.com/mysql-book/. (You can view that URL as a shameless 
 plug or just evidence in support of the preceding claims, your choice. :-))
 
 
 Regards,
 
 Patrick
 
 On Apr 11, 2013, at 8:28 PM, Lyle webmas...@cosmicperl.com wrote:
 
 On 12/04/2013 00:58, Darren Duncan wrote:
 On 2013.04.11 4:37 PM, Lyle wrote:
 Hmm... Got a reply to my bug report and it's a bit worrying:
 http://bugs.mysql.com/bug.php?id=68266
 
 Seems like MySQL don't want to directly support DBD::mysql any more. 
 Whether you
 like mysql or not, that's a heavily used DBD.
 
 I'm not aware that DBD::mysql was ever supported through the general MySQL 
 bug reporter, and I understood it was a separate project.
 
 It most certainly was, for example:
 http://bugs.mysql.com/bug.php?id=20153
 
 The DBD::mysql docs still tell you to report bugs there. Even I was able to 
 submit a bug to their DBD::mysql category just last February, they've only 
 just removed it from the bug reporter.
 
 I think Patrick Galbraith is the person you should ask about this matter, 
 as Patrick has been the one releasing DBD::mysql on CPAN for many years, a 
 full decade at this point.
 
 I've just joined the p...@lists.mysql.com mailing list. It'll be 
 interesting to see if that list stays or gets removed as well.
 
 
 Lyle
 
 
 -- Darren Duncan
 
 
 
 
 



Re: Building DBD::Oracle with one version but deploying with another

2013-04-19 Thread Jan Dubois
On Fri, Apr 19, 2013 at 12:35 AM, Martin J. Evans boh...@ntlworld.com wrote:
 The instant client files required to run DBD::Oracle (as opposed to build
 it) are quite small. What cannot you distribute those with the DBD::Oracle
 you build.

It is my understanding that you have to present the OIC license to the
user before installation and have them *actively* accept it (click on
an I accept button, or answering yes to a prompt, with yes not
being the default etc). The last time I checked, you couldn't even
download the OIC without accepting the license first via JavaScript;
there were no direct download link. And somewhere in their
redistribution license was a clause that says they expect you to do
the same thing when you redistribute.

So it is possible, but requires non-trivial extra effort in your
installer to do this.

Cheers,
-Jan