RE: [firebird-support] Array datatype?

2019-08-30 Thread 'Alan McDonald' a...@meta.com.au [firebird-support]
 

Hello Alan,

 

Im using now the extract function an there is 0 = Sunday, 1 = Monday I think.

 

 

It’s Friday here today:

select f_dayofweek(current_timestamp) from rdb$database

 

returns 6



RE: [firebird-support] Re: Is this a bug in ROUND function?

2019-08-29 Thread 'Alan McDonald' a...@meta.com.au [firebird-support]
On 8/29/19 4:45 AM, m.djo...@gmail.com [firebird-support] wrote:
>  
> In binary representation of the values maybe 4.72 is the closest, but 
> we are talking about mathematic.
> This is from the description of the ROUND function in the documentation:
> Rounds a number to the nearest integer. If the fractional part is 
> exactly 0.5, rounding is upward for positive numbers and downward for 
> negative numbers.
> So .725 is all cases is rounded up to .73 as it should be, but in one 
> case it is not.
>
The issue is that when you write: cast(2.725 as double precision) you aren't 
dealing with 'mathematics' anymore, or even the value 2.725

The value that you get at that point will be the nearest value to 2.725 that is 
expressible as a double precision floating point number which will be slightly 
different since 2.725 is NOT exactly representable as double precision floating 
point number. The number you get is allowed to be either the representable 
value just below or just above, the value, though the preference is the closer 
one. If the number you get is something like 2.72499...xx then round needs to 
round down, if you get something like 2.72500..xx then round needs to round up.

If the numbers you had WERE exactly representable, like 2.625 (21/8) then the 
rules on how to round would matter, but since the number you have, after being 
made representable, isn't exactly 0.5 in the fractional part, that clause 
doesn't apply.


--
Richard Damon

What about:
select
 round(cast(0.725 as double precision), 2),
 round(cast(1.725 as double precision), 2),
 round(cast(2.725 as double precision), 2),
 round(cast(3.725 as double precision), 2),
 round(cast(4.725 as numeric(18,3)), 2),
 round(cast(5.725 as double precision), 2),
 round(cast(6.725 as double precision), 2),
 round(cast(7.725 as double precision), 2),
 round(cast(8.725 as double precision), 2),
 round(cast(9.725 as double precision), 2),
 round(cast(10.725 as double precision), 2) from
 rdb$database




RE: [firebird-support] Array datatype?

2019-08-29 Thread 'Alan McDonald' a...@meta.com.au [firebird-support]
Hello Kjell,

 

then I have to do the mapping between Monday = 1, Tuesday = 2, Sunday = 0. But 
I can only select the value with an execute statement.

 

I will test it, thank you. 

 

WHEN F_DAYOFWEEK(J.COMMDATE)=1 /* Sunday */

??

 

Alan McDonald

 

 

 



RE: [firebird-support] Connection lost after long inactive time

2019-02-28 Thread 'Alan McDonald' a...@meta.com.au [firebird-support]


>> DummyPacketInterval = 0 (but this should be irrelevant for this type 
>> of issue)

>Try to change it. This _is_ relevant for this type of issue.

That did the trick. Thanks, Dimitry!


Regards

Stefan
What did you change it to?
Alan




Posted by: Stefan Heymann 


++

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] concat a integer variable to a varchar

2019-01-05 Thread 'Alan McDonald' a...@meta.com.au [firebird-support]
>> that does not work - Unknown Column error -206
> 
> RTFM Language Reference. In SQL queries PSQL variables must be used with 
> colon.

Please mind your tone: you could have phrased that a little bit more friendly 
and less hostile.

Mark
--
Mark Rotteveel


+2



RE: [firebird-support] Converting dates and the ISO-8601 format

2018-11-09 Thread 'Alan McDonald' a...@meta.com.au [firebird-support]
>>I use Firebird primarily with Delphi and have had no problems with using and 
>>displaying dates >>(suitable for my country - UK.)

You can use this in your select statements for php:

 

f_dayofmonth(CREATEDATE)||'.'||f_month(CREATEDATE)||'.'||f_year(CREATEDATE) 
CREATEDATE

 

