Hi folks!
I had the chance to make a quick check-in on a trip into town. No time to collect and post stats from the last run or to answer any PMs but I'll reset the forge while I have the chance. No time for a new map for The Forge either.
I do all my DBA stuff from the windows and mysql command lines (and the MySQL Query Browser when needed). I manage the MySQL server with manual my.ini edits and restarting the service (though don't touch that stuff, I have it tweaked just so).
All the details are in the following file on Thor (I save frequently used commands in a file there):
D:\mysql_backup\backup.txt
I backup the db at the windows command prompt with a command stored in that file:
"mysqldump -u theforge theforge > D:\mysql_backup\theforge.sql -p**password-omitted-from-post**"
then zip it and date it in the file name. (e.g.: theforge_2006_10_07.zip)
The db creation/reset script is there as well:
D:\mysql_backup\Dyna2OP2552_theforge.sql
(basically stock but with some fixes not made in the current server releases and a custom database name)
I reset the db with a "\. D:\mysql_backup\Dyna2OP2552_theforge.sql" at the mysql command line.
The currently running copy of The Forge is in:
D:\Program Files\XenoCorp\The Forge
Running with the ProcessSentinel (do not move the server location).
After a reset I start the server directly, wait for a turn (a few minutes) then shut it down and run these two queries to increase the max DVs:
UPDATE MapHex SET EmpireBaseVictoryPoints=EmpireBaseVictoryPoints*2 WHERE EmpireBaseVictoryPoints < 50;
UPDATE MapHex SET CartelBaseVictoryPoints=CartelBaseVictoryPoints*2 WHERE CartelBaseVictoryPoints < 50;
My general strategy for mysql servers is posted here:
http://www.dynaverse.net/forum/index.php/topic,163361953.0.htmlthough it is outdated and I do things a little differently since I last updated that post.
To clean the db:
- Shut down the server (processsentinel first, then the server)
-
Backup the db as described above.
- I use the following query to identify the last initially created BaseAI:
SELECT ID,WONLogon FROM servcharacter ORDER BY ID;
(The first hundred or so characters are the initially created Base AI that should not be cleaned - the first character with a WONLogon generally marks the end of the initally created AI.)
- Then I run a Query like this to gather the IDs of all the other AIs:
SELECT ID FROM servcharacter WHERE ID > XXXX AND WONLogon = '' ORDER BY ID;
(WHERE XXXX is the ID of the last initially created AI)
- I then construct a query using excel that will delete the ships for these AIs:
DELETE FROM ship WHERE Owner IN (XXX1, XXX2,...);
where XXX1, XXX2,... are all the IDs for the non-initally created AIS
Run that query on the db.
- Then I delete these AIs:
DELETE FROM servcharacter WHERE ID > XXXX AND WONLogon = '';
- Presto, db is clean! Start the server back up.
(One could probably create a single query to acheive this task but I never put the effort into it, though it shouldn;t be that hard, it would be nice to do a lean in one query. - Do not use the cleaning query in the build 37 docs: useful_scripts.sql - it does not account for initally created BaseAIs.)
I use the MySQL Query Browser for some of these tasks when it is not practical to use the commandline. (though only my own mysql user has remote access).
After the serverkit has started under the process sentinel, I usually place the kit window in such a way that I can tell if it has crashed and restarted when I login again on the remote session.
I am using a custom build of the serverkit with a few adjustments to how the database IDs are handled in consideration of he OCI as well as nullifying the "racial flavour" code in the serverkit to equalise base production probablitles for all races). So do not use a different build that does not make these allowances.
I think that about covers it! I'll try and make a quick check-in next time I get to town (can't really say when). It should be good for another four months if someone can figure out how to clean it properly. (perhaps test cleaning on a downloaded copy of the db first)
The server is back up now on the same map, back to 2273 mid start. Try not to bork it!
Have fun and stay cool guys!
Bonk
P.S. Frey has the login info for the remote desktop account The Forge is running on.