SP_whoisactive capture on Alwayson Secondary Replica issue
Since you're running sp_WhoIsActive, which looks at all running queries on the server, you can run it from any database. Just choose your database context as master or tempdb in your Agent job step.