RE: time of prepare - solved

2012-02-24 Thread Howard, Chris
Found my problem.  
Sorry to bother.

I ran part and pieces from sqlplus and determined that
part of the code to set role had a meaning change
between Oracle 8 and Oracle 9.  We went from 8 to 11
so that explains that.

I believe I have it working again.





-Original Message-
From: Howard, Chris [mailto:howa...@prpa.org] 
Sent: Friday, February 24, 2012 1:14 PM
To: 'dbi-users@perl.org'
Subject: time of prepare ?

I have a DBD::Oracle script which needs some help.

I have other DBD::Oracle scripts working ok, so I think
my installation is fine.  

This particular script attempts to integrate into a larger
application's job security features.

The application vendor supplied me with some wrapped procedures
and an outline for how to make this work.  And I used
it in the past.  But we recently moved to Oracle 11
and the script no longer works.

The tricky part uses a PL/SQL block to run a stored
procedure which figures out what "role" should be in play
for this particular user when running this particular job.
It then does a dbms_session.set_role, and away we go.

That all seems to work, as far as I can tell.  But
I am failing on a later prepared select of a table
for which I need that role's permissions.

The prepare statement occurs in the file after the
role setting statement.

My question is:  is there some forward-in-time
action going on which causes the prepare to happen
before my role is properly set?  And if so, how
do I defeat that feature?

Chris


time of prepare ?

2012-02-24 Thread Howard, Chris
I have a DBD::Oracle script which needs some help.

I have other DBD::Oracle scripts working ok, so I think
my installation is fine.  

This particular script attempts to integrate into a larger
application's job security features.

The application vendor supplied me with some wrapped procedures
and an outline for how to make this work.  And I used
it in the past.  But we recently moved to Oracle 11
and the script no longer works.

The tricky part uses a PL/SQL block to run a stored
procedure which figures out what "role" should be in play
for this particular user when running this particular job.
It then does a dbms_session.set_role, and away we go.

That all seems to work, as far as I can tell.  But
I am failing on a later prepared select of a table
for which I need that role's permissions.

The prepare statement occurs in the file after the
role setting statement.

My question is:  is there some forward-in-time
action going on which causes the prepare to happen
before my role is properly set?  And if so, how
do I defeat that feature?

Chris


Windows 7 64 bit DB2

2012-02-24 Thread Daniel L Murphy



Upgrading from 32 bit XP to Windows 7 64 bit use Perl and DB2 DBI
interface.

Several weeks ago I downloaded binaries from ActiveState Perl for 64 bit OS
(Windows 7). I have 64 Bit DB2 9.7 installed.
I can't seem to find a DBI version that works with Perl and DB2 64 bit.
There appears to be issues with make etc.. on trying to install
the DBI modules.

Is there a Perl 64 bit Windows 7 DBI install that currently works.?



Dan



RE: DBI-1.57 compile errors

2012-02-24 Thread Sergey Prilutsky

Hi Johnathan,

  New version did work, thank you for your suggestion

Thanks

  Sergey Prilutsky 

From: jonathan.leff...@gmail.com
Date: Fri, 24 Feb 2012 08:14:42 -0800
Subject: Re: DBI-1.57 compile errors
To: sprilut...@hotmail.com
CC: dbi-users@perl.org



On Thu, Feb 23, 2012 at 09:10, Sergey Prilutsky  wrote:


Ran into the problem compiling DBI-1.57 over Perl 5.14.2 on SuSE SLES11 SP1 
server running on x86 64bit.

DBI 1.57 was released in mid-2007, if my records are accurate.  The current 
version is 1.617.  It is likely just time you updated to a more recent DBI.



 
Please also note, that the base Perl is 5.10.2 and Perl 5.14.2 is installed in 
/usr/local/perl5/5.14.2


-- 
Jonathan Leffler   #include 


Guardian of DBD::Informix - v2011.0612 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be 
amused."
  

Re: DBI-1.57 compile errors

2012-02-24 Thread Jonathan Leffler
On Thu, Feb 23, 2012 at 09:10, Sergey Prilutsky wrote:

> Ran into the problem compiling DBI-1.57 over Perl 5.14.2 on SuSE SLES11
> SP1 server running on x86 64bit.
>

