scienziato
06/09/2010, 12:04
Ho un problema che mi sta letteralmente facendo impazzire da qualche giorno. Ho acquistato un laptop (windows 7) e vorrei creare un database condiviso tra questo e il mio desktop (che è il pc che uso abitualment per giocare, sul quale ho windows XP). Sul forum di PT esiste una guida molto semplice per effettuare tale operazione, che per comodità riporto di seguito:
Suppose you want to synchronize your database between your main computer and your laptop. One way is to save all your hands you play, transfer them to the other computer, and then re-import on your other PT3 install. If that is too tedious for you (like it is for me), then you might consider putting your database on a hotswap USB hard drive, and plugging it into the respective computer each time you want to play.
If you go to the FAQ, you'll find this: Tutorial: 2 installs of pt3, 1 database, no networking! (http://www.pokertracker.com/forums/viewtopic.php?f=45&t=14552&p=67983)
Here, I will list an alternative way to accomplish this, based off the competing product's FAQ. User prajna wrote the tutorial above and his method was to install postgresql directly to the usb drive. Here, I will have postgresql installed to each computer, but have only the 'data' directory on the usb drive. I do not claim that this method is better in any way than the previous one outlined. In fact, I encourage any responses in that regard for all of our clairty.
Assumptions:
- You already have PT3 and Postgre installed and in use on your main computer.
- You want to be able to use and play with the db on a laptop.
- You want to plug the drive back into the main computer and have all laptop play up-to-date in the db with no other importing.
Steps: (main computer first, then laptop)
As you should always do before messing with your db, MAKE A BACKUP, just in case stuff goes wrong. Follow the guide for backup here: Backup/Restore with PGAdmin (http://www.pokertracker.com/forums/viewtopic.php?f=45&t=4098&p=90554#p90554). Put the backup file somewhere safe.
Stop the postgres service on the main computer. Go to: Control Panel -> Administrative Tools -> Services. Find the PostgreSQL service, double click, and Stop it.
Copy the 'data' directory to the usb drive. First, navigate to your usb drive (lets assume windows makes it E: for now) and create the folders "Program Files", inside that "PostgreSQL", and inside that "8.3". Leave it open, and navigate another window to your main computers hard drives postgres installation at "C:\Program Files\PostgreSQL\8.3". Copy the "data" directory to the hard drive. Now when you navigate to "E:\Program Files\PostgreSQL\8.3\data" you should see the same contents.
Make windows assign a consistent drive letter to the usb drive. Control Panel -> Administrative Tools -> Computer Management -> Disk Management. Find the usb drive (we assumed E:), right click, change drive letter and path. I changed it to Z: and we'll use that for this tutorial. After this, no matter what you plug into the computer, even if you have 5 usb drives, this particular drive will always be Z:
Tell Postgres your new 'data' location. Open the registry editor on the main computer. Start menu -> Run, then type in "regedit". BE CAREFUL HERE, YOU COULD SCREW UP YOUR COMPUTER. In the left pane, navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\pgsql-8.3. When you find it, in the right pane, open the "ImagePath" entry. Its probably too long for the box for you to read, but, it should be: "C:\Program Files\PostgreSQL\8.3\bin\pg_ctl.exe" runservice -w -N "pgsql-8.3" -D "C:\Program Files\PostgreSQL\8.3\data\" and the end part is what needs to be changed. The part after the "-D" tells postgres where to find the data directory. Simply change the C to Z (or whatever letter you assigned in Step 4) so the end part reads "Z:\Program Files\PostgreSQL\8.3\data\" and the new full ImagePath entry should be "C:\Program Files\PostgreSQL\8.3\bin\pg_ctl.exe" runservice -w -N "pgsql-8.3" -D "Z:\Program Files\PostgreSQL\8.3\data\"
Restart Postgres on main comp. Start the service the same way you stopped it in Step 2. The status should say "Started". If it doesn't, something went wrong. You can check for errors in Control Panel -> Administrative Tools -> Event Viewer -> Application.
Test PT3 on main comp. PT3 will still be configured for your database on the main hard drive. You will get an error on PT3 startup and need to change it. In the PT3 menu, go to Database -> Database Management. Click "New". Click "This database already exists" and then "Browse databases". Select your db. Now you should have PT3 working on the main comp, reading from your database off the external hard drive.
Repeat Steps 4 - 7 on your laptop. If you don't have PT3 and postgres installed on your laptop, do it. Download the full installer with postgres and install as normal. Then repeat the steps above.
Esiste anche un metodo più laborioso che si differenzia sostanzialmente per il fatto che in luogo della modifica della chiave di registro propone di disinstallare/reinstallare postgreSQL e di modificare il percorso del DB in fase di installazione.
Per quanto mi riguarda la procedura ha funzionato correttamente sul desktop, ma non c'è verso di farla andare bene sul laptop. Sia che proceda col metodo veloce che con l'altro postgreSQL non riesce a connettersi (l'errore che dà è proprio di legato all'impossibilità di connettersi) al DB sul supporto USB; mi sono accorto che su windows 7 il software viene automaticamente installato non nella cartellina "programmi", bensì in "programmi (x86)", ma anche aggiustando adeguatamente la stringa nella chiave di registro non riesco ad ottenere risultato (quindi suppongo che non sia quella l'origine del problema). Un altro possibile problema potrebbe essere legato al fatto che il mio profilo su windows 7 possegga o meno i diritti di amministratore; non so come verificarlo in tutta sincerità (sono piuttosto ignorante in materia), ma suppongo che questi diritti ci siano.
Qualcuno ha avuto lo stesso problema ? Credo che la cosa riguardi sia PT che HM, visto che questa operazione si fa su postgreSQL. Spero che qualche informatico esperto possa illuminarmi. Grazie.
Suppose you want to synchronize your database between your main computer and your laptop. One way is to save all your hands you play, transfer them to the other computer, and then re-import on your other PT3 install. If that is too tedious for you (like it is for me), then you might consider putting your database on a hotswap USB hard drive, and plugging it into the respective computer each time you want to play.
If you go to the FAQ, you'll find this: Tutorial: 2 installs of pt3, 1 database, no networking! (http://www.pokertracker.com/forums/viewtopic.php?f=45&t=14552&p=67983)
Here, I will list an alternative way to accomplish this, based off the competing product's FAQ. User prajna wrote the tutorial above and his method was to install postgresql directly to the usb drive. Here, I will have postgresql installed to each computer, but have only the 'data' directory on the usb drive. I do not claim that this method is better in any way than the previous one outlined. In fact, I encourage any responses in that regard for all of our clairty.
Assumptions:
- You already have PT3 and Postgre installed and in use on your main computer.
- You want to be able to use and play with the db on a laptop.
- You want to plug the drive back into the main computer and have all laptop play up-to-date in the db with no other importing.
Steps: (main computer first, then laptop)
As you should always do before messing with your db, MAKE A BACKUP, just in case stuff goes wrong. Follow the guide for backup here: Backup/Restore with PGAdmin (http://www.pokertracker.com/forums/viewtopic.php?f=45&t=4098&p=90554#p90554). Put the backup file somewhere safe.
Stop the postgres service on the main computer. Go to: Control Panel -> Administrative Tools -> Services. Find the PostgreSQL service, double click, and Stop it.
Copy the 'data' directory to the usb drive. First, navigate to your usb drive (lets assume windows makes it E: for now) and create the folders "Program Files", inside that "PostgreSQL", and inside that "8.3". Leave it open, and navigate another window to your main computers hard drives postgres installation at "C:\Program Files\PostgreSQL\8.3". Copy the "data" directory to the hard drive. Now when you navigate to "E:\Program Files\PostgreSQL\8.3\data" you should see the same contents.
Make windows assign a consistent drive letter to the usb drive. Control Panel -> Administrative Tools -> Computer Management -> Disk Management. Find the usb drive (we assumed E:), right click, change drive letter and path. I changed it to Z: and we'll use that for this tutorial. After this, no matter what you plug into the computer, even if you have 5 usb drives, this particular drive will always be Z:
Tell Postgres your new 'data' location. Open the registry editor on the main computer. Start menu -> Run, then type in "regedit". BE CAREFUL HERE, YOU COULD SCREW UP YOUR COMPUTER. In the left pane, navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\pgsql-8.3. When you find it, in the right pane, open the "ImagePath" entry. Its probably too long for the box for you to read, but, it should be: "C:\Program Files\PostgreSQL\8.3\bin\pg_ctl.exe" runservice -w -N "pgsql-8.3" -D "C:\Program Files\PostgreSQL\8.3\data\" and the end part is what needs to be changed. The part after the "-D" tells postgres where to find the data directory. Simply change the C to Z (or whatever letter you assigned in Step 4) so the end part reads "Z:\Program Files\PostgreSQL\8.3\data\" and the new full ImagePath entry should be "C:\Program Files\PostgreSQL\8.3\bin\pg_ctl.exe" runservice -w -N "pgsql-8.3" -D "Z:\Program Files\PostgreSQL\8.3\data\"
Restart Postgres on main comp. Start the service the same way you stopped it in Step 2. The status should say "Started". If it doesn't, something went wrong. You can check for errors in Control Panel -> Administrative Tools -> Event Viewer -> Application.
Test PT3 on main comp. PT3 will still be configured for your database on the main hard drive. You will get an error on PT3 startup and need to change it. In the PT3 menu, go to Database -> Database Management. Click "New". Click "This database already exists" and then "Browse databases". Select your db. Now you should have PT3 working on the main comp, reading from your database off the external hard drive.
Repeat Steps 4 - 7 on your laptop. If you don't have PT3 and postgres installed on your laptop, do it. Download the full installer with postgres and install as normal. Then repeat the steps above.
Esiste anche un metodo più laborioso che si differenzia sostanzialmente per il fatto che in luogo della modifica della chiave di registro propone di disinstallare/reinstallare postgreSQL e di modificare il percorso del DB in fase di installazione.
Per quanto mi riguarda la procedura ha funzionato correttamente sul desktop, ma non c'è verso di farla andare bene sul laptop. Sia che proceda col metodo veloce che con l'altro postgreSQL non riesce a connettersi (l'errore che dà è proprio di legato all'impossibilità di connettersi) al DB sul supporto USB; mi sono accorto che su windows 7 il software viene automaticamente installato non nella cartellina "programmi", bensì in "programmi (x86)", ma anche aggiustando adeguatamente la stringa nella chiave di registro non riesco ad ottenere risultato (quindi suppongo che non sia quella l'origine del problema). Un altro possibile problema potrebbe essere legato al fatto che il mio profilo su windows 7 possegga o meno i diritti di amministratore; non so come verificarlo in tutta sincerità (sono piuttosto ignorante in materia), ma suppongo che questi diritti ci siano.
Qualcuno ha avuto lo stesso problema ? Credo che la cosa riguardi sia PT che HM, visto che questa operazione si fa su postgreSQL. Spero che qualche informatico esperto possa illuminarmi. Grazie.