0 Followers · 150 Posts

Java Database Connectivity (JDBC) is an application programming interface (API) for the programming language Java, which defines how a client may access a database.

Currently could be downloaded from here.

Question Kalle Päplow · Mar 29, 2023

Hello,

I have a question regarding the Intersystems Caché Database and its jdbc driver. I need to set the connection timeout for the database, but I couldn't find any documentation stating that the jdbc driver for Caché supports setting the connection timeout. However, I noticed that the jdbc driver for the Intersystems Iris Database appears to support this feature.

My question is, can I use the Iris jdbc driver to set the connection timeout for the Caché Database?

The jdbc driver I use: cache-jdbc-2.0.0.jar

Thank you for your help.

Best regards,
Kalle

0
0 271
Article 王喆 👀 · Mar 12, 2023 5m read

SSH framework is a relatively representative framework of Java, which was popular many years ago. There are Struts+Spring+hibernate and Spring MVC+Spring+hibernate. Of course, I used the second one in college. If I can connect IRIS to Hibernate as a library, does it also mean that IRIS can be developed using SSH framework in theory?

Tools and environment

JDK 1.8

       Maven

       Hibernate 5.X.X

       IRISHealth-2022.1.3

       intellij idea

       Windows 10 64

Create database

       Create several tables in code mode

6
0 653
Question Scott Roth · Nov 13, 2018

We are trying to script a High Availability Shutdown/Start script in case we need to fail over to one of our other servers we can be back up within mins. Is there a way to configure the startup procedure to Automatically Stop/Start the JDBC server when shutting down or starting up cache? is there an auto setting we can change?

Thanks

Scott Roth

The Ohio State University Wexner Medical Center

10
0 827
Article Luis Angel Pérez Ramos · Feb 20, 2023 4m read

Dear community members!

A very common problem of our users is to use an external database as data source in an IRIS production. As many of you already know, we have two ways to connect directly to an external database, the first one is using an ODBC connection, the second is using JDBC.

In our example we are going to create a connection using JDBC, and we are going to build a simple Docker's project, in this way you will be able to modify the example as you wish.

The code is available from this URL: https://github.com/intersystems-ib/workshop-sql-jgw

0
0 470
Article Andreas Schneider · Jan 2, 2022 3m read

The last days I've work with the great new feature: LOAD DATA With this post I would like to share my first experiences with you. The following points do not contain any order or other evaluation. These are only things that I noticed when using the LOAD DATA command. It should also be noted that these points are based on the IRIS Version 2021.2.0.617 which is a preview release. So it may be that my observations do not apply to newer IRIS versions. But maybe they are helpful for others.

1) The file path is on server side

5
2 1141
Article Sergey Mikhailenko · Jan 24, 2023 8m read

Introduction

There are many entities in IRIS which are extremely difficult to transfer to another system.They usually contain important system-stored objects: users, roles, privileges, mappings, and applications. The exception to this list is for resources, which are facilitated by the ability to select and save them from the management portal interface [System > Security Management > Resources]. Yet, things are not as good with other system objects. I even got an idea for this topic

2
0 635
Question Scott Roth · Oct 13, 2022

I am trying to troubleshoot an issue I am having with the JDBC Gateway Server crashing at the %SYS level. I have numerous Linked Tables that are using JDBC to connect to a MS SQL database/tables to query values. I have written queries in other class files and within the class definition of the linked table to do the queries.

1. Should I be running the query in the class definition of the linked table as a class method? or is it best practice to run the query as a class method outside of the class definition of the linked table?

3
0 242
Article Timothy Leavitt · Oct 12, 2022 1m read

I just wrote up a quick sample to help a colleague load data into IRIS from R using RJDBC, and figured it's worth sharing here for future reference.

Ultimately it was pretty simple, aside from IRIS not liking "." in column names; the workaround is to just rename the columns. Someone better at R than me could probably provide some generic approach. smiley

