重新安装TFS服务器并附加到数据库 [英] Reinstalling TFS Server and attaching to the Databases

查看:162
本文介绍了重新安装TFS服务器并附加到数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已请求SQL DBA将我们的生产TFS数据库复制到我们的开发环境。 我现在正在尝试将新的TFS实例附加到这些数据库。


我在开发服务器上安装TFS并选择TFS安装选项仅应用程序层。


所有准备检查都配置了SQL WMI警告,我忽略并继续安装。


我收到以下错误。我在错误中注意到的是我用粗体扩展了sql DB,它引用了我们的SQL 2008生产实例( oranprodsql \prodsql2008 )。我正在尝试将此配置为SQL Server 2008的开发实例
,即orandevsql \ devsql2008。 这是因为他已将数据库从Prod复制到Dev?


TF255356:配置Team Foundation数据库时发生以下错误:执行服务步骤时出错准备Master数据库对于ATOnlyInstall期间的组件ATOnlyInstall:CreateTfsExecRole.sql第24行错误:授予者执行
没有GRANT权限.Grantor没有GRANT权限..有关详细信息,请参阅配置日志。


以下是一些错误日志


[错误  ; @ 05:53:31.538] CreateTfsExecRole.sql第24行错误:授予者没有GRANT权限。

授予者没有GRANT权限。

[信息   @ 05:53:31.539] Microsoft.TeamFoundation.Framework.Server.CollectionServicingException:CreateTfsExecRole.sql第24行错误:授予者没有GRANT权限。

授权者没有GRANT权限。 ---> System.Data.SqlClient.SqlException:授予者没有GRANT权限。

授权人没有GRANT权限。

  在Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.MapException(SqlException ex,QueryExecutionState queryState)

  在Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.HandleException(SqlException ex)

  在Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.Execute(ExecuteType executeType,CommandBehavior behavior)

  在Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.ExecuteNonQuery(Boolean bindReturnValue)

  在Microsoft.TeamFoundation.Framework.Server.SqlScriptResourceComponent.ExecuteSql(String sqlScriptResourceName,String [] lines,SqlParameter [] sqlParameters)

   ---内部异常堆栈跟踪结束---

  在Microsoft.TeamFoundation.Framework.Server.SqlScriptResourceComponent.ExecuteSql(String sqlScriptResourceName,String [] lines,SqlParameter [] sqlParameters)

  在Microsoft.TeamFoundation.Framework.Server.SqlScriptResourceComponent.ExecuteSql(Stream sqlScriptResource,String sqlScriptResourceName,SqlParameter [] sqlParameters,Boolean retryIfLostConnection)

  在Microsoft.TeamFoundation.Server.Servicing.TFCollection.FrameworkStepPerformer.ExecuteSql(ServicingContext servicingContext,String connectionString,String sqlResourceName,SqlParameter [] sqlParameters,Int32 commandTimeout)

  在Microsoft.TeamFoundation.Server.Servicing.TFCollection.FrameworkStepPerformer.PrepareMasterDatabase(String stepData,ServicingContext servicingContext,Boolean validateOnly)

  在Microsoft.TeamFoundation.Framework.Server.TeamFoundationStepPerformerBase.Microsoft.TeamFoundation.Framework.Server.IStepPerformer.PerformStep(String servicingOperation,String stepType,String stepData,ServicingContext servicingContext)

  在Microsoft.TeamFoundation.Framework.Server.ServicingStepDriver.PerformServicingStep(ServicingStep步骤,ServicingContext servicesContext,ServicingStepGroup组,ServicingOperation servicingOperation,Boolean validateOnly)

[信息   @ 05:53:31.539] [2011-07-18 05:53:31Z]服务步骤准备主数据库失败。 (ServicingOperation:ATOnlyInstall;步骤组:ATOnlyInstall)

[信息   @ 05:53:31.711]清除字典,删除所有项目。

[错误  @ 05:53:31.711] TF255184:操作期间发生错误。消息= TF255356:配置Team Foundation数据库时发生以下错误:执行服务步骤时发生错误在ATOnlyInstall期间为组件ATOnlyInstall
准备主数据库:CreateTfsExecRole.sql第24行错误:授予者没有GRANT权限。 />
授权人没有GRANT权限..有关详细信息,请参阅配置日志..

[错误  @ 05:53:31.712]
$
异常消息:执行服务步骤时发生错误在ATOnlyInstall期间为组件ATOnlyInstall准备主数据库:CreateTfsExecRole.sql第24行错误:授予者没有GRANT权限。

授予者没有GRANT权限。 (类型CollectionServicingException)


异常堆栈跟踪:   在Microsoft.TeamFoundation.Framework.Server.ServicingContext.FinishStep(例外例外)

  在Microsoft.TeamFoundation.Framework.Server.ServicingStepDriver.PerformServicingStep(ServicingStep步骤,ServicingContext servicesContext,ServicingStepGroup组,ServicingOperation servicingOperation,Boolean validateOnly)

  在Microsoft.TeamFoundation.Framework.Server.ServicingStepDriver.PerformOperations(Boolean validateOnly,Int32 stepsToPerform)

  在Microsoft.TeamFoundation.Framework.Server.ServicingStepDriver.Execute(Int32 numberOfStepsToPerform)

  在Microsoft.TeamFoundation.Admin.ApplicationDataTier.Apply(OperationContext context)


内部异常详细信息:


异常消息:CreateTfsExecRole.sql第24行错误:授予者执行没有GRANT许可。

Grantor没有GRANT许可。 (类型CollectionServicingException)


异常堆栈跟踪:   在Microsoft.TeamFoundation.Framework.Server.SqlScriptResourceComponent.ExecuteSql(String sqlScriptResourceName,String [] lines,SqlParameter [] sqlParameters)

  在Microsoft.TeamFoundation.Framework.Server.SqlScriptResourceComponent.ExecuteSql(Stream sqlScriptResource,String sqlScriptResourceName,SqlParameter [] sqlParameters,Boolean retryIfLostConnection)

  在Microsoft.TeamFoundation.Server.Servicing.TFCollection.FrameworkStepPerformer.ExecuteSql(ServicingContext servicingContext,String connectionString,String sqlResourceName,SqlParameter [] sqlParameters,Int32 commandTimeout)

  在Microsoft.TeamFoundation.Server.Servicing.TFCollection.FrameworkStepPerformer.PrepareMasterDatabase(String stepData,ServicingContext servicingContext,Boolean validateOnly)

  在Microsoft.TeamFoundation.Framework.Server.TeamFoundationStepPerformerBase.Microsoft.TeamFoundation.Framework.Server.IStepPerformer.PerformStep(String servicingOperation,String stepType,String stepData,ServicingContext servicingContext)

  在Microsoft.TeamFoundation.Framework.Server.ServicingStepDriver.PerformServicingStep(ServicingStep步骤,ServicingContext servicesContext,ServicingStepGroup组,ServicingOperation servicingOperation,Boolean validateOnly)


内部异常详情:


例外消息:授予者没有GRANT权限。

授予者没有GRANT权限。 (类型SqlException)
$
SQL异常类:16

SQL异常编号:4613

SQL异常程序:

SQL异常行号:23

SQL异常服务器:oranprodsql \prodsql2008

SQL异常状态:1

SQL错误:

SQL错误[1]:System.Data.SqlClient.SqlError:授予者没有GRANT权限。

   等级:16

   号码:4613

   服务器: oranprodsql \prodsql2008

   来源:.Net SqlClient数据提供者

   州:1

   程序:

   行号:25


异常数据字典:

HelpLink.ProdName = Microsoft SQL Server

HelpLink.ProdVer = 10.00.4000

HelpLink.EvtSrc = MSSQLServer

HelpLink.EvtID = 4613

