SQL 如何修复 TF246017 Team Foundation 服务器无法连接到数据库

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/26012081/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-01 02:40:33  来源:igfitidea点击:

How to fix TF246017 The Team foundation server could not connect to database

sqlsql-servervisual-studio-2010tfs

提问by Vignesh Paramasivam

I'm getting nothing but this error TF246017I'm not able to access TFS as admin or domain user

除了这个错误TF246017我什么也没得到我无法以管理员或域用户的身份访问 TFS

  1. While accessing administration console, showing the error TF246017
  2. Domain users getting TF31001where the server returns TF246017
  1. 访问管理控制台时,显示错误 TF246017
  2. 域用户到达TF31001服务器返回的位置TF246017

TFS was working fine with SQL Server 2008. And now we have also installed SQL server 2012 in the same machine.( I believe it doesn't connected anyway to tfs server)

TFS 在 SQL Server 2008 上运行良好。现在我们还在同一台机器上安装了 SQL Server 2012。(我相信它无论如何都没有连接到 tfs 服务器)

But, even after uninstalling SQL 2012, it displays the same error

但是,即使在卸载 SQL 2012 之后,它也会显示相同的错误

In application tier/ database tier, getting error as Error retrieving value.

在应用程序层/数据库层,获取错误为Error retrieving value.

Unable to access http://xxxxxxx:8080/tfsdisplays same error TF246017

无法访问http://xxxxxxx:8080/tfs显示相同的错误TF246017

And also, im unable to locate the sql express database to take the backup.

而且,我无法找到 sql express 数据库来进行备份。

Howto resolve this issue?

如何解决这个问题?

Note : I'm using TFS 2012 and VS2010

注意:我使用的是 TFS 2012 和 VS2010

回答by Shamiullah Mustafa

Step 1: Login to windows server using the same windows credential user you used during SQL Server installation.

步骤 1:使用您在 SQL Server 安装期间使用的相同 Windows 凭据用户登录到 Windows Server。

Step 2: Verify or add the new windows user credential (assuming you are using different user credential to connect to TFS) to be part of sysadmin user group in SQL Server or ask your SQL Server DBA to add the user to sysadmin group. Note: This is required because for every new TFS Team project created, TFS presents 2 option empty database or new database. To create new database the TFS admin user have to be part of SQL server sysadmin group

步骤 2:验证或添加新的 Windows 用户凭据(假设您使用不同的用户凭据连接到 TFS)成为 SQL Server 中 sysadmin 用户组的一部分,或要求您的 SQL Server DBA 将用户添加到 sysadmin 组。注意:这是必需的,因为对于创建的每个新 TFS 团队项目,TFS 都会提供 2 个选项空数据库或新数据库。要创建新数据库,TFS 管理员用户必须是 SQL Server sysadmin 组的一部分

Step 3: If TFS 2012 was installed using the same windows credential, open the TFS Admin console and add or verify the user is listed in "administration Console Users" list. If TFS Admin console reads "You do not have permission or not administrator" or something along this line, then you need to log out and log back using the correct windows credential used for installation or use one of the TFS admin user and then add the new user credential.

步骤 3:如果 TFS 2012 是使用相同的 Windows 凭据安装的,请打开 TFS 管理控制台并添加或验证用户是否列在“管理控制台用户”列表中。如果 TFS 管理控制台显示“您没有权限或不是管理员”或类似内容,则您需要注销并使用用于安装的正确 Windows 凭据重新登录或使用 TFS 管理员用户之一,然后添加新用户凭据。

Recommendation: To avoid confusion I would recommend use the same user credential for SQL Server and TFS server. Ex: "domainname/tfs" is local admin to the server, sysadmin in SQL Server DB and also admin user to TFS server.

建议:为避免混淆,我建议对 SQL Server 和 TFS 服务器使用相同的用户凭据。例如:“域名/tfs”是服务器的本地管理员,SQL Server DB 中的系统管理员,也是 TFS 服务器的管理员用户。

To make like simple start of by, adding the windows user (intended to use as TFS admin) as windows administration group. Then logout and log back using the TFS admin user to install SQL Server and TFS server.

为了简单起见,添加 windows 用户(打算用作 TFS 管理员)作为 windows 管理组。然后注销并使用 TFS 管理员用户重新登录以安装 SQL Server 和 TFS 服务器。

Hope this helps

希望这可以帮助

回答by David Rogers

I had a similar issue branch code in my version of TFS (Azure DevOps Premise). I tracked my issue down by looking at the event viewer on the local TFS server and found that I was that I was getting the following SQL error:

我的 TFS 版本(Azure DevOps Premise)中有一个类似的问题分支代码。我通过查看本地 TFS 服务器上的事件查看器来跟踪我的问题,发现我收到以下 SQL 错误:

DESCRIPTION: SQL Server Assertion: File: , line=951 Failed Assertion = 'IS_OFF (BUF_MINLOGGED, m_buf->bstat) || pageModifyType != PageModifyType_Contents || GetPagePtr ()->IsTextPage ()'. This error may be timing-related. If the error persists after rerunning the statement, use DBCC CHECKDB to check the database for structural integrity, or restart the server to ensure in-memory data structures are not corrupted.

描述:SQL Server 断言:文件:, line=951 Failed Assertion = 'IS_OFF (BUF_MINLOGGED, m_buf->bstat) || pageModifyType != PageModifyType_Contents || GetPagePtr()->IsTextPage()'。此错误可能与时间有关。如果重新运行语句后错误仍然存​​在,请使用 DBCC CHECKDB 检查数据库的结构完整性,或重新启动服务器以确保内存中的数据结构未损坏。

I found the first item in the following answersolved my issue.

我发现以下答案中的第一项解决了我的问题。

I simply switched my main TFS database containing my collection to FULL recovery modeand I was immediately able to proceed with my previously erroring task.

我只是将包含我的集合的主 TFS 数据库切换到完全恢复模式,我立即能够继续执行我之前出错的任务。

回答by Mahesh Dare

Just find out the Team foundation application under application pool. right click and go to advance setting set the identity using the credentials used for SQL Sever or TFS Admin and done ..you can now access the TFS as earlier.

只需找出应用程序池下的团队基础应用程序即可。右键单击并转到高级设置,使用用于 SQL Sever 或 TFS Admin 的凭据设置身份并完成..您现在可以像以前一样访问 TFS。

回答by Kidquick

Connect to your SQL instance via SQL Server Management Studio and check if any of the TFS databases are in a "Recovery Pending" state. If so, restart your SQL instance and the state should return to normal. Worked for me!

通过 SQL Server Management Studio 连接到您的 SQL 实例并检查是否有任何 TFS 数据库处于“恢复挂起”状态。如果是这样,请重新启动您的 SQL 实例,状态应该会恢复正常。对我来说有效!