DBI 1.57 was released in mid-2007, if my records are accurate.  The current
version is 1.617.  It is likely just time you updated to a more recent DBI.



> Please also note, that the base Perl is 5.10.2 and Perl 5.14.2 is
> installed in /usr/local/perl5/5.14.2
>



-- 
Jonathan Leffler   #include 
Guardian of DBD::Informix - v2011.0612 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."


DBI-1.57 compile errors

2012-02-24 Thread Sergey Prilutsky

Hi DBI guru,

Ran into the problem compiling DBI-1.57 over Perl 5.14.2 on SuSE SLES11 SP1 
server running on x86 64bit.

Please also note, that the base Perl is 5.10.2 and Perl 5.14.2 is installed in 
/usr/local/perl5/5.14.2

Any help is greatly appreciated.


tsles11-elsarch:/tmp/DBI-1.57 # make
/usr/local/perl5/5.14.2/bin/perl -MExtUtils::Command -e 'mkpath' -- blib/lib/DBI
rm -f blib/lib/DBI/Changes.pm
cp Changes blib/lib/DBI/Changes.pm
/usr/local/perl5/5.14.2/bin/perl -MExtUtils::Command -e 'mkpath' -- blib/lib/DBI
rm -f blib/lib/DBI/Roadmap.pm
cp Roadmap.pod blib/lib/DBI/Roadmap.pm
cp Driver_xst.h blib/arch/auto/DBI/Driver_xst.h
cp lib/DBI/Gofer/Response.pm blib/lib/DBI/Gofer/Response.pm
cp lib/DBD/Proxy.pm blib/lib/DBD/Proxy.pm
cp lib/DBI/Util/_accessor.pm blib/lib/DBI/Util/_accessor.pm
cp lib/DBI/Gofer/Transport/Base.pm blib/lib/DBI/Gofer/Transport/Base.pm
cp lib/DBD/DBM.pm blib/lib/DBD/DBM.pm
cp DBIXS.h blib/arch/auto/DBI/DBIXS.h
cp Roadmap.pod blib/lib/Roadmap.pod
cp dbixs_rev.pl blib/lib/dbixs_rev.pl
cp lib/DBI/Const/GetInfoType.pm blib/lib/DBI/Const/GetInfoType.pm
cp lib/DBI/DBD/Metadata.pm blib/lib/DBI/DBD/Metadata.pm
cp lib/DBI/Const/GetInfo/ODBC.pm blib/lib/DBI/Const/GetInfo/ODBC.pm
cp lib/DBD/Gofer/Transport/pipeone.pm blib/lib/DBD/Gofer/Transport/pipeone.pm
cp lib/DBI/ProfileDumper/Apache.pm blib/lib/DBI/ProfileDumper/Apache.pm
cp Driver.xst blib/arch/auto/DBI/Driver.xst
cp lib/DBD/File.pm blib/lib/DBD/File.pm
cp lib/DBI/ProfileSubs.pm blib/lib/DBI/ProfileSubs.pm
cp lib/DBD/NullP.pm blib/lib/DBD/NullP.pm
cp dbi_sql.h blib/arch/auto/DBI/dbi_sql.h
cp lib/DBD/Gofer.pm blib/lib/DBD/Gofer.pm
cp dbivport.h blib/arch/auto/DBI/dbivport.h
cp dbd_xsh.h blib/arch/auto/DBI/dbd_xsh.h
cp dbixs_rev.h blib/arch/auto/DBI/dbixs_rev.h
cp lib/DBD/Gofer/Transport/Base.pm blib/lib/DBD/Gofer/Transport/Base.pm
cp lib/DBI/FAQ.pm blib/lib/DBI/FAQ.pm
cp lib/DBD/Gofer/Policy/rush.pm blib/lib/DBD/Gofer/Policy/rush.pm
cp lib/DBI/SQL/Nano.pm blib/lib/DBI/SQL/Nano.pm
cp lib/DBI/Const/GetInfo/ANSI.pm blib/lib/DBI/Const/GetInfo/ANSI.pm
cp lib/DBI/Gofer/Request.pm blib/lib/DBI/Gofer/Request.pm
cp lib/DBD/Gofer/Transport/stream.pm blib/lib/DBD/Gofer/Transport/stream.pm
cp lib/DBD/Gofer/Policy/classic.pm blib/lib/DBD/Gofer/Policy/classic.pm
cp goferperf.pl blib/lib/goferperf.pl
cp lib/DBI/Gofer/Transport/stream.pm blib/lib/DBI/Gofer/Transport/stream.pm
cp lib/DBI/Const/GetInfoReturn.pm blib/lib/DBI/Const/GetInfoReturn.pm
cp DBI.pm blib/lib/DBI.pm
cp lib/DBD/Gofer/Policy/Base.pm blib/lib/DBD/Gofer/Policy/Base.pm
cp lib/DBD/Sponge.pm blib/lib/DBD/Sponge.pm
cp lib/DBD/Gofer/Policy/pedantic.pm blib/lib/DBD/Gofer/Policy/pedantic.pm
cp lib/DBI/Gofer/Transport/pipeone.pm blib/lib/DBI/Gofer/Transport/pipeone.pm
cp lib/DBI/W32ODBC.pm blib/lib/DBI/W32ODBC.pm
cp lib/DBD/Gofer/Transport/null.pm blib/lib/DBD/Gofer/Transport/null.pm
cp lib/Bundle/DBI.pm blib/lib/Bundle/DBI.pm
cp TASKS.pod blib/lib/TASKS.pod
cp lib/DBI/Profile.pm blib/lib/DBI/Profile.pm
cp lib/DBI/ProfileDumper.pm blib/lib/DBI/ProfileDumper.pm
cp lib/DBI/ProxyServer.pm blib/lib/DBI/ProxyServer.pm
cp dbipport.h blib/arch/auto/DBI/dbipport.h
cp lib/DBI/Gofer/Execute.pm blib/lib/DBI/Gofer/Execute.pm
cp lib/DBI/DBD.pm blib/lib/DBI/DBD.pm
cp lib/Win32/DBIODBC.pm blib/lib/Win32/DBIODBC.pm
cp lib/DBD/ExampleP.pm blib/lib/DBD/ExampleP.pm
cp lib/DBI/PurePerl.pm blib/lib/DBI/PurePerl.pm
cp lib/DBI/ProfileData.pm blib/lib/DBI/ProfileData.pm
/usr/local/perl5/5.14.2/bin/perl -p -e "s/~DRIVER~/Perl/g" ./Driver.xst > 
Perl.xsi
/usr/local/perl5/5.14.2/bin/perl 
/usr/local/perl5/5.14.2/lib/5.14.2/ExtUtils/xsubpp  -typemap 