HelpLink.BaseHelpUrl = http://go.microsoft.com/fwlink

HelpLink.LinkId = 20476





异常堆栈跟踪:   在Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.MapException(SqlException ex,QueryExecutionState queryState)

  在Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.HandleException(SqlException ex)

  在Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.Execute(ExecuteType executeType,CommandBehavior behavior)

  在Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.ExecuteNonQuery(Boolean bindReturnValue)

  在Microsoft.TeamFoundation.Framework.Server.SqlScriptResourceComponent.ExecuteSql(String sqlScriptResourceName,String [] lines,SqlParameter [] sqlParameters)


[错误  @ 05:53:31.712] TF255248:由于错误,必须终止应用配置的过程。

[错误  @ 05:53:31.716] TF255247:应用以下配置时发生错误:Microsoft.TeamFoundation.Admin.ConfigurationApplyException:TF255356:配置Team Foundation数据库时发生以下错误:执行服务步骤时出现错误
Prepare ATOnlyInstall期间组件ATOnlyInstall的主数据库:CreateTfsExecRole.sql第24行错误:授予者没有GRANT权限。

授权者没有GRANT权限。有关详细信息,请参阅配置日志。 (执行服务步骤时出错在ATOnlyInstall期间为组件ATOnlyInstall准备主数据库:CreateTfsExecRole.sql第24行错误:授予者执行
没有GRANT权限。

授权者没有GRANT权限。) ---> Microsoft.TeamFoundation.Framework.Server.CollectionServicingException:执行服务步骤时发生错误在ATOnlyInstall期间为组件ATOnlyInstall准备主数据库:CreateTfsExecRole.sql
第24行错误:授予者没有GRANT权限。

授予者没有GRANT许可。 ---> Microsoft.TeamFoundation.Framework.Server.CollectionServicingException:CreateTfsExecRole.sql第24行错误:授予者没有GRANT权限。

授权者没有GRANT权限。 ---> System.Data.SqlClient.SqlException:授予者没有GRANT权限。

授权人没有GRANT权限。

  在Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.MapException(SqlException ex,QueryExecutionState queryState)

  在Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.HandleException(SqlException ex)

  在Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.Execute(ExecuteType executeType,CommandBehavior behavior)

  在Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.ExecuteNonQuery(Boolean bindReturnValue)

  在Microsoft.TeamFoundation.Framework.Server.SqlScriptResourceComponent.ExecuteSql(String sqlScriptResourceName,String [] lines,SqlParameter [] sqlParameters)

   ---内部异常堆栈跟踪结束---

  在Microsoft.TeamFoundation.Framework.Server.SqlScriptResourceComponent.ExecuteSql(String sqlScriptResourceName,String [] lines,SqlParameter [] sqlParameters)

  在Microsoft.TeamFoundation.Framework.Server.SqlScriptResourceComponent.ExecuteSql(Stream sqlScriptResource,String sqlScriptResourceName,SqlParameter [] sqlParameters,Boolean retryIfLostConnection)

  在Microsoft.TeamFoundation.Server.Servicing.TFCollection.FrameworkStepPerformer.ExecuteSql(ServicingContext servicingContext,String connectionString,String sqlResourceName,SqlParameter [] sqlParameters,Int32 commandTimeout)

  在Microsoft.TeamFoundation.Server.Servicing.TFCollection.FrameworkStepPerformer.PrepareMasterDatabase(String stepData,ServicingContext servicingContext,Boolean validateOnly)

  在Microsoft.TeamFoundation.Framework.Server.TeamFoundationStepPerformerBase.Microsoft.TeamFoundation.Framework.Server.IStepPerformer.PerformStep(String servicingOperation,String stepType,String stepData,ServicingContext servicingContext)

  在Microsoft.TeamFoundation.Framework.Server.ServicingStepDriver.PerformServicingStep(ServicingStep步骤,ServicingContext servicesContext,ServicingStepGroup组,ServicingOperation servicingOperation,Boolean validateOnly)

   ---内部异常堆栈跟踪结束---

  在Microsoft.TeamFoundation.Framework.Server.ServicingContext.FinishStep(例外例外)

  在Microsoft.TeamFoundation.Framework.Server.ServicingStepDriver.PerformServicingStep(ServicingStep步骤,ServicingContext servicesContext,ServicingStepGroup组,ServicingOperation servicingOperation,Boolean validateOnly)

  在Microsoft.TeamFoundation.Framework.Server.ServicingStepDriver.PerformOperations(Boolean validateOnly,Int32 stepsToPerform)

  在Microsoft.TeamFoundation.Framework.Server.ServicingStepDriver.Execute(Int32 numberOfStepsToPerform)

  在Microsoft.TeamFoundation.Admin.ApplicationDataTier.Apply(OperationContext context)

   ---内部异常堆栈跟踪结束---

  在Microsoft.TeamFoundation.Admin.ErrorList.HandleError(IResult结果)

  在Microsoft.TeamFoundation.Admin.ErrorList.Add(IResult结果)

  在Microsoft.TeamFoundation.Admin.ApplicationDataTier.Apply(OperationContext context)

  在Microsoft.TeamFoundation.Admin.ConfigurationNode.ApplyIfReady(OperationContext context)

  在Microsoft.TeamFoundation.Admin.ApplicationTier.Install(OperationContext context)

  在Microsoft.TeamFoundation.Admin.ApplicationTier.Apply(OperationContext context)

  在Microsoft.TeamFoundation.Admin.ConfigurationNode.ApplyIfReady(OperationContext context)

  在Microsoft.TeamFoundation.Admin.LogicalTier.Apply(OperationalMode模式)。

