You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Mikhail Melamud (JIRA)" <ji...@apache.org> on 2012/07/11 00:57:34 UTC

[jira] [Commented] (AMQ-1191) JDBC based Master/Slave not supported for TransactSQL based databases (SQL Server and Sybase)

    [ 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