Fwd: ADO.NET v8.5.4 connecting via FbSecurity works, but fails on FbConnection

40 views
Skip to first unread message

Wavey Maple

unread,
Sep 28, 2022, 12:00:04 PM9/28/22
to firebird-n...@googlegroups.com
Hi all,

Our database administrator tool, which is built on C# using FirebirdSql.Data.FirebirdClient v8.5.4, is trying to connect to a Win10 Pro server which is running Firebird v3.0.7.

The first step of logging is to perform a handshaking check on the credentials using the FbSecurity object with a connection string like this (where names have been changed):
User=MyAdmin; Password=MyPassword; Role=RDB$ADMIN; DataSource=MyServer; Port=3050; Charset=UTF8; ServerType=0
This succeeds as expected and as it did previously.

The next step is to actually open the database using an FbConnection object with similar credentials, however now the Database is specified:
User ID= MyAdmin; Password= MyPassword; Role=RDB$ADMIN; Database=MyServer:MyDatabase; DataSource=MyServer; Port=3050; Charset=UTF8; ServerType=0

This then fails with an FbException error where FbException.Message = 'unavailable database', and FbException.SQLSTATE = "08001". Visual Studio 2019 screen cap is attached.

Lastly, note that when using FlameRobin to try to connect to the database, it works fine (e.g. no issue with port 3050 being blocked).

Our tool used to work fine, so I am perplexed as to what has changed. I realize that this is challenging to try to diagnose, but any helpful tips or direction would be most welcome. I appreciate that there is a new ADO.NET v9.0.2 out there, but this product and version is in production running with our customers so I would like to resolve it without changing anything.

Frankly I am wondering if there is something on the Win10 server other than the port that is blocking access via the FirebirdClient.

Thanks,
David

DT-88.unavailabledatabase.png

Jiří Činčura

unread,
Sep 28, 2022, 2:39:07 PM9/28/22
to 'Mr. John' via firebird-net-provider
What is your real connection string (you can clear-out password)? Could it be that your database is on a file share?

--
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/

Wavey Maple

unread,
Oct 4, 2022, 9:57:24 PM10/4/22
to firebird-n...@googlegroups.com
Thanks for the response Jiří.

The real connection string is what I wrote in the original post, albeit with actual names replaced. So with the exception of the password, the connection string being passed into FbSecurity, where it succeeds, is:
User=CFOwner; Password=MyPassword; Role=RDB$ADMIN; DataSource=DevPC_DTW10; Port=3050; Charset=UTF8; ServerType=0

And the connection passed into FbConnection, where it fails, is:
User ID=CFOwner; Password=MyPassword; Role=RDB$ADMIN; Database=DevPC_DTW10:CFCommon; DataSource=DevPC_DTW10; Port=3050; Charset=UTF8; ServerType=0
where please note that CFCommon is an alias.

Obviously the first place to look is if the CFCommon database is present, but this is where I can connect to CFCommon via FlameRobin.

Any thoughts?

David

--
You received this message because you are subscribed to the Google Groups "firebird-net-provider" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-net-pro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebird-net-provider/23fc388e-92b2-4a01-9b61-2b15383c4d67%40app.fastmail.com.

Mark Rotteveel

unread,
Oct 5, 2022, 2:05:44 AM10/5/22
to firebird-n...@googlegroups.com
On 05-10-2022 03:57, Wavey Maple wrote:
> Thanks for the response Jiří.
>
> The real connection string is what I wrote in the original post, albeit
> with actual names replaced. So with the exception of the password, the
> connection string being passed into FbSecurity, where it succeeds, is:
> User=CFOwner; Password=MyPassword; Role=RDB$ADMIN;
> DataSource=DevPC_DTW10; Port=3050; Charset=UTF8; ServerType=0
>
> And the connection passed into FbConnection, where it fails, is:
> User ID=CFOwner; Password=MyPassword; Role=RDB$ADMIN;
> Database=DevPC_DTW10:CFCommon; DataSource=DevPC_DTW10; Port=3050;
> Charset=UTF8; ServerType=0
> where please note that CFCommon is an alias.
>
> Obviously the first place to look is if the CFCommon database is
> present, but this is where I can connect to CFCommon via FlameRobin.
>
> Any thoughts?

For Database you should use *only* the database-name, that is
Database=CFCommon, you already specified the hostname in DataSource.

Mark
--
Mark Rotteveel

Reply all
Reply to author
Forward
0 new messages