/usr/local/perl5/5.14.2/lib/5.14.2/ExtUtils/typemap -typemap typemap  Perl.xs > 
Perl.xsc && mv Perl.xsc Perl.c
gcc -c   -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include 
-D_LARGEFILE_SOURCE 

-D_FILE_OFFSET_BITS=64 -O2   -DVERSION=\"1.57\" -DXS_VERSION=\"1.57\" -fPIC 

"-I/usr/local/perl5/5.14.2/lib/5.14.2/x86_64-linux/CORE"  -W -Wall 
-Wpointer-arith -Wbad-function-cast 

-Wno-comment -Wno-sign-compare -Wno-cast-qual -Wmissing-noreturn 
-Wno-unused-parameter -DDBI_NO_THREADS Perl.c
In file included from Perl.c:114:
Driver_xst.h: In function âdbixst_bounce_methodâ:
Driver_xst.h:35: error: âsv_undefâ undeclared (first use in this function)
Driver_xst.h:35: error: (Each undeclared identifier is reported only once
Driver_xst.h:35: error: for each function it appears in.)
Driver_xst.h: In function âdbdxst_fetchall_arrayrefâ:
Driver_xst.h:94: error: âsv_undefâ undeclared (first use in this function)
./Perl.xsi: In function âXS_DBD__Perl__dr_discon_all_â:
./Perl.xsi:44: error: âsv_yesâ undeclared (first use in this function)
./Perl.xsi:44: error: âsv_noâ undeclared (first use in this function)
./Perl.xsi: In function âXS_DBD__Perl__db__loginâ:
./Perl.xsi:94: error: âsv_yesâ undeclared (first use in this function)
./Perl.xsi:94: error: âsv_noâ undeclared (first use in this function)
./Perl.xsi: In function âXS_DBD__Perl__db_last_insert_idâ:
./Perl.xsi:246: