The first question is, is the database still in recovery? Ensure that the restore has been completed and the database is opened. See: How to: Restore a Database Backup (SQL Server Management Studio) | Microsoft Docs
Also check that the database name is configured correctly in TFS in case you changed the database name when restoring. If the restore is done to a new SQL Server instance, ensure that TCP/IP is enabled, see Configure a Server to Listen on a Specific TCP Port | Microsoft Docs
If still encountering problems, search for more information from
- SQL Server log, critical errors are logged here
- Windows Event log may also contain additional information.