Skip to main content

I am trying to connect my Neo4j Data with SQL server. I found that there are 2 options:
1. CData Connect 
2. CData ODBC


But for both I cannot connect my Neo4j Data. The following message is being shown:
“Test connection failed. Error: Testing connection failed. Inner Error: Test Connection: Connection closed.”

@mamoonsaleem Thank you for reaching out. To confirm, have you been able to configure a connection to Neo4j as described in the link below? For the ODBC driver, you would then need to set up a linked server to connect it to SQL. Instructions on this are also provided below.

Configure connection: https://cdn.cdata.com/help/LNJ/odbc/pg_connectiono.htm
Linked server: https://www.cdata.com/kb/tech/neo4j-odbc-linked-server.rst

If the issue persists, however, as this is more technical in nature, please reach out to our support team at [email protected] so we can take a deeper look at troubleshooting. When you reach out, please provide screenshots of the error message along with any relevant configurations so we can assist with this further.


Yes I went through these steps but it is giving an error of ‘Connection closed’. I am using trial version right now and it will end soon as in this time I need to confirm that it works for me or not so I can purchase for future use. Please resolve the query as soon as possible. 


Hi @mamoonsaleem ,

The error you encountered is due to your attempt to use the BOLT protocol with port 7687. However, our CData ODBC Driver for Neo4j only supports the HTTP API, as stated in the driver’s online documentation.
To resolve this issue, please ensure that HTTP is enabled in your Neo4j instance. When establishing a connection, set the port to its default value of 7474.


Thank you, That totally worked.

But while connecting with the new linked server I am coming with the following error, Although I have already initiated TDS remoting service. I am providing with the error screenshot and other relevant screenshots


 

 

Thanks


Hi @mamoonsaleem ,

I have a few points to address:

  1. If you are using a 64-bit operating system, I recommend opening the 64-bit version of ODBC Data Sources and configuring the CData Neo4j Sys 64-bit.
  2. Please ensure that the port number you assign to the service in the SQL Gateway is different from the port number used by the locally installed SQL Server.
  3. When creating a linked server in SSMS, after specifying the General information, navigate to the Security setting. Select “Be made using this security content” and provide the login credentials (username and password) for the user you created in SQL Gateway. For more detailed instructions, please refer to this link: Connect to Neo4J Data as a Linked Server (cdata.com).

I followed the steps. but no lead


 


 


No, I am not facing that issue currently as my server is connected(thanks to you) but the query is not running and the tables are not visible on SSMS


 


 


 


 


@mamoonsaleem To confirm, is your query now able to succeed?

If the tables continue to not appear, then it would be helpful to have logging to look further into this issue. Please reach out to our support team at [email protected] for instructions on how to generate logging so they can assist with this further.


 Hi @mamoonsaleem ,

Just for clarification, the labes will be visible on ‘Views’ because our CData ODBC Driver for Neo4j currently is ‘read-only’. This means that all labes will be teated as views since you cannot Insert, Update or Delete their data.

Regarding the other issue, I suggest you incorporate OPENQUERY into your SQL statement. Here's an example of the query you were attempting to execute: SELECT * FROM OPENQUERY(FINOSYS, 'SELECT * FROM EFINOSYS].OCData Neo4j Sys].aNeo4j].').


Query: SELECT * FROM OPENQUERY(FINOSYS, 'SELECT * FROM FINOSYS]..CData Neo4j Sys]..Neo4j].')

Error:

OLE DB provider "SQLNCLI11" for linked server "FINOSYS" returned message "Deferred prepare could not be completed.".
Msg 0, Level 20, State 1, Line 1
The database 'FINOSYS.CData Neo4j Sys' doesn't exist.

Completion time: 2023-07-05T23:04:32.9564016-07:00



Query: SELECT COUNT(*) FROM MFINOSYS].]CData Neo4j Sys].]Neo4j].]Color]


Result: Null


Reply