PDA

View Full Version : PostgreSQL deleted in error- HELP!!



Spazztacular1
06-17-2011, 02:34 PM
Doing a little house cleaning on my hard drive and I deleted PostgreSQL, which I come to find out is used for HEM.....when I went to open it up! :eek:

Oh, thats what that program was four you dumb %#$!

I just backed up my data yesterday, so I hope I will be OK.

My question is......do I need to uninstall HEM & download current version...then restore from backup, or is there a way to download the PostgreSQL seperately without having to uninstall???

Any tips greatly appreciated so I don't lose my data.

Patvs
06-17-2011, 06:45 PM
You don't have to uninstall HoldemManager.

Uninstalling PostgreSQL doesn't sound like a big disaster, if you just uninstalled it in Windows Control Panel--> Programs, since this won't delete the old DATA folder.

(or did you manually delete the entire Program Files/PostgreSQL folder??)


Download the manual installer from PostgreSQL: The world's most advanced open source database (http://www.postgresql.org)
8.4.8 Download PostgreSQL | EnterpriseDB (http://www.enterprisedb.com/products-services-training/pgdownload)
During the installation it should just detect the old data folder.

----


If you also have an additional .backup file (backup) of your database, if it doesn't detect the old data folder, you can restore your .backup file in pgadminIII afterwards: http://faq.holdemmanager.com/questions/72/Backup%26RestoreDatabase

Spazztacular1
06-20-2011, 10:28 AM
Hi Pat,

Thank you for the reply.....

I did uninstall via Control Panel, Add/remove prog......

I reinstalled as instructed & I am getting the message ..

"failed to establish a connection to 127.0.0.1."

CONNECT ... "A connection to POstGreSQL could not be made. Would you like to have HEM attempt to start the service?"

YES ..."Sorry HEM was unable to start the service"

What next?

Thanks,
Paul

Patvs
06-20-2011, 11:58 AM
Turn on secondary logon:
The secondary logon service is a standard windows service which is available on every windows computer. In the latest versions it is not started automatically. You need to start it via control panel > administrative tools > services. Starting it once should insure it works in the future also.


Download SQL 8.2.x from PostgreSQL: The world's most advanced open source database (http://www.postgresql.org:) PostgreSQL: Choose a Mirror (http://wwwmaster.postgresql.org/download/mirrors-ftp/binary/v8.2.21/win32/postgresql-8.2.21-1.zip)
And install it to port 5433.

Spazztacular1
06-20-2011, 12:13 PM
Turn on secondary logon:
The secondary logon service is a standard windows service which is available on every windows computer. In the latest versions it is not started automatically. You need to start it via control panel > administrative tools > services. Starting it once should insure it works in the future also.


Download SQL 8.2.x from PostgreSQL: The world's most advanced open source database (http://www.postgresql.org:) PostgreSQL: Choose a Mirror (http://wwwmaster.postgresql.org/download/mirrors-ftp/binary/v8.2.21/win32/postgresql-8.2.21-1.zip)
And install it to port 5433.

Hi Pat,

Secondary Logon is STARTED & automatic.

Still no luck.......however I noticed PostgreSQL is not listed in the SERVICES .....Is it supposed to be there??

Also I noticed the port # s are different. I downloaded to 5432.. is that ok?

Patvs
06-20-2011, 12:21 PM
PostgreSQL must be in services or it's not installed properly.

SQL 8.2 will always run.

8.4//9.0 in rare situation will not run. You can try to install them to a different port. Otherwise just use SQL 8.2.

Spazztacular1
06-20-2011, 01:18 PM
PostgreSQL must be in services or it's not installed properly.

SQL 8.2 will always run.

8.4//9.0 in rare situation will not run. You can try to install them to a different port. Otherwise just use SQL 8.2.

What about 9.1 Beta 2???

fozzy71
06-20-2011, 08:03 PM
What about 9.1 Beta 2???

If you are using his instructions he gave to reinstall your previous \data folder you need to use the same version that created the \data folder. Use 8.4 as he suggested and try again as that is the version installed with holdem manager.

Please update to the latest beta - http://rvgsoftware.fileburst.com/HmBetaUpdate.exe

For reinstalling SQL to the same DB, follow these steps:

1) Uninstall PostgreSQL from the Windows Control Panel.
2) If you are moving the DB to a different drive/partition, manually cut or copy the \Postgresql\8.x\data directory to it's new location.
3) run the command - start > programs > accessories > command prompt > right-click > run as administrator

net user postgres /delete
4) reboot.
5) Install the same version of PostgreSQL as your current DB using these instructions - http://faq.holdemmanager.com/questions/71/Reinstall+PostgreSQL+Preserving+Old+Database
6) If you have moved/installed your DB to a non-default location, please make sure to change the 'Data Directory' path during the installation.


If that doesn't work you will want to delete the old \data directory and reinstall postgresql completely. Then you can import your original/archived hands to rebuild the database.

Spazztacular1
06-21-2011, 01:18 PM
If you are using his instructions he gave to reinstall your previous \data folder you need to use the same version that created the \data folder. Use 8.4 as he suggested and try again as that is the version installed with holdem manager.

Please update to the latest beta - http://rvgsoftware.fileburst.com/HmBetaUpdate.exe

For reinstalling SQL to the same DB, follow these steps:

1) Uninstall PostgreSQL from the Windows Control Panel.
2) If you are moving the DB to a different drive/partition, manually cut or copy the \Postgresql\8.x\data directory to it's new location.
3) run the command - start > programs > accessories > command prompt > right-click > run as administrator

net user postgres /delete
4) reboot.
5) Install the same version of PostgreSQL as your current DB using these instructions - http://faq.holdemmanager.com/questions/71/Reinstall+PostgreSQL+Preserving+Old+Database
6) If you have moved/installed your DB to a non-default location, please make sure to change the 'Data Directory' path during the installation.


If that doesn't work you will want to delete the old \data directory and reinstall postgresql completely. Then you can import your original/archived hands to rebuild the database.

Guess i am a little confused..... help me understand the difference between the data files in PostgreSQL and the HH files in my HEM folder????

I think I am going to move the data files from postgresql to a temp folder & try to start fresh.

For some reason PostgreSQL still is not showing up in my SERVICES.....??

Patvs
06-21-2011, 04:49 PM
The data files in PostgreSQL/8.x/DATA/bin consist of 59 tables.
Only one of them contains your handhistories.

The others contain your holecards, bonus info, aliases, notes, tournament IDs, reports, played hands preflop, players, etc..
Each table constists of 4-50 columns. (there are 1000+ tables in total)

Handhistories table: has only 4 tables: pokerhand#, handhistory, filename, etc.


----


Most likely your data folder holds a corrupt database. (and you'll never be able to connect to it)
Try installing SQL 8.2.21. Install it to a different port. To see if PostgreSQL wil run using an empty database and data folder.

Spazztacular1
06-30-2011, 09:36 AM
Problem solved in teamviewer session. Fozzy was very knowledgeable in resolving my issue with PostgreSQL after overcoming many roadblocks, he managed to get me up & running with no data lost!!!

I want to give a personal THANK YOU to Fozzy & the support team (Pat) in this Forum!@!!!! The service is unmatched, and is hard to come by these days.