I recently set up a sandbox TFS to test TFS-specific features without interfering with the production TFS. I was happy I did this sooner than I thought--I hadn't been backing up the encryption key from SSRS and upon restoring the reporting databases, they remained inactive, requiring initialization that could only come from applying the encryption key. Said encryption key was lost when I nuked the partition after backing up the TFS databases.
The only option I seemed to have is to delete the encrypted data. I'm fine with this, since there wasn't much in there to begin with, however once they're deleted I'm not quite sure how to configure TFS to recognize a new installation of these services while using the restored versions of everything else. Unfortunately, the TFS help file doesn't seem to account for this state though. Is there a way to essentially rebuild the reporting and analysis databases? Or are they gone forever?
From the TFS Admin console, have you tried going into your Reporting section underneath the Application Tier? There is an option for "Start Rebuild", which should rebuild your warehouse, models, and reports based upon what is currently in the TFS database(s).
If that does not work, you could always try stopping the jobs, deleting the databases and then starting the jobs back up. I believe that it will rebuild them from scratch at that point. I only have my production 2010 instance up and running, and not a development rig anymore, otherwise I would test this for you.
Related
My company is considering upgrading our on prem TFS 2017 update 3 to the latest Azure DevOps Server (notably, the on prem variety).
During discussions about that possibility, one key stakeholder claimed that if you upgrade, all of your build and release pipelines would have to be rebuilt from scratch. We have a healthy number of build and release definitions in TFS 2017.
I have looked for the answer in the Microsoft documentation about what exactly gets upgraded, but unfortunately I can't get the level of granularity which would prove or disprove the above claim. On the surface it would seem like a horrible upgrade story if it were true. But I also understand that designs and architectures change and upgrades aren't always possible.
Could somebody let me know whether the build and release pipelines can survive the upgrade more or less unscathed? Knowing this would be a valuable data point as we work toward a decision.
Thanks in advance!
The vNext build definitions and the release pipeline I would expect would be pretty lift and shift. Depending on the tasks that you have defined, they might no longer be supported or there might be new versions. The UI will let you know that new versions are available.
A lot of the new focus is building out the features for the YAML build definitions. If you want to leverage those, you'd have to do a lot more rework of converting those vNext tasks into YAML. But converting is not really a hard requirement.
You mentioned that you aren't using the XAML build definitions, but if you happened to be using them, I would image that is where a lot of the rework comes in. Having done that in the past, I can say it is a pain if you have to do it.
all of your build and release pipelines would have to be rebuilt from scratch.
I've tested it and it won't lose any data after upgrading. We should use scheduled backups to ensure that we always have backups in place in case something goes wrong.
we can use that new hardware to do a dry run first, and then we will wipe everything clean and use it again for the production upgrade.
For our dry run, the steps for our upgrade will be:
Copy recent database backups to our new SQL instance.
Install TFS 2015 on our new application tier.
Use scheduled backups to restore the database backups.
Run through the upgrade wizard, being sure to use a service account which does not have any permissions in our production environment. See Protecting production in the dry run in pre-production document for more information.
Optionally configure new features which require changes to our existing projects.
The production upgrade steps will be quite similar. There the steps will be:
Take the production server offline using TFSServiceControl's quiesce command. The goal here is to ensure that the backups we use to move to our new hardware are complete and we don't lose any user data.
Take new backups of each database.
Copy the backups to our new SQL instance.
Install TFS 2015 on our new application tier.
Use the scheduled backups wizard to restore the database backups.
Run through the upgrade wizard, using our desired production service account.
Optionally configure new features which require changes to our existing projects.
You can refer to this doc for more details.
We are trying to alicve our Reporting and Analysis Services in Team foundation Server (currently it is14.0.23128.0 (Tfs2015)).
It was not using for a couple years.
And now we want to use it. But when we connected to our analysis via Excel we've faced to strange data in report builder:
All Date boxes are empty and lots of SID Instead of people:
After that we went to our SQL Server where all TFS databases are and looked at tables:
This is Dim.Date table in Tfs_Warehouse
And this is Dim.Person table. It is filled with SID's and normal names. Some of SID's in AD have normal names. But here are they presented by SID.
So that is the problem we have.
We tried to solve it by ourself.
So what we have tried to do:
First of all we tried just to rebuild Reporting Services. It did not worked.
Also we tried to rebuild services with deleting Tfs_Warehouse and Tfs_Analysis databases. It did not worked too.
After that i installed an extra TFS on another pc. And its database is filled with correct data.
After that I turned off reporting service, deleted Tfs_Warehouse and Tfs_Analysis databases, deleted SQL Server Analysis and Reporting features, reboot a vm and installed them again. Configured Analysis and Reporting features and turned TFS Reporting service on. When all tables were filled i have seen that corrupted data. Just same as i saw at first.
And after that i did all that i wrote in a previous try but also i reinstall an application server. Result is the same. Data is corrupted.
Also i tried to switch app server from "good" TFS. But did not helped.
Have anyone any ideas about that? :)
I have backup of TFS databases and I want to get my code files from it. Is it possible? If so, then what exactly do I need to do? TFS Version: 11.0.61030.0 (Tfs2012.Update4)
Whatever investigation I have done so far, it seems that the only way to restore the files is to install TFS 2012 on another machine, restore the database backups on that machine. And hopefully afterwards I should be able to download the files from this new TFS. I wanted to verify my procedure because I need to know if there is something missing in my understanding before I start the task.
Yes restore is the way to go, but you must be careful at some important details. I write as I remember:
Use the same version of TFS for the new environment.
The new environment is in the same Active Directory domain. If you are in a workgroup, must add additional steps to make, at least some, accounts match.
Restore from a marked transaction (this is done by the built-in backup/restore tool)
You will have two live system with the same identifier: this may confuse clients. To avoid run the tfsconfig ChangeServerID command.
If you restore the Configuration DB, must run TfsConfig RegisterDB.
For getting code this is enough, but consider that the new environment is still pointing to existing resources: build server, lab management.
If the TFS instance was already used, more steps are necessaries, like cleaning cache on AT.
I do not remeber a complete guidance: there are many variations on this topic. Make sure to study the content of Restore a deployment to new hardware
After an ill-advised DCPROMO on our TFS server, and subsequent demotion, TFS continues to work but the SharePoint integration is totally hosed. SharePoint app pool refuses to run as a "Network Service" and so does SQLEXPRESS service. Unless there is some way to fix this, which I have not been able to find, I would like to totally re-install Windows Server 08 and TFS on our server. However, while trying to create a backup plan, I received an error relating to the fact that TFS cannot access MS SQL because of permissions issues. I would like to reliably and manually back up all TFS source control/history (I'm not worried about SP stuff at all, we haven't used it yet) and then restore it after I've re-installed stuff. Is this possible?
If you haven't really used ssrs/sharepoint etc you should be able to fairly easily detach any project collections and just migrate their databases to the new server. Each project collection only has one database normally named Tfs_{CollectionName}. The move the database to the new server with TFS already installed on it, restore the databases and attach them in the management console. http://msdn.microsoft.com/en-us/library/dd936138.aspx
Otherwise the recent versions of the TFS Server Power Tools have added a backup tab to the TFS management console which should be able to run you through making a backup. http://blog.hinshelwood.com/creating-a-backup-in-team-foundation-server-2010-using-the-power-tools/
We created a copy of our production TFS to test various applications we build internally for our needs. Thus, we created a fresh install of TFS and attached old databases to it.
However, I noticed one strange thing: when I change a WI on our production TFS the change gets reflected on our copy, and vise versa. We do not have notifications between two TFS instances.
How it is possible?
We have done the same in the past and it seems that along with the old databases a whole bunch of garbage came along to the new server and some connections exist between the two although we did not create them. So be very careful what you bring in the new server and don't just copy the databases, take only what you need or things will get wild :)