cuiyi's blog(崔毅 crazycy)

          記錄點(diǎn)滴 鑒往事之得失 以資于發(fā)展
          數(shù)據(jù)加載中……

          firebird技巧和錯(cuò)誤分析與總結(jié)

          1)
          Cmd >> isql localhost/3050:path/cxcdata.fdb -user sysdba -pass masterkey
          Error >>
          Statement failed, SQLCODE = -902

          Unable to complete network request to host "localhost".
          -Failed to establish a connection.
          -No connection could be made because the target machine actively refused it.

          Use CONNECT or CREATE DATABASE to specify a database
          Solution>>
          check whether service or application of firebird start or not

          2)
          Scenario>>Using EMS Data Export for Interbase/Firebird
          Error>>

          Solution>>windows\system32\drivers\etc目錄下的services文件中添加
                          gds_db 3050/tcp

          3) windows下firebird對(duì)db路徑要求:與firebird直接交互的fdb文件必須增加前綴:localhost/3050:[driver]/{[path]/}[.fdb file]
              無(wú)論是isql 還是 gbak
              比如 test.fdb 在d:\dbfile\firebird\test.fdb
              connect db: cmd>> isql localhost/3050:d:/dbfile/firebird/test.fdb -user [username] -pass [userpass]
              backup db: cmd>> gbak -B localhost/3050:d:/dbfile/firebird/test.fdb test.fbk -user [username] -pass [userpass]
              restore db: cmd>> gbak -C test.fbk localhost/3050:d:/dbfile/firebird/test.fdb -user [username] -pass [userpass]
              NOTE: only the fdb file should add the localhost constraint
             
             
          4) db installed in d:/dbfile/firebird/test.fdb
              connect way 1>>  isql localhost/3050:d:/dbfile/firebird/test.fdb -user [username] -pass [userpass]
              connect way 2>> isql localhost/3050:db -user [username] -pass [userpass]
                                         add this line : db = d:/dbfile/firebird/test.fdb  in aliases.conf, no need restart firebird service

          5)about amention of db's path for different customer
          we offten configure db path in apps using jdbc:firebird:localhost:[path]/[db file]   like jdbc:firebird:localhost: d:/dbfile/firebird/test.fdb
          As you know, in most time we install db in different folder for different customers; so we must keep re-compile apps or modify war/jar/ear every time.

          So basis on this issue,  we can change to configure db using firebird self file called aliases.conf
          like this form (basis my local configuration):
          test.fdb = d:/dbfile/firebird/test.fdb

          so now using this form jdbc:firebird:localhost:test.fdb  in  apps
          I tried both windows and linux, it works;

          posted on 2007-11-03 17:06 crazycy 閱讀(3568) 評(píng)論(0)  編輯  收藏 所屬分類: DBMS

          主站蜘蛛池模板: 托克托县| 辽宁省| 肃南| 日喀则市| 永春县| 云安县| 江安县| 柘城县| 弥渡县| 普定县| 澄迈县| 竹山县| 莱州市| 富裕县| 清水河县| 五原县| 祁连县| 仁寿县| 吉安县| 绩溪县| 凉山| 怀集县| 恭城| 东至县| 克拉玛依市| 教育| 凤城市| 平阳县| 四川省| 昌黎县| 体育| 安陆市| 祁阳县| 岚皋县| 山东| 化隆| 乡宁县| 滦南县| 陇西县| 天全县| 阳朔县|