[信息   @ 05:53:31.720]


解决方案

您正在尝试恢复您的TFS服务器到另一台服务器,并不像移动数据库那么容易。 您收到该错误的原因是您的TFS数据库当前处于"绑定"状态。到您的生产服务器。 以下是成功移动所需遵循的步骤

http://msdn.microsoft.com/en-us/library/ms404869.aspx


具体来说,这是将你的TFS重定向到的命令新数据库(请务必遵循所有步骤):
TFSConfig RemapDBs / DatabaseName: ServerName ; TFS_Configuration / SQLInstances: ServerName,ServerName2
/ AnalysisInstance: ServerName2 / AnalysisDatabaseName: DatabaseName


I have requested the SQL DBA copy our production TFS Databases to our dev environment.  I am now trying to attach a new TFS instance to these databases.

I am installing TFS on a dev server and selecting the TFS Install option Application Tier Only.

All the readiness check configure fine with SQL WMI warnings which I ignore and continue with installation.

I get the following error. What I have noticed in the error which I have bolded the sql DB which is refering to our production instance of SQL 2008 (oranprodsql\prodsql2008). I am trying to configure this our a dev instance of SQL server 2008 which is orandevsql\devsql2008.  Is this because he has copied the Databases from Prod to Dev?

TF255356: The following error occurred when configuring the Team Foundation databases: Error occurred while executing servicing step Prepare Master database for component ATOnlyInstall during ATOnlyInstall: CreateTfsExecRole.sql Line 24 Error: Grantor does not have GRANT permission.Grantor does not have GRANT permission.. For more information, see the configuration log.

Here is some of the error log

