• You could try to wrap the code in a TRY...CATCH block. In the TRY part you define the linked server to the primary instance. If this fails it will jump to the CATCH block. And in the CATCH part you can specify the linked server to the partner instance.

    The downside is that it will first try the primary instance and will wait untill the timeout message before it continues to the partner instance.

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **