Team Foundation Server 2015 Database Error TF:246017 - sql

my tfs console stop working giving error. When i open the tfs administrator console.it works fine a week ago but suddenly start giving this error and my all developers are facing this error.
TF246017: Team Foundation Server could not connect to the database. Verify that the instance is specified correctly, that the server that is hosting the database is operational, and that network problems are not blocking communication with the server.
I have check the databases for the tfs they are working fine means they accept queries and showing result.
also i have checked through command DBCC CHECKDB command and giving zero errors.
kindly help me for this error I'm new to TFS
TFS 2015 installed on Windows server 2012 R2

Related

IIS Delegation suddenly stopped working Windows Server 2016 running SqlPackage.exe to SQL Server 2017

Background
We use Team City to deploy our web sites and SQL migrations/dacpac's to servers that have been working successfully for quite some time. One of our servers was last deployed to on 4 March 2019.
Today I did a deploy to that server and our step that deploys dacpac and migrations has stopped working on that server.
The server is Windows Server 2016 environments, running Sql Server 2017 with all the latest windows patches.
We are using IIS Delegation (NOT using Kerberos).
I can confirm the following
Nothing has changed in terms of IIS Settings, user permissions or
anything on this server
The last successful release out to the server was 4 March 2019.
The last time anyone logged onto this server was February 2019
Pre-authenticating to remote agent URL
'https://devdeploy.mydomain:8172/MsDeploy.axd?site=mysite' as
'TeamCity' authenticates as expected
The delegation set up is as follows:
The step that is now failing looks like this
run a .bat file that has the following command:
WHOAMI
"C:\Program Files\Microsoft SQL Server\150\DAC\bin\sqlpackage.exe" /Action:Publish /SourceFile:"C:\inetpub\websitepath\dacpac\mydacpac.dacpac" /TargetServerName:SQLServer /TargetDatabaseName:MyDatabase
(NOTE: The WHOAMI This returns "ServerName\TeamCity")
The error given in Team City logs is:
Cannot open database "MyDatabase" requested by the login. The login
failed. Login failed for user 'ServerName\TeamCity'.
This implies (IMHO) that the delegation from IIS to the batch file which is run, is no longer occurring.
It appears that IIS Delegation has not performed the correct delegation and is running the user under the 'TeamCity' not under the delegated user 'DbOwnerUser' (see image above for runCommand delegation setup).
My Questions therefore are
Is anyone else having this issue?
Is there a security update that has caused this to no longer work
e.g. KB4489885 (this talks about Kerberos and we are NOT using
Kerberos)
Does anyone have any thoughts as to how this could happen or be fixed
(apart from uninstalling the security update)?
Thanks in advance to anyone who has some good ideas :)

SQL Server 'Connect to server' SQL service was not found under services.msc

So today I downloaded the latest version of SQL Server from this official website. I downloaded both setup the installer and the upgrade package.
I ran them both 'as administrator' on my machine. And the installation went successfully.
But after that when I run the SQL Server Management Studio for a very first time. It promotes me to connect to the server as expected.
But when I hit connect am getting following error message.
So I searched the internet for the same issue. From one of the question, I got the hint that to start SQL server service manually by going to services.msc app.
But there wasn't any service related to SQL Server. Weird.
So what I am supposed to do now?

Error while installing database engine service with SQL Server 2017

I get the error:
Object reference not set to an instance of an object
while I am installing the SQL Server 2017 database engine service.
In previous tabs, only the windows firewall gives warning, but I already have made rule for port 1433. In SSMS, when I try to connect with database engine, it causes a login failed error (Error 18456, state:1).
I have already tried reinstalling and also tried to use .net framework repair tool, but that didn't help.
Also I found that interesting thing that I do not have problem with connecting to analyses services in SSMS.

Configuring TFS SQL Server Instance connecting Error

I am new to Team Foundation server and when I am configuring TFS for SQL Server, I am getting below error where TFS is not able to connect to the SQL Server instance where as when I connect to SQL Server it is connecting successfully. Both SQL Server and TFS are on the same server machine. Please advise
Error while clicking on Test Link
According to the error info, you need to make sure the TFS service accounts(which you started the TFS Installer) have permissions on the DB server.
Add the account in the list of logins in SQL Server side and retry
the previous operation.
Moreover, if Windows Firewall is on the TFS box, switch it off during the installation and try again. After finish the installation reopen the firewall.
For more details you could take a look at below similar issue:
Errors during TFS 2013 install–and how I worked past them
Workaround Error TF255049: Punching a hole through Windows
Firewall

SQL Server 2005 Reporting Services (x64) on Windows 2K8 -> CleanCurrentUserName() not found

I have installed SQL Server 2005 three times now on the same box. I cleaned up registry settings, files, you name it.
All along I have been trying to install SQL Server 2005 Database and Reporting Services (x64) on a Windows 2008 Server. I have also applied the SP3 patch. Installing and Restarting the Server at every point. Verified that the installation was 64bit. ASP.NET and IIS7 are both running under 64bit.
Also, I have installed multiple instances (SQLDEV64, SQLQA64, SQLSTAGE64) of the Database and Reporting Services.
I started to go through the Reporting Services Configuration manager, installing the Reporting Database along with setting up IIS. When I go test the website I get the following error and there lies my question. How can I get around this error?
http://localhost/reportserver
Reporting Services Error
--------------------------------------------------------------------------------
An internal error occurred on the report server. See the error log for more details. (rsInternalError)
Method not found: 'Void Microsoft.ReportingServices.Diagnostics.UserUtil.CleanCurrentUserName()'.
--------------------------------------------------------------------------------
SQL Server Reporting Services
Any help would be greatly appreciated.
I found the solution to my issue by pure chance. It looks like the SP3 upgrade only upgraded the last reporting services instance that was installed. So I had to manually copy the files under:
C:\Program Files\Microsoft SQL Server\MSSQL.9\Reporting Services\ReportServer
to the other instances. This seemed to fix the missing reference issue. I work with Microsoft products and defend them every day, but some of their developer tool install files are just wonky and ill packaged.