Tara Kizer Blog

Tara Kizer

Backup transaction log stored procedure - new version

EDIT: Please see my new version of the isp_Backup stored procedure. Here's the new version for the backup transaction log stored procedure: ---------------------------------------------------------------------------------------------------- -- OBJECT NAME : isp_Backup_TLog -- -- AUTHOR : Tara Duggan -- DATE : May 12, 2004 -- -- INPUTS : @Path - location of the backups -- @Retention - number of days to retain transaction log backups -- OUTPUTS : None -- DEPENDENCIES : None -- -- DESCRIPTION : This stored procedure performs a transaction log backup on the non-log -- shipped user databases that do not have SIMPLE set as the recovery model. Read more →

DBCC INDEXDEFRAG stored procedure - new version

Due to the problem mr_mist found in the DBCC DBREINDEX stored procedure, I have an updated version of the DBCC INDEXDEFRAG sproc as well: ------------------------------------------------------------------------------------------------------ OBJECT NAME : isp_DBCC_INDEXDEFRAG---- AUTHOR : Tara Duggan-- DATE : May 11, 2004---- INPUTS : @dbName - name of the database-- OUTPUTS : None-- DEPENDENCIES : None---- DESCRIPTION : This stored procedure runs DBCC INDEXDEFRAG for each of the indexes in the database. Read more →

Database maintenance routines

EDIT: Updated the link to the new version of isp_Backup. Over the past couple of weeks, I have posted various database maintenance stored procedures. Here's a listing of them: isp_Backup - full, differential, and transaction log backups isp_DBCC_CHECKDB - perform integrity checks on all databases isp_ALTER_INDEX - defragments and rebuilds indexes isp_UPDATE_STATISTICS - performs update statistics on each table in the database isp_Restore - restore newest BAK file in specified directory Do not put these in the master database. Read more →

Backup transaction log stored procedure

EDIT: This stored procedure has been updated. The below stored procedure will backup the transaction log for each of the databases that aren't being log shipped (you don't want to break log shipping by running a transaction log backup outside of the log shipping plan) and also aren't using SIMPLE for the recovery model. Read more →

DBCC DBREINDEX

There are several things that a DBA sets up in a production environment, one of these things is rebuilding the indexes. This is done with DBCC DBREINDEX. Some systems can not afford the locks that are held for long periods of time with DBCC DBREINDEX so they use DBCC INDEXDEFRAG instead. Read more →