In the Stardog Designer, I am trying to connect to Connect a resource, more specifically MS SQL but is failing.
Here is what I entered for the endpoint: jdbc:sqlserver://Bekhor:1433;databaseName=Sample Company;user=sa;password=mypassword
Here is the error I am getting. I looked at the TCP/IP but made sure its not blocked by firewall but I get the following errormessage:
Failed to create data source: 000012: The TCP/IP connection to the
host Bekhor, port 1433 has failed. Error: "M-Bekhor. Verify the
connection properties. Make sure that an instance of SQL Server is
running on the host and accepting TCP/IP connections at the port.
Make sure that TCP connections to the port are not blocked by a
firewall.".
Hi. Make sure you check the connectivity from the machine that's running Stardog. If you're using Stardog from the Stardog hosted cloud, it will not know about this machine name (Bekhor or M-Bekhor). You can try supplying the IP address instead, but that will only work if the machine is publicly accessible.
As long as the VM knows that its name is M-Bekhor, then it should work. If Stardog and SQL Server are running on the same VM, you could try using localhost as the server name. You may need to quote the database name since it contains a space: jdbc:sqlserver://localhost:1433;databaseName={Sample Company};user=sa;password=mypassword
According to their doc, you should use curly braces to escape spaces, but based on the error message, it doesn't look like it's getting that far. Did you try using the IP address?
ERROR:vFailed to create data source: Something went wrong and we're not
sure what it is. Contact your system admin to review Stardog
Knowledge Graph logs for more details if the issue persists.
Where do I find these "Stardog
Knowledge Graph logs"
I searched for the "STARDOG_HOME", I couldn't find it & to be honest I don't recall installing any Stardog files initially. I think I using the Stardog Cloud .. but I am stuck at this point. I don't know what to do now. The error persists! Who can assist?
The issue you're having with connecting to your MSSQL server from your Stardog Cloud endpoint as an external data source is that your MSSQL server is not publicly accessible.
The IP address you list in your message above (172.25.39.148) is a private IP address. See What Is a Private IP Address? for more details.
You will need to configure a route to your MSSQL server that is publicly accessible. If you want to lock down access to your MSSQL server (so that it's not exposed to everyone on the internet), you can configure your firewall so that only the means of egress used by Stardog Cloud is allowed to connect to your MSSQL server. We document this here.
In part A (the stackoverflow post), the SQLServer in question already has a public IP address. That user is trying to allow access from a remote client. So that does not apply to your use case.
How you accomplish part B will depend on your hosting environment; the needed steps will be different if you are running in a cloud (e.g., AWS, Azure, GCP) versus a private data center versus a home network.
To be honest, exposing any computing resource to the public internet should only be done by someone who knows how to evaluate the risks and how to do so safely.
A different approach you could try is to use a hosted RDBMS that provides public access. I haven't investigated SQLServer options, but I know there are some PostgreSQL SaaS options that offer a free tier.
The SQL Database that I am connecting to is a SandBox & its virtual machine. I am worried about security at the moment. This just proof of concept. When I go Live then I will find ways to do it securely. The SQL Database I am connecting to is for a Legacy software that is mostly installed on-prime servers. It Less likely to be in the cloud. If I have to migrate it most likely to be Azure as I have worked with it before. Could kindly give me instructions on how to publish SQL database for both Azure as well as instruction for MS SQL on a local server or virtual machine.
The Legacy Software has a MS SQL backend & I don't see them using PostgreSQL.
Could kindly give me instructions on how to publish SQL database for both Azure as well as instruction for MS SQL on a local server or virtual machine.
Unfortunately, this is beyond the scope of my knowledge. I would be doing the same thing as you, namely using a search engine to find the necessary solution.
If you are working in a VPC in AWS, you could try installing Stardog via our AWS Marketplace AMI. The AMI comes with a built-in license that is intended for a non-production system (e.g., it does not support clustering).
If that does not work for you, I recommend that you contact our sales team, and they can assist you with getting a trial license, so that you can install a Stardog server in the same local network as your SQLServer.