问题
We tried moving a TFS Project Collection from one TFS 2010 server to another.
- Detached the collection in TFS Console on source server
- Backed up the collection, Tfs_DefaultCollection, in SQL Server 2008 Standard Edition
- DBA restored the Collection to a new database, Tfs_MyCollection, to the SQL Server 2008 Enterprise, R2, instance used by the target TFS Server.
- TFS Administrator attempted to attach to the target server.
TFS adminisitrator received the following error message.
TF254078: No attachable databases were found on the following instance of SQL Server: MyServerName. Verify that both the name of the server and the name of the instance are correct and that the database was properly detached using the detach command in the Team Foundation Administration Console.
I assmumed we did not need to prepare the database instance in the target server since it already contained a TFS Project Collection. I assumed that going up in a SQL Server edition was acceptable.
Are my assumptions valid? What could be the cause of not being able to attach to the new TFS Server?
btw, I created this post on ServerFault originally Mirror in Serverfault, but it generated very little interest there.
回答1:
Make sure both the TFS service level and SQL server versions match the previous server.
You can verify this information using SQL Management Studio > Databases > Tfs_Configuration or Tfs_DefaultCollection > Properties > Extended Properties
Note these properties:
TFS_PRODUCT_VERSION 10.0.40219.1 TFS_SCHEMA_VERSION Microsoft Team Foundation Server 2010 (SP1) TFS_SERVICE_LEVEL Tfs2010.SP1.KB2182621.P#1
Also note the SQL version under <database instance name> > Properties > General
Version 10.50.2500.0
回答2:
This worked for me...
Actions to perform on TFS 2010
1.1 Using the TFS console "Detach" the collection from the "TFS server"
1.2 Using the SQl Manager "Detach" the database for the corresponding TFS collectionActions to perform on TFS 2012
2.1 Using the SQl Manager "attach" the database for the corresponding TFS collection
2.2 Make sure to give the TFS user account/s access to the database otherwise the TFS server will not be able to access it.
2.3 Using the TFS console "attach" the collection to the "TFS server"
回答3:
Just as additional information...
KMoraz if right. Both TFS and SQL Server are made to run together at the same version (The Major version).
To explain how you probably get there is:
- You made a backup of you TFS database
- You upgraded TFS version (TFS migrated your database - it became another version)
- You restored your backup (TFS database version is now older that TFS version itself)
来源:https://stackoverflow.com/questions/10822543/why-cant-i-attach-tfs-to-a-project-collection-that-was-restored-to-sql-server