When using Microsoft SQL Server with SOLIDWORKS PDM, you will absolutely come across situations where you need the system admin password for SQL – upgrades, backups, running SQL queries, SQL card lists for data cards, etc. If you find yourself without the SA password recorded anywhere, you’ll be left stuck and unable to access a major component of your PDM system. This article is meant to walk through the two main ways you can reset your SQL password when you don’t already have it on hand.
You will need to log in to the SQL server with a local Windows Administrator account server to do this.
Changing the SA password in SQL does not update the SQL login password fields in the PDM Archive and Database Server properties where the SA password is referenced. The PDM Archive and Database configurations will need to be updated manually.
It is still necessary to have a secure Windows account with appropriate permissions to access SQL and change the SA password. Having that set up can prevent this sort of issue from ever coming up in the future. We’ll talk more about that at the end.
Before attempting the reset, be sure to checkallavailable resources. Ask your IT team and CAD Admins, and be sure to check any internal documentation or password vaults. It’s always better to find the password rather than reset it when possible.
Plan A: Windows User
This option assumes you have previously set up Windows users/groups for your SQL instance as alternative ‘sysadmin’ users. If that’s not the case, skip to Plan B.
Log in to the SQL server as a Local Windows Administrator.
LaunchSQL Server Management Studioas an administrator. You can searchSSMSfrom the Windows Start menu, right-click it, and select theRun as Administratoroption.
SelectWindows Authenticationin the Authentication dropdown. Ensure thatTrust server certificateis checked. ClickConnect.
InObject Exploreron the left, expandSecurity>Logins.
Double-click the SA user to open the Login Properties dialog.
In the Login Properties dialog, delete any pre-filled credentials and type a new password in both thePasswordandConfirm Passwordfields.
Uncheck theSpecify old passwordandEnforce password policyboxes if they’re checked.
ClickOKto close the dialog.
CloseSQL Server Management Studioand relaunch it. You want to confirm that the new credentials work as expected.
Switch the Authentication field toSQL Server Authenticationand enter the new SA password you just created.
Tip: If you find you still cannot connect with the SA account after changing the password, you may need to go back into the Login Properties for SA and confirm the Login is set toEnabledunder theStatus section.
Once the SA password is successfully reset in the SQL Server Management Studio, the SQL login will need to be updated in the PDM Archive and Database Server Configurations. Head to Updating PDM With the New Password for the next steps.
Plan B: SQLCMD
If you don’t already have a Windows user or group defined as ‘sysadmin’ in your SQL instance, you will need to use the SQLCMD method to create a new sysadmin user for SQL. You can then log in with this new user and reset the actual SA password. This can be done by launching SQL in “single-user mode”. Then create a new SQL user with ‘sysadmin’ permissions using SQLCMD. This lets you to log in to SQL Server Management Studio and update the SA password.
Log in to your SQL server as a local Windows admin. OpenServicesby searching the WindowsStartmenu for “services”.
Stop all the following services, if present. Note that for the PDM server services, you’ll need to go onto the server they’re hosted on to shut them off if SQL is housed separately from your other components.
SolidNetwork License Manager
SOLIDWORKS PDM Archive Server
SOLIDWORKS PDM Database Server
SQL Server (MSSQLSERVER)
Be sure to turn off any other SQL Server services with different instance names. They should show asSQL Server (InstanceName).
SQL Server Agent (All Instance Names)
SQL Server Browser
SQL Server CEIP Service (All Instance Names)
SQL Server VSS Writer
TCP/IP NetBIOS Helper
Once these are turned off, open a Command Prompt window as an admin. You can do so by searchingStartfor “CMD” and selectingRun as administrator.
In theCommand Prompt, type the following lines, hitting Enter between each line.
Note 1: These are case-sensitive! Be careful to match things up properly.
Note 2: If you use a named SQL instance, you’ll switch out “MSSQLSERVER” with “MSSQL$InstanceName” (where “InstanceName” is the name of your SQL instance).
net start MSSQLSERVER /m”SQLCMD” SQLCMD CREATE LOGIN tempadmin WITH PASSWORD = 'RecoveryPassword123!' GO sp_addsrvrolemember ‘tempadmin’, ‘sysadmin’ GO EXIT net stop MSSQLSERVER net start MSSQLSERVER
Let’s walk through what we just did:
net start MSSQLSERVER /m”SQLCMD”
This will start the SQL server in single-user mode, which only allows a single user/process to connect to it. We specifically only allow that single connection to happen through “SQLCMD”, which is a command-line utility for executing SQL. If you have a named instance of SQL, you would replace “MSSQLSERVER” here with “MSSQL$InstanceName”.
SQLCMD
This launches the SQLCMD utility.
CREATE LOGIN tempadmin WITH PASSWORD = 'RecoveryPassword123!' GO
This creates a user called “tempadmin” with the password “RecoveryPassword123!” and executes the command. We use this password to satisfy most complexity requirements, but depending on your environment, you could just use ‘password’ if you prefer.
sp_addsrvrolemember ‘tempadmin’, ‘sysadmin’ GO
This adds the “sysadmin” role to the tempadmin user and executes the command. This role is what will allow us to edit the SA user.
EXIT
We exit the SQLCMD utility.
net stop MSSQLSERVER net start MSSQLSERVER
And finally, we stop the SQL service and restart it normally so it’s no longer in single-user mode.
Now that you've created a new sysadmin user, you can log intoSQL Server Management Studiousing those credentials to reset your SA user.
OpenSSMSby searching for it from theStartmenu.
Set theAuthenticationtype toSQL Server Authentication,enter the tempadmin credentials, and clickConnect.
Once logged in, go toObject Exploreron the left and expandSecurity>Logins.
Double-click the SA user to open the Login Properties dialog.
In the Login Properties dialog, delete any pre-filled credentials and type a new password in both thePasswordandConfirm Passwordfields.
Uncheck theSpecify old passwordandEnforce password policyboxes if they’re checked.
ClickOKto close the dialog.
Close and re-openSSMS. Log in with the SA credentials to confirm they work as expected.
Go back intoObject Explorer>Security>Logins.
Right-click the tempadmin user you created > Delete. This ensures you’re not leaving a potentially unsecured system admin SQL user behind.
Go back into theServicesmenu and start each service you stopped at the beginning.
Now that you've updated the SA password and removed the old user, you can update PDM with the new credentials.
Updating PDM with the New Password
Once you’ve reset the SA password, PDM will need to be updated with the new credentials so the Archive and Database Services can properly integrate with the SQL database.
Archive
On the server hosting your archive service (if separate from the SQL server), open theArchive Server Configurationtool. This is located in the Windows Start menu under the SOLIDWORKS PDM folder.
First, you'll update the default server settings. Go toTools>Default Settings.
Under theLogintab> SQL Login, click theChange…button. Enter the new SA password and clickOKtwice to get back to the main Archive Configuration screen.
Then, you'll update the vault-specific SQL login for each vault on your server. Double-clickArchives.
Right-click the vault name >Properties.
Go to theLogintab and clickChange…under theSQL loginsection.
If theUse default SQL loginbox is checked, you can skip this step. The vault is using the server default password.
Database
On the server hosting your PDM Database Service (this is separate from SQL and could be on either the archive or SQL server if they’re separate), open the Database Server Configuration tool. This is located in the Windows Start menu under the SOLIDWORKS PDM folder.
In the Database Service dialog, enter the new SA credentials and clickOK.
Once both the Archive and Database configurations are updated, you’ll want to go into the Windows Services menu (type ‘services’ into the Start menu search) and restart both the Archive and Database Services to apply the changes.
SQL Card Lists
If you utilize SQL Card lists, you’ll also want to go into theAdministrationtool underLists>CardListsand update the credentials there if you’re using the SA account to connect.
Preventing this in the Future
Once you’ve updated the password, you always want to be sure it’s stored somewhere safe. The intention is not to lose that again, but there’s always a chance something might happen. It’s best to prepare for these scenarios with a backup plan.
You can do so by adding Windows users or groups as sysadmin users to your SQL environment. Our recommendation is to create either a local admin on the server or to use a domain admin (or a domain admin group) so that you have multiple redundancy points available in the case of lost data, employee turnover, and the like.
To add new logins to SQL:
Go intoSSMS>Object Explorer>Security>Logins.
Right-clickLogins>New Login…
Ensure the login type is set toWindows authenticationand clickSearch…
Enter the local admin or domain admin/admin group and clickOK.
Go to theServer Rolestab and check ‘sysadmin’.
When done, clickOK.
You now have a Windows user or group whose credentials will allow admin access to SQL in the event of a lost SA password. You’ll need to log in to the SQL server as that user and then use theWindows AuthenticationinSSMSto log in.
Final Thoughts
Keeping track of important admin logins for your environment should be a top priority. However, sometimes things happen, such as employee turnover, security events, data loss, etc. You still need access to your PDM database even in the event of a lost password.
We also have an article explaining how toreset a lost PDM Admin password, if you need help with that. If GoEngineer is your VAR, you can reach out to Technical Supportif you have questions or require other assistance!
I hope you found this article explaining how to reset the SQL SA user password helpful. Check out more tips and tricks below. Additionally, join the GoEngineer Community to participate in discussions, create forum posts, and answer questions from other SOLIDWORKS users.
24 Tips to Master SOLIDWORKS PDM
SHORTCUTS ⋅ SEARCHING ⋅ PDM ADD-IN
24 of our expert tips to help you master using SOLIDWORKS PDM. Improve performance, find files faster, and work like a pro.
Download "24 Tips to Master SOLIDWORKS PDM"
Editor's Note:This article was originally published in June 2020 and has been updated for accuracy and comprehensiveness.
Rowan Gray is a Technical Support Team Lead at GoEngineer with a specialty in SOLIDWORKS PDM and related data/lifecycle management. They have been with GoEngineer since 2020, and have a strong IT background that helps them more fully support customers with whatever issues may arise in their PDM environment. In their free time they enjoy playing video games, crocheting, and spoiling their pets.
Get our wide array of technical resources delivered right to your inbox.
Unsubscribe at any time.
×
Alert
As of June 2022, Microsoft will no longer support Internet Explorer. To ensure your browsing experience is not interrupted please update to Microsoft Edge.