locked
TFS 2008+SP1 upgrade from TFS 2005- Error 29250.Team Build Upgrade failed

    Question

  •  

    I've had a problem discussed in thread http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=3910016&SiteID=1&mode=1  and Buck Hodges suggested to install combined TFS 2008+SP1 setup as described in http://www.woodwardweb.com/vsts/creating_a_tfs.html and in the latest Team Foundation Installation Guide.

    I was able to quickly pass  step06_MigrateOpenedWorkItems.sql.resources(that had the error before)

    But now I have error in step 8
    Starting execution of steps from step08_CompleteUpgrade.sql.resources
    An error occurred while upgrading the server http://MyServer:8080
      Details: SQL Error #1
    SQL Message: Invalid column name 'DropLocationRoot'.
    SQL LineNumber: 110
    SQL Source: .Net SqlClient Data Provider
    SQL Procedure: prc_AddBuild
    SQL Error #2
    SQL Message: Invalid column name 'Reason'.
    SQL LineNumber: 111
    SQL Source: .Net SqlClient Data Provider
    SQL Procedure: prc_AddBuild
    SQL Error #3
    SQL Message: Invalid column name 'DropLocationRoot'.
    SQL LineNumber: 188
    SQL Source: .Net SqlClient Data Provider
    SQL Procedure: prc_AddBuild
    SQL Error #4
    SQL Message: Invalid column name 'Reason'.
    SQL LineNumber: 199
    SQL Source: .Net SqlClient Data Provider
    SQL Procedure: prc_AddBuild

    System.Data.SqlClient.SqlException: Invalid column name 'DropLocationRoot'.
    Invalid column name 'Reason'.
    Invalid column name 'DropLocationRoot'.
    Invalid column name 'Reason'.
       at Microsoft.TeamFoundation.Server.SqlResourceComponent.MapException(SqlException ex, QueryExecutionState queryState)
       at Microsoft.TeamFoundation.Server.SqlResourceComponent.MapException(SqlException ex)

       at Microsoft.TeamFoundation.Server.SqlResourceComponent.HandleException(SqlException ex)
       at Microsoft.TeamFoundation.Server.SqlResourceComponent.execute(ExecuteType executeType, CommandBehavior behavior)
       at Microsoft.TeamFoundation.Server.SqlResourceComponent.ExecuteNonQuery()
       at Microsoft.TeamFoundation.Build.Upgrade.Upgrade.ExecuteSqlResourceScripts(IList`1 resourceNames)
       at Microsoft.TeamFoundation.Build.Upgrade.Upgrade.Execute()
       at Microsoft.TeamFoundation.Build.Upgrade.Program.Main(String args)
    Exception Data:
    Key: HelpLink.ProdName, Value: Microsoft SQL Server
    Key: HelpLink.ProdVer, Value: 09.00.3042
    Key: HelpLink.EvtSrc, Value: MSSQLServer
    Key: HelpLink.EvtID, Value: 207
    Key: HelpLink.BaseHelpUrl, Value: http://go.microsoft.com/fwlink
    Key: HelpLink.LinkId, Value: 20476

    It seems that prc_AddBuild( that I was able to read using SQL Profiler)

    expects two extra columns in TFSBuild.tbl_Build

     

    Should I just create them like the following

    Alter table tbl_Build

    add DropLocationRoot nvarchar(260) NULL

    Alter table tbl_Build

    add REASON int NULL

     

    Or there is better way to fix the problem?

    Tuesday, September 23, 2008 2:08 PM

Answers

  • Michael, please drop the columns that you hacked in and run repair.  I believe that will fix it.

    Buck
    http://blogs.msdn.com/buckh
    Monday, October 13, 2008 3:02 PM
    Moderator
  •  

    I've added another column

     

    Alter table tbl_Schedule

    add LastEvaluatedOn [datetime] NULL Default(GetDate())

    GO

     

    and finally TFS setup has been completed.

     

    I still need someone to confirm that columns that I created just by guessing are the same that TFS expects.

    Tuesday, September 23, 2008 10:16 PM

All replies

  • I've added 2 columns DropLocationRoot and REASON

    and got the next error

      Details: SQL Error #1
    SQL Message: Invalid column name 'LastEvaluatedOn'.
    SQL LineNumber: 77
    SQL Source: .Net SqlClient Data Provider
    SQL Procedure: prc_StartPendingBuilds

    It should be a better way rather than manually add new columns one by one just to satisfy the SPs.

    Please advice. 

     

    Tuesday, September 23, 2008 2:34 PM
  •  

    I've added another column

     

    Alter table tbl_Schedule

    add LastEvaluatedOn [datetime] NULL Default(GetDate())

    GO

     

    and finally TFS setup has been completed.

     

    I still need someone to confirm that columns that I created just by guessing are the same that TFS expects.

    Tuesday, September 23, 2008 10:16 PM
  •  

    Hi Michael,

     

    I’m glad that this worked for you; however, the steps you’ve taken are not steps we would recommend. It seems strange that you had to go through these steps. If you are willing, I’d like to try and figure out why you had to take these actions.

     

    --Aaron

    Wednesday, September 24, 2008 2:11 PM
    Moderator
  • Hi Aaron,

    Thanks for your reply. It will be interesting to understand, why these columns were missing. And it could help someone else with similar problems.

    Wednesday, September 24, 2008 9:55 PM
  •  

    I have had the same experience.

     

    We initially tried to upgrade to 2008, and upgrade stopped doing anything on the database after about 2 hours while it was running 'step06_MigrateOpenedWorkItems.sql.resources'. The tempdb had grown a fair bit to 20GB, but there was still plently of space left. When all activity on the sql server stopped we found that tempdb kept giving us sql error 1222 'lock request timeout exceeded'. The sql process was running from the tfsbuild database and it could not be killed. canceling the install on the appserver didn't seem to do much either. so we restart sql server, that forced the install to abort.

     

    We then tried the slipstreamed 2008SP1 install, on the partially upgraded database and ran into the same missing column errors reported earlier in this thread. We created the missing columns and the upgrade completed.

     

    We are now trying to decide if we abandon the upgrade and rollback, as we dont know how much confidence we can have in the upgraded databases.

    Friday, September 26, 2008 11:18 PM
  •  

    I decided to restore our database backups to the pre-upgrade state. I then installed 2008 Team Explorer and VS2008SP1 and then the slipstreamed TFS 2008SP1. There were no issues with the database upgrade this time.

     

    The only issue I had during the upgrade was that our database backup was taken before converting the FQDN of the app server to its NETBIOS name. So when running the slipstreamed TFS 2008SP1 it immediately gave a TF220064 error.

     

    As we had no app server software installed, we ran the TFSAdminUtil on our test system to find out how it was modifying the SQL databases and found that it ran a number of stored procedures

     

    exec prc_update_tbl_subscription_address @id=1,@address=N'http://MYSERVER:8086/WorkItemTracking/v1.0/Integration.asmx'
    exec prc_update_tbl_subscription_address @id=2,@address=N'http://MYSERVER:8086/WorkItemTracking/V1.0/SyncEventsListener.asmx'
    exec prc_update_tbl_subscription_address @id=3,@address=N'http://MYSERVER:8086/Warehouse/v1.0/warehousecontroller.asmx'
    exec prc_update_tbl_subscription_address @id=4,@address=N'http://MYSERVER:8086/VersionControl/V1.0/Integration.asmx'

    @Type=N'Reports',@Name=N'BaseReportsUrl',@Url=N'http://MYSERVER:80/Reports'
    exec prc_update_service_interface_url @Type=N'Reports',@Name=N'DataSourceServer',@Url=N'MYSERVER'
    exec prc_update_service_interface_url @Type=N'Reports',@Name=N'ReportsService',@Url=N'http://MYSERVER:80/ReportServer/ReportService.asmx'

    exec prc_get_service_interfaces @registry_entry_type=N'Wss'
    exec prc_update_service_interface_url @Type=N'Wss',@Name=N'BaseServerUrl',@Url=N'http://MYSERVER:80'
    exec prc_update_service_interface_url @Type=N'Wss',@Name=N'BaseSiteUnc',@Url=N'\\MYSERVER\Sites'
    exec prc_update_service_interface_url @Type=N'Wss',@Name=N'BaseSiteUrl',@Url=N'http://MYSERVER:80/sites'

    so I used these sp's to fix the production database, which allowed the install to proceed.

     

    After using the slipstreamed version the only issue I have seen overnight is the project portals don't work correctly; complaining about 'Error initializing Safe control'. Hopefully we'll be able to fix that by upgrade sharepoint from v2 to v3, as i remember seeing something about this problem elsewhere becuase .net 3.5SP1.

     

     

    Saturday, September 27, 2008 1:11 PM
  • Hi Aaron,

     

    The hack by manually adding columns helped to finish installation of TFS 2008+SP1.

    But now when we tried to use builds, we've got the errors(see below).

     

    How can I fix or re-install  only TfsBuild database without affecting sourcecontrol functionality that is working fine?

     

    All SPs are encripted, that make it harder to investigate/workaround.

     

    Description:
    TF53010: The following error has occurred in a Team Foundation component or extension:
    Date (UTC): 7/10/2008 4:08:35 AM
    Machine: Application Domain: /LM/W3SVC/904242201/Root/Build-3-128677648568436123
    Assembly: Microsoft.TeamFoundation.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; v2.0.50727
    Process Details:
      Process Name: w3wp
      Process Id: 5560
      Thread Id: 5716
      Account name:

    Detailed Message: TF53014: A crash report for this problem was recently created; a new crash report for this occurrence of the problem is not being created. This problem has occurred 3 times.
    Web Request Details
        Url: http://MyServer:8080/Build/v2.0/BuildService.asmx [method: POST]
        User Agent: Team Foundation (devenv.exe, 9.0.30729.1)
        Headers: Content-Length=498&Content-Type=application%2fsoap%2bxml%3b+charset%3dutf-8&Accept-Encoding=gzip&Accept-Language=en-AU&Expect=100-continue&Host=MyServer%3a8080&User-Agent=Team+Foundation+(devenv.exe%2c+9.0.30729.1)&X-TFS-Version=1.0.0.0&X-TFS-Session=df97fa8d-07a5-49a6-8b8c-9d23a875b9b4&TF-Instance=df97fa8d-07a5-49a6-8b8c-9d23a875b9b4
        Path: /Build/v2.0/BuildService.asmx
        Local Request: True
        Host Address: 172.28.6.139
        User: Build [authentication type: NTLM]

    Exception Message: Invalid column name 'Reason'.
    .TfsBuild..prc_QueueBuild: Database Update Failure - Error %error="207";% executing INSERT statement for @queuedBuilds (type SqlException)
    SQL Exception Class: 16
    SQL Exception Number: 207
    SQL Exception Procedure: prc_iiQueueBuilds
    SQL Exception Line Number: 239
    SQL Exception Server: MYSERVER
    SQL Exception State: 1
    SQL Error(s):
    SQL Error[1]: System.Data.SqlClient.SqlError: MYSERVER.TfsBuild..prc_QueueBuild: Database Update Failure - Error %error="207";% executing INSERT statement for @queuedBuilds
        Class: 16
        Number: 900004
        Source: .Net SqlClient Data Provider
        State: 1
        Procedure: prc_QueueBuild
        Line Number: 72

    Exception Data Dictionary:
    HelpLink.ProdName = Microsoft SQL Server
    HelpLink.ProdVer = 09.00.3073
    HelpLink.EvtSrc = MSSQLServer
    HelpLink.EvtID = 207
    HelpLink.BaseHelpUrl = http://go.microsoft.com/fwlink
    HelpLink.LinkId = 20476


    Exception Stack Trace:    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
       at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
       at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
       at System.Data.SqlClient.SqlDataReader.get_MetaData()
       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
       at Microsoft.TeamFoundation.Server.SqlResourceComponent.execute(ExecuteType executeType, CommandBehavior behavior)

     

    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

     

     

    Tuesday, October 7, 2008 4:50 AM
  • Michael, please drop the columns that you hacked in and run repair.  I believe that will fix it.

    Buck
    http://blogs.msdn.com/buckh
    Monday, October 13, 2008 3:02 PM
    Moderator
  • Thanks Buck,
    I 've dropped hacked columns, repair of the TFS installation fixed the database.
    I've found that after repair Visual Studio Team Foundation Build Windows Service(TFSBuildService.exe) was running under  NT AUTHORITY\NETWORK SERVICE and I had to change it to TfsServer\TFSBuild.
    After this TFS Build works as expected. 
    Michael Freidgeim, http://geekswithblogs.net/mnf/
    Tuesday, March 31, 2009 10:17 AM