format the PHP as you wish.



RE: [firebird-support] FB in Azure VM?

2017-06-21 Thread 'Alan McDonald' a...@meta.com.au [firebird-support]
With Azure - AFAIKnew two VM are never guaranteed to be anywhere close to each 
other. This was a total turn off for me, given that bandwidth for each server 
is based on cost and very expensive, the two servers would often suffer from 
one or both ends being thorttled back to almost nothing.
Better to co-host your own serer somewhere than use Azure. That was my decision.

Alan McDonald
0413 657 427

-Original Message-
From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Wednesday, 21 June 2017 8:09 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] FB in Azure VM?

Hi,

We're considering a move from dedicated server (at a hosting provider) to 
hosting "everything" in the cloud, namely Azure.

They don't provide FB as "app as a service", so we're forced to go with a VM 
where we maintain our own FB installation, which is not a problem per se, but 
means we'll have to manage it more ourselves.

What experiences do you have with deploying FB in an Azure VM or similar?

If I understand MS correctly, they can provide a locally mounted 
high-performance disk, but I'm not sure if they can provide mirroring, e.g. 
RAID 1.

On our dedicated server we have a local RAID 1 volume (mechanical 10k or 
possibly 15k rpm SCSI) for the databse, and make full nightly backups. 
Forced writes off. Transaction load isn't very high, but we do need to be able 
to execute long-running and "heavy" queries while at the same time a web app 
makes short transactions that require short response times.

I'd like to know if you think the cloud VM approach for a FB installation is 
viable, any special consideration we should be aware of, etc.

I do know that the wire protocol is not very efficient if the network latency 
is high, so you don't have to mention that aspect. I.e. we're probably better 
of having both FB and the apps hosted in the same cloud...

But... do you know if this is a problem if FB is in an Azure VM and the app is 
hosted in an Azure App Service? Network latency ok in that scenario?

Regards,
Kjell
-- 

Marknadsinformation logotyp

Kjell Rilbe
Telefon: 08-761 06 55
Mobil: 0733-44 24 64

Marknadsinformation i Sverige AB
Ulvsundavägen 106C
168 67 Bromma
www.marknadsinformation.se 
08-514 905 90

Företagskontakt.se 
Personkontakt.se 



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




Posted by: Kjell Rilbe 


++

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] ezSQL/Wordpress

2017-03-09 Thread 'Alan McDonald' a...@meta.com.au [firebird-support]
I use ezSQL with Firebird
Excellent, as long as you use my version :-0
Happy to give it to you
I use it in conjunction with ez_results - grid browser - my version - also you 
can have
I use it for a mortgage loan tracker system (a business environment) not a cms 
with lots of pictures and formatted text so it may not be suitable for your 
needs

Alan McDonald
0413 657 427

-Original Message-
From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Thursday, 9 March 2017 9:48 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] ezSQL/Wordpress

I've picked up a client who has his website on wordpress which is MySQL only. 
The database is only 60Mb as a raw SQL dump but still took the best part of an 
hour to restore via 'mysql-workbench' so not the best response for backup 
between machines.

Now I though ezSQL supported Firebird? I'll clone it from github later and see 
which is in history, but has anybody looked at this area recently?

It will probably be faster and easier simply to move the wordpress content over 
to my own framework. At least I can also then address all the todo items a hell 
of a lot quicker, but there are a number of potential clients and moving all is 
impractical, so fixing the wordpress seems the better option.

--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - 
http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk 
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk



Posted by: Lester Caine 


++

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] Delegating SYSDBA and enumerating users

2017-02-22 Thread 'Alan McDonald' a...@meta.com.au [firebird-support]
Hi Alan and all,

 

Thanks for this further insight into your approach. I am quite new to FB, but 
from what I have read I am wondering a few things with this approach. First 
looking at Borrie's 2nd edition (p. 729):

"From Firebird 2.0 onward, the USER table is replaced by one named RDB$USERS 
and is

not accessible by any user, even SYSDBA. All access to RDB$USERS is done via a 
view

named USERS."

 

so I am now left wondering how your approach works.

 

1.  I see the new RDB$USERS table and view being created in the DB where I 
ran the SQL. In Flame Robin, the new RDB$USERS appears red (not sure what that 
means). Does this table and view somehow supplant the RDB$USERS and USERS view 
mentioned above?

Red just means system – system tables are the same as normal tables but you 
need to know what you’re doing before you do too much DML on them

 

2.  When I ran the SQL, it complained on trying to create the RDB$ADMIN 
ROLE, as it already exists.

I don’t know what SQL you ran – you cannot just run the SQL I posted.

 

3.  When I create a user using "CREATE USER xxx PASSWORD 'yyy'", do I also 
need to duplicate adding records into RDB$USERS?

Not tested – As I said I use service manager for user management

 

4. I see the GRANTing to PUBLIC, however I have seen various posts and/or 
sections of the Firebird books cautioning on GRANTing to PUBLIC for obvious 
security reasons. The new RDB$USERS.PASSWD is also now visible to all users, 
right?

 

Take your time – tell me what this password is:

7Z+J3xSYrsQVwZYsVJQYqerb2esodg7P7uyGvac=

 

 

4.  The example oCo*, oEo*, and oSo* users listed have all been given 
RDB$ADMIN. Our need is to delegate SYSDBA, giving a select subset of people (eg 
2 people in IT admin roles) administrative capability and CRUD operations on 
users, without disclosing the SYSDBA credentials. Is there a similar intention 
here, that different kinds of users would have the RDB$ADMIN capability and 
others wouldn't??

Those users are users granted admin rights and so they are able to create, see 
all other users, edit them and reset their passwords. Only SYSDBA is above that

 

Lastly, do you (or anyone else) know how things work in FB v3.0? Will this all 
be a moot point? Reading Harrison's 'Migration Guide to Firebird 3.0', I see I 
could create local, per database, users (p. 63), and seems to infer from this 
(p. 70)

"Only the SYSDBA or users that have the rdb$admin role in the security database 
and are logged in with that role can create new users."

and the pages around this that users with RDB$ADMIN ROLE can perform 
CREATE/ALTER/DROP, but I still don't know if in Firebird 3.0 it will be 
possible to enumerate/list the users (for any of the 3 security models).

 

I cannot speak for FB3 – not done any work there yet

 

Thanks again,

David

 

 

On Tuesday, February 21, 2017 4:19 PM, "'Alan McDonald' a...@meta.com.au 
[firebird-support]" <firebird-support@yahoogroups.com> wrote:

 

  

Thanks for this Alan.

Unfortunately when connected under the ROLE RDB$ADMIN, this still results in an 
error as RDB$USERS is an unknown table. Same goes for replacing this with 
USERS. As stated in Helen Borrie's The Firebird Book (p.729):
"From Firebird 2.0 onward, the USER table is replaced by one named RDB$USERS 
and is
not accessible by any user, even SYSDBA. All access to RDB$USERS is done via a 
view
named USERS." 

In case you meant what many posts suggest using RDB$USER_PRIVILEGES, there are 
a similar number of responses which clearly state that doing is not the correct 
approach. If a user has no privileges, they won't appear in the list. Of course 
the additional USER fields (first/middle/last names) aren't accessible either.

Any other suggestions?
--
I run FB2.5.6
The key here is the grant to PUBLIC
Here is my meta data. All these users I grant ADMIN rights to are able to 
enumerate all users. I use the services API not SQL.
But here is my metadata complete:

CREATE TABLE RDB$USERS (
RDB$USER_NAME VARCHAR(128) CHARACTER SET UNICODE_FSS NOT NULL,
RDB$SYS_USER_NAME VARCHAR(128) CHARACTER SET UNICODE_FSS,
RDB$GROUP_NAME VARCHAR(128) CHARACTER SET UNICODE_FSS,
RDB$UID INTEGER,
RDB$GID INTEGER,
RDB$PASSWD VARCHAR(64) CHARACTER SET OCTETS NOT NULL,
RDB$PRIVILEGE INTEGER,
RDB$COMMENT BLOB SUB_TYPE 1 SEGMENT SIZE 80 CHARACTER SET UNICODE_FSS,
RDB$FIRST_NAME VARCHAR(32) CHARACTER SET UNICODE_FSS DEFAULT _UNICODE_FSS '',
RDB$MIDDLE_NAME VARCHAR(32) CHARACTER SET UNICODE_FSS DEFAULT _UNICODE_FSS '',
RDB$LAST_NAME VARCHAR(32) CHARACTER SET UNICODE_FSS DEFAULT _UNICODE_FSS ''
);

