[firebird-support] Cannot delete Firebird database file as it is in use by the application..

2020-03-11 Thread Elmar Haneke el...@haneke.de [firebird-support]


> As a result, I have no idea why the Firebird FDB database file is
> still being used by the master application.
>
> Does anyone have any ideas as to how I can get around this so I can
> complete the delete process?


If all connections are properly closed you should be able to drop
database using firebird API, this should be possible even if deleting by
direct filesystem delete is not possible.


Elmar







++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] Statement freezes firebird

2020-01-27 Thread Elmar Haneke el...@haneke.de [firebird-support]

>  select first(8) ID from TBL_TEST
>
>  where ID not in (select first(2) ID from TBL_TEST order by ID desc)
>  order by ID desc
>
the execution plan can be show e.g. with flamerobin client.

The result should be the same as "select first 8 skip 2 from TBL_TEST
ORDER BY ID DESC"

Elmar




Re: [firebird-support] Running Firebird as Application on Linux

2020-01-08 Thread Elmar Haneke el...@haneke.de [firebird-support]

> we wrote an cross-platform application framework that should
> be relocatible including the database engine and the database file.
> For Windows systems there is a command line option "-a" to start
> Firebird as application. I did not find any similar for the Linux
> version. Is there any way to run the Firebird server on Linux
> without installation into the system?


The fbserver executable can be run in any user context that has access
to database files.

On linux most servers are just processes started by other processes
(e.g. by sysctrl or initd). You can have fbserver started on boot or you
can start it on your own once needed.


Elmar






Re: [firebird-support] Re: Securing Firebird Embedded database

2020-01-08 Thread Elmar Haneke el...@haneke.de [firebird-support]

Am 20.12.19 um 22:59 schrieb Steve Naidamast
blackfalconsoftw...@outlook.com [firebird-support]:
> The first would be using DotNetZip to compress and encrypt the Firebird 
> database file into a zip file with a pass word.  The next level of encryption 
> would be to take the zip file and encrypt it again using standard file 
> encryption technologies (ie: AES)  Each set of compression\encryption 
> processes would use a different internally generated key every time the 
> process is initiated.

This is acceptable for transporting database file, it does not really
work while your application is using database.

> This may not be a perfect solution but I have it working to a point where the 
> response time of these processes are acceptable on a Firebird database file 
> of 1.5 gigs.  However, it will be up to the user to set what they want 
> through my application's security options, which will provide the option to 
> do one or both security processes upon opening and closing the application or 
> upon demand.


Really pack 1.5GB on start/close?

The user still can Copy FDB-file while it is unpacked...


> My concept is distantly related to your own Encryption schemes in Firebird 
> 3.0 where your security is supported by third-party plugins instead of using 
> a singular security scheme built in to the database engine.


"third-party" does mean that this code is not part of firebird
package.it should be possible to write an plugin of your own.


Elmar




Re: [firebird-support] Re: Securing Firebird Embedded database

2019-12-20 Thread Elmar Haneke el...@haneke.de [firebird-support]

> All other database engines that I have worked with provide password 
> protection, even SQLite, which is used primarily for desktop and device 
> applications.

I'm not familiar which the technique SQLite uses.

But either they are using the password to encrypt database or it is an
fake protection and anyone can use an modified SQLite to access that
database which is simply ignoring password.

> I agree that the best way to protect any such database file is either through 
> internalized encryption, which I believe is now offered with Firebird 3.xx or 
> complete file encryption.  However, would it not be easy enough for the 
> Firebird Development Group to simply implement the security constructs for 
> the embedded edition as it is for its server-side siblings given that all 
> such editions are primarily the same?

Even the "server side security" is meaningless once the illegitimate
user does have direct access to database file.

Your idea sounds like the "security by obscurity" approach used in some
closed-source systems as e.g. MS-Access - ask google how to remove that
password protection. That approach is worth nothing in an open source
context.


Elmar



Re: [firebird-support] Re: Securing Firebird Embedded database

2019-12-19 Thread Elmar Haneke el...@haneke.de [firebird-support]

> Is there any way to secure the FDB file from unauthorized access (other than 
> compression and encryption, which I am starting to implement in my project) 
> and if not, is there expected to be at least password protection for the 
> Embedded edition in Firebird 4.0?


Password protection does assume the database file stored out of reach of
illegitimate users. Legitimate server admin can always access database.

