Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

import DBD-Oracle 1.26 from CPAN

  • Loading branch information...
commit dceb34147f293594183305c1298caa482bd0d91d 2 parents d623e72 + ff54363
Yanick Champoux authored
Showing with 1,190 additions and 359 deletions.
  1. +33 −10 Changes
  2. 0  MANIFEST
  3. +2 −1  META.yml
  4. +28 −9 Makefile.PL
  5. 0  Oracle.ex/README
  6. 0  Oracle.ex/bind.pl
  7. 0  Oracle.ex/commit.pl
  8. 0  Oracle.ex/curref.pl
  9. 0  Oracle.ex/ex.pl
  10. 0  Oracle.ex/japh
  11. 0  Oracle.ex/mktable.pl
  12. 0  Oracle.ex/oradump.pl
  13. 0  Oracle.ex/proc.pl
  14. 0  Oracle.ex/sql
  15. 0  Oracle.ex/tabinfo.pl
  16. 0  Oracle.h
  17. +215 −72 Oracle.pm
  18. +25 −1 Oracle.xs
  19. 0  Oraperl.pm
  20. 0  README
  21. 0  README-files/hpux/Conf-Lincoln-1.06
  22. 0  README-files/hpux/Conf-Lincoln-1.07
  23. 0  README-files/hpux/Conf-Merijn-580-10.20-cc
  24. 0  README-files/hpux/Conf-Merijn-585-11.00-cc
  25. 0  README-files/hpux/Conf-Merijn-585-11.11-cc
  26. 0  README-files/hpux/Conf-Merijn-587-11.23-cc
  27. 0  README-files/hpux/Conf-Merijn-588-10.20-gcc
  28. 0  README-files/hpux/Conf-Merijn-588-11.00-gcc32
  29. 0  README-files/hpux/Conf-Merijn-588-11.00-gcc64
  30. 0  README-files/hpux/Conf-Merijn-588-11.11-gcc32
  31. 0  README-files/hpux/Conf-Merijn-588-11.11-gcc64
  32. 0  README-files/hpux/Conf-Merijn-588-11.23-gcc64
  33. 0  README-files/hpux/Conf-Mike
  34. 0  README-files/hpux/Conf-Roger
  35. 0  README-files/hpux/Makefile-Lincoln
  36. 0  README-files/hpux/libjava.eml
  37. 0  README.64bit.txt
  38. 0  README.aix.txt
  39. 0  README.clients.txt
  40. 0  README.explain.txt
  41. 0  README.help.txt
  42. 0  README.hpux.txt
  43. 0  README.java.txt
  44. +18 −0 README.linux.txt
  45. 0  README.login.txt
  46. 0  README.longs.txt
  47. 0  README.macosx.txt
  48. 0  README.sec.txt
  49. 0  README.sun.txt
  50. 0  README.vms.txt
  51. 0  README.win32.txt
  52. +112 −0 README.win64.txt
  53. 0  README.wingcc.txt
  54. +7 −3 Todo
  55. +282 −121 dbdimp.c
  56. +14 −3 dbdimp.h
  57. 0  dbivport.h
  58. 0  hints/dgux.pl
  59. 0  hints/macos_bundle.syms
  60. 0  hints/macos_lib.syms
  61. 0  hints/macos_syms.pl
  62. 0  hints/svr4.pl
  63. +291 −47 lib/DBD/Oracle/GetInfo.pm
  64. 0  lib/DBD/Oracle/Object.pm
  65. 0  mkta.pl
  66. 0  oci.def
  67. +83 −74 oci8.c
  68. +43 −11 ocitrace.h
  69. 0  ora_explain.PL
  70. 0  oraperl.ph
  71. 0  t/01base.t
  72. +1 −5 t/10general.t
  73. 0  t/12impdata.t
  74. 0  t/14threads.t
  75. 0  t/15nls.t
  76. 0  t/20select.t
  77. 0  t/21nchar.t
  78. 0  t/22nchar_al32utf8.t
  79. 0  t/22nchar_utf8.t
  80. 0  t/23wide_db.t
  81. 0  t/23wide_db_8bit.t
  82. 0  t/23wide_db_al32utf8.t
  83. 0  t/24implicit_utf8.t
  84. 0  t/25plsql.t
  85. 0  t/26exe_array.t
  86. 0  t/28array_bind.t
  87. 0  t/30long.t
  88. +4 −1 t/31lob.t
  89. 0  t/31lob_extended.t
  90. 0  t/32xmltype.t
  91. 0  t/34pres_lobs.t
  92. 0  t/40ph_type.t
  93. 0  t/50cursor.t
  94. 0  t/51scroll.t
  95. +29 −1 t/55nested.t
  96. 0  t/56embbeded.t
  97. 0  t/58object.t
  98. 0  t/60reauth.t
  99. 0  t/70meta.t
  100. 0  t/80ora_charset.t
  101. +3 −0  t/nchar_test_lib.pl
  102. 0  test.pl
  103. 0  typemap
