Re: ODP: [firebird-support] Using Union and Join (of two tables residing in different databases)in a Query

2018-09-14 Thread 'Stellarancia.com' ni...@stellarancia.com [firebird-support]
He,

I'm agree with you: all tables in a unique firebird file is the best choice.

My problem is that I've numerous programs that utilize one firebird file 
each.

There are tables that are drawn for a specific program, but there are 
some tables that are "common" to all programs (example: 
"municipalities").  An user can utilize one program, two programs, four 
programs, and so on, on the same computer and each program hav its 
database.fdb: if I must vary a value of one "common tables", I must send 
an update for every program and to each user; but if the "common tables" 
are in a unique, separate database, I can update one file only.

There are also "static" tables containing storical movements, and is not 
necessary periodically to back-up them.

These are the reasons that push me to look for a solution, I hope to 
have been clear.

For release 2.5 and not 3.o, I have been studyng Firebird for some 
months, and I've not experience: I now plan the job to develop, later I 
will verify the new releases.

Best regards

Antonio BIANCA




Il 12/09/2018 23:42, Karol Bieniaszewski liviusliv...@poczta.onet.pl 
[firebird-support] ha scritto:
>
> Hi,
>
>  1. Why not single Firebird database with all tables?
>  2. Why not recent Firebird which is FB3 not FB2.5?
>
> Pozdrawiam,
>
> Karol Bieniaszewski
>
> 


---
Questa e-mail è stata controllata per individuare virus con Avast antivirus.
https://www.avast.com/antivirus



Re: [firebird-support] Two aliases pointing to the same file

2018-09-14 Thread Aldo Caruso aldo.car...@argencasas.com [firebird-support]

Thanks !


El 14/09/18 a las 06:11, Mark Rotteveel m...@lawinegevaar.nl 
[firebird-support] escribió:


On 13-9-2018 22:42, Aldo Caruso aldo.car...@argencasas.com
[firebird-support] wrote:
> Hello,
>
>     Is there any issue having two aliases pointing to the same physical
> file ?
>
> Example:
>
> old_alias = /var/lib/firebird/2.5/data/mydb.fdb
>
> new_alias = /var/lib/firebird/2.5/data/mydb.fdb
>
>     Some clients connect using the "old_alias", while others 
"new_alias".


There should be no issues with recent versions of Firebird, but I seem
to vaguely recall issues in Firebird 2.1 or earlier, but that might also
have been something with differences in case of filenames.

IIRC, the engine resolves the alias to the filename, and then it is as
if you specified that filename.

Mark
--
Mark Rotteveel






Re: [firebird-support] Using Union and Join (of two tables residing in different databases) in a Query

2018-09-14 Thread 'Stellarancia.com' ni...@stellarancia.com [firebird-support]
Dear Svein,

the problem is not the greatness of the database, but its 
administration: the problem borns for a few tables that are utilized by 
others tables (master/detail), and for many records passed to "storical" 
(these movements become static). These tables don't have need to 
periodically be saved.

I menage 11 softwares that utilize 11 different databases.fdb (each 
database have different tables). The consumer can utilize one software, 
four software, etc.  on the same computer.

If I replicate this few tables in all databases, every maintenance for a 
single common table must be done in every database. If I put these few 
tables in a single database (e.g. Common.fdb), these few table are in a 
single, unique file, then...

I am agree with you: the most obvious and elegant solution is to put all 
the tables in a unique database. But I will try to create two separate 
query, each connected to separate database.fdb, then create a relation, 
for example a lookup master/detail via OnCalcFields. It is not the same 
thing of a JOIN, still less than a UNION, but I'll try in some manner.

I'm using BDE from 22 years (very ok, but obsolete), but with Win10 it 
is not possible to use it;  now, from two months I'm using Firebird and 
I don't have great experience yet.

Thanks anyway.

Antonio BIANCA