[Error  @05:53:31.538] CreateTfsExecRole.sql Line 24 Error: Grantor does not have GRANT permission.
Grantor does not have GRANT permission.
[Info   @05:53:31.539] Microsoft.TeamFoundation.Framework.Server.CollectionServicingException: CreateTfsExecRole.sql Line 24 Error: Grantor does not have GRANT permission.
Grantor does not have GRANT permission. ---> System.Data.SqlClient.SqlException: Grantor does not have GRANT permission.
Grantor does not have GRANT permission.
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.MapException(SqlException ex, QueryExecutionState queryState)
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.HandleException(SqlException ex)
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.Execute(ExecuteType executeType, CommandBehavior behavior)
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.ExecuteNonQuery(Boolean bindReturnValue)
   at Microsoft.TeamFoundation.Framework.Server.SqlScriptResourceComponent.ExecuteSql(String sqlScriptResourceName, String[] lines, SqlParameter[] sqlParameters)
   --- End of inner exception stack trace ---
   at Microsoft.TeamFoundation.Framework.Server.SqlScriptResourceComponent.ExecuteSql(String sqlScriptResourceName, String[] lines, SqlParameter[] sqlParameters)
   at Microsoft.TeamFoundation.Framework.Server.SqlScriptResourceComponent.ExecuteSql(Stream sqlScriptResource, String sqlScriptResourceName, SqlParameter[] sqlParameters, Boolean retryIfLostConnection)
   at Microsoft.TeamFoundation.Server.Servicing.TFCollection.FrameworkStepPerformer.ExecuteSql(ServicingContext servicingContext, String connectionString, String sqlResourceName, SqlParameter[] sqlParameters, Int32 commandTimeout)
   at Microsoft.TeamFoundation.Server.Servicing.TFCollection.FrameworkStepPerformer.PrepareMasterDatabase(String stepData, ServicingContext servicingContext, Boolean validateOnly)
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationStepPerformerBase.Microsoft.TeamFoundation.Framework.Server.IStepPerformer.PerformStep(String servicingOperation, String stepType, String stepData, ServicingContext servicingContext)
   at Microsoft.TeamFoundation.Framework.Server.ServicingStepDriver.PerformServicingStep(ServicingStep step, ServicingContext servicingContext, ServicingStepGroup group, ServicingOperation servicingOperation, Boolean validateOnly)
[Info   @05:53:31.539] [2011-07-18 05:53:31Z] Servicing step Prepare Master database failed. (ServicingOperation: ATOnlyInstall; Step group: ATOnlyInstall)
[Info   @05:53:31.711] Clearing dictionary, removing all items.
[Error  @05:53:31.711] TF255184: An error occurred during operation. Message=TF255356: The following error occurred when configuring the Team Foundation databases: Error occurred while executing servicing step Prepare Master database for component ATOnlyInstall during ATOnlyInstall: CreateTfsExecRole.sql Line 24 Error: Grantor does not have GRANT permission.
Grantor does not have GRANT permission.. For more information, see the configuration log..
[Error  @05:53:31.712]
Exception Message: Error occurred while executing servicing step Prepare Master database for component ATOnlyInstall during ATOnlyInstall: CreateTfsExecRole.sql Line 24 Error: Grantor does not have GRANT permission.
Grantor does not have GRANT permission. (type CollectionServicingException)

Exception Stack Trace:    at Microsoft.TeamFoundation.Framework.Server.ServicingContext.FinishStep(Exception exception)
   at Microsoft.TeamFoundation.Framework.Server.ServicingStepDriver.PerformServicingStep(ServicingStep step, ServicingContext servicingContext, ServicingStepGroup group, ServicingOperation servicingOperation, Boolean validateOnly)
   at Microsoft.TeamFoundation.Framework.Server.ServicingStepDriver.PerformOperations(Boolean validateOnly, Int32 stepsToPerform)
   at Microsoft.TeamFoundation.Framework.Server.ServicingStepDriver.Execute(Int32 numberOfStepsToPerform)
   at Microsoft.TeamFoundation.Admin.ApplicationDataTier.Apply(OperationContext context)

Inner Exception Details:

Exception Message: CreateTfsExecRole.sql Line 24 Error: Grantor does not have GRANT permission.
Grantor does not have GRANT permission. (type CollectionServicingException)

