PDA

View Full Version : Prima/Microgaming hands reimport after database crash



simpleCrazy
02-13-2012, 04:24 PM
Is there a possibility to reimport Microgaming hands. There was a problem with my computer and it crashed with PostgreSQL. I've managed to restore some PostgreSQL tables. Table `handhistories` was also restored but only plain text. So I had couple of thousand Microgaming hands that start in string '----PRIMA.DAT----'.
I understand that HM1 imports Prima/Microgaming hands from GameHistory.dat sqlite3 database. So I created MyOwnGameHistory.dat with the same structure (table HandHistory and all columns are the same as in original GameHistory.dat). I added those old hands into MyOwnGameHistory.dat with the same structure (unique HandID, HandDate in yyyymmddhhmmss format, WasSeated=1, XMLDump in xml format, TableName string, GameType 'Multi Table Hold'em' or 'Hold'em', TableType 'MTT' or 'Cash Game'). Columns are all the same as in original file.
I asked HM1 to import MyOwnGameHistory.dat but my hands were not imported.

Trace.log doesn't show much info:
File C:\Temp\MyOwnGameHistory.dat IS in the previously imported file list but the last modified times are different.
Preparing Statements for database
*** Processing C:\Temp\MyOwnGameHistory.dat
Passing a list of hands to skip...
IMPORTED: 0 INCOMPLETE: 0 INVALID: 0 ERROR: 0
*** File processing complete in 0.0

I wanted to ask what is the logic and rules behind HM1 finding hands to be imported?
Does it look at auto incrementing HandID? Does it look at HandDate and doesn't look into history dates?


What's best practice of reimporting Prima/Microgaming hands in the future if one of those disasters occurs once more?

netsrak
02-14-2012, 10:11 AM
I see no way how we could help you with this. Eventually Prima Support can send you the hands in a format we support?

To prevent this in the future you should do regular database backups.

simpleCrazy
02-15-2012, 10:07 AM
The thing is that I know the format of that database. The problem was now knowing the rules how HM finds new hands in GameHistory.dat.
Changing HandID to "Game id" from XMLDump and reducing number of hands in GameHistory.dat worked. I've created script that generated thousands of small GameHistory databases and HM imported them.