Troubleshooting SQL Error: 26 - Error Locating Server/Instance Specified
===========================================================================
When attempting to connect to a Microsoft SQL Server (used by certain Wasp software), you may receive an error message containing verbiage "provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified".
This error indicates that the client PC is not able to communicate with the database on the server PC (the PC holding the database). This article discusses possible reasons and solutions for this error. Some solutions are beyond the scope of Wasp Tech Support, and you may need to consult appropriate experts in those areas.
The most common causes are listed below, with more detailed information following. Although there are a few less common causes, the vast majority of issues are due to one (or more) of these. If you'd like guidance with these instructions, please contact Wasp Tech Support.
1. The client is configured to connect to the wrong server name and/or SQL instance name.
2. Network Connectivity: The client PC cannot communicate with the server.
3. Firewall is blocking communication between client and server PCs.
4. Mobile Asset only: The server name specified in the WaspConfig database is incorrect.
5. Multiple SQL instances exist on the server, and the client isn't configured to specify the correct port number.
==============================================================
Part 1: Wrong Server Name and/or SQL Instance Name
The client must be configured to connect to the correct server name and SQL instance name. Possible reasons it might be wrong: misconfiguration during installation; server name change; database was migrated to a different server; setting was edited in the registry.
You'll need to determine the connection setting and make sure it matches the correct server and instance name. Sometimes the connection setting is mentioned in the error message, but if it's not, you can check it with the Wasp Support Utility, or by looking in the registry:
64-bit Windows: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Wasp Technologies\<product>\Options\Server
32-bit Windows: HKEY_LOCAL_MACHINE\SOFTWARE\Wasp Technologies\<product>\Options\Server
where <Product> is InventoryControl or MobileAsset or WaspTime5
The Server key usually contains the server name, a backslash, and the SQL instance name, e.g.
servername\WASPDBEXPRESS
If you're using a full (non-express) SQL Server, you might not have an instance name. You might also have a port number specified (see Part 5 for more about this), e.g.
servername
or
servername,1055
If you decide to edit this setting in order to troubleshoot, mark down the original value in case you want to change it back.
==============================================================
Part 2: Network Connectivity
The client PC must be able to communicate with the server PC over the network. To test this: On the client PC, start a command prompt: Start, Run, cmd, enter; or Start, All Programs, Accessories, Command Prompt. Type the command ping followed by the computer name of your server, then Enter. For example:
ping servername
If you see a line starting with "Pinging servername" followed by several lines starting with "Reply from", that indicates the machines are communicating.
If the client resolves the server name to a public IP address instead of the server's internal IP address, you may be able to fix that by adding an entry to the client's hosts file (beyond the scope of Wasp Tech Support).
If the client can ping the server, and the server has a private IP address, but the client and server are not on the same subnet, you'll need to enable port forwarding for the port(s) mentioned in Part 2: Firewall Troubleshooting (beyond the scope of Wasp Tech Support).
If you see lines like one of these, you have a network problem that you'll need to correct (beyond the scope of Wasp Tech Support):
Ping request could not find host servername. Please check the name and try again.
TTL Expired in Transit
Destination Host Unreachable
Request Timed Out
Unknown Host
==============================================================
Part 3: Firewall Configuration
Firewalls block most network traffic, while allowing approved traffic. If the Wasp software installer is not able to update firewall settings during the Wasp software installation process, or the settings are later removed or disabled, here's what Wasp software requires.
Add to the Inbound Allow List (use only the ports for the software you are using):
* Mobile Asset v6: License Manager: TCP port 10000
* Mobile Asset v7: Wasp MobileAsset Windows Service: TCP ports 10006 - 10008
* Inventory Control: Wasp Inventory Windows Service: TCP port 10004
* Inventory Control: handheld computer over Wifi: TCP port 10005
* WaspTime: WaspTimeServer service: TCP port 10002
==============================================================
Part 4: Mobile Asset only
If you've changed the name of the Mobile Asset server PC, or migrated the Mobile Asset database to a different server PC, the server name needs to be updated in the WaspConfig database via SQL Server Management Studio.
Detailed instructions for doing this are in:
MobileAsset: Database Server's machine name has changed, now Mobile Asset will not open
https://support.waspbarcode.com/kb/articles/10
==============================================================
Part 5: Multiple SQL Instances on the Server
Usually this situation only occurs when using an Enterprise edition of Wasp software with the database on a full SQL Server, but it can also occur with a Professional or Standard edition using SQL Server Express running alongside another instance of SQL Server. If there is only one SQL instance running on the server, this is most likely not the problem.
Detailed instructions for determining the SQL port number, then configuring your clients to specify that port number, are here:
For Inventory Control or Mobile Asset:
https://support.waspbarcode.com/kb/articles/15
For WaspTime:
https://support.waspbarcode.com/kb/articles/737