PDA

View Full Version : How to SUCCESSFULLY transfer SQL and HEM to new partition??



4entourage
08-18-2009, 08:08 PM
Hey ---- I just got a new 250gig HDD -- I put the image of my original HDD on it. For some reason it didnt use the whole partition--- but instead the size of the original 80 gig drive -- with a new 160 gig partition.

All is fine and dandy - but the reason for the new HDD is SQL folder was getting quite large (About 20 gigs right now) and out of 80 - thats too much! Now I want to transfer my PostSQL and HEM to the extra partition so that I can re-format the first one. (I plan on using the 160 gig 2nd partition for HEM and SQL only - but dont wanna go thorugh re-install process! Anyway to do this? This way everytime I format (I typically do a lot) I dont have to ever do anything with HEM and SQL cuz it will be on its own partition

fozzy71
08-19-2009, 05:47 AM
I've recently bought a new hard drive and I would like to transfer my Holdem Manager database to the new hard drive, as it is taking up too much space on my old one. How would I go about doing this? (http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=101)


Make sure you have turned off logging and deleted your SQL pg_log files, as they may be taking up a substantial portion of your DB size.


Logging:

I would suggest you turn off logging on your new SQL installation as well as these other performance improvements - Top 10: HEM performance increase tips
(http://208.109.95.123/forum/showthread.php?p=62613&posted=1#post62613)

To turn off logging, follow these instructions. This is the first thing I do anytime I install SQL for someone.

- Start > My Computer > Tools > Folder Options > View > UnCheck 'Hide Extensions for known file types' > OK

- C:\Program Files\PostgreSQL\data\postgresql.conf > Right-Click > Open With.. > NotePad > Check 'Always use this program'

- Scroll about half way down to ~Lines 245 - 260:

- The last line of this block of code, for the 'logging_collector', must be changed from On to Off.


------------------------------------------------------------------------------
# ERROR REPORTING AND LOGGING
#------------------------------------------------------------------------------

# - Where to Log -

log_destination = 'stderr' # Valid values are combinations of
# stderr, csvlog, syslog and eventlog,
# depending on platform. csvlog
# requires logging_collector to be on.

# This is used when logging to stderr:
logging_collector = off # Enable capturing of stderr and csvlog

File > Save; File > Close

Start > Programs > PostgreSQL 8.3 > Reload Configuration.

*edit:
- Start > My Computer > C:\Program Files\PostgreSQL\data\pg_log, or C:\Program Files (x86)\PostgreSQL\data\pg_log, if you have 64 bit Vista. Delete all files in that folder. And it might be a good idea to empty your recycle bin at that point, or use a 3rd party utility like CCleaner to clean up all your junk/temporary files. You want to do this before you get to the vacuum and defrag process.

4entourage
08-19-2009, 07:31 AM
logging is off - I have a 7 million hand DB - still has a huuuuuuuge folder in programfiles \ postgreSQL\8.4\DATA --- theres a folder in there "base" that has 5 folders - one of which is 26 gigs.

Regardless - dont realyl care how big it gets - I need to know how to move it to a new partition. (I want to transfer it from C to D: without having to re-install everything or mess with crappy 8.4 SQL again from scratch

fozzy71
08-19-2009, 10:03 AM
..............
Regardless - dont realyl care how big it gets - I need to know how to move it to a new partition. (I want to transfer it from C to D: without having to re-install everything or mess with crappy 8.4 SQL again from scratch

I already told you how to do it. :confused:


I've recently bought a new hard drive and I would like to transfer my Holdem Manager database to the new hard drive, as it is taking up too much space on my old one. How would I go about doing this? (http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=101)..........