1

Topic: Basis data migration security2.fdb-> security3.fdb at passage FB 2.1-> FB 2.5-> FB 3.0

All greetings!
There was at me a task of passage from version FB 2.1.3 on the last accessible version, FB 3.0.2 (both are installed on Windows Server 2003 R2). As intermediate I use FB 2.5.7, installed on the ordinary computer with Win 10 x64. All FireBird' are installed 64-digit.
Bases overtook using backup-restore from 2.1 in 2.5, then in 3.0. Problems were, but dared removal/editing of malformed data in bases. Bases earned in FB 3.0, all is.
Further it is required to transfer logins and passwords of users which are stored in security2.fdb (about 300 users)
Overtook basis using backup-restore on the server with FB 3.0 (in the test directory), it was connected by means of IBExpert, checked up that the data on a place and all looks as well as on 2.5 and 2.1
a subject at this forum, in it there was a message with a script
Then found how-to-migrate-copy-users-from-security2-fdb-firebird-2-5-to-security3-fdb
So understood this script it is intended for isql from a dial-up most FireBird, found the information on that how to launch this script, saved it in a file and adapted (corrected ways).
Checked up that the basis recovered by me security2.fdb has ODS=12.0
From the first did not quit since I specified working basis security3.fdb and received  that there are no such rights at user SYSDBA, ungearing server FB (stopped service) copied basis in the test directory, launched service reversely, corrected a way to target basis security3.fdb, launched a script and thought that already everything, but are not present... Received an error:

wrote:

SQL> input C:\DB\migration.sql;
Database: ' C:\DB\newsecurity3.fdb ', User: SYSDBA
Statement failed, SQLSTATE = 22001
arithmetic exception, numeric overflow, or string truncation
-string right truncation
-expected length 32, actual 96
-At block line: 56, col: 5
After line 3 in file C:\DB\migration.sql

Having a look that at me in bases through IBExpert saw a difference in the volumes which have been led out under the data, understood about what speech in an error
security2.fdb a screenshot
security3.fdb a screenshot
Respected, prompt as it is possible to quit this situation? I can something passed or I do not understand?

2

Re: Basis data migration security2.fdb-> security3.fdb at passage FB 2.1-> FB 2.5-> FB 3.0

Walter D.;

wrote:

DECLARE VARIABLE FRST VARCHAR (32);
DECLARE VARIABLE MDDL VARCHAR (32);
DECLARE VARIABLE LST VARCHAR (32);
DECLARE VARIABLE USR VARCHAR (128);
DECLARE VARIABLE PASSWD VARCHAR (64);
DECLARE VARIABLE ATTR VARCHAR (4096);
DECLARE VARIABLE UID INT;
DECLARE VARIABLE GID INT;
DECLARE VARIABLE SQL VARCHAR (4096);

to string variables specify the correct

3

Re: Basis data migration security2.fdb-> security3.fdb at passage FB 2.1-> FB 2.5-> FB 3.0

Walter D. wrote:

I Can something passed or I do not understand?

Only one thing: migration of users from 2.  in 3.0 it is impossible. Everything that it is possible to make,
It to create them anew with the same names.

4

Re: Basis data migration security2.fdb-> security3.fdb at passage FB 2.1-> FB 2.5-> FB 3.0

Dimitry Sibiryakov;
Well why in legacy_auth it is possible, if it is necessary in srp that to all users it is necessary to register passwords anew.

5

Re: Basis data migration security2.fdb-> security3.fdb at passage FB 2.1-> FB 2.5-> FB 3.0

Walter D.;
Or at least fulfill a script being connected with  utf-8

6

Re: Basis data migration security2.fdb-> security3.fdb at passage FB 2.1-> FB 2.5-> FB 3.0

Denis wrote:

Dimitry Sibiryakov;
Well why in legacy_auth it is possible

Well, we already clarified one and a half years ago it. And on traces article in IBSurgeon was born.
Links in the first message about that just. The author on a right way. All told already.

7

Re: Basis data migration security2.fdb-> security3.fdb at passage FB 2.1-> FB 2.5-> FB 3.0

o_v_a;
I invented the recipe smile))

8

Re: Basis data migration security2.fdb-> security3.fdb at passage FB 2.1-> FB 2.5-> FB 3.0

Aha smile There was a business!

9

Re: Basis data migration security2.fdb-> security3.fdb at passage FB 2.1-> FB 2.5-> FB 3.0

