Rechercher

質問
· 2025年1月8日

MySQL JDBC connection, Linked Table issue

Hello, community.

I have a problem with running a SQL query on a linked MySQL table.

The connection works fine, but the following query throws an error:

SELECT   TOP 10 * FROM   linkedinternal_test.persons

 [SQLCODE: <-400>:<Fatal error occurred>]

  [%msg: <Remote JDBC error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '10 T1.PersonID AS C1,T1.LastName AS C2,T1.FirstName AS C3,T1.Address AS C4,T1.Ci' at line 1. >]

 

Linked table class:

/// Generated by the Link Table wizard on 2025-01-08 16:09:03.  Note that you can access the data in this class only when the external database is accessible.
Class LinkedInternal.test.Persons Extends %Library.Persistent [ Owner = {_SYSTEM}, Not ProcedureBlock, SqlRowIdPrivate, SqlTableName = Persons, StorageStrategy = GSQLStorage ]
{

/// Specifies details for the SQL Gateway Connection that this class uses
Parameter CONNECTION = "test,NOCREATE";

/// Specifies the external database that this class uses
Parameter EXTDBNAME = "MySQL";

/// Determines if INSERT statements for this external table attempt to retrieve auto-generated keys.  Set this to 0 if this external table does not support auto generated keys.
Parameter EXTERNALGENERATEDKEYS = 1;

/// Specifies the external table to which this class refers
Parameter EXTERNALTABLENAME = "Persons";

Property Address As %String(EXTERNALSQLNAME = "Address", EXTERNALSQLTYPE = 12, MAXLEN = 255) [ ReadOnly, SqlColumnNumber = 5, SqlFieldName = Address ];

Property City As %String(EXTERNALSQLNAME = "City", EXTERNALSQLTYPE = 12, MAXLEN = 255) [ ReadOnly, SqlColumnNumber = 6, SqlFieldName = City ];

Property FirstName As %String(EXTERNALSQLNAME = "FirstName", EXTERNALSQLTYPE = 12, MAXLEN = 255) [ ReadOnly, SqlColumnNumber = 4, SqlFieldName = FirstName ];

Property LastName As %String(EXTERNALSQLNAME = "LastName", EXTERNALSQLTYPE = 12, MAXLEN = 255) [ ReadOnly, SqlColumnNumber = 3, SqlFieldName = LastName ];

Property PersonID As %Integer(EXTERNALSQLNAME = "PersonID", EXTERNALSQLTYPE = 4) [ ReadOnly, Required, SqlColumnNumber = 2, SqlFieldName = PersonID ];

Index MainIndex On PersonID [ IdKey, PrimaryKey ];

Storage GSQLStorage
{
<StreamLocation>^LinkedInternal.test.PersonsS</StreamLocation>
<Type>%Storage.SQL</Type>
}

}


Is there work around this issue?

6 Comments
ディスカッション (6)4
続けるにはログインするか新規登録を行ってください
質問
· 2025年1月8日

JDBC - Microsoft Entra Authentication

We connect to MS SQL Databases using the Microsoft JDBC Driver 12.2 using the following URL

jdbc:sqlserver://<server>:<port>;database=<database name>;trustServerCertificate=true;integratedSecurity=true;authenticationScheme=NTLM;domain=osumc;authentication=NotSpecified

They want to migrate the databases to the Azure Cloud and in doing so we need the Authentication to change to go through Microsoft Entra. I was given the following URL

jdbc:sqlserver://<server>:<port>;user=<user>;password=<password>;encrypt=true;trustServerCertificate=true;hostNameInCertificate=<certificate>;loginTimeout=30;Authentication=ActiveDirectoryPassword;

but now I can not connect and get the following errror..

Connection failed.
Remote JDBC error: com.microsoft.sqlserver.jdbc.SQLServerException: Failed to load MSAL4J Java library for performing ActiveDirectoryPassword authentication..

