Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't Alter Login

Tags:

sql-server

People also ask

Why do we use [] in SQL?

Using brackets allows your code to be upgraded to a new SQL Server version, without first needing to edit Microsoft's newly reserved words out of your client code.

How do I change user in database?

To change the user name of a user having CONTROL permission on the database requires the CONTROL permission on the database. To change the default schema or language requires ALTER permission on the user. Users can change their own default schema or language.

What is not a valid login or you don't have permission?

Cause: This error will occur if your Windows Username is the same as the computer name on your machine. Microsoft SQL Server will not install if they are the same.

How do I change SQL authentication mode?

In SQL Server Management Studio Object Explorer, right-click the server, and then click Properties. On the Security page, under Server authentication, select the new server authentication mode, and then click OK.


Check out this link: Fix a SQL Server Login which has MUST_CHANGE set to ON

You can use the following query to fix that:

USE Master
GO
ALTER LOGIN UserName WITH PASSWORD = 'password'
GO
ALTER LOGIN UserName WITH
      CHECK_POLICY = OFF,
      CHECK_EXPIRATION = OFF;

Replacing UserName and password with the proper values.

The link will also walk you through the process of fixing it in the management studio interface.


Basically, just change the password only, then hit OK. Open it back up and you can uncheck the Enforce password boxes.


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!