Encryption is the only method to make illegitimate access to database
content more difficult - its not really impossible if you have to store
encryption keys within your application.

Elmar


Re: [firebird-support] When opening an .FDB file, Firebird says the database is already open by the same computer

2019-12-18 Thread Elmar Haneke el...@haneke.de [firebird-support]

> The application requires Firebird to be installed and running on both the 
> client computer (which also runs Firebird client), and the server with the 
> shared .fdb databases.  Firebird is fully integrated with the Ascent 
> program..  


I'm sure the Ascent-people do know how to use Firebiord in a reliable way.

> The only reason for the shared directory on the server, is to have a central 
> repository for the .fdb files (as in an office environment).

That means normal use of that Software is to have a local database.

It is a wrong decision to collect them on an shared drive.

When using central databases you have to collect them aon a local drive
of any server and access them through the firebird instance on that server.


Elmar




Re: {Disarmed} [firebird-support] MS-Windows<-->Linux compatibility

2019-08-30 Thread Elmar Haneke el...@haneke.de [firebird-support]

> In theory, if I create a Firebird database with IBExpert under
> MS-Windows, is it then possible to use it with a Linux application
> (written in Lazarus), giving it all the right rights, ie without going
> through an IBExpert's script export and re-import into FlameRobin)?
>

IBExpert, Flamerobin and your Lazarus based application call all connect
to the same server which can be running on any of your computers.

In case you are using firebird in embedded mode you cannot really share
database between different machines since it is not an good idea to
place database on an network share.




Re: {Disarmed} [firebird-support] Re: 2.5.9 - LOCALTIME

2019-08-06 Thread Elmar Haneke el...@haneke.de [firebird-support]

> Database dialect is 1 and changing the column name and the connected
> code is not an option either at the moment, unfortunately.


It might be an option to modify code and compile for your own.

It might be sufficient to modify parse.y by replacing "LOCALTIME" by
some different Name that does not hurt e.g. "FBLOCALTIME".


Elmar




Re: [firebird-support] 3.x - Check if DB exist using alias

2019-08-05 Thread Elmar Haneke el...@haneke.de [firebird-support]
There are some important preconditions on this:

1. The Program has to run locally on the server

2. It does need read permissions to that file

3. You need to know where firebird server is installed


