Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database maintenace tasks 2

Status
Not open for further replies.

ColinM

Programmer
Jun 29, 2000
189
TH
Hi,
I have a database which will not be used at night, so should I run any procedures on it.
i.e.

DBCC CHECKDB
DBCC DBREINDEX (ALL TABLES)

Should these be run before or after the backup?
Is it possible to be alerted if there is a problem with these commands, if so how?
 
1- Yes, run maintenance off-hours.
2- Run before backup. There are at least two reasons for this.
If there is a problem you don't want to backup a bad database.
Reindex creates transactions. You want to backup to clear the transaction log.
3- Setup a job to run these commands with notification turned on.

The easiest way to do this in SQL 7 and above is to use the wizard to create a maintenance plan. Terry
 
Thanks Terry,
Out of curosity, how do people backup up their databases.

Do you use just one file and overwrite daily
(what happens if the power dies half-through??)
Or a rotating tabe backup?
or something else?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top