Latest News: OOTP 13 Announced with Screenshots & Feature List! Pre-Order Now! - OOTP Baseball 12 Available! - iOOTP Baseball 2011 Available! - Title Bout Championship Boxing 2.5 released! - Inside the Park Baseball Patch 1.03 released, DEMO now available

Pre-Order OOTP 13, Save & Win! | OOTP 12 Off-Season Special, just $19.99!

Go Back   OOTP Developments Forums > Out of the Park Baseball 12 > OOTP Mods > OOTP Mods - Database Tools

OOTP Mods - Database Tools Do you need to take a dump? SQL gurus welcome

Reply
 
LinkBack Thread Tools Display Modes
Old 09-11-2009, 08:38 AM   #141 (permalink)
Stu
All Star Starter
 
Stu's Avatar
 
Join Date: Dec 2005
Posts: 1,249
Thanks: 17
Thanked 16x in 8 posts
Quote:
Originally Posted by Stu View Post
Also I'm still getting strange permission issues. All folders are currently set to 755 but anytime it needs to write a file I get an error. As an example, I get this when trying to view a players game logs:

If I set the permissions to 777 it works but I obviously don't want to leave them at 777. Is there something wrong in my configuration that would be causing this?
In case anybody else experiences this issue, it was because my web server runs under a user account that didn't have write access to any of the folders on my site. I fixed it by simply changing ownership of the ootpsqlou folder and sqldump folder to the user that runs the web server.

Quote:
Originally Posted by Stu View Post
For anybody who is interested I was able to run the season metrics for all but the first 3 years of my league. I had all my old backups so just imported the backup from before the World Series of each year as if it was an OOTP 9 league. This worked for league files from OOTP 2007, 8 and 9.

I wasn't able to import the first 3 seasons because I can't find the backups.
I was also able to run the season metrics for years where I didn't have data. It needs the park factor data to be set so I set the park factors for the first 3 years equal to the average of the years I did have the data.

Once the park factors table was populated I manually edited the season metrics file to change the $year variable to the year I wanted to run it. This seemed to work fine. Not an exact science since the park factors aren't 100% accurate but it's close enough.
__________________
Brewers League Baseball
Stu is offline   Reply With Quote
Old 09-17-2009, 12:38 PM   #142 (permalink)
All Star Reserve
 
dangarion's Avatar
 
Join Date: Feb 2003
Location: Orange, CA
Posts: 500
Thanks: 5
Thanked 1x in 1 post
Well it looks like my use of StatsLab is over. I merged my DBs together with my host and the new server that I'm on doesn't allow the large DB imports I was previously doing. I tried doing the splitting files thing once, but I don't have an hour to mess around doing that by hand.

My host suggesting doing the import via shell... If I import the SQL files via shell is it going to work? I haven't looking into what exactly the statslab script does when it imports, does it parse information or does it just import?
__________________
DanGarion
GM - Los Angeles Dodgers RWBL
As Real As It Gets!
dangarion is offline   Reply With Quote
Old 09-17-2009, 02:58 PM   #143 (permalink)
Minors (Triple A)
 
snnort's Avatar
 
Join Date: Apr 2004
Posts: 272
Thanks: 16
Thanked 10x in 10 posts
When you say "doesn't allow the large DB imports" are you implying that you can not upload the 61 or so individual SQL files that OOTP dumps? OR that once uploaded, your failing when attempting to press the "Load SQL files" button?

What host do you use?

Last edited by snnort; 09-17-2009 at 02:59 PM.
snnort is offline   Reply With Quote
Old 09-17-2009, 03:01 PM   #144 (permalink)
All Star Reserve
 
dangarion's Avatar
 
Join Date: Feb 2003
Location: Orange, CA
Posts: 500
Thanks: 5
Thanked 1x in 1 post
Quote:
Originally Posted by snnort View Post
When you say "doesn't allow the large DB imports" are you implying that you can not upload the 61 or so individual files? OR that once uploaded, your failing when attempting to press the "Load SQL files" button?

