At the moment, i solved my problem with this script
Now i will try a powershell dbatools taks
Thanks to all for help :)
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
We have a cluster SQL 2017 always on, node1 and node2. We have a database for lansweeper aplication. I put the password for the user with this SQL script:
https://www.lansweeper.com/knowledgebase/login-failed-for-user-lansweeperuser/
When we execute failover, database moves correctly but aplication fails with login error. If i set the password with the same script in the node2, works again.
But if we move again to node1, fail again.
Thanks,
Regards
At the moment, i solved my problem with this script
Now i will try a powershell dbatools taks
Thanks to all for help :)
Hi @RAN55 ,
Welcome to Microsoft Q&A!
Passwords are stored in the master database. The password change succeeds on the primary but fails on the secondary because the password in the master on the current node is not reset. Unless the database is a contained database, server logins are also stored in the master database. Contained databases take care of themselves as contained users can be "logins" and are "contained" within the database, thus automatically included.
Best regards,
Seeya
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Thanks for the info.
How can i solve my problem ? i need to be able to move database without service interruption.
Following your conversation early today...
As for SQL Server availability groups, you always have to standalone SQL Server which are using both the same feature for HA and can "share" (not necessarily all) databases and somehow connected... they are still standalone with their user and permission management as you also can host other databases that are not part of the AG.
So you have to make sure that all users that are planning to use the AG databases exist on both/all nodes of your AG... so you have to establish a process to synchronize them.
If you are doing this manually day by day or creating an automation for this... that is your decision
I am using a PowerShell dbatools mechanism for that that runs every x minutes/hours