tfs sql查询

介绍 ( Introduction )

More often than not (at least in places I’ve worked at), the job of installing, configuring and subsequent administration of Team Foundation Server (TFS) is performed by different individuals to those administering enterprise applications such as Windows Server, SQL Server, SharePoint etc. This is because TFS, unlike other enterprise applications, often has to be administered from both the server side (i.e. TFS Administration Console) as well as the client side (i.e. using Team Explorer in Visual Studio) – it is thus not surprising that a TFS administrators may once had been a developer. The benefit of having a TFS administrator with a software development experience is that it may be easy to get developer-buy-in into the tool. However, the disadvantage to this is that developers usually get accustomed to doing things in a certain way – like connecting to SQL Server using (local) convenience names.

通常(至少在我工作过的地方),Team Foundation Server(TFS)的安装,配置和后续管理工作是由与管理Windows Server,SQL Server, SharePoint等。这是因为与其他企业应用程序不同,TFS通常必须同时在服务器端(即TFS管理控制台)和客户端(即在Visual Studio中使用Team Explorer)进行管理–这并不奇怪TFS管理员可能曾经是开发人员。 拥有具有软件开发经验的TFS管理员的好处是,很容易让开发人员买入该工具。 但是,这样做的缺点是,开发人员通常习惯于以某种方式执行操作,例如使用(本地)便捷名称连接到SQL Server。

In this article we will take you through some of the lessons to look out for when configuring TFS as ignoring them would prove detrimental to the configuration of the tool. We also compare the configuration of SharePoint Server farm against that of TFS and illustrate why you have to pay a closer attention to TFS. We later conclude by recommending that the installation and configuration of TFS has to be a joint exercise between administrators of various applications and systems.

在本文中,我们将引导您完成一些教训,以了解配置TFS时的情况,因为忽略它们会损害该工具的配置。 我们还将SharePoint Server服务器场的配置与TFS的配置进行了比较,并说明了为什么您必须更加注意TFS。 后来,我们通过建议必须将TFS的安装和配置作为各种应用程序和系统的管理员之间的共同练习来得出结论。

