When upgrading from Windows 7,8, or 8.1 to Windows 10 you will encounter this issue when upgrading.

Problem:

When upgrading from Windows 7,8, or 8.1 to Windows 10 you will encounter this issue when upgrading. 

[7/30/2015 11:07:48 AM - Error - v5.4.1.6]
The following exception(s) occurred loading the Configuration service.
The following error(s) occurred:
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 - Could not open a connection to SQL Server)



Solution 1:

Copy the directory: C:\Windows.old\Windows\System32\config\systemprofile\AppData\Local\Microsoft\Microsoft SQL Server Local DB

to

C:\Windows\System32\config\systemprofile\AppData\Local\Microsoft\Microsoft SQL Server Local DB

If this doesn't work, move on to the next step


Solution 2:
  1. Open CMD as Adminsitrator
  2. Type in the following command: sqllocaldb info "v11.0"
  3. If you get the following message the (LocalDB instance "v11.0 is corrupted!") the SQL Local DB will need to be recreated or get a message that says the localdb instance does not exist you will need to rebuild the SQL Local DB instance.
  4. Open the PSTools provided at link  http://download.sysinternals.com/files/PSTools.zip
  5. Download the PSTools.zip to the desktop extract to the desktop.
  6. Enter the following into CMD running as Administrator: CD C:\Users\[Enter the User Account your are logged in as]\Desktop\PSTools
  7. Once executed run the following command in CMD: PSExec -i -s cmd.exe.
  8. Accept the prompt and install the service a new CMD window will pop up. You are now running CMD as NT Authority\System account(Local System)
  9. Type in the command: sqllocaldb delete "v11.0" it will execute and either remove the existing SQL Local DB instance or tell you that it does not exist.
  10. Type in the command: sqllocaldb create "v11.0" it will execute and create the local db instance in the following location for NT Authority\System: C:\Windows\System32\config\systemprofile\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\v11.0
  11. Copy and paste the contents within the location listed above to the following location: C:\Users\[ENTER USER THAT IS LOG IN USING PSIcapture]\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\v11.0
  12. If you have existing BatchManager.mdf and Configuration.mdf in C:\ProgramData\PSIGEN\Capture.Services\Batch Manager or Configuration ensure that you back them up to another folder or location. They can be backed up to a folder within the same location that the .mdf and .ldf files for Configuration and BatchManger are stored. You can also simply rename the files with a different extension.
  13. Start Capture Services and you should see new Configuration.mdf and BatchManager.mdf files being created.
  14. Once new Databases have been completed stop the Capture Service and delete the new created Databases. This step only needs to be followed if you have existing configuration data.
  15. Copy the backed up Databases back into their original locations.
  16. Start the Capture Service again and now you should be able to utilize the same configuration data using the Capture Service as Local System