我有2台使用Firebird 2.5的服务器。每个服务器都有一个单独的数据库,其中一个连接到另一个服务器以检索一些数据。其中一台服务器切换到Firebird 3.0,现在无法连接到2.5服务器。它说我的用户名或密码不正确。我已经使用凭据连接到2.5服务器,它们没问题。
要检索数据,我在外部数据源[SERVER]上使用Execute语句[STATEMENT]作为用户[USER]密码[PASSWORD]。
2.5有更多的数据库,将它升级到3.0会很麻烦。
有谁有这个问题?
我使用以下简单语句(并根据我正在测试的内容修改某些部分)在具有不同端口的同一服务器上使用Firebird 2.5(2.5.8)和Firebird 3(3.0.4)进行了一些测试,以查看我可以生产的那种连接故障。
set term #;
execute block returns (tblname char(31))
as
begin
for execute statement 'select rdb$relation_name from rdb$relations where coalesce(rdb$system_flag, 0) = 0'
on external data source 'localhost/3051:D:\data\db\testdatabase.fdb'
as user 'sysdba' password 'masterkey'
into tblname
do suspend;
end#
set term ;#
使用此语句,我可能会收到错误“您的用户名和密码未定义”。在以下情况下从Firebird 3到2.5:
AuthClient
1配置,不包括Legacy_Auth
。 Firebird 3无法对Firebird 2.5进行身份验证,因为Firebird 2.5只知道遗留身份验证机制。
要解决此问题,请将Legacy_Auth
添加到Firebird 3服务器的AuthClient
中的firebird.conf
设置(例如将其设置为AuthClient = Srp, Legacy_Auth
)并重新启动服务器。
这一点很可能是你的问题。as user 'sysdba' password 'masterkey'
留在execute statement
之外)。这可能是由于认证机制的不同,因为Firebird不知道SRP协议的实际密码,因此无法对其他服务器进行身份验证。
指定用户名和密码可以解决此问题。在反向(Firebird 2.5到3),我在以下情况下无法建立连接:
create user theuser password 'thepassword' using plugin Legacy_UserManager;
commit;
如果这导致错误“缺少请求的管理插件”,那么您需要编辑Firebird 3 firebird.conf
并将Legacy_UserManager
添加到UserManager
设置(例如设置为UserManager = Srp, Legacy_UserManager
;默认值仅为Srp
)并重新启动Firebird。
作为SYSDBA,您可以通过执行来检查Firebird 3服务器上用户所在的插件(或插件!)
select SEC$USER_NAME, SEC$PLUGIN
from SEC$USERS
WireCrypt = Required
(这是默认设置!)。这会产生错误“远程接口拒绝的连接”。
要解决此问题,请在Firebird 3服务器的WireCrypt = Enabled
中设置firebird.conf
并重新启动服务器。as user 'sysdba' password 'masterkey'
留在execute statement
之外)。这会产生错误“未知ISC错误335545106”(实际消息是“登录时出错,如果使用Firebird 3消息文件,请检查服务器firebird.log以获取详细信息”,其中Firebird 3的日志显示“没有匹配的插件”服务器“,这可能是由于身份验证机制的不同。
指定用户名和密码可以解决此问题。AuthServer
配置,不包括Legacy_Auth
(默认只有Srp
!)。这也会产生错误“未知ISC错误335545106”(实际消息是“登录时出错,如果使用Firebird 3消息文件,请检查服务器firebird.log以获取详细信息”,其中Firebird 3的日志显示“没有匹配的插件”服务器”。
要解决此问题,请将Legacy_Auth
添加到Firebird 3服务器的AuthServer
中的firebird.conf
设置(例如将其设置为AuthServer = Srp, Legacy_Auth
)并重新启动服务器。当然,在两个方向上都出现错误“您的用户名和密码未定义”。也可以通过使用不存在的用户或错误的密码来生成。
1.设置AuthClient
与此相关,因为服务器在执行execute statement ... on external data source ...
时充当客户端