Today I'm working on transfering data from a gigant audit table to several tables, one per month, in another server. I used SQLTools++ to generate the DDL and started using it to create the destination tables. After a while I noted by accident that the definition of the new tables were different from the original and after checking I understood why. Both oracle databases are configured so that a char or varchar2 definition is given in characters (NAME VARCHAR2(20) = NAME VARCHAR2(20 CHAR)) and both use a set of unicode as character sets. When SQLTools++ got the DDL it generated the definition in BYTES so I got (NAME VARCHAR2(120)). When runing that script on the new server it creates a column of 120 characters (480 Bytes). It wasn't a big problem since I resolved it with a simple alter table, however It would be nice if SQLTools++ could add in the definition the keyword CHAR or BYTE so that the size of the colums stays as defined on the original independently of where you run the script.
Log in to post a comment.