Please make sure you are logged in as an administrative user
If you are running Windows Vista, please make sure that User Access Control is disabled. You can disable UAC in Windows Vista by following these steps:
1.Click the Start button and open the "Control Panel".
2.Select "User Accounts and Family Safety.
Note: This step can be skipped if in Classic View
3.Select "User Accounts".
4.Click "Turn User Account Control on or off".
5.Uncheck "Use User Account Control (UAC) to help protect your computer" then click OK.
6.You must now restart your computer for the changes to take effect.
If you are running Windows XP, you will need to make sure Simple File Sharing is turned off. To turn off Simple File Sharing in XP Professional, double click on "My Computer" on your desktop or start menu. From the menu bar choose Tools --> Folder Options. Click on the "View" tab and make sure the "Use Simple File Sharing" box is not checked. Click ok and you can close these windows. In XP Home follow
this walkthrough.
I am going to assume that your C:\ drive is your primary hard drive and that the D:\ drive is your secondary drive. What we are going to do is install a tablespace on the D:\ drive. The logs will be located on your C:\ drive but all of the actual data will be on D:\. That way the only times that there are searches for data on the D:\ drive or writes to that drive we are looking for (or writing to) bits of the database. This will markedly improve performance. If you wish to install your tablespace elsewhere, substitute that location for wherever you see D:\ in the rest of these directions. If you have PostgreSQL installed in any place other than C:\Program Files\PostgreSQL\ you should also substitute your installation location where appropriate.
Double click "My Computer" then "D:\" and right click in the window that appears. Click New, then click Folder and name the folder "pg_data". (You may name it otherwise if you would like, and if you do, when this document refers to pg_data you should substitute what you named this folder instead.)
Now we need to allow the database user full access to this folder. Right click on pg_data and click Properties. Choose the Security tab, and click "Add" (in Vista click "Edit" then "Add" on the next window) and type "postgres" (without the quotes), then click "Check Names" to change the name to the correct format and then click "OK". "Postgres" should now appear in the list of names available. Click on it, then look underneath and check the box that says "Allow/Full Control". Click Apply and then OK. Now the database user has complete rights to control this folder.
Click Start, click Run and type in "C:\Program Files\PokerTracker 3\Data\Schemas" and click ok. There is one file in here: schema.postgres.sql. Right click on it, and click copy. Click Start, click Run type in D:\ and click ok. Right click in the window and click Paste to copy the schema.postgres.sql to that location.
Now to create the actual database:
Click Start --> Programs --> PostgreSQL --> psql to template1. This will open up a console window. You may need to log in to the database - if so please complete the login procedure by pressing enter to use the default server, port and user then enter your postgres password. You will know it is done because the prompt will read template1-# when you are logged in. Once you are logged in, type into the console type:
- Code: Select all
CREATE TABLESPACE spare_disk LOCATION 'D:\\pg_data';
and hit enter. Please note there are two backslashes. Then type:
- Code: Select all
CREATE DATABASE pt3_newdb TABLESPACE spare_disk;
and hit enter. Then type:
- Code: Select all
\connect pt3_newdb;
hit enter and the console will change to show that we are now connected to pt3_newdb. Once the console changes, type:
- Code: Select all
\cd D:
hit enter and then type:
- Code: Select all
\i schema.postgres.sql
and hit enter one more time. PostgreSQL will now create your database to conform properly with the PokerTracker 3 database specifications. Please be patient while it completes this process. Once it finishes type "\q" and hit enter to exit the command prompt.
Your database is now created, and you just need to attach the database within PokerTracker 3.
Go into PokerTracker 3, click Database --> Database Management from the menubar, then click New. Click "Browse Databases" and select pt3_newdb from the list of databases displayed. Click 'ok'. This should return you to the earlier screen before you clicked "Browse Databases" with the "This database already exists" box checked. If that box is not checked, check it now. If you wish to change the name of the database to something else, you can do it via the box above, and click connect.
If you would like, you can now set your database as active and default via the Set Active and Set Default buttons. At this point, your database will now store all of its data in D:\pg_data\ and this should markedly improve your PokerTracker 3 database performance.
Edit: fixed a broken code tag. Sorry about that.