Try OpenEdge Now
skip to main content
DataServer for Microsoft SQL Server
The DataServer Tutorial : Column width

Column width

The OpenEdge-to-MS SQL Server migration utility uses either a field's format or width information (_width value in the _Field schema record) for the column length when it defines the field as an MS SQL Server column. Since OpenEdge allows a field to hold more data than the field's format can display, a field's format might not be the best indicator as to how large a column should be sized on the server. You can select Width in the For Field widths use migration option to create a column that is wider than the format indicates. For more information on For Field widths use option, Table 57. If a column generated by the migration utility is not wide enough to hold data from the OpenEdge database, the utility backs out any data loaded and the data in the MS SQL Server database remains unchanged.
The default size of a column's width is twice the length set for the OpenEdge FORMAT field attribute. When you use the DBTOOL utility option, SQL Width Scan w/Fix Option, the utility calculates the column width based on the actual size of data in the columns to ensure that server data length requirements are satisfied during migration. Unless the default column width is greater than the actual data size obtained from the largest column row, the utility adjusts the column width based on its calculation. Otherwise, the default column width is utilized during migration to help prevent under-sized columns on the server from receiving over-populated column data.
When you use the DBTOOL utility to calculate a column size of an extent column, derived from the entire array of extent elements, the extent element with the maximum number of characters is identified, and all the extent elements defined on the server are re-sized to the column length of the extent element with the maximum number of characters. If the extent element with the maximum number of characters exceeds the migration threshold parameter Maximum Varchar Length, then each element of the array is re-sized as a LOB server column type. The OpenEdge record buffer may otherwise overflow, whereas a LOB locator takes a very small space in the record.
Prior to running the utility, you must determine which method of calculating column size will be used to ensure your data will fit. If necessary, use the Adjust Field Width tool in the Data Dictionary or the database administration tool (DBTOOL utility) to enlarge character, decimal, and array fields. For more information on the DBTOOL utility, see OpenEdge Data Management: Database Administration.