PDA

View Full Version : Installing another instance on same PC but separate drive and OS



Vel
12-01-2010, 11:42 PM
Just curious how to properly go about doing this... What i want to do is basically be able to access the same database whether im playing on my Win XP install drive where HEM was originally installed or on my Win 7 drive on the same PC. I just installed HEM on the win 7 drive and I put the reg code back into it and it said my license lets me have multiple PC's so i set it to #2. Not sure if I should have done that though. Anyway now it can't connect to postgres on the Xp drive. I don;t see a way to tell it where to look, it's as if it needs to be on the same drive.

So just wondering if theres a way to basically have the install on win 7 and win xp share the same database and how exactly to go about doing that. Or will the data I collect while playing on one OS only be available to that specific OS?

Patvs
12-02-2010, 01:07 AM
It should definitely be possible:
If you install the same version of SQL on both XP / Windows 7 to the same folder, HoldemManager should be able to connect to it. (you have to INSTALL SQL on BOTH operations systems)

The issue you're experiencing now, is probably either XP or Windows 7 messing with the SQL connection. That can be fixed by adding: pg_ctl.exe and postgres.exe (and port 5432) to the Windows Firewall exceptions list (+ exceptions list of your other firewall if you have one)

Or.. you could try to install a different version of SQL (one that works on both XP/ Windows 7 without any problems) to a different port, and use that database instead.

Vel
12-02-2010, 02:46 PM
ok question, if I get the new postgres 9 and install it over the old database will that do anything to my HEM data?

Also would it really matter if it's the same postgres version? As long as its compatible with the OS, it's just allowing HEM to run and have access to the DB, right?

Vel
12-02-2010, 05:13 PM
OK bit of an issue here, hope you can help me out...

Here's what i did. I installed postgres 9 on the win 7 drive. I went back into win xp and used HEM to make a backup of the database i was using. I uninstalled postgres 8.4 that i was using in xp. I then installed postgres 9. So now we have version 9 on both hard drives. I loaded up HEM and it's saying the holdemmanager database doesnt exist. So I create a new database for the time being just to get into HEM so i can restore the old one. I start the restore thing, and it gets just about all the way done then it stops saying ti couldnt find the postgresql install directory? So I loaded HEM up and yeah it defintiely didnt import. Do I need to reinstall 8.4 again and try this or...?

EDIT1: OK so that was being done ont he xp install directory, so i said well if I cant get it working there, then no big deal Id rather it be working on the win 7 drive anyway. So i went into win 7 and did the backup and the same error happened . Cannot find the postgresql install directory. Is there some way to POINT to the directory? Does the install have to be the exact same postgres version? For instance I was using 8.4 now I'm using 9. I can't imagine why it would matter but who knows.

Vel
12-02-2010, 07:09 PM
OK here's an update.

Everything is I believe working smooth now. Here's what i did and I hope this might help others. Granted there are probably many little steps here and there I'm forgetting because there was a lot of switching back and forth and keeping thoughts of possible fixes only in my short term memory.

XP install of HEM was telling me it couldnt connect to localhost. Reinstalling 8.4 made the XP install work again. So I thought ok let's go over to 7 now and muck around. I first figured let's actually run the HEM exe from the XP install while we are running win 7. That caused the register product thingy to come up again. I did that. Then I started the DB restore process. Once again didnt work. So I installed PG 8.4 on the win 7 drive. Ran HEM again. Again asked for registration. Did that. Not sure if it gave an error again or just didnt load any database but I did the database restore thign and this time it worked. Only thing I had to do was change the port for 5433 because 5432 is taken by I guess the other db's I made to even get into HEM to run the backup/restore thing to begin with. So it finally went off without a hitch. NOW the thing I'm not sure of yet is if the DB's are truly shared and they will save whether or not I'm playing on win XP or 7. I'm going to try this ow and report back.

Patvs
12-03-2010, 07:22 AM
SQL 8.4.x is not compatible with 9.0.x so if you install SQL 9.0 it will leave your old database untouched.

On both Windows 7 / XP you have to install the same version of SQL to the same directory. (installing two different versions will result in two separate databases)

--


You can't export a 8.4 database and import it into SQL 9.0.

--

If on Windows 7 and XP you both connect to the same database (with the same name), it should truly 'share' the database.

Vel
12-03-2010, 01:09 PM
SQL 8.4.x is not compatible with 9.0.x so if you install SQL 9.0 it will leave your old database untouched.

On both Windows 7 / XP you have to install the same version of SQL to the same directory. (installing two different versions will result in two separate databases)

--


You can't export a 8.4 database and import it into SQL 9.0.

--

If on Windows 7 and XP you both connect to the same database (with the same name), it should truly 'share' the database.

Hey pat, so it turned out that the databases werent being shared when i played last night because when i installed PG in win 7 i pointed it to install on the drive win 7 is on instead of the original in the win xp drive. So i uninstalled from win 7 and reinstalled pointing it to the existing folder in the win xp drive. Now the problem is that it wont connect to the database. I have the port and pass correct but it says failed to establish a connection to 127.0.0.1. i did some searching about the issue and it said to fix it by typing the localhost thing into your hosts files and ive done that but still no luck. The error says that it was unable to connect to PG then it asks if Id like to start the service. i click yes, it says it was unable, then another box comes up saying it started the service and to reconnect but no go.

Patvs
12-03-2010, 02:20 PM
Try installing a different version of SQL:
one that will actually run on both your Windows 7 and XP installation. (when installed to the same folder)

SQL 8.4.x not running is a common issue. Try 9.0, or 8.2.18.

Vel
12-03-2010, 03:34 PM
Try installing a different version of SQL:
one that will actually run on both your Windows 7 and XP installation. (when installed to the same folder)

SQL 8.4.x not running is a common issue. Try 9.0, or 8.2.18.

The problem then would be that i wouldnt be able to use the old database then, I'd have to start from scratch since like you said a database made in 8.4 wont run in 9, right?

Is there maybe a utility to import a DB from one version of PG into a new version and have ti be compatible?

EDIT: did some tweaking with permissions in folders in pg on the xp drive and HEM, rebooted now it is allowing me access finally. Will see if things are actually staying consistent when i load up from either OS.

Patvs
12-03-2010, 04:43 PM
There is a "migrate" utility, but I don't think it actually works.

If you ever switch SQL versions, easiest is to just reimport the original handhistories into a new database.