An application that I'm writing relies on a Sql Server database. This database is readonly for users of the website that feeds off of the data. However, the application utilizes two roles: Publishers and Readers. Web users fall into the 'Readers' role. Publishers, however have read/write access to the database in order to push changes to it. This is not an uncommon scenario by any stretch.
As the Publishers push out their content, the database log file grows, and grows, and grows. Well I don't need the log file at all, especially since the database can be replaced at anytime simply by dropping it and recreating it. It never ever has need of being backed up either.
Today, my good friend, Scott Golightly, reminded me of the stored proc sp_dboption. Using this stored proc upon creating the database I can avoid more complicated commands later on:
EXEC master.dbo.sp_dboption 'dbName', 'trunc. log on chkpt.', 'TRUE'
rather than the following which also carries the byproduct of requiring that the user be a member of the db_backoperator and db_owner fixed roles:
BACKUP LOG dbName WITH TRUNCATE_ONLY
DBCC SHRINKDATABASE(dbName, TRUNCATEONLY)