Il 13/09/2018 10:46, Svein Erling Tysvær setys...@gmail.com 
[firebird-support] ha scritto:
> dBase supported tables, and databases was not a separate concept. 
> Firebird also supports tables, but as a very different concept from 
> databases. A Firebird database can contain about 32000 tables and 
> joining tables within a database is easypeasy. Although possible 
> (through EXECUTE STATEMENT... ON EXTERNAL DATA SOURCE...), it does 
> make things a lot more difficult if you have to do things across 
> databases.
>
> If you've been asked to transfer 967 tables to Firebird, the normal 
> and simple solution would be to have one database containing all 967 
> tables, not a lot of different databases that should be joined to each 
> other. If you can separate things that doesn't talk to each other, 
> then you can split into several databases, but probably a few 
> databases, not 967. If there are a few tables that are common lookup 
> tables, you could consider having one master database with these and 
> then copy/replicate the tables to other databases (I would assume 
> zipcodes and municipalities to be rather static, so these are good 
> candidates for having a master in a separate database, but then 
> copy/replicate these tables to all databases that uses them).
>
> You may of course have good reasons for importing these .dbx tables 
> into databases of their own (e.g. if there are some kind of strange 
> legal requirements), but I'd say that is a decision that you should 
> only take after carefully considering alternatives.
>
> HTH,
> Set
>
> Den ons. 12. sep. 2018 kl. 22:05 skrev 'Stellarancia.com' 
> ni...@stellarancia.com  
> [firebird-support]  >:
>
> I'm transferring many tables (967) from single BDE .DBF files (old
> driver DbIV) to Firebird 2.5.
>
> I utilize Delphi 7 as environment and ZEOS components to Firebird
> connections: the work is enough easy.
>
> A large number of old queries contain UNIONS and JOINS of tables (->
> single files .DBF), but now the old .DBF tables are transferred in
> different Firebird Databases. For example, with the two tables
> Municipalities.Dbf and ZipCodes.Dbf, I can write with BDE a query
> "SELECT * FROM MUNICIPALITIES.DBF a INNER JOIN ZIPCODES.DBF b ON
> ()...
> WHERE..."; now the first table is in WorkCom.fdb database, and the
> second table is in the TabCom.fbd database: how to join to day
> the  tho
> tables? My program utilizes this queries and I would want  to find
> solutions that give a fast result as BDE.
>
> I know that is not possible for Firebird to join tables that
> "resides"
> in different databases (.fdb), but I must find a solution as
> elegant as
> possible to join the same FB tables previously joined with .DBF files.
>
> Do you have any suggestion as to how to solve this problem?
>
> Thanks in advance.
>
>
> ---
> Questa e-mail è stata controllata per individuare virus con Avast
> antivirus.
> https://www.avast.com/antivirus
>
>
>
> 
>
> 
>
> ++
>
> 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/
>
> ++
> 
>
>   

RE: [firebird-support] Re: Transaction access mode (read only vs. read write) from context?

2018-09-14 Thread Omacht András aoma...@mve.hu [firebird-support]
Hi Vlad!

Thank you!

Is it possible to backport this items to 2.5.9?

András

From: firebird-support@yahoogroups.com 
Sent: Wednesday, September 12, 2018 6:13 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Re: Transaction access mode (read only vs. read 
write) from context?



