Good Maintanence Solution by Ola Hallengren
Mr.Hallengren made a solution for backup, integrity check and index optimization in SQL Server 2005. The solution is based on stored procedures, functions, sqlcmd and SQL Server Agent jobs.
Dynamic selection of databases, e.g. USER_DATABASES.
Database state check.
Robust error handling and logging.
Database backup features.