/* View: USERS */
CREATE VIEW USERS(
USER_NAME,
SYS_USER_NAME,
GROUP_NAME,
UID,
GID,
PASSWD,
PRIVILEGE,
COMMENT,
FIRST_NAME,
MIDDLE_NAME,
LAST_NAME,
FULL_NAME)
AS
SELECT RDB$USER_NAME, RDB$SYS_USER_NAME, RDB$GROUP_NAME, RDB$UID, RDB$GID, 
RDB$PASSWD, 
RDB$PRIVILEGE, RDB$COMMENT, R

RE: [firebird-support] Delegating SYSDBA and enumerating users

2017-02-21 Thread 'Alan McDonald' a...@meta.com.au [firebird-support]
Thanks for this Alan.

Unfortunately when connected under the ROLE RDB$ADMIN, this still results in an 
error as RDB$USERS is an unknown table. Same goes for replacing this with 
USERS. As stated in Helen Borrie's The Firebird Book (p.729):
"From Firebird 2.0 onward, the USER table is replaced by one named RDB$USERS 
and is
not accessible by any user, even SYSDBA. All access to RDB$USERS is done via a 
view
named USERS." 

In case you meant what many posts suggest using RDB$USER_PRIVILEGES, there are 
a similar number of responses which clearly state that doing is not the correct 
approach. If a user has no privileges, they won't appear in the list. Of course 
the additional USER fields (first/middle/last names) aren't accessible either.

Any other suggestions?

I run FB2.5.6
The key here is the grant to PUBLIC
Here is my meta data. All these users I grant ADMIN rights to are able to 
enumerate all users. I use the services API not SQL.
But here is my metadata complete:

CREATE TABLE RDB$USERS (
RDB$USER_NAME  VARCHAR(128) CHARACTER SET UNICODE_FSS NOT NULL,
RDB$SYS_USER_NAME  VARCHAR(128) CHARACTER SET UNICODE_FSS,
RDB$GROUP_NAME VARCHAR(128) CHARACTER SET UNICODE_FSS,
RDB$UIDINTEGER,
RDB$GIDINTEGER,
RDB$PASSWD VARCHAR(64) CHARACTER SET OCTETS NOT NULL,
RDB$PRIVILEGE  INTEGER,
RDB$COMMENTBLOB SUB_TYPE 1 SEGMENT SIZE 80 CHARACTER SET 
UNICODE_FSS,
RDB$FIRST_NAME VARCHAR(32) CHARACTER SET UNICODE_FSS DEFAULT 
_UNICODE_FSS '',
RDB$MIDDLE_NAMEVARCHAR(32) CHARACTER SET UNICODE_FSS DEFAULT 
_UNICODE_FSS '',
RDB$LAST_NAME  VARCHAR(32) CHARACTER SET UNICODE_FSS DEFAULT 
_UNICODE_FSS ''
);

/* View: USERS */
CREATE VIEW USERS(
USER_NAME,
SYS_USER_NAME,
GROUP_NAME,
UID,
GID,
PASSWD,
PRIVILEGE,
COMMENT,
FIRST_NAME,
MIDDLE_NAME,
LAST_NAME,
FULL_NAME)
AS
SELECT RDB$USER_NAME, RDB$SYS_USER_NAME, RDB$GROUP_NAME, RDB$UID, RDB$GID, 
RDB$PASSWD, 
RDB$PRIVILEGE, RDB$COMMENT, RDB$FIRST_NAME, RDB$MIDDLE_NAME, 
RDB$LAST_NAME, 
COALESCE (RDB$first_name || _UNICODE_FSS X'20', '') || 
COALESCE (RDB$middle_name || _UNICODE_FSS X'20', '') || 
COALESCE (RDB$last_name, '')
FROM RDB$USERS
;

