./dpm_db_310_to_320 --db-vendor MySQL --db $DPM_HOST --user dpmmgr --pwd-file /tmp/dpm-password --dpm-db dpm_db
I discovered a few things to watch out for along the way though. Here's my checklist:
- Make sure you have enough space on your system disk: I got bitten by this on a test server. The upgrade script needs a good chunk of space (comparable to that already used by the MySQL DB?) to perform the upgrade
- There's a mysql setting you probably need to tweak first: add set-variable=innodb_buffer_pool_size=256M to the [mysqld] section in /etc/mysql.conf and restart mysql. Otherwise you get this cryptic error:
Thu Jun 18 09:02:30 2009 : Starting to update the DPNS/DPM database.
Please wait...
failed to query and/or update the DPM database : DBD::mysql::db do failed: The total number of locks exceeds the lock table size at UpdateDpmDatabase.pm line 19.
Issuing rollback() for database handle being DESTROY'd without explicit disconnect().
Also worth noting is that if this happens to you, when you try to re-run the script (or YAIM) you will get this error:
failed to query and/or update the DPM database : DBD::mysql::db do failed: Duplicate column name 'r_uid' at UpdateDpmDatabase.pm line 18.
Issuing rollback() for database handle being DESTROY'd without explicit disconnect().
This is because the script has already done this step. You need to edit /opt/lcg/share/DPM/dpm-db-310-to-320/UpdateDpmDatabase.pm and comment out this line:
$dbh_dpm->do ("ALTER TABLE dpm_get_filereq ADD r_uid INTEGER");
You should then be able to run the script to completion.