Cannot ALTER LOGIN for AG secondary

%3CLINGO-SUB%20id%3D%22lingo-sub-1221887%22%20slang%3D%22en-US%22%3ECannot%20ALTER%20LOGIN%20for%20AG%20secondary%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1221887%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EFun%20fact%3A%20given%20that%20database%20%5Bsbdb%5D%20is%20a%20secondary%20replica%20database%20on%20the%20instance%20you%20are%20in%2C%20without%20ApplicationIntent%3DReadOnly%2C%3C%2FP%3E%3CP%3E%3CFONT%3ECREATE%20LOGIN%20%5Bdomain%5Ctestuser%5D%20FROM%20WINDOWS%20WITH%26nbsp%3B%20DEFAULT_DATABASE%3D%5Bsbdb%5D%2C%20DEFAULT_LANGUAGE%3D%5Bus_english%5D%3B%20%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%3Eis%20working%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%3Ewhile%26nbsp%3B%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%3EALTER%20LOGIN%20%5Bdomain%5Ctestuser%5D%26nbsp%3B%3CFONT%3EWITH%26nbsp%3B%20DEFAULT_DATABASE%3D%5Bsbdb%5D%2C%20DEFAULT_LANGUAGE%3D%5Bus_english%5D%3B%3C%2FFONT%3E%20%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%3E%3CFONT%3Edoesn't%20work.%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%3E%3CFONT%3ERegards%2C%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%3E%3CFONT%3Ebpsauce%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Senior Member

Hi,

Fun fact: given that database [sbdb] is a secondary replica database on the instance you are in, without ApplicationIntent=ReadOnly,

CREATE LOGIN [domain\testuser] FROM WINDOWS WITH  DEFAULT_DATABASE=[sbdb], DEFAULT_LANGUAGE=[us_english];

is working

while 

ALTER LOGIN [domain\testuser] WITH  DEFAULT_DATABASE=[sbdb], DEFAULT_LANGUAGE=[us_english];

doesn't work.

 

Regards,

bpsauce

0 Replies