We are using ActiveMQ 5.2 with MSSQL 2008 just fine.

we drop sqljdbc.jar in apache-activemq-5.2.0\lib\optional with Date Modified
timestamp of 10/11/2007 11:10AM (and we also use the c3po connection pooler)

add the following config in activemq.xml


    <persistenceAdapter>
      <jdbcPersistenceAdapter dataSource="#mssql-ds"
createTablesOnStartup="false"   />
    </persistenceAdapter>


  <bean id="mssql-ds" class="com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method="close">
    <property name="driverClass"
value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
    <property name="jdbcUrl"
value="jdbc:sqlserver://Server.qg.com:1433;databaseName=DatabaseName"/>
    <property name="user" value="sdfsdf"/>
    <property name="password" value="sdfsdf"/>
    <property name="acquireRetryAttempts" value="100"/>
    <property name="testConnectionOnCheckout" value="true"/>
    <property name="testConnectionOnCheckin" value="true"/>
    <property name="automaticTestTable" value="ACTIVEMQ_CONN_TEST"/>
    <property name="acquireRetryDelay" value="5000"/>
    <property name="preferredTestQuery" value="SELECT 1"/>
  </bean>




yair wrote:
> 
> Hi all
> I'm trying to configure a master/slave conf with JDBC. I can't get the
> JDBC to work with sql server 2008:
> 
> 18:02:45,875 [main] WARN  JDBCPersistenceAdapter - Database driver NOT
> recognized: [microsoft_sql_server_jdbc_driver_2_0].  Will use default JDBC
> implementation.
> 18:02:46,125 [main] WARN  DefaultJDBCAdapter - Could not create JDBC
> tables; they could already exist. Failure was: CREATE TABLE
> ACTIVEMQ_MSGS(ID INTEGER NOT NULL, CONTAINER VARCHAR(250), MSGID_PROD
> VARCHAR(250), MSGID_SEQ INTEGER, EXPIRATION BIGINT, MSG BLOB, PRIMARY KEY
> ( ID ) ) Message: Column, parameter, or variable #6: Cannot find data type
> BLOB. SQLState: S0007 Vendor code: 2715
> 18:02:46,203 [main] WARN  DefaultJDBCAdapter - Could not create JDBC
> tables; they could already exist. Failure was: CREATE INDEX
> ACTIVEMQ_MSGS_MIDX ON ACTIVEMQ_MSGS (MSGID_PROD,MSGID_SEQ) Message: Cannot
> find the object "ACTIVEMQ_MSGS" because it does not exist or you do not
> have permissions. SQLState: S00012 Vendor code: 1088
> 18:02:46,203 [main] WARN  DefaultJDBCAdapter - Could not create JDBC
> tables; they could already exist. Failure was: CREATE INDEX
> ACTIVEMQ_MSGS_CIDX ON ACTIVEMQ_MSGS (CONTAINER) Message: Cannot find the
> object "ACTIVEMQ_MSGS" because it does not exist or you do not have
> permissions. SQLState: S00012 Vendor code: 1088
> 18:02:46,203 [main] WARN  DefaultJDBCAdapter - Could not create JDBC
> tables; they could already exist. Failure was: CREATE INDEX
> ACTIVEMQ_MSGS_EIDX ON ACTIVEMQ_MSGS (EXPIRATION) Message: Cannot find the
> object "ACTIVEMQ_MSGS" because it does not exist or you do not have
> permissions. SQLState: S00012 Vendor code: 1088
> 18:02:46,265 [main] ERROR DefaultDatabaseLocker - Failed to acquire lock:
> com.microsoft.sqlserver.jdbc.SQLServerException: Line 1: FOR UPDATE clause
> allowed only for DECLARE CURSOR.
> 
> I read around that this (the last line at least) is a known issue with sql
> server 2005. Is there a fix for sql server 2008?
> 
> Thanks,
> Yair
> 

-- 
View this message in context: 
http://old.nabble.com/activemq-and-sql-server-2008-tp27237830p27248127.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to