Simonov Denis;
The primary goal in that that I need to transfer all users with their old passwords, for temporal usage of an old variant of authorization, further our programmers will test possibility of change of the password users independently (that they could change the password when want) + to test authorization through Active Directory

Denis wrote:

or at least fulfill a script being connected with  utf-8

It concerns to isql or something to another? In README.isql_enhancements.txt did not find the information
It turns out to me it is necessary or to change the coding with which there is a connection or to correct a script? Something similar in  when was necessary to change codings 866 - 1251 if itself  is saved in the incorrect coding

Denis wrote:

  to string variables specify correct

Not absolutely I understand as to specify UNICODE_FSS if it is required, in the resulted piece of the code there is a declaration of variables with instructions of their name, type and the size... Or I not there went?)))

10

Re: Basis data migration security2.fdb-> security3.fdb at passage FB 2.1-> FB 2.5-> FB 3.0

Denis wrote:

Walter D.;
Or at least fulfill a script being connected with  utf-8

It is necessary to add in the script beginning "SET NAMES UTF8"?

11

Re: Basis data migration security2.fdb-> security3.fdb at passage FB 2.1-> FB 2.5-> FB 3.0

Found here such the message
Tried specifying UTF-8 before connection, here that received:

wrote:

SQL> SET NAMES UTF8;
SQL> input C:\DB\migration.sql;
Database: ' C:\DB\newsecurity3.fdb ', User: SYSDBA
Statement failed, SQLSTATE = 22001
arithmetic exception, numeric overflow, or string truncation
-string right truncation
-expected length 32, actual 35
-At block line: 58, col: 5
After line 3 in file C:\DB\migration.sql

Something I )

12

Re: Basis data migration security2.fdb-> security3.fdb at passage FB 2.1-> FB 2.5-> FB 3.0

Walter D.;
Try to specify UNOCDE_FSS. The blessing in 4.0 about this coding can be forgotten

13

Re: Basis data migration security2.fdb-> security3.fdb at passage FB 2.1-> FB 2.5-> FB 3.0

Walter D. wrote:

-expected length 32, actual 35

It is already better. It is necessary to find the user with a name in 35 characters and to throw out as superfluous (for to such user all the same it is impossible to assign the rights).

14

Re: Basis data migration security2.fdb-> security3.fdb at passage FB 2.1-> FB 2.5-> FB 3.0

dimitr;
Pancake precisely, in 2.x users theoretically 128 characters can be smile))

15

Re: Basis data migration security2.fdb-> security3.fdb at passage FB 2.1-> FB 2.5-> FB 3.0

Denis wrote:

try to specify UNICODE_FSS

Tried, the same result

wrote:

SQL> SET NAMES UNICODE_FSS
CON>;
SQL> input C:\DB\migration.sql;
Database: ' C:\DB\newsecurity3.fdb ', User: SYSDBA
Statement failed, SQLSTATE = 22001
arithmetic exception, numeric overflow, or string truncation
-string right truncation
-expected length 32, actual 35
-At block line: 58, col: 5
After line 3 in file C:\DB\migration.sql

dimitr wrote:

it is already better. It is necessary to find the user with a name in 35 characters and to throw out as superfluous

Yes, it is better))) Thanks for , I will search, such takes place to be))

16

Re: Basis data migration security2.fdb-> security3.fdb at passage FB 2.1-> FB 2.5-> FB 3.0

Walter D.;
Leave UTF-8 and search for the long user. As told  the rights to it all the same it is impossible to assign. There by 31 character it is restricted

17

Re: Basis data migration security2.fdb-> security3.fdb at passage FB 2.1-> FB 2.5-> FB 3.0

Dimitry Sibiryakov;
Well here again. It is transferred and is quite successful in legacy_usermanager. In Srp yes it is not possible

18

Re: Basis data migration security2.fdb-> security3.fdb at passage FB 2.1-> FB 2.5-> FB 3.0

I thank for helps, found inadequately long surname, cut it and all transited successfully!

wrote:

C:\Windows\system32> "C:\Program Files\Firebird\Firebird_3_0\isql.exe"
Use CONNECT or CREATE DATABASE to specify a database
SQL> SET NAMES UTF8;
SQL> input C:\DB\migration.sql;
Database: ' C:\DB\newsecurity3.fdb ', User: SYSDBA
C:\Windows\system32>

At excess of an admissible amount of characters in the end it is automatically added "SYSDBA"

19

Re: Basis data migration security2.fdb-> security3.fdb at passage FB 2.1-> FB 2.5-> FB 3.0

Skirmish DS and Vlad went to breakage.