Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 88ED31025B for ; Wed, 30 Oct 2013 14:45:06 +0000 (UTC) Received: (qmail 50397 invoked by uid 500); 30 Oct 2013 14:36:42 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 50033 invoked by uid 500); 30 Oct 2013 14:35:55 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 49997 invoked by uid 99); 30 Oct 2013 14:35:47 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Oct 2013 14:35:47 +0000 Date: Wed, 30 Oct 2013 14:35:47 +0000 (UTC) From: "Claus Ibsen (JIRA)" To: dev@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AMQ-4120) SqlServer - SQL Syntax error in initial table creation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMQ-4120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Claus Ibsen updated AMQ-4120: ----------------------------- Fix Version/s: NEEDS_REVIEWED Issue Type: Improvement (was: Bug) > SqlServer - SQL Syntax error in initial table creation > ------------------------------------------------------ > > Key: AMQ-4120 > URL: https://issues.apache.org/jira/browse/AMQ-4120 > Project: ActiveMQ > Issue Type: Improvement > Affects Versions: 5.7.0 > Environment: Windows Server 2008 R2, 64bit, MS SQL Server 2008 persistence adapter. > Reporter: Rasitha Wijesinghe > Priority: Minor > Fix For: NEEDS_REVIEWED > > > When using SQL Server as the backing data store and creating the AMQ tables for the very first time, the following error is logged: > INFO | jvm 1 | 2012/10/19 11:12:03 | WARN | 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: S1000 Vendor code: 156 > INFO | jvm 1 | 2012/10/19 11:12:03 | WARN | Failure details: Incorrect syntax near the keyword 'PRIMARY'. > INFO | jvm 1 | 2012/10/19 11:12:03 | java.sql.SQLException: Incorrect syntax near the keyword 'PRIMARY'. > Since there is no specific adapter for SQL Server it uses the DefaultJDBCAdapter which has getDropAckPKAlterStatementEnd() returning "DROP PRIMARY KEY". > Not sure if this is an issue with other databases as well. > (Note: If you already have the tables, this error is still present but only logs a DEBUG entry). > Does it make sense to add a MSSqlJDBCAdapter that overrides getDropAckPKAlterStatementEnd? -- This message was sent by Atlassian JIRA (v6.1#6144)