Exception Stack Trace:    at Microsoft.TeamFoundation.Framework.Server.SqlScriptResourceComponent.ExecuteSql(String sqlScriptResourceName, String[] lines, SqlParameter[] sqlParameters)
   at Microsoft.TeamFoundation.Framework.Server.SqlScriptResourceComponent.ExecuteSql(Stream sqlScriptResource, String sqlScriptResourceName, SqlParameter[] sqlParameters, Boolean retryIfLostConnection)
   at Microsoft.TeamFoundation.Server.Servicing.TFCollection.FrameworkStepPerformer.ExecuteSql(ServicingContext servicingContext, String connectionString, String sqlResourceName, SqlParameter[] sqlParameters, Int32 commandTimeout)
   at Microsoft.TeamFoundation.Server.Servicing.TFCollection.FrameworkStepPerformer.PrepareMasterDatabase(String stepData, ServicingContext servicingContext, Boolean validateOnly)
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationStepPerformerBase.Microsoft.TeamFoundation.Framework.Server.IStepPerformer.PerformStep(String servicingOperation, String stepType, String stepData, ServicingContext servicingContext)
   at Microsoft.TeamFoundation.Framework.Server.ServicingStepDriver.PerformServicingStep(ServicingStep step, ServicingContext servicingContext, ServicingStepGroup group, ServicingOperation servicingOperation, Boolean validateOnly)

Inner Exception Details:

Exception Message: Grantor does not have GRANT permission.
Grantor does not have GRANT permission. (type SqlException)
SQL Exception Class: 16
SQL Exception Number: 4613
SQL Exception Procedure:
SQL Exception Line Number: 23
SQL Exception Server: oranprodsql\prodsql2008
SQL Exception State: 1
SQL Error(s):
SQL Error[1]: System.Data.SqlClient.SqlError: Grantor does not have GRANT permission.
    Class: 16
    Number: 4613
    Server: oranprodsql\prodsql2008
    Source: .Net SqlClient Data Provider
    State: 1
    Procedure:
    Line Number: 25

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


Exception Stack Trace:    at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.MapException(SqlException ex, QueryExecutionState queryState)
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.HandleException(SqlException ex)
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.Execute(ExecuteType executeType, CommandBehavior behavior)
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.ExecuteNonQuery(Boolean bindReturnValue)
   at Microsoft.TeamFoundation.Framework.Server.SqlScriptResourceComponent.ExecuteSql(String sqlScriptResourceName, String[] lines, SqlParameter[] sqlParameters)

