Remap/Align users on secondary high availability database

The users are mapped before I add database into HA group on primary server but on secondary servers they are not aligned/mapped yet and I can identify them on secondary servers by running queries

After adding database the remapping does not work  on secondary servers as the databases changes to read only and HA mode

How can I achieve the task on secondary servers when the database is into HA and the users are not mapped?

May 26th, 2015 9:24pm

Windows or Sql logins?

Seems like you could create the logins and prepare a script for mapping them when HA/DR is needed.

Free Windows Admin Tool Kit Click here and download it now
May 26th, 2015 11:24pm

they are sql logins and already into system

I just need to remap them

May 27th, 2015 12:56am

So, is the question how to remap sql logins?  If so, the answer is sp_change_users_login

If the question is how to do this when the db is in read_only mode, the answer might be just script it and use that script when the db is live.

Free Windows Admin Tool Kit Click here and download it now
May 27th, 2015 1:00am

Even when the database is live there is database mirroring error

as the database is part of HA group

May 27th, 2015 1:01am

Can you qualify that last post, Muhammad? What did you execute? Where did you execute it? What exact error messages did you get?

I suggest you look into contained databases, and change your login/users to users with passwords (there's a migration proc for that). This means that there's no re-mapping necessary.

Free Windows Admin Tool Kit Click here and download it now
May 27th, 2015 3:27am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics