Howtos / Articles

Database Recovery models for Microsoft SQL Server

Microsoft SQL server provides three recovery models; full, simple, and bulk-logged. Each have their benefits. The details of the three recovery models is outlined below. You will need to choose the best option for your scenario. For a production database that you need to be able to recover from, the best option will generally be the full recover model. Full recovery model: The full recovery model maintains the entire transaction log history up until the point where the database log…

Read more [...]

Fix Database Integrity Errors in Microsoft SQL Server

Sometimes you may encounter data integrity issues with one or more tables on a Microsoft SQL server. These errors may be found during a data integrity check using DBCC CHECKDB, or even via general use of the database. There are 3 options to correct the database integrity issues; safe repair, restore, and non safe repair (in that order). Its always good practice to take an extra backup before any of these commands are run (specifically the non-safe repair option). Safe…

Read more [...]

Automatically shrink database files in Microsoft SQL 2008

Microsoft SQL server 2008 has the ability to automatically shrink database files. By default this option is disabled. With automatic shrinking of database files turned on, the SQL server will periodically check the available free space within the database files, and will automatically shrink the files if needed. If your database has heavy use, it might be best to keep this option disabled to prevent performace degration. To check what the current auto shrink setting: SELECT DATABASEPROPERTYEX(‘<database_name>’, ‘IsAutoShrink’) Replace <database_name>…

Read more [...]

Enable and Disable Triggers in Microsoft SQL Server

The Microsoft SQL database server supports the use of Triggers on its tables. Triggers are a special kind of stored procedure that can be executed when records in a table are either inserted, updated, or deleted.…

Read more [...]

Enable and Disable Triggers in Firebird

The Firebird database engine supports the use of Triggers on its tables. Triggers are basically a set of SQL scripts that can be executed when data in a table is either inserted, updated, or deleted. Sometimes you may want to temporarily disable a trigger without completely removing it. The steps to do this, and enable the trigger again, are outlined below. Disable Trigger: ALTER TRIGGER <trigger name> INACTIVE; Enable Trigger: ALTER TRIGGER <trigger name> ACTIVE; Replace <trigger name> with the…

Read more [...]



Page 1 of 41234