SQL Server Exception

Hemanth B 886 Reputation points
2022-05-04T15:31:26.403+00:00

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connection.(Provider: SQL Network Interfaces, Error:52 - Unable to locate a Local Database Runtime installation. Verify that SQL Server Express is properly installed and that the Local Database Runtime feature is enabled.)

I created an app which uses the SQL Server Database tables. When I run it on an external PC without any SQL Server Express tools, I am getting the above error. How can I make every PC install SQL Server Express tools?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,320 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Olaf Helper 43,161 Reputation points
    2022-05-05T06:42:38.667+00:00

    When I run it on an external PC without any SQL Server Express

    If your app utilize a SQL Server database, then it is mandatory to have a running SQL Server instance.

    How can I make every PC install SQL Server Express tools?

    Not "tools" = SSMS, the database engine is required. If no installation exists, then download the free Express Edition and install it on the client machine.

    0 comments No comments

  2. Seeya Xi-MSFT 16,461 Reputation points
    2022-05-05T06:53:53.713+00:00

    Hi @Hemanth B ,

    Welcome to Microsoft Q&A!

    Provider: SQL Network Interfaces, Error:52 - Unable to locate a Local Database Runtime installation. Verify that SQL Server Express is properly installed and that the Local Database Runtime feature is enabled.

    You need check if LocalDB feature is installed.
    199111-image.png
    What is more, you can refer to this cocument about connect to LocalDB: https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-express-localdb?view=sql-server-ver15#start-localdb-and-connect-to-localdb

    Best regards,
    Seeya


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  3. Seeya Xi-MSFT 16,461 Reputation points
    2022-05-06T09:50:07.09+00:00

    Hi @Hemanth B ,

    Hope everything goes well.
    Here is a related article which contains steps you can refer to: https://www.mssqltips.com/sqlservertip/5612/getting-started-with-sql-server-2017-express-localdb/

    Best regards,
    Seeya

    0 comments No comments