activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Melamud (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMQ-1191) JDBC based Master/Slave not supported for TransactSQL based databases (SQL Server and Sybase)
Date Tue, 10 Jul 2012 22:57:34 GMT

    [ https://issues.apache.org/jira/browse/AMQ-1191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13411024#comment-13411024
] 

Mikhail Melamud commented on AMQ-1191:
--------------------------------------

If isUseLockCreateWhereClause() is true, the produced statement will be as follow: 

SELECT * FROM ACTIVEMQ_LOCK WHERE ID=1 WITH (UPDLOCK, ROWLOCK) 

which will throw a 
 com.microsoft.sqlserver.jdbc.SQLServerException: A processing error "Incorrect syntax near
'('." has occurred... with MS SQL Server 2008 and up... I guess it was tested with earlier
versions which were more loose in terms syntax... 
The right way is 
SELECT * FROM ACTIVEMQ_LOCK WITH (UPDLOCK, ROWLOCK) WHERE ID=1 

                
> JDBC based Master/Slave not supported for TransactSQL based databases (SQL Server and
Sybase)
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1191
>                 URL: https://issues.apache.org/jira/browse/AMQ-1191
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Broker
>            Reporter: james strachan
>            Assignee: Gary Tully
>             Fix For: 5.3.0
>
>         Attachments: patchfile
>
>
> The main issue is figuring out the exclusive lock SQL syntax. I think the following is
valid...
> SELECT * FROM TABLE WITH XLOCK

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message