Am 05.08.19 um 15:58 schrieb 'Zoran' zoran...@gmail.com [firebird-support]:
> What Dimitry said, or you can try this:
>
>  
>
>  
>
> function _GetAliasDBFName(alias): string;
>
>   var
>
> sl: TStringList;
>
>   begin
>
> result := '';
>
> sl := TStringList.Create;
>
> try
>
>   sl.LoadFromFile('C:\Program 
> Files\Firebird\Firebird_3_0\databases.conf');
>
>   result := sl.Values[alias];
>
> finally
>
>   sl.Free;
>
> end;
>
>   end;
>
>  
>
> Simply call _ GetAliasDBFName and pass your alias name as a param. Problem 
> might arise if FB team chooses to change name of database.conf file, or 
> re-allocate it.
>
>  
>
>  
>
>  
>
> From: firebird-support@yahoogroups.com  
> Sent: Monday, August 5, 2019 8:06 AM
> To: firebird-support@yahoogroups.com
> Subject: [firebird-support] 3.x - Check if DB exist using alias
>
>  
>
>   
>
> I'm using Delphi.
>
> Which is the best way to check if a database exist if my connection is alias 
> based?
>
>  
>
> I have to try to connect and manage response?
>
> Is there another way?
>
>  
>
> Fabio Codebue
>
>
>
> P-SOFT di Codebue Fabio
>
> Via Nuova n. 9 - 24060 Tavernola B.sca (BG)
>
> P.I. 03624950162
>
> C.F. CDBFBA72A11C618T
>
> Mobile: +39.348.3515786
>
> Fax: +39.030.5100306
>
> Web:   http://www.p-soft.biz
>
>  
>
> pec: amministrazi...@pec.p-soft.biz  
> cod.intermediario SDI: KRRH6B9
>  
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> 
> Posted by: "Zoran" 
> 
>
> ++
>
> Visit http://www.firebirdsql.org and click the Documentation item
> on the main (top) menu.  Try FAQ and other links from the left-side menu 
> there.
>
> Also search the knowledgebases at 
> http://www.ibphoenix.com/resources/documents/ 
>
> ++
> 
>
> Yahoo Groups Links
>
>
>
>
-- 
Mit freundlichen Grüßen

Elmar Haneke

===
|Dr. Elmar Haneke   Tel: +49-2241-39749-0 |
|   Fax: +49-2241-39749-30|
|Haneke SoftwareWWW: www.haneke.de|
|Dr. Elmar und Hubertus Haneke  Mail: el...@haneke.de |
|Johannesstraße 41|
|53721 Siegburg USt-IdNr. DE 123387209|
===







Re: {Disarmed} [firebird-support] System requirements for the Firebird 3.0

2019-08-02 Thread Elmar Haneke el...@haneke.de [firebird-support]

> I would like to know if someone can help me with the minimum system
> requirements for the Firebird 3.0, specific for Debian distribution.
> Distribution, kernel and so on.

Current stable (buster) does have 3.0.5 in repository.

Oldstable (stretch) does come with 3.0.1 only.

For any older distribution you will have to compile from source.

I would strongly suggest to use buster distribution and install compiled
binary from repository.

Elmar



Re: {Disarmed} [firebird-support] Web application with Firebird 3 and SaaS

2019-06-05 Thread Elmar Haneke el...@haneke.de [firebird-support]

> I am planning the infrastructure and security and I have several
> doubts. My initial idea would be to have a database where users can
> save their emails and create a separate database for each client.

For an Web-Application this is not really common practice as you prevent
e.g. usage of "connection pooling".

An alternative would be to use an single database and an single database
user. If the machine is dedicated toi that web application it should be
ok to use default SYSDBA/masterkey login as nobody besides the
application can connect to database.

It's than up to the application to manage user login with information
stored in an normal table.

Also the application has to manage accessing the correct data - you will
pass Company ID to most SQL statements.

As number of clients grows using an single database will consume much
less resources on your server.

> I think it is best to isolate each database with its own security*.fdb
> to prevent any client from accessing another database 

You application is the only one connecting to database. The clients are
connecting to your application.

> and in this point is what I am not clear about, how to manage users
> and security by database, permissions...

read documentation for "CREATE USER" and "GRAND" SQL-Statements.

> I would also need to be able to create a database on the fly, when a
> new client registers, for that I need to stop the Firebird service?
>
You can create databases without stopping server of course - it is up to
the server to create database. But, creating database and tables does
take some time.








Re: {Disarmed} [firebird-support] firebird 1.5 installation in linux

2019-02-13 Thread Elmar Haneke el...@haneke.de [firebird-support]

> firebird 1.5 linux built is for 32 bits, is it possible to install it
> in a 64 bit linux? Thanks.


As long as your 64Bit Linux does have support for 32Bit and the required
32Bit runtimes are installed it should be possible to install.







Re: {Disarmed} [firebird-support] hosting on linux questions

2018-07-16 Thread Elmar Haneke el...@haneke.de [firebird-support]

>
> 1- after some search , it seems that the recommended linux
> distribution for a web server is centos 7, then ubuntu .
>
> any feedbacks , recommendations, ideas on this please , and how it
> behave with firebird ?

I'm using firebird on debian for years - without any problems.
Presumably it does not really matter for firebird which distribution is
used.

> 2 - i am not really  a linux user , what is the best place/directory 
> to put the fdb databases ?

You can place them according to some standard documents as mentioned
before. But, it is also ok to place them in an Directory /db or
/usr/local/fbdata.

> 3 - i have several databases for differents custumers (20 / 30 or
> more), can a single firebird server handle many databases correctly ?

This number of databases does not cause problems. >ou should think about
spreading to multiple servers once the workload on your server does
raise and an single machine is not enough any more.

Elmar



Re: [firebird-support] select column if it exists

2017-10-09 Thread Elmar Haneke el...@haneke.de [firebird-support]

> Is there a way to include a column in a SELECT but substitute a value if 
> it doesn't? I need my code to work with different versions of my db schema.
>
> eg I want to SELECT A, B, C, ... but C might not exist.
>
> SELECT * would work of course, except it will fetch a bunch of columns I 
> don't need.

You can read the list of fields available in advance and modify your
query ommitting missing columns.


Elmar



Re: {Disarmed} [firebird-support] Using FB2.5 with NFS for Virtualbox VM

2017-10-05 Thread Elmar Haneke el...@haneke.de [firebird-support]

>
>
> I have a single Linux host server with several Virtualbox guest VM's.
>  I've been attempting to move everything possible from the host to one
> of the guests.
>
> One of the last holdovers is Firebird.  The reason is I use NFS to
> mount host folders within the guest for critical data - and the .fdb
> certainly counts.

NFS is an networking system not part of virtualbox.
Virtualbox has an mechanism of its own to allow gests access to host
filesystem you shoulkd try that instead.

> So for my use case - I have a single Firebird server instance.  There
> will never be more than one copy of Firebird running.  All write and
> 99.99% read access to the .fdb would be through that single Firebird
> instance (except for automated remote backup operations running on the
> host).

It's not an good idea to backup database file while firebird-server is
running on that file. You should use firebirds backup functionality instead.

> Am I "safe", possibly even correct, in using RemoteFileOpenAbility in
> this use case?

This option is for pepole knowing what they are doing - those pepole
usually do not ask if it is ok.


Elmar



[firebird-support] PThread error

2017-07-11 Thread Elmar Haneke el...@haneke.de [firebird-support]
after some time my fbserver does refuse to open new connections:

> elmar (Server)  Tue Jul 11 13:05:36 2017
> Operating system call pthread_create failed. Error code 11
>
>
> elmar (Server)  Tue Jul 11 13:05:36 2017
> Database: /usr/local/fbdata/maindb.fdb
> internal Firebird consistency check (cannot start thread)

I'm running an v2.5.6 on Debian/sid/AMD64.

What might cause that Problem?

Currently the only solution is to restart fbserver.


Elmar



Re: {Disarmed} [firebird-support] Two versions

2017-07-04 Thread Elmar Haneke el...@haneke.de [firebird-support]
You can define port number in firebird.conf

one of your Installations has to be done from source to get another
install path


> Does anybody know how to have two versions of Firebird running on
> Linux(ubuntu).
>
> I currently have 2.5 on port 3050 and would like to have 3.0 on port 3051.
>



Re: {Disarmed} [firebird-support] Hint for maximaze FB performance, CPU Utilization - again.

2017-04-19 Thread Elmar Haneke el...@haneke.de [firebird-support]

> During my development - only single connection to FB Server, I do a
> lots of query. Each query took about 25-30 secs to complete, but CPU
> Utilization only used at around 16% on my six cores computer.
> On Ryzen 7 with 16 threads, I believe CPU utilization for FB is only 6%.
>
> Are there any hints to set Firebird to use more cpu's power?

Each connection does get an single OS-thread only which can use no more
than an single core at the same time. On an 6-core CPU this means an
maximum of 16% utilization for total CPU.

Firebird does not spread an single query onto several cores as e.g.
Oracle can do.


Re: [firebird-support] Number of concurrent user connections

2016-10-28 Thread Elmar Haneke el...@haneke.de [firebird-support]

>
> One thing is for sure YOU can't login FACEBOOK with two different IDs
> from the SAME PC at the same TIME.

I would assume that to be true for using une WEB-Browser. It shpild be
no Problem to login with two IDs using e.g. chrome for one and foirefox
for the other and there is nothing preventing you to login with an third
ID using konqueror.

> There should be a UNIQUE field such MAC ADDRESS + IP + ID managed by
> the DATABASE in a TABLE !!!

That would suprise me. They certainly do not manage such an table for
current logins.

Client does have an cookie to identify. This cookie is known at
application server which stores such information in RAM. Keyed by that
cookie there is more information about user session stored in RAM.

You should read some basic information about how to make WEB-Applications.

Elmar



Re: [firebird-support] Reviving an old firebird database (file conversion/programming hints)

2016-10-13 Thread Elmar Haneke el...@haneke.de [firebird-support]

> 1)
> I assume on LInux (Debian based Mint version and an Ubuntu flavor) I
> install a variant of the server (in the repository I find the 2.5
> variants, but I'd be also happy installing a downloaded 3.0 instead).
> Then I need a generic DB manager like e.g. Flamerobin to do general
> operations and basic DB editing. Or is it equally possible to do that in
> the terminal?
>
> Is that correct?

That's mostly correct. 64Bit Firebird might be unable to open old
database - I came to tha Problem with an FB 1.5 database moving to FB 2.5.

In that case you have to install either 32Bit package or an old package.

> 2)
> How can I determine the version of my existing database file? And how
> can I convert that to a current one in the expected case it isn't
> compatible with my current installation? There is only the .fdb file and
> no backup available.

Once accessible FlameRobin can tell you the version of datafile.

To convert to current database you have to create an backup and restore.


Elmar



Re: [firebird-support] How can I prevent that my database can be opened with another security.fdb.

2016-04-08 Thread Elmar Haneke el...@haneke.de [firebird-support]

> How can I prevent that my database can be opened with another
> security.fdb.

You can use database encryption for that purpose - without knowing the
encryption key there is no way to access database.

In FB3 there is a new plugin mechanism for encryption added you should
have a look ath that.

Elmar



Re: [firebird-support] 2 servers acessing one database

2015-12-16 Thread Elmar Haneke el...@haneke.de [firebird-support]

> Is it possible to use 2 pc’s with firebird installed, accessing a single
> database that resides in a shared storage area network (which is acessible
> to both servers)?

It cannot be done when both machines have to access database at the same
time.

If you make sure that only one machine has the database open at any time
it might work. There is an option to allow that - normally FB tries to
connect to database-server running on your fileserver. There also is an
clear warning next to that option that you might get problems doing so.

Elmar






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: {Disarmed} [firebird-support] Replicating MS Access DB

2015-12-04 Thread Elmar Haneke el...@haneke.de [firebird-support]

> So I was looking for the replacement and as it looks to me at the
> moment, I would pick LibreOffice Base as frontend, as I need to create
> forms and reports, and FirebirdSQL 3 as DB engine. (Any comments are
> welcome about my selection being good/bad).

Firebird 3 ist at RC1 state - is your project going productive before
FB3 is final?

> My biggest question is about replicating multi-user environment.
> Currently I have MS Access DB back-end with data on our shared network
> folder and all users have frontend with all forms, reports, queries,
> etc. Without any server component about 25 users can work on the
> database without big issues. Now, what is best way to replicate it
> with FirebirdSQL? I really like MS Access simplicity, as "simple"
> users can create this multiuser environment on their own, without need
> to ask IT administrators to be involved.

Peer-Networking is not an option with firebird. You should install an
server.

> What would be the easiest way to create this kind of setup, that would
> be easy deployable and stable for multiuser work. Would it be Classic
> server configuration?

You can use any server confguration, I would assume there is no great
difference for you using single-process "SuperServer" or multiprocess
"Classic" since Access-Peer-Networging was suffucient till now.

Elmar


[firebird-support] Uniqe-Problem

2015-04-16 Thread Elmar Haneke el...@haneke.de [firebird-support]
Hi,

i do have an problem with UNIQUE constraint on FB 2.5.2

Data is in an varchar having Charset win1252 and collation pxw_intl.
Insert is done using an prepared statement.

Writing Data

Amelie
Amélie

does raise an Unique-Error.

Just curious:
- Data comes from an Table having the same UNIQUE constraint
- When selecting with equality only one of the Variations is found.

Any Idea what's going wrong?

Elmar



Re: {Disarmed} [firebird-support] Firebird Embedded open database file on network share

2015-01-20 Thread Elmar Haneke el...@haneke.de [firebird-support]

 Is there a way to open a databse file on a network share with firebird
 embedded?

There is an Config-Option to allow that.

But besides performance degeneration you will get database-corruption
once the database is opened from multiple clients simultaneously.

For this reason opening remote files ist disabled by default.

Your should use an Server process instead or move the file to local disk.

Elmar



Re: {Disarmed} Re: [firebird-support] Forced write, page size and buffer size

2014-08-20 Thread Elmar Haneke el...@haneke.de [firebird-support]

Am 19.08.2014 um 18:30 schrieb 'Carlos H. Cantu' lis...@warmboot.com.br
[firebird-support]:
 Re: [firebird-support] Forced write, page size and buffer size The
 best thing would be if someone could simulate some crashes (like power
 failure) in both configurations and report back about existence of
 corruption.

Such an simulation does hardly cover all possible problems.

In general there was an statement about old interbase database which
should be up again shortly after an power fail in an tank-environment
caused by firing the gun. There is some chance that firebird can recover
after crash.

The Problem itself does arise from the order the physical writes are
done. If the OS (or even the disk) does reorder writes I would suspect
to generate problems.

You can simulate power-fail by using QEMU emulation and killing the
emulator.

Elmar









++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

* To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

* Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/