Re: [firebird-support] Backup Firebird 3.0.2 database using Service Manager

2017-10-09 Thread pierr...@gmail.com [firebird-support]
Will you believe me I I tell you I Read Quite Every Fucking 
[Manual/ReleaseNotes/ReadmeInDocFolder/Code] before asking ?
 

 I already clicked the "Send" button while I remembered having read that line 
some minutes ago :
 

 https://github.com/FirebirdSQL/firebird/blob/master/src/burp/burp.cpp#L297 
https://github.com/FirebirdSQL/firebird/blob/master/src/burp/burp.cpp#L297



[firebird-support] Re: Backup Firebird 3.0.2 database using Service Manager

2017-10-09 Thread pierr...@gmail.com [firebird-support]
Got it !
 

 Both my fbsvcmgr command and TUIBBackup miss the new "isc_spb_expected_db" spb 
in isc_service_attach()

 

 C:\>fbsvcmgr localhost:service_mgr -user DBOWNER -password ownerpasswd 
-expected_db config -action_backup -dbname config -bkp_file 
c:\programdata\prycorp\temp\config.fbk
 

 (Note that fbsvcmgr params order is signifiant : params before "action_*" one 
are forwarded to isc_service_attach while subsequent params are provided to 
isc_service_query())

 

 I'll push corresponding changes to the UIB repository.
 

 Hope this helps :)
 

 -- 
Pierre Yager
Crisalid



Re: [firebird-support] Backup Firebird 3.0.2 database using Service Manager

2017-10-09 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
09.10.2017 16:08, pierr...@gmail.com [firebird-support] wrote:
> If I try to use a remote connection to service_mgr

   RTFM -expected_db.


-- 
   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] Backup Firebird 3.0.2 database using Service Manager

2017-10-09 Thread pierr...@gmail.com [firebird-support]
Hi there,
 

 I'm desperately trying to backup a Firebird 3.0.2 database using UIB 
TUIBackup. My database is configured as this in databases.conf

 

 # security.db = $(dir_secDb)/security3.fdb
# {
#   RemoteAccess = false
#   DefaultDbCachePages = 50
# }

#
# My Databases
#
config = C:/ProgramData/PrYCorp/config.fdb
{
  SecurityDatabase = config
}
 

 I access this database using a TCPIP connection with this connection string : 
inet4://localhost/config
 

 I want to perform a database backup using UIB/TUIBackup. As I can't find a way 
to perform this backup I'm debugging SPB creation using fbsvcmgr :
 

 The only combination that works is :
 

 C:\>fbsvcmgr service_mgr -user DBOWNER -password ownerpasswd -action_backup 
-dbname config -bkp_file c:\programdata\prycorp\temp\config.fbk
 

 But that do not work when my application is connected to the database, I get 
this error :
 

 I/O error during "CreateFile (open)" operation for file "config"
-Error while trying to open file
-The process can not access this file because it is used by another process.
-Exiting before completion due to errors
 

 If I try to use a remote connection to service_mgr :
 

 C:\>fbsvcmgr localhost:service_mgr -user DBOWNER -password ownerpasswd 
-action_backup -dbname config -bkp_file c:\programdata\prycorp\temp\config.fbk
Error occurred during login, please check server firebird.log for details
 

 This is the error in Firebird.log :
 

 PIERRE-VMMon Oct 09 15:58:59 2017
Authentication error
I/O error during "CreateFile (open)" operation for file "C:\PROGRAM FILES 
(X86)\FIREBIRD30\SECURITY3.FDB"
Error while trying to open file
Le fichier spécifié est introuvable. 

 

 I do not deploy security3.fdb as it's not needed for normal database operation.
 

 Same with :
 

 C:\>fbsvcmgr localhost:service_mgr -user DBOWNER -password ownerpasswd 
-action_backup -dbname inet4://localhost/config -bkp_file 
c:\programdata\prycorp\temp\config.fbk
Error occurred during login, please check server firebird.log for details

C:\>fbsvcmgr service_mgr -user DBOWNER -password ownerpasswd -action_backup 
-dbname inet4://localhost/config -bkp_file 
c:\programdata\prycorp\temp\config.fbk
unavailable database
-Exiting before completion due to errors
 

 This switch combinations works with gbak (while the database is occupied by my 
application) :
 

 C:\> gbak -b -se localhost:service_mgr -user DBOWNER -password ownerpasswd 
config c:\programdata\prycorp\temp\config.fbk
 

 Question is : how to replicate this very last gbak command using either 
fbsvcmgr or the Firebird service API ?
 

 Many thanks for your help, regards,
 

 -- 
Pierre Yager
 Crisalid

 



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

2017-10-09 Thread 'Paul Beach' pbe...@mail.ibphoenix.com [firebird-support]

<>

Simply put.

As long as the database on the NFS mount cannot be accessed by another Firebird 
server
on another system then you can use this "feature" (RemoteFileOpenAbility).

Regards
Paul



Re: [firebird-support] detect if database has changed

2017-10-09 Thread liviuslivius liviusliv...@poczta.onet.pl [firebird-support]
Hi,
You can also look at sample at
http://itstop.pl/pl-pl/porady/Firebird/FAQ1/czas-ostatniej-modyfikacji-tabeli
It is in PL lang but triggers are fully descriptive. I prefer generator based 
approach

Regards,Karol Bieniaszewski
null

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: [firebird-support] detect if database has changed

2017-10-09 Thread Alexey Kovyazin a...@ib-aid.com [firebird-support]

Hi,

Look at System Audit feature.

Regards,
Alexey Kovyazin
IBSurgeon HQbird
www.ib-aid.com

On 09.10.2017 2:49, Hamish Moffatt ham...@risingsoftware.com 
[firebird-support] wrote:


Is there an official way to detect if a database has changed?

I have some expensive reports and backups to run, but if I know that the
database has not changed since I last ran them I can skip those.

fbstat (gstat) shows the next transaction number, but that changes even
when only read-only transactions have run.

Currently I am looking at the timestamp of the .fdb file, which also
changes when only read-only transactions run.

I would like to know if the data or schema actually changed, not just a
transaction has run that didn't change anything.

Thanks

Hamish