[Error  @05:53:31.712] TF255248: The process applying the configuration must be terminated due to an error.
[Error  @05:53:31.716] TF255247: An error occurred while applying the following configuration: Microsoft.TeamFoundation.Admin.ConfigurationApplyException: TF255356: The following error occurred when configuring the Team Foundation databases: Error occurred while executing servicing step Prepare Master database for component ATOnlyInstall during ATOnlyInstall: CreateTfsExecRole.sql Line 24 Error: Grantor does not have GRANT permission.
Grantor does not have GRANT permission.. For more information, see the configuration log. (Error occurred while executing servicing step Prepare Master database for component ATOnlyInstall during ATOnlyInstall: CreateTfsExecRole.sql Line 24 Error: Grantor does not have GRANT permission.
Grantor does not have GRANT permission.) ---> Microsoft.TeamFoundation.Framework.Server.CollectionServicingException: Error occurred while executing servicing step Prepare Master database for component ATOnlyInstall during ATOnlyInstall: CreateTfsExecRole.sql Line 24 Error: Grantor does not have GRANT permission.
Grantor does not have GRANT permission. ---> Microsoft.TeamFoundation.Framework.Server.CollectionServicingException: CreateTfsExecRole.sql Line 24 Error: Grantor does not have GRANT permission.
Grantor does not have GRANT permission. ---> System.Data.SqlClient.SqlException: Grantor does not have GRANT permission.
Grantor does not have GRANT permission.
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.MapException(SqlException ex, QueryExecutionState queryState)
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.HandleException(SqlException ex)
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.Execute(ExecuteType executeType, CommandBehavior behavior)
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.ExecuteNonQuery(Boolean bindReturnValue)
   at Microsoft.TeamFoundation.Framework.Server.SqlScriptResourceComponent.ExecuteSql(String sqlScriptResourceName, String[] lines, SqlParameter[] sqlParameters)
   --- End of inner exception stack trace ---
   at Microsoft.TeamFoundation.Framework.Server.SqlScriptResourceComponent.ExecuteSql(String sqlScriptResourceName, String[] lines, SqlParameter[] sqlParameters)
   at Microsoft.TeamFoundation.Framework.Server.SqlScriptResourceComponent.ExecuteSql(Stream sqlScriptResource, String sqlScriptResourceName, SqlParameter[] sqlParameters, Boolean retryIfLostConnection)
   at Microsoft.TeamFoundation.Server.Servicing.TFCollection.FrameworkStepPerformer.ExecuteSql(ServicingContext servicingContext, String connectionString, String sqlResourceName, SqlParameter[] sqlParameters, Int32 commandTimeout)
   at Microsoft.TeamFoundation.Server.Servicing.TFCollection.FrameworkStepPerformer.PrepareMasterDatabase(String stepData, ServicingContext servicingContext, Boolean validateOnly)
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationStepPerformerBase.Microsoft.TeamFoundation.Framework.Server.IStepPerformer.PerformStep(String servicingOperation, String stepType, String stepData, ServicingContext servicingContext)
   at Microsoft.TeamFoundation.Framework.Server.ServicingStepDriver.PerformServicingStep(ServicingStep step, ServicingContext servicingContext, ServicingStepGroup group, ServicingOperation servicingOperation, Boolean validateOnly)
   --- End of inner exception stack trace ---
   at Microsoft.TeamFoundation.Framework.Server.ServicingContext.FinishStep(Exception exception)
   at Microsoft.TeamFoundation.Framework.Server.ServicingStepDriver.PerformServicingStep(ServicingStep step, ServicingContext servicingContext, ServicingStepGroup group, ServicingOperation servicingOperation, Boolean validateOnly)
   at Microsoft.TeamFoundation.Framework.Server.ServicingStepDriver.PerformOperations(Boolean validateOnly, Int32 stepsToPerform)
   at Microsoft.TeamFoundation.Framework.Server.ServicingStepDriver.Execute(Int32 numberOfStepsToPerform)
   at Microsoft.TeamFoundation.Admin.ApplicationDataTier.Apply(OperationContext context)
   --- End of inner exception stack trace ---
   at Microsoft.TeamFoundation.Admin.ErrorList.HandleError(IResult result)
   at Microsoft.TeamFoundation.Admin.ErrorList.Add(IResult result)
   at Microsoft.TeamFoundation.Admin.ApplicationDataTier.Apply(OperationContext context)
   at Microsoft.TeamFoundation.Admin.ConfigurationNode.ApplyIfReady(OperationContext context)
   at Microsoft.TeamFoundation.Admin.ApplicationTier.Install(OperationContext context)
   at Microsoft.TeamFoundation.Admin.ApplicationTier.Apply(OperationContext context)
   at Microsoft.TeamFoundation.Admin.ConfigurationNode.ApplyIfReady(OperationContext context)
   at Microsoft.TeamFoundation.Admin.LogicalTier.Apply(OperationalMode mode).
[Info   @05:53:31.720]

解决方案

You are trying to restore your TFS server to another server, and it's not as easy as just moving databases.  The reason why you are getting that error is that your TFS databases are currently "tied" to your production server.  These are the steps that you need to follow to do a successful move: http://msdn.microsoft.com/en-us/library/ms404869.aspx

Specifically, this is the command that will redirect your TFS to the new databases (be sure to follow all the steps): TFSConfig RemapDBs /DatabaseName:ServerName;TFS_Configuration /SQLInstances:ServerName,ServerName2 /AnalysisInstance:ServerName2 /AnalysisDatabaseName:DatabaseName


这篇关于重新安装TFS服务器并附加到数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