You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "james strachan (JIRA)" <ji...@apache.org> on 2007/03/07 16:29:21 UTC

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

JDBC based Master/Slave not supported for TransactSQL based databases (SQL Server and Sybase)
---------------------------------------------------------------------------------------------

                 Key: AMQ-1191
                 URL: https://issues.apache.org/activemq/browse/AMQ-1191
             Project: ActiveMQ
          Issue Type: Improvement
          Components: Broker
            Reporter: james strachan
         Assigned To: james strachan
             Fix For: 4.2.0


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.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Tully resolved AMQ-1191.
-----------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 5.2.0)
                   5.3.0

modified the database locker code to iterate on a result set if one is present, committed in r787990
The logic is conditional on getMetaData returning null if the lock statement will not result in a ResultSet, some don't.
Can you verify that this works with your driver?

> JDBC based Master/Slave not supported for TransactSQL based databases (SQL Server and Sybase)
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1191
>                 URL: https://issues.apache.org/activemq/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.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "Andreas Guther (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-1191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40269 ] 

Andreas Guther commented on AMQ-1191:
-------------------------------------

What is the current status of this issue?  

I would like to use Master/Slave failover together with a MS SQL 2005 installation.  From reading different issues linking to this problem I am not getting a clear picture if this is or will be resolved.


> JDBC based Master/Slave not supported for TransactSQL based databases (SQL Server and Sybase)
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1191
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1191
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Broker
>            Reporter: James Strachan
>            Assignee: James Strachan
>             Fix For: 5.1.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.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "james strachan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

james strachan resolved AMQ-1191.
---------------------------------

    Resolution: Fixed

fixed in rev 515606

> JDBC based Master/Slave not supported for TransactSQL based databases (SQL Server and Sybase)
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1191
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1191
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Broker
>            Reporter: james strachan
>         Assigned To: james strachan
>             Fix For: 4.2.0
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "Dan Marks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-1191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52441#action_52441 ] 

Dan Marks commented on AMQ-1191:
--------------------------------

I will be out of the office until Wednesday (June 24th).

This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom

they are addressed. If you have received this e-mail in error please notify the originator of the message. This footer also

confirms that this e-mail message has been scanned for the presence of computer viruses. Any views expressed in this message are

those of the individual sender, except where the sender specifies and with authority, states them to be the views of Iowa Student

Loan.


> JDBC based Master/Slave not supported for TransactSQL based databases (SQL Server and Sybase)
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1191
>                 URL: https://issues.apache.org/activemq/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.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Tully reassigned AMQ-1191:
-------------------------------

    Assignee: Gary Tully  (was: James Strachan)

> JDBC based Master/Slave not supported for TransactSQL based databases (SQL Server and Sybase)
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1191
>                 URL: https://issues.apache.org/activemq/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.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "James Strachan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Strachan updated AMQ-1191:
--------------------------------

    Patch Info: [Patch Available]

> JDBC based Master/Slave not supported for TransactSQL based databases (SQL Server and Sybase)
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1191
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1191
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Broker
>            Reporter: James Strachan
>            Assignee: James Strachan
>             Fix For: 5.0.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.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "Sharath Komarla (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-1191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46869#action_46869 ] 

Sharath Komarla commented on AMQ-1191:
--------------------------------------

Hello,

I've been waiting for this fix.  I have ended up grabbing the patch, and building the src locally and deploying that instead of the standard distro.  The patch attached to this issue works well with SQLServer 2005 without issues.

If this issue is up for voting, I would gladly put in my vote.  I was hoping this would get fixed in 5.2.0, but it looks like the resolution to this has been pushed to 5.3.0.

Thanks for all the hard work put into the releases.

> JDBC based Master/Slave not supported for TransactSQL based databases (SQL Server and Sybase)
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1191
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1191
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Broker
>            Reporter: James Strachan
>            Assignee: James Strachan
>             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.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "Andreas Guther (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-1191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40321 ] 

Andreas Guther commented on AMQ-1191:
-------------------------------------

>From our database admin I got the following suggestion to fix the problem which I would like to share here.  I hope that helps in some way.

Here is his comment:

