Today I am going to tell you some simple SQL query to reset/update the Episerver Commerce Manager admin password.
This is useful when you forgot the admin password or you pulled the latest database copy from the production server and you don't have the admin password.
So for this, you need to find two values-
To pull the name of the application from commerce database you have to follow these simple steps-
Now we are almost done with our requirement gathering.
So now again go back to the SQL Server Management Studio and select the commerce database.
Right-click on the database and click"New Query". The query editor will open so copy and paste the below query in this editor and update the highlighted values that gathered in the above steps.
SQL query for Reset/Update the password
USE [EcfSqlConnection_0fc2aba3] GO DECLARE @return_value int EXEC @return_value = [dbo].[aspnet_Membership_SetPassword] @ApplicationName = N'EPiServerCommerceManager3', @UserName = N'admin', @NewPassword = N'password1', @PasswordSalt = N'salt', @CurrentTimeUtc = N'1/1/2019', @PasswordFormat = 0 SELECT 'Return Value' = @return_value GO
FYI - Please update the "NewPassword" with your desired password. For this example, I am using password1.
Thanks for reading this blog post I hope it helps
Thanks and regards
Ravindra S. Rathore