ALTER TABLE RDB$USERS ADD PRIMARY KEY (RDB$USER_NAME);

CREATE ROLE RDB$ADMIN;

/* Privileges of users */
GRANT RDB$ADMIN TO "0C0AYLMERS";
GRANT RDB$ADMIN TO "0C0DAVIESS";
GRANT RDB$ADMIN TO "0C0META";
GRANT RDB$ADMIN TO "0C0SLEGER";
GRANT RDB$ADMIN TO "0E0META";
GRANT RDB$ADMIN TO "0E0SKELLERR";
GRANT RDB$ADMIN TO "0E0SLEGER";
GRANT RDB$ADMIN TO "0E0WARDK";
GRANT RDB$ADMIN TO "0S0AYLMERS";
GRANT RDB$ADMIN TO "0S0DAVIESS";
GRANT RDB$ADMIN TO "0S0META";
GRANT RDB$ADMIN TO "0S0SLEGER";
GRANT RDB$ADMIN TO "0S0WARDK";
GRANT SELECT, INSERT, 
UPDATE(FIRST_NAME,GID,GROUP_NAME,LAST_NAME,MIDDLE_NAME,PASSWD,UID), DELETE ON 
USERS TO PUBLIC;

/* Privileges of views */
GRANT ALL ON RDB$USERS TO VIEW USERS;


On Tuesday, February 21, 2017 1:32 PM, "'Alan McDonald' a...@meta.com.au 
[firebird-support]" <firebird-support@yahoogroups.com> wrote:

  
In a production environment using Firebird v2.5, we need to delegate authority 
of USER CRUD operations to more than one person without these admins sharing 
the SYSDBA user and password.
 
These admins have been created as users with ADMIN ROLE, and are logged in 
under the RDB$ADMIN ROLE (eg in Flame Robin or via the .NET Provider, or 
'-admin' switch in gsec). With this ROLE, it is possible to perform Creation, 
Update, and Deletion operations of CRUD via Flame Robin as well as gsec.
 
The roadblock, however, is not being able to list/enumerate the users (ie 
Read). In gsec when logged in as SYSDBA all users are displayed via the 
'display' command, whereas using another RDB$ADMIN superuser only the logged in 
user is displayed. The latter is also the case when using the .NET Provider and 
making the call to FirebirdSql.Data.Services.FbSecurity.DisplayUsers(). Via 
Flame Robin menu Server | Manager Users, you are prompted with the Database 
Credentials dialog with Username pre-populated with 'SYSDBA' and read-only.
 
To delegate user management, it is necessary to have users other than SYSDBA to 
be able to list and enumerate them. This is required even simply to avoid name 
clashes.
 
Any suggestions would be greatly appreciated on how it is possible to do this, 
or if it isn't possible, potential alternative(s). Lastly, are there 
differences and/or does this problem disappear with Firebird v3.0?
 
My end goal here is implementation in Visual Studio C# using SQL through 
FirebirdSql.Data.FirebirdClient or directly through FirebirdSql.Data.Services, 
although solutions 

RE: [firebird-support] Delegating SYSDBA and enumerating users

2017-02-21 Thread 'Alan McDonald' a...@meta.com.au [firebird-support]
In a production environment using Firebird v2.5, we need to delegate authority 
of USER CRUD operations to more than one person without these admins sharing 
the SYSDBA user and password.

 

These admins have been created as users with ADMIN ROLE, and are logged in 
under the RDB$ADMIN ROLE (eg in Flame Robin or via the .NET Provider, or 
'-admin' switch in gsec). With this ROLE, it is possible to perform Creation, 
Update, and Deletion operations of CRUD via Flame Robin as well as gsec.

 

