Send the following on WhatsApp
Continue to ChatHow to run a script on all databases that are either AG primary or standalone in SQL instance https://wordsontech.com/how-to-run-a-script-on-all-databases-that-are-either-ag-primary-or-standalone-in-sql-instance/