Re: Re: [firebird-support] FB 2.5 migrate to 3.0
Dear Helen, Thanks for your advice. I will try it all with your detail steps. Best regards, James From: Helen Borrie hele...@iinet.net.au [firebird-support] Date: 2017-01-10 17:02 To: firebird-support Subject: Re: [firebird-support] FB 2.5 migrate to 3.0 > Thanks for your answer. I think I got help from you also during last time > migration test. :-) > I tested it with your advice but it still doesn't work. I am not convinced you have that authentication configured properly nor that your application is really loading the Fb3 client library. Some reality checks: 1. Make sure that you deleted the # symbol when you configured AuthServer. 2. It might be worthwhile to change the ordering of the list in AuthClient, so that Legacy_Auth appears first. 2. Get rid of SRP from the UserManager list. Make it so that Legacy_UserManager is only entry. 3. Don't forget to save firebird.conf, and to restart Firebird. 4. Put fbclient.dll in the same folder as your application. It would probably be a good idea to reboot the client machine, while you are at it, in case the old version is still loaded. > I would like to test it with a fresh installation of FB 3.0 later. > I should make my description more clear for my steps. > 0. First of all, all applications are running in Windows 7. FB x32 versions > are used for testing. > 1. Use gbak (FB 2.5) to backup Firebird 2.5 database file. > 2. Use gbak (FB 3.0) to restore backuped FBK file to a new database file. > 3. Use isql, to run: SQL> alter user sysdba set password 'masterkey'; > respond: Database: myimport, bsp;User: SYSDBA Without the modifications to firebird.conf, that step operates on the SYSDBA that is configured under UserManager SRP. It will NOT work with applications connecting via Legacy_UserManager. You have to create SYSDBA for use with Legacy_UserManager. You need to use the USING PLUGIN clause, as indicated in my previous posting. > 4. Open new database file in IBExpert with FB 3.0 client library > (fbclient.dll), it works. > 5. Run my own applicatoin with FB 3.0 client library which works > with FB2.5 client library, error message shows below: > [FireDAC][Phys][FB]Your user name and password are not defined. Ask > your database administrator to set up a Firebird login. > > Connection string inside my code > > object dbcMain: TFDConnection > Params.Strings = ( > ; 'DriverID=FB' > 'User_Name=sysdba' > 'Password=masterkey') > But it will not work if either (or both) 1) the application is loading the Fb 2.5 client 2) firebird.conf configuration is a mismatch with the client BTW, you are not REALLY using masterkey for your SYSDBA password, are you? HB
Re: [firebird-support] There is a verb to supply identity columns?
I knew it! Never alone :) I´m following your ticket, Mark. Thanks. 2017-01-11 10:35 GMT-02:00 Mark Rotteveel m...@lawinegevaar.nl [firebird-support]: > > > On 11-1-2017 12:00, hamacker sirhamac...@gmail.com [firebird-support] > wrote: > > Colums identity in FB3, I love it! > > > > But there is one thing missing. > > > > I would like to know, if exists a verb to supply identity value to not > > assume a literal value. Ex: > > > > create table test ( > > id integer generated by default as identity primary key, > > name varchar(15) ); > > > > insert into test (id, name) values (default, 'test#1'); // default, > > any,... is there a verb to suppy identity column? > > No, you currently need to do: > > insert into test (name) values ('test#1'); > > > I know that I need to hidden fields identity, but it exists a > > possibility to keep identity fields in sql for documentation, I will > > prefer this way. > > > > If not, Ok. but I will send a ticket request. We never know, if I am > > alone in universe. > > The SQL standard does have a feature like that, the value specification>. I have created a ticket: > http://tracker.firebirdsql.org/browse/CORE-5449. For insert, the SQL > standard says: > > "An that specifies DEFAULT VALUES is > implicitly replaced by an that specifies a > of the form VALUES > (DEFAULT, DEFAULT, ..., DEFAULT) where the number of instances of > “DEFAULT” equal to the number of columns of T." > > If you follow the definition of insert (and update, merge, etc), you'll > see that DEFAULT is a contextual value similar to CURRENT_USER etc, and > means "use the default, or null if there is no default". > > Mark >
Re: [firebird-support] There is a verb to supply identity columns?
On 11-1-2017 12:00, hamacker sirhamac...@gmail.com [firebird-support] wrote: > Colums identity in FB3, I love it! > > But there is one thing missing. > > I would like to know, if exists a verb to supply identity value to not > assume a literal value. Ex: > > create table test ( >id integer generated by default as identity primary key, >name varchar(15) ); > > insert into test (id, name) values (default, 'test#1'); // default, > any,... is there a verb to suppy identity column? No, you currently need to do: insert into test (name) values ('test#1'); > I know that I need to hidden fields identity, but it exists a > possibility to keep identity fields in sql for documentation, I will > prefer this way. > > If not, Ok. but I will send a ticket request. We never know, if I am > alone in universe. The SQL standard does have a feature like that, the . I have created a ticket: http://tracker.firebirdsql.org/browse/CORE-5449. For insert, the SQL standard says: "An that specifies DEFAULT VALUES is implicitly replaced by an that specifies a of the form VALUES (DEFAULT, DEFAULT, ..., DEFAULT) where the number of instances of “DEFAULT” equal to the number of columns of T." If you follow the definition of insert (and update, merge, etc), you'll see that DEFAULT is a contextual value similar to CURRENT_USER etc, and means "use the default, or null if there is no default". Mark -- Mark Rotteveel
[firebird-support] There is a verb to supply identity columns?
Hi, All. Colums identity in FB3, I love it! But there is one thing missing. I would like to know, if exists a verb to supply identity value to not assume a literal value. Ex: create table test ( id integer generated by default as identity primary key, name varchar(15) ); insert into test (id, name) values (default, 'test#1'); // default, any,... is there a verb to suppy identity column? I know that I need to hidden fields identity, but it exists a possibility to keep identity fields in sql for documentation, I will prefer this way. If not, Ok. but I will send a ticket request. We never know, if I am alone in universe. thx4all.
Re: AW: [firebird-support] find a string records in all my tables
yes it's just a one time search, without option, juste a string
Re: [SPAM] Re: [firebird-support] Firebird : find strign in all database
What you’ve written is a valiant effort, but shows why I think it’s better to use external programming to generate the SQL needed. Programming languages like c, c++, pascal etc., give far more fine control in doing such a task, have well-defined control statements, and are able to be debugged statement by statement to find errors which are so easy to make. A typical error in putting together such code to create SQL where it will contain a concatenation of many parts, some literal and some variable, it the simple omission of space characters where they are needed. I’m afraid that I have used the procedural bits of Firebird SQL very little, and always find it a stress when I have to. It seems very clunky and difficult to manage to me, compared with programming languages which are designed to be procedural. Neville From: mailto:firebird-support@yahoogroups.com Sent: Wednesday, January 11, 2017 9:02 AM To: firebird-support@yahoogroups.com Subject: [SPAM] Re: [firebird-support] Firebird : find strign in all database Hi thanks for your reply i have this code but something gone wrong SET TERM !; EXECUTE BLOCK RETURNS (DANSTABLE CHAR(31), DANSCOLONNE CHAR(31) ) AS DECLARE VARIABLE STMT VARCHAR(250); DECLARE VARIABLE CHAINE VARCHAR(50); DECLARE VARIABLE RESULT SMALLINT; BEGIN CHAINE='ACHERCHER'; FOR SELECT r.RDB$FIELD_NAME, r.RDB$RELATION_NAME FROM RDB$RELATION_FIELDS r LEFT JOIN RDB$FIELDS F ON r.RDB$FIELD_SOURCE = f.RDB$FIELD_NAME WHERE r.RDB$SYSTEM_FLAG=0 AND f.RDB$FIELD_TYPE IN (37,14) AND f.RDB$FIELD_LENGTH>=9 INTO :DANSCOLONNE,:DANSTABLE DO BEGIN STMT='SELECT 1 FROM '||:DANSTABLE||' WHERE '||:DANSCOLONNE||' = ?'; EXECUTE STATEMENT (STMT) (CHAINE) INTO :RESULT; IF (RESULT IS NOT NULL) THEN SUSPEND; END END! SET TERM ; !
AW: [firebird-support] find a string records in all my tables
Hello, out of curiosity: Is this a one time search or should it happen regulary? If ist regulary – maybe the design should be reviewed? What are the requirements to run such a search? Is fulltextsearch an option? Niko Von: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] Gesendet: Dienstag, 10. Jänner 2017 18:10 An: firebird-support@yahoogroups.com Betreff: [firebird-support] find a string records in all my tables Hi all, I am looking for a procedure or a function to find a stirng in my database I have a DB with 200 tables and want to find a specific string (record) in a my DB I don't know the name of table / field. Thanks for any help [Non-text portions of this message have been removed]
Re: [firebird-support] Firebird : find strign in all database
On 11-1-2017 10:35, startx252...@yahoo.fr [firebird-support] wrote: > > > i mean taht i have no result (it's empty) and i am sure my string existe > in one table That is probably because you are using ' WHERE '||:DANSCOLONNE||' = ?' instead of ' WHERE '||:DANSCOLONNE||' = ''%'' || ? || ''%''' or ' WHERE '||:DANSCOLONNE||' CONTAINING ?' You might also want to account for case sensitivity, etc. Also `EXECUTE STATEMENT (STMT) (CHAINE) INTO :RESULT;` won't work properly if there is more than one row, you might want to switch to using `for execute statement` (see https://www.firebirdsql.org/file/documentation/reference_manuals/fblangref25-en/html/fblangref25-psql-coding.html#fblangref25-psql-forexec) Mark -- Mark Rotteveel
Re: [firebird-support] Firebird : find strign in all database
i mean taht i have no result (it's empty) and i am sure my string existe in one table
Re: [firebird-support] Firebird : find strign in all database
On 11-1-2017 10:02, startx252...@yahoo.fr [firebird-support] wrote: > i have this code but something gone wrong Please be more specific than "something gone wrong" Mark -- Mark Rotteveel
Re: [firebird-support] Firebird : find strign in all database
Hi thanks for your reply i have this code but something gone wrong SET TERM !; EXECUTE BLOCK RETURNS (DANSTABLE CHAR(31), DANSCOLONNE CHAR(31) ) AS DECLARE VARIABLE STMT VARCHAR(250); DECLARE VARIABLE CHAINE VARCHAR(50); DECLARE VARIABLE RESULT SMALLINT; BEGIN CHAINE='ACHERCHER'; FOR SELECT r.RDB$FIELD_NAME, r.RDB$RELATION_NAME FROM RDB$RELATION_FIELDS r LEFT JOIN RDB$FIELDS F ON r.RDB$FIELD_SOURCE = f.RDB$FIELD_NAME WHERE r.RDB$SYSTEM_FLAG=0 AND f.RDB$FIELD_TYPE IN (37,14) AND f.RDB$FIELD_LENGTH>=9 INTO :DANSCOLONNE,:DANSTABLE DO BEGIN STMT='SELECT 1 FROM '||:DANSTABLE||' WHERE '||:DANSCOLONNE||' = ?'; EXECUTE STATEMENT (STMT) (CHAINE) INTO :RESULT; IF (RESULT IS NOT NULL) THEN SUSPEND; END END! SET TERM ; !
Re: [SPAM] [firebird-support] Firebird : find strign in all database
I think you would probably have to provide some external programming to solve this. I can't see a way of putting a SQL solution together. Using external programming (any of the usual development systems) you can get a list of tables, together with a list of fields they contain, and the data types they have. You can then programmatically construct SQL (for each table) something like: select * from where etc like ‘%%’ It might take a long time though. Neville Richards From: mailto:firebird-support@yahoogroups.com Sent: Tuesday, January 10, 2017 5:19 PM To: firebird-support@yahoogroups.com Subject: [SPAM] [firebird-support] Firebird : find strign in all database Hi all, I am looking for a procedure or a function to find a stirng in my database I have a DB with 200 tables and want to find a specific string (record) in a my DB I don't know the name of table / field. Thanks for any help
Re: [firebird-support] Firebird : find strign in all database
Hi, rather simple operation but can take very long time if database is big. You can write stored procedure - or EXECUTE BLOCK and inside iterate by system tables RDB$RELATIONS and RDB$RELATION_FIELDS and do EXECUTE STATEMENT with where condition and return back sum of fields '||' and table name where it find something interesting regards, Karol Bieniaszewski W dniu 2017-01-10 18:19:34 użytkownik startx252...@yahoo.fr [firebird-support]napisał: Hi all, I am looking for a procedure or a function to find a stirng in my database I have a DB with 200 tables and want to find a specific string (record) in a my DB I don't know the name of table / field. Thanks for any help
Re: [firebird-support] find a string records in all my tables
On 10-1-2017 18:10, startx252...@yahoo.fr [firebird-support] wrote: > I am looking for a procedure or a function to find a stirng in my database > > I have a DB with 200 tables and want to find a specific string (record) > in a my DB > > I don't know the name of table / field. There are no ready-made solutions for this. You will need to write a script that identifies all tables and constructs a query for each table to check all char, varchar and blob sub_type text columns. Mark -- Mark Rotteveel