[firebird-support] Problem to create a real embedded connection, with Firebird 3.0.3

2019-04-05 Thread emou...@yahoo.fr [firebird-support]
Hello

I've written a Lazarus application (project1) under Ubuntu 18.04 with Firebird 
3.0 embedded (this is a development workstation, on which I installed a 
Firebird server).
It connects well from the IDE Lazarus (without Firebird server and without 
fbquard being loaded. But, 
/usr/lib/x86_64-linux-gnu/firebird/3.0/plugins/libEngine12.so is loaded). I'm 
glad: yippee.

Now, I plan to make a simple embedded installation package for a client.
So I put all the files that were supposed to be necessary next to my 
executable's directory (and others, out of concern), like this:

1°) I have put in the project directory, all the files (these are the files to 
deliver, and others just in case...) like this:

/home/.../dir_project_num1/
|-- database.fdb
|-- project1 (application)
|
|
|-- databases.conf
|-- fbintl.conf
|-- fbtrace.conf
|-- firebird.conf
|-- plugins.conf
|-- firebird.msg
|-- @libfbclient.so (symlink "soft" towards @libfbclient.so.2)
|-- @libfbclient.so.2 (symlink "soft" towards libfbclient.so.3.0.3)
|-- libfbclient.so.3.0.3 (true librairy)
|
└--/intl/
| |-- fbintl.conf
| |-- libfbintl.so
|•
|
└--/plugins/
| |-- libEngine12.so
| |-- libfbtrace.so
|•
|
•

2°) I've modified the file 
/home/guepard/SauveWinE_etc/a_projetsLaz/dir_project_num1/firebird.conf by 
adding:
- RootDirectory=/home/guepard/SauveWinE_etc/a_projetsLaz/dir_project_num1
- DatabaseAccess = Full
- ExternalFileAccess = Full
- UdfAccess = Full
- Providers = Engine12
- ServerMode = Classic

3°) I added environment variables to indicate where the Firebird libraries are 
(in my directory):
- FBLIB=/home/guepard/SauveWinE_etc/a_projectLaz/dir_project_num1
- FIREBIRD=/home/guepard/SauveWinE_etc/a_projectLaz/dir_project_num1
- 
LD_LIBRARY_PATH=/home/guepard/SauveWinE_etc/a_projectLaz/dir_project_num1:/home/guepard/SauveWinE_etc/a_projectLaz/dir_project_num1/plugins:/home/guepard/SauveWinE_etc/a_projectLaz/dir_project_num1/intl

4°) I've renamed the directory /usr/lib/x86_64-linux-gnu/firebird/3.0: I want 
to simulate a customer that has not installed a Firebird 3 server. So, I've 
renamed the directory /usr/lib/x86_64-linux-gnu/firebird/3.0/... to 
/usr/lib/x86_64-linux-gnu/firebird/6.0/... hoping to force to specifically load 
the libraries that are in my application's directory.

