ibase_connect: remote computer host and shared db file from windows

旧街凉风 提交于 2020-01-07 06:41:19

问题


Linux red hat, connect the drive to a remote server (192.168.0.103) via mount to /mnt/databases Then trying to connect

$idbh = ibase_connect("192.168.0.103/3050:/mnt/databases/XXX.IB", "SYSDBA", "masterkey", "WIN1251") or die(ibase_errmsg().' on line: '.__LINE__);

Result

 ibase_connect(): I/O error for file "/mnt/databases/XXX.IB" Error while trying to open file unknown Win32 error 3

Try stat /mnt/databases/XXX.IB

  File: `/mnt/databases/XXX.IB'
  Size: 46415872        Blocks: 90752      IO Block: 16384  regular file
Device: 17h/23d Inode: 1970324836974627  Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2013-07-16 16:04:08.470709400 +0400
Modify: 2013-06-17 13:03:03.600143300 +0400
Change: 2013-06-17 13:03:03.600143300 +0400

Why i cant connect?


回答1:


Do not attempt to access a Firebird or Interbase database via any form of mount. The server process should be on the same machine as the disk containing the database.

Your client would then communicate with the server process to interact with the database.




回答2:


You need to specify the alias of the database for connections, or the full path on disk relative to the Firebird Server. http://www.firebirdsql.org/manual/qsg2-databases.html

So if on the Firebird server the database is on C:\databases\db.fdb you need to provide that. A network drive/share is not going to work because from the FB Server context that doesnt exist.

Some applications (QuickBooks) fool you into thinking you need to share the folder where the file resides, but its actually just bootstrapping a TCP/IP socket connection to the Database Service. Firebird does not work that way.



来源:https://stackoverflow.com/questions/17676450/ibase-connect-remote-computer-host-and-shared-db-file-from-windows

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!