Firebird 3.0 是否有一个 UDF 库可以帮助我恢复旧数据库?

问题描述 投票:0回答:1

我正在尝试从我收到的

.gbk
文件恢复 Firebird 数据库。有人告诉我它来自 Firebird 数据库版本
3.0.11

当我在文件上运行恢复工具

gbak -c ...
时,它会愉快地咀嚼它,直到最后产生这些警告:

gbak: WARNING:function F_PADLEFT is not defined
gbak: WARNING:    module name or entrypoint could not be found
gbak: WARNING:    function F_LRTRIM is not defined
gbak: WARNING:    module name or entrypoint could not be found
gbak: WARNING:    function F_MID is not defined
gbak: WARNING:    module name or entrypoint could not be found
gbak: WARNING:    function F_SUBSTR is not defined
gbak: WARNING:    module name or entrypoint could not be found
gbak: WARNING:    function F_YEAR is not defined
gbak: WARNING:    module name or entrypoint could not be found
gbak: WARNING:    function F_MONTH is not defined
gbak: WARNING:    module name or entrypoint could not be found
gbak: WARNING:    function F_TRUNCATE is not defined
gbak: WARNING:    module name or entrypoint could not be found
gbak: WARNING:    function ABS is not defined
gbak: WARNING:    module name or entrypoint could not be found
gbak: WARNING:    function F_DAYOFMONTH is not defined
gbak: WARNING:    module name or entrypoint could not be found
gbak: WARNING:    function PHS_STR is not defined
gbak: WARNING:    module name or entrypoint could not be found
gbak: WARNING:    function PHS_MMYY is not defined
gbak: WARNING:    module name or entrypoint could not be found
gbak: WARNING:    function PHS_ROUND is not defined
gbak: WARNING:    module name or entrypoint could not be found
gbak: WARNING:    function SUBSTR is not defined
gbak: WARNING:    module name or entrypoint could not be found
gbak: WARNING:    function F_MODULO is not defined
gbak: WARNING:    module name or entrypoint could not be found
gbak: WARNING:    function F_LTRIM is not defined
gbak: WARNING:    module name or entrypoint could not be found
gbak: WARNING:    function F_STRINGLENGTH is not defined
gbak: WARNING:    module name or entrypoint could not be found
gbak: WARNING:    function F_LEFT is not defined
gbak: WARNING:    module name or entrypoint could not be found
gbak: WARNING:    function F_DAYOFYEAR is not defined
gbak: WARNING:    module name or entrypoint could not be found
gbak:finishing, closing, and going home
gbak:adjusting the ONLINE and FORCED WRITES flags

然后退出。

当我尝试连接到数据库时,它失败了:

Use CONNECT or CREATE DATABASE to specify a database
SQL> CONNECT "/path/to/the/database.fdb"
CON> USER xxxxx PASSWORD xxxxx
CON> ;
Statement failed, SQLSTATE = 2F000
Error while parsing procedure LOG_CONNECT's BLR
-invalid request BLR at offset 4185
-function F_YEAR is not defined
-module name or entrypoint could not be found
SQL> 

我确实无法在任何地方找到错误代码

2F000

我有两个问题:

  1. 我是否正确假设构建数据库时出现警告是由于缺少 UDF?
  2. Firebird 有免费的 UDF 库吗
    3.0

我找到了FreeAdhocUDF。那里可用的 UDF 库与

2.0
之前的版本兼容,我天真地尝试让它们与
3.0
一起使用,但没有成功。

有人有什么想法吗?非常感谢! :)

user-defined-functions firebird restore firebird-3.0
1个回答
0
投票
  1. 是的,这是由于缺少 UDF。
  2. UDF 接口在 2.0 和 3.0 之间没有变化,因此您只需仔细阅读收到的错误消息即可。这要么是因为您忘记阅读发行说明并在
    firebird.conf
    中启用 UDF 访问,要么是您获得了错误位数的库。缺少依赖项也是一种选择。

同时,您可以在禁用数据库触发器的情况下连接到数据库。这将允许您解除

LOG_CONNECT
触发器以及其他使用 UDF 的地方。向数据库的开发者或所有者询问它们的列表。

© www.soinside.com 2019 - 2024. All rights reserved.