Difference between revisions of "Using OpenKM with other databases"
From OpenKM Documentation
m |
(→Generating database script) |
||
Line 41: | Line 41: | ||
* [[Oracle]] [[File:Padlock.gif]] | * [[Oracle]] [[File:Padlock.gif]] | ||
+ | See also: | ||
+ | |||
+ | * [http://jandrewthompson.blogspot.com/2009/10/how-to-generate-ddl-scripts-from.html How To Generate DDL Scripts from Hibernate] | ||
[[Category: Installation Guide]] | [[Category: Installation Guide]] |
Revision as of 13:22, 27 February 2011
By default, OpenKM uses an embedded database called HSQLDB. This database is integrated into JBoss and offers a good performance and low hardware requirements. But sometimes it not enough for some users and need OpenKM to be deployed within their IT structure, which is based on any other database vendor.
Startign with OpenKM 5, you can create the databases automatically configuring the hibernate.dialect and hibernate.hbm2ddl properties in OpenKM.cfg.
hibernate.dialect=org.hibernate.dialect.HSQLDialect
hibernate.hbm2ddl=create
Once the tables are created, change the hibernate.hbm2ddl property from create to none.
Generating database script
If you want to see the table creation script, create, compile and run this piece of code:
import java.io.File;
import org.hibernate.cfg.Configuration;
import org.hibernate.tool.hbm2ddl.SchemaExport;
public class Test {
public static void main(String[] args) throws Exception {
Configuration cfg = new Configuration();
cfg.configure(new File("/path/to/hibernate.cfg.xml"));
SchemaExport se = new SchemaExport(cfg);
se.setOutputFile("/path/to/schema.sql");
se.setFormat(true);
se.create(false, false);
}
}
Here we will discuss the changes needed to run OpenKM with these databases:
See also: