When trying to install SolidWorks on a Windows computer, you may encounter an issue when the installation is trying to install Microsoft SQL Server. So, the installation works fine until it reaches the stage where it needs to install Microsoft SQL Server, as it fails to install that and other components in line to get installed.
Then you will get a pop showing one of the following error messages.
SOLIDWORKS Electrical is unable to connect to the SQL Server.
Possible reasons for this failure:
Incorrect username or password
Incorrect server name
Server is unavailable
Please Check the SQL server settings under the SOLIDWORKS Electrical options.
Microsoft SQL Server failed to install.
The specified sa password does not meet strong password requirements.
For more information about strong password requirements, see “Database Engine Configuration – Account Provisioning” in Setup Help or in SQL Server 2019 Books Online.
You might also get a different error message, but the solutions mentioned here will work. So, if Microsoft SQL Server failed to install SolidWorks, follow the solutions in this post.
Fix Microsoft SQL Server failed to install SolidWorks
If Microsoft SQL Server failed to install SolidWorks, try launching the installation media as an administrator. In case, even then you face this issue, follow the solutions mentioned below.
- Configure Electrical Options
- Change block sizes
- Change the instance name
- Uncheck SW Electrical, SW Manage, and SW PDM Client
Let us talk about them in detail.
1] Configure Electrical Options
SOLIDWORKS Electrical requires a Microsoft SQL Server database to store project data. When the installation tries to install Electrical, it fails to install the Microsoft SQL Server. Therefore, we need to configure this option to resolve this error. To do so, follow the steps mentioned below.
- Once you are at the summary page of the installation, go to the Electrical Options section, and click on Change.
- Make sure that the name of the collaborative server is ablocalhost and then from the SQL Server section, tick the checkbox of Install a new instance of SQL Server.
- In the Name field, you need to add ‘ab’ before localhost and the instance name, so, it would be ablocalhost/abTEW_SQLEXPRESS
- Also, in the location field, add ab before SOLIDWORKS Electrical.
- Click on the back button to go to the Summary page and resume installation.
Wait for the installation to complete and hopefully, your issue will be resolved.
2] Change block sizes
Block sizes for disk alignment refer to the size of the data blocks that are read from or written to the storage device. In Windows 11, it is 32k which isn’t supported by SQL Server. That is why, you might encounter an issue when Solidworks tries to install SQL Server. Ideally, you should not be facing any issues, but since you are, we will alter the block size. To confirm if this is the reason for your issue, open the Command Prompt and run the following command.
fsutil fsinfo sectorinfo <volume pathname>
SQL Server currently supports sector storage sizes of 512 bytes and 4 KB (4096).
Check the values of PhysicalBytesPerSectorForAtomicity and PhysicalBytesPerSectorForPerformance. If they differ, keep the larger value to determine the disk sector size. A value of 4096 indicates a sector storage size of 4 KB.
If the block size is more than 4KB, you can add a registry key that emulates a sector size of 4 KB. To do this, execute the necessary commands in PowerShell with Administrator privileges.
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device" -Name "ForcedPhysicalSectorSizeInBytes" -PropertyType MultiString -Force -Value "* 4095"
To verify that the registry is added, run the following command.
Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device" -Name "ForcedPhysicalSectorSizeInBytes"
Finally, reboot your computer and resume the installation, hopefully, this will do the job for you.
3] Change the instance name
If you receive an error stating that the instance name is already used, there are a few things you can do. You can either change the install location or deselect products to install or uninstall by clicking the Change button. Also, make sure to unselect Electrical (under Products category).
After making the changes, resume the installation and see if it is resolved. Most probably, the issue is because of the fact there is an instance or directory with the same and these changes will solve our issue.
4] Uncheck SW electrical, SW Manage, and SW PDM Client
Since we are facing an issue with the installation of SolidWorks, we will disable SW Electrical, SW Manage, and SW PDM Client from the Products section. So, when you are at the Summary window, click on Change next to Products, and then uncheck SOLIDWORKS Electrical, SOLIDWORKS Manage, and SOLIDWORKS PDM Client. Once done, go back to Summary and resume the installation process.
Hopefully, you will be able to resolve the issue using the solutions mentioned in this post.
Read: How to install and configure SQL Server Management Studio
How to fix SQL Server error in SOLIDWORKS?
If you get any SQL Server error in SolidWorks, run the installation media with admin privileges. At times, it needs to configure some files that a normal user might not have access to. If that doesn’t work, you can follow the solutions mentioned in this post to resolve the issue.
Read: How to create SQL Stored Procedures via SQL Server
How to install SOLIDWORKS SQL Server?
You don’t have to separately run the SQL Server, when you run the SolidWorks installation media, SQL Server will automatically be installed. In case, you encounter an error during the installation of the SQL Server, follow the solutions mentioned in this post.
Also Read: SolidWorks crashing on Windows computer.