2
1 305
Question Scott Roth · Oct 3, 2022

I was attempting to test a Linked JDBC View to MS SQL database and noticed I could not connect. When I look at the JDBC Gateway I noticed that at the Server Level it was down. However the page keeps timing out when ever I attempt to make any changes or start it, it will not respond.

I thought I had found the Cache command to start it but it will not start. Is the following steps correct?

1
0 279
Article Vicky Li · Nov 14, 2016 14m read

As we all know, Caché is a great database that accomplishes lots of tasks within itself. However, what do you do when you need to access an external database? One way is to use the Caché SQL Gateway via JDBC. In this article, my goal is to answer the following questions to help you familiarize yourself with the technology and debug some common problems.

Outline

2
8 4663
Question Arthur K · Jun 5, 2022

Hi ,

     When I use jdbc driver to query the column info ,the "REMARKS" field always show the same as the "COLUMN_NAME" field.

When I use the sql "select * from INFORMATION_SCHEMA.columns a where a.table_name='some table name ' " to query columns info,there has a "DESCRIPTION" field ,the value is some comment for the current field.

So is there anyway to return the description to the jdbc  remarks field? And is there anyway to update the desciption or remarks field? Or is there some other way that I don't know to manage column comment info?

1
0 430
Question Oliver Wilms · Jul 12, 2022

Hello,

I work on deploying IRIS using Kubernetes operator and Red Hat OpenShift. I encouraged another team working on Java application to consider using IRIS as database. My team deployed IRIS cluster using two mirrored data pods for the other team. The other team asked me for the connection information.

To learn how to use Java with IRIS, I attempted to deploy two apps from Open Exchange:

https://openexchange.intersystems.com/package/CRUD-GLOBALS-IRISNATIVEAP…

Here I got errors like this:

package com.intersystems.jdbc does not  exist

1
0 307
Question Renato Araujo · Mar 8, 2022

Hello everyone!

I am writing a SQL CALL (using JDBC) to a stored procedure that outputs a structured object (Oracle Object).

However, the adapter method is not accepting the corresponding JDBC Data Type STRUCT for the output parameter, returning the following error:

ERRO #5023: Erro no Gateway Remoto: JDBC Gateway SP execute(0) error 0: Remote JDBC error: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'AGUARDAR_EVENTO'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

Declaration of Output parameter:

0
0 501
Question Higor Granzoto · Apr 14, 2021

We are planning to build a REST API with the Java Quarkus Framework.

  • There'll be a connection pool;
  • The DataSource instance will be automatically injected from the connection pool;
  • We will use JDBI to do SQL instructions and this will give us automatic Connection and Statement management;

This Caché instance already have COS applications running and consuming connections and licenses.

After doing this, we will migrate to IRIS.

Is there any pitfalls that we must be aware before taking this approach?

If you want to see some code the PoC can be found here.

Thanks.

1
0 365
Question Jairton Junior · Feb 11, 2021

Consider a Natural Key with an Identity (Serial) field.

I cannot seem to acquire the generated value after persisting my entity. That is, the returned entity by Spring Data's "save" does not have the generated value.

The value is generated by the database, and I can query it after repository.save(entity).

I have done some testing and created a Github repo with it...

https://github.com/jesjobom/iris-hibernate-key-test
Am I missing something?

1
0 241
Question Gabriel Vellasques Tureck · Feb 1, 2022

I am using a Gradle Project for testing APIs, but I need to connect to the database.

I already put this on the dependencies:

And I'm trying to use this way:

But I'm keep getting this error: java.lang.ClassNotFoundException: com.intersys.jdbc.CacheDriver  

Is there any place that I can put a JAR file? Because the project has no lib folder (I already tried to add it, but it doesn't work).

6
0 683
Article Andrey Shcheglov · Dec 13, 2018 6m read

Astronomers’ tools

5 years ago, on December 19, 2013, the ESA launched an orbital telescope called Gaia. Learn more about the Gaia mission on the official website of the European Space Agency or in the article by Vitaly Egorov (Billion pixels for a billion stars).

However, few people know what technology the agency chose for storing and processing the data collected by Gaia. Two years before the launch, in 2011, the developers were considering a number of candidates (see “Astrostatistics and Data Mining” by Luis Manuel Sarro, Laurent Eyer, William O’Mullane, Joris De Ridder, pp. 111-112):

9
1 1112
Article Jean Millette · Nov 5, 2021 2m read

One of our apps uses a class query to support a ZEN Report and works just fine in that report, producing the expected results every time. We’ve since migrated to InterSystems Reports and noticed that, for a report using the same class query, 100s of extra rows with the same column values appear at its bottom.

We eliminated InterSystems Reports as the source of the problem by recreating the same “extra rows” issue with an Excel spreadsheet calling the same class query as a stored procedure.

0
0 346
Question Nicola Sartore · Nov 4, 2021

I want to INSERT a record in a database using JDBC in  OBJECTSCRIPT. At the same time, I want to obtain the insert ID. Is there a way to achieve this using the SQL Outbound adapter?

My code is something like this now:


Property Adapter As EnsLib.SQL.OutboundAdapter;

set sql = " INSERT INTO Prenotazioni_CUP "_
                  " (ID, cf
                  " VALUES (SEQTAB.NextVal, ?) "
set status = ..Adapter.ExecuteUpdate(.rs, sql, pRequest.cfAssistito)

5
0 493
Question David.Satorres6134 · Aug 11, 2020

Hello all,

I'm trying to setup the JDBC Gateway Server so customers can connect to IRIS remotely using JDBC and not ODBC. But I'm facing a problem connecting, as our system department tells me IRIS is using the loopback address (127.0.0.1) and that makes remote systems cannot connect to port 53773 (the default port for that).

So, I would like to change this 127.0.0.1 host for the hostname but I cannot see where to do it:

Anyone with experience here to help me? :-)

Thanks a lot

15
0 1953
Question Scott Roth · Oct 21, 2021

Once a week we are attempting to load an XML file from Workday into a MS SQL table using JDBC and Store Procedures. There is approx 102999 records in this XML file. We are struggling with processing the entire file within a reason amount of time. We feed the XML through a BPL to then populate values in a stored procedure then call the stored procedure through a Business Operation. I have tried splitting out the Business Operations to make two calls, but we still continue to see an issue loading the XML into MS SQL. I have also gone through the JDBC driver properties to see if that would help

4
0 400
Question Preston Exley · May 27, 2021

I'm using a JDBC driver to connect PGSQL -> Cache.  I'm noticing when I run SELECT queries and COUNT(*) command against the same table, I get different result sets.  I'm pretty new to Cache in general - so I'm trying to understand why these would be different. 

Examples (TransID and InvNum should occur in every "row"):

SELECT COUNT(*) FROM ACCT.Services = 1,090,324 WHERE ACCT.Dept = 483

SELECT TransID FROM ACCT.Services = 1,085,776 WHERE ACCT.Dept = 483

SELECT InvNum FROM ACCT.Services = 586,023 WHERE ACCT.Dept = 483

8
0 278
Article Zhong Li · Jul 18, 2020 7m read

Keyword: Pandas DataFrame, IRIS, Python, JDBC

Purpose

Pandas DataFrame is popular tool for EDA (Exploratory Data Analysis). In ML tasks, the first thing we usually perform is to understand the data a bit more. Last week I was trying this Covid19 dataset in Kaggle. Basically the data is a spreadsheet of 1925 encounter rows with 231 columns, and the task is simply to predict whether a patient (linked to  1 or more encounter records) would be admitted to ICU. So it's a normal classification task, and we would as usual use padas.DataFrame to take a quick look first.  

3
1 1094