我可以使用 Windows 用户而不是使用 SYSDBA 和 MASTERKEY 凭据登录 firebird 数据库吗?如果是,请告诉我如何连接firebird数据库。
我使用的是 Delphi XE3 和 Firebird 2.5。在更新“受信任”的配置文件代替此处指定的默认“ native ”后,我需要通过登录用户对用户进行身份验证:https://firebirdsql.org/file/documentation/release_notes/html/en/2_5/rnfb25-fbconf-authent.html
这是我的代码:
SQLConnection1.LoginPrompt := False;
//SQLConnection1.Params.add('user_name=');
//SQLConnection1.Params.add('password=');
SQLConnection1.Params.add('os authentication=True') ;
SQLConnection1.Connected:= True
它仍然要求提供凭据。
最佳答案
(V.2.1) From Firebird 2.1 onward, Windows “Trusted User” security can be applied for authenticating Firebird users on a Windows host. The Trusted User's security context is passed to the Firebird server and, if it succeeds, it is used to determine the Firebird security user name.
Simply omitting the user and password parameters from the DPB/SPB will automatically cause Windows Trusted User authentication to be applied, in almost all cases. See the Environment section, below, for exceptions
另外,看看这个问题 - https://dba.stackexchange.com/questions/154735/how-to-enable-windows-authentication-in-firebird-2-5
关于delphi - Firebird 2.5 中的 Windows 身份验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44135982/