43 Changes 100755 → 100644
View
@@ -1,21 +1,42 @@
+=head1 Changes in DBD-Oracle 1.26 (svn rev 14411)
+
+ Manual re-release of 1.25 with changes to file permissions.
+
+=head1 Changes in DBD-Oracle 1.25(svn rev 14411)
+
+ Added support for the OCIPing by John Scoles
+ Spell checked the pod (the first time in a while me thinks) updated the todo By John Scoles
+ Added support for DCRP (Database Resident Connection Pooling) by John Scoles with Luben Karavelov
+ Fix for odd error with Ping from Tom Payerle
+ Removed the NEW_OCI_INIT compile directive and the deprecated OCIInitialize calls
+ Fix for rt.cpan.org Ticket #=57256 : Double free problem in dbdimp.c by John Scoles
+ Fix for invalid format in trace of OCILobLocatorIsInit_log_stat reported by Martin Evans Fixed by John Scoles
+ Fix for very odd UNKNOWN OCI STATUS 1041 (OCILobFreeTemporary) on disconnect reported by John Parker and Bob Mcgowan fixed by John Scoles
+ Fix for rt.cpan.org Ticket #=55445: get_info(28) SQL_IDENTIFIER_CASE seems to return the wrong value from Martin J Evans and a bunch of re jigging from John Scoles
+ Patch for PL/SQL: numeric or value error: character string buffer too small from Scott T. Hildreth
+ Fix for rt.cpan.org Ticket #=51594 type_info and type_info_all miss vital information from John Scoles
+ Added ora_lob_is_init function by John Scoles
+ Fix for rt.cpan.org Ticket #=55031 Ubuntu Server Building with Oracle XE under 32-bit from Brian Candler
+ Fix for rt.cpan.org Ticket #=56810 bug with multiple nested cursor from John Scoles
+ Fix for bug found only on Big-Endian hardware reported by Timothy Everett and others from Charles Jardine
+ Fix for memory leak when using prepared_cached and lobs reported by Mark Bobak and Martin Evans found and fixed by John Scoles and a test from Martin Evans
+ Added more entries to the Readmes from John Scoles
+
=head1 Changes in DBD-Oracle 1.24_01(svn rev 14060)
This release has been prepared specifically for the 'Debian' http://www.debian.org project. It contains no changes
to functionality or usage. The following has been changed
Fixed some formatting and typos in Pod from Juli�n Pati�o
-
The Copyright terms for ora_explain have changed and now read as follows:
+ You may distribute under the terms of either the GNU General Public
+ License or the Artistic License, as specified in the Perl README file.
- You may distribute under the terms of either the GNU General Public
- License or the Artistic License, as specified in the Perl README file.
-
-
-=head1 Changes in DBD-Oracle 1.24(svn rev 13790)
+=head1 Changes in DBD-Oracle 1.24(svn rev 13793)
- Extened precision for OCIDateTimeToText to 6 instead of 0 for embedded types from John Scoles
- Extened support of Oracle Embedded objects from Charles Jardine
- Added support for RowsInCache as RO and RowCacheSize as a setable value on the Statement Handle. So it would comply with DBI spec By John Scoles with thanks to Martin J. Evans
+ Extended precision for OCIDateTimeToText to 6 instead of 0 for embedded types from John Scoles
+ Extended support of Oracle Embedded objects from Charles Jardine
+ Added support for RowsInCache as RO and RowCacheSize as a set-able value on the Statement Handle. So it would comply with DBI spec By John Scoles with thanks to Martin J. Evans
Added extended support for 64 bit clients in Makefile.PL from Ralph Doncaster
Added extended nvarchar support from Jan Mach
Added support for the TYPE attribute on bind_col and the new DBI bind_col attributes StrictlyTyped and DiscardString from Martin J. Evans
@@ -61,6 +82,7 @@
Fix for rt.cpan.org Ticket #=38749 Warning of a NULL column in an aggregate function also added ora_oci_success_warn to display silent OCI warnings from John Scoles
Patch for UTF8 check on execute_array from David Mansfield and a little by John Scoles
+
=head1 Changes in DBD-Oracle 1.22(svn rev 11618) 1st Aug 2008
Patch to remove compiler warnings from H.Merijn Brand
@@ -88,7 +110,8 @@
Fix for rt.cpan.org Ticket #=28811 ORA_CHAR(s) not returning correct length in functions and procedures from John Scoles
Makefile.PL now working without flags for Linux 11.1.0.6 instant client and regular client from John Scoles, Andy Sautins, H.Merijn Brand, Nathan Vonnahme and Karun Dutt
Fixed how persistent lob fetch works now uses callback correctly, from John Scoles & Darren Kipp
-
+
+
=head1 Changes in DBD-Oracle 1.21(svn rev 11067) 11th April 2008
Added Notes to README.win32.txt on installing Instant Client 11.1.0.6.0 from John Scoles
0  MANIFEST 100755 → 100644
View
File mode changed
3  META.yml 100755 → 100644
View
@@ -1,12 +1,13 @@
--- #YAML:1.0
name: DBD-Oracle
-version: 1.24
+version: 1.26
abstract: Oracle database driver for the DBI module
author:
- Tim Bunce (dbi-users@perl.org)
license: unknown
distribution_type: module
configure_requires:
+ DBI: 1.51
ExtUtils::MakeMaker: 0
build_requires:
ExtUtils::MakeMaker: 0
37 Makefile.PL 100755 → 100644
View
@@ -57,6 +57,9 @@ my %opts = (
PREOP => '$(MAKE) -f Makefile.old distdir',
COMPRESS => 'gzip -v9', SUFFIX => 'gz',
},
+ META_MERGE => {
+ configure_requires => { DBI => '1.51' }
+ },
);
if ($ExtUtils::MakeMaker::VERSION >= 5.43) {
$opts{AUTHOR} = 'Tim Bunce (dbi-users@perl.org)';
@@ -131,7 +134,7 @@ $OH =~ s:/$::;
if (!$OH) {
$OH = find_oracle_home() || die qq{
- The $ORACLE_ENV environment variable is not set and I couldn't guess it.
+ The $ORACLE_ENV environment variable is not set and I couldn\'t guess it.
It must be set to hold the path to an Oracle installation directory
on this machine (or a machine with a compatible architecture).
See the appropriate README file for your OS for more information.
@@ -162,8 +165,8 @@ print "Using Oracle in $OH\n";
# $client_version => Major.Minor, $client_version_full => Major.Minor.X.Y.Z
my ($client_version, $client_version_full) = get_client_version($::opt_V);
-die "DBD::Oracle no longer supports Oracle versions before 8.\n"
- if $client_version < 8;
+die "DBD::Oracle no longer supports Oracle client versions before 9.2 \n Try a version before 1.25 for 9 and 1.18 for 8!"
+ if $client_version < 9;
# Check for symbol table problem in libclntsh.dylib.9.0 on MacOS X
@@ -269,7 +272,7 @@ elsif (($os eq 'MSWin32') or ($os =~ /cygwin/i)) {
Please install OCI or send comments back to dbi-users\@perl.org
if you have an OCI directory other than $OCIDIR.
- Alternatively, if you're using ActiveState perl on Windows try
+ Alternatively, if you\'re using ActiveState perl on Windows try
ppm install ftp://ftp.esoftmatic.com/outgoing/DBI/5.8.3/DBI.ppd
ppm install ftp://ftp.esoftmatic.com/outgoing/DBI/5.8.3/DBD-Oracle.ppd
@@ -657,12 +660,19 @@ $opts{DEFINE} .= ' -Wall -Wno-comment' if $Config{gccversion};
$opts{DEFINE} .= ' -Xa' if $Config{cc} eq 'clcc'; # CenterLine CC
-$opts{DEFINE} .= ' -DCAN_USE_PRO_C' if $::opt_ProC;
+if ($::opt_ProC) {
+ $opts{DEFINE} .= ' -DCAN_USE_PRO_C' ;
+ print "Seems you want to use ProC connections. Both the Instant Clients and Oracle XE client may not work!!\n\n";
+}
+
+
+
+
$opts{DEFINE} .= ' -DUTF8_SUPPORT' if ($] >= 5.006);
# Use OCIEnvNlsCreate if available for best unicode behaviour
-$opts{DEFINE} .= ' -DNEW_OCI_INIT' if $client_version >= 9.2;
+#$opts{DEFINE} .= ' -DNEW_OCI_INIT' if $client_version >= 9.2;
$opts{DEFINE} .= ($os ne 'VMS')
? " -DORA_OCI_VERSION=\\\"$client_version_full\\\""
: " -DORA_OCI_VERSION=\"$client_version_full\"";
@@ -671,9 +681,17 @@ $opts{DEFINE} .= ($os ne 'VMS')
# use this if, for some reason the default handling for this function
# doesn't work or you are building a binary release for distribution
# to machines with older client libraries.
-$opts{DEFINE} .= " -DORA_OCI_8" if ($::opt_V && $client_version == 8.0)
- or ($^O eq 'VMS' && $client_version < 9.0); # OCILobIsTemporary
+
+print "\nclient_version=$client_version\n\n";
+
+$opts{DEFINE} .= " -DORA_OCI_102" if ($::opt_V && $client_version == 10.2)
+ or ( $client_version >= 10.2);
+
+$opts{DEFINE} .= " -DORA_OCI_112" if ($::opt_V && $client_version == 11.2)
+ or ( $client_version >= 11.2);
+
+print "\nDEFINE=$opts{DEFINE}\n\n";
# OCIStmntFetch2() is a feature of OCI 9.0.0
$opts{DEFINE} .= " -DUSE_ORA_OCI_STMNT_FETCH " if ( $client_version < 9.0 );
@@ -1056,6 +1074,7 @@ sub find_mkfile {
'proc16/lib/proc16.mk',
);
my @mk_oci32 = (
+ 'rdbms/demo/demo_xe.mk',
'rdbms/demo/demo_rdbms32.mk'
);
my @mk_oci64 = (
@@ -1600,7 +1619,7 @@ sub get_client_version {
if (!$client_version_full) {
$client_version_full = "8.0.0.0";
print qq{
-WARNING: I could not determine Oracle client version so I'll just
+WARNING: I could not determine Oracle client version so I\'ll just
default to version $client_version_full. Some features of DBD::Oracle may not work.
Oracle version based logic in Makefile.PL may produce erroneous results.
You can use "perl Makefile.PL -V X.Y.Z" to specify a your client version.\n
0  Oracle.ex/README 100755 → 100644
View
File mode changed
0  Oracle.ex/bind.pl 100755 → 100644
View
File mode changed
0  Oracle.ex/commit.pl 100755 → 100644
View
File mode changed
0  Oracle.ex/curref.pl 100755 → 100644
View
File mode changed
0  Oracle.ex/ex.pl 100755 → 100644
View
File mode changed
0  Oracle.ex/japh 100755 → 100644
View
File mode changed
0  Oracle.ex/mktable.pl 100755 → 100644
View
File mode changed
0  Oracle.ex/oradump.pl 100755 → 100644
View
File mode changed
0  Oracle.ex/proc.pl 100755 → 100644
View
File mode changed
0  Oracle.ex/sql 100755 → 100644
View
File mode changed
0  Oracle.ex/tabinfo.pl 100755 → 100644
View
File mode changed
0  Oracle.h 100755 → 100644
View
File mode changed
287 Oracle.pm 100755 → 100644
View
@@ -5,9 +5,9 @@
#
# See COPYRIGHT section in the documentation below
-require 5.003;
+require 5.006;
-$DBD::Oracle::VERSION = '1.24';
+$DBD::Oracle::VERSION = '1.26';
my $ORACLE_ENV = ($^O eq 'VMS') ? 'ORA_ROOT' : 'ORACLE_HOME';
@@ -74,6 +74,7 @@ my $ORACLE_ENV = ($^O eq 'VMS') ? 'ORA_ROOT' : 'ORACLE_HOME';
DBD::Oracle::db->install_method("ora_lob_trim");
DBD::Oracle::db->install_method("ora_lob_length");
DBD::Oracle::db->install_method("ora_lob_chunk_size");
+ DBD::Oracle::db->install_method("ora_lob_is_init");
DBD::Oracle::db->install_method("ora_nls_parameters");
DBD::Oracle::db->install_method("ora_can_unicode");
DBD::Oracle::st->install_method("ora_fetch_scroll");
@@ -176,8 +177,6 @@ my $ORACLE_ENV = ($^O eq 'VMS') ? 'ORA_ROOT' : 'ORACLE_HOME';
sub connect {
my ($drh, $dbname, $user, $auth, $attr)= @_;
-
-
if ($dbname =~ /;/) {
my ($n,$v);
$dbname =~ s/^\s+//;
@@ -190,12 +189,16 @@ my $ORACLE_ENV = ($^O eq 'VMS') ? 'ORA_ROOT' : 'ORACLE_HOME';
} split /\s*;\s*/, $dbname;
my %dbname = ( PROTOCOL => 'tcp', @dbname );
+ if ((exists $dbname{SERVER}) and ($dbname{SERVER} eq "POOLED")) {
+ $attr->{ora_drcp}=1;
+ }
+
# extract main attributes for connect_data portion
- my @connect_data_attr = qw(SID INSTANCE_NAME SERVER SERVICE_NAME);
+ my @connect_data_attr = qw(SID INSTANCE_NAME SERVER SERVICE_NAME );
my %connect_data = map { ($_ => delete $dbname{$_}) }
grep { exists $dbname{$_} } @connect_data_attr;
+
my $connect_data = join "", map { "($_=$connect_data{$_})" } keys %connect_data;
-
return $drh->DBI::set_err(-1,
"Can't connect using this syntax without specifying a HOST and one of @connect_data_attr")
unless $dbname{HOST} and %connect_data;
@@ -225,6 +228,15 @@ my $ORACLE_ENV = ($^O eq 'VMS') ? 'ORA_ROOT' : 'ORACLE_HOME';
$user = '' if not defined $user;
(my $user_only = $user) =~ s:/.*::;
+
+ if (substr($dbname,-7,7) eq ':POOLED'){
+ $dbname=substr($dbname,0,-7);
+ $attr->{ora_drcp} = 1;
+ }
+ elsif ($ENV{ORA_DRCP}){
+ $attr->{ora_drcp} = 1;
+ }
+
my ($dbh, $dbh_inner) = DBI::_new_dbh($drh, {
'Name' => $dbname,
'dbi_imp_data' => $attr->{dbi_imp_data},
@@ -234,6 +246,31 @@ my $ORACLE_ENV = ($^O eq 'VMS') ? 'ORA_ROOT' : 'ORACLE_HOME';
# Call Oracle OCI logon func in Oracle.xs file
# and populate internal handle data.
+
+
+ if (exists $ENV{ORA_DRCP_CLASS}) {
+ $attr->{ora_drcp_class} = $ENV{ORA_DRCP_CLASS}
+ }
+ if($attr->{ora_drcp_class}){
+ # if using ora_drcp_class it cannot contain more than 1024 bytes
+ # and cannot contain a *
+ if (index($attr->{ora_drcp_class},'*') !=-1){
+ Carp::croak("ora_drcp_class cannot contain a '*'!");
+ }
+ if (length($attr->{ora_drcp_class}) > 1024){
+ Carp::croak("ora_drcp_class must be less than 1024 characters!");
+ }
+ }
+ if (exists $ENV{ORA_DRCP_MIN}) {
+ $attr->{ora_drcp_min} = $ENV{ORA_DRCP_MIN}
+ }
+ if (exists $ENV{ORA_DRCP_MAX}) {
+ $attr->{ora_drcp_max} = $ENV{ORA_DRCP_MAX}
+ }
+ if (exists $ENV{ORA_DRCP_INCR}) {
+ $attr->{ora_drcp_incr} = $ENV{ORA_DRCP_INCR}
+ }
+
DBD::Oracle::db::_login($dbh, $dbname, $user, $auth, $attr)
or return undef;
@@ -294,6 +331,7 @@ my $ORACLE_ENV = ($^O eq 'VMS') ? 'ORA_ROOT' : 'ORACLE_HOME';
sub ping {
my($dbh) = @_;
+ local $@;
my $ok = 0;
eval {
local $SIG{__DIE__};
@@ -726,20 +764,15 @@ SQL
[ "VARCHAR2", SQL_VARCHAR, $vc2len, "'", "'",
"max length", 1,1,3,undef,0,0,
"VARCHAR2", undef,undef,SQL_VARCHAR, undef,undef,undef, ],
- ];
- push @$type_info_all,
- [ "BLOB", SQL_LONGVARBINARY, 2147483647,"'", "'",
+ [ "BLOB", SQL_BLOB, 2147483647,"'", "'",
undef, 1,1,0,undef,0,undef,
"BLOB", undef,undef,SQL_LONGVARBINARY,undef,undef,undef, ],
- [ "BFILE", SQL_LONGVARBINARY, 2147483647,"'", "'",
+ [ "BFILE", -9114, 2147483647,"'", "'",
undef, 1,1,0,undef,0,undef,
"BFILE", undef,undef,SQL_LONGVARBINARY,undef,undef,undef, ],
- [ "CLOB", SQL_LONGVARCHAR, 2147483647,"'", "'",
+ [ "CLOB", SQL_CLOB, 2147483647,"'", "'",
undef, 1,1,0,undef,0,undef,
"CLOB", undef,undef,SQL_LONGVARCHAR, undef,undef,undef, ],
-
- if $version >= 8;
- push @$type_info_all,
["TIMESTAMP WITH TIME ZONE", # type name
SQL_TYPE_TIMESTAMP_WITH_TIMEZONE, # data type
40, # column size
@@ -799,8 +832,9 @@ SQL
7, # sql datetime sub
undef, # num prec radix
undef, # interval precision
- ],
- if $version >= 10;
+ ]
+ ];
+
return $type_info_all;
}
@@ -838,8 +872,13 @@ SQL
my $sth = $dbh->prepare_cached("begin dbms_output.get_line(:l, :s); end;")
or return;
my ($line, $status, @lines);
+ my $version = join ".", @{ ora_server_version($dbh) }[0..1];
+ my $len = 32767;
+ if ($version < 10.2){
+ $len = 400;
+ }
# line can be greater that 255 (e.g. 7 byte date is expanded on output)
- $sth->bind_param_inout(':l', \$line, 400, { ora_type => 1 });
+ $sth->bind_param_inout(':l', \$line, $len, { ora_type => 1 });
$sth->bind_param_inout(':s', \$status, 20, { ora_type => 1 });
if (!wantarray) {
$sth->execute or return undef;
@@ -1052,29 +1091,32 @@ access to Oracle databases.
=head1 Which version DBD::Oracle is for me?
-Since version 1.22 DBD::Oracle only supports Oracle clients 9 or greater. Sorry for this it was just getting to hard to
-maintain even more so with the many new functions being introduced in 10g and 11g.
+From version 1.25 onwards DBD::Oracle will only support Oracle clients 9.2 or greater and it will
+be dropping support for ProC connections in 1.26. Sorry for this it was just getting to hard to
+maintain the code base for an ever shrinking user base. This is especially so with the many new functions
+being introduced in 10g and 11g.
+
If you are still stuck with an older version of Oracle or its client you might want to look at the table below.
- +---------------------+--------------------------------------------+
- | | Oracle Version |
- +---------------------+----+-------------+---------+------+--------+
- | DBD::Oracle Version | <8 | 8.0.3~8.0.6 | 8iR1~R2 | 8iR3 | 9i~11g |
- +---------------------+----+-------------+---------+------+--------+
- | 0.1~16 | Y | Y | Y | Y | Y |
- +---------------------+----+-------------+---------+------+--------+
- | 1.17 | Y | Y | Y | Y | Y |
- +---------------------+----+-------------+---------+------+--------+
- | 1.18 | N | N | N | Y | Y |
- +---------------------+----+-------------+---------+------+--------+
- | 1.19 | N | N | N | Y | Y |
- +---------------------+----+-------------+---------+------+--------+
- | 1.20 | N | N | N | Y | Y |
- +---------------------+----+-------------+---------+------+--------+
- | 1.21 | N | N | N | N | Y |
- +---------------------+----+-------------+---------+------+--------+
- | 1.22 | N | N | N | N | Y |
- +---------------------+----+-------------+---------+------+--------+
+ +---------------------+-----------------------------------------------------+
+ | | Oracle Version |
+ +---------------------+----+-------------+---------+------+--------+--------+
+ | DBD::Oracle Version | <8 | 8.0.3~8.0.6 | 8iR1~R2 | 8iR3 | 9i | 9.2~11 |
+ +---------------------+----+-------------+---------+------+--------+--------+
+ | 0.1~16 | Y | Y | Y | Y | Y | Y |
+ +---------------------+----+-------------+---------+------+--------+--------+
+ | 1.17 | Y | Y | Y | Y | Y | Y |
+ +---------------------+----+-------------+---------+------+--------+--------+
+ | 1.18 | N | N | N | Y | Y | Y |
+ +---------------------+----+-------------+---------+------+--------+--------+
+ | 1.19 | N | N | N | Y | Y | Y |
+ +---------------------+----+-------------+---------+------+--------+--------+
+ | 1.20 | N | N | N | Y | Y | Y |
+ +---------------------+----+-------------+---------+------+--------+--------+
+ | 1.21~1.24 | N | N | N | N | Y | Y |
+ +---------------------+----+-------------+---------+------+--------+--------+
+ | 1.25+ | N | N | N | N | N | Y |
+ +---------------------+----+-------------+---------+------+--------+--------+
As there are dozens and dozens of different versions of Oracle's clients I did not bother to list any of them, just the major release versions of Oracle that are out there.
@@ -1082,13 +1124,18 @@ Note that one can still connect to any Oracle version with the older DBD::Oracle
So to make a short story a little longer;
- 1) If you are using Oracle 7 or early 8 get a 9 client and you can use any DBD::Oracle version.
+ 1) If you are using Oracle 7 or early 8 DB and you can manage to get a 9 client and you can use any DBD::Oracle version.
2) If you have to use an Oracle 7 client then DBD::Oracle 1.17 should work
3) Same thing for 8 up to R2, use 1.17, if you are lucky and have the right patch-set you might go with 1.18.
4) For 8iR3 you can use any of the DBD::Oracle versions up to 1.21. Again this depends on your patch-set, If you run into trouble go with 1.19
- 5) After 9i you can use any version you want.
- 6) For you Luddites out there ORAPERL still works and is still included but not updated or supported anymore.
- 7) It seems that the 10g client can only connect to 9 and 11 DBs while the 9 can go back to 7 and even get to 10. I am not sure what the 11g client can connect to.
+ 5) After 9.2 you can use any version you want.
+ 6) For you Luddites out there ORAPERL still works and is still included but not updated or supported anymore and will be removed in 1.27.
+ 7) It seems that the 10g client can only connect to 9 and 11 DBs while the 9 can go back to 7 and even get to 10.
+ I am not sure what the 11g client can connect to.
+ 8) DBD::Oracle still has the code in place for ProC. But good luck trying to get it to work with any of the instant clients
+ as Oracle no longer ships the correct .mk files. I was unable to get it to work with Oracle 11+ as it ships with only
+ part of the full ProC install. You may have to get a full version of ProC from Oracle to get it to compile. It is also slated
+ to be removed in 1.27
=head1 CONNECTING TO ORACLE
@@ -1143,8 +1190,9 @@ will use TCP/IP (or D for DECNET, etc.) for remote SQL*Net v1 connection.
will use the info stored in the SQL*Net v2 F<tnsnames.ora>
configuration file for local or remote connections.
-Support for 'T:' syntax of Oracle SQL*Net V1 is only supported on older 7 clients and I have my doubts it will even work
-if the DB or client has been patched and I know it will not work on any later clients.
+Support for 'T:' syntax of Oracle SQL*Net V1 is only supported on older 7 clients and
+I have my doubts it will even work if the DB or client has been patched and I know it
+will not work on any later clients.
The ORACLE_HOME environment variable should be set correctly.
In general, the value used should match the version of Oracle that
@@ -1246,7 +1294,7 @@ This is the case when you encounter a
DBI connect('','system',...) failed: ERROR OCIEnvNlsCreate.
-error in Lunix or in Windows when you get
+error in Linux or in Windows when you get
OCI.DLL not found
@@ -1321,6 +1369,34 @@ TWO_TASK works the same way except it should override the value in ORACLE_SID so
will work as well. Note this may not work for Windows.
+=head2 Oracle DRCP
+
+DBD::Oracle now supports DRCP (Database Resident Connection Pool) so if you have an 11.2 database and the DRCP is turned on
+you can now direct all of your connections to it simply adding ':POOLED' to the SID or setting a connection attribute of ora_drcp, or
+set the SERVER=POOLED when using a TNSENTRY style connection or even by setting an environment variable ORA_DRCP.
+All of which are demonstrated below;
+
+ $dbh = DBI->connect('dbi:Oracle:DB:POOLED','username','password')
+
+ $dbh = DBI->connect('dbi:Oracle:','username@DB:POOLED','password')
+
+ $dbh = DBI->connect('dbi:Oracle:DB','username','password',{ora_drcp=>1})
+
+ $dbh = DBI->connect('dbi:Oracle:DB','username','password',{ora_drcp=>1, ora_drcp_class=>'my_app', ora_drcp_min=>10})
+
+ $dbh = DBI->connect('dbi:Oracle:host=foobar;sid=ORCL;port=1521;SERVER=POOLED', 'scott/tiger', '')
+
+ $dbh = DBI->connect('dbi:Oracle:', q{scott/tiger@(DESCRIPTION=
+ (ADDRESS=(PROTOCOL=TCP)(HOST= foobar)(PORT=1521))
+ (CONNECT_DATA=(SID=ORCL)(SERVER=POOLED)))}, "")
+
+ if ORA_DRCP environment var is set the just this
+
+ $dbh = DBI->connect('dbi:Oracle:DB','username','password')
+
+You can find a white paper on setting up DRCP and its advantages here http://www.oracle.com/technology/tech/oci/pdf/oracledrcp11g.pdf
+
+At this point in time this is just the first crack at DRCP and DBD::Oracle so the mechanics or its implementation are subject to change.
=head2 Optimizing Oracle's listener
@@ -1479,7 +1555,7 @@ These constants are used to set the orientation of a fetch on a scrollable curso
=item ora_ncs_buff_mtpl
You can now customize the size of the buffer when selecting LOBs with
-the built in AUTO Lob. The default value is 4 which should is actully exessive
+the built in AUTO Lob. The default value is 4 which should is actually excessive
for most situations but is needed for backward compatibility.
If you not converting between a NCS on the DB and the Client then you might
want to set this to 1 to free up memory.
@@ -1490,6 +1566,55 @@ value. If used it will take the value at the connect stage.
See more details in the LOB section of the POD
+=item ora_drcp
+
+If you have an 11.2 or greater database your can utilize the DRCP by setting
+this attribute to 1 at connect time.
+
+For convenience I have added support for a 'ORA_DRCP'
+environment variable that you can use at the OS level to set this
+value.
+
+=item ora_drcp_class
+
+If you are using DRCP, you can set a CONNECTION_CLASS for your pools as well.
+As sessions from a DRCP cannot be shared by users, you can use this
+setting to identify the same user across different applications. OCI will ensure that
+session belonging to a 'class' are not shared outside the class'.
+
+The values for ora_drcp_class cannot contain an '*' and must be less than 1024 characters.
+
+This value can be set at the environment level with 'ORA_DRCP_CLASS'.
+
+=item ora_drcp_min
+
+Is an optional value that specifies the minimum number of sessions that are initially opened.
+New sessions are only opened after this value has been reached.
+
+The default value is '4' and any value above '0' is valid.
+
+Generally, it should be set to the number of concurrent statements the application is planning
+or expecting to run.
+
+This value can be set at the environment level with 'ORA_DRCP_MIN'.
+
+=item ora_drcp_max
+
+Is an optional value that specifies the maximum number of sessions that can be open at one time.
+Once reached no more session can be opened until one becomes free. The default value
+is '40' and any value above '1' is valid. You should not set this value lower than ora_drcp_min as
+that will just waste resources.
+
+This value can be set at the environment level with 'ORA_DRCP_MAX'.
+
+=item ora_drcp_incr
+
+Is an optional value that specifies the next increment for sessions to be started if the current number of
+sessions are less than ora_drcp_max. The default value is '2' and any value above '0' is valid as long
+as the value of ora_drcp_min + ora_drcp_incr is not greater than ora_drcp_max.
+
+This value can be set at the environment level with 'ORA_DRCP_INCR'.
+
=item ora_session_mode
The ora_session_mode attribute can be used to connect with SYSDBA
@@ -1544,6 +1669,10 @@ to a already shared scalar which is initialized to an empty string.
our $orashr : shared = '' ;
$dbh = DBI->connect ($dsn, $user, $passwd, {ora_dbh_share => \$orashr}) ;
+
+=item ora_context
+
+Use this attribute to send a pointer to a ProC connection when the your dbname is set to extproc.
=item ora_use_proc_connection
@@ -1636,9 +1765,9 @@ Determine object type for each instance. All object attributes are returned (not
=item ora_ph_type
-The default placeholder data type for the database session.
+The default placeholder datatype for the database session.
The C<TYPE> or L</ora_type> attributes to L<DBI/bind_param> and
-L<DBI/bind_param_inout> override the data type for individual placeholders.
+L<DBI/bind_param_inout> override the datatype for individual placeholders.
The most frequent reason for using this attribute is to permit trailing spaces
in values passed by placeholders.
@@ -1772,12 +1901,12 @@ See L</Scrollable Cursors> for more details.
=item ora_prefetch_rows
Sets the number of rows to be prefetched. If it is not set, then the default value is 1.
-See L</Prefetching Rows> for more details.
+See L</Row Prefetching> for more details.
=item ora_prefetch_memory
Sets the memory level for rows to be prefetched. The application then fetches as many rows as will fit into that much memory.
-See L</Prefetching Rows> for more details.
+See L</Row Prefetching> for more details.
=item ora_row_cache_off
@@ -1785,11 +1914,6 @@ By default DBD::Oracle will use a row cache when fetching to cut down the number
trips to the server. If you do not want to use an array fetch set this value to any value other than 0;
See L</Prefetching Rows> for more details.
-=item
-
-You can customize the value of the row cache with this value. By default it will normlly be set to the
-RowCacheSize or one cles to it.
-
=item ora_verbose
Use this value to enable DBD::Oracle only tracing. Simply set the attribute to the trace level you desire.
@@ -1809,7 +1933,7 @@ L<DBI/bind_param> or L<DBI/bind_param_inout> statement handle methods.
=item ora_type
-Specify the placeholder's data type using an Oracle data type.
+Specify the placeholder's datatype using an Oracle datatype.
A fatal error is raised if C<ora_type> and the DBI C<TYPE> attribute
are used for the same placeholder.
Some of these types are not supported by the current version of
@@ -1894,14 +2018,14 @@ Set L</ora_check_sql> to 0 in prepare() to enable this behaviour.
=head1 Prefetching & Row Caching
-DBD::Oracle now supports both Server pre-fetch and Client side row caching. By defualt both
-are trurned on to give optimum performance. Most of the time one can just let DBD::Oracle
+DBD::Oracle now supports both Server pre-fetch and Client side row caching. By default both
+are turned on to give optimum performance. Most of the time one can just let DBD::Oracle
figure out the best optimization.
=head2 Row Caching
-Row caching occures on the client side and the object of it is to cut down the number of round
-trips made to the server when fetching rows. At each fetch a set number of rows will be retreived
+Row caching occurs on the client side and the object of it is to cut down the number of round
+trips made to the server when fetching rows. At each fetch a set number of rows will be retrieved
from the server and stored locally. Further calls the server are made only when the end of the
local buffer(cache) is reached.
@@ -1911,9 +2035,9 @@ The default value is 0, which means that memory size is not included in computin
the C<RowCacheSize> value is set to a negative number then the positive value of RowCacheSize is used
to compute the number of rows to prefetch.
-By default C<RowCacheSize> is automatically set. If you want to totaly turn off prefetching set this to 1.
+By default C<RowCacheSize> is automatically set. If you want to totally turn off prefetching set this to 1.
-For any SQL statment that contains a LOB, Long or Object Type Row Caching will be turned off. However server side
+For any SQL statement that contains a LOB, Long or Object Type Row Caching will be turned off. However server side
caching still works. If you are only selecting a LOB Locator then Row Caching will still work.
=head2 Row Prefetching
@@ -2091,6 +2215,16 @@ An identifier is passed I<as is>, i.e. as the user provides or
Oracle returns it.
See L</table_info()> for more detailed information.
+It is possiable with Oracle to make the names of the various DB objects (table,column,index etc)
+case sensitive.
+
+ alter table bloggind add ("Bla_BLA" NUMBER)
+
+So in the example the exact case "Bla_BLA" must be used to get it info on the column. While this
+
+ alter table bloggind add (Bla_BLA NUMBER)
+
+any case can be used to get info on the column.
=head1 Unicode
@@ -2285,7 +2419,7 @@ The only multi-byte Oracle character set supported by DBD::Oracle is
=head1 SYS.DBMS_SQL datatypes
DBD::Oracle has built-in support for B<SYS.DBMS_SQL.VARCHAR2_TABLE>
-and B<SYS.DBMS_SQL.NUMBER_TABLE> data types. The simple example is here:
+and B<SYS.DBMS_SQL.NUMBER_TABLE> datatypes. The simple example is here:
my $statement='
DECLARE
@@ -2427,7 +2561,7 @@ you get:
=head1 Other Data Types
-DBD::Oracle does not I<explicitly> support most Oracle data types.
+DBD::Oracle does not I<explicitly> support most Oracle datatypes.
It simply asks Oracle to return them as strings and Oracle does so.
Mostly. Similarly when binding placeholder values DBD::Oracle binds
them as strings and Oracle converts them to the appropriate type,
@@ -3159,7 +3293,7 @@ used, normally one can get an entire LOB is a single round trip.
=head3 Simple Fetch for LONGs and LONG RAWs
-As the name implies this is the simplest way to use this interface. DBD::Oracle just attempts to get your LONG data types as a single large piece.
+As the name implies this is the simplest way to use this interface. DBD::Oracle just attempts to get your LONG datatypes as a single large piece.
There are no special settings, simply set the database handle's 'LongReadLen' attribute to a value that will be the larger than the expected size of the LONG or LONG RAW.
If the size of the LONG or LONG RAW exceeds the 'LongReadLen' DBD::Oracle will return a 'ORA-24345: A Truncation' error. To stop this set the database handle's 'LongTruncOk' attribute to '1'.
The maximum value of 'LongReadLen' seems to be dependent on the physical memory limits of the box that Oracle is running on. You have most likely reached this limit if you run into
@@ -3202,8 +3336,8 @@ but you were actually using 40_000_000 bytes of buffer under the hood. You woul
You can now customize the size of the buffer by setting the 'ora_ncs_buff_mtpl' either on the connection or statement handle. You can
also set this as 'ORA_DBD_NCS_BUFFER' OS environment variable so you will have to go back and change all your code if you are getting into trouble.
-The default value is still set to 4 for backward compatiblty. You can lower this value and thus increase the amount of data you can retreive. If the
-ora_ncs_buff_mtpl is too small DBD::Oracle will thow and error telling you to increase this buffer by one.
+The default value is still set to 4 for backward compatibility. You can lower this value and thus increase the amount of data you can retrieve. If the
+ora_ncs_buff_mtpl is too small DBD::Oracle will throw and error telling you to increase this buffer by one.
If the error is not captured then you may get at some random point later on, usually at a finish() or disconnect() or even a fetch() this error;
@@ -3213,7 +3347,7 @@ This is one of the more obscure ORA errors (have some fun and report it to Meta-
If you get this, simply increment the ora_ncs_buff_mtpl by one until it goes away.
-This should greatly increase your ability to select very large CLOBs or NCLOBs, by freeing up a large block of menory.
+This should greatly increase your ability to select very large CLOBs or NCLOBs, by freeing up a large block of memory.
You can tune this value by setting ora_oci_success_warn which will display the following
@@ -3490,8 +3624,8 @@ LOB operations simple by hiding the LOB Locator processing:
The alternative is to disable the automatic LOB Locator processing.
If L</ora_auto_lob> is 0 in prepare(), you can fetch the LOB Locators and
-do all the work yourself using the ora_lob_*() methods and/or Oracle::OCI.
-See the L</LOB Methods> section below.
+do all the work yourself using the ora_lob_*() methods.
+See the L</Data Interface for LOB Locators> section below.
=head3 LOB support in PL/SQL
@@ -3623,6 +3757,15 @@ Uses the Oracle OCILobTrim function.
Returns the length of the LOB.
Uses the Oracle OCILobGetLength function.
+
+=item ora_lob_is_init
+
+ $is_init = $dbh->ora_lob_is_init($lob_locator);
+
+Returns true(1) if the Lob Locator is initialized false(0) if it is not, or 'undef'
+if there is an error.
+Uses the Oracle OCILobLocatorIsInit function.
+
=item ora_lob_chunk_size
$chunk_size = $dbh->ora_lob_chunk_size($lob_locator);
@@ -3804,7 +3947,7 @@ Locator returned, and not modifying the LOB it refers to,
the select statement does not require the "FOR UPDATE"
clause.
-A word of catution when using the data retruned from an ora_lob_read in a condtional statement.
+A word of caution when using the data returned from an ora_lob_read in a conditional statement.
for example if the code below;
while( my $data = $dbh->ora_lob_read( $char_locator, $offset, $chunk_size ) ) {
@@ -4042,7 +4185,7 @@ Note:
DBD::Oracle does not currently support binding a PL/SQL table (aka array)
as an IN OUT parameter to any Perl data structure. You cannot therefore call
-a PL/SQL function or procedure from DBI that uses a non-atomic data type as
+a PL/SQL function or procedure from DBI that uses a non-atomic datatype as
either a parameter, or a return value. However, if you are using Oracle 9.0.1
or later, you can make use of table (or pipelined) functions.
26 Oracle.xs 100755 → 100644
View
@@ -263,7 +263,9 @@ ora_ping(dbh)
PREINIT:
D_imp_dbh(dbh);
sword status;
+#if !defined(ORA_OCI_102)
text buf[2];
+#endif
CODE:
/*simply does a call to OCIServerVersion which should make 1 round trip*/
/*later I will replace this with the actual OCIPing command*/
@@ -271,7 +273,11 @@ ora_ping(dbh)
/*If the listener goes down it is another case as the Listener is needed to establish the connection not maintain it*/
/*so we should stay connected but we cannot get nay new connections*/
{
+#if !defined(ORA_OCI_102)
OCIServerVersion_log_stat(imp_dbh->svchp,imp_dbh->errhp,buf,2,OCI_HTYPE_SVCCTX,status);
+#else
+ OCIPing_log_stat(imp_dbh->svchp,imp_dbh->errhp,status);
+#endif
if (status != OCI_SUCCESS){
XSRETURN_IV(0);
} else {
@@ -469,6 +475,24 @@ ora_lob_trim(dbh, locator, length)
}
void
+ora_lob_is_init(dbh, locator)
+ SV *dbh
+ OCILobLocator *locator
+ PREINIT:
+ D_imp_dbh(dbh);
+ sword status;
+ boolean is_init = 0;
+ CODE:
+ OCILobLocatorIsInit_log_stat(imp_dbh->envhp,imp_dbh->errhp,locator,&is_init,status);
+ if (status != OCI_SUCCESS) {
+ oci_error(dbh, imp_dbh->errhp, status, "OCILobLocatorIsInit ora_lob_is_init");
+ ST(0) = &sv_undef;
+ }
+ else {
+ ST(0) = sv_2mortal(newSVuv(is_init));
+ }
+
+void
ora_lob_length(dbh, locator)
SV *dbh
OCILobLocator *locator
@@ -479,7 +503,7 @@ ora_lob_length(dbh, locator)
CODE:
OCILobGetLength_log_stat(imp_dbh->svchp, imp_dbh->errhp, locator, &len, status);
if (status != OCI_SUCCESS) {
- oci_error(dbh, imp_dbh->errhp, status, "OCILobGetLength");
+ oci_error(dbh, imp_dbh->errhp, status, "OCILobGetLength ora_lob_length");
ST(0) = &sv_undef;
}
else {
0  Oraperl.pm 100755 → 100644
View
File mode changed
0  README 100755 → 100644
View
File mode changed
0  README-files/hpux/Conf-Lincoln-1.06 100755 → 100644
View
File mode changed
0  README-files/hpux/Conf-Lincoln-1.07 100755 → 100644
View
File mode changed
0  README-files/hpux/Conf-Merijn-580-10.20-cc 100755 → 100644
View
File mode changed
0  README-files/hpux/Conf-Merijn-585-11.00-cc 100755 → 100644
View
File mode changed
0  README-files/hpux/Conf-Merijn-585-11.11-cc 100755 → 100644
View
File mode changed
0  README-files/hpux/Conf-Merijn-587-11.23-cc 100755 → 100644
View
File mode changed
0  README-files/hpux/Conf-Merijn-588-10.20-gcc 100755 → 100644
View
File mode changed
0  README-files/hpux/Conf-Merijn-588-11.00-gcc32 100755 → 100644
View
File mode changed
0  README-files/hpux/Conf-Merijn-588-11.00-gcc64 100755 → 100644
View
File mode changed
0  README-files/hpux/Conf-Merijn-588-11.11-gcc32 100755 → 100644
View
File mode changed
0  README-files/hpux/Conf-Merijn-588-11.11-gcc64 100755 → 100644
View
File mode changed
0  README-files/hpux/Conf-Merijn-588-11.23-gcc64 100755 → 100644
View
File mode changed
0  README-files/hpux/Conf-Mike 100755 → 100644
View
File mode changed
0  README-files/hpux/Conf-Roger 100755 → 100644
View
File mode changed
0  README-files/hpux/Makefile-Lincoln 100755 → 100644
View
File mode changed
0  README-files/hpux/libjava.eml 100755 → 100644
View
File mode changed
0  README.64bit.txt 100755 → 100644
View
File mode changed
0  README.aix.txt 100755 → 100644
View
File mode changed
0  README.clients.txt 100755 → 100644
View
File mode changed
0  README.explain.txt 100755 → 100644
View
File mode changed
0  README.help.txt 100755 → 100644
View
File mode changed
0  README.hpux.txt 100755 → 100644
View
File mode changed
0  README.java.txt 100755 → 100644
View
File mode changed
18 README.linux.txt 100755 → 100644
View
@@ -1,4 +1,22 @@
From: John Scoles
+Date: April 05 2010
+
+The Dreaded "cc1: invalid option `tune=pentium4'" error.
+
+If you get the above it seems that eiter your Perl or OS where compiled with a different version of GCC or the GCC that is on your system is very old.
+
+No real problem with the above however you will have to
+
+1) run Perl Makefile.PL
+2) edit the Makefile and remove the ofending '-mtune=pentium4' text
+3) save and exit
+4) do the make install and it should work fine for you
+
+
+
+
+
+From: John Scoles
Date: Fri, 25 May 2007
Installing with Instantclient .rpm files.
0  README.login.txt 100755 → 100644
View
File mode changed
0  README.longs.txt 100755 → 100644
View
File mode changed
0  README.macosx.txt 100755 → 100644
View
File mode changed
0  README.sec.txt 100755 → 100644
View
File mode changed
0  README.sun.txt 100755 → 100644
View
File mode changed
0  README.vms.txt 100755 → 100644
View
File mode changed
0  README.win32.txt 100755 → 100644
View
File mode changed
112 README.win64.txt 100755 → 100644
View
@@ -1,3 +1,115 @@
+DBD::Oracle and Windows 64bit
+
+I have successfully compiled and installed DBD::Oracle on Windows 2008 server 64bit operating system today.
+
+I used the latest version of <a href='http://search.cpan.org/~pythian/DBD-Oracle-1.24a/'>DBD::Oracle 1.24</A>
+version 11.2.0.1.0 for 64bit windows of Oracle's
+<a href='http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winx64soft.html'>Instant Client Package - Basic</a>
+along with the Instant Client Package - SQL*Plus and finally the Instant Client Package - SDK.
+
+
+To get it to Make and compile correctly I had to download Microsoft's <a href='http://www.microsoft.com/visualstudio/en-ca/download'>Visual Studio Ultimate</a>
+
+which should contain all the files you need. It is rather portly at 2+gb so you might want to grab lunch while you are downloading it.
+
+
+After all the above downloading DBB::Oracle installed right out of the box.
+
+All one has to do is select 'Start Menu->All Programs->Microsoft Visual Studio 2010->Visual Studio Tools->Visual Studio x64 Win64 Command Prompt (2010)'
+which will open a good old 'dos' window.
+
+At this point CD to the directory where you downloaded DBD::Oracle
+
+c:\DBD-Oracle>
+
+then set your 'ORACLE_HOME to the Instant Client directory
+
+c:\DBD-Oracle>set ORACLE_HOME=c:\IC_11
+
+you should also set your NLS like this
+
+c:\DBD-Oracle>set NLS_LANG=.WE8ISO8859P15
+
+Once the above setting are done do a
+
+c:\DBD-Oracle>perl Makefile.PL
+
+and then a
+
+c:\DBD-Oracle>nmake install
+
+
+Which will produce a whole of warnings (the make you can ignore them for now as they do not seem to effect DBD::Oracle at all) and near the end it should output something like this;
+
+
+Generating code
+Finished generating code
+ if exist blib\arch\auto\DBD\Oracle\Oracle.dll.manifest mt -nologo -manifest blib\arch\auto\DBD\Oracle\Oracle.dll.manifest -outputresource:blib\arch\auto
+\DBD\Oracle\Oracle.dll;2
+ if exist blib\arch\auto\DBD\Oracle\Oracle.dll.manifest del blib\arch\auto\DBD\Oracle\Oracle.dll.manifest
+ C:\Perl64\bin\perl.exe -MExtUtils::Command -e "chmod" -- 755 blib\arch\auto\DBD\Oracle\Oracle.dll
+ C:\Perl64\bin\perl.exe -MExtUtils::Command -e "cp" -- Oracle.bs blib\arch\auto\DBD\Oracle\Oracle.bs
+ C:\Perl64\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644 blib\arch\auto\DBD\Oracle\Oracle.bs
+ C:\Perl64\bin\perl.exe "-Iblib\arch" "-Iblib\lib" ora_explain.PL ora_explain
+Extracted ora_explain from ora_explain.PL with variable substitutions.
+ C:\Perl64\bin\perl.exe -MExtUtils::Command -e "cp" -- ora_explain blib\script\ora_explain
+ pl2bat.bat blib\script\ora_explain
+
+At this point you are all done.
+
+Well almost
+
+It is important that you test your code before you install but you will have to set a few things up to get it to fully test correctly
+
+You will need a TNSNAMES.ORA file that points to a valid DB in the Instant Client Directory
+
+Next you will need to set the ORACLE_USER_ID to a valid user
+
+
+c:\DBD-Oracle>set ORACLE_USER_ID=system/system@XE
+
+
+You will have to set up TNS_ADMIN to point to the Instant Client Directory
+
+
+c:\DBD-Oracle>set TNS_ADMIN=c:\IC_11
+
+
+Most importantly you will have to add the Instant Client directory to your path like this
+
+c:\DBD-Oracle>path = c:\IC_11;%path%
+
+If you do not do this step you will run into the dreaded
+
+Can't load 'C:/Perl/lib/auto/DBD/Oracle/Oracle.dll' for module DBD::Oracle: load_file:%1 is not a valid Win32 application at C:/Perl/lib/DynaLoader.pm line 202.
+
+Error later on after the compile when you try to use DBD::Oracle.
+
+What is actually going on is that Perl cannot find oci.dll (or one of the other .dlls it needs to run) the 'C:/Perl/lib/auto/DBD/Oracle/Oracle.dll' and the DynaLoader error
+are just a false trails. For more info on this check out this page <a href='http://www.alexander-foken.de/Censored%20copy%20of%20Oracle%20Troubleshooter%20HOWTO.html#oneoci'>Oracle Troubleshooter'</a>
+by Alexander Foken. It is rather dated but the facts of why perl did not find a dll are still valid.
+
+
+now you can do this
+
+c:\DBD-Oracle>nmake test
+
+and all the tests should run and it will report
+
+Finally simple do a
+
+c:\DBD-Oracle>nmake install
+
+and you are all set
+
+That is about it.
+
+At this point you might want to add the Instant Client directory permanently to your path so you will not run into the Dynaloader error again.
+
+
+
+
+
In general compiling DBD:Oracle for 64 bit machines has been a hit or miss operation.
The main thing to remember is you will have to compile using 32 bit Perl and compile DBD::Oracle against a 32bit client
which sort of defeats the purpose of having a 64bit box.
0  README.wingcc.txt 100755 → 100644
View
File mode changed
10 Todo 100755 → 100644
View
@@ -1,10 +1,14 @@
[ In no particular order ]
Seems this file has been neglected for quite a while so I will try to keep it up to date for now
+
+For release 1.26 or later
-For release 1.23 or later
-
-Drop support for early 9 versions namely support for NEW_OCI_INIT (get rid of the old code in here)
+Add support for TAF
+Add support for New Lob Functions
+Add support for Statement Cacheing
+Add support for callbacks??
+Drop support for ProC connections
For release 1.22 or later
403 dbdimp.c 100755 → 100644
View
@@ -366,17 +366,49 @@ dbd_db_login6(SV *dbh, imp_dbh_t *imp_dbh, char *dbname, char *uid, char *pwd, S
SV **svp;
shared_sv * shared_dbh_ssv = NULL ;
imp_dbh_t * shared_dbh = NULL ;
+ D_imp_drh_from_dbh;
+ ub2 new_charsetid = 0;
+ ub2 new_ncharsetid = 0;
#if defined(USE_ITHREADS) && defined(PERL_MAGIC_shared_scalar)
SV ** shared_dbh_priv_svp ;
SV * shared_dbh_priv_sv ;
STRLEN shared_dbh_len = 0 ;
#endif
+#if defined(CAN_USE_PRO_C)
struct OCIExtProcContext *this_ctx;
ub4 use_proc_connection = 0;
SV **use_proc_connection_sv;
- D_imp_drh_from_dbh;
- ub2 new_charsetid = 0;
- ub2 new_ncharsetid = 0;
+
+ /* Check if we should re-use a ProC connection and not connect ourselves. */
+ DBD_ATTRIB_GET_IV(attr, "ora_use_proc_connection", 23,
+ use_proc_connection_sv, use_proc_connection);
+#else /*CAN_USE_PRO_C*/
+ if (DBD_ATTRIB_TRUE(attr,"ora_use_proc_connection",23,svp))
+ croak ("You can only use a ProC connection, if your DBD::Oracle was built with the -ProC on the Makefile.PL") ;
+#endif /*CAN_USE_PRO_C*/
+
+#ifdef ORA_OCI_112
+ /*check to see if the user is connecting with DRCP */
+ if (DBD_ATTRIB_TRUE(attr,"ora_drcp",8,svp))
+ imp_dbh->using_drcp = 1;
+
+ /* some connection pool atributes */
+
+ if ((svp=DBD_ATTRIB_GET_SVP(attr, "ora_drcp_class", 14)) && SvOK(*svp)) {
+ STRLEN svp_len;
+ if (!SvPOK(*svp))
+ croak("ora_drcp_class is not a string");
+ imp_dbh->pool_class = (text *) SvPV (*svp, svp_len );
+ imp_dbh->pool_classl= (ub4) svp_len;
+ }
+ if (DBD_ATTRIB_TRUE(attr,"ora_drcp_min",12,svp))
+ DBD_ATTRIB_GET_IV( attr, "ora_drcp_min", 12, svp, imp_dbh->pool_min);
+ if (DBD_ATTRIB_TRUE(attr,"ora_drcp_max",12,svp))
+ DBD_ATTRIB_GET_IV( attr, "ora_drcp_max", 12, svp, imp_dbh->pool_max);
+ if (DBD_ATTRIB_TRUE(attr,"ora_drcp_incr",13,svp))
+ DBD_ATTRIB_GET_IV( attr, "ora_drcp_incr", 13, svp, imp_dbh->pool_incr);
+#endif /*ORA_OCI_112*/
+
/* check to see if DBD_verbose or ora_verbose is set*/
if (DBD_ATTRIB_TRUE(attr,"dbd_verbose",11,svp))
DBD_ATTRIB_GET_IV( attr, "dbd_verbose", 11, svp, dbd_verbose);
@@ -384,11 +416,20 @@ dbd_db_login6(SV *dbh, imp_dbh_t *imp_dbh, char *dbname, char *uid, char *pwd, S
DBD_ATTRIB_GET_IV( attr, "ora_verbose", 11, svp, dbd_verbose);
+ /* check to see if success_warn is set. This will */
+ /* warn after some sucessfull operations for tuning results */
if (DBD_ATTRIB_TRUE(attr,"ora_oci_success_warn",20,svp))
DBD_ATTRIB_GET_IV( attr, "ora_oci_success_warn", 20, svp, oci_warn);
+
+ /* check to see if ora_objects set*/
+ /* with this set any embedded types will go into a DBD::Oracle::Object */
+ /* rather than just an ref array */
if (DBD_ATTRIB_TRUE(attr,"ora_objects",11,svp))
DBD_ATTRIB_GET_IV( attr, "ora_objects",11, svp, ora_objects);
+ if (DBIS->debug >= 6 || dbd_verbose >= 6 )
+ dump_env_to_trace();
+
/* dbi_imp_data code adapted from DBD::mysql */
if (DBIc_has(imp_dbh, DBIcf_IMPSET)) {
/* dbi_imp_data from take_imp_data */
@@ -404,6 +445,7 @@ dbd_db_login6(SV *dbh, imp_dbh_t *imp_dbh, char *dbname, char *uid, char *pwd, S
PerlIO_printf(DBILOGFP,
"dbd_db_login6 IMPSET but not ACTIVE so connect not skipped\n");
}
+
imp_dbh->envhp = imp_drh->envhp; /* will be NULL on first connect */
#if defined(USE_ITHREADS) && defined(PERL_MAGIC_shared_scalar)
@@ -446,20 +488,13 @@ dbd_db_login6(SV *dbh, imp_dbh_t *imp_dbh, char *dbname, char *uid, char *pwd, S
}
#endif
- /* Check if we should re-use a ProC connection and not connect ourselves. */
-
- DBD_ATTRIB_GET_IV(attr, "ora_use_proc_connection", 23,
- use_proc_connection_sv, use_proc_connection);
-
imp_dbh->get_oci_handle = oci_db_handle;
- if (DBIS->debug >= 6 || dbd_verbose >= 6 )
- dump_env_to_trace();
-
if ((svp=DBD_ATTRIB_GET_SVP(attr, "ora_envhp", 9)) && SvOK(*svp)) {
if (!SvTRUE(*svp)) {
imp_dbh->envhp = NULL; /* force new environment */
}
+#if defined(CAN_USE_PRO_C)
else {
IV tmp;
if (!sv_isa(*svp, "ExtProc::OCIEnvHandle"))
@@ -467,8 +502,9 @@ dbd_db_login6(SV *dbh, imp_dbh_t *imp_dbh, char *dbname, char *uid, char *pwd, S
tmp = SvIV((SV*)SvRV(*svp));
imp_dbh->envhp = (struct OCIEnv *)tmp;
}
+#endif /*CAN_USE_PRO_C*/
}
-
+#if defined(CAN_USE_PRO_C)
/* "extproc" dbname is special if "ora_context" attribute also given */
if (strEQ(dbname,"extproc") && (svp=DBD_ATTRIB_GET_SVP(attr, "ora_context", 11))) {
IV tmp;
@@ -508,7 +544,11 @@ dbd_db_login6(SV *dbh, imp_dbh_t *imp_dbh, char *dbname, char *uid, char *pwd, S
goto dbd_db_login6_out;
}
- if (!imp_dbh->envhp || is_extproc) {
+ if (!imp_dbh->envhp || is_extproc)
+#else /*CAN_USE_PRO_C*/
+ if (!imp_dbh->envhp )
+#endif
+ {
SV **init_mode_sv;
ub4 init_mode = OCI_OBJECT; /* needed for LOBs (8.0.4) */
DBD_ATTRIB_GET_IV(attr, "ora_init_mode",13, init_mode_sv, init_mode);
@@ -517,6 +557,7 @@ dbd_db_login6(SV *dbh, imp_dbh_t *imp_dbh, char *dbname, char *uid, char *pwd, S
init_mode |= OCI_THREADED;
#endif
+#if defined(CAN_USE_PRO_C)
if (use_proc_connection) {
char *err_hint = Nullch;
#ifdef SQL_SINGLE_RCTX
@@ -535,13 +576,11 @@ dbd_db_login6(SV *dbh, imp_dbh_t *imp_dbh, char *dbname, char *uid, char *pwd, S
return 0;
}
}
- else { /* Normal connect. */
-
+ else /* Normal connect. */
+#endif /*CAN_USE_PRO_C*/
+ {
size_t rsize = 0;
imp_dbh->proc_handles = 0;
-
-#ifdef NEW_OCI_INIT /* XXX needs merging into use_proc_connection branch */
-
/* Get CLIENT char and nchar charset id values */
OCINlsEnvironmentVariableGet_log_stat( &charsetid,(size_t) 0, OCI_NLS_CHARSET_ID, 0, &rsize ,status );
if (status != OCI_SUCCESS) {
@@ -557,28 +596,29 @@ dbd_db_login6(SV *dbh, imp_dbh_t *imp_dbh, char *dbname, char *uid, char *pwd, S
return 0;
}
- /*{
- After using OCIEnvNlsCreate() to create the environment handle,
- **the actual lengths and returned lengths of bind and define handles are
- always in number of bytes**. This applies to the following calls:
+ /*{
+ After using OCIEnvNlsCreate() to create the environment handle,
+ **the actual lengths and returned lengths of bind and define handles are
+ always in number of bytes**. This applies to the following calls:
- * OCIBindByName() * OCIBindByPos() * OCIBindDynamic()
- * OCIDefineByPos() * OCIDefineDynamic()
+ * OCIBindByName() * OCIBindByPos() * OCIBindDynamic()
+ * OCIDefineByPos() * OCIDefineDynamic()
- This function enables you to set charset and ncharset ids at
- environment creation time. [...]
+ This function enables you to set charset and ncharset ids at
+ environment creation time. [...]
- This function sets nonzero charset and ncharset as client side
- database and national character sets, replacing the ones specified
- by NLS_LANG and NLS_NCHAR. When charset and ncharset are 0, it
- behaves exactly the same as OCIEnvCreate(). Specifically, charset
- controls the encoding for metadata and data with implicit form
- attribute and ncharset controls the encoding for data with SQLCS_NCHAR
- form attribute.
- }*/
+ This function sets nonzero charset and ncharset as client side
+ database and national character sets, replacing the ones specified
+ by NLS_LANG and NLS_NCHAR. When charset and ncharset are 0, it
+ behaves exactly the same as OCIEnvCreate(). Specifically, charset
+ controls the encoding for metadata and data with implicit form
+ attribute and ncharset controls the encoding for data with SQLCS_NCHAR
+ form attribute.
+ }*/
OCIEnvNlsCreate_log_stat( &imp_dbh->envhp, init_mode, 0, NULL, NULL, NULL, 0, 0,
- charsetid, ncharsetid, status );
+ charsetid, ncharsetid, status );
+
if (status != OCI_SUCCESS) {
oci_error(dbh, NULL, status,
"OCIEnvNlsCreate. Check ORACLE_HOME (Linux) env var or PATH (Windows) and or NLS settings, permissions, etc.");
@@ -625,34 +665,16 @@ dbd_db_login6(SV *dbh, imp_dbh_t *imp_dbh, char *dbname, char *uid, char *pwd, S
}
/* update the hard-coded csid constants for unicode charsets */
- utf8_csid = OCINlsCharSetNameToId(imp_dbh->envhp, (void*)"UTF8");
+ utf8_csid = OCINlsCharSetNameToId(imp_dbh->envhp, (void*)"UTF8");
al32utf8_csid = OCINlsCharSetNameToId(imp_dbh->envhp, (void*)"AL32UTF8");
al16utf16_csid = OCINlsCharSetNameToId(imp_dbh->envhp, (void*)"AL16UTF16");
-
-#else /* (the old init code) NEW_OCI_INIT */
- /* this is now depricated and will be removed as we no longer support <9.2 oracle*/
- /* XXX recent oracle docs recommend using OCIEnvCreate() instead of */
- /* OCIInitialize + OCIEnvInit, we'd need ifdef's for pre-OCIEnvNlsCreate */
- OCIInitialize_log_stat(init_mode, 0, 0,0,0, status);
-
-
- if (status != OCI_SUCCESS) {
- oci_error(dbh, NULL, status,
- "OCIInitialize. Check Check ORACLE_HOME (Linux) env var or PATH (Windows) and or NLS settings, permissions, etc");
- return 0;
- }
-
- OCIEnvInit_log_stat( &imp_dbh->envhp, OCI_DEFAULT, 0, 0, status);
- if (status != OCI_SUCCESS) {
- oci_error(dbh, (OCIError*)imp_dbh->envhp, status, "OCIEnvInit");
- return 0;
- }
-#endif /* NEW_OCI_INIT */
}
+
}
if (shared_dbh_ssv) { /*is this a cached or shared handle from DBI*/
if (!imp_dbh->envhp) { /*no hande so create a new one*/
+#if defined(CAN_USE_PRO_C)
if (use_proc_connection) {
char *err_hint = Nullch;
#ifdef SQL_SINGLE_RCTX
@@ -665,43 +687,47 @@ dbd_db_login6(SV *dbh, imp_dbh_t *imp_dbh, char *dbname, char *uid, char *pwd, S
if (status != SQL_SUCCESS) {
if (!err_hint)
err_hint = "SQLEnvGet failed to load ProC environment";
- oci_error(dbh, (OCIError*)imp_dbh->envhp, status, err_hint);
- return 0;
- }
+ oci_error(dbh, (OCIError*)imp_dbh->envhp, status, err_hint);
+ return 0;
+ }
}
else {
+#endif
OCIEnvInit_log_stat( &imp_dbh->envhp, OCI_DEFAULT, 0, 0, status);
imp_dbh->proc_handles = 0;
if (status != OCI_SUCCESS) {
oci_error(dbh, (OCIError*)imp_dbh->envhp, status, "OCIEnvInit");
return 0;
}
+#if defined(CAN_USE_PRO_C)
}
+#endif
}
}
- OCIHandleAlloc_ok(imp_dbh->envhp, &imp_dbh->errhp, OCI_HTYPE_ERROR, status);
-
-#ifndef NEW_OCI_INIT /* have to get charsetid & ncharsetid the old way this code should go as well as it is for <9.2 oracle*/
+ OCIHandleAlloc_ok(imp_dbh->envhp, &imp_dbh->errhp, OCI_HTYPE_ERROR, status);
OCIAttrGet_log_stat(imp_dbh->envhp, OCI_HTYPE_ENV, &charsetid, (ub4)0 ,
OCI_ATTR_ENV_CHARSET_ID, imp_dbh->errhp, status);
+
if (status != OCI_SUCCESS) {
oci_error(dbh, imp_dbh->errhp, status, "OCIAttrGet OCI_ATTR_ENV_CHARSET_ID");
return 0;
}
+
OCIAttrGet_log_stat(imp_dbh->envhp, OCI_HTYPE_ENV, &ncharsetid, (ub4)0 ,
OCI_ATTR_ENV_NCHARSET_ID, imp_dbh->errhp, status);
+
if (status != OCI_SUCCESS) {
oci_error(dbh, imp_dbh->errhp, status, "OCIAttrGet OCI_ATTR_ENV_NCHARSET_ID");
return 0;
}
-#endif
/* At this point we have charsetid & ncharsetid
* note that it is possible for charsetid and ncharestid to
* be distinct if NLS_LANG and NLS_NCHAR are both used.
* BTW: NLS_NCHAR is set as follows: NSL_LANG=AL32UTF8
*/
+
if (DBIS->debug >= 3 || dbd_verbose >= 3 ) {
oratext charsetname[OCI_NLS_MAXBUFSZ];
oratext ncharsetname[OCI_NLS_MAXBUFSZ];
@@ -710,10 +736,18 @@ dbd_db_login6(SV *dbh, imp_dbh_t *imp_dbh, char *dbname, char *uid, char *pwd, S
PerlIO_printf(DBILOGFP," charset id=%d, name=%s, ncharset id=%d, name=%s"
" (csid: utf8=%d al32utf8=%d)\n",
charsetid,charsetname, ncharsetid,ncharsetname, utf8_csid, al32utf8_csid);
+#if defined(CAN_USE_PRO_C)
+ if (imp_dbh->proc_handles)
+ PerlIO_printf(DBILOGFP," Useing a ProC Connection\n");
+#endif
+#ifdef ORA_OCI_112
+ if (imp_dbh->using_drcp)
+ PerlIO_printf(DBILOGFP," Useing DRCP Connection\n ");
+#endif
}
-
if (!shared_dbh) {
+#if defined(CAN_USE_PRO_C)
if(use_proc_connection) {
#ifdef SQL_SINGLE_RCTX
@@ -735,7 +769,7 @@ dbd_db_login6(SV *dbh, imp_dbh_t *imp_dbh, char *dbname, char *uid, char *pwd, S
return 0;
}
- OCIAttrGet_log_stat(imp_dbh->svchp, OCI_HTYPE_SVCCTX, &imp_dbh->authp, NULL,
+ OCIAttrGet_log_stat(imp_dbh->svchp, OCI_HTYPE_SVCCTX, &imp_dbh->seshp, NULL,
OCI_ATTR_SESSION, imp_dbh->errhp, status);
if (status != OCI_SUCCESS) {
oci_error(dbh, imp_dbh->errhp, status,
@@ -749,55 +783,147 @@ dbd_db_login6(SV *dbh, imp_dbh_t *imp_dbh, char *dbname, char *uid, char *pwd, S
#endif /* SQL_SINGLE_RCTX*/
}
else { /* !use_proc_connection */
+#endif /*CAN_USE_PRO_C*/
+
imp_dbh->proc_handles = 0;
OCIHandleAlloc_ok(imp_dbh->envhp, &imp_dbh->srvhp, OCI_HTYPE_SERVER, status);
- OCIHandleAlloc_ok(imp_dbh->envhp, &imp_dbh->svchp, OCI_HTYPE_SVCCTX, status);
- OCIServerAttach_log_stat(imp_dbh, dbname,OCI_DEFAULT, status);
if (status != OCI_SUCCESS) {
oci_error(dbh, imp_dbh->errhp, status, "OCIServerAttach");
OCIHandleFree_log_stat(imp_dbh->srvhp, OCI_HTYPE_SERVER, status);
- OCIHandleFree_log_stat(imp_dbh->svchp, OCI_HTYPE_SVCCTX, status);
OCIHandleFree_log_stat(imp_dbh->errhp, OCI_HTYPE_ERROR, status);
return 0;
}
- OCIAttrSet_log_stat( imp_dbh->svchp, OCI_HTYPE_SVCCTX, imp_dbh->srvhp,
- (ub4) 0, OCI_ATTR_SERVER, imp_dbh->errhp, status);
- OCIHandleAlloc_ok(imp_dbh->envhp, &imp_dbh->authp, OCI_HTYPE_SESSION, status);
{
- ub4 cred_type = ora_parse_uid(imp_dbh, &uid, &pwd);
SV **sess_mode_type_sv;
ub4 sess_mode_type = OCI_DEFAULT;
+ ub4 cred_type;
DBD_ATTRIB_GET_IV(attr, "ora_session_mode",16, sess_mode_type_sv, sess_mode_type);
- OCISessionBegin_log_stat( imp_dbh->svchp, imp_dbh->errhp, imp_dbh->authp,
- cred_type, sess_mode_type, status);
- }
- if (status == OCI_SUCCESS_WITH_INFO) {
- /* eg ORA-28011: the account will expire soon; change your password now */
- oci_error(dbh, imp_dbh->errhp, status, "OCISessionBegin");
- status = OCI_SUCCESS;
- }
- if (status != OCI_SUCCESS) {
- oci_error(dbh, imp_dbh->errhp, status, "OCISessionBegin");
- OCIServerDetach_log_stat(imp_dbh->srvhp, imp_dbh->errhp, OCI_DEFAULT, status);
- OCIHandleFree_log_stat(imp_dbh->authp, OCI_HTYPE_SESSION,status);
- OCIHandleFree_log_stat(imp_dbh->srvhp, OCI_HTYPE_SERVER, status);
- OCIHandleFree_log_stat(imp_dbh->errhp, OCI_HTYPE_ERROR, status);
- OCIHandleFree_log_stat(imp_dbh->svchp, OCI_HTYPE_SVCCTX, status);
- return 0;
- }
+#ifdef ORA_OCI_112
+
+ if (imp_dbh->using_drcp) { /* connect uisng a DRCP */
+ ub4 purity = OCI_ATTR_PURITY_SELF;
+ /* pool Default values */
+ if (!imp_dbh->pool_min )
+ imp_dbh->pool_min = 4;
+ if (!imp_dbh->pool_max )
+ imp_dbh->pool_max = 40;
+ if (!imp_dbh->pool_incr)
+ imp_dbh->pool_incr = 2;
+
+ OCIHandleAlloc_ok(imp_dbh->envhp, &imp_dbh->poolhp, OCI_HTYPE_SPOOL, status);
+
+ OCISessionPoolCreate_log_stat(imp_dbh->envhp,
+ imp_dbh->errhp,
+ imp_dbh->poolhp,
+ (OraText **) &imp_dbh->pool_name,
+ (ub4 *) &imp_dbh->pool_namel,
+ (OraText *) dbname,
+ strlen(dbname),
+ imp_dbh->pool_min,
+ imp_dbh->pool_max,
+ imp_dbh->pool_incr,
+ (OraText *) uid,
+ strlen(uid),
+ (OraText *) pwd,
+ strlen(pwd),
+ status);
+
+ if (status != OCI_SUCCESS) {
+
+ oci_error(dbh, imp_dbh->errhp, status, "OCISessionPoolCreate");
+ OCIServerDetach_log_stat(imp_dbh->srvhp, imp_dbh->errhp, OCI_DEFAULT, status);
+ OCIHandleFree_log_stat(imp_dbh->poolhp, OCI_HTYPE_SPOOL,status);
+ OCIHandleFree_log_stat(imp_dbh->srvhp, OCI_HTYPE_SERVER, status);
+ OCIHandleFree_log_stat(imp_dbh->errhp, OCI_HTYPE_ERROR, status);
+ return 0;
+ }
+
+ OCIHandleAlloc_ok(imp_dbh->envhp, &imp_dbh->authp, OCI_HTYPE_AUTHINFO, status);
+
+ OCIAttrSet_log_stat(imp_dbh->authp, (ub4) OCI_HTYPE_AUTHINFO,
+ &purity, (ub4) 0,(ub4) OCI_ATTR_PURITY, imp_dbh->errhp, status);
+
+ if (imp_dbh->pool_class) /*pool_class may or may not be used */
+ OCIAttrSet_log_stat(imp_dbh->authp, (ub4) OCI_HTYPE_AUTHINFO,
+ (OraText *) imp_dbh->pool_class, (ub4) imp_dbh->pool_classl,
+ (ub4) OCI_ATTR_CONNECTION_CLASS, imp_dbh->errhp, status);
- OCIAttrSet_log_stat(imp_dbh->svchp, (ub4) OCI_HTYPE_SVCCTX,
- imp_dbh->authp, (ub4) 0,
- (ub4) OCI_ATTR_SESSION, imp_dbh->errhp, status);
+ cred_type = ora_parse_uid(imp_dbh, &uid, &pwd);
+ OCISessionGet_log_stat(imp_dbh->envhp, imp_dbh->errhp, &imp_dbh->svchp, imp_dbh->authp,
+ imp_dbh->pool_name, (ub4)strlen((char *)imp_dbh->pool_name), status);
+
+ if (status != OCI_SUCCESS) {
+
+ oci_error(dbh, imp_dbh->errhp, status, "OCISessionGet");
+ OCIServerDetach_log_stat(imp_dbh->srvhp, imp_dbh->errhp, OCI_DEFAULT, status);
+ OCISessionPoolDestroy(imp_dbh->poolhp, imp_dbh->errhp,status);
+ OCIHandleFree_log_stat(imp_dbh->poolhp, OCI_HTYPE_SPOOL,status);
+ OCIHandleFree_log_stat(imp_dbh->srvhp, OCI_HTYPE_SERVER, status);
+ OCIHandleFree_log_stat(imp_dbh->errhp, OCI_HTYPE_ERROR, status);
+
+ return 0;
+ }
+
+ if (DBIS->debug >= 4 || dbd_verbose >= 4 ) {
+ PerlIO_printf(DBILOGFP,"Using DRCP with session settings min=%d, max=%d, and increment=%d\n",imp_dbh->pool_min,
+ imp_dbh->pool_max,
+ imp_dbh->pool_incr);
+ if (imp_dbh->pool_class)
+ PerlIO_printf(DBILOGFP,"with connection class=%s\n",imp_dbh->pool_class);
+ }
+
+ }
+ else {
+#endif
+
+
+ OCIHandleAlloc_ok(imp_dbh->envhp, &imp_dbh->svchp, OCI_HTYPE_SVCCTX, status);
+ OCIServerAttach_log_stat(imp_dbh, dbname,OCI_DEFAULT, status);
+
+ OCIAttrSet_log_stat( imp_dbh->svchp, OCI_HTYPE_SVCCTX, imp_dbh->srvhp,
+ (ub4) 0, OCI_ATTR_SERVER, imp_dbh->errhp, status);
+
+ OCIHandleAlloc_ok(imp_dbh->envhp, &imp_dbh->seshp, OCI_HTYPE_SESSION, status);
+
+ cred_type = ora_parse_uid(imp_dbh, &uid, &pwd);
+
+ OCISessionBegin_log_stat( imp_dbh->svchp, imp_dbh->errhp, imp_dbh->seshp,cred_type, sess_mode_type, status);
+
+ if (status == OCI_SUCCESS_WITH_INFO) {
+ /* eg ORA-28011: the account will expire soon; change your password now */
+ oci_error(dbh, imp_dbh->errhp, status, "OCISessionBegin");
+ status = OCI_SUCCESS;
+ }
+ if (status != OCI_SUCCESS) {
+ oci_error(dbh, imp_dbh->errhp, status, "OCISessionBegin");
+ OCIServerDetach_log_stat(imp_dbh->srvhp, imp_dbh->errhp, OCI_DEFAULT, status);
+ OCIHandleFree_log_stat(imp_dbh->seshp, OCI_HTYPE_SESSION,status);
+ OCIHandleFree_log_stat(imp_dbh->srvhp, OCI_HTYPE_SERVER, status);
+ OCIHandleFree_log_stat(imp_dbh->errhp, OCI_HTYPE_ERROR, status);
+ OCIHandleFree_log_stat(imp_dbh->svchp, OCI_HTYPE_SVCCTX, status);
+ return 0;
+ }
+
+ OCIAttrSet_log_stat(imp_dbh->svchp, (ub4) OCI_HTYPE_SVCCTX,
+ imp_dbh->seshp, (ub4) 0,(ub4) OCI_ATTR_SESSION, imp_dbh->errhp, status);
+#ifdef ORA_OCI_112
+ }
+#endif
+ }
+
+#if defined(CAN_USE_PRO_C)
} /* use_proc_connection */
+#endif
}
+#if defined(CAN_USE_PRO_C)
dbd_db_login6_out:
+#endif
DBIc_IMPSET_on(imp_dbh); /* imp_dbh set up now */
DBIc_ACTIVE_on(imp_dbh); /* call disconnect before freeing */
imp_dbh->ph_type = 1; /* SQLT_CHR "(ORANET TYPE) character string" */
@@ -831,15 +957,13 @@ dbd_db_commit(SV *dbh, imp_dbh_t *imp_dbh)
sword status;
OCITransCommit_log_stat(imp_dbh->svchp, imp_dbh->errhp, OCI_DEFAULT, status);
if (status != OCI_SUCCESS) {
- oci_error(dbh, imp_dbh->errhp, status, "OCITransCommit");
- return 0;
+ oci_error(dbh, imp_dbh->errhp, status, "OCITransCommit");
+ return 0;
}
return 1;
}
-
-
int
dbd_st_cancel(SV *sth, imp_sth_t *imp_sth)
{
@@ -942,13 +1066,22 @@ dbd_db_disconnect(SV *dbh, imp_dbh_t *imp_dbh)
if (refcnt == 1 && !imp_dbh->proc_handles) {
sword s_se, s_sd;
- OCISessionEnd_log_stat(imp_dbh->svchp, imp_dbh->errhp, imp_dbh->authp,
+#ifdef ORA_OCI_112
+ if (imp_dbh->using_drcp) {
+ OCISessionRelease_log_stat(imp_dbh->svchp, imp_dbh->errhp,s_se);
+ }
+ else {
+#endif
+ OCISessionEnd_log_stat(imp_dbh->svchp, imp_dbh->errhp, imp_dbh->seshp,
OCI_DEFAULT, s_se);
- if (s_se) oci_error(dbh, imp_dbh->errhp, s_se, "OCISessionEnd");
- OCIServerDetach_log_stat(imp_dbh->srvhp, imp_dbh->errhp, OCI_DEFAULT, s_sd);
- if (s_sd) oci_error(dbh, imp_dbh->errhp, s_sd, "OCIServerDetach");
- if (s_se || s_sd)
- return 0;
+#ifdef ORA_OCI_112
+ }
+#endif
+ if (s_se) oci_error(dbh, imp_dbh->errhp, s_se, "OCISessionEnd");
+ OCIServerDetach_log_stat(imp_dbh->srvhp, imp_dbh->errhp, OCI_DEFAULT, s_sd);
+ if (s_sd) oci_error(dbh, imp_dbh->errhp, s_sd, "OCIServerDetach");
+ if (s_se || s_sd)
+ return 0;
}
/* We don't free imp_dbh since a reference still exists */
/* The DESTROY method is the only one to 'free' memory. */
@@ -972,16 +1105,28 @@ dbd_db_destroy(SV *dbh, imp_dbh_t *imp_dbh)
#endif
if (refcnt == 1) {
- if (DBIc_ACTIVE(imp_dbh))
- dbd_db_disconnect(dbh, imp_dbh);
- if (is_extproc)
- goto dbd_db_destroy_out;
- if (!imp_dbh->proc_handles)
- { sword status;
- OCIHandleFree_log_stat(imp_dbh->authp, OCI_HTYPE_SESSION,status);
- OCIHandleFree_log_stat(imp_dbh->srvhp, OCI_HTYPE_SERVER, status);
- OCIHandleFree_log_stat(imp_dbh->svchp, OCI_HTYPE_SVCCTX, status);
- }
+ if (DBIc_ACTIVE(imp_dbh))
+ dbd_db_disconnect(dbh, imp_dbh);
+ if (is_extproc)
+ goto dbd_db_destroy_out;
+ if (!imp_dbh->proc_handles) {
+ sword status;
+#ifdef ORA_OCI_112
+ if (imp_dbh->using_drcp) {
+ OCIHandleFree_log_stat(imp_dbh->authp, OCI_HTYPE_SESSION,status);
+ OCISessionPoolDestroy_log_stat(imp_dbh->poolhp, imp_dbh->errhp,status);
+ OCIHandleFree_log_stat(imp_dbh->poolhp, OCI_HTYPE_SPOOL,status);
+ }
+ else {
+#endif
+ OCIHandleFree_log_stat(imp_dbh->seshp, OCI_HTYPE_SESSION,status);
+ OCIHandleFree_log_stat(imp_dbh->svchp, OCI_HTYPE_SVCCTX, status);
+
+#ifdef ORA_OCI_112
+ }
+#endif
+ OCIHandleFree_log_stat(imp_dbh->srvhp, OCI_HTYPE_SERVER, status);
+ }
}
OCIHandleFree_log_stat(imp_dbh->errhp, OCI_HTYPE_ERROR, status);
dbd_db_destroy_out:
@@ -1001,6 +1146,25 @@ dbd_db_STORE_attrib(SV *dbh, imp_dbh_t *imp_dbh, SV *keysv, SV *valuesv)
if (kl==17 && strEQ(key, "ora_ncs_buff_mtpl") ) {
ora_ncs_buff_mtpl = SvIV (valuesv);
}
+#ifdef ORA_OCI_112
+ else if (kl==8 && strEQ(key, "ora_drcp") ) {
+ imp_dbh->using_drcp = 1;
+ }
+ else if (kl==14 && strEQ(key, "ora_drcp_class") ) {
+ STRLEN vl;
+ imp_dbh->pool_class = (text *) SvPV (valuesv, vl );
+ imp_dbh->pool_classl= (ub4) vl;
+ }
+ else if (kl==12 && strEQ(key, "ora_drcp_min") ) {
+ imp_dbh->pool_min = SvIV (valuesv);
+ }
+ else if (kl==12 && strEQ(key, "ora_drcp_max") ) {
+ imp_dbh->pool_max = SvIV (valuesv);
+ }
+ else if (kl==13 && strEQ(key, "ora_drcp_incr") ) {
+ imp_dbh->pool_incr = SvIV (valuesv);
+ }
+#endif
else if (kl==20 && strEQ(key, "ora_oci_success_warn") ) {
oci_warn = SvIV (valuesv);
}
@@ -2277,8 +2441,10 @@ dbd_rebind_ph_char(imp_sth_t *imp_sth, phs_t *phs)
PerlIO_printf(DBILOGFP, "dbd_rebind_ph_char() (1): bind %s <== %.1000s (", phs->name, val);
if (!SvOK(phs->sv))
PerlIO_printf(DBILOGFP, "NULL, ");
- PerlIO_printf(DBILOGFP, "size %ld/%ld/%ld, ",(long)SvCUR(phs->sv),(long)SvLEN(phs->sv),phs->maxlen);
+ PerlIO_printf(DBILOGFP, "size %ld/%ld/%ld, ",(long)SvCUR(phs->sv),(long)SvLEN(phs->sv),(long)phs->maxlen);
PerlIO_printf(DBILOGFP, "ptype %d(%s), otype %d %s)\n",(int)SvTYPE(phs->sv), sql_typecode_name(phs->ftype),phs->ftype,(phs->is_inout) ? ", inout" : "");
+
+
}
/* At the moment we always do sv_setsv() and rebind. */
@@ -3495,12 +3661,7 @@ ora_st_execute_array(sth, imp_sth, tuples, tuples_status, columns, exe_count)
}
/* Do OCI bind calls on last iteration. */
if( ((unsigned int) j ) == exe_count - 1 ) {
-
- if(!do_bind_array_exec(sth, imp_sth, phs[i], utf8_flgs[i],i,tuples_utf8_av,tuples_status_av)) {
- Safefree(phs);
- Safefree(utf8_flgs);
- /*Safefree(tuples_utf8_av);*/
- }
+ do_bind_array_exec(sth, imp_sth, phs[i], utf8_flgs[i],i,tuples_utf8_av,tuples_status_av);
}
}
}
@@ -3801,7 +3962,7 @@ dbd_st_destroy(SV *sth, imp_sth_t *imp_sth)
if (DBIc_DBISTATE(imp_sth)->debug >= 6 || dbd_verbose >= 6 )
- PerlIO_printf(DBIc_LOGPIO(imp_sth), " dbd_st_destroy %s\n",
+ PerlIO_printf(DBIc_LOGPIO(imp_sth), " dbd_st_destroy %s\n",
(dirty) ? "(OCIHandleFree skipped during global destruction)" :
(imp_sth->nested_cursor) ?"(OCIHandleFree skipped for nested cursor)" : "");
@@ -3816,7 +3977,7 @@ dbd_st_destroy(SV *sth, imp_sth_t *imp_sth)
/* Free off contents of imp_sth */
if (imp_sth->lob_refetch)
- ora_free_lob_refetch(sth, imp_sth);
+ ora_free_lob_refetch(sth, imp_sth);
fields = DBIc_NUM_FIELDS(imp_sth);
imp_sth->in_cache = 0;
17 dbdimp.h 100755 → 100644
View
@@ -38,7 +38,19 @@ struct imp_dbh_st {
OCIError *errhp;
OCIServer *srvhp;
OCISvcCtx *svchp;
- OCISession *authp;
+ OCISession *seshp;
+#ifdef ORA_OCI_112
+ OCIAuthInfo *authp;
+ OCISPool *poolhp;
+ text *pool_name;
+ ub4 pool_namel;
+ bool using_drcp;
+ text *pool_class;
+ ub4 pool_classl;
+ ub4 pool_min;
+ ub4 pool_max;
+ ub4 pool_incr;
+#endif
int proc_handles; /* If true, srvhp, svchp, and authp handles
are owned by ProC and must not be freed. */
int RowCacheSize; /* both of these are defined by DBI spec*/
@@ -158,7 +170,7 @@ struct fbh_obj_st { /* embedded object or table will work recursively*/
OCIType *obj_type; /*if an embeded object this is the OCIType returned by a OCIObjectPin*/
ub1 is_final_type; /*object's OCI_ATTR_IS_FINAL_TYPE*/
fbh_obj_t *fields; /*one object for each field/property*/
- int field_count; /*The number of fields Not really needed but nice to have*/
+ ub2 field_count; /*The number of fields Not really needed but nice to have*/
fbh_obj_t *next_subtype; /*There is strored information about subtypes for inteherited objects*/
AV *value; /*The value to send back to Perl This way there are no memory leaks*/
SV *full_type_name; /*Perl value of full type name = schema_name "." type_name*/
@@ -265,7 +277,6 @@ extern int dbd_verbose;
extern int oci_warn;
extern int ora_objects;
extern int ora_ncs_buff_mtpl;
-
extern ub2 charsetid;
extern ub2 ncharsetid;
extern ub2 us7ascii_csid;
0  dbivport.h 100755 → 100644
View
File mode changed
0  hints/dgux.pl 100755 → 100644
View
File mode changed
0  hints/macos_bundle.syms 100755 → 100644
View
File mode changed
0  hints/macos_lib.syms 100755 → 100644
View
File mode changed
0  hints/macos_syms.pl 100755 → 100644
View
File mode changed
0  hints/svr4.pl 100755 → 100644
View
File mode changed
338 lib/DBD/Oracle/GetInfo.pm 100755 → 100644
View
@@ -1,67 +1,311 @@
package DBD::Oracle::GetInfo;
+use strict;
use DBD::Oracle();
-my $fmt = '%02d.%02d.%1d%1d%1d%1d'; # ODBC version string: ##.##.#####
+my $sql_driver = 'Oracle';
+my $sql_ver_fmt = '%02d.%02d.%04d'; # ODBC version string: ##.##.#####
-my $sql_driver_ver = sprintf $fmt, split (/\./, "$DBD::Oracle::VERSION.0.0.0.0.0.0");
+my $sql_driver_ver = sprintf $sql_ver_fmt, split (/\./, "$DBD::Oracle::VERSION.0.0.0.0.0.0");
sub sql_dbms_version {
my $dbh = shift;
local $^W; # for ora_server_version having too few parts
- return sprintf $fmt, @{DBD::Oracle::db::ora_server_version($dbh)};
+ return sprintf $sql_ver_fmt, @{DBD::Oracle::db::ora_server_version($dbh)};
}
+
+my @Keywords = qw(
+ACCESS
+AUDIT
+BFILE
+BLOB
+CLOB
+CLUSTER
+COMMENT
+COMPRESS
+EXCLUSIVE
+FILE
+IDENTIFIED
+INCREMENT
+INITIAL
+LOCK
+LONG
+MAXEXTENTS
+MINUS
+MODE
+MODIFY
+NCLOB
+NOAUDIT
+NOCOMPRESS
+NOWAIT
+NUMBER
+OFFLINE
+ONLINE
+PCTFREE
+RAW
+RENAME
+RESOURCE
+ROW
+ROWID
+ROWLABEL
+ROWNUM
+SHARE
+START
+SUCCESSFUL
+SYNONYM
+SYSDATE
+TRIGGER
+UID
+VALIDATE
+VARCHAR
+);
+
+
+sub sql_keywords {
+
+ return join ',', @Keywords;
+
+}
+
+
+
sub sql_data_source_name {
my $dbh = shift;
- return 'dbi:Oracle:' . $dbh->{Name};
+ return "dbi:$sql_driver:" . $dbh->{Name};
}
+
sub sql_user_name {
my $dbh = shift;
- # XXX OPS$
- return $dbh->{CURRENT_USER};
+ # CURRENT_USER is a non-standard attribute, probably undef
+ # Username is a standard DBI attribute
+ return $dbh->{CURRENT_USER} || $dbh->{Username};
}
-%info = (
- 117 => 0 # SQL_ALTER_DOMAIN
-, 114 => 2 # SQL_CATALOG_LOCATION
-, 10003 => 'N' # SQL_CATALOG_NAME
-, 41 => '@' # SQL_CATALOG_NAME_SEPARATOR
-, 42 => 'Database Link' # SQL_CATALOG_TERM
-, 87 => 'Y' # SQL_COLUMN_ALIAS
-, 22 => 1 # SQL_CONCAT_NULL_BEHAVIOR
-, 127 => 0 # SQL_CREATE_ASSERTION
-, 130 => 0 # SQL_CREATE_DOMAIN
-, 2 => \&sql_data_source_name # SQL_DATA_SOURCE_NAME
-, 17 => 'Oracle' # SQL_DBMS_NAME
-, 18 => \&sql_dbms_version # SQL_DBMS_VERSION
-, 6 => 'DBD/Oracle.pm' # SQL_DRIVER_NAME
-, 7 => $sql_driver_ver # SQL_DRIVER_VER
-, 136 => 0 # SQL_DROP_ASSERTION
-, 139 => 0 # SQL_DROP_DOMAIN
-, 28 => 1 # SQL_IDENTIFIER_CASE
-, 29 => '"' # SQL_IDENTIFIER_QUOTE_CHAR
-, 34 => 0 # SQL_MAX_CATALOG_NAME_LEN
-, 30 => 30 # SQL_MAX_COLUMN_NAME_LEN
-, 10005 => 30 # SQL_MAX_IDENTIFIER_LEN
-, 32 => 30 # SQL_MAX_OWNER_NAME_LEN
-, 34 => 0 # SQL_MAX_QUALIFIER_NAME_LEN
-, 32 => 30 # SQL_MAX_SCHEMA_NAME_LEN
-, 35 => 30 # SQL_MAX_TABLE_NAME_LEN
-, 107 => 30 # SQL_MAX_USER_NAME_LEN
-, 90 => 'N' # SQL_ORDER_BY_COLUMNS_IN_SELECT
-, 39 => 'Owner' # SQL_OWNER_TERM
-, 40 => 'Procedure' # SQL_PROCEDURE_TERM
-, 114 => 2 # SQL_QUALIFIER_LOCATION
-, 41 => '@' # SQL_QUALIFIER_NAME_SEPARATOR
-, 42 => 'Database Link' # SQL_QUALIFIER_TERM
-, 93 => 3 # SQL_QUOTED_IDENTIFIER_CASE
-, 39 => 'Owner' # SQL_SCHEMA_TERM
-, 14 => '\\' # SQL_SEARCH_PATTERN_ESCAPE
-, 13 => sub {"$_[0]->{Name}"} # SQL_SERVER_NAME
-, 94 => '$#' # SQL_SPECIAL_CHARACTERS
-, 45 => 'Table' # SQL_TABLE_TERM
-, 46 => 3 # SQL_TXN_CAPABLE
-, 47 => \&sql_user_name # SQL_USER_NAME
+
+our %info = (
+ 20 => 'Y', # SQL_ACCESSIBLE_PROCEDURES
+ 19 => 'Y', # SQL_ACCESSIBLE_TABLES
+ 0 => 0, # SQL_ACTIVE_CONNECTIONS
+ 116 => 0, # SQL_ACTIVE_ENVIRONMENTS
+ 1 => 0, # SQL_ACTIVE_STATEMENTS
+ 169 => 64, # SQL_AGGREGATE_FUNCTIONS
+ 117 => 0, # SQL_ALTER_DOMAIN
+ 86 => 1029739, # SQL_ALTER_TABLE
+ 10021 => 2, # SQL_ASYNC_MODE
+ 120 => 0, # SQL_BATCH_ROW_COUNT
+ 121 => 0, # SQL_BATCH_SUPPORT
+ 82 => 88, # SQL_BOOKMARK_PERSISTENCE
+ 114 => 2, # SQL_CATALOG_LOCATION
+ 10003 => 'N', # SQL_CATALOG_NAME
+ 41 => '@', # SQL_CATALOG_NAME_SEPARATOR
+ 42 => 'Database Link', # SQL_CATALOG_TERM
+ 92 => 3, # SQL_CATALOG_USAGE
+ 10004 => '', # SQL_COLLATING_SEQUENCE
+ 10004 => '', # SQL_COLLATION_SEQ
+ 87 => 'Y', # SQL_COLUMN_ALIAS
+ 22 => 1, # SQL_CONCAT_NULL_BEHAVIOR
+ 53 => 10518015, # SQL_CONVERT_BIGINT
+ 54 => 10775839, # SQL_CONVERT_BINARY
+ 55 => 10518015, # SQL_CONVERT_BIT
+ 56 => 15106047, # SQL_CONVERT_CHAR
+ 57 => 164097, # SQL_CONVERT_DATE
+ 58 => 10518015, # SQL_CONVERT_DECIMAL
+ 59 => 10514943, # SQL_CONVERT_DOUBLE
+ 60 => 10514943, # SQL_CONVERT_FLOAT
+ 48 => 1, # SQL_CONVERT_FUNCTIONS
+ 173 => 0, # SQL_CONVERT_GUID
+ 61 => 10518015, # SQL_CONVERT_INTEGER
+ 123 => 0, # SQL_CONVERT_INTERVAL_DAY_TIME
+ 124 => 0, # SQL_CONVERT_INTERVAL_YEAR_MONTH
+ 71 => 265216, # SQL_CONVERT_LONGVARBINARY
+ 62 => 14680833, # SQL_CONVERT_LONGVARCHAR
+ 63 => 10518015, # SQL_CONVERT_NUMERIC
+ 64 => 10514943, # SQL_CONVERT_REAL
+ 65 => 10518015, # SQL_CONVERT_SMALLINT
+ 66 => 0, # SQL_CONVERT_TIME
+ 67 => 10718465, # SQL_CONVERT_TIMESTAMP
+ 68 => 10518015, # SQL_CONVERT_TINYINT
+ 69 => 10775839, # SQL_CONVERT_VARBINARY
+ 70 => 15204351, # SQL_CONVERT_VARCHAR
+ 122 => 15106047, # SQL_CONVERT_WCHAR
+ 125 => 14680833, # SQL_CONVERT_WLONGVARCHAR
+ 126 => 15106047, # SQL_CONVERT_WVARCHAR
+ 74 => 2, # SQL_CORRELATION_NAME
+ 127 => 0, # SQL_CREATE_ASSERTION
+ 128 => 0, # SQL_CREATE_CHARACTER_SET
+ 129 => 0, # SQL_CREATE_COLLATION
+ 130 => 0, # SQL_CREATE_DOMAIN
+ 131 => 3, # SQL_CREATE_SCHEMA
+ 132 => 14305, # SQL_CREATE_TABLE
+ 133 => 0, # SQL_CREATE_TRANSLATION
+ 134 => 3, # SQL_CREATE_VIEW
+ 23 => 2, # SQL_CURSOR_COMMIT_BEHAVIOR
+ 24 => 2, # SQL_CURSOR_ROLLBACK_BEHAVIOR
+ 10001 => 1, # SQL_CURSOR_SENSITIVITY
+ 16 => 'DEVEL', # SQL_DATABASE_NAME
+ 2 => \&sql_data_source_name, # SQL_DATA_SOURCE_NAME
+ 25 => 'N', # SQL_DATA_SOURCE_READ_ONLY
+ 119 => 0, # SQL_DATETIME_LITERALS
+ 17 => 'Oracle', # SQL_DBMS_NAME
+ 18 => \&sql_dbms_version, # SQL_DBMS_VER
+ 18 => \&sql_dbms_version, # SQL_DBMS_VERSION
+ 170 => 3, # SQL_DDL_INDEX
+ 26 => 8, # SQL_DEFAULT_TRANSACTION_ISOLATION
+ 26 => 8, # SQL_DEFAULT_TXN_ISOLATION
+ 10002 => 'Y', # SQL_DESCRIBE_PARAMETER
+ 171 => '03.52.0002.0002', # SQL_DM_VER
+ 3 => 147209344, # SQL_DRIVER_HDBC
+# 135 => undef, # SQL_DRIVER_HDESC
+ 4 => 147212776, # SQL_DRIVER_HENV
+# 76 => undef, # SQL_DRIVER_HLIB
+# 5 => undef, # SQL_DRIVER_HSTMT
+ 6 => $INC{'DBD/Oracle.pm'}, # SQL_DRIVER_NAME
+ 77 => '03.52', # SQL_DRIVER_ODBC_VER
+ 7 => $sql_driver_ver, # SQL_DRIVER_VER
+ 136 => 0, # SQL_DROP_ASSERTION
+ 137 => 0, # SQL_DROP_CHARACTER_SET
+ 138 => 0, # SQL_DROP_COLLATION
+ 139 => 0, # SQL_DROP_DOMAIN
+ 140 => 0, # SQL_DROP_SCHEMA
+ 141 => 1, # SQL_DROP_TABLE
+ 142 => 0, # SQL_DROP_TRANSLATION
+ 143 => 1, # SQL_DROP_VIEW
+ 144 => 0, # SQL_DYNAMIC_CURSOR_ATTRIBUTES1
+ 145 => 0, # SQL_DYNAMIC_CURSOR_ATTRIBUTES2
+ 27 => 'Y', # SQL_EXPRESSIONS_IN_ORDERBY
+ 8 => 191, # SQL_FETCH_DIRECTION
+ 84 => 0, # SQL_FILE_USAGE
+ 146 => 57345, # SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1
+ 147 => 2183, # SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2
+ 81 => 15, # SQL_GETDATA_EXTENSIONS
+ 88 => 2, # SQL_GROUP_BY
+ 28 => 1, # SQL_IDENTIFIER_CASE
+ 29 => '"', # SQL_IDENTIFIER_QUOTE_CHAR
+ 148 => 3, # SQL_INDEX_KEYWORDS
+ 149 => 65568, # SQL_INFO_SCHEMA_VIEWS
+ 172 => 7, # SQL_INSERT_STATEMENT
+ 73 => 'N', # SQL_INTEGRITY
+ 150 => 0, # SQL_KEYSET_CURSOR_ATTRIBUTES1
+ 151 => 0, # SQL_KEYSET_CURSOR_ATTRIBUTES2
+ 89 => \&sql_keywords, # SQL_KEYWORDS
+ 113 => 'Y', # SQL_LIKE_ESCAPE_CLAUSE
+ 78 => 1, # SQL_LOCK_TYPES
+ 34 => 0, # SQL_MAXIMUM_CATALOG_NAME_LENGTH
+ 97 => 0, # SQL_MAXIMUM_COLUMNS_IN_GROUP_BY
+ 98 => 0, # SQL_MAXIMUM_COLUMNS_IN_INDEX
+ 99 => 0, # SQL_MAXIMUM_COLUMNS_IN_ORDER_BY
+ 100 => 1000, # SQL_MAXIMUM_COLUMNS_IN_SELECT
+ 101 => 1000, # SQL_MAXIMUM_COLUMNS_IN_TABLE
+ 30 => 30, # SQL_MAXIMUM_COLUMN_NAME_LENGTH
+ 1 => 0, # SQL_MAXIMUM_CONCURRENT_ACTIVITIES
+ 31 => 30, # SQL_MAXIMUM_CURSOR_NAME_LENGTH
+ 0 => 0, # SQL_MAXIMUM_DRIVER_CONNECTIONS
+ 10005 => 30, # SQL_MAXIMUM_IDENTIFIER_LENGTH
+ 102 => 0, # SQL_MAXIMUM_INDEX_SIZE
+ 104 => 0, # SQL_MAXIMUM_ROW_SIZE
+ 32 => 30, # SQL_MAXIMUM_SCHEMA_NAME_LENGTH
+ 105 => 0, # SQL_MAXIMUM_STATEMENT_LENGTH
+# 20000 => undef, # SQL_MAXIMUM_STMT_OCTETS
+# 20001 => undef, # SQL_MAXIMUM_STMT_OCTETS_DATA
+# 20002 => undef, # SQL_MAXIMUM_STMT_OCTETS_SCHEMA
+ 106 => 0, # SQL_MAXIMUM_TABLES_IN_SELECT
+ 35 => 30, # SQL_MAXIMUM_TABLE_NAME_LENGTH
+ 107 => 30, # SQL_MAXIMUM_USER_NAME_LENGTH
+ 10022 => 0, # SQL_MAX_ASYNC_CONCURRENT_STATEMENTS
+ 112 => 0, # SQL_MAX_BINARY_LITERAL_LEN
+ 34 => 0, # SQL_MAX_CATALOG_NAME_LEN
+ 108 => 0, # SQL_MAX_CHAR_LITERAL_LEN
+ 97 => 0, # SQL_MAX_COLUMNS_IN_GROUP_BY
+ 98 => 0, # SQL_MAX_COLUMNS_IN_INDEX
+ 99 => 0, # SQL_MAX_COLUMNS_IN_ORDER_BY
+ 100 => 1000, # SQL_MAX_COLUMNS_IN_SELECT
+ 101 => 1000, # SQL_MAX_COLUMNS_IN_TABLE
+ 30 => 30, # SQL_MAX_COLUMN_NAME_LEN
+ 1 => 0, # SQL_MAX_CONCURRENT_ACTIVITIES
+ 31 => 30, # SQL_MAX_CURSOR_NAME_LEN
+ 0 => 0, # SQL_MAX_DRIVER_CONNECTIONS
+ 10005 => 30, # SQL_MAX_IDENTIFIER_LEN
+ 102 => 0, # SQL_MAX_INDEX_SIZE
+ 32 => 30, # SQL_MAX_OWNER_NAME_LEN
+ 33 => 92, # SQL_MAX_PROCEDURE_NAME_LEN
+ 34 => 0, # SQL_MAX_QUALIFIER_NAME_LEN
+ 104 => 0, # SQL_MAX_ROW_SIZE
+ 103 => 'N', # SQL_MAX_ROW_SIZE_INCLUDES_LONG
+ 32 => 30, # SQL_MAX_SCHEMA_NAME_LEN
+ 105 => 0, # SQL_MAX_STATEMENT_LEN
+ 106 => 0, # SQL_MAX_TABLES_IN_SELECT
+ 35 => 30, # SQL_MAX_TABLE_NAME_LEN
+ 107 => 30, # SQL_MAX_USER_NAME_LEN
+ 37 => 'Y', # SQL_MULTIPLE_ACTIVE_TXN
+ 36 => 'Y', # SQL_MULT_RESULT_SETS
+ 111 => 'N', # SQL_NEED_LONG_DATA_LEN
+ 75 => 1, # SQL_NON_NULLABLE_COLUMNS
+ 85 => 1, # SQL_NULL_COLLATION
+ 49 => 16646015, # SQL_NUMERIC_FUNCTIONS
+ 9 => 1, # SQL_ODBC_API_CONFORMANCE
+ 152 => 3, # SQL_ODBC_INTERFACE_CONFORMANCE
+ 12 => 0, # SQL_ODBC_SAG_CLI_CONFORMANCE
+ 15 => 1, # SQL_ODBC_SQL_CONFORMANCE
+ 73 => 'N', # SQL_ODBC_SQL_OPT_IEF
+ 10 => '03.52', # SQL_ODBC_VER
+ 115 => 127, # SQL_OJ_CAPABILITIES
+ 90 => 'N', # SQL_ORDER_BY_COLUMNS_IN_SELECT
+ 38 => 'Y', # SQL_OUTER_JOINS
+ 115 => 127, # SQL_OUTER_JOIN_CAPABILITIES
+ 39 => 'Owner', # SQL_OWNER_TERM
+ 91 => 31, # SQL_OWNER_USAGE
+ 153 => 2, # SQL_PARAM_ARRAY_ROW_COUNTS
+ 154 => 3, # SQL_PARAM_ARRAY_SELECTS
+ 80 => 7, # SQL_POSITIONED_STATEMENTS
+ 79 => 1, # SQL_POS_OPERATIONS
+ 21 => 'Y', # SQL_PROCEDURES
+ 40 => 'Procedure', # SQL_PROCEDURE_TERM
+ 114 => 2, # SQL_QUALIFIER_LOCATION
+ 41 => '@', # SQL_QUALIFIER_NAME_SEPARATOR
+ 42 => 'Database Link', # SQL_QUALIFIER_TERM
+ 92 => 3, # SQL_QUALIFIER_USAGE
+ 93 => 3, # SQL_QUOTED_IDENTIFIER_CASE
+ 11 => 'Y', # SQL_ROW_UPDATES
+ 39 => 'Owner', # SQL_SCHEMA_TERM
+ 91 => 31, # SQL_SCHEMA_USAGE
+ 43 => 7, # SQL_SCROLL_CONCURRENCY
+ 44 => 19, # SQL_SCROLL_OPTIONS
+ 14 => '\\', # SQL_SEARCH_PATTERN_ESCAPE
+ 13 => sub {"$_[0]->{Name}"}, # SQL_SERVER_NAME
+ 94 => '$#', # SQL_SPECIAL_CHARACTERS
+ 155 => 0, # SQL_SQL92_DATETIME_FUNCTIONS
+ 156 => 0, # SQL_SQL92_FOREIGN_KEY_DELETE_RULE
+ 157 => 0, # SQL_SQL92_FOREIGN_KEY_UPDATE_RULE
+ 158 => 16, # SQL_SQL92_GRANT
+ 159 => 0, # SQL_SQL92_NUMERIC_VALUE_FUNCTIONS
+ 160 => 7687, # SQL_SQL92_PREDICATES
+ 161 => 0, # SQL_SQL92_RELATIONAL_JOIN_OPERATORS
+ 162 => 0, # SQL_SQL92_REVOKE
+ 163 => 0, # SQL_SQL92_ROW_VALUE_CONSTRUCTOR
+ 164 => 0, # SQL_SQL92_STRING_FUNCTIONS
+ 165 => 1, # SQL_SQL92_VALUE_EXPRESSIONS
+ 118 => 1, # SQL_SQL_CONFORMANCE
+ 166 => 3, # SQL_STANDARD_CLI_CONFORMANCE
+ 167 => 57935, # SQL_STATIC_CURSOR_ATTRIBUTES1
+ 168 => 4231, # SQL_STATIC_CURSOR_ATTRIBUTES2
+ 83 => 0, # SQL_STATIC_SENSITIVITY
+ 50 => 8355839, # SQL_STRING_FUNCTIONS
+ 95 => 31, # SQL_SUBQUERIES
+ 51 => 7, # SQL_SYSTEM_FUNCTIONS
+ 45 => 'Table', # SQL_TABLE_TERM
+ 109 => 0, # SQL_TIMEDATE_ADD_INTERVALS
+ 110 => 0, # SQL_TIMEDATE_DIFF_INTERVALS
+ 52 => 1023999, # SQL_TIMEDATE_FUNCTIONS
+ 46 => 3, # SQL_TRANSACTION_CAPABLE
+ 72 => 10, # SQL_TRANSACTION_ISOLATION_OPTION
+ 46 => 3, # SQL_TXN_CAPABLE
+ 72 => 10, # SQL_TXN_ISOLATION_OPTION
+ 96 => 3, # SQL_UNION
+ 96 => 3, # SQL_UNION_STATEMENT
+ 47 => \&sql_user_name, # SQL_USER_NAME
+ 10000 => 1995, # SQL_XOPEN_CLI_YEAR
);
1;
+
+__END__
0  lib/DBD/Oracle/Object.pm 100755 → 100644
View
File mode changed
0  mkta.pl 100755 → 100644
View
File mode changed
0  oci.def 100755 → 100644
View
File mode changed
157 oci8.c 100755 → 100644
View
@@ -333,6 +333,9 @@ oci_hdtype_name(ub4 hdtype)
case OCI_HTYPE_DESCRIBE: return "OCI_HTYPE_DESCRIBE";
case OCI_HTYPE_SERVER: return "OCI_HTYPE_SERVER";
case OCI_HTYPE_SESSION: return "OCI_HTYPE_SESSION";
+ case OCI_HTYPE_CPOOL: return "OCI_HTYPE_CPOOL";
+ case OCI_HTYPE_SPOOL: return "OCI_HTYPE_SPOOL";
+ /*case OCI_HTYPE_AUTHINFO: return "OCI_HTYPE_AUTHINFO";*/
/* Descriptors */
case OCI_DTYPE_LOB: return "OCI_DTYPE_LOB";
case OCI_DTYPE_SNAP: return "OCI_DTYPE_SNAP";
@@ -409,8 +412,10 @@ oci_attr_name(ub4 attr)
SV *sv;
switch (attr) {
/*=============================Attribute Types===============================*/
-
-
+#ifdef ORA_OCI_112
+ case OCI_ATTR_PURITY: return "OCI_ATTR_PURITY"; /* for DRCP session purity */