Investigating SQL Server LocalDB installation when working with Advance Steel / Revit

Autodesk Support

Nov 8, 2024


Products and versions covered


Issue:

Guidance on investigating and troubleshooting the installation of SQL Server Express LocalDB when Advance Steel / Revit products fail to connect to all their databases.

Solution:

SQL Versions

Starting with the 2024 version, Revit and Advance Steel are designed to use SQL Server Express LocalDB 2019.
The 2018 - 2023 versions of Revit and Advance Steel are designed to use SQL Server Express LocalDB 2014 SP1 (SP3).
When attaching a database to an SQL instance of a higher version, the database is automatically upgraded to that version. Note that SQL is not backward compatible.

Windows 11

If using Windows 11, go through the steps in the following article to check your computer's sector size before going through the steps below: SQLDUMPER.EXE window opening and closing when launching or working in Revit or Advance Steel

To investigate the SQL Server Express LocalDB on your machine follow this workflow:

Check the State of the sqllocaldb

  1. Open the Command prompt window (press Win key + R and then type CMD). 
  2. Type "sqllocaldb i".
  3. Press Enter.
  4. The following messages should be shown:
C:\Users\xxxxxxx>sqllocaldb i
AdvanceSteel2021
AdvanceSteel2022
AdvanceSteel2023
AdvanceSteel2024
MSSQLLocalDB
SteelConnections2021
SteelConnections2022
SteelConnections2023
SteelConnections2024v15

Notes:

  • The 2018 - 2020 versions of Advance Steel & Revit use the instance "MSSQLLocalDB".
  • Starting with the 2021 version, Advance Steel and Revit use dedicated SQL instances.
  • The name of the SQL instance used by Advance Steel is in the format "AdvanceSteel202x".
  • The name of the SQL instance used by Revit is in the format:
    • Revit 2021-2013 versions --> "SteelConnections202X"
    • Starting with Revit 2024 --> "SteelConnections202Xv15".
  • The investigation should focus on the specific SQL [instance name] corresponding to the version and product.
  1. Type "sqllocaldb i [instance name]".
  2. Press Enter.
  3. For example, the following message should be shown for the Revit instance:
C:\Users\xxxxxxx>sqllocaldb i SteelConnections202X
Name:               SteelConnections202X
Version:            12.0.4100.1
Shared name:
Owner:              xxx\xxxxxxx
Auto-create:        Yes
State:              Stopped
Last start time:    23/10/2018 20:39:51
Instance pipe name:
Note: The version might be:
  • 12.0.5000.0, corresponding to SQL Server 2014 SP2 Express;
  • 12.0.6024.0, corresponding to SQL Server 2014 SP3 Express.
  • 15.0.2104.1, corresponding to SQL Server 2019 Express.
  1. If the message is not in this format, it is likely that the SQL Server LocalDB is not (properly) installed. In this case (re)install Microsoft SQL Server 201x Express LocalDB. See below for instructions on how to clean reinstall it.

 

Check that sqllocaldb can be Started

  1. If the message is as expected above, open a Command prompt window (press Win key + R and then type CMD), and run the following tests:
    1. At the Command prompt (this will default to C:\Users\%USERNAME%\) type the following and press Enter:

sqllocaldb start [instance name]

(For example, for Revit 2022 type "sqllocaldb start SteelConnections2022").

  1. The following message should be returned:

LocalDB instance "SteelConnections2022" started.
  1. At the Command prompt type the following and press Enter: 
sqllocaldb stop SteelConnections2022
  1. The following message should be returned:
LocalDB instance "SteelConnections2022" stopped.
  1. If the tests above are not successful or the database error message is still appearing when starting Advance Steel / Revit, the SQL instance / installation might be corrupt. In this case:
    1. Recreate the SQL instance (see steps below).
    2. Clean reinstall SQL Server 201x LocalDB Express (see steps below).

 

Delete and Recreate the SQL instance

  1. Open a Command prompt window (press Win key + R and then type CMD) and do the following:
    1. At the command prompt type the following and press return/enter:

sqllocaldb delete [instance name]
(e.g. for Revit 2022 type "sqllocaldb start SteelConnections2022").
  1. If there is an error on stopping instance, use the -k switch to stop the instance
sqllocaldb stop SteelConnections2022 -k
  1. The following message should be returned when the instance is deleted: 

LocalDB instance "SteelConnections2022" deleted.
  1. At the command prompt type the following and press Enter:

sqllocaldb create SteelConnections2022
  1. The following message should be returned:

LocalDB instance "SteelConnections2022" created with version 12.0.4100.1.

 

Clean Reinstall SQL Server 201x LocalDB Express

  1. Uninstall Microsoft SQL Server 201x Express LocalDB:
    1. Go to Windows > Control Panel > Uninstall a product.
    2. Search for Microsoft SQL Server 201x Express LocalDB.
    3. Uninstall it.
Note: If it is not there, it means that it is not installed at all.
  1. Clear the %temp% folder.
  2. In Windows Explorer, navigate to the folder: %localappdata%\Microsoft\
    • If the folder Microsoft SQL Server Local DB is present, rename it by adding "_OLD" to the end of its name.
  3. Navigate to the folder: C:\Program Files\Microsoft SQL Server\
    • The folder ...\120\LocalDB corresponds to SQL 2014. If it exists, rename it by adding "_OLD" to the end of its name.
    • The folder ...\150\LocalDB corresponds to SQL 2019. If it exists, rename it by adding "_OLD" to the end of its name.
  4. Download the corresponding version of Microsoft SQL Server Express LocalDB.
  5. Run the downloaded file to install SQL LocalDB.

Products:

Advance Steel; Revit Product Family;


Was this information helpful?


Need help? Ask the Autodesk Assistant!

The Assistant can help you find answers or contact an agent.


What level of support do you have?

Different subscription plans provide distinct categories of support. Find out the level of support for your plan.

View levels of support