0

enter image description here enter image description here

A network related or instance-specific error occurred while establishing a connection to sql server. The server was not found or was not accessible. verify that the instance name is correct and that sql server is configured to allow remote connections. (provider: named pipes provider, error: 40 - cound not open a connectiion to sql server)

Ok, I've tried everything. http://support.sysonline.com/support/solutions/articles/4000016491-errmsg-a-network-related-or-instance-specific-error-occurred-while-establishing-a-connection-to-sql

I actually though is my Firewall; so I add the exceptions and even tried to disable the firewall. Though non of it is working; I've spend hours on youtube too.

Scenario:

  • I have an application developed with VB.net; which the installer (Setup.exe) is made.
  • msSql is use an an external database.
  • Connect connecting is using Windows Authentication
  • I installed SQLExpress 2017 from Microsoft Website.
  • Installed SQL Server Management Studio 17

    • Installed Microsoft Report Viewer 2012 Runtime CTP
    • Installed SQLSYSCLRTYPES.msi (x64)
  • MS .NET Framework 4.5 - 4.5.2

  • MS .NET Framework 4.5.1

What I am still missing? I've checked my Service.exe to ensure that SQLExpress is running & also in SQL Server 2017 Configuration Management that SQLExpress is running as well everytime.

What is likely to be in the way? The Database is in the local Device computer (on the same computer) with the deveoped application software

~~~~~~~

Question 2: So If I install the SETUP.EXE of the application, Where will the installed location will be? Maybe I can change it in this MANIFEST File.

~~~~~~~~~~~~~~~

Question 3:

Installation Guideline -------------------------------- Step 1:

-Installing Microsoft SQL Server 2012 -Open SQL Server Management Studio -Create User or Login into SQL Authentication

Step 2:

-right-click database and select restore database -select device and find a file called RMS.bak -Then press ok or confirm button

Step 3:

-Create a new user for SQL login -Select Security -> Login and right click select new user Enter following : In General or Example: a) Login name = Tho b) Select SQL Server Authentication c) Password = thopass d) Mark = enforece password policy enforce password expiration In Server Roles e) mark = public sysadmin

In User mapping a) mark all the map b) User = Database : All user and RMS User : Tho default Schema : dbo c) Every user map login -> Database role membership for model mark = db_owner public

After finish all press ok button... Login using thomas to try login

Install Application 1) Double click setup 2) Select type: ClickOnce Application name: RestManagementSys

Do anyone what does Step 3 meants? I just can't understand it. It's for MSSQL connection establishment (i think so).

Ren
  • 57
  • 2
  • 9
  • What is that "everything" you tried? What is the connection string? That error is pretty clear - either you are using the *wrong* server name or there's no server running. It's easy to fix too. Fix the connection string if it's wrong, start the server if it's down. BTW YouTube isn't a configuration tool. You don't need a video to install SQL Server – Panagiotis Kanavos Mar 13 '18 at 10:09
  • BTW have you tried the simplest thing, connecting from SSMS? Did you try to browse for servers? If the database is installed locally it will appear under the `Local` node – Panagiotis Kanavos Mar 13 '18 at 10:09
  • Possible duplicate of [How do I fix the error 'Named Pipes Provider, error 40 - Could not open a connection to' SQL Server'?](https://stackoverflow.com/questions/9945409/how-do-i-fix-the-error-named-pipes-provider-error-40-could-not-open-a-connec) – Panagiotis Kanavos Mar 13 '18 at 10:11
  • Yes, "connecting from SSMS?" -> I've use the [SQL Server Management Studio 17] to restore and connect to the database. – Ren Mar 13 '18 at 10:13
  • restore? Then you already connected once? Or do you mean you want to restore once you connect? And what does `Yes` mean? What address did you use? Did you select `Browse` in the drop down? – Panagiotis Kanavos Mar 13 '18 at 10:21
  • My previous HDD was broken/spoilded . So I have the .bak for the Database. The data is indeed in the database. So I choose to restore the DB into using the current [SQL Server Management Studio 17]. I've just added the picture to the post. I hope it may provide some clarity.. i guess. – Ren Mar 13 '18 at 10:23
  • I'll check out the link that you've suggested. I really appreciate your help. while I am not sure if the suggested link will help, I'll try anything that is out there. thank you very much. – Ren Mar 13 '18 at 10:26
  • ok, didn't seems to helped. hmm.. – Ren Mar 13 '18 at 15:12
  • ok, I manage to get some lead. – Ren Mar 13 '18 at 19:35
  • The problem I have is not something that can be solve with those typical solution that is given online. The root cause is actually related to the [LINQ to SQL Classes] whereby in the "Data Source = {String}" ; where {String} / instant is NOT Equal to the current Instant on this PC. So If I install the SETUP.EXE of the application, Where will the installed location will be? Maybe I can change it in this MANIFEST File. – Ren Mar 13 '18 at 19:44

0 Answers0