...
About Microsoft SQL Server
...
Overview
Microsoft SQL Server (MSSQL) is a commercial database product available from Microsoft at http://www.microsoft.com/sql/default.mspx
Further technical information on this product may be found here
Warning | ||
---|---|---|
| ||
Adopters running uPortal 3 on MS SQL Server should enable the ALLOW_SNAPSHOT_ISOLATION and READ_COMMITTED_SNAPSHOT options in the portal database. Perform the following commands to enable these settings:
Without these options, MS SQL Server will encounter deadlocks in the portlet preferences subsystem under load. You can read more about these settings here. |
Obtaining a Driver
Since the jTDS JDBC driver for MSSQL is not available in the central Maven repository, it must be placed into the local repository of each machine on which you wish to build uPortal.
...
The first step is to download the JDBC driver for your database. The preferred driver is the JTDS jTDS driver from sourceforge. It can be obtained here.
...
JAR Configuration
Opening /uPortal/pom.xml (in the properties section) , there is a section about 92 lines down that reads:
Code Block | ||||
---|---|---|---|---|
| ||||
<!-- The JDBC Driver used by uPortal --> <jdbc.groupId>hsqldb</jdbc.groupId> <jdbc.artifactId>hsqldb</jdbc.artifactId> <jdbc.version>${hsqldb.version}</jdbc.version> |
We will modify Modify this to use the MSSQL driver, using the group, artifact and version information from the mvn install:install-file command above.
...
Edit /uPortal/uportal-impl/src/main/resources/properties/rdbm.properties and uncomment the lines by adding the following information for MSSQL. Modify , modifying the url, username and password as appropriate:
Code Block |
---|
##### Microsoft SQL Server 2005 - example hibernate.connection.driver_class=net.sourceforge.jtds.jdbc.Driver hibernate.connection.url=jdbc:jtds:sqlserver://my.school.edu:1433/uPortal3db hibernate.connection.username=test hibernate.connection.password=mypass hibernate.dialect=org.hibernate.dialect.SQLServerDialect |
...
You will have to change the db-version entry to match your version of MS SQL Server.
Testing
...
the Configuration
Running the dbtest
ant target will tell you if you have configured the database connection properly.
Code Block |
---|
ant dbtest |
Execute "ant initportal" Then, following a successful test, you can execute
Code Block |
---|
ant initportal
|
to build the database tables and copy files to your servlet container.
Start your servlet container.
Loading the Database
Loading the database requires a couple of steps:
- Create the database: the database name, port number, and driver information must reflect what was defined in the rdbm.properties file
- Create the tables and populate the database: from the uPortal build directory, run "ant db" to execute the ant target which loads the database. The ant target uses the Dbloader tool.
Issues and Known Bugs
Additional Notes
An alternative JDBC driver is available directly from Microsoft at: http://wwwmsdn.microsoft.com/sqlen-us/downloadsdata/defaultaa937724.mspx
...
Credits
Much of the information on this page was provided by Bikrant Neupane on the uportal-user list. Thanks.