Kbase 16051: Protoora error 1754 only 1 long field allowed in oracle
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/5/1998 |
|
Protoora error 1754 only 1 long field allowed in oracle
DRAFT COPY - Currently under review and edit.
INTRODUCTION:
=============
In versions earlier than 8.2c, please note that when
running the protoora utility there can be problems in converting
some fields. The utility will convert character-fields that are longer
than 255 characters to a LONG type in ORACLE. Oracle can only have 1
field per table that has the LONG format.
WHY YOU NEED TO KNOW THIS:
==========================
The fact that there are more fields longer than 255 characters will
prevent the utility from creating them. The previous way around this
problem was manipulating the generated .sql script and change the
LONG type to VARCHAR2 before it was executed in ORACLE by protoora.
This was not practical because this manipulation had to be done every
time you wanted to convert the progress-schema.
PROCEDURAL APPROACH:
====================
To get the protoora program running, a simple change can be made to
the routine. In version 7.3D it is in file protoor1.p and in version
8.0A it is in protoora.p itself. Those files are in the
$DLC\SRC\PRODICT\ORA directory.
In those files there is a variable defined called user_env and has 35
extents. By default user_env[18] has the value "long". If you change
this value to user_env[18] = "VARCHAR2". the protoora routine will
perform better with LONG fields for oracle. This is because in the
procedure $DLC/SRC/PRODICT/MISC/wrktgen.p there is the following piece
of code :
IF user_env[18] = "VARCHAR2" THEN
ASSIGN longwid = 2000.
ELSE
ASSIGN longwid = 255.
After this change the LONG type will only be created if fields are
longer than 2000 characters.
This will help in many cases.
*** NOTE: In version 8.2C and later, protoora will only generate a
LONG datatype when the field is > 2000 characters. You no longer
have to make this change explicitly in the protoora source code.
*** Note: In version 8.3A and later, if you are using Oracle version
8, the limit has been increased to 4000.
Progress Software Technical Support Note # 16051