各种数据库方言配置大全

由于作者在使用springdataJpa时候提示数据库方言方面的错误信息,在配置hibernate.cfg.xml时需指定使用数据库的方言:

例:

"dialect"> org.hibernate.dialect.MySQL5Dialect 

或者:

spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect

以下是各数据库对应的方言(Dialect):

数据库 方言(Dialect)
DB2 org.hibernate.dialect.DB2Dialect
DB2AS/400 org.hibernate.dialect.DB2400Dialect
DB2 OS390 org.hibernate.dialect.DB2390Dialect
PostgreSQL org.hibernate.dialect.PostgreSQLDialect
MySQL5 org.hibernate.dialect.MySQL5Dialect
MySQL5 with InnoDB org.hibernate.dialect.MySQL5InnoDBDialect
MySQL with MyISAM org.hibernate.dialect.MySQLMyISAMDialect
Oracle(any version) org.hibernate.dialect.OracleDialect
Oracle 9i org.hibernate.dialect.Oracle9iDialect
Oracle 10g org.hibernate.dialect.Oracle10gDialect
Oracle 11g org.hibernate.dialect.Oracle10gDialect
Sybase org.hibernate.dialect.SybaseASE15Dialect
Sybase Anywhere org.hibernate.dialect.SybaseAnywhereDialect
Microsoft SQL Server 2000 org.hibernate.dialect.SQLServerDialect
Microsoft SQL Server 2005 org.hibernate.dialect.SQLServer2005Dialect
Microsoft SQL Server 2008 org.hibernate.dialect.SQLServer2008Dialect
SAP DB org.hibernate.dialect.SAPDBDialect
Informix org.hibernate.dialect.InformixDialect
HypersonicSQL org.hibernate.dialect.HSQLDialect
H2 Database org.hibernate.dialect.H2Dialect
Ingres org.hibernate.dialect.IngresDialect
Progress org.hibernate.dialect.ProgressDialect
Mckoi SQL org.hibernate.dialect.MckoiDialect
Interbase org.hibernate.dialect.InterbaseDialect
Pointbase org.hibernate.dialect.PointbaseDialect
FrontBase org.hibernate.dialect.FrontbaseDialect
Firebird org.hibernate.dialect.FirebirdDialect

====================================================
本篇文章为转载文章,主要是方便作者自己后续项目中使用到数据源方面的切换时,方言配置查询方便,同时也希望能够帮助更多的后端同伴;若有侵权,烦请联系我,将会在第一时间进行删除!

你可能感兴趣的:(学习旅途,转载)