> According to the documentation 
> (https://firebirdsql.org/refdocs/langrefupd20-get-context.html) I can retrive 
> the transaction’s isolation level:

> select rdb$get_context('SYSTEM', 'ISOLATION_LEVEL') from rdb$database

>

> But I need to know the access mode too. Is this possible somehow to know it 
> via contexts?



Firebird3 supports following transaction-related items in 'SYSTEM' namespace:



"TRANSACTION_ID", "ISOLATION_LEVEL", "LOCK_TIMEOUT", "READ_ONLY"



Regards,

Vlad







[Non-text portions of this message have been removed]



Re: [firebird-support] GBAK and NBAK restore

2018-09-14 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 13-9-2018 23:05, hugo.lar...@yahoo.com [firebird-support] wrote:
> 
> 
>> Do you mean you increase the back up level continuously?
> 
> Yes
> My strategy is:
> Level 0 once.
> Increment level continuously every third Day.
> 
> Works fine most of the times. Sometimes I get mysteriously the following 
> error even though my logs tell that the order is right. I suspect there 
> might be an old bug in NBAK in version i'm using 2.5.3.26778
> 
> Invalid level 6 of incremental backup file: 
> /home/firebird/store_fdb/2058/unzip_nbak/N0006_201807
> 29_1000.nbk, expected 1 [SQLState:HY000, ISC error code:335544382]
> 
> Whe n this happen I just step back one level.
> 
> NBAK backup is done with Jaybird.
> 
> It would be really cool if N backups can be reused when we migrate to FB4.

That is not possible given the ODS change between FB3 and FB4.

Mark
-- 
Mark Rotteveel


Re: [firebird-support] GBAK and NBAK restore

2018-09-14 Thread hugo.lar...@yahoo.com [firebird-support]
Hi,

Unfortunately 2.5 does not have replication.
I'm desperately waiting for FB4.

Thx,

Re: [firebird-support] Two aliases pointing to the same file

2018-09-14 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 13-9-2018 22:42, Aldo Caruso aldo.car...@argencasas.com 
[firebird-support] wrote:
> Hello,
> 
>       Is there any issue having two aliases pointing to the same physical
> file ?
> 
> Example:
> 
> old_alias = /var/lib/firebird/2.5/data/mydb.fdb
> 
> new_alias = /var/lib/firebird/2.5/data/mydb.fdb
> 
>       Some clients connect using the "old_alias", while others "new_alias".

There should be no issues with recent versions of Firebird, but I seem 
to vaguely recall issues in Firebird 2.1 or earlier, but that might also 
have been something with differences in case of filenames.

IIRC, the engine resolves the alias to the filename, and then it is as 
if you specified that filename.

Mark
-- 
Mark Rotteveel


Re: [firebird-support] Two aliases pointing to the same file

2018-09-14 Thread Aldo Caruso aldo.car...@argencasas.com [firebird-support]

Thanks for your answer.

I'm renaming aliases for code refactoring purposes, so during some 
transitional time some scripts and programs will be accessing via the 
old alias while others via the new one.


I only wanted to know if under that situation the server still realizes 
that they both types of connections point to the same database and there 
will be no problems with locks, transactions, etc.


Regards,

Aldo


El 14/09/18 a las 02:44, Norman Dunbar nor...@dunbar-it.co.uk 
[firebird-support] escribió:


I've been doing that for years! I have, for example, an alias 
'employee' and another 'employee.fdb' - if I remember correctly, it 
was originally used as an example when the aliases file was installed 
- many years ago. I just followed suit.



Cheers,
Norm.
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.






ODP: [firebird-support] Using Union and Join (of two tables residing in different databases)in a Query

2018-09-14 Thread Karol Bieniaszewski liviusliv...@poczta.onet.pl [firebird-support]
Hi,

1. Why not single Firebird database with all tables?
2. Why not recent Firebird which is FB3 not FB2.5?

Pozdrawiam,
Karol Bieniaszewski


Re: [firebird-support] Firebird 3.0 installation not allowing database access with strange errors-HELP!

2018-09-14 Thread Chuck Belanger phytot...@lanset.com [firebird-support]
For those who may be interested:

After much work and exploration, it turns out that FreeUDFLib.dll 
requires gds32.dll installed into System32 folder. Turns out the pas 
files reference some Delphi Interbase pas files.

In my previous installations installing gds32.dll was the default, but 
not in recent installations, thus the inconsistencies from system to system.

Chuck


On 9/1/2018 1:06 PM, Chuck Belanger phytot...@lanset.com 
[firebird-support] wrote:
> Hi, Mark:
>
> Thank you for your reply.
>
> The issue is that I am well aware (by now!) of these more common issues
> that could cause this.
>
> I realize that that "Internal consistency check" suggests a corrupt DB.
> But as I said, by simply moving the database (which btw was created by
> backing up under FB2.5 and then restoring it with FB3.0). So, the DB is
> not a copy per se.
>
> But, as I reported, method of access does in fact make a difference. And
> I am hoping that that is a clue about what is really going on.
>
> Embedded works
>
> Putting FBclient.dll in the app directory works.
>
> As well as Local, Loop and Remote
>
> Local, Default does not and gives that error. I strongly suspect the
> error is not really indicative of what is going on; just means that
> SOMETHING is wrong.
>
> I can copy the DB fie back to my development system where everything
> works fine and there is no error. Likewise, copying a perfectly good DB
> from my development system to one of these laptops and I get that error.
>
> Regarding UDF access: I have checked and triple checked all conf
> settings, and like I said the dll works fine on my development system,
> but not the VPS and now not these other 2 laptops. I am using FB 32 bit,
> not 64 bit, so bitedness (?) is not the issue.
>
> I suspect that the error for the udf would occur if Firebird cannot find
> the file, the file is absent or there is something preventing firebird
> from reading the file. As I said in my previous post, ALL udf libraries
> are affected, including the ones that come with FB.
>
> To me the big clue is that everything is working fine on my development
> system. So what's up with that? Assuming all systems have the same basic
> installation and configuration (they do) then either something is
> missing or something extra is there which affects the UDF access, and
> perhaps related to this Local Default access error.
>
> BTW, I tried using embedded with the UDF directory below the location of
> FBClient.dll and that had the same issue.
>
> Getting to your last line, and that does sound like what I am talking
> about. I can try adding the FB2.5 support dlls. Now that I think about
> it, what I did on my development system is simply stop the FB2.5 service
> and then install FB3.0. All the FB2.5 stuff is still there, although I
> am unclear how FB3.0 would properly manage accessing those DLLs.
> Although, this doesn't explain the udf libraries not working that come
> with FB3.0. On these other systems, either they never had FB2.5 or I
> uninstalled it, first.
>
> I will try these things and if you have any further ideas, I would love
> to hear them. Will report back.
>
> Thank you, again,
>
> Chuck
>
>
> On 9/1/2018 4:36 AM, Mark Rotteveel m...@lawinegevaar.nl
> [firebird-support] wrote:
>> On 1-9-2018 12:59, Chuck Belanger phytot...@lanset.com
>> [firebird-support] wrote:
>>
>>> There are so many issues here that I am confused about how to present
>>> this. If any one has some ideas and needs more information, I will do
>>> what I can to give it to you.
>>>
>>> Systems: all Win10, 2 are 64 bit, one 32 bit.
>> [..]
>>
>>> In testing the installer on two other laptops, after running the
>>> installer, the application will not load, giving me a simple error that
>>> the database cannot be connected to. When trying from within IBExpert,
>>> I get:
>>>
>>> *"Internal consistency check (cannot find tip page (165), file: tra.cpp
>>> line: 2323"*
>>>
>>> Googling did not help much with telling me how to resolve this.
>>> **
>> The error indicates that likely your database is corrupt. It expects to
>> read a TIP (Transaction Inventory Page), but can't find it.
>>
>>> This is with Local, Default protocol and I am pointing to the FB3
>>> directory for fbclient.dll.
>> This error should happen irrespective of method of access.
>>
>>> This happens for both systems.
>>>
>>> Since I use a program to do the DB conversion from FB 2.5 structure to
>>> FB 3.0 structure. I swapped out the DBs and copied over DBs from the
>>> development system on which they worked fine. Again, the same error.
>>> Likewise, I took the converted DBs and moved to my development system
>>> and they opened without error.
>>>
>>> QED: I don't think this is a DB file issue, but a Firebird 3.0
>>> installation/system error or difference. What do you think?
>> What happens if you backup and restore to move the database instead of
>> copying the database file?
>>
>>> On the laptops, if I set the protocol to Local, Loopbak,