Here's a package of three useful administrative scripts, one of which is the "Terminate All User Processes" listed below. Here's a brief description of the other two scripts:
uspSetSingleUser (as follows from its name) sets a database in single user /dbo only mode. It utilizes uspKillAllProcesses and can be used for restore database automation.
uspShrinkDbLog7 will replace the transaction log for a given SQL Server 7 database with a new one. Can be a good alternative to DBCC SHRINKFILE in a situation when the transaction log is unintentionally overgrown; for example, as a result of numerous backup log operation failures. It should also work -- but does not make much sense -- with SQL Server 2000.
The scripts are conveniently located in a database called DBAservice. Tested in SQL Server 7, the scripts should also work with SQL Server 2000.
Author: Yul Wasserman
Disclaimer: We hope that the information on these script pages is
valuable to you. Your use of the information contained in these pages,
however, is at your sole risk. All information on these pages is provided
"as -is", without any warranty, whether express or implied, of its accuracy,
completeness, or fitness for a particular purpose...
Back to Database Journal Home