Looking to go from MSS mapping 1 to Mapping 2

Author: mweaver68@gmail.com (Mike Weaver)

We are currently on U9.7.01.02 (G104 0322_1) and are looking to go from mapping 1 to mapping 2, using U4.0 driver. What issues are we possibly going to run into for column data types? I have looked at the Uniface Helpdocs but, as usual, I do not find them very helpful. Confused   Regards,  Mike

6 Comments

  1. If I am reading the information correctly, it appears that we would need to modify mainly the number fields (int, smallint, tinyint, float) to numeric and the bit field to char. 


    Author: Mike Weaver (mweaver68@gmail.com)
  2. Hi Mike, Description of the differences between the two mappings can be found in chapter "Data Packing for Microsoft SQL Server". Find your mapping 1 data type in the last columns, change it to the mapping 2 data type which is in the middle column. Ideally: - do a full data export using Uniface "Utilities->Deployment->Convert Data", - change the mapping in the .asn file - create new tables using Uniface "Utilities->Deployment->SQL Table" - do a full data import Uniface ""Utilities->Deployment->Convert Data" This is often much quicker than you would expect and it saves a lot of hours of doing manual changes and making mistakes. (But yes for really, really big databases that can't have any downtime you would need to find a different way)   Theo.


    Author: Theo Neeskens (tneeskens@itblockz.nl)
  3. There is a product called Red Gate SQL Compare, which is not massively expensive, and allows you to visualise the differences between database structures, and provides update scripts to do so if you wish.  So creating a new database with Utilities->Deployment->SQL Table (and referential integrity if you use it) which is entirely empty, would then give you an exemplar database to compare your live one to. Then only items with changes would be updated. 


    Author: Iain Sharp (i.sharp@pcisystems.co.uk)
  4. Thanks, Theo. What happens to those fields that have a data type in mapping 1, but the doc does not show a data type in mapping 2, and we are using the uniface packing code? For instance:
    Uniface packing code

    I8

    Mapping 2

    Mapping 1 Float

    Does this mean the data type would be changed to numeric and use a packing code of N8, as there isn't a mapping 2 storage format for I8? These are the kinds of things I find lacking in the help documents. 
    Theo Neeskens said Hi Mike, Description of the differences between the two mappings can be found in chapter "Data Packing for Microsoft SQL Server". Find your mapping 1 data type in the last columns, change it to the mapping 2 data type which is in the middle column. Ideally: - do a full data export using Uniface "Utilities->Deployment->Convert Data", - change the mapping in the .asn file - create new tables using Uniface "Utilities->Deployment->SQL Table" - do a full data import Uniface ""Utilities->Deployment->Convert Data" This is often much quicker than you would expect and it saves a lot of hours of doing manual changes and making mistakes. (But yes for really, really big databases that can't have any downtime you would need to find a different way)   Theo.  

    Author: Mike Weaver (mweaver68@gmail.com)
  5. Hmm. Documentation could have been better. Here are the missing ones: type_i8 float  type_nc1 numeric(1,0)  type_nc3 numeric(3,0)  type_nc5 numeric(5,0)  type_nc10 numeric(10,0)  Have sent a note to our documentation specialist.


    Author: Theo Neeskens (tneeskens@itblockz.nl)
  6. Thanks again, Theo! 


    Author: Mike Weaver (mweaver68@gmail.com)