The roadblock, however, is not being able to list/enumerate the users (ie 
Read). In gsec when logged in as SYSDBA all users are displayed via the 
'display' command, whereas using another RDB$ADMIN superuser only the logged in 
user is displayed. The latter is also the case when using the .NET Provider and 
making the call to FirebirdSql.Data.Services.FbSecurity.DisplayUsers(). Via 
Flame Robin menu Server | Manager Users, you are prompted with the Database 
Credentials dialog with Username pre-populated with 'SYSDBA' and read-only.

 

To delegate user management, it is necessary to have users other than SYSDBA to 
be able to list and enumerate them. This is required even simply to avoid name 
clashes.

 

Any suggestions would be greatly appreciated on how it is possible to do this, 
or if it isn't possible, potential alternative(s). Lastly, are there 
differences and/or does this problem disappear with Firebird v3.0?

 

My end goal here is implementation in Visual Studio C# using SQL through 
FirebirdSql.Data.FirebirdClient or directly through FirebirdSql.Data.Services, 
although solutions through other approaches would be welcome.

 

Thanks in advance,

David



CREATE OR ALTER VIEW USERS(

USER_NAME,

SYS_USER_NAME,

GROUP_NAME,

   UID,

GID,

PASSWD,

PRIVILEGE,

COMMENT,

FIRST_NAME,

MIDDLE_NAME,

LAST_NAME,

FULL_NAME)

AS

SELECT RDB$USER_NAME, RDB$SYS_USER_NAME, RDB$GROUP_NAME, RDB$UID, RDB$GID, 
RDB$PASSWD, 

RDB$PRIVILEGE, RDB$COMMENT, RDB$FIRST_NAME, 
RDB$MIDDLE_NAME, RDB$LAST_NAME, 

COALESCE (RDB$first_name || _UNICODE_FSS X'20', 
'') || 

COALESCE (RDB$middle_name || _UNICODE_FSS 
X'20', '') || 

COALESCE (RDB$last_name, '')

FROM RDB$USERS

/* to allow listing of all users for all users

see also GRANT UPDATE ON USERS TO PUBLIC

WHERE CURRENT_USER = 'SYSDBA'

   OR CURRENT_USER = RDB$USERS.RDB$USER_NAME

*/

;

 

 

 

 

/**/

/  Privileges  /

/**/

 

 

/* Privileges of users */

GRANT SELECT, INSERT, 
UPDATE(FIRST_NAME,GID,GROUP_NAME,LAST_NAME,MIDDLE_NAME,PASSWD,UID), DELETE ON 
USERS TO PUBLIC;

 

/* Privileges of roles */

GRANT ALL ON USERS TO RDB$ADMIN;

 

/* Privileges of views */

GRANT ALL ON RDB$USERS TO VIEW USERS;

 



RE: [firebird-support] Fwd: Firebird database corrupt issue. Due to I/O error

2017-02-19 Thread 'Alan McDonald' a...@meta.com.au [firebird-support]

Hi,
I am facing a DB corruption issue on firebird database. Everytime my 
application tries to open connection or perform any DML activities, randomly i 
get the following error.
ERR::I/O error during "CreateFile (open)" operation for file "database"
Error while trying to open file; FirebirdSql.Data.FirebirdClient: 
I seeing this issue more frequently now a days. Tried this same database on 
another pc still getting this error.
Could someone help me.
Thank you.


And you're not using the embedded version to connect? Are you using TCP or 
Local?
Alan



RE: [firebird-support] Alternative to Java Zebedee

2015-12-07 Thread 'Alan McDonald' a...@meta.com.au [firebird-support]

Hi guys,

Since Zebedee for Java is a beta ver. and not maintain again, are there any 
alternative to this program?

Thanks in advance.
Regards,
Anto

 

 

 

Linux or pc?

 



RE: [firebird-support] Firebird replication help needed

2015-10-08 Thread 'Alan McDonald' a...@meta.com.au [firebird-support]
I am writing a two way server - client Firebird replication with a C# app and I 
am facing the following problem. I have a log table with the table name pk of 
the record and type of the query executet on it. For example if in the sales 
table there has been inserted a line with primery key of 4 there will be the 
table name, pk of the record and insert. My idea is if the statement is insert 
to take every value from the client's DB and insert it into the server's. How 
do I do this and how to do it so that it can work fast. Should I devide every 
record by tables and select all unreplicated records from that table or there 
is some other way. Please help me.

