Share via

Could not log history/error message. Only members of the sysadmin fixed server role can perform this operation

Cataster 681 Reputation points
2021-08-23T01:26:55.987+00:00

I have a job setup that copies transaction logs for log shipping purposes.

It seems to be working, I think, but i cant verify that because of the following error:

2021-08-22 21:00:00.86 Starting transaction log copy. Secondary ID: 'c29f....'
2021-08-22 21:00:00.87 Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping)
2021-08-22 21:00:00.87 Error: Only members of the sysadmin fixed server role can perform this operation.(.Net SqlClient Data Provider)

I checked permissions, and clearly Im sysadmin...

So why is it complaining?

125451-image.png

SQL Server | Other
0 comments No comments

Answer accepted by question author
  1. Cataster 681 Reputation points
    2021-08-23T03:20:20.347+00:00

    I resolved this by reverting the SQL Server service and agent services logon creds from my local account to the default NT service accounts per this post.

    Strange since my AzureAD logon account is part of sysadmin...

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Ronen Ariely 15,221 Reputation points
    2021-08-23T01:48:29.877+00:00

    Good day,

    I checked permissions, and clearly Im sysadmin

    You checked your permissions but the Job is not executed by you by default (unless configured such). My guess is that it seems like the SQL Server Agent’s startup account not being a sysadmin. If you have for example the monitoring server on a separate machine then the sa in one machine is not the same user as the sa in the second machine.

    To be sure about your specific issue we need more information from monitoring the execution. In this post you can see example of solution and more important he speak about how he monitored it which can help provide more information if this did not solve your needs

    https://blog.sqlauthority.com/2019/10/21/sql-server-log-shipping-error-only-members-of-the-sysadmin-fixed-server-role-can-perform-this-operation/


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.