0

How source code is stored in SQL server for TFS2010.Is it possible to see it by digging the Database?

dbc
  • 104,963
  • 20
  • 228
  • 340
superman
  • 377
  • 1
  • 5
  • 12
  • What DB? what source code - yours? or MS'? – Preet Sangha Aug 09 '11 at 12:21
  • My source code(.NEt projects and solutions) that is kept in version control in TFS.The database is TFS_CollectionName – superman Aug 09 '11 at 12:25
  • Why do you want to know? Contacting the database directly is unsupported. Use the webservices or the TFS APIs to consume functionality. See Shai's excellent blog on more help on the TFS API: http://blogs.microsoft.co.il/blogs/shair/archive/tags/TFS+API/default.aspx – Ewald Hofman Aug 11 '11 at 11:42

1 Answers1

0

Versions of checked-in files are indeed stored in the database, which is basically just a simple blob store that contains a mix of the entire version controlled files as well as "deltas" between them.

That is to say that the server will occasionally store the differences between two versions of the files using a binary delta algorithm. For example, for a file $/Project/File.txt, version 1 may be stored intact but version 2 may be stored as the delta from version 1. When a client requests version 2 of $/Project/File.txt, the file may be reassembled from deltas before delivery.

The database is intended to be treated as an opaque data store and is generally not supported. In order to interact with your version control programmatically, it is intended that you would use the very rich APIs that are available for communicating with Team Foundation Server, either from .NET or from Java.

Edward Thomson
  • 74,857
  • 14
  • 158
  • 187
  • thanks Edward for a nice explanation, just one thing to know if I want to see the code for $/Project/File.txt (i.e. content in file) which Database and table I need to check as there are TFS_CollectionName,TFS_WareHouse etc DBs exist.It would be great if you could please say something on this too. – superman Aug 10 '11 at 16:58