Q: How do I reduce my Message Database file?

A: The following procedure can be used to reduce the size of a RamPage message database that has grown due to infrequent use of the message purge utility. Once performed, increase the frequency of using the message purge utility to keep the message database file at a reasonable size.

The procedure is not officially supported, and should only be performed by a system manager familiar with RMS, FDL, and CONVERT file operations.

--- Step 1 ---

Purge unwanted records from the RamPage Message Database.
$ RAMPAGE/MESSAGE/PURGE

--- Step 2 ---

Create an FDL definition for a new empty RamPage Message Database File. For simplicity, you can cut and paste the text below directly into a DCL terminal session.
$ CREATE SYS$RAMPAGE:RAMPAGE_MDB.FDL
TITLE	"RamPage Message Database"

IDENT	" 3-JUN-1993 12:53:43   VAX-11 FDL Editor"

SYSTEM
	SOURCE			"VAX/VMS"

FILE
	NAME			"rampage.mdb"
	ORGANIZATION		indexed

RECORD
	CARRIAGE_CONTROL	carriage_return
	FORMAT			fixed
	SIZE			468

AREA 0
	ALLOCATION		1143
	BEST_TRY_CONTIGUOUS	yes
	BUCKET_SIZE		9
	EXTENSION		288

AREA 1
	ALLOCATION		18
	BEST_TRY_CONTIGUOUS	yes
	BUCKET_SIZE		9
	EXTENSION		9

AREA 2
	ALLOCATION		396
	BEST_TRY_CONTIGUOUS	yes
	BUCKET_SIZE		6
	EXTENSION		108

KEY 0
	CHANGES			no
	DATA_AREA		0
	DATA_FILL		100
	DATA_KEY_COMPRESSION	yes
	DATA_RECORD_COMPRESSION	yes
	DUPLICATES		no
	INDEX_AREA		1
	INDEX_COMPRESSION	yes
	INDEX_FILL		100
	LEVEL1_INDEX_AREA	1
	NAME			"Message Identifier"
	PROLOG			3
	SEG0_LENGTH		16
	SEG0_POSITION		0
	TYPE			string

KEY 1
	CHANGES			no
	DATA_AREA		2
	DATA_FILL		100
	DATA_KEY_COMPRESSION	yes
	DUPLICATES		no
	INDEX_AREA		2
	INDEX_COMPRESSION	yes
	INDEX_FILL		100
	LEVEL1_INDEX_AREA	2
	NAME			"Receiver & Date/Time (Ascending)"
	SEG0_LENGTH		12
	SEG0_POSITION		28
	SEG1_LENGTH		16
	SEG1_POSITION		0
	TYPE			string

KEY 2
	CHANGES			no
	DATA_AREA		2
	DATA_FILL		100
	DATA_KEY_COMPRESSION	yes
	DUPLICATES		no
	INDEX_AREA		2
	INDEX_COMPRESSION	yes
	INDEX_FILL		100
	LEVEL1_INDEX_AREA	2
	NAME			"Receiver & Date/Time (Descending)"
	SEG0_LENGTH		12
	SEG0_POSITION		28
	SEG1_LENGTH		16
	SEG1_POSITION		0
	TYPE			dstring

KEY 3
	CHANGES			no
	DATA_AREA		2
	DATA_FILL		100
	DATA_KEY_COMPRESSION	yes
	DUPLICATES		no
	INDEX_AREA		2
	INDEX_COMPRESSION	yes
	INDEX_FILL		100
	LEVEL1_INDEX_AREA	2
	NAME			"Sender & Date/Time (Ascending)"
	SEG0_LENGTH		12
	SEG0_POSITION		16
	SEG1_LENGTH		16
	SEG1_POSITION		0
	TYPE			string

KEY 4
	CHANGES			no
	DATA_AREA		2
	DATA_FILL		100
	DATA_KEY_COMPRESSION	yes
	DUPLICATES		no
	INDEX_AREA		2
	INDEX_COMPRESSION	yes
	INDEX_FILL		100
	LEVEL1_INDEX_AREA	2
	NAME			"Sender & Date/Time (Descending)"
	SEG0_LENGTH		12
	SEG0_POSITION		16
	SEG1_LENGTH		16
	SEG1_POSITION		0
	TYPE			dstring

KEY 5
	CHANGES			no
	DATA_AREA		2
	DATA_FILL		100
	DATA_KEY_COMPRESSION	yes
	DUPLICATES		no
	INDEX_AREA		2
	INDEX_COMPRESSION	yes
	INDEX_FILL		100
	LEVEL1_INDEX_AREA	2
	NAME			"Message Identifier (Descending)"
	SEG0_LENGTH		16
	SEG0_POSITION		0
	TYPE			dstring
$ EXIT

--- Step 3 ---

Create a new, empty message database file at its minimum size.
$ CREATE/FDL=SYS$RAMPAGE:RAMPAGE_MDB.FDL SYS$RAMPAGE:RAMPAGE.MDB_NEW

--- Step 4 ---

Stop all processes that are accessing the current message database. Repeat this procedure on all systems licensed for RamPage, and/or all systems in a cluster referencing the same SYS$RAMPAGE:RAMPAGE.MDB file.
$ SHOW DEVICE/FILES/OUT=temp.tmp SYS$RAMPAGE
$ SEARCH temp.tmp RAMPAGE.MDB
$ STOP/ID=pid1
$ STOP/ID=pid2
...etc.

--- Step 5 ---

Move all records from the oversized original message database to the new smaller message database.
$ CONVERT/STATISTICS
_Input: SYS$RAMPAGE:RAMPAGE.MDB
_Output:SYS$RAMPAGE:RAMPAGE.MDB_NEW

$ RENAME/LOG
_From: SYS$RAMPAGE:RAMPAGE.MDB
_To: SYS$RAMPAGE:RAMPAGE.MDB_OLD

$ RENAME/LOG
_From: SYS$RAMPAGE:RAMPAGE.MDB_NEW
_To: SYS$RAMPAGE:RAMPAGE.MDB

After you have confirmed that the messages are accessible in the new smaller file, you may wish to backup the original file. Then, you may delete it:
  
$ DELETE/LOG/CONFIRM SYS$RAMPAGE:RAMPAGE.MDB_OLD

--- Step 6 ---

Restart RamPage on all licensed systems.       Top
$ @SYS$STARTUP:RAMPAGE$STARTUP