Click here to Skip to main content
15,888,401 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am developing a WPF application with SQL Server 2014.

In our server side, I have created SQL Login as

CREATE LOGIN <username> WITH PASSWORD = <oldpassword> MUST_CHANGE,CHECK_EXPIRATION=ON,CHECK_POLICY=ON, DEFAULT_DATABASE =<databasename> DEFAULT_LANGUAGE=[English]

Now after changing the password of above user by

ALTER LOGIN <username> WITH PASSWORD= <newpassword>, OLD_PASSWORD= <oldpassword>, DEFAULT_DATABASE=<databasename>, DEFAULT_LANGUAGE=[English]

I am able to open this connection with Old Password and new password both (by using VS2013 C# connection string ). Condition : It will work only till we restart our server or service.

As per the requirement, user should be able to login only with new password. Can this community help me.

Do we have some restriction in SQL to open connection/login only with New Password.
Thanks in Advance.
Posted
Updated 28-Sep-15 21:56pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900