SQL Server Agent service account login failure - sql-server-2014

I am using SQL Server 2014 on a Windows 2012 server. I have several database instances on the server.
One of the instances has an error in the log every day at 2 AM.
Login failed for user MyDomain\SQLAgentAccount.
Reason: Could not find a login matching the name provided.
[CLIENT: ].
Error: 18456, Severity: 14, State: 5
This is the service account used for SQL Server Agent. The Agent service is running and all jobs run successfully. I was able to trace it back to see that it is coming from PowerShell.
If I add the account explicitly, the error goes away. But I did not need to do that on the other instances and don't think it would be best practices to do so here.

Related

SQL Communications link failure when accessing SQL database on the same machine

I am running a Minecraft server which is querying a SQL database on the same VPS as the game server for various bits of data (ranks, warps and such). Today have encountered something which has stumped me and I am turning to you hoping for an answer.
My VPS is running Ubuntu Server 18.04.4 LTS, the Minecraft server is being ran from within a screen instance and no changes to the server, operating system or mySQL that I am aware of have been made that could have caused an issue and given I am the only one with SSH access to the server theres no way an update could have been made unless it was silently updated in the background without my knowledge. The problem just randomly happened out of nowhere.
The specific error I am getting (output from MC server console)
2021-05-19 12:44:51 [INFO] [STDOUT] [SERVERMANAGER EXCEPTION | com.mysql.cj.jdbc.exceptions.CommunicationsException] Communications link failure
2021-05-19 12:44:51 [INFO] [STDOUT] The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
Granted I have little experience with SQL (I inherited this SQL setup from someone else who I am unable to contact for assistance to fix this) but the last message of this error lead me to believe that everything with the Minecraft server itself was fine and the SQL database simply was not acknowledging the packets the Minecraft server was sending.
However despite...
Restarting the mySQL service with sudo service mysql restart
Verifying that the servermanager database I am using is still present with SHOW DATABASES;
Verifying that the three tables servermanager has are still present with SHOW TABLES;
Restarting the VPS
I cannot for the life of me seem to get this issue to fix itself!
Anyone able to offer any insight?

how to resolve error 17836, Severity: 20, State: 14?

