I have a mirrored database DB1, ServerA as primary and ServerB is mirror.
I have a job running on ServerB (mirror), configured to run against DB1 database.
I was expecting the job to fail but the job connects to ServerA, completes successfully. I am not able to reproduce the scenario on a different mirrored instance.
I am curious to know when this happens (SQL Agent connects to a different Server if the database is in mirror/restoring mode).
Note: If I re-configure the job to run against master database and access DB1 database using db1.schema.table it fails!