What host do you use?
It's actually 30 or 31 files if I remember correctly. I've been running StatsLab for about 3 or 4 months, but my host no longer allows DB imports of more then 7 MB via web the web based interface.. Thought me saying saying something about splitting the files would explained I'm having a problem with the size of the files, especially since I've never heard of a host blocking multiple files.
__________________
DanGarion
GM - Los Angeles Dodgers RWBL
As Real As It Gets!
dangarion is offline   Reply With Quote
Old 09-17-2009, 04:00 PM   #145 (permalink)
BMW
All Star Starter
 
BMW's Avatar
 
Join Date: May 2003
Location: New Jersey
Posts: 1,471
Thanks: 125
Thanked 491x in 204 posts
dangarion,
I've had that problem for ages. It's such a pain. Make some noise on the post here, where I ask Markus to put in something to automatically break up the files:
Break up very large MySQL files
BMW is offline   Reply With Quote
Old 09-17-2009, 06:31 PM   #146 (permalink)
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 2,724
Thanks: 13
Thanked 255x in 119 posts
Quote:
Originally Posted by dangarion View Post
My host suggesting doing the import via shell... If I import the SQL files via shell is it going to work? I haven't looking into what exactly the statslab script does when it imports, does it parse information or does it just import?
The import handles some things:
1. Translates special characters in player names into a readable character set.
2. Fixes some issues with fields left blank in specific SQL files (e.g. leagues.mysql.sql is missing the last two fields)
3. Updates the StatsLab user table based on the human_managers table out of OOTP.
4. The next StatsLab patch will do some indexing on the tables that Markus doesn't include.
__________________
StatsLab11 - PHP/MySQL based utilities for Online Leagues
Other Mods:
19th Century: Schedules, FaceGen
BBCards: 1887 Allen & Ginter, 1934 Goudey, 1988 Score, 1996 fhomess, 2005 fhomess
FaceGen: 1960-Pres MLB, 32 Colleges, Backgrounds

PEBA - Connecticut Nutmeggers
fhomess is offline   Reply With Quote
Thank you for this post:
dangarion (09-17-2009)
Old 09-17-2009, 06:34 PM   #147 (permalink)
All Star Reserve
 
dangarion's Avatar
 
Join Date: Feb 2003
Location: Orange, CA
Posts: 500
Thanks: 5
Thanked 1x in 1 post
Quote:
Originally Posted by fhomess View Post
The import handles some things:
1. Translates special characters in player names into a readable character set.
2. Fixes some issues with fields left blank in specific SQL files (e.g. leagues.mysql.sql is missing the last two fields)
3. Updates the StatsLab user table based on the human_managers table out of OOTP.
4. The next StatsLab patch will do some indexing on the tables that Markus doesn't include.
Ouch, ok, looks like plan B (use someone elses host for StatsLab).
__________________
DanGarion
GM - Los Angeles Dodgers RWBL
As Real As It Gets!
dangarion is offline   Reply With Quote
Old 09-17-2009, 06:37 PM   #148 (permalink)
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 2,724
Thanks: 13
Thanked 255x in 119 posts
Quote:
Originally Posted by dangarion View Post
Well it looks like my use of StatsLab is over. I merged my DBs together with my host and the new server that I'm on doesn't allow the large DB imports I was previously doing. I tried doing the splitting files thing once, but I don't have an hour to mess around doing that by hand.
What if you, hypothetically had a button to split all SQL files over X size, and then another button that would do the import of all the files after that, using the split files instead. Would that resolve the issue?
__________________
StatsLab11 - PHP/MySQL based utilities for Online Leagues
Other Mods:
19th Century: Schedules, FaceGen
BBCards: 1887 Allen & Ginter, 1934 Goudey, 1988 Score, 1996 fhomess, 2005 fhomess
FaceGen: 1960-Pres MLB, 32 Colleges, Backgrounds

PEBA - Connecticut Nutmeggers
fhomess is offline   Reply With Quote
Old 09-17-2009, 07:13 PM   #149 (permalink)
All Star Reserve
 
dangarion's Avatar
 
Join Date: Feb 2003
Location: Orange, CA
Posts: 500
Thanks: 5
Thanked 1x in 1 post
Quote:
Originally Posted by fhomess View Post
What if you, hypothetically had a button to split all SQL files over X size, and then another button that would do the import of all the files after that, using the split files instead. Would that resolve the issue?
If it would automatically split all the large files (instead of the current way where I have to do them each by hand), and then automatically imported them all that would be better.
__________________
DanGarion
GM - Los Angeles Dodgers RWBL
As Real As It Gets!
dangarion is offline   Reply With Quote
Old 09-17-2009, 07:16 PM   #150 (permalink)
All Star Starter
 
Recte44's Avatar
 
Join Date: Dec 2001
Location: Greendale, WI
Posts: 1,921
Thanks: 24
Thanked 29x in 8 posts
I still can't change the Draft Order and make it stick. Is there some permissions thing I need to change to make this work, and if so, what is it???
Recte44 is offline   Reply With Quote
Old 09-17-2009, 08:00 PM   #151 (permalink)
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 2,724
Thanks: 13
Thanked 255x in 119 posts
Quote:
Originally Posted by dangarion View Post
If it would automatically split all the large files (instead of the current way where I have to do them each by hand), and then automatically imported them all that would be better.
Quote:
Originally Posted by Recte44 View Post
I still can't change the Draft Order and make it stick. Is there some permissions thing I need to change to make this work, and if so, what is it???
PM's sent to both of you.
__________________
StatsLab11 - PHP/MySQL based utilities for Online Leagues
Other Mods:
19th Century: Schedules, FaceGen
BBCards: 1887 Allen & Ginter, 1934 Goudey, 1988 Score, 1996 fhomess, 2005 fhomess
FaceGen: 1960-Pres MLB, 32 Colleges, Backgrounds

PEBA - Connecticut Nutmeggers
fhomess is offline   Reply With Quote
Old 09-17-2009, 08:03 PM   #152 (permalink)
Minors (Triple A)
 
snnort's Avatar
 
Join Date: Apr 2004
Posts: 272
Thanks: 16
Thanked 10x in 10 posts
you are the man, fhomess.
snnort is offline   Reply With Quote
Old 09-17-2009, 08:57 PM   #153 (permalink)
BMW
All Star Starter
 
BMW's Avatar
 
Join Date: May 2003
Location: New Jersey
Posts: 1,471
Thanks: 125
Thanked 491x in 204 posts
You might run into a limit to where PHP can read large files if you use fopen() and fread().

I originally couldn't import a MySQL file that was over 16MB.

Splitting the files fixed that, until PHP wasn't able to split a file over 70MB, because it wasn't capable in opening it. It was exceeding the memory limit.

So I've had to forgo the at_bats file since using OOTP, as it can grow to that size very fast.

If you have a different solution, let me know.
BMW is offline   Reply With Quote
Old 09-21-2009, 08:25 PM   #154 (permalink)
All Star Starter
 
Recte44's Avatar
 
Join Date: Dec 2001
Location: Greendale, WI
Posts: 1,921
Thanks: 24
Thanked 29x in 8 posts
Frank-

Using the Draft Utility now (thanks for fixing it, btw!!) but ran into a new problem....

After the first auto-pick the utility is now randomly auto-picking people! Any ideas?
Recte44 is offline   Reply With Quote
Old 09-22-2009, 04:41 PM   #155 (permalink)
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 2,724
Thanks: 13
Thanked 255x in 119 posts
Quote:
Originally Posted by Recte44 View Post
Frank-

Using the Draft Utility now (thanks for fixing it, btw!!) but ran into a new problem....

After the first auto-pick the utility is now randomly auto-picking people! Any ideas?
PM Sent.
__________________
StatsLab11 - PHP/MySQL based utilities for Online Leagues
Other Mods:
19th Century: Schedules, FaceGen
BBCards: 1887 Allen & Ginter, 1934 Goudey, 1988 Score, 1996 fhomess, 2005 fhomess
FaceGen: 1960-Pres MLB, 32 Colleges, Backgrounds

PEBA - Connecticut Nutmeggers
fhomess is offline   Reply With Quote
Old 10-07-2009, 08:26 AM   #156 (permalink)
All Star Starter
 
Recte44's Avatar
 
Join Date: Dec 2001
Location: Greendale, WI
Posts: 1,921
Thanks: 24
Thanked 29x in 8 posts
Frank,

New/old issue.

Started a new year. Last Sim won't update. Still has last years playoffs boxscores.
Recte44 is offline   Reply With Quote
Old 10-07-2009, 12:04 PM   #157 (permalink)
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 2,724
Thanks: 13
Thanked 255x in 119 posts
Quote:
Originally Posted by Recte44 View Post
Frank,

New/old issue.

Started a new year. Last Sim won't update. Still has last years playoffs boxscores.
Make sure the ootpsqlou/cache directory gets cleared when you update your SQL files. The util should do this automatically when you load your SQL files provided the permissions are there to do so.

Patch 2 will have the ability to turn off the caching functionality.
__________________
StatsLab11 - PHP/MySQL based utilities for Online Leagues
Other Mods:
19th Century: Schedules, FaceGen
BBCards: 1887 Allen & Ginter, 1934 Goudey, 1988 Score, 1996 fhomess, 2005 fhomess
FaceGen: 1960-Pres MLB, 32 Colleges, Backgrounds

PEBA - Connecticut Nutmeggers

Last edited by fhomess; 10-07-2009 at 01:48 PM.
fhomess is offline   Reply With Quote
Old 10-11-2009, 12:21 PM   #158 (permalink)
All Star Starter
 
Recte44's Avatar
 
Join Date: Dec 2001
Location: Greendale, WI
Posts: 1,921
Thanks: 24
Thanked 29x in 8 posts
Still not working even after I manually cleared out the cache folder. It's June of 1971 now and Last Sim is still from the 1970 playoffs.
Recte44 is offline   Reply With Quote
Old 10-12-2009, 03:03 AM   #159 (permalink)
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 2,724
Thanks: 13
Thanked 255x in 119 posts
Quote:
Originally Posted by Recte44 View Post
Still not working even after I manually cleared out the cache folder. It's June of 1971 now and Last Sim is still from the 1970 playoffs.
There are 3 possible causes of old data showing up in the util:
1. The files are still in your ootpsqlou/cache folder.
2. Your SQL database didn't get updated.
3. The web page is cached in your browser.
__________________
StatsLab11 - PHP/MySQL based utilities for Online Leagues
Other Mods:
19th Century: Schedules, FaceGen
BBCards: 1887 Allen & Ginter, 1934 Goudey, 1988 Score, 1996 fhomess, 2005 fhomess
FaceGen: 1960-Pres MLB, 32 Colleges, Backgrounds

PEBA - Connecticut Nutmeggers
fhomess is offline   Reply With Quote
Old 10-15-2009, 12:26 PM   #160 (permalink)
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 2,724
Thanks: 13
Thanked 255x in 119 posts
Patch #2 has been released for use with OOTPX 10.4. Please do not use this patch until you upgrade to 10.4 (to be released later today). If you're using the development tracker, you'll want to use this patch as soon as you upgrade as there are some changes to how ratings are listed in the SQL dump.

Cheers!
__________________
StatsLab11 - PHP/MySQL based utilities for Online Leagues
Other Mods:
19th Century: Schedules, FaceGen
BBCards: 1887 Allen & Ginter, 1934 Goudey, 1988 Score, 1996 fhomess, 2005 fhomess
FaceGen: 1960-Pres MLB, 32 Colleges, Backgrounds

PEBA - Connecticut Nutmeggers
fhomess is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 11:16 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0
Copyright © 2009 Out of the Park Developments