Any upgrade impact in changing max length of existing column?

Usha Sri Ramidi
ServiceNow Employee
ServiceNow Employee

Hi Team,

We have a requirement  to do the following:

1. Increase  the max length on existing columns. 

Couple of queries before making the above change.

1.  I verified we have many columns of string type with max length > 4000 in servicecnow tables currently. However, on oracle instances any string > 4000 characters should be of CLOB type. Do we need to consider this before  increase length > 4000?  As per documentation for string type field on oracle instances with > 4000char ( https://docs.servicenow.com/bundle/london-platform-administration/page/administer/reference-pages/reference/r_FieldTypes.html) , it will be taken care later by logging an incident with support. So can we go ahead and  define max length to around 13000 with String type?

2. Do we see any upgrade impact with the increase in max length of existing columns?

3. What exactly happens  when the column max length changes during upgrade? How exactly is upgrade of  table data handled in service now? 

Can someone provide your inputs on above queries. Thanks in advance!

 

-Usha.

1 ACCEPTED SOLUTION

rahulpandey
Kilo Sage

Hi Usha,

To answer you question, generally in upgrade, tables matadata doesn't change.  You should be fine with columns length changes.

Just a note : be caution about changing columns length more that 255. A table should not have  more than 10 columns with max length 255, this is a mysql innodb imitation.

https://dev.mysql.com/doc/refman/8.0/en/column-count-limit.html

View solution in original post

8 REPLIES 8

rahulpandey
Kilo Sage

Hi Usha,

To answer you question, generally in upgrade, tables matadata doesn't change.  You should be fine with columns length changes.

Just a note : be caution about changing columns length more that 255. A table should not have  more than 10 columns with max length 255, this is a mysql innodb imitation.

https://dev.mysql.com/doc/refman/8.0/en/column-count-limit.html

Thanks Rahul.

I haven't understood full on the upgrade part. Can you please clarify?

Tables metadata is stored in sys_dictionary? Doesn't the data in sys dictionary change when the column length changes?

Alikutty A
Tera Sage

Hello,

Please find answers to your queries

1. I am not sure why you need 13,000 but you can go ahead and create it (as it lets you create) but it is not a best practice to do. You can also check if the HTML field type would suit your need. A long String field is less readable for users and not much UI friendly. Your instance would be mostly in MySQL as SN use Oracle only for rare cases(from their documentation) and SN would handle the column structure at the back-end database.

2. Yes, If this is an OOB column and you increased its length.

3. If there is a new change or fix related to your column (sys_dictionary) then while upgrading, you wont receieve any new updates from SN. After upgrade you will need to review your Skipped Record under Upgrades module and then take a decision to either accept SN change by overriding yours, Skip Service Now change or Merge both the changes. I do not see a major impact on it.

Thanks

Thanks Alikurry

Can you pleae clarify below queries.

#1: Its an existing column. Doesn't it impact if the field type is changed from String to HTML now?

#3: You mean to say during upgrade we need to manually upgrade these files  with my changes of sys dictionary having default max length value  on modified columns?