Hmm, I suspect this is just a poor locking protocol. It looks like they are doing a read, will examine the results and then write something. We could probably create a nice database invariant solution that doesn't require complex locking. Otherwise what you want to do is fix the problem where the transaction is started. You need a serializable transaction from the start. All DB's will support that and you should be able to set it as a JDBC option.  

            (from transact-SQL: SET TRANSACTION ISOLATION LEVEL SERIALIZABLE)

 

 

Assuming I'm correct about the way they are attempting to acquire the lock, a better way would be to construct an UPDATE instead of a SELECT. So, if the underlying code does this select and then does an update what really should happen is:

 

Begin tran

UPDATE

SET      

            Time = 

            ,broker_name =

From

            Dbo.activemq_lock

Where

            Id=1

And      broker_name is null                                --- Or whatever additional criteria there update uses.

Commit

            

 

With this approach you don't need to change the isolation level and you are still guaranteed only one writer can perform the update.  You can check for success in one of two ways. Get the number of rows affected by the update or do a SELECT to see if the broker_name in the table is yours.





> JDBC based Master/Slave not supported for TransactSQL based databases (SQL Server and Sybase)
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1191
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1191
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Broker
>            Reporter: James Strachan
>            Assignee: James Strachan
>             Fix For: 5.1.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.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Tully reopened AMQ-1191:
-----------------------------


looks like this breaks Oracle - http://www.nabble.com/AMQ-1191-for-5.3-broke-master-slave-locking-for-Oracle-tp24648059p24648059.html

> JDBC based Master/Slave not supported for TransactSQL based databases (SQL Server and Sybase)
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1191
>                 URL: https://issues.apache.org/activemq/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.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "Greg Taylor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Greg Taylor reopened AMQ-1191:
------------------------------


It looks like the original problem (SQL Exception due to FOR UPDATE) has been fixed, however, there is another problem here.  The new statement (SELECT * FROM ACTIVEMQ_LOCK WITH (UPDLOCK, ROWLOCK)) does correctly lock the rows, however, when a potential slave fires the query, it does NOT throw an exception, which is what DefaultDatabaseLocker uses to decide if the lock failed.  Because the exception is not thrown, the method exits and the broker is told to become the master, which leaves you with > 1 master.  Not good.

This may be a driver issue, but it appears that the behaviour in SQL Server is to block to wait for the lock when executing this statement, and it only blocks when you attempt to iterate over the ResultSet.  So, even if code was added to iterate over the ResultSet, you likely still wouldn't get the desired effect.  I am using the Microsoft driver.

Here's a code snippet that should show the behaviour:
Connection conn = ...
PreparedStatement stmt = conn.prepareStatement("SELECT * FROM ACTIVEMQ_LOCK WITH (UPDLOCK, ROWLOCK)");
// statement below does not throw or block
ResultSet rs = stmt.executeQuery();
// statement below blocks until lock acquired
rs.next();

I hope this helps.

Regards,
Greg.


> JDBC based Master/Slave not supported for TransactSQL based databases (SQL Server and Sybase)
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1191
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1191
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Broker
>            Reporter: James Strachan
>            Assignee: Gary Tully
>             Fix For: 5.2.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.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "Rob Davies (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rob Davies updated AMQ-1191:
----------------------------

    Fix Version/s: 5.2.0
                       (was: 5.1.0)

> JDBC based Master/Slave not supported for TransactSQL based databases (SQL Server and Sybase)
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1191
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1191
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Broker
>            Reporter: James Strachan
>            Assignee: James Strachan
>             Fix For: 5.2.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.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Tully updated AMQ-1191:
----------------------------

    Fix Version/s: 5.3.0
                       (was: 5.2.0)

> JDBC based Master/Slave not supported for TransactSQL based databases (SQL Server and Sybase)
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1191
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1191
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Broker
>            Reporter: James Strachan
>            Assignee: James Strachan
>             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.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "daniel mueller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

daniel mueller reopened AMQ-1191:
---------------------------------


This issue is not resolved yet, the statement still fails with
  java.sql.SQLException: Line 1: Incorrect syntax near 'XLOCK'.
in MS SQLServer.