==> the connection refuses to be established at run-time :-( .

The application absolutely wants to use the following SOs:
- /usr/lib/x86_64-linu-gnu/firebird/3.0/plugins/libEngine12.so(??!)
- /usr/lib/x86_64-linu-gnu/firebird/3.0/plugins/libfbtrace.so(??!)
- /usr/lib/x86_64-linu-gnu/firebird/3.0/intl/libfbint.so   (??!)
- 
/home/guepard/SauveWinE_etc/a_projectLaz/dir_project_num1/libfbclient.so.3.0.3  
  ( :-D )
Why do global variables seem to be useless, since the connection doesn't want 
to load the indicated Firebird's "embedded" SOs, which are in my application's 
directory?
nb: I tried dynamically loading the SOs of my directory before opening the 
connection, But the connection refuses to be established whith those!!?

I would really appreciate some help.
Regards,
Eric

Re: [firebird-support] Ubuntu 18.04 Firebird 3.03 Server Connection String: Local Works, URL-Style Fails

2019-04-05 Thread LtColRDSChauhan rdsc1...@gmail.com [firebird-support]
On Fri, Apr 5, 2019 at 6:32 PM Rustam rusta...@ukr.net [firebird-support] <
firebird-support@yahoogroups.com> wrote:

>
>
> Check your FB client library. May be you are using 'embed' version
> ('fbembed' instead of 'fbclient', or 'fbembed' renamed to 'fbclient')
>

1. Edit the config file as under :
Providers = Remote,Loopback

2. Still issue persists.


> 
>


[firebird-support] Re: Is this a normal behaviour for GTT?

2019-04-05 Thread hv...@users.sourceforge.net [firebird-support]
> I've created and issue in Firebird's bug tracker. Now we arewaiting for a 
> response from the devs.
 

 Thank you, I answered there.
 

 Regards,
 Vlad



[firebird-support] Ubuntu 18.04 Firebird 3.03 Server Connection String: Local Works, URL-Style Fails

2019-04-05 Thread Rustam rusta...@ukr.net [firebird-support]
Check your FB client library. May be you are using 'embed' version ('fbembed' 
instead of 'fbclient', or 'fbembed' renamed to 'fbclient')


Re: [firebird-support] Ubuntu 18.04 Firebird 3.03 Server Connection String: Local Works, URL-Style Fails

2019-04-05 Thread LtColRDSChauhan rdsc1...@gmail.com [firebird-support]
On Fri, Apr 5, 2019 at 4:49 PM Mark Rotteveel m...@lawinegevaar.nl
[firebird-support]  wrote:

>
>
> On 2019-04-05 12:22, LtColRDSChauhan rdsc1...@gmail.com
> [firebird-support] wrote:
> > Hello,
> >
> > 1. The following connection string works:
> >
> > /home/ubuntu_user/Documents/Sample.FDB
> >
> > 2. While following connection strings fails:
> > Ubuntu_Machine:/home/ubuntu_user/Documents/Sample.FDB
> >
> > localhost:/home/ubuntu_user/Documents/Sample.FDB
> >
> > 127.0.0.1:/home/ubuntu_user/Documents/Sample.FDB
>
> Given the config used for RemoteBindAddress, the URL with Ubuntu_Machine
> is unlikely to work (unless it resolves to 127.0.0.1, which isn't
> common), localhost could potentially not work if it resolves to IPv6 ::1
> instead of IPv4 127.0.0.1.
>
1. The host file:

127.0.0.1 localhost
127.0.0.1 Ubuntu_Machine

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
192.168.0.4 WindowClientPC


> The last one should work **if** Firebird is
> up and running, and **if** the Firebird server process has read/write
> access to the database file in your home directory (and to be clear
> giving server processes read/write access to the home directory of
> another user is not a good idea). You should put the database in a
> location that is accessible to the Firebird server process.
>
2. The service is up and running. I am trying to connect to the same
database with both the strings. While the local connection string allows
update commit records, the URL-Style connection does not connect.

>
> > 3. The message (through FlameRobin) :
> >
> > Unsuccessful execution caused by unavailable resource.
> > Engine Code: 335544375
> > Engine Message:
> > Unavailable database
> >
> > 4. My config file is as under:
> >
> > DatabaseAccess = Full
> >
> > Providers = Remote,Engine12,Loopback
> >
> > RemoteAccess = true
> >
> > RemoteBindAddress = 127.0.0.1
> >
> > RemoteServiceName = gds_db
> >
> > RemoteServicePort = 3050
> >
> > ServerMode = Super
> >
> > UdfAccess = None
> 
>


RE: [firebird-support] Transactions

2019-04-05 Thread 'Paul Beach' pbe...@mail.ibphoenix.com [firebird-support]
Kevin,

You might want to read this...
https://www.ibphoenix.com/resources/documents/search/doc_67

Regards
Paul


-Original Message-
From: firebird-support@yahoogroups.com 
[mailto:firebird-supp...@yahoogroups..com]
Sent: 03 April 2019 06:37
To: Firebird Support
Subject: [firebird-support] Transactions


  
Greetings,

I’m sure this has been asked before - is there a knowledge base somewhere?

I’m trying to get a handle on transactions from gstat and I just want to make 
sure I’m reading this correctly. One of my installs is having some issues, 
Firebird 1.56, Classic Server. I have been reading Helen’s book, Chapter 25 - 
Overview of Transactions.

My app (a large one) is written in Delphi, using Devart’s IBDAC components.

Also, my end users tend to End Task on my app if a report doesn’t pop up 
immediately. I’ve tried to educate them. So with Classic (or Superserver I’m 
guessing) when the user kills a client app, I’m assuming it leaves not only a 
connection to the database active (as seen in Task Manager on the server) but 
also potentially one or more transactions active.

It appears from the book that I should be concerned with the gap between the 
OIT and the OAT and making sure they both move ahead. So from the gstat figures 
below, my app needs a bunch of improvements in transaction handling which I’m 
diving into as we speak.

4/1/2019 - before backup / restore
Oldest transaction 1388 (OIT)
Oldest active 812976 (OAT)
Oldest snapshot 811580
Next transaction 905141
Note: Performance was horrible on this day and usually is the first day of the 
month.

4/1/2109 - after backup / restore:
Oldest transaction 1294
Oldest active 1295
Oldest snapshot 1295
Next transaction 1298
Note: This looks perfect to me.

4/2/2019 - around mid-day:
Oldest transaction 1297
Oldest active 1298
Oldest snapshot 1295
Next transaction 56071
Note: Not good. OIT and OAT not moving forward.

4/2/2019 - around end of day:
Oldest transaction 1297
Oldest active 1298
Oldest snapshot 1295
Next transaction 91583
Note: Even worse. OIT and OAT not moving forward.

4/2/2019 - after backup and sweep:
Oldest transaction 1626
Oldest active 91623
Oldest snapshot 91623
Next transaction 91631
Question: I would’ve thought performing a sweep would’ve not only done garbage 
collection but also dealt with rolled-back transactions and remove “stumps” of 
deleted records (from the book) increasing the OIT.

4/2/2019 - after a 2nd sweep:
Oldest transaction 91631
Oldest active 91623
Oldest snapshot 91623
Next transaction 91632
Note: Now this is interesting. This looks pretty perfect to me. 
Questions: Why didn’t the first sweep give me this kind of result? And should I 
schedule two sweeps every night? 

Thanks in advance for any help here!

Best Regards,
Kevin

Some more background:

Batch file that does backup / sweep every night:

del "e:\fb databases\lumber\lumber_bu.log"
gbak -b -user SYSDBA -password masterkey "127.0.0.1:e:\fb 
databases\lumber\lumber.fdb" "e:\fb databases\lumber\lumber.fbk" -v -y "e:\fb 
databases\lumber\lumber_bu.log"
gfix -sweep -user sysdba -password masterkey "127.0.0.1:e:\fb 
databases\lumber\lumber.fdb"

Sweep batch file I run interactively:
e:
cd "e:\program files (x86)\firebird15\bin\"
gfix -sweep -user sysdba -password masterkey "127.0.0.1:e:\fb 
databases\lumber\lumber.fdb"
pause

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






[firebird-support] Re: Is this a normal behaviour for GTT?

2019-04-05 Thread m.djo...@gmail.com [firebird-support]
I've created and issue in Firebird's bug tracker. Now we arewaiting for a 
response from the devs.

[firebird-support] Re: Is this a normal behaviour for GTT?

2019-04-05 Thread m.djo...@gmail.com [firebird-support]
Yes both COMMIT RETAINING and ROLLBACK RETAINING are not freeing the space.
 I'll report it in the bug track system.



Re: [firebird-support] Ubuntu 18.04 Firebird 3.03 Server Connection String: Local Works, URL-Style Fails

2019-04-05 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 2019-04-05 12:22, LtColRDSChauhan rdsc1...@gmail.com 
[firebird-support] wrote:
> Hello,
> 
> 1. The following connection string works:
> 
> /home/ubuntu_user/Documents/Sample.FDB
> 
> 2. While following connection strings fails:
> Ubuntu_Machine:/home/ubuntu_user/Documents/Sample.FDB
> 
> localhost:/home/ubuntu_user/Documents/Sample.FDB
> 
> 127.0.0.1:/home/ubuntu_user/Documents/Sample.FDB

Given the config used for RemoteBindAddress, the URL with Ubuntu_Machine 
is unlikely to work (unless it resolves to 127.0.0.1, which isn't 
common), localhost could potentially not work if it resolves to IPv6 ::1 
instead of IPv4 127.0.0.1. The last one should work **if** Firebird is 
up and running, and **if** the Firebird server process has read/write 
access to the database file in your home directory (and to be clear 
giving server processes read/write access to the home directory of 
another user is not a good idea). You should put the database in a 
location that is accessible to the Firebird server process.

> 3. The message (through FlameRobin) :
> 
> Unsuccessful execution caused by unavailable resource.
> Engine Code: 335544375
> Engine Message:
> Unavailable database
> 
> 4.  My config file is as under:
> 
>   DatabaseAccess = Full
> 
>   Providers = Remote,Engine12,Loopback
> 
>   RemoteAccess = true
> 
>   RemoteBindAddress = 127.0.0.1
> 
>   RemoteServiceName = gds_db
> 
>   RemoteServicePort = 3050
> 
>   ServerMode = Super
> 
>   UdfAccess = None


Re: [firebird-support] Ubuntu 18.04 Firebird 3.03 Server Connection String: Local Works, URL-Style Fails

2019-04-05 Thread LtColRDSChauhan rdsc1...@gmail.com [firebird-support]
On Fri, Apr 5, 2019 at 4:00 PM Dimitry Sibiryakov s...@ibphoenix.com
[firebird-support]  wrote:

> 05.04.2019 12:22, LtColRDSChauhan rdsc1...@gmail.com [firebird-support]
> wrote:
> > 2. While following connection strings fails:
> > Ubuntu_Machine:/home/ubuntu_user/Documents/Sample.FDB
> > localhost:/home/ubuntu_user/Documents/Sample.FDB
> > 127.0.0.1:/home/ubuntu_user/Documents/Sample.FDB
>
>It looks like Firebird server is not started.
>

1. The terminal 'service firebird3.0 status' command responds as under:

 firebird3.0.service - Firebird Database Server ( SuperServer )
   Loaded: loaded (/lib/systemd/system/firebird3.0.service; enabled; vendor
preset: enabled)
   Active: active (running) since Fri 2019-04-05 16:18:13 IST; 2min 31s ago
  Process: 777 ExecStart=/usr/sbin/fbguard -pidfile
/run/firebird3.0/default.pid -daemon -forever (code=exited,
status=0/SUCCESS)
 Main PID: 812 (fbguard)
Tasks: 4 (limit: 4915)
   CGroup: /system.slice/firebird3.0.service
   ├─812 /usr/sbin/fbguard -pidfile /run/firebird3.0/default.pid
-daemon -forever
   └─851 /usr/sbin/firebird

Apr 05 16:18:11 NANNUSVR systemd[1]: Starting Firebird Database Server (
SuperServer )...
Apr 05 16:18:13 NANNUSVR systemd[1]: Started Firebird Database Server (
SuperServer ).

2. Now tested the local connection string, it worked.

3. Immediately followed up the URL-Style connection string, it failed.


> --
>WBR, SD.
>
>
> 
>
> 
>
> ++
>
> 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
>
>
>
>


Re: [firebird-support] Ubuntu 18.04 Firebird 3.03 Server Connection String: Local Works, URL-Style Fails

2019-04-05 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
05.04.2019 12:22, LtColRDSChauhan rdsc1...@gmail.com [firebird-support] wrote:
> 2. While following connection strings fails:
> Ubuntu_Machine:/home/ubuntu_user/Documents/Sample.FDB
> localhost:/home/ubuntu_user/Documents/Sample.FDB
> 127.0.0.1:/home/ubuntu_user/Documents/Sample.FDB

   It looks like Firebird server is not started.

-- 
   WBR, SD.






++

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/



[firebird-support] Ubuntu 18.04 Firebird 3.03 Server Connection String: Local Works, URL-Style Fails

2019-04-05 Thread LtColRDSChauhan rdsc1...@gmail.com [firebird-support]
Hello,

1. The following connection string works:
/home/ubuntu_user/Documents/Sample.FDB

2. While following connection strings fails:
Ubuntu_Machine:/home/ubuntu_user/Documents/Sample.FDB
localhost:/home/ubuntu_user/Documents/Sample.FDB
127.0.0.1:/home/ubuntu_user/Documents/Sample.FDB

3. The message (through FlameRobin) :
Unsuccessful execution caused by unavailable resource.
Engine Code: 335544375
Engine Message:
Unavailable database

4.  My config file is as under:

DatabaseAccess = Full
Providers = Remote,Engine12,Loopback
RemoteAccess = true
RemoteBindAddress = 127.0.0.1
RemoteServiceName = gds_db
RemoteServicePort = 3050
ServerMode = Super
UdfAccess = None

Please help.
Regards,
Rajiv


[firebird-support] Re: Is this a normal behaviour for GTT?

2019-04-05 Thread hv...@users.sourceforge.net [firebird-support]
---In firebird-support@yahoogroups.com,  wrote :
 
 > What happens with the records in GTT if transactions do commit retaining? 
 > Are the records deleted or they are stiil present until the transaction 
 > finished with commit/rollback ?
 

   Looks like you found bug in GTT's implementation: data of GTT ON COMMIT 
DELETE table

 instance is not released and is not visible after COMMIT RETAINING. 

 

 Could you register it at tracker, plese ?

 

 Regards,
 Vlad





[firebird-support] Re: Is this a normal behaviour for GTT?

2019-04-05 Thread m.djo...@gmail.com [firebird-support]
We use only on commit delete rows. 

 What happens with the records in GTT if transactions do commit retaining? Are 
the records deleted or they are stiil present until the transaction finished 
with commit/rollback ?