[firebird-support] GSEA / Admin
If I execute GSEC, then issue: modify USERNAME -admin yes [no response] Display USERNAME admin is not switched on If, on the other hand, I execute, at the command prompt: gsec -user SYSDBA -password masterkey -mo USERNAME -admin yes [no response] display USERNAME admin is now switched on Is this intended behaviour? Why doesn't it respond from the gsec command prompt? Regards Alan McDonald
[firebird-support] Re: Backups and the Delta File
Thanks for responding so quickly. I'm working with a framework set up by someone else which is obviously not behaving well. If I do a gbak I assume that takes the delta into account as well (it seems to). If I then restore from the gbak, should I delete the delta? (the database is offline for all intents and purposes when this process is done). Thanks
Re: [firebird-support] Backups and the Delta File
russ...@smxi.com [firebird-support] skrev: We have a large database that runs a full nbackup every night and an hourly incremental backup. Is the full backup meant to clear the delta file? this doesn't seem to get any smaller. Also if I restore a gbak backup, what should I do with the delta file? If you have an active delta file, you have the database in nbackup locked state, either because an nbackup operation terminated abnormally, or you manually locked the database and neglected to unlock it. The delta file is always merged into the live database immediately upon unlock. On restore, there should be no delta file involved at all. There can be multiple nabckups, one for each level you've backed up, but that's a different thing. Regards, Kjell
Re: [firebird-support] Re: BLOB
The fbsvcmgr method requires fb 2.5.2. The upside is you can run it remotely :) 2014-10-14 10:01 GMT+03:00 'Marius Labuschagne' mjlabuscha...@turnkey-is.co.za [firebird-support] < firebird-support@yahoogroups.com>: > > > From: firebird-support@yahoogroups.com [mailto: > firebird-support@yahoogroups.com] > Sent: 14 October 2014 08:33 AM > To: firebird-support@yahoogroups.com > Subject: [firebird-support] Re: BLOB > > I ran some tests : > > A. > > "D:\Program Files (x86)\Firebird\Firebird_2_5\bin\gbak.exe" -b -g -v > -service xx.xx.xx.14:service_mgr -user sysdba -password masterkey > e:\fdb\gestoc_asolo.fdb gestoc_asolo.fbk > > B. > > "D:\Program Files (x86)\Firebird\Firebird_2_5\bin\fbsvcmgr.exe" > xx.xx.xx.14:service_mgr -user sysdba -password masterkey action_backup > -dbname e:\fdb\gestoc_asolo.FDB -bkp_file gestoc_asolo.fbk > > A. finished in 2 minutes, no visible delay saving table "log_table" . Much > much faster than my backup but the FBK file IS ON THE SERVER. I want it on > my backup PC (I do this for my clients in case they have a fatal error or > they want to restore the database to some previous state) . > > B. got a "Feature is not supported" error. > > Anyway, I presume that both A and B is about saving the data to a local > file on the server. This is not what I want to do. > > How do other FireBird users manage this with really large databases ? Save > locally and get the FBK file via FTP or some other protocol ? > > [Marius Labuschagne] > > We make use of Cloud Type Services for example Drop Box or Google Drive. > > - Run the backup using a scheduled script file > > - Compress the Backup using 7-zip > > - Copy the 7-zipped file to the Drop Box folder (which will then sync it > to your drop box folder on your machine) > > And if you want to take it a step further, you can make use of some form > of Grand Parent, Parent, Child methodology and then make use of NBAK, which > will make the process much less bandwidth intensive, especially on large > databases > > Make sure you test the Backups though, that’s just good business practise. > > Regards > > Marius > > Thank you, > > Tiberiu > > [Non-text portions of this message have been removed] > > >
Re: [firebird-support] How do I return an accurate COUNT(*) when a JOIN is involved?
Good morning SET. ;) I thought of the concatenation trick, but found it ugly as a solution, your second query is cleaner, I think. With regards, Martijn Tonies Upscene Productions http://www.upscene.com Download Database Workbench for Oracle, MS SQL Server, Sybase SQL Anywhere, MySQL, InterBase, NexusDB and Firebird! -Original Message- From: Svein Erling Tysvær svein.erling.tysv...@kreftregisteret.no [firebird-support] Sent: Tuesday, October 14, 2014 9:23 AM To: firebird-support@yahoogroups.com Subject: RE: [firebird-support] How do I return an accurate COUNT(*) when a JOIN is involved? >ACCT_CASE: Case Management table >ACCT_IDINTEGERNOT NULLPK >CASE_IDSMALLINTNOT NULLPK >CLT_IDINTEGERNOT NULLFK to CLIENT table << Need this for the >JOIN >DEBTOR_CASE_DEBT: Allows for multiple PERSON's to be associated with a >DEBT >ACCT_IDINTEGERNOT NULLPK >CASE_IDSMALLINTNOT NULLPK >DEBT_NOSMALLINTNOT NULLPK >PERSON_IDINTEGERNOT NULLPK >STATUS_DATETIMESTAMPNOT NULL >STATUS_CODECHAR(1)NOT NULL >What am I attempting to do? I need to know how many records are in the >DEBTOR_CASE_DEBT table that have a STATUS_DATE between '09/01/14' and >'09/30/14' >and the STATUS_CODE = 'B" (Bankruptcy Filed) and is for a specific CLT_ID >(thus the join to ACCT_CASE to use CLT_ID). I do not want to include the >PERSON_ID when fetching a COUNT() of the record, I only need to know how >many debts are in this status for the client. So only concerned with >ACCT_ID, >CASE_ID and DEBT_NO. > >So this SQL will return the correct number of records, now I just have to >figure out how to return a count in one record. > > SELECT DISTINCT DCD.ACCT_ID, DCD.CASE_ID, DCD.DEBT_NO > FROM DEBTOR_CASE_DEBT DCD > JOIN ACCT_CASE AC ON AC.ACCT_ID = DCD.ACCT_ID > AND AC.CASE_ID = DCD.CASE_ID >WHERE DCD.STATUS_DATE BETWEEN :V_BEGIN_DATE AND :V_END_DATE > AND DCD.STATUS_CODE = 'B' > AND AC.CLT_ID = :V_CLT_ID > >Did I provide enough information this time? If not feel free to ask... This is close to a perfect problem description, Mike, well done! The only (minor) thing lacking is a reason for you not wanting CLT_ID included... I can think of two possible solutions: a) SELECT COUNT(DISTINCT DCD.ACCT_ID||'-'||DCD.CASE_ID||'-'||DCD.DEBT_NO) FROM DEBTOR_CASE_DEBT DCD JOIN ACCT_CASE AC ON AC.ACCT_ID = DCD.ACCT_ID AND AC.CASE_ID = DCD.CASE_ID WHERE DCD.STATUS_DATE BETWEEN :V_BEGIN_DATE AND :V_END_DATE AND DCD.STATUS_CODE = 'B' AND AC.CLT_ID = :V_CLT_ID b) SELECT COUNT(*) FROM DEBTOR_CASE_DEBT DCD WHERE DCD.STATUS_DATE BETWEEN :V_BEGIN_DATE AND :V_END_DATE AND DCD.STATUS_CODE = 'B' AND EXISTS(SELECT * FROM ACCT_CASE AC WHERE AC.ACCT_ID = DCD.ACCT_ID AND AC.CASE_ID = DCD.CASE_ID AND AC.CLT_ID = :V_CLT_ID) Myself, I generally prefer to have single field primary keys, one benefit of this is that you can use solution a) without having to do tricks with concatenation. HTH, Set Posted by: =?utf-8?B?U3ZlaW4gRXJsaW5nIFR5c3bDpnI=?= ++ 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] How do I return an accurate COUNT(*) when a JOIN is involved?
>ACCT_CASE: Case Management table >ACCT_IDINTEGER NOT NULL PK >CASE_ID SMALLINT NOT NULL PK >CLT_ID INTEGER NOT NULL FK to CLIENT table << Need this for the JOIN >DEBTOR_CASE_DEBT: Allows for multiple PERSON's to be associated with a DEBT >ACCT_IDINTEGER NOT NULL PK >CASE_ID SMALLINT NOT NULL PK >DEBT_NO SMALLINT NOT NULL PK >PERSON_ID INTEGER NOT NULL PK >STATUS_DATE TIMESTAMP NOT NULL >STATUS_CODE CHAR(1) NOT NULL >What am I attempting to do? I need to know how many records are in the >DEBTOR_CASE_DEBT table that have a STATUS_DATE between '09/01/14' and >'09/30/14' >and the STATUS_CODE = 'B" (Bankruptcy Filed) and is for a specific CLT_ID >(thus the join to ACCT_CASE to use CLT_ID). I do not want to include the >PERSON_ID when fetching a COUNT() of the record, I only need to know how many >debts are in this status for the client. So only concerned with ACCT_ID, >CASE_ID and DEBT_NO. > >So this SQL will return the correct number of records, now I just have to >figure out how to return a count in one record. > > SELECT DISTINCT DCD.ACCT_ID, DCD.CASE_ID, DCD.DEBT_NO > FROM DEBTOR_CASE_DEBT DCD > JOIN ACCT_CASE AC ON AC.ACCT_ID = DCD.ACCT_ID > AND AC.CASE_ID = DCD.CASE_ID > WHERE DCD.STATUS_DATE BETWEEN :V_BEGIN_DATE AND :V_END_DATE > AND DCD.STATUS_CODE = 'B' > AND AC.CLT_ID = :V_CLT_ID > >Did I provide enough information this time? If not feel free to ask... This is close to a perfect problem description, Mike, well done! The only (minor) thing lacking is a reason for you not wanting CLT_ID included... I can think of two possible solutions: a) SELECT COUNT(DISTINCT DCD.ACCT_ID||'-'||DCD.CASE_ID||'-'||DCD.DEBT_NO) FROM DEBTOR_CASE_DEBT DCD JOIN ACCT_CASE AC ON AC.ACCT_ID = DCD.ACCT_ID AND AC.CASE_ID = DCD.CASE_ID WHERE DCD.STATUS_DATE BETWEEN :V_BEGIN_DATE AND :V_END_DATE AND DCD.STATUS_CODE = 'B' AND AC.CLT_ID = :V_CLT_ID b) SELECT COUNT(*) FROM DEBTOR_CASE_DEBT DCD WHERE DCD.STATUS_DATE BETWEEN :V_BEGIN_DATE AND :V_END_DATE AND DCD.STATUS_CODE = 'B' AND EXISTS(SELECT * FROM ACCT_CASE AC WHERE AC.ACCT_ID = DCD.ACCT_ID AND AC.CASE_ID = DCD.CASE_ID AND AC.CLT_ID = :V_CLT_ID) Myself, I generally prefer to have single field primary keys, one benefit of this is that you can use solution a) without having to do tricks with concatenation. HTH, Set