Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-6650

Failed to auto-create database at MS SQL Server

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 5.14.4
    • None
    • JDBC
    • None

    Description

      ActiveMQ generates invalid DDL for MS SQL Server - ALTER TABLE ACTIVEMQ_ACKS DROP PRIMARY KEY

      Tested on MS SQL Server 2016

      2017-04-10 15:16:03.418 INFO 8544 — [Starting Thread] o.a.a.store.jdbc.JDBCPersistenceAdapter : Database adapter driver override recognized for : [microsoft_jdbc_driver_6_1_for_sql_server] - adapter: class org.apache.activemq.store.jdbc.adapter.TransactJDBCAdapter
      2017-04-10 15:16:03.520 WARN 8544 — [Starting Thread] o.a.a.s.jdbc.adapter.DefaultJDBCAdapter : Could not create JDBC tables; they could already exist. Failure was: ALTER TABLE ACTIVEMQ_ACKS DROP PRIMARY KEY Message: Incorrect syntax near the keyword 'PRIMARY'. SQLState: S0001 Vendor code: 156
      2017-04-10 15:16:03.522 WARN 8544 — [Starting Thread] o.a.a.store.jdbc.JDBCPersistenceAdapter : Failure details: Incorrect syntax near the keyword 'PRIMARY'.

      com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'PRIMARY'.
      at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:232)
      at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1672)
      at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:903)
      at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:796)
      at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7535)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2438)
      at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:208)
      at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:183)
      at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(SQLServerStatement.java:769)
      at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:291)
      at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:291)
      at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:291)
      at org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doCreateTables(DefaultJDBCAdapter.java:111)
      at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.init(JDBCPersistenceAdapter.java:303)
      at org.apache.activemq.broker.LockableServiceSupport.preStart(LockableServiceSupport.java:89)
      at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:54)
      at org.apache.activemq.broker.BrokerService.doStartPersistenceAdapter(BrokerService.java:672)
      at org.apache.activemq.broker.BrokerService.access$000(BrokerService.java:139)
      at org.apache.activemq.broker.BrokerService$2.run(BrokerService.java:644)

      Attachments

        Activity

          People

            Unassigned Unassigned
            josef.broz Josef Brož
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: