3 Replies Latest reply on Dec 22, 2017 8:08 AM by Christopher Burton

    Could not access the item in the database when connected over VPN

    Conner Stewart

      I'm currently having an issue with my Solidworks PDM Setup. I have no issue connecting to the vault with a computer directly connected to the local network but when someone attempts to connect to the vault through Microsoft VPN it throws this error: "Could not access the item in the database." when I check the log file it reads:

       

      Error running query in SpDbOdbc

      State=08001

      Msg=[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.

       

      Server: **server name**

       

      Database: **database name**

       

      I've found at least one other post with the same issue but with no solution.

        • Re: Could not access the item in the database when connected over VPN
          Martin Solem

          Hi Conner,

           

          This is a communication issue and should be solved by IT/Network admin.

          Your machine cannot connect to the SQL server. The most usual problem is that DNS is not working, so your computer cannot translate "sqlserver-01" into the correct IP address.

          You can test this using the PING command when you are connected with VPN (given PING is not blocked in your network), for example:

          Open Command Prompt (cmd.exe) and type:

          If this is the case, then there are 3 ways to fix it. The IT/Network guys should the DNS problem. OR you change all entries for PDM database server in Windows Registry from servername to IP-address. OR you edit your hosts file in Windows.

           

          There are other reasons for this error too, but this is the one i get the most. What they have in common is that they all are communication issues and should be solved by IT/Network admins.

           

          Regards,

          Martin

          • Re: Could not access the item in the database when connected over VPN
            Christopher Burton

            I know this question already has a marked answer, but I was having this same issue earlier and believe I have found an easier or more permanent solution than batch editing hosts files. This post is high enough in the results from google for "solidworks pdm could not open database" or similar searches that I think it could help others too.

            For the record, I am using SW2017 SP5.0 and PDM Standard 2017

             

            The problem.

            The problem stems from how when a computer is on the same local network as the PDM server(s), the machines that host the database and/or vault are addressable and discoverable by a simple, unqualified, hostname.

            For example, lets say the database and the vault are hosted on the same machine, and it is configured with "PDM-server" as a hostname and "VAULTN1AME" as a vault name. Each of the client computers on the local network are setup and configured to access "VAULTNAME" on "PDM-server" and everything works fine.

            However, once you move a client computer off the local network, it looks for Vault on PDM-server but can't find it. If you tried to ping "PDM-server" you wouldn't get any response, and it wouldn't be reachable because there's no computers with a hostname of "PDM-server" on your local network. When you search for just a hostname, a router will usually only check as far as its own local network but not forward the request any further.

             

            The solution.

            You need to configure the client computer to search for the PDM server using a fully qualified domain name. For example, lets say your work local area network internal domain name is work.lan. Now, the address of the PDM server would be "PDM-server.work.lan" and you could search for it that way.

            I'm guessing that Connor's solution was to edit the client's hosts file to automatically append a ".work.lan" type extension to any unqualified host names, or at least tell the computer to search the ".work.lan" domain in addition to whatever local domain it was already checking.

            My solution, because I don't understand my hosts files well enough to want to change them, was to change the address of the PDM server that the client was looking for in the first place.

             

            The address of the server that Solidworks PDM on the client machine is trying to reach is stored in the windows registry in two locations that I could find.

            Open the first registry key:

            Computer\HKEY_LOCAL_MACHINE\SOFTWARE\SolidWorks\Applications\PDMWorks Enterprise\Databases\VAULTNAME

            and edit the following;

            Name          From                                   To

            DbServer     PDM-SERVER\SWPDM     PDM-SERVER.WORK.LAN\SWPDM

            ServerLoc    PDM-SERVER                   PDM-SERVER.WORK.LAN

             

            The second registry key location would be something like

            Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\SolidWorks\Applications\PDMWorks Enterprise\Databases\VAULTNAME

            And you would again edit the following;

            Name          From                                   To

            DbServer     PDM-SERVER\SWPDM     PDM-SERVER.WORK.LAN\SWPDM

            ServerLoc    PDM-SERVER                   PDM-SERVER.WORK.LAN

             

            Now, the client computer will be able to connect to the database again.

             

            Notes.

            I got most of the way to this solution by following this guide from javelin tech

            https://www.javelin-tech.com/blog/2017/01/rename-solidworks-pdm-archive-server/

             

            Troubleshooting.

            I discovered that updating the ServerLoc string in the first key location allowed me to get past the E_FVC_SOCKET_CANT_GET_HOSTBYNAME error with Explorer.EXE

            Then the E_EDM_DATABASE_ACCESS error was solved by updating the DbServer string.

             

            Updating values in the second key location helped solve a couple more errors I was then having.

            Updating ServerLoc again fixed a recurring E_FVC_SOCKET_CANT_GET_HOSTBYNAME error I was having with both OUTLOOK.EXE and EXCEL.EXE as I believe they have some sort of plugin or add on for PDM that they want to log in for.

            Then, updating DbServer fixed an E_EDM_DATABASE_ACCESS error that both OUTLOOK.EXE and EXCEL.EXE were still having.

             

            So, I hope this summary of how I fixed my problem logging into PDM from a VPN or other remote network helps some others too.

            It was all purely a client-side configuration issue, but hidden in the registry, so it took me a little while to debug. I wonder if I had been more careful setting up the client in the first place and used more fully qualified computer addresses that this could have been avoided.

             

            Oh, and all standard disclaimers about the dangers of editing your registry apply. Be careful in there.

             

            Good luck!