Migrating from TFS 2010 to TFS 2012 - sql-server

We have just created a new Windows Server 2012 with TFS 2012 using a SQL Server 2012 db. I need to migrate the code with history from a TFS 2010 using SQL Server 2008 RS to this new server. Any suggestions?

I went down this road recently. You basically have two options:
Migrate
Upgrade
Migration
I started going down the Migration route and downloaded the TFS Integration. In short, this ended badly. I spent a total of 2 weeks running the migration and eventually gave up. The tool said that it was going to take over a month to complete the migration.
Eventually I gave up and instead tried the Upgrade route.
NB. I want to point out that whilst I had issues, I'm sure there are many people have used this tool successfully. I am only speaking from my own experience
Upgrade
You are in the same position as I was, namely you already have a new server ready to go. All you need to do to upgrade is as follows (This is not a full guide, there is a link below to a complete guide for this process.):
Open Team Foundation Administration Console on the 2010 server
Click Team Project Collections
On the General tab, select Detach Team Project Collection - a wizard opens
Follow the wizard and detach the collection.
Once detached, backup the Collection Database
If TFS 2012 is already installed then simply restore the database into the new TFS 2012 instance. If not, you need to prep the new SQL Server using TFSConfig PrepSQL.
Restore the backup into the SQL 2012 instance
Attach the collection in the Team Foundation Administration Console on TFS 2012.
The Detach and Attach processes are important as they prep TFS for the transfer process and actually perform upgrades on the database
This is not a full guide, this is just a set of pointers. I strongly recommend you read this page fully before performing any steps. http://msdn.microsoft.com/en-us/library/dd936138(v=vs.100).aspx#Backup

I figured it out!
I used this series to do the install of TFS and the migration:
http://mohamedradwan.wordpress.com/2013/01/05/upgrade-tfs-2010-to-tfs-2012-with-migration-to-a-new-hardware-series/
Answers to my comments below:
When you go to your Team Project Collections you can actually use the ChangeUrl function to reset it to what it should be. It is common that it will come up with the wrong url when doing a restore from another server. I took screen shots of the process and should have paid closer attention to the warnings that were at the finish.
As far as my second question, apparently VS keeps a config file that has the mapping settings which contains the credentials. I tried to remove and save, but for some reason this didn't work. I mapped it to a new folder, and it worked without issue.

Related

Upgrade TFS2017.3 to Azure DevOps Server

I'm trying to upgrade my TFS2017 Update 3 environment, to a new Azure DevOps Server (on-premise) environment.
I've created a new server for Azure DevOps Server, as I'd like a newer version of Windows Server, and in general just want a completely fresh environment. I took backups of my databases, shut down the old TFS2017, without deleting anything.
I migrated the databases to a new SQL Server instance (where I have all my other databases), as I see no need to use an SQL Server license just for source control.
Now comes the fun part. I tried to configure Azure DevOps Server to use the existing database (after the migration to the new SQL server instance was done). I had some issues with the TfsJobAgent service, but got those resolved.
I then tried to reconfigure Azure DevOps Server (as it failed the first time), but during configuration, it now tells me that data is corrupt, and that the existing database cannot be used. Good thing that I took backups :)
It should be said, that the new SQL server instance is a 2019 version, so that shouldn't be a problem.
I'm not quite sure what is happening here, and why it's giving me this error. Am I migrating in a wrong way? There's not much documentation out there describing this flow.
Please go through the documentation below before upgrade:
https://learn.microsoft.com/en-us/azure/devops/server/upgrade/get-started?view=azure-devops
And follow the steps in article Upgrade scenario walkthrough for Team Foundation Server to upgrade your TFS. Summarize the steps here:
Prepare your environment. The first step is to check the system requirements for TFS 2018. Upgrade SQL Server is
necessary for your scenario. Including SQL Server, you also need to check other system
requirements and prepare the environment.
Expect the best, prepare for the worst. You must have a complete and consistent set of database backups in case something
goes wrong.
Do the upgrade. Once the preparation is done, you'll need to install the new version of TFS to get new binaries, and then run
through the upgrade wizard to upgrade your databases.
Configure new features. Depending on what version you upgraded from, you may need to configure each team project to gain access
to some of the new features made available.

How to change TFS configuration, DefaultCollection from SQL Server Express to SQL Server on the same server

I was installing TFS 2015 and was never given a chance to choose my database. I already had a SQL Server Enterprise installed and installation "wizard" proceeded to install SQL Server Express and then putting TFS database on it. I am not sure why it works this way, but is there any way to change this??
My TFS has nothing on it, I just installed it. I've read a lot of blogs about moving "Collection" from one DB to another, but I don't want to move the collection (it's empty and it's easy to do through admin console). I am trying to move the actual TFS' internal components from SQL Server Express to SQL Server on the same server.
UPDATE:
For anyone interested in knowing more about/how-to unconfigure TFS: Unconfigure Team Foundation Server
Copy the Tfs_Configuration database SQL Express instance to your full SQL Server instance, then run TFSConfig RemapDBs
An alternative, since you don't have any data: Just unconfigure your app tier and rerun the configuration wizard. Use the advanced configuration wizard and you'll have the opportunity to specify a database instance.
It's also worth noting that you should be installing TFS 2018, not TFS 2015, unless you have a very good reason. 2015 is 3 years old and two major releases behind.

TFS 2018 ERROR : TF401054

I had restore TFS database 2015(SQL 2014) to 2018(SQL 2017) successfully. and remapped it. But I got this error when I try to login to TFS
TF401054: The requested service level property TFS_SERVICE_LEVEL did
not match the expected value. Team Foundation Server requires the
Dev16.M122.7 service level but the database currently implements
Dev14.M113.
I hope you have backups of your databases in a known good state; your best bet is going to be to bring back up a working TFS 2015 instance and then follow modern upgrade documentation.
The basic problem is that your team project collection databases have to be upgraded. Pointing TFS 2017 to TFS 2015 project collection databases without putting those databases through the normal process of attaching them (and thus upgrading them) isn't going to work. In a migration-based scenario, this is typically accomplished via the TFS admin console.
You may be able to go to the admin console and attach the databases, but my recommendation would be to bring up a working instance of your TFS 2015 environment and start from scratch.

'web' is not a valid database version in this edition of SQL Server

Aha! -- this is probably it. On the very weekend I elected to set up the DNN site on Azure ... Web and Business versions are deprecated / retired. As of yesterday in fact, this is what is on Azure.
The ONLY 2 choices in SQL Server 2012 SSMS however, to import a data tier app are just Web and Business. Basic, Standard and Premium are not in the drop down in SSMS 2012.
So ... rather than just zap this question I'll put in another question within it. Is there an update to SSMS 2012? I ask because the database being migrated is 2012 so using SSMS 2014 may not work, if the option is to download this version of SSMS and use it.
Other than that ... here's what's already posted:
Note, the SQL Server database being migrated is 2012. DNN Version is 07.02.01 (367).
I'm following the steps in this blog link to migrate a DNN site to Azure: http://www.dnnsoftware.com/community-blog/cid/154975/moving-a-dnn-install-to-microsoft-azure-websites. The error I get is:
'web' is not a valid database version in this edition of SQL Server.
I have 2 choices in the import process 'Web' and 'Business', tried both and neither will work. There are a few other Stack Overflow questions on this but these are either not answered or the answers don't work.
I realize this is vague but it's simple enough: It doesn't work. :) The blog is followed to the letter. The .bacpac file is created with no errors. Importing the data tier step just results in the error that creating the target database on Azure failed for the above reason.
I have a support ticket in to Azure for this as well.
There has to be a simple, overlooked something -- a missing config step on setting up Azure. It could be the free trial doesn't cover this and I need to pay for something. That's fine ... just need to know what it is.
Who has run into this and actually, factually solved it?
My recommendation is always to use the latest SSMS version available, in order to have the latest updates supporting new Azure features like: full-text search support for Azure SQL Server v12, the long requested "Edit top 200 rows" working, the table designer, and a long etc.
Note that the latest SSMS release supports SQL Server 2016 through SQL Server 2005, so is going to work fine with your SQL Server 2012 database. On the SSMS June 2015 Preview, the following item was added:
Import/Export wizard support for new Azure SQL Database service tiers (Basic, Standard, Premium).
You can read more at https://msdn.microsoft.com/en-US/library/mt238290.aspx
https://support.microsoft.com/en-us/kb/3031047
For future reference. This hotfix should work on this problem.
That is because the valid database version could be basic or standard or premium. SSMS does not allow to choose it, therefore, the solution is to download the latest version of SSMS.

Upgrading to Sql Server Express R2 Advanced Services in Middle of Development

I am currently developing, from the ground up, my first asp.net website. After implementing many of the more basic features for my site I have run into a problem with Visual Basic 2010's SQL Server 2008 Express. I want to have search with my site so users can look for specific records in my database, and from what I have researched Full-Text Search is the best way to go (right?). It wasn't until I tried to test my code that I realized the default Express edition doesn't have Full-Text Search enabled. My question is a.) how can I upgrade to the SQL Server Advanced Services in the middle of development without losing my Database's, and b.) what download should I use, because right now I'm thinking http://www.microsoft.com/en-US/download/details.aspx?Id=25174.
I really want to be sure that I am not only installing the right software, but that I won't completely screw up my project in the process. Along those lines, should I backup my database's and then uninstall my original version of SQL Server before downloading the Advanced Services version? I would really appreciate some help here because I have had massive headaches in the past trying to upgrade Microsoft software and just want a smooth transition.
Well it took me the entirety of a day, but I solved this! First I had to uninstall EVERYTHING regarding SQL Server. Then I downloaded http://www.microsoft.com/en-US/download/details.aspx?Id=25174 (X86 since I am on Vista) and used .\SQLEXPRESS as my Instance Name. Once it was done installing I had to delete the SQLEXPRESS folder in 'C:\Users[Your computer's name!]\AppData\Local\Microsoft\Microsoft SQL Server Data' to get my old connections to work! Then I could create databases in SQL Server Management Studio that had Full Text enabled.

Resources