Don’t PURGE or COMPACT Your Database When In Use

A Fabrication Database that’s well managed should have changes being made. This can mean things like materials, specifications, services, connectors and such may be occasionally deleted and removed. If there are proxy items in your database that have {brackets} around them, they should be made permanent or removed as well.

The way to do this is to PURGE and/or COMPACT your database, You can do this by typing PURGEDB on AutoCAD’s command line or by selecting File -> Setup -> Manage Database from ESTmep or CAMduct as sown in the following image.

When you initiate this process, you’ll be presented with a standard “Backup Your Database…” warning which you can click OK to.

From there, you are then presented with the following dialog.

Items that show up here are the ones that show up with {Brackets} in your database, They should either be made permanent or removed in a well managed system.

The Make Permanent option is fairly safe. The items are in your database already there and already have indexes assigned.

On the other hand, the Purge Database option will remove them from your database. When you do this, the’s a chance that some of the database indexes will change as those indexes are how the various database tables relate to each other.

If you do this while others are using the database in CADmep, ESTmep or CAMduct, they already have the database tables loaded into memory. Depending what they are doing, some activities may cause parts of the database to be reloaded while others are not. When this happens, strange things can happen to your drawing…your systems might loose their service or change services or connectors change without notice. More times than not, unless you catch it right away,by the time you find the issue you’ll need to remodel your data or retrieve it from a backup.

In a Database, records are not actually deleted so while the Purge command appears to remove items from the database, it  actually just flags them as being unused so those areas in the database can be overwritten with new data later. This is where Compacting the database comes into play. The Compact the Database Now option will rewrite and re-sequence all the database files and their indexes to recapture that unused space. Again, this causes issues for others who are currently referencing the database and doing work.

While there is danger in using these commands, they should be used to properly manage your database. The key here is to use them after hours when other users are not using the database. Another option would be to do your development work in a copy of the database so nobody is ever “using” the database you’re performing administration work in. When you’re done, you can “copy” this database to the production database but again, after hours when nobody is doing work or you could have all users log out temporarily (perhaps at lunch) and copy the database then.

To the best of my knowledge, this issue is NOT present for those of you using Revit with Fabrication parts. Revit loads in your services and content and caches it in the Revit model. It doesn’t reference the database configuration again while you work unless you manually “reload” the configuration, So unlike CADmep, ESTmep or CAMduct which may reload parts of your database just by using the software, Revit won’t do this unless you manually reload in which care it will reload everything and keep all those database sequences sin check.

If you’ve ever opened an AutoCAD drawing and your parts appeared orphaned from their services, connectors changed to things that don’t make sense or your Cast Iron NoHub Waste system suddenly reports as Rectangular Supply Air, this likely was the cause and this Best Practice is for you.