Length specified in network packet payload did not match number of bytes read; the connection has been closed. Please contact the vendor of the client library.
Error: 17836, Severity: 20, State: 14. I am getting this error 5 times at the same time almost and want to know the reason for its occurrence.
See the solution here:
Since the SQL Server has Event ID 17836 logged, the SQL port is open.
It is more like authentication issue. Based on this articles
(Configuration for querying SQL database remotely –
http://www.howtonetworking.com/others/testsqlconnect2.htm ), we may
have 3 fixes:
creating SQL login ID (recommended)
join the computer to the domain
allow anonymous connections to SQL Server 2000 or to SQL Server 2005 (don’t recommend)
And this MSDN forum
Perform a nslookup of the CLIENT IP Address that is listed in the
error message and find out what computer it is that is connecting.
Then you need to check that machine and determine what specifically is
connecting to the SQL Server. You might get more infromation from
doing a SQL Trace for the Errors and Warnings Event Class and have the
ClientProcessID column in the trace data. When the error spikes, you
might get the PID for the process that is connecting from that
10.26.32.96 machine, and then you can find that process in Task Manager on that machine by adding the PID to the data displayed (View
-> Select Columns).
In my case, these events coincided with me doing telnet connectivity tests to our SQL Servers. We would see one entry in the Windows Event Log for each instance we successfully did a telnet to.

SSRS 2012 Failure sending mail: The report server has encountered a configuration error

I'm junior DBA, well actually i'm more of a sysadmin than a DBA.
I'm struggling with a reccuring problem in one of my SQL 2012 Dev reporting server. We've reports snapshot generated by dynamics CRM 2013 on the dev reporting server.
I've been ask to send those reports to a specific email address on which would be attached the generated report in pdf.
I'm able to scheddule a subscription to run for example every day at the certain time and the plan did execute well.
My problem is that the action is it supposed to trigger (sending an email) is not giving me the result i'm expecting.
I found in the report server LogFiles some intriging entries that, despite googling them around, haven't been able to resolved. The Log entries look like this:
schedule!WindowsService_203!1764!06/20/2014-14:35:01:: i INFO: Handling Event TimedSubscription with data cf25ffaa-99c8-404f-bbf8-00c10ecbbe9b.
library!WindowsService_203!1764!06/20/2014-14:35:01:: i INFO: Schedule f81461ea-5067- 4d14-b2ad-6930ce8ad3d8 executed at 06/20/2014 14:35:01.
schedule!WindowsService_203!1764!06/20/2014-14:35:01:: i INFO: Creating Time based subscription notification for subscription: cf25ffaa-99c8-404f-bbf8-00c10ecbbe9b
library!WindowsService_203!1764!06/20/2014-14:35:01:: i INFO: Schedule f81461ea-5067- 4d14-b2ad-6930ce8ad3d8 execution completed at 06/20/2014 14:35:01.
library!WindowsService_203!1764!06/20/2014-14:35:01:: i INFO: Initializing EnableExecutionLogging to 'True' as specified in Server system properties.
notification!WindowsService_203!1764!06/20/2014-14:35:01:: i INFO: Handling subscription cf25ffaa-99c8-404f-bbf8-00c10ecbbe9b to report {f48fd9a9-4df8-e311-a000- 00155d060421}, owner: DOMAIN\Username, delivery extension: Report Server Email.
library!WindowsService_203!1764!06/20/2014-14:35:01:: i INFO: RenderForNewSession('/DEV_MSCRM/CustomReports/{f48fd9a9-4df8-e311-a000-00155d060421}')
library!WindowsService_203!1764!06/20/2014-14:35:01:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: AuthzInitializeContextFromSid: Win32 error: 5; possible reason - service account doesn't have rights to check domain user SIDs., Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: The report server has encountered a configuration error. ;
library!WindowsService_203!1764!06/20/2014-14:35:01:: i INFO: Initializing EnableExecutionLogging to 'True' as specified in Server system properties.
emailextension!WindowsService_203!1764!06/20/2014-14:35:01:: e ERROR: Error sending email. Exception: Microsoft.ReportingServices.Diagnostics.Utilities.RSException: The report server has encountered a configuration error. ---> Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: The report server has encountered a configuration error.
notification!WindowsService_203!1764!06/20/2014-14:35:01:: i INFO: Notification 4718cbfe-0fef-481b-b0dd-60fae64c4271 completed. Success: True, Status: Failure sending mail: The report server has encountered a configuration error. Mail will not be resent., DeliveryExtension: Report Server Email, Report: {f48fd9a9-4df8-e311-a000-00155d060421}, Attempt 0
Can any one of you guys, faced such a problem? Would you mind pointing me out to the direction that i could follow to get the email sending working?
Thanks again for you time.

TFS 2010 abort servicing activity

At the start of the year I pushed to setting up TFS for a more structured approach to things (before, everyone would change things as they went, obviously A Bad Thing). I set up a very basic single server TFS 2010 installation. The TFS databases resided on one of our Dev servers (SQL 2008).
Everything went well until:
We uninstalled SQL 2008, installed SQL 2008 R2 and reattached the databases. Since then TFS has been impossible:
The clients (SQL Mgt Studio and VS2008/2010) could no longer connect (error 404 not found)
http://localhost:8080/tfs/ gave:
"Team Foundation services are not available from the server.
Technical information (for administrator):
The request could not be processed because the application is not configured correctly. No service host is available for the request."
Team Foundation Admin Console finds the collections, everything SEEMS ok.
In an effort to jumpstart things:
I restarted the website and it's application pool
I rebooted the server
No effect.
Then I stopped the collection (that worked) to re-enter the database information, save it and start the collection again. However, it kept hanging on the save. I tried to detach the collection, but that didn't do anything. So now I have a stopped collection with the following activities:
Prepare Collection (Success)
Create Collection (Success)
Servicing Collection (Queued)
Detach Collection (Queued) (3 times, since I tried this a couple of time)
and nothing is budging.
I have all source in my local folder, so in extremis I can delete and uninstall the whole thing and start over, but... I rather not.
Any way to unblock this?
ok, This was solved by re-adding the TFS machine account to the new SQL Server installation using
EXEC master.dbo.sp_grantlogin #loginame = N'DOMAIN\MACHINE$'
as detailed here. From then on all tasks proceeded as they should..
What tipped me off was the following error in the Application Log:
TF53010: The following error has
occurred in a Team Foundation
component or extension: Date (UTC):
22/06/2011 18:07:22 Machine: AZT-TS-02
Application Domain: TfsJobAgent.exe
Assembly:
Microsoft.TeamFoundation.Framework.Server,
Version=10.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a;
v2.0.50727 Service Host: Process
Details: Process Name: TFSJobAgent
Process Id: 2980 Thread Id: 3804
Account name: NT AUTHORITY\NETWORK
SERVICE
Detailed Message: There was an error
during job agent execution. The
operation will be retried. Similar
errors in the next five minutes may
not be logged. Exception Message:
TF246017: Team Foundation Server could
not connect to the database. Verify
that the server that is hosting the
database is operational, and that
network problems are not blocking
communication with the server. (type
DatabaseConnectionException)
Good times,
Try running the following command:
TFSConfig registerDB /DatabaseName:Tfs_Configuration /SQLInstance:SERVERNAME /Continue
RegisterDB updates the name of the server that hosts the configuration database and in this case should resolve your DB issues. Another command you could try is RemapDBs.
Make sure you "Run As Admin" for these commands or they of course will not work.
I am guessing what is going on is attaching isn't going to be enough because TFS internal mappings no longer understands where your SQL Server db is.
Hope that helps.

Jobs with linked server failing after migration to new server (2000 > 2008 R2)

Last night we migrated to a brand new server and moved all our data from SQL 2000 to SQL 2008 R2.
Everything worked out fine except any jobs that have steps where a linked server is referenced are failing and we can't figure out why.
If I log in as 'sa' and browse the linked servers I can expand and browse the objects, etc. I can also run the jobs' code in a query window logged in as 'sa' with no problems.
However when I run the job I get the following:
Execute of job 'ARUpdate' failed. See the history log for details.
History log:
The job failed. The Job was invoked by User sa. The last step to run was step 1 (Step 1).
Executed as user NT AUTHORITY\SYSTEM. Login failed for user 'ANSAC_NT\ANSAC-SQL$'
[SQLSTATE 28000] (Error 18456). The step failed
Sql Severity: 14
Sql Message ID: 18456
Any ideas as to why this is happening? I assume it's something with the sa account?
Happens even if I recreate the job from scratch logged in as sa or with a new sysadmin account created.
Note: we ported over the logins from 2000-2008 as well if that helps.
Thanks!