第1课:不要使用方便名称作为SQL Server标识符名称 ( Lesson #1: Refrain from using convenience names as SQL Server identifier name )

Although, you can get away with using convenience names (i.e. a dot, (local), or locahost) as SQL Server identifier name during the configuration of a SharePoint server farm as shown in Figures 2 & 3, such a practice is not allowed during configuration of TFS (as shown in Figure 1).

虽然,你可以逃脱SharePoint服务器场的配置过程中使用便利的名字(即一个点,(本地),的locahost)与SQL Server标识符名称, 如图 23,这种做法是不允许的在配置TFS时( 如图1所示)。

The reason for this is that a successful configuration of TFS leads to the creation of databases – if you hosting the databases in an environment that has other instances, you can make a mistake of creating databases in the wrong instance. Although you can later move databases around, I reckon it’s rather better to do things right in the first place and that’s include correctly supplying the full names of the instance in which databases should be created.

原因是成功配置TFS会导致数据库的创建–如果将数据库托管在具有其他实例的环境中,则可能会在错误的实例中创建数据库而犯错误。 尽管您以后可以移动数据库,但我认为最好首先做一些事情,这包括正确提供应该在其中创建数据库的实例的全名。

第2课:SQL Server SID重复 ( Lesson #2: SQL Server SID duplicate )

In all fairness, the errors that lead to Lesson #2 are usually not caused by a SQL Server administrators or that you may have former developer masquerading as TFS administrators. Instead such errors are as a result to machine name changes possibly at the hands of Windows Server administrators. For instance, a change in the domain name in which SQL Server is installed (in our example, the domain name was renamed from computer generated WIN-QK43RU4ULNS to SELECTSIFISOLAB) often doesn’t break the functioning of SQL Server (and its related services) but the change does lead to a SQL Server login security identifier (SID) duplicate error that is depicted in Figure 4.

公平地说,导致第2课的错误通常不是由SQL Server管理员引起的,或者您以前的开发人员可能伪装成TFS管理员。 相反,此类错误是由于计算机名称更改的结果,可能是Windows Server管理员所为。 例如,更改安装SQL Server的域名(在我们的示例中,域名从计算机生成的WIN-QK43RU4ULNS重命名为SELECTSIFISOLAB )通常不会破坏SQL Server(及其相关服务)的功能但是更改确实导致SQL Server登录安全标识符(SID)重复错误, 如图4所示

Although the highlighted error message shown in Figure 4 refers to “SQL Server login”, this error really relates to windows-level principals that are based off windows domain or local logins.

虽然突出显示的错误消息如图4所示 指“ SQL Server登录”,此错误确实与基于Windows域或本地登录的Windows级主体有关。

Anyway, what happens is that generally every principal is assigned a uniqueidentifier generated-value called the security identifier (SID). There is often a one to one relationship between a SID and a principal but in some circumstances – a single SID may *seem to* be shared amongst more than one principal. Notice the emphasis on “seem to”? This is because, although – the changes may have been made to the workgroup or domain, technically – the linking of SID principal hasn’t changed i.e. although I have logged into SQL Server Management Studio using SELECTSIFISOLAB\Administrator as shown in Figure 6, SQL Server still has the administrator principal linked to the WIN-QK43RU4ULNS domain – thus, the source our SID conflict.

无论如何,什么情况是,一般每主要被分配称为安全标识符(SID) 唯一标识符生成值。 一个SID与一个委托人之间通常存在一对一的关系,但是在某些情况下–单个* SID可能*似乎*在多个委托人之间共享。 注意到对“似乎”的强调了吗? 这是因为,尽管-从技术上来说可能已对工作组或域进行了更改-SID主体的链接没有更改,即,尽管我已使用SELECTSIFISOLAB \ Administrator登录到SQL Server Management Studio, 如图6所示,SQL服务器仍然具有链接到WIN-QK43RU4ULNS域的管理员主体,因此,源是我们的SID冲突。

This is in contrast to the configuration of SharePoint whereby we are still able to proceed with our configuration in spite of SID conflicts. For instance, having specified the principal to access the database server as SELECTSIFISOLAB\Administrator (as shown in Figure 7), following the configuration – the principal mapped to SharePoint databases is still WIN-QK43RU4ULNS\Administrator (shown in Figure 8).

这与SharePoint的配置相反,SharePoint的配置尽管存在SID冲突,但仍然能够继续进行配置。 例如,已指定访问数据库服务器的主体为SELECTSIFISOLAB \ Administrator (如在 7中示出),配置以下- WIN-QK43RU4ULNS \ 管理员主要映射到SharePoint数据库仍然是( 8中示出)。

There a several ways that we can address SID conflict errors – all the solutions require that you as a TFS administrator, step out of your “comfort zone” and request assistance from SQL Server and/or Windows administrators (after all, they are the cause of your misfortunes, right? ).

我们有几种方法可以解决SID冲突错误-所有解决方案都要求您作为TFS管理员,退出“舒适区”,并请求SQL Server和/或Windows管理员提供帮助(毕竟,这是原因你的不幸,对吗?)。

  1. SQL Server side

    SQL Server端

    From the SQL Server side, you can replace the old principal with the newer one using one of the following methods:

    从SQL Server方面,可以使用以下方法之一将旧的主体替换为较新的主体:

    Rename using SQLCMD

    使用SQLCMD重命名

    Follow the suggestion provided in the error message (in Figure 4) and use SQLCMD to alter the login as shown in Figure 9.

    遵循错误消息中提供的建议( 图4 ),并使用SQLCMD更改登录名, 如图9所示。

    Figure 9: SQLCMD command 图9:SQLCMD命令

    Rename using SSMS

    使用SSMS重命名

    In management studio, you can run the below script:

    在Management Studio中,您可以运行以下脚本:

    Figure 10: TSQL Login script-change 图10:TSQL登录脚本更改

    Remove and Add New Login

    删除并添加新登录

    Another alternative to renaming conflicting principals would be to delete the old principal (WIN-QK43RU4ULNS\Administrator) and add a new principal (SELECTSIFISOLAB\Administrator). However, in my experience, a DELETE operation should always be the last resort. Thus, I recommend that if you were to fix the SID conflict from SQL Server side, rather try renaming conflicting principals.

    重命名冲突的主体的另一种方法是删除旧的主体( WIN-QK43RU4ULNS \ Administrator )并添加新的主体( SELECTSIFISOLAB \ Administrator )。 但是,以我的经验, DELETE操作应该永远是最后的选择。 因此,我建议如果要从SQL Server端解决SID冲突,请尝试重命名冲突的主体。

  2. Windows Server side

    Windows Server端

    The rate at which you will encounter this error is often rare because it’s not very often that organisational domain names or server machine names get renamed – but it happens, otherwise we wouldn’t have had this issue since early versions of TFS. Some of the changes to machine names may be unavoidable (i.e. server migration, company buy-outs, corrupt domain controllers etc.) but as an administrator, you would surely appreciate being informed in advance of any planned changes. So speak to Windows Server administrators about this – also get the SQL Server administrator involved as server changes will ultimately affect SQL Server too.

    您遇到此错误的频率通常很少见,因为组织域名或服务器名称不经常被重命名-但这确实会发生,否则,自TFS的早期版本开始,我们就不会遇到这个问题。 机器名称的某些更改可能是不可避免的(例如,服务器迁移,公司买断,损坏的域控制器等),但是作为管理员,您一定希望在进行任何计划的更改之前得到通知。 因此,请与Windows Server管理员联系-还要让SQL Server管理员参与,因为服务器的更改最终也会影响SQL Server。

结论 ( Conclusion )

Like so many installations of enterprise applications, often you run into installation/configuration interruptions because of failed validations that you were unaware of – a TFS configuration is no different. Thus, you should keep the channels of communications between server administrators as you possibly can.

像许多企业应用程序安装一样,由于您不知道的验证失败而使您经常遇到安装/配置中断的问题– TFS配置也不例外。 因此,您应尽可能保留服务器管理员之间的通信渠道。

看更多 (See more)

Consider these free tools for SQL Server that improve database developer productivity.

考虑使用这些免费SQL Server工具来提高数据库开发人员的生产力。

参考资料 (References)

Principals (Database Engine)
Configure Team Foundation Server using the advanced configuration
Overview of SharePoint 2013 installation and configuration

主体(数据库引擎)
使用高级配置配置Team Foundation Server
SharePoint 2013安装和配置概述

翻译自: https://www.sqlshack.com/sql-server-lessons-from-a-tfs-installation/

tfs sql查询

tfs sql查询_TFS安装中SQL Server课程相关推荐

  1. Sql查询一个表中除了某个字段以外的所有字段的方法

    declare @name varchar(100) declare @sql varchar(1000)SET @sql='select ' DECLARE C11 CURSOR FORselect ...

  2. sql查询数据库表中重复数值

    sql查询数据库表中重复数值 -- 查询表中id重复的值 select id from 表名 group by id having count(*) > 1--查询表中的重复记录,重复记录是根据 ...

  3. SQL查询成绩表中的每科第三名

    SQL查询成绩表中的每科第三名 题目要求 表格数据 grade表 c_id c_no c_name 1 1 80 1 2 90 1 3 70 1 4 95 2 1 64 2 2 88 2 3 89 2 ...

  4. mysql 在sql查询语句结果中,数字加千分逗号

    mysql 在sql查询语句结果中,数字加千分逗号 FORMAT(X,D) 将number X设置为格式 '#,###,###.##', 以四舍五入的方式保留到小数点后D位, 而返回结果为一个字符串. ...

  5. PostgreSQL SQL中的ALL,ANY,SOME的用法,sql查询速度优化,sql运行优化

    PostgreSQL SQL中的ALL,ANY,SOME的用法,sql查询速度优化,sql运行优化 准备两个表: --T1(2,3) --T2(1,2,3,4)--ALL,ANY,SOME 的子查询 ...

  6. 简单SQL查询 在野狗中的对应实现

    野狗实时后端云主要提供的是一个实时通信的通道,但是毕竟也提供了数据存储的功能.因此野狗也可以被看作是一个具有实时同步数据功能的云端数据库. 这个数据库是NoSQL的,数据的存储是树型的,类似一个巨大的 ...

  7. mysql sql先后执行_MySQL中SQL语句执行顺序

    (7) SELECT (8) DISTINCT (1) FROM (3) JOIN (2) ON (4) WHERE (5) GROUP BY (6) HAVING (9) ORDER BY (10) ...

  8. 数据库嵌套循环查询联系——1.查询选修了课程号为“3”的学生姓名和系别、4.查询其它系中‘2‘号课程比信息系所有学生分数高的学生学号和姓名、6.查询每门课程中低于该课程平均成绩的学生学号和姓名

    1.查询选修了课程号为"3"的学生姓名和系别 Select sname,sdept from student where sno in ( select sno from sc w ...

  9. PostgreSQL查询当前执行中SQL的执行计划——pg_show_plans

    点击上方"蓝字" 关注我们,享更多干货! 执行计划存储 如果同样的SQL要执行很多遍,且每次都是同样的执行计划.每次都发生硬解析,则会消耗大量时间.类似于Oracle存放执行计划的 ...

最新文章

  1. 推荐两款快速查找/替换电脑中文件的软件
  2. phpmyadmin 查看sql历史记录
  3. 使用深度V8.1 系统后打开部分文件夹缓慢
  4. Android进阶笔记:AIDL内部实现详解 (二)
  5. WCF 第十二章 对等网
  6. 关于Ad-hoc测试的基本知识
  7. android activity解耦,Android与设计模式:用单一职责原则为Activity解耦
  8. jdk11 javafx_JDK 11上的JavaFX
  9. 【英语学习】【WOTD】ratiocination 释义/词源/示例
  10. 基于SSH的共享笔记系统
  11. 【POJ 3281】Dining【最大匹配、拆点】
  12. 网页设计收藏站 80 个
  13. php个人微信公众号,PHP实现微信公众号自定义菜单
  14. FlashFXP使用说明
  15. 170816 Ubuntu-Nvidia CUDA+Driver+cuDNN installation-Titan Xp
  16. Vue+高德地图API的使用(点击地图搜索周边信息)
  17. DANet(双重注意力融合网络)与CBAM
  18. 计算机实训应用,计算机应用基础及实训
  19. 保罗.格雷厄姆:如何获得创业Ideas | How to Get Startup Ideas
  20. Learning Attribute Representations with Localization for Flexible Fashion Search

热门文章

  1. python面试题No2
  2. 浅析libuv源码-node事件轮询解析(1)
  3. 利用jsonp实现跨域请求
  4. 《Go学习笔记 . 雨痕》流程控制(if、switch、for range、goto、continue、break)
  5. 自然语言3——官网介绍
  6. [iOS] 响应式编程开发-ReactiveCocoa(一)
  7. 007 - VUE + hexo blog
  8. 常用的hooks入门
  9. 前端如何实现网络速度测试功能_如何通过fiddler的断点功能,来实现不同场景的测试...
  10. 5G是什么?5G能做什么?5G在未来将带来什么?