You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Gary Tully <ga...@gmail.com> on 2018/03/02 14:00:07 UTC

Re: weird sql jdbc statements

that 'sequence' is for migration, when the PK exists and needs to be
modified.

you should simplify if you are going to specify statements via
configuration.

On Sun, 25 Feb 2018 at 17:09 Илья Шипицин <ch...@gmail.com> wrote:

> hello,
>
> I'm struggling with mssql, the following lines are strange
>
>
> https://github.com/apache/activemq/blob/master/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/Statements.java#L115-L116
>
>
> i.e. primary key is created
>
> https://github.com/apache/activemq/blob/master/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/Statements.java#L109
> and dropped and recreated from scratch.
>
> within single statement. any particular reason for that ?
>
> ms sql is not happy with "DROP PRIMARY KEY"
> proper statement is
>
> ALTER TABLE Table
> DROP CONSTRAINT PK_Name
>
> i.e. name of primary key is needed.
>
> should we just simplify statements ?
>
> to single create (without drop/recreate)
>
> Cheers,
>
> Ilya Shipitsin
>