You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@roller.apache.org by Shaun Farrugia <fa...@dteenergy.com> on 2005/07/20 22:04:29 UTC

MSSQL Server Install

So!  I installed Roller 1.2 on Tomcat 5.0 and SQL Server 2000 using the
jtds JDBC Driver.  I updated the HSQL database script so that it could run
properly on SQL Server.   But i'm getting a problem with LIMIT in the
queries.  I thought Roller 1.1 updated the jars so that it was compatible
with SQL.  What other steps do I need to take so that I can run this on MS
SQL Server?


Shaun.Farrugia. . .farrugias@dteenergy.com
perm. desk.734.887.2148. . .cell.313.363.5006
aim.dier0b0t           . . .

Re: MSSQL Server Install

Posted by Shaun Farrugia <fa...@dteenergy.com>.
Yes I did that.  There was some talk around the net that I had to add
aliases for the boolean variables but I'm not sure where to edit or add
those in the hibernate.cfg.xml file.

What i'm doing now  is takning  the source code and looking at the
preparedStatements that have the "limit" keyword in there to see if they
are even fixed.



Shaun.Farrugia. . .farrugias@dteenergy.com
perm. desk.734.887.2148. . .cell.313.363.5006
aim.dier0b0t           . . .


                                                                           
             Allen Gilliland                                               
             <Allen.T.Gillilan                                             
             d@Sun.COM>                                                 To 
                                       roller-user@incubator.apache.org    
             07/20/2005 04:12                                           cc 
             PM                                                            
                                                                   Subject 
                                       Re: MSSQL Server Install            
             Please respond to                                             
             roller-user@incub                                             
              ator.apache.org                                              
                                                                           
                                                                           
                                                                           




If you are not using MySQL then you will need to change the hibernate
dialect to whatever sql server you use.

This is found in the file WEB-INF/classes/hibernate.cfg.xml

And you want to change this line ...

<property name="dialect">net.sf.hibernate.dialect.MySQLDialect</property>

to ...

<property
name="dialect">net.sf.hibernate.dialect.SQLServerDialect</property>

try that and see if it works.

-- Allen


On Wed, 2005-07-20 at 13:04, Shaun Farrugia wrote:
> So!  I installed Roller 1.2 on Tomcat 5.0 and SQL Server 2000 using the
> jtds JDBC Driver.  I updated the HSQL database script so that it could
run
> properly on SQL Server.   But i'm getting a problem with LIMIT in the
> queries.  I thought Roller 1.1 updated the jars so that it was compatible
> with SQL.  What other steps do I need to take so that I can run this on
MS
> SQL Server?
>
>
> Shaun.Farrugia. . .farrugias@dteenergy.com
> perm. desk.734.887.2148. . .cell.313.363.5006
> aim.dier0b0t           . . .


Re: MSSQL Server Install

Posted by Shaun Farrugia <fa...@dteenergy.com>.
Hmm so i'm looking at the code and it seems like it uses the TOP ? for
HSQL.  But it checks if it should use the TOP functionality based on the
driver name ("HSQL").     I think I'll add MSSQL just to hack it right now
.  Seems that hibernate isn't being used for this query because it can't
handle sorting by sum.

Uses LIMIT in

   1. org\roller\business\hibernate\HibernateRefererManagerImpl.java
   2. org\roller\business\utils\ConsistencyCheck.java
   -Taken From
      http://jroller.com/page/benchristen/20050107#roller_with_ms_sql_2k1

So I'll just hack it in to use TOP ? for those prepared statements.  Looks
   like you guys are getting ready to port those functions to hibernate.




Shaun.Farrugia. . .farrugias@dteenergy.com
perm. desk.734.887.2148. . .cell.313.363.5006
aim.dier0b0t           . . .


                                                                           
             Allen Gilliland                                               
             <Allen.T.Gillilan                                             
             d@Sun.COM>                                                 To 
                                       roller-user@incubator.apache.org    
             07/20/2005 04:12                                           cc 
             PM                                                            
                                                                   Subject 
                                       Re: MSSQL Server Install            
             Please respond to                                             
             roller-user@incub                                             
              ator.apache.org                                              
                                                                           
                                                                           
                                                                           




If you are not using MySQL then you will need to change the hibernate
dialect to whatever sql server you use.

This is found in the file WEB-INF/classes/hibernate.cfg.xml

And you want to change this line ...

<property name="dialect">net.sf.hibernate.dialect.MySQLDialect</property>

to ...

<property
name="dialect">net.sf.hibernate.dialect.SQLServerDialect</property>

try that and see if it works.

-- Allen


On Wed, 2005-07-20 at 13:04, Shaun Farrugia wrote:
> So!  I installed Roller 1.2 on Tomcat 5.0 and SQL Server 2000 using the
> jtds JDBC Driver.  I updated the HSQL database script so that it could
run
> properly on SQL Server.   But i'm getting a problem with LIMIT in the
> queries.  I thought Roller 1.1 updated the jars so that it was compatible
> with SQL.  What other steps do I need to take so that I can run this on
MS
> SQL Server?
>
>
> Shaun.Farrugia. . .farrugias@dteenergy.com
> perm. desk.734.887.2148. . .cell.313.363.5006
> aim.dier0b0t           . . .


Re: MSSQL Server Install

Posted by Allen Gilliland <Al...@Sun.COM>.
If you are not using MySQL then you will need to change the hibernate dialect to whatever sql server you use.

This is found in the file WEB-INF/classes/hibernate.cfg.xml

And you want to change this line ...

<property name="dialect">net.sf.hibernate.dialect.MySQLDialect</property>

to ...

<property name="dialect">net.sf.hibernate.dialect.SQLServerDialect</property>

try that and see if it works.

-- Allen


On Wed, 2005-07-20 at 13:04, Shaun Farrugia wrote:
> So!  I installed Roller 1.2 on Tomcat 5.0 and SQL Server 2000 using the
> jtds JDBC Driver.  I updated the HSQL database script so that it could run
> properly on SQL Server.   But i'm getting a problem with LIMIT in the
> queries.  I thought Roller 1.1 updated the jars so that it was compatible
> with SQL.  What other steps do I need to take so that I can run this on MS
> SQL Server?
> 
> 
> Shaun.Farrugia. . .farrugias@dteenergy.com
> perm. desk.734.887.2148. . .cell.313.363.5006
> aim.dier0b0t           . . .