I have written some dynamic SQL in Master that executes a stored procedure if it exists in local databases.
I now need to create a query that will execute the stored proc across all databases if it exists, and if it does not exist will create it. This must only occur if the corresponding database exists in the availability group.
Thanks in advance for any help.
Kind regards,
George