I'm trying to map a login to a user in a database on the secondary replica of a two node High Availability group. Obviously this fails since the replica is offline. Is there a way for me to create the login mappings to users to the offline database? I'm using Windows domain accounts BTW, so no SID issues, just the mapping problem.
When connecting to the secondary, after a failover, the error is that "the users' default database could not be accessed." The default database is the one where on the primary I set the login to have the correct database mappings, and the correct default database. When the failover happens, the default database is correct, but the user is not mapped to the database. At all. I know these mappings are at the database level which is why this is throwing me for a loop.