0

I'm facing a strange issue in one of my availability replicas. Always on is runing on SQL Server 2017. The availability group is composed of two nodes. I was checking the owner user of both replicas and here comes the issue. In the primary node the owner is the user that was configured to that purpose:

replica_server_name ag_name   owner_sid       name
-------------------------------------------------------------
XXXXXXDB11        XXXXXHA11  0xB31XXXXXX       usr_sql_xxxx

My surprize was that when the other replica was checked the owner is public role

replica_server_name ag_name   owner_sid   name
--------------------------------------------------
XXXXXXDB12        XXXXXHA12     0x02       public

Does any body has a clue why in one of my replicas the owner is public role?

1 Answer 1

2

Does any body has a clue why in one of my replicas the owner is public role?

It would have had to be manually changed at some point. Database ownership resides in the master database, as such that information is not sent over to other replicas as master cannot belong in an AG (2022 does have contained AGs which changes this behavior). When autoseeding it should be owned by sa (0x01) as that's the context of the restore.

4
  • Thanks for the response but we're pretty sure that there was no manual change on this server...
    – ekom77
    Nov 21, 2022 at 13:29
  • @ekom77 I'm just letting you know how it works. If you can repro it, I can investigate, otherwise, "pretty sure there was no manual change" isn't going to hold. Nov 21, 2022 at 18:34
  • We can't reproduce this issue because we don't know what caused it... Is there any chance it could cause it other than manual intervention?
    – ekom77
    Nov 23, 2022 at 11:10
  • @ekom77 Nope, that's why you can't reproduce it. It could be a bug, but that's highly unlikely and would take invalid configurations that would break other items. Nov 23, 2022 at 14:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.