\name{asp.repairAllTables} \alias{asp.repairAllTables} \title{ This function runs repair tables on all tables in a StatShop database. } \usage{ asp.repairAllTables() } \arguments{ } \description{ This is a utility statement which runs the \code{REPAIR TABLE} statement on every table in the database. It is intended for situations in which StatShop crashed in the middle of a run. It should do no harm, but is necessary before resuming a run. It is also recommended that the \code{trimTables} function be run after the crash as well. This function requires a connection to the database. } \section{Side Effects}{ Damage to the database caused by improper shutdown is repaired. } \references{ \emph{MySQL Manual}. } \seealso{ \code{\link{asp.dbConnect}}, \code{\link{asp.trimTables}} } \examples{\dontrun{ ###Connect to database asp.dbConnect(user="ralmond",dbname="MCMC") asp.repairAllTables() ###Check status of chains getCycles() ### You will want to run this next part manually. ### Adjust the chain a couple of cycles back to be sure all is ### cleanly written. For example, if # > getCycles() # chain_first_cycle chain_last_cycle # 1 1 3000 # 2 1 1270 # 3 1 -1 ## Then you might use: asp.trimTables(1268,chain=2) ## Again for sanity check. getCycles() } } \keyword{database} \keyword{utilities}