練功房推薦書單

  • 猛虎出柙雙劍合璧版--最新 OCA / OCP Java SE 7 Programmer 專業認證 (電子書)
  • 流浪教師存零股存到3000萬(全新增修版)(書+DVD)
  • 開始在關西自助旅行(京都‧大阪‧神戶‧奈良)(全新增訂版)
  • 不敗教主的300張股票存股術

关于改变数据库连接的修改 RSS feed
討論區首頁 » JForum中文社群 JForum Chinese Users Community
發表人 內容
wu_net2008

八級學員

註冊時間: 2008/4/30
文章: 20
離線
需要改变数据库连接是不是只要修改jforum-custom.conf文件里的
database.connection.dbname
database.connection.host
就可以了,其他地方还用改吗?
andowson

七段學員
[Avatar]

註冊時間: 2007/1/2
文章: 711
來自: 台北
離線
之前的經驗,有幾個參數可以注意一下

dao.driver=net.jforum.dao.oracle.OracleDataAccessDriver
database.connection.dbname=orcl
database.connection.driver=oracle.jdbc.OracleDriver
database.connection.host=LISTENER_IP
database.connection.implementation=net.jforum.PooledConnection
database.connection.username=jforum
database.connection.password=jforum
database.connection.pool.max=50
database.connection.pool.min=5
database.connection.pool.timeout=120
database.connection.port=1521
database.connection.string=${database.connection.string_thin}
database.connection.string_local=jdbc\:oracle\:oci\:${database.connection.username}/${database.connection.password}@${database.connection.dbname}
database.connection.string_thin=jdbc\:oracle\:thin\:${database.connection.username}/${database.connection.password}@${database.connection.host}\:${database.connection.port}\:${database.connection.dbname}
database.driver.name=oracle
database.support.autokeys=false
database.support.subqueries=true
dbencoding=utf-8
dbunicode=true
encoding=UTF-8
mysql.encoding=
mysql.unicode=

其中dbname要設成Oracle的SID(例如orcl),LISTENER_IP則是Oracle Listener所用的IP,如果是單機跑Oracle時應該跟主機相同,如果有跑RAC,可能會再多設一個Virtual IP,可將這個設定設在/etc/hosts內,如:

192.168.101.55 LISTENER_IP

分享經驗 累積智慧
[WWW]
 
討論區首頁 » JForum中文社群 JForum Chinese Users Community
前往:   
行動版