Roller with MS SQL 2k (Microsoft SQL Database)
January 7th, 2005At work we are using Roller
for our internal blogging server. When doing the install, I opted to
use MS SQL 2k as the database instead of HSQLDB or MySQL because that's
what we use here. In order to get Roller up and running, I had to make
some changes.
Here are the changes required to run Roller with MS SQL 2k:
- edit the hibernate.properties
- hibernate.dialect = net.sf.hibernate.dialect.SQLServerDialect
- hibernate.query.substitutions TRUE=1 # use int values for boolean
- hibernate.query.substitutions FALSE=0 # use int values for boolean
- edit any prepared statements that use “limit” and change prepared statements to use 1/0 for true/false
- this occurs in these files
- org\roller\business\hibernate\HibernateRefererManagerImpl.java
- org\roller\business\utils\ConsistencyCheck.java
- this occurs in these files
- edit the createdb.sql script
- use datetime instead of timestamp
- in the webpage table, set websiteid as a varchar(48) instead of varchar(255)
- remove the size values in the alter and create index statements
- e.g. “create index usercookie_username_index on usercookie( username );”
instead of “create index usercookie_username_index on usercookie(
username(40) );”
- e.g. “create index usercookie_username_index on usercookie( username );”
That's it (unless I forgot something, it was a while ago that I did
this), hope that it helps. I'll be posting more on Roller, blogging at
work, and reasons why Roller is cool (it rocks!) later.
update: also see http://opensource.atlassian.com/projects/roller/browse/ROL-460