I created a Query Builder file and shared it with my team. The file is trying to utilize my connection (C:\Users\myusername\.datastudio\connections\Netezza14) when they open it. Its stating “connecting to the server failed. How would you like to proceed?”. When they select Create Conn, it allows them to choose their own connection (C;\Users\theirusername\.datastudio\connections\Netezza14) and then the QB works.
Shouldn’t the Query Builder allow them to select a connection upon opening the file (much like opening a SQL file for use in the SQL editor, “Choose server or DB”) instead of assuming the originator is the same person as the one opening the file?
Screenshot attached
Response
Sachin Prakash over 6 years ago
Hello,
Let me explain our thought process regarding why we chose this flow. When a user attempts to open a Query Builder file, there are several reasons as to why connecting to the server failed. Below are some examples:
The user renamed the connection.
The user deleted the connection.
The file was shared with another user and their Connection path is different than the originator’s path. (In some environments, connections are created on a shared network drive. In such situations, users would be able to share the Query Builder file without encountering such an error.)
The file was shared with another user and they don’t have a Connection file that connects to that DB Server
Unexpected error while attempting to connect.
When attempting to locate the connection file, we also try to find a match on the “relative path” — the path that is displayed in your Servers tab: e.g. Local Database Servers / MySampleConnection. If there is a match with the “relative path”, then the fully qualified pathname stored in the Query Builder file is ignored.
If the matching connection still could not be found, due to the different possible failure reasons, we chose to offer a dialog stating that the connection failed. We do default to the “Locate Conn” action so if the user presses Enter, the “Chooser a server DB” dialog is displayed.
Ted Leib over 6 years ago
“When attempting to locate the connection file, we also try to find a match on the “relative path” — the path that is displayed in your Servers tab: e.g. Local Database Servers / MySampleConnection. If there is a match with the “relative path”, then the fully qualified pathname stored in the Query Builder file is ignored.”
Hi Sachin,
Based on your quote above, shouldn’t the file resolve because the path is exactly the same except the username?
(C:\Users\myusername\.datastudio\connections\Netezza14) vs. (C:\Users\theirusername\.datastudio\connections\Netezza14)
Thanks!
Ted
Sachin Prakash over 6 years ago
Based on your quote above, shouldn’t the file resolve because the path is exactly the same except the username?
Yes, it should as long as both of you are using the same mount point (Local Database Servers). I’ve tried this test w/ a colleague and she was able to open the file QB file that I created on my system and vice versa. Lets do the following:
1) Pls provide the exact ADS version number. This can be obtained from Help > Support Information
2) Confirm that both of you are using the same mount point. From the screenshot that you posted, “Local Database Servers” is the mount point being used on one of the machines.
3) Confirm that the Connection Name used in Query Builder is spelt identically on the other user’s machine. To confirm the Connection Name being used in Query Builder, launch Query Builder > Connection menu > Properties. See connection-properties.png
4) You can simulate a test on your local machine. Launch an XML Editor in ADS (File > New > XML Editor) and use the toolbar’s “Open” action to load the QBW file. See qbw-file.png. Take a look at line #8 in the screenshot. If you change the value in the “pathname” attribute, save the file & then attempt to open the file using Query Builder, you should find that QB is able to load the file successfully. This simulates you sharing the file with another user. However, if you change the “path” attribute value, then you will find that QB is not able to load the file successfully.
Let me know the results of the above items & then we can diagnose further.