`
ponlya
  • 浏览: 159536 次
  • 性别: Icon_minigender_1
  • 来自: 武汉
社区版块
存档分类
最新评论

H2笔记

    博客分类:
  • H2
 
阅读更多

H2的JDBC URL很多,有内存,内嵌式还有TCP式,选用时避免独占式的URL。

驱动:org.h2.Driver
URL:jdbc:h2:tcp://localhost/~/dbname     这时的数据库文件位置在用户目录下,在迁移时不方便,改为:

 jdbc:h2:tcp://localhost/file:D:/zc/h2/server/dbname

更多的URL在:

http://blog.csdn.net/dingqinghu/article/details/6125501

 

H2打开远程连接

直接连接远程出错: org.h2.jdbc.JdbcSQLException: Connection is broken: "java.net.SocketTimeoutException: connect timed out: 192.168.1.202" [90067-168]
1.修改~/.h2.server.properties中的配置将tcpAllowOthers或webAllowOthers都打开(true)仍然无法通过程序连接远程H2数据库
webAllowOthers=true
webPort=8082
webSSL=false
错误信息:org.h2.jdbc.JdbcSQLException: Remote connections to this server are not allowed, see -tcpAllowOthers [90117-166]
2.使用命令bat启动h2 并打开tcp,OK

java -classpath h2.jar org.h2.tools.Server -tcp -tcpPort 8092 -tcpAllowOthers

 jdbc:h2:tcp://192.168.1.102:8082/~/dbname

 

分享到:
评论
1 楼 yogurt2012 2014-04-17  
请问··我如果要调试H2数据库来分析其JOIN算法应该怎么做呢?

相关推荐

Global site tag (gtag.js) - Google Analytics