From reading about MSAL4J it is another .jar file that I guess I need to install and include in the class path.

Has anyone else ever ran into this issue?

5 Comments
ディスカッション (5)2
続けるにはログインするか新規登録を行ってください
ダイジェスト
· 2025年1月8日

InterSystems Community Q&A Monthly Newsletter #44

Top new questions
Can you answer these questions?
#InterSystems IRIS
Article "Ansible modules and IRIS demo" qlist bug
By Phillip Wu
How does the Inactivity Limit as defined in the System-Wide Security Parameters work and other questions about the login process
By Theo Stolker
UDP Adapter not working
By Corentin Blondeau
Connecting InterSystems IRIS with Metabase BI
By Alex Bravo
Interface Behavior with invalid TLS Cert for 'Server certificate verification'
By James Hipp
Journal not applied to any directory
By Undefined Undefined
Mirror entered trouble state
By Igor Pak
Can't edit %Net.SMTP despite having %DB_IRISSYS and database mounted as RW?
By David Hockenbroch
Admin Portal forbiden
By Thiago Andrade
Need information
By Djouldé BARRY
SSL Issues on Mac OS 15.2 when IRIS is running within a Docker container
By Alastair Maxwell
xDBC error
By Matjaz Murko
MaxRowsToGet on EnsLib.SQL.InboundAdapter
By Scott Roth
The right side of a logical double AND (&&) riddle
By Anthony Master
Converting iris stream to python bytes is very slow
By Jonathan Perry
#InterSystems IRIS for Health
EnsLib.HL7.Service.* through BPL to EnsLib.HL7.MsgRouter.RoutingEngine
By Anthony Master
how to convert from json into sda container and then to fhir bundle resource
By sandeep bhargava
Does Iris for Health Generate Reset Packets? Under What Circumstances? What Settings Are needed in a BS to Not Send Reset packets?
By Patty Aguirre-Romero
Webterminal pagination from command ^%G does not work
By Enric Moya Sánchez
Issue calling methods in jar
By Shashvati Dash
SDA Implementation FHIR
By sandeep bhargava
ERROR #5821: Cannot instantiate query: 'SQLCODE = -146, %msg = Error: '' is an invalid DISPLAY Date value'
By yelena melamed
Troubleshooting unsuccessful Community Edition installation
By Subtropical.Bob
Production pooled component index
By Dmitrii Baranov
Blank jobs due to missing implementation at time of sending deferred response how to clear
By Mark OReilly
#Caché
#Health Connect
#44Monthly Q&A fromInterSystems Developers
質問
· 2025年1月8日

Can't edit %Net.SMTP despite having %DB_IRISSYS and database mounted as RW?

I need to see the full SMTP trace when a %Net.SMTP attempts to send an email to troubleshoot an issue. As far as I know, the only way to get that is to uncomment line 192 in the %Net.SMTP class.

 //:#define SMTPTRACE

I've done this in the past by giving myself the %DB_IRISSYS role, so I tried that. That database is also not mounted as read-only.

Of course the bigger issue here is that I can't seem to get that trace without having to edit a system class or create my own, but to fix my more immediate issue, what else do I need to check that would be preventing me from editing that class?

7 Comments
ディスカッション (7)5
続けるにはログインするか新規登録を行ってください
記事
· 2025年1月8日 1m read

2024.3 Interoperability Highlight - New Option to Resend Message from within Visual Trace

The ability to resend messages easily has always been a strong feature of our Interoperability capabilities.

With v2024.3 coming out soon (available already now as Developer Preview) out already we've made this even easier!

Now from within the Visual Trace itself you can find next to the Message Header a Resend button and you can click it and arrive at the usual Resend Message Editor (without having to go through the Message Viewer and search for your specific message).

Here's an example of what this looks like:

See also from the related Release Notes.

2 Comments
ディスカッション (2)3
続けるにはログインするか新規登録を行ってください