[ 
https://issues.apache.org/jira/browse/ARTEMIS-5789?focusedWorklogId=994664&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-994664
 ]

ASF GitHub Bot logged work on ARTEMIS-5789:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 03/Dec/25 21:07
            Start Date: 03/Dec/25 21:07
    Worklog Time Spent: 10m 
      Work Description: jbertram merged PR #6098:
URL: https://github.com/apache/activemq-artemis/pull/6098




Issue Time Tracking
-------------------

    Worklog Id:     (was: 994664)
    Time Spent: 20m  (was: 10m)

> Artemis SQL SERVER Database Persistence bug 
> --------------------------------------------
>
>                 Key: ARTEMIS-5789
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-5789
>             Project: Artemis
>          Issue Type: Bug
>    Affects Versions: 2.44.0
>         Environment: Red Hat Enterprise Linux 8.10
> openjdk version "17.0.17"
> Artemis 2.44.0
> Microsoft SQL Server 2019 (RTM-CU32-GDR) (KB5068404) - 15.0.4455.2 (X64) 
>  
>            Reporter: Ning Kang
>            Assignee: Justin Bertram
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: image-2025-12-03-14-53-40-000.png
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Hi, 
> We are trying to use SQL Server as the Persistence for HA Shared Storage, and 
> got the following issues:
> When connecting to the database for the first time, Artemis is trying to 
> create tables automatically, and shows the following errors
> {code:java}
> 2025-12-03 12:31:33,847 ERROR 
> [org.apache.activemq.artemis.jdbc.store.drivers.AbstractJDBCDriver]
> SQL STATEMENTS:
> CREATE TABLE MQ_MESS (ID BIGINT NOT NULL IDENTITY, FILENAME VARCHAR(255), 
> EXTENSION VARCHAR(10), DATA VARBINARY(max), PRIMARY KEY(ID))
> CREATE INDEX MQ_MESS_IDX ON MQ_MESS (fileName)
> SQL EXCEPTIONS:
> SQLState: S0001 ErrorCode: 1911 Message: Column name 'fileName' does not 
> exist in the target table or view.{code}
> When checking the Artemis code 
> /activemq-artemis/artemis-jdbc-store/src/main/resources/journal-sql.properties,
>  we noticed 2 lines are using lowercase fileName, and all the other lines are 
> using uppercase FILENMAE
> {code:java}
> create-file-index=CREATE INDEX %1$s_IDX ON %1$s (fileName)
> select-file-by-filename=SELECT ID, FILENAME, EXTENSION FROM %s WHERE 
> fileName=?{code}
> So we changed this file (journal-sql.properties) inside 
> artemis-jdbc-store-2.44.0.jar, replaced the 2 "filename" with "FILENMAE", and 
> we can see all tables have been created in SQL Server now.
> We think the file journal-sql.properties needs to be updated.
>  
> *Another minor issue is:*
> When we followed this page to setup the Database connection and table names. 
> We used the same table name for message-table-name and page-store-table-name, 
> because in the example they are also use the same names. This needs to be 
> corrected, otherwise some other errors will occur. 
> [https://activemq.apache.org/components/artemis/documentation/latest/persistence.html#persistence]
> !image-2025-12-03-14-53-40-000.png!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to