Looking to go from MSS mapping 1 to Mapping 2 | Uniface Development | Forum

Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

—  Results per page  —








— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters
For a group of consecutive words like 'end of support' use Match phrase

sp_Feed Topic RSS sp_TopicIcon
Looking to go from MSS mapping 1 to Mapping 2
05 Sep 2017
4:30 pm
Avatar
Mike Weaver
Copley, Oh
Member
Forum Posts: 6
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

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

Mike Weaver

Copley, Oh
05 Sep 2017
5:04 pm
Avatar
Mike Weaver
Copley, Oh
Member
Forum Posts: 6
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

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. 

Mike Weaver

Copley, Oh
07 Sep 2017
12:29 pm
Avatar
Theo Neeskens
Member
Forum Posts: 339
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

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.

07 Sep 2017
12:35 pm
Avatar
Iain Sharp
Member
Forum Posts: 605
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

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. 

07 Sep 2017
3:49 pm
Avatar
Mike Weaver
Copley, Oh
Member
Forum Posts: 6
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

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.  

Mike Weaver

Copley, Oh
11 Sep 2017
1:47 pm
Avatar
Theo Neeskens
Member
Forum Posts: 339
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

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.

14 Sep 2017
3:17 pm
Avatar
Mike Weaver
Copley, Oh
Member
Forum Posts: 6
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

Thanks again, Theo! 

Mike Weaver

Copley, Oh
Forum Timezone: Europe/Amsterdam

Most Users Ever Online: 131

Currently Online:
10 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

ulrich-merkel: 1683

Iain Sharp: 605

Theo Neeskens: 339

gianni: 250

rogerw: 232

lalitpct: 197

istiller: 195

Knut: 173

-GHAN-: 171

sochaz: 165

Member Stats:

Guest Posters: 3

Members: 5469

Moderators: 0

Admins: 8

Forum Stats:

Groups: 1

Forums: 62

Topics: 2014

Posts: 8675

Newest Members:

Frankchets, jimchr, HerbertElaby, PhilipHar, Frankskync, FrankVag, LloydChelp, Vladcubre, BobbyFUT, Rickypaity

Administrators: admin: 23, Adrian Gosbell: 276, diseli: 810, Bob Maier: 3, Nico Peereboom: 60, Michael Rabone: 4, richiet: 406, JanCees: 28