Many thanks for the reply, Brian.

As well as trying to read the same database files on both machines I should
have mentioned that, knowing that there are differences between how
different versions of Berkeley DB produce the files, for example those on
Windows and Linux machines, I also tried to rebuild the database from
scratch on the virtual machine but this failed.

If I understand you correctly you're saying that if I ensure that the
DB_File running on both machines is the same then this might solve my
problem. I'm only running Perl 5.6 and don't want to change for various
reasons so I don't want to use the current version of this module for Perl
5.8. It would be handy if I could use the version that I'm currently using
on the standalone machine so that I could use the current database files on
both machines. I'll have a search for this version, to see if it's still
available - I have the ppm for version 1.76 but not for the 1.73 on the
original machine.

If I can't find the same version would it be possible just to copy over the
DB_File folders from the one machine to the other or there other changes I'd
need to make? 

Eric Robertson

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Brian
Raven
Sent: Monday, November 12, 2007 1:07 PM
To: [email protected]
Subject: RE: Berkeley DB Problem with DB_File

Eric Robertson <> wrote:
> I've been using a networked PC running NT4 Server to test some
> changes to bulletin board software. This software is written in Perl
> and uses DB_File to store all the messages. I'm in the process of
> changing over to using a virtual machine running the same OS and I'm
> having problems.    
> 
> I don't seem to be able to read the same database files on the
> virtual machine and I have discovered that although I thought I had
> the same set up on both machines this is not the case which could
> account for this. The standalone PC is running DB_File version 1.73
> and Berkeley DB version 2.004010 while the virtual machine has
> DB_File version 1.806 and Berkeley DB version 4.001025.     
> 
> I came across a test to check how well Berkeley DB is working in
> conjunction with Perl and I found that with the standalone PC it took
> 1 wallclock second to create a DB_File and write 10,000 records to it
> while the virtual PC took 58. There was a note associated with this
> test to say that there was a bug in version 4.1 of Berkeley DB which
> might not have been corrected and which would have caused it to run
> very slowly. I'm wondering if this is perhaps the problem although it
> could just be that this is because it's running in a virtual machine
> and/or I've not allocated enough RAM to the virtual machine. I'd like
> to sort out the Berkeley DB situation first, to see if this is the
> problem.         
> 
> I don't know how I've managed to have a different version of Berkeley
> DB on the virtual machine and as I only need it for running DB_File I
> don't really need a more up to date version than the one on the other
> one so I would like to change the settings on my virtual machine so
> that they mirror the standalone one. What I can't remember is whether
> Berkeley DB is part of the Perl installation or whether it comes with
> the OS. My question is - what is the easiest way of changing the
> Berkley DB installation on the virtual PC so that it matches that of
> the other one?        
> 
> I'm using Perl 5.6.1 on both machines.

Its not altogether surprising that you cannot read a db on a different
PC than the one it was created on, given such a large difference in
Berkeley DB versions. It is highly likely that the file format has
changed, as suggested by 'perldoc DB_File'.

The question of whether the Berkeley DB library is part of the perl
installation or not would seem to be platform dependent. This is born
out by the difference in size of the DB_File shared library, 63K on
Linux and 685K on Win32. Also by examining the shared libraries used by
a perl process that had 'use DB_File;'.

Therefore, in order to ensure you are using the same Berkeley DB version
on two Win32 platforms, you should be using the same version of DB_File.
I note that the latest version of DB_File (Activestate perl 5.8.8) is
1.815, and it uses Berkeley DB version 4.4.

HTH

-- 
Brian Raven 

=========================================
Atos Euronext Market Solutions Disclaimer
=========================================

The information contained in this e-mail is confidential and solely for the
intended addressee(s). Unauthorised reproduction, disclosure, modification,
and/or distribution of this email may be unlawful.
If you have received this email in error, please notify the sender
immediately and delete it from your system. The views expressed in this
message do not necessarily reflect those of Atos Euronext Market Solutions.

Atos Euronext Market Solutions Limited - Registered in England & Wales with
registration no. 3962327.  Registered office address at 25 Bank Street
London E14 5NQ United Kingdom. 
Atos Euronext Market Solutions SAS - Registered in France with registration
no. 425 100 294.  Registered office address at 6/8 Boulevard Haussmann 75009
Paris France.

L'information contenue dans cet e-mail est confidentielle et uniquement
destinee a la (aux) personnes a laquelle (auxquelle(s)) elle est adressee.
Toute copie, publication ou diffusion de cet email est interdite. Si cet
e-mail vous parvient par erreur, nous vous prions de bien vouloir prevenir
l'expediteur immediatement et d'effacer le e-mail et annexes jointes de
votre systeme. Le contenu de ce message electronique ne represente pas
necessairement la position ou le point de vue d'Atos Euronext Market
Solutions.
Atos Euronext Market Solutions Limited Société de droit anglais, enregistrée
au Royaume Uni sous le numéro 3962327, dont le siège social se situe 25 Bank
Street E14 5NQ Londres Royaume Uni.

Atos Euronext Market Solutions SAS, société par actions simplifiée,
enregistré au registre dui commerce et des sociétés sous le numéro 425 100
294 RCS Paris et dont le siège social se situe 6/8 Boulevard Haussmann 75009
Paris France.
=========================================

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to