Symptom:

During installation of the databases on the SQL Server, the user sees the following error:

Error 27552. Error creating database sdb_ShipDb. Server: Microsoft SQL Server \SHIPWEIGHT. CREATE DATABASE failed. Some file names could not be created. Check related errors. (1802)

Cause:

This error will occur if you have uninstalled SQL Server, but have left your ShipWeight database data files still on the computer. During the installation, when ShipWeight tries to create a new database, it finds other files in its place and can't create it.

Solution:
If you want to keep your old databases
  1. In SQL Server Management Studio Object Explorer, connect to an instance of SQL Server Database Engine, and then select to expand that instance view in SSMS.

  2. Right-click Databases and select Attach.

  3. In the Attach Databases dialog box, to specify the database to be attached, select Add. In the Locate Database Files dialog box, select the location where the database resides and expand the directory tree to find and select the .mdf file of the database; for example:

    C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\DATA\sdb_shipdb.mdf

Attach the following files:
  • sdb_shipdb.mdf
  • swsystem.mdf
  • swlogin.mdf
  • sw00_projectdb.mdf
  • sw00_projectdb_log.mdf
  • sw04_projectdb.mdf
  • sw04_projectdb_log.mdf



If you don't want to keep your old databases:
After uninstalling SQL Server, you must also delete or move the database files. By default, the database files:
  • sdb_shipdb.mdf and sdb_shipdb_log.ldf
  • swsystem.mdf and swsystem_log.ldf
  • swlogin.mdf and swlogin_log.ldf
  • sw00_projectdb.mdf and sw00_projectdb_log.ldf
  • sw00_projectdb_log.mdf and sw00_projectdb_log_log.ldf
  • sw04_projectdb.mdf and sw04_projectdb_log.ldf
  • sw04_projectdb_log.mdf and sw04_projectdb_log_log.ldf

These files will typically be in C:\Program Files\Microsoft SQL Server\MSSQL10.SHIPWEIGHT\MSSQL\DATA or similar folder.