PDA

View Full Version : existing DB -> connect after Windows reinstall



bastardbychoice
06-26-2009, 09:52 AM
Hi.

I have installed postgres 8.2 on drive D: and had HEM (installed on C: ) running with a database before i reinstalled Windows yesterday.

Now I installed HEM today and wanted to connect HEM to the db, but it can't start the service.

Is there any way to connect the two without having to reinstall postgres?

If I reinstall postgres (to the same location as it is now), will the existing db be destroyed?


*EDIT*

Is it possible that I rename the actual installation folder, install the same version of postgres (or even v8.3) and copy the contents of the old folder into the new one?

netsrak
06-26-2009, 12:12 PM
Of course you must reinstall postgres because parts are always installed in the windows path.
Please see the faq: http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=177

To preserve your data you should install the same version as before. And when everything is running, backup the database, install postgresql 8.3 and restore the database.

bastardbychoice
06-26-2009, 02:27 PM
Now I have installed 8.2 as described in the FAQ.

After starting HEM, the database control panel appears. There, I enter the password I used during the postgres installation and leave the other fields unchanged (as I didn't change any of the values during postgres installation).

But HEM says 'A connection to PostgreSQL could not be made. Would you like HEM to attempt to start the service?' When I click Yes, HEM says it has started the service and that I should try again.

I then click again Connect and I'm asked again if HEM should start the service as a connection attempt failed. The next window says 'Sorry, could not start service' -> click OK -> 'service has been started, try again'...

btw the service also can't be started using the Windows services panel. After the progress bar moves for a while a message appears that the service is kind of suspended as it is in idle mode (something like this, I am using a German version of Windows).

fozzy71
06-26-2009, 02:35 PM
Try to delete this file, C:\Program Files\PostgreSQL\data\postmaster.pid, and then try to start the postgresql service again.

bastardbychoice
06-26-2009, 02:40 PM
This file doesn't exist...

fozzy71
06-26-2009, 03:03 PM
Hmm, not sure what else to suggest. I have never tried using the restore process. I always import my archive hand history text files whenever I reformat or rebuild a DB. If you have your archives, I would suggest you uninstall SQL completely (ask me if you need instructions) and install PostgreSQL 8.3 and import your archives.


If that is not an option, or you would prefer to try a bit more to get your Restore to work, please email fabio@holdemmanager.net, with a link to this thread, your forum name, and your AIM/MSN/Skype, so you can schedule a Teamviewer (http://www.teamviewer.com)session.

bastardbychoice
06-26-2009, 03:12 PM
How comes that the data folder i completely empty?

fozzy71
06-26-2009, 03:22 PM
Because you haven't imported any hands yet, or manually copied the old \Data files to the new installation, is what I assume. It's hard to be sure without having seen the steps you have taken to this point.


Did you email fabio? He should be able to help you sort it out. It will be much easier when he can work on your computer to try and fix it, while you watch thru Teamviewer.

bastardbychoice
06-26-2009, 03:22 PM
Hmm, not sure what else to suggest. I have never tried using the restore process. I always import my archive hand history text files whenever I reformat or rebuild a DB. If you have your archives, I would suggest you uninstall SQL completely (ask me if you need instructions) and install PostgreSQL 8.3 and import your archives.


If that is not an option, or you would prefer to try a bit more to get your Restore to work, please email fabio@holdemmanager.net, with a link to this thread, your forum name, and your AIM/MSN/Skype, so you can schedule a Teamviewer (http://www.teamviewer.com)session.



btw I forgot to say that, after I first installed 8.3, then 8.2, I installed Windows again, so I have a fresh 8.2 on my computer.