question

eghetto avatar image
eghetto asked

Availability Group: Setting TRUSTWORTHY ON

Dear folks!

In an AlwaysOn AG I would like to set a database as trustworthy. Here is my approach:

  1. ALTER DATABASE MyDB SET TRUSTWORTHY ON (NODE A - primary)
  2. Manual failover to Node B
  3. ALTER DATABASE MyDB SET TRUSTWORTHY ON (NODE B)
  4. Manual failover back to Node A

Is there a better/faster way to achieve this?

Thanks!

availability-groupsalter-databasefailover partner
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
ThomasRushton avatar image
ThomasRushton answered

I've not had much luck doing that recently, and have always ended up taking the DB out of the AG, making it trustworthy, and then re-adding it to the AG

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

eghetto avatar image eghetto commented ·

Yeah, but if I remove the (primary) DB from the AG, the secondary DB will be in restoring mode. And I won't be able to alter it...

0 Likes 0 ·
eghetto avatar image eghetto eghetto commented ·

Oh, I think I get your point. So the steps would be like following:

  1. Set primary DB as trustworthy
  2. Remove the primary DB from AG
  3. Create a Backup form primary DB
  4. Restore this Backup with no recovery on secondary
  5. Add primary DB to the AG
  6. Join secondary DB to the AG

Right?

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.