By the way I used the method where every query that has been executed is 
written in a fild in the log table, but that makes it impossible to add columns 
to the table, cos the query will be wrong. Please help me. I've been strugling 
to write a good replication for years.

 

If you want, you can have the source for FBReplicator.

Replication Manager, Service and Service Controller.

The manager allows for you to update table structures and install and maintain 
triggers in the source DBs such that all I, D and U operations are stored in a 
changes table. The service then runs at your desired interval and replicates to 
a target. You can have 2-way replication.

I’ve been running 3 way replication (i.e. 4 servers each puching 3 ways) since 
1997. That’s 72 server years of 24x7 traffic.

 

Alan



RE: [firebird-support] Firebird replication help needed

2015-10-08 Thread 'Alan McDonald' a...@meta.com.au [firebird-support]
Hello Alan,

Thank you for your answer. I will download the FB Replicator try it and see if 
it will work for me. 

That part with the triggers i've already done. I have after I, U, D triggers 
for every table and they insert into my replication log table. The problem is 
that I used to put the sql query that was executedon the client DB on this 
table in the log and then just execute it on the server DB. But if the table 
metadata is changed, then that doesn't work anymore, cos its says can't execute 
to server because the fields in the insert do not equal to those in the table. 
So I decided insted to log only the table name, the PK of record, timestamp and 
the type of query - I U D. And if it's I, to execute insert or update on 
server. But probably when I execute them I'll have to separate them by table 
and get every field name and then value of that table and then onstruct the 
query as a string so it will be probably slow. 

My other problem is should I do it in the C# replication app of use a script 
instead?

Thank you again.If I have further questions I'll write.





There’s IBReplicator (Commercial) at IBPhoenix. FBReplicator is open source.

 



[firebird-support] GSEA / Admin

2014-10-14 Thread 'Alan McDonald' a...@meta.com.au [firebird-support]
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

 



RE: [firebird-support] Re: Help!!! - Problem with Firebird Embeded

2014-09-14 Thread 'Alan McDonald' a...@meta.com.au [firebird-support]
The database path I am using in both my app and IB_SQL.exe is simply the 
atabase name myapp.FDB. 

 

When fb_inet_server.exe is running as a background process on the machine both 
my app and IB_SQL.exe connect to the server and the app runs as I would expect.

 

Adam
__

 

Embedded needs to full path

Alan



RE: [firebird-support] Help!!! - Problem with Firebird Embeded

2014-09-14 Thread 'Alan McDonald' a...@meta.com.au [firebird-support]
I have tried both fullpath (D:\my_app\myapp.FDB) and just filename (myapp.FDB) 
and in both cases cannot connect. 

 

Adam

 

And you are using cpLocal?

Alan







RE: [firebird-support] Help!!! - Problem with Firebird Embeded

2014-09-14 Thread 'Alan McDonald' a...@meta.com.au [firebird-support]
 

Engine Code  :335544721

Engine Message:

Unable to complete network request to host localhost

Failed to establish connection.

 

That means you are trying to use the TCP stack.

Alan



RE: [firebird-support] Help!!! - Problem with Firebird Embeded

2014-09-13 Thread 'Alan McDonald' a...@meta.com.au [firebird-support]
I've only just recently installed the latest version of Firebird and developed 
a small test application and associated fdb on a Windows 8 desktop. I've copied 
the following Firebird files to the same folder as the exe but cannot connect 
to an embedded Firebird:

 

icudt30.dll

icuin30.dll

icuuc30.dll

ib_util.dll

fbclient.dll (renamed)

 

I've also copied InterBase Objects (V5.2.0.8) IBSQL into the exe folder and 
tried connecting to the database via this client but get the same ISC ERROR 
CODE:335544375, ISC ERROR MESSAGE: unavailable database error.

 

Any help would be greatly appreciated.

 

-- 
Adam 





Did you read the release notes and the section on how to deploy the embedded 
server? You should because you are missing some files

Alan