I have sucessfully changed the portal database to MS sql server. The user guide is OK.
So did what did you call the file? Bruce is asking what the file name should be. Could you take a peek at your server/default/deploy dir and simply type in the file name for him, and us.
Can that * be just any string?
Were there any other changes that you had to make to get MS SQL Server Working?
In your portal-ds.xml (you can just edit the original - no need to rename file, create new file, etc...)
You should change the XML to something like this:
<no-tx-datasource> <jndi-name>PortalDS</jndi-name> <connection-url>jdbc:jtds:sqlserver://YOUR_DB_SERVER_HOST:1433/YOUR_DATABASE;SelectMethod=Cursor</connection-url> <driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class> <user-name>your-portal-DB-user</user-name> <password>your-portal-DB-password</password> </no-tx-datasource>
NOTE - I used the jTDS(open source) JDBC Driver for MS SQL Server/Sybase. You MUST use PortalDS as the jndi-name of your data source.
You may need to tweak the hibernate config file for the portal at:
and manually set the SQL dialect to
Chances are that the portal will automatically sense the dialect for you though.
- avoid using the JDBC:ODBC Driver, instead use a pure Java (Type IV) JDBC Driver
- you can use any file name you want as long as it ends in -ds.xml, however, there's not too much advantage in doing so because you must use a datasource named PortalDS for the portal to work.
Hope this helps.
Thank Smith and rya_lukas. Your replies are so helpful. I failed to change the Portal database at first because I did not config higernate.cfg.xml, the hibernate dialect is not correctly configured. After I configured the hibernate.cfg.xml, everyghing become OK.
For PostgreSql, which is what I am using in the Jboss example. I created a file called portal-hibernate-ds.xml although I am pretty sure as was hinted to about I could have, and I should have, called it portal-postgresSQL-ds.xml. And it worked great.. So as long as the file looks like portal-*-ds.xml you should be all set.
I also put the postgresql-8.0-311.jdbc3.jar file (there might be a newer version) in the C:\jboss-portal-2.0-jboss-4.0.2\server\default\lib directory and everything worked great..
Here is a copy of my portal-hibernate-ds.xml file if that is any help. Maybe there are other PostgreSql users out there..
<?xml version='1.0' encoding='utf-8'?>