Is Firebird database file compatible to Firebird Embedded database - firebird

Is it possible to open a Firebird database file also with a Firebird Embedded of the same Firebird version? Sure, I am aware I can't keep the same file open via FB Embedded and FB at the same time. But after closing the Firebird connection it should be possible to connect with FB Embedded, right? Are there any restrictions when connecting over FB Embedded. My question concerns Firebird Version 3.0 or higher.
I expect that this is possible without any restriction.

The Firebird Embedded library uses the exact same database engine as the full blown Firebird server (plugins\engine12.dll in the case of Firebird 3.0). The difference is that a Firebird server accepts remote connections over TCP/IP (and NetBEUI), and - on Windows - connections from other processes using XNET and uses authentication, while Firebird Embedded is an in-process database engine which can only be used from within that process, and relies only on filesystem permissions to decide if you're allowed to open a database.
In other words, it uses the exact same database file format.
As an aside, it is possible to use a Firebird server and Firebird Embedded together on the same database concurrently, if ServerMode is configured appropriately in the firebird.conf of both (to SuperClassic/ThreadedShared or Classic/MultiProcess), and both use the same lock-directory (which would be the default situation).
A Firebird 3.0 server can only open databases with On-Disk Structure (ODS) 12.x, while Firebird 4.0 can - by default - only open databases with ODS 13.0. It is possible to include the engine12.dll of Firebird 3.0 in Firebird 4.0, and configure Firebird 4.0 to open a Firebird 3.0 database with that specific plugin.

Related

Firebird ADO.NET provider 5.0.5.0 to Firebird 3.0 can not connect except sysdba

I am trying connect to firebird 3.0 throught latest version of ADO.NET provider 5.0.5.0 from my simple test .net application. When i used sysdba user connection is made OK, but if i used other user then connection failed with classic FBException :
Your user name and password are not defined. Ask your database administrator to set up a Firebird login.
"initial catalog=c:\\Database\\Data.fdb;data source=localhost;user id=sysdba;password=sysPass;port number=3050" = OK
"initial catalog=c:\\Database\\Data.fdb;data source=localhost;user id=michal;password=micPass;port number=3050" = failed
But if i am trying connect throught IBExpert or isql , then connection is made OK and i can get data from tables.
Previously i used Firebird 2.1 and then i upgraded to Firebird 3.0 superclassic and get ADO.NET provieder from nuget.Actually i do not need SRP ecryption so I disabled WireCrypt etc. and use Legacy authentication (Firebird 3.0 release notes page 117). Then i created my new user via IBExpert (sysdba was created during installation firebird server).
I do not need migrate users from previous firebird version so I skiped Upgrading a v.2.x Security Database steps.
It is strange that i can connect myUser via IBExpert or isql, but not via ADO.NET provider.
It seems to me unlikely that ADO.NET provider has bug of this type (everyone needed connect via user), so I guess that i have some bad configuration.
I had some bad configurations and I need set correctly:
In firebird.conf, there has to be: WireCrypt = Enabled (not disabled)
Create user account older way (in my case via IBExpert)
The password have to max. length 8 chars (previously you can have more chars and Firebird is omit)

oracle 9i client connecting to oracle 12c server

Can Oracle 9.2 client connect to Oracle 12c server?
We have an old server which is an 11g version, and so far there's no problem connecting from client.
Thank You.
That isn't a supported combination, no. As it says in the documentation, you can see the supported client/server combinations at My Oracle Support note 207303.1.
The 9i client used to be supported with an 11g server, but is not with a 12c server. There is a specific note about it:
Attempting to connect from 9.2 to 12.1 will fail with an "ORA-28040: No matching authentication protocol" error.
We are currently using the 9i 32bit Client to connect to Oracle 12c 64bit server in test at the moment and so far it works but with caution.
For example, whenever you query certain data types not available in 9i but available in 12c, the system may crash. We therefore had to build views that convert the timestamp data type to the date data type for example. Then it works fine. Even use of indexes seem to work fine.

Can firebird database connect to other databases using like linked server in SQL Server?

I know that SQL Server has linked server that allow it to connect to other database and execute query. Now I am using firebird. I wonder if firebird has its "linked server" to access other databases. Thanks!
Firebird doesn't have a linked server feature. There is a limited method for accessing other Firebird databases (either remote or locally) using EXECUTE STATEMENT, however this only supports Firebird database, and you need to provide the data source information on each invocation.

Error SQLCODE -904 in firebird after installation

I installed firebird database for the first time in my life (version 1.5.6 on Windows 7), after installation I can not connect to the sample database (employee.fdb exists), or create a database. This gives the following error in ISQL Tool:
C:\Program Files\Firebird\Firebird_1_5\bin>isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> CONNECT "C:\Program Files\Firebird\Firebird_1_5\examples\employee.fdb"
CON> user 'SYSDBA' password 'masterkey';
Statement failed, SQLCODE = -904
unavailable database
SQL> create database 'C:\test.fdb'
CON> user 'SYSDBA' password 'masterkey';
Statement failed, SQLCODE = -904
unavailable database
Firebird 1.5 was written (long) before Windows 7, and before things like UAC existed. It may simply be that Firebird 1.5 doesn't work correctly with Windows 7, or that it requires additional effort to work. I'd suggest to install Firebird 2.5.2 (update 1) as that is the latest version and is known to work with Windows 7.
Another problem might be that local system connections don't work as I seem to remember that Firebird 1.5 uses an older local protocol which doesn't work on newer Windows versions. This protocol was replaced in Firebird 2.0. To workaround that you need to include the hostname in the CREATE DATABASE or CONNECT statement, so for example:
create database 'localhost:C:\test.fdb' user 'SYSDBA' password 'masterkey';
Windows 7+ breaks the local api protocol. You have to use Tcpip protocol to connect to the database, even for local connections.

How to check in which server mode (e.g. SuperClassic or Superserver) a Firebird database is running?

The latest Firebird 2.5.x database can run in either Classic, SuperClassic, or SuperServer mode. How can I check in which of these modes an installed database is running?
There's no API that exposes this. But because you're on a server, you can check what process is running.
I.e. on Windows and Firebird 2.5:
One fb_inet_server.exe = very likely SuperClassic
Multiple fb_inet_server.exe = very likely Classic
fbserver.exe = very likely SuperServer
Firebird 4+ has RDB$CONFIG table.
To read ServerMode see record with rdb$config_name='ServerMode':
select rdb$config_value from RDB$CONFIG where rdb$config_name='ServerMode'