Moving TFS from SQL Enterprise to Standard

I have come across a couple of TFS installations that have been deployed using SQL Developer Edition recently. This is problematic when upgrading or migrating TFS to a “proper” production environment (SQL Developer Edition may not be run in production environments!)

Considering that TFS comes with a restricted SQL Standard Edition license, there should never be much of a reason to install TFS on Developer Edition.

Getting back to the problem… SQL Developer Edition is basically Enterprise Edition. This means that it comes with a lot of goodies that obviously are not included in Standard Edition.

SQL Developer 버전은 기본적으로 Enterprise Edition과 동일하다는 의미임 (사용상의 제약만 있는 라이선스만 다를뿐....)

때문에 다음과 같은 Enterprise Edition 만이 제공하는 기능때문에 Standard 버전으로는 다운그레이드에 제약이 생김

TFS will happily enable and use the following Enterprise Edition features:

  • Online index operations 온라인으로 인덱싱이 가능하다 -> 참고링크
  • Page compression 페이지 압축으로 저장 공간을 획기적(?)으로 절약할 수 있다 -> 참고링크
  • Table and index partitioning 테이블 분할과 인덱스로 전송 과 엑세스 속도를 향상하고 작업의 효율성을 향상 -> 참고링크
  • Larger read - ahead buffering & Cube perspectives 큐브 -> 참고링크

The one that could cause problems when moving to different versions of SQL is the Page compression. Once you have page compression enabled on a database, you cannot just backup and restore the database to a Standard Edition instance. You will end up getting an error to the tune of:

Database ‘<TFS Database name> cannot be started in this edition of SQL Server because part or all of object ‘<Table Name>’ is enabled with data compression or vardecimal storage Format. Data compression and vardecimal storage Format are only supported on SQL Server Enterprise Edition.

그중 한가지 기능이 다음과 같은 에러로 인해 다른 버전으로 migration이 안됨, 그것이 바로 page compression임

"개체 <Table Name>’ 의 일부 또는 전체가 데이터 압축 또는 vardecimal 저장소 형식으로 활성화되어 있어 이 버전의 SQL Server에서 데이터베이스 '<TFS Database name>'을(를) 시작할 수 없습니다. 데이터 압축 및 vardecimal 저장소 형식은 SQL Server Enterprise Edition에서만 지원됩니다.
데이터베이스 '<TFS Database name>' 기능 중 일부를 현재 버전의 SQL Server에서 사용할 수 없으므로 해당 데이터베이스를 시작할 수 없습니다."

 

One little trick that I have picked up is running the following stored procedure BEFORE you create the backup of the database:

다음의 stored procedure 를 데이터베이스 백업전에 수행함으로써 해결할 수 있음


EXEC [dbo].[prc_EnablePrefixCompression] @online = 1, @disable = 1
(see here for more detail)

This will disable the compression on the relevant tables and allow you to carry on with the migration. You would need to run this for each of the databases that you are intending to move across (including the Tfs_Configuration database if you are indeed doing a migration).

위 명령어를 각각의 관련된 데이터베이스와 테이블에 수행함으로써 compression 기능을 off 할 수 있다

Hope this helps

 

 

 

 

 

Disabling SQL Server Data Compression in TFS Databases

Summary

Team Foundation Server has been designed to make use of SQL Enterprise Edition features such as page compression which are not available in other editions of SQL Server. When moving one or more Team Foundation Server databases from an Enterprise Edition of SQL Server to a non-Enterprise Edition of SQL Server (as part of a collection detach/attach operation, for example) it is necessary to disable that compression.

To disable compression on a Team Foundation Server database you can execute [dbo].[prc_EnablePrefixCompression] against it. This stored procedure has a parameter, @online, which should be set to true if you want to disable compression while you continue using the collection database through your Team Foundation Server deployment, but can be set to false otherwise in order to speed up the operation. In either case, the steps to execute this stored procedure will be:


1. Launch SQL Server Management Studio

2. Locate the Team Foundation Server database which will be moved. Right click on the database and select New Query.

3. Type either: 

EXEC [dbo].[prc_EnablePrefixCompression] @online = 0, @disable = 1 

or 

EXEC [dbo].[prc_EnablePrefixCompression] @online = 1, @disable = 1

Note Depending on whether you plan to continue using the database while disabling compression or not.


4. Run (!Execute) the query and verify success under messages

5. Repeat steps 1 through 4 for all required databases which will be moved.



Disabling compression will require additional disk space. The below query, which can be executed using the same steps as above, will provide you an estimate about the amount of additional disk space that will be required after disabling compression.
 

select sum(used_page_count) * 8 * 2 /1024.0
from sys.partitions p
join sys.dm_db_partition_stats s
on s.partition_id = p.partition_id
and s.object_id = p.object_id
and s.index_id = p.index_id 
where p.data_compression_desc = 'page'


Note:
1. The size returned by the above query is in Megabytes(MB).
2. It is advisable to run this query against each Team Foundation Server database before disabling data compression, and then to ensure that enough disk space will be available before actually disabling compression.

번호 제목 글쓴이 날짜 조회 수
36 Team Foundation Server 에 접속했던 자격 증명과 캐시 정보 삭제하기 file 황제낙엽 2016.07.23 823
35 서비스 계정 관리를 위한 커맨드 명령어 황제낙엽 2016.07.21 291
34 한 환경에서 다른 환경으로 Team Foundation Server 이동 file 황제낙엽 2016.07.21 431
33 (TFS stop/ start) Team Foundation Server 에서 사용하는 서비스를 중지, 시작 황제낙엽 2016.07.20 277
32 운영중인 TFS 서버의 컴퓨터 이름을 변경했을 경우 file 황제낙엽 2016.07.19 375
31 TFS 2013 RTM + SQL Server 2012 Developer 서버 이전 및 데이터 마이그레이션 file 황제낙엽 2016.07.16 290
30 TFS 2013 Install 구성 센터 메뉴 file 황제낙엽 2016.07.15 243
29 TFS 80포트 변경 황제낙엽 2016.07.15 303
28 TFS 2008 설치 후 서비스 포트 바꾸기 황제낙엽 2016.07.15 264
27 chart lists the TFS Versions with Product Version number 황제낙엽 2016.07.14 244
26 Team Foundation Server:9090 접속 오류 file 황제낙엽 2016.07.04 269
25 TFS용 데이터 백업 및 복원 file 황제낙엽 2016.06.30 487
24 TFS 2012에서 TFS 2015 업그레이드 file 황제낙엽 2016.06.30 295
23 Install TFS (Single server, Dual server, Multiple servers) file 황제낙엽 2016.06.23 311
» TFS 의 SQL Server 를 Developer (Enterprise) 에서 Standard 로 교체하기(Downgrade) 황제낙엽 2016.06.23 480
21 TFS에서 백업 및 복원을 위해 경로 지정시 오류 (TF401008) file 황제낙엽 2016.06.18 289
20 TFS 2012에서 TFS 2015 업그레이드 황제낙엽 2016.06.13 307
19 Migration Update from Team Foundation Server (TFS) 2013 to TFS 2015 (With Reporting and SharePoint) file 황제낙엽 2016.06.13 427
18 TFS 최소, 권장 사양 (Requirements for Azure DevOps on-premises or TFS version) 황제낙엽 2016.05.24 283
17 Use TfsPreUpgrade to reduce downtime (for TFS2013->TFS2015) file 황제낙엽 2016.05.12 288