Why do I get an error when StarTeam is running Starteam_sqlserver_dbcc_reindex.sql?

0 Likes

Problem:

Why do I get an error when StarTeam is running Starteam_sqlserver_dbcc_reindex.sql?

Resolution:

  • Product Name: StarTeam
  • Product Version: 2008
  • Product Component: Server
  • Platform/OS Version: Windows 2003
  • JDK/Compiler Version: 1.6.0_02

Description:

Why do I get an error when StarTeam is running Starteam_sqlserver_dbcc_reindex.sql?


Answer/Solution:

The starteam_sqlserver_dbcc.sql script contains a command, DBCC NEWALLOC, that appears to be unsupported by SQL Server 2005. Another command in the script, DBCC CHECKALLOC, does everything that NEWALLOC did, so it is alright to just remove the old command.

Run ALTER INDEX REBUILD command instead of the DBCC REINDEX command as this will work better for SQL Server 2005.

The altered scripts are listed below:

starteam_sqlserver_dbcc.sql

/**************************************************************************************************

Description: Runs database diagnostics

**************************************************************************************************/
SET NOCOUNT ON
---------------------------------------------------------------------------------
DBCC CHECKDB
GO
---------------------------------------------------------------------------------
DBCC CHECKFILEGROUP
GO
---------------------------------------------------------------------------------
DBCC CHECKALLOC
go
---------------------------------------------------------------------------------

starteam_sqlserver_dbcc_reindex.sql

/**************************************************************************************************

Description: Reindexes all the tables in the database

**************************************************************************************************/
SET NOCOUNT ON
begin
SET NOCOUNT ON
EXECUTE sp_MSforeachtable @command1 = "PRINT ""Running Rebuild Index on ?"" ALTER INDEX ALL ON ? REBUILD "
, @postcommand = "PRINT ""Completed Rebuild Index !"""
end
go


Author: Eric Sachar

Old KB# 29155
Comment List
Related
Recommended