> JDBC based Master/Slave not supported for TransactSQL based databases (SQL Server and Sybase)
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1191
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1191
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Broker
>            Reporter: james strachan
>         Assigned To: james strachan
>             Fix For: 4.2.0
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Tully resolved AMQ-1191.
-----------------------------

    Resolution: Fixed

resolved by adding patch to sqlserver specific database locker implementation. DefaultLocker remains unchanged. A locker implementation is now resolved using the same adapter loader mechanism and currently only sqlserver uses an override. Overrides are provided using driver specific property files in "META-INF/services/org/apache/activemq/store/jdbc/lock/"
rev #798602

> JDBC based Master/Slave not supported for TransactSQL based databases (SQL Server and Sybase)
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1191
>                 URL: https://issues.apache.org/activemq/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.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "daniel mueller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

daniel mueller updated AMQ-1191:
--------------------------------

    Attachment: patchfile

This is a patch which should resolve the XLOCK problem in SQLServer.
the correct syntax seems to be 
  WITH (UPDLOCK, ROWLOCK)
(at least according to hibernate http://anonhibernate.labs.jboss.com/trunk/Hibernate3/src/org/hibernate/dialect/SQLServerDialect.java see #appendLockHint(..))

On a side note: I dont think that the the current way of handling driver specific syntax will work out in this case because it seems that sybase does use a different syntax and jtds supports both. see http://anonhibernate.labs.jboss.com/trunk/Hibernate3/src/org/hibernate/dialect/SybaseDialect.java

It might well be that the patch breaks currently working installations because of this..

> JDBC based Master/Slave not supported for TransactSQL based databases (SQL Server and Sybase)
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1191
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1191
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Broker
>            Reporter: james strachan
>         Assigned To: james strachan
>             Fix For: 4.2.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.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "Andreas Guther (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-1191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40271 ] 

aguther edited comment on AMQ-1191 at 10/4/07 11:42 AM:
---------------------------------------------------------------

it looks like the correct syntax is as follows:

select * from dbo.ACTIVEMQ_LOCK WITH (XLOCK)

This statement works fine on our SQL 2005 server.  I don't know if this will cause problems with other vendors.

      was (Author: aguther):
    it looks like the correct syntax is as follows:

select * from dbo.ACTIVEMQ_LOCK WITH (XLOCK)

This statement works find on our SQL 2005 server.  I don't know if this will cause problems with other vendors.
  
> JDBC based Master/Slave not supported for TransactSQL based databases (SQL Server and Sybase)
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1191
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1191
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Broker
>            Reporter: James Strachan
>            Assignee: James Strachan
>             Fix For: 5.1.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.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Tully resolved AMQ-1191.
-----------------------------

    Resolution: Fixed

patch applied in  r710048

lock is now:
{code}
 " WITH (UPDLOCK, ROWLOCK)";
{code}
as validated in comments to work with SQLServer 2005. thanks.

> JDBC based Master/Slave not supported for TransactSQL based databases (SQL Server and Sybase)
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1191
>                 URL: https://issues.apache.org/activemq/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.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "Demis Bellot (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-1191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39375 ] 

Demis Bellot commented on AMQ-1191:
-----------------------------------

This issue is stil not resolved in the latest SNAPSHOT release taken at 07 June 2007.

> JDBC based Master/Slave not supported for TransactSQL based databases (SQL Server and Sybase)
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1191
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1191
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Broker
>            Reporter: James Strachan
>            Assignee: James Strachan
>             Fix For: 5.1.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.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "Andreas Guther (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-1191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40271 ] 

Andreas Guther commented on AMQ-1191:
-------------------------------------

it looks like the correct syntax is as follows:

select * from dbo.ACTIVEMQ_LOCK WITH (XLOCK)

This statement works find on our SQL 2005 server.  I don't know if this will cause problems with other vendors.

> JDBC based Master/Slave not supported for TransactSQL based databases (SQL Server and Sybase)
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1191
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1191
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Broker
>            Reporter: James Strachan
>            Assignee: James Strachan
>             Fix For: 5.1.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.
-
You can reply to this email to add a comment to the issue online.