Hello Reinhard,

you could submit e.g. "Select *  from SYSCAT.PACKAGES order by
last_bind_time desc fetch first 20 rows only" which will show you the last
20 packages bound against the database you are connected to.
See the attached example from one of my database's where I did run a
db2look against to get some ddl from it.
If you run your normal bind-utility from the db2-command-line you will see
with the above mentioned statement what the name of your package is. It's
sometimes a very cryptical name.
Then you can do your single one.tick.perl.script and again my sql. If you
have a different last_bind_time it really did work.

(See attached file: package.txt)

 Mfg
Manfred


                                                                                       
                                        
                    Reinhard Pagitsch                                                  
                                        
                    <[EMAIL PROTECTED]        An:     [EMAIL PROTECTED]                
                        
                    pyrus.com>                        Kopie:  [EMAIL PROTECTED]        
                                       
                                                      Thema:  Re: Antwort: Re: 
Antwort: DBD::DB2 and bind                      
                    04.02.2004 16:23                                                   
                                        
                                                                                       
                                        
                                                                                       
                                        




Hello Manfred,

[EMAIL PROTECTED] wrote:

> Hello Reinhard,
>
> it is interesting to hear that bind does work in single ticks.
>
> Being a db2-dba and a perl-beginner I would never have tried to do that.
>
> As far as I understand the development of db2-related
> client-server-software I really doubt that it really works.

Maybe that it not realy works, I only tryed it and did not got a DBI error
message. So I thought it would work, but I did not checked what happens in
the database.

>
>
> Bind is a very db2-specific-utility that doesn't exist on other DB-Server
> like oracle, ms-sql  or sybase.

Sure, you are right, I know that.

>
>
> Therefore alone I doubt that standard dbi and dbd::db2 support it.
>
> If it would, there would be a note in the description of dbd::db2 in the
> actual programming with perl dbi ( I just checked the german version !)
All
> it talks about is data-definition and data-manipulation-statements. Here
> they talk about  binding of ( external or host- ) Parameter to your
> perl/sql-statements. Don't mix this. It is something different.

No I will not mix it, I understand, or belive that I understand it, the
differences.

>
>
> It may be possible that there is one or more specific dbi- or dbix-Module
> supporting the way of using the bind-utility you are heading for.

I use Activestate Perl v5.6.1 MSWin32-x86-multi-thread, DBI version 1.35
and
DBD version 0.76.

>
>
> DB2-Bind-Uitility needs  the bind-file to transport the executable-part
of
> the client-sql-statements to the db2-server. This concept is not there in
> the other dbms or done somehow inline the
> software-(-pre-)compilation-process on the client-side. If it is
> unnecessary  when using sql-procedure-language I just did not know
already.
> Here your "q:\test\pputdb.bnd" points to a path on your client machine,
> which must not be identical on your server. Any sql-statement you call
gets
> executed on the server and not on the client. How to find your bind-file
> there?

I do not realy know what the pputdb.bnd contains. We are developing
programs
with which you can insert AFP or PDF documents to DB2, Oracle, Sybase,
MSSQL Server database,
and get them also back, f.e. in a web browser.
For DB2 I need the pputdb.bnd file to get not a "time stamp conflict" error
message if I
insert the documents.


>
>
> To really understand what you are doing, I need to know more about your
> environment.

Please tell me what you want to know, and I will try to explain it.

>
> If binding is successful you must find updates in your syspackages-table
> with a correlating timestamp.

Please can you tell me in which tables I shall look for that? So I will
write
a smal script to use the bind command via DBD::DB2 with the single ticks,
and look
in them.

I have to say  I am not a DB2 expert, I can only use it.

>
>
> Mit freundlichen Gruessen / Best regards
> >From Germany to Austria
> Manfred Beilfuss
>
> Deutsche Verm�gensberatung AG
> IT_Systemmanagement , DBA
> M�nchenerstr. 1
> 60329 Frankfurt
> Tel.: +49 (69) 2384 - 639
> Fax: +49 (69) 2384 - 329
> Mailto:[EMAIL PROTECTED]
>
>
>                     Reinhard Pagitsch
>                     <[EMAIL PROTECTED]        An:
[EMAIL PROTECTED]
>                     pyrus.com>                        Kopie:
[EMAIL PROTECTED]
>                                                       Thema:  Re:
Antwort: DBD::DB2 and bind
>                     04.02.2004 14:11
>
>
>
> Hello Manfred,
>
> [EMAIL PROTECTED] wrote:
>
> > Hello,
> >
> > as I understand DBI::DB2 it is for use with SQL-Statements and not for
> use
> > with external utilities like bind is one!
>
> I do not agree, because I can also use the bind statement in my DB2
Command
> Window.
> I have only to write: bind q:\test\pputdb.bnd isolation cs qualifier ISIS
> and execute it. And the funny thing is if I put the statement into single
> ticks like
> 'bind ...'
> it works with the DBD::DB2 driver.
>
> >
> >
> > You might want to generate your bind-Statements using DBI::DB2!
> > But to execute them you should invoke any kind of external OS-Shell (
> e.g.
> > system() ) and process your bind-Statements inclusive any needed
>
> At this time I do so, I use "db2cmd" for it, but the problem is that I
have
> to
> use a sleep(), because often the connection is very slow and perl does
not
> wait
> for the if the db2cmd was finished, because I pass multible system
commands
> to
> db2cmd.
>
> >
> > db2-Command-line-interfaces on your respective operating system.
> >
> > Mit freundlichen Gruessen / Best regards
> >
> > Manfred Beilfuss
> >
> > 60329 Frankfurt
>
> mit freundlichen Gr��en,
> with my best regards,
> Reinhard
>
> P.S: Greetings from Austria :-)
>
> >
> >
> >                     Reinhard Pagitsch
> >                     <[EMAIL PROTECTED]        An:
> [EMAIL PROTECTED]
> >                     pyrus.com>                        Kopie:
> >                                                       Thema:  DBD::DB2
> and bind
> >                     04.02.2004 13:21
> >
> >
> >
> > Hello,
> >
> > Have someone of you expirence with DBD::DB2? I want to pass a bind
> > statement
> > to my DB2 on NT, but everytime I get error messages:
> > DBD::DB2::st execute failed: [IBM][CLI Driver][DB2/NT] SQL0007N  The
> > character "
> > \" following "bind Q:" is not valid.  SQLSTATE=42601
> > DBD::DB2::st execute failed: [IBM][CLI Driver][DB2/NT] SQL0007N  The
> > character "
> > \" following "bind Q:" is not valid.  SQLSTATE=42601
> >
> > I want to pass the following statement:
> > bind q:\test\pputdb.bnd isolation cs qualifier ISIS
> >
> > If I use it without a path then DBI nags the point in pputdb.bnd.
> > I tryed it the line with \\ and / but nothin helps.
> > Only if I put the statement into a variable with single ticks it works:
> > like $var = 'bind q:\test\pputdb.bnd isolation cs qualifier ISIS';
> >
> > Can someone help me?
> >
> > Thank you,
> > Reinhard

mit freundlichen Gr��en,
with my best regards,
Reinhard

--
QA
ISIS Information Systems
Austria tel: (+43) 2236 27551 150  Fax: 2236 21081
Visit our web site http://www.isis-papyrus.com





Attachment: package.txt
Description: Binary data

Reply via email to