sorry my mistake
Sorry, more my mess, wrong installation of package. Sorry once again!
dbi
Good day! I have always this mistake! I copied few times archive from site and it didn't help:(. Could you tell me how to solve this problem Can't load 'C:/WINNT/system32/inetsrv/perl/lib/auto/DBI/DBI.dll' for module DBI: load_file:The specified module could not be found at C:/WINNT/system32/inetsrv/perl/lib/DynaLoader.pm line 229. at C:/WINNT/system32/inetsrv/perl/lib/DBI.pm line 255 BEGIN failed--compilation aborted at C:/WINNT/system32/inetsrv/perl/lib/DBI.pm line 255. Compilation failed in require at C:\Inetpub\wwwroot\documentation\examples\perl\dbi\dbi.cgi line 3. BEGIN failed--compilation aborted at C:\Inetpub\wwwroot\documentation\examples\perl\dbi\dbi.cgi line 3. Thank you!:)
Re: getting rid of the Issuing rollback() warning
Let's not get carried away with this thread. When a DBI database handle is destroyed, either by the ref count reaching 0 or by the 'global destruction' that happens when the perl interpreter exits, the DESTROY method is called. The DESTROY method naturally disconnects the database connection. Database APIs differ in how they respond to a 'graceful disconnect' in terms of transactions. Some will trigger a rollback while others, including Oracle, will commit. For databases which commit this means that if the program aborts for any reason and incomplete transaction may be commited. Not good! So the DBI issues a rollback if the DESTROY method is called while the handle is still active and AutoCommit is false. It also issues a warning if Warn is true (as it is by default). All I'm proposing to change is to add a way for drivers to indicate if they are in a transaction or not, and then to use that to disable the warning. Tim.
Performance related question
Hi all, I am busy optimising my code and wonder what DBI does internally. At the moment I have something like this FUNCTION my $lcsr = $db-prepare(EOS) || ataerr::dbprepare($db); BEGIN STORED_PROC.GET_SERVICE_BY_ID(:service_id, :last_modified, :base_prod_id, :person_id, :operator_id); END; EOS $lcsr-bind_param(:service_id, $service_id, 2); $lcsr-bind_param_inout(:last_modified, \$last_modified, 12); $lcsr-bind_param_inout(:base_prod_id, \$base_product_instance_id, 2); $lcsr-bind_param_inout(:person_id, \$person_id, 2); $lcsr-bind_param_inout(:operator_id, \$operator_id, 2); $lcsr-execute() || ataerr::dbexecute($db); $lcsr-finish; END FUNCTION I might be calling this thousands of times. The questions is: will this piece of code prepare the stored procedure for every call? Would it be quicker to prepare the cursor only once and then call only the binds and execute? Or is DBI doing this for me? So the code would be something like INIT_FUNCTION my $lcsr = $db-prepare(EOS) || ataerr::dbprepare($db); BEGIN STORED_PROC.GET_SERVICE_BY_ID(:service_id, :last_modified, :base_prod_id, :person_id, :operator_id); END; EOS END FUNCTION EXEC FUNCTION $lcsr-bind_param(:service_id, $service_id, 2); $lcsr-bind_param_inout(:last_modified, \$last_modified, 12); $lcsr-bind_param_inout(:base_prod_id, \$base_product_instance_id, 2); $lcsr-bind_param_inout(:person_id, \$person_id, 2); $lcsr-bind_param_inout(:operator_id, \$operator_id, 2); $lcsr-execute() || ataerr::dbexecute($db); END FUNCTION TERM FUNCTION $lcsr-finish; END FUNCTION I call INIT and TERM only once If there is a speed improvement, would it be significant? Thanks for any insight, Jeroen
Re: Performance related question
On 02/12/2004 03:27 AM, Lodewijks, Jeroen wrote: So the code would be something like INIT_FUNCTION my $lcsr = $db-prepare(EOS) || ataerr::dbprepare($db); BEGIN STORED_PROC.GET_SERVICE_BY_ID(:service_id, :last_modified, :base_prod_id, :person_id, :operator_id); END; EOS END FUNCTION EXEC FUNCTION $lcsr-bind_param(:service_id, $service_id, 2); $lcsr-bind_param_inout(:last_modified, \$last_modified, 12); $lcsr-bind_param_inout(:base_prod_id, \$base_product_instance_id, 2); $lcsr-bind_param_inout(:person_id, \$person_id, 2); $lcsr-bind_param_inout(:operator_id, \$operator_id, 2); $lcsr-execute() || ataerr::dbexecute($db); END FUNCTION TERM FUNCTION $lcsr-finish; END FUNCTION Finish() is only appropriate for SELECTs when all rows are not being fetch*()ed. I call INIT and TERM only once If there is a speed improvement, would it be significant? It is virtually certain you will see some improvement from preparing only once, probably significant. The only way to know how much is to time it a few hundred times each way. -- Mac :}) ** I usually forward private questions to the appropriate mail list. ** Ask Smarter: http://www.catb.org/~esr/faqs/smart-questions.html Give a hobbit a fish and he eats fish for a day. Give a hobbit a ring and he eats fish for an age.
Re: getting rid of the Issuing rollback() warning
On Thu, 12 Feb 2004 10:55:56 +, Tim Bunce wrote: All I'm proposing to change is to add a way for drivers to indicate if they are in a transaction or not, and then to use that to disable the warning. That reminds me... I haven't used it in years, but I recall that last time I used DBD::ODBC combined with MS-SQL Server, in non-autocommit mode, that I had to do a rollback() after a simple SELECT statement not an update, before a disconnect, or it would complain. It looked like it did quite keep proper track on whether it was inside a transaction or not. Perhaps that has been fixed years ago. -- Bart.
Error in make test for Oracle
I am using the latest DBD::Oracle 1.15 and the latest patch of Oracle software (9.2.0.4) on AIX 5.1. My perl is threaded and build with xlc_r . I keep getting the following error no matter how I make the module # make test PERL_DL_NONLAZY=1 /apps/globaldba/bin/perl -Iblib/arch -Iblib/lib -I/apps/globaldba/lib/perl5/5.6.1/aix-thread-multi -I/apps/globaldba/lib/perl5/5.6.1 -e 'use Test::Harness qw(runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t t/base..Failed to load Oracle extension and/or shared libraries: install_driver(Oracle) failed: Can't load 'blib/arch/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: dlopen: blib/arch/auto/DBD/Oracle/Oracle.so: can't load library blib/arch/auto/DBD/Oracle/Oracle.so50 /local/ora9iaix/oracle/product/9.2.0/lib/libclntsh.a shr.o103 /local/ora9iaix/oracle/product/9.2.0/lib/libclntsh.a shr.ocan't load library /local/ora9iaix/oracle/product/9.2.0/lib/libclntsh.a50 /local/ora9iaix/oracle/product/9.2.0/lib/libclntsh.a at /apps/globaldba/lib/perl5/5.6.1/aix-thread-multi/DynaLoader.pm line 206. at (eval 1) line 3 I am not sure where the references to .s050 and .a50 files are coming from. Any help would be appreciated. Thanks Chris
RE: Performance related question
Jeroen Lodewijks wrote: Would it be quicker to prepare the cursor only once and then call only the binds and execute? Yes. -- Ed Avis [EMAIL PROTECTED]
RE: Performance related question
If there is a speed improvement, would it be significant? It is virtually certain you will see some improvement from preparing only once, probably significant. The only way to know how much is to time it a few hundred times each way. The reason I ask this is: INIT_FUNCTION my $lcsr = $db-prepare(EOS) || ataerr::dbprepare($db); BEGIN STORED_PROC.GET_SERVICE_BY_ID(:service_id, :last_modified, :base_prod_id, :person_id, :operator_id); END; EOS END FUNCTION In this function, if the database handle is the same, the 'text' of the SQL code is static. I am wondering if DBI is internally spotting this and internally caches the prepare (i.e. do not send it again to the database). If so, I don't expect much performance improvement as I am only optimising a few lines of Perl. Thanks, Jeroen
RE: Performance related question
Lodewijks, Jeroen skrev: ...[snip]... If so, I don't expect much performance improvement as I am only optimising a few lines of Perl. In my experience you always get the greatest performance improvements by changing your SQL instead of changing you Perl - often several orders of magnitude greater. Sometimes it takes database schema changes, but even that may be worth the trouble. You should: - reduce the number of round-trips to the database (as a rule of thumb the number of prepares, executes, fetches, commits and rollbacks - dependent on fetch-caching etc) - reduce the number of times the query optimizer has to be invoked (roughly either the number of prepares or the number of executes, dependent on the driver and DBMS) - reduce the amount of data transferred But of course you should *ALWAY* measure before you optimise, otherwise you'll be doing it blindly. Find out where your application is spending it's time - I'll be greatly surprised if it is in the DBI code or the Perl code surrounding it. -- Henrik Tougaard
Re: Error in make test for Oracle
Hello Christopher, The most mistake is that the user logged in has no ORACLE_* and/or LIBPATH environment variables loaded to use the Oracle environment. Try to find it out with env|grep ORACLE and env|grep LIBPATH regards, Reinhard Christopher Singer wrote: I am using the latest DBD::Oracle 1.15 and the latest patch of Oracle software (9.2.0.4) on AIX 5.1. My perl is threaded and build with xlc_r . I keep getting the following error no matter how I make the module # make test PERL_DL_NONLAZY=1 /apps/globaldba/bin/perl -Iblib/arch -Iblib/lib -I/apps/globaldba/lib/perl5/5.6.1/aix-thread-multi -I/apps/globaldba/lib/perl5/5.6.1 -e 'use Test::Harness qw(runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t t/base..Failed to load Oracle extension and/or shared libraries: install_driver(Oracle) failed: Can't load 'blib/arch/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: dlopen: blib/arch/auto/DBD/Oracle/Oracle.so: can't load library blib/arch/auto/DBD/Oracle/Oracle.so50 /local/ora9iaix/oracle/product/9.2.0/lib/libclntsh.a shr.o103 /local/ora9iaix/oracle/product/9.2.0/lib/libclntsh.a shr.ocan't load library /local/ora9iaix/oracle/product/9.2.0/lib/libclntsh.a50 /local/ora9iaix/oracle/product/9.2.0/lib/libclntsh.a at /apps/globaldba/lib/perl5/5.6.1/aix-thread-multi/DynaLoader.pm line 206. at (eval 1) line 3 I am not sure where the references to .s050 and .a50 files are coming from. Any help would be appreciated. Thanks Chris -- QA ISIS Information Systems Austria tel: (+43) 2236 27551 150 Fax: 2236 21081 Visit our web site http://www.isis-papyrus.com
Install MySQL DBI/DBD on Solaris system - perl 5.6.2
Title: Message Does any have experience with installing the DBI/DBD for MySQL and fixing errors within the install? Allen This message may contain proprietary or confidential company information. Any unauthorized use or disclosure is prohibited.
RE: install_driver(ODBC) failed: Can't load
Sorry for the top-posting, the original was in HTML. Note the Access is denied message. It's most likely in the dbi-faq and the DBD::ODBC documentation. Your IIS user IUSR_ doesn't have permission to something. Most likely, at this point, it's the location where you installed Perl modules, but it probably isn't limited to that. You will also need to ensure that user can access your database (i.e. you are using a UNC, the network path is accessible from IUSR_X, etc). Jeff -Original Message- From: Jackson, Mark [mailto:[EMAIL PROTECTED] Sent: Thursday, February 12, 2004 1:50 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: install_driver(ODBC) failed: Can't load I have successfully loaded the Activestate Perl on to a Windows NT4.0 Server with 6a service pack with IIS 4.0. I also have been able to successfully install DBD::ODBC and to create a system DNS in ODBC. I can run the program successfully from the Perl editor on the server where Perl is installed. When the same code is executed from through a web browser I get the following error: The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: install_driver(ODBC) failed: Can't load 'C:/Perl/site/lib/auto/DBD/ODBC/ODBC.dll' for module DBD::ODBC: load_file:Access is denied at C:/Perl/lib/DynaLoader.pm line 229. at (eval 1) line 3 Compilation failed in require at (eval 1) line 3. Perhaps a required shared library or dll isn't installed where expected at E:\pps_sid\cgi-bin\tst3.pl line 6 HTTP/1.0 200 OK The following is the test code I used to try and get this to work: print HTTP/1.0 200 OK\n; #!/usr/bin/perl use DBI; my $conn = DBI-connect(dbi:ODBC:master,user,testpass) or die Error:$DBI::errstr\n; my $sql = qq(select first,last,ethnic,dob,langsclsco,test_date from gepa where test_date = 'March 1999'); print $sql \n\n; my $sth = $conn-prepare($sql); $sth-execute(); print DBI::dump_results($sth); To date I still get the same error when executing the above code. Please note that I am using Perl v5.8.2, DBI version 1.39, and DBD::ODBC driver for DBI version 1.06. All built for mswin32-x86-multi-thread. Please Help, help would be appreciated. Mark Jackson [EMAIL PROTECTED]
Re: getting rid of the Issuing rollback() warning
On Feb 12, 2004, at 3:42 AM, Bart Lateur wrote: On Thu, 12 Feb 2004 10:55:56 +, Tim Bunce wrote: All I'm proposing to change is to add a way for drivers to indicate if they are in a transaction or not, and then to use that to disable the warning. That reminds me... I haven't used it in years, but I recall that last time I used DBD::ODBC combined with MS-SQL Server, in non-autocommit mode, that I had to do a rollback() after a simple SELECT statement not an update, before a disconnect, or it would complain. It looked like it did quite keep proper track on whether it was inside a transaction or not. Perhaps that has been fixed years ago. Sybase IQ Multiplex has exactly the same behavior. You have to rollback after every select. I created a slightly modified DBD::Sybase (that I called DBD::SybIQ) and it works very well except for this idiosyncracy. The issue I think is on the IQ database side, where unless you rollback, it will consider you're still active and will lock out others from accessing your resources. Henri.
Re: getting rid of the Issuing rollback() warning
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All I'm proposing to change is to add a way for drivers to indicate if they are in a transaction or not, and then to use that to disable the warning. That what I was thinking about. Since DBD::Pg already tracks whether or not it is in a transaction, it should be simply a matter of: if (!DBIc_has(imp_dbh,DBIcf_AutoCommit) imp_dbh-done_begin) { if (DBIc_WARN(imp_dbh) (!dirty || DBIc_DBISTATE(imp_dbh)-debug = 3)) warn(Issuing rollback() for database handle... - -- Greg Sabino Mullane [EMAIL PROTECTED] PGP Key: 0x14964AC8 200402121918 -BEGIN PGP SIGNATURE- iD8DBQFALBhYvJuQZxSWSsgRAuLcAKDsBkuFK37pKtMrNy/fQnBRafek+wCfVK0p s2ysyGHV8jEtHTFibv5ttQ8= =t993 -END PGP SIGNATURE-