Posted on November 7th, 2006%
My online baseball game, CSFBL, is a data hog to the tune of about 100GB. Yes, 100GB. That’s how much disk space it takes to store the play-by-play results of some 5 million baseball games (over 2,500 seasons) along with the related player data, historical statisics, and other fun stuff.
The server that powers this beast has three 146GB SCSI drives in a RAID5 configuration. That’s about 250GB of available disk space. Excluding data requirements for such necessities like Windows, SQL Server, tempdb files, web files, and the like, we typically have between 50GB and 100GB of free disk space.
Of course, backing up that database is another story entirely, and if I’m not diligent in keeping the disk clean (by deleting old and unneeded data files), the server can quickly run out of space. This has happened from time to time over the past few years, but a quick cleanup resolves the issue.
Over the weekend I decided to take on major . . .
→ Read More: On disk space and defragmentation
Posted on June 27th, 2006%
Yes, I know that CommunityServer 2.0 has been released months ago, but considering the effort in upgrading (and my lack of time), I’m still using CommunityServer 1.x on CSFBL. It does a fine job for what I need at this time.
However, one thing perturbs me — the fact that new forums in a forum group aren’t added in the correct place when you want alphabetical sorting. There’s a good reason for this: CommuntiyServer manages sort order by using a SortOrder value in the database, allowing you to choose any sort order. However, this works against you when you want to use plain old alphabetical sorting.
The solution is to run a SQL script to update the SortOrder value of each forum such that they will be displayed alphabetically. The following SQL script will show you the forums, current sort order, and new sort order for all forums in a given group.
select sectionid, name, sortorder,
( select count(*) from cs_sections
where groupid = . . .
→ Read More: Reordering forums in CommunityServer 1.x
Posted on March 9th, 2006%
I’ve used Telligent‘s CommunityServer product for about a year and a half now, and it’s proven to be a good (but not great) forums product. (Note: Version 2.0, recently released, seems to correct that issue.)
While doing some maintenance on the forums as installed for my baseball game, CSFBL, I deleted one forum that was still needed. To correct the problem, I restored a copy of a recent backup as a separate database and ran the following SQL scripts to copy the database from the backup to the production copy.
In the following source code, productionforum is the production database name, and productionforum_old is the old (backup) database name. Note that I haven’t moved every column over (such a read flags, attachment links, edit notes, etc.), but the process for those would be pretty much the same.
On to the SQL…
declare @sectionID int
set @sectionID = 0 –replace with the sectionID to move
–1. Move section
set identity_insert productionforum..cs_sections on
INSERT INTO productionforum..cs_Sections(SectionID, SettingsID, . . .
→ Read More: Copying forums between databases in CommunityServer
Posted on August 9th, 2005%
They hit from time to time, slapping their advertisements for online poker or other vices on our .Text blog sites. You can go through the admin console and delete them one at a time, or you can do it from SQL.
delete from blog_content
where parentid <> -1
and title not like 're:%'
That’s a pretty reliable way to purge them — provided your legitimate comments use the default subject line that starts as a reply to the original blog title. You can further filter things down by using a date range, which is useful if you know you were slammed between a few days and don’t want to take the risk of touching anything outside that date range.
delete from blog_content
where parentid <> -1
and dateadded between '2005-06-01' and '2005-06-30'
and title not like . . .
→ Read More: Deleting spam comments in .Text
Posted on September 23rd, 2004%
If you’re developing games and use a database to keep track of things, you’ll be doing yourself some good by reading the article MMP Database Mini-Cookbook: A Half Dozen Recipes To Aid Development by Jay Lee, published yesterday (9/22/04) on Gamasutra. The author provides six tips on designing your database schema to handle multiple shards/servers, localization, class to database relationships, and more.
Lee’s other Gamasutra article, published about a year prior, is equally valuable. Relational Database Guidelines For MMOGs gives some insight into naming standards and basic database best practices that may not be evident to all database developers. Hats off to Lee for two good articles on database design and development in general – and for aiming it at the game . . .
→ Read More: Gamasutra article on multiplayer games and database design
|
|