Problem with multiple datasources

Hello

We have a problem with a query that use more than one datasource

db1: internal datasource
db2: internal datasource
db3: external datasource (by ip address)

single select and insert queries are working with all three databases

this query works:

INSERT INTO db2.table1 (field1, field2)
SELECT field1, field2
FROM db1.table1

but this throws the error Unknown database ‘db3’

INSERT INTO db2.table1 (field1, field2)
SELECT field1, field2
FROM db1.table1

any help would be appreciated

regards rene

Don’t forget to tell us about your stack!

OS: Windows Server 2019
Java Version: 11.07
Tomcat Version: 9.0.35
Lucee Version: 5.4.4.38

You are trying to select from one jdbc datasource into a different jdbc datasource?

jdbc doesn’t work like that

Depending on which database you are using, you can map remote databases into another and address them that way

Hi Zackster

Thank you for your reply. It’s mysql 8.1.
I thought that if the first query is working, the second should be working too.
obviously this is not the case

best regards
rene