Sys_Id: retain existing or generate new during data migration?

Chenlin
ServiceNow Employee

Hi,

I'm seeking for a guideline on sys_id handling:

When migrating data from one system to another, in general should record sys_id be copied to new system, or let the new system to generate new ids?
Note that it's between two different systems, rather than different instances (e.g. Dev, QA, UAT, Stage, etc.) of the same system.

 

I was from SQL server background and in that domain it was strongly suggested to leave it to the platform for performance consideration (so that guid are generated sequentially), but it seems ServiceNow platform might not have the same constraint.

 

Please advice,

Thanks!

1 ACCEPTED SOLUTION

Sandeep Rajput
Tera Patron

@Chenlin You can choose to retain the previous sys_ids if

1. There are parent child relationships among records

2. When any external system store your existing sys_id as correlation id in their tables

3. When any update set refers to the sys_ids of these records.

 

You can choose to generate new sys_ids if

1.There is no dependency on the original sys_ids(no parent child relationships)

2. No external system stores your sys_id

 

From performance stand point, there is no impact as sys_id is a 32 character unique string and it will remain unique even if it is migrated to a different instance. 

View solution in original post

3 REPLIES 3

Sandeep Rajput
Tera Patron

@Chenlin You can choose to retain the previous sys_ids if

1. There are parent child relationships among records

2. When any external system store your existing sys_id as correlation id in their tables

3. When any update set refers to the sys_ids of these records.

 

You can choose to generate new sys_ids if

1.There is no dependency on the original sys_ids(no parent child relationships)

2. No external system stores your sys_id

 

From performance stand point, there is no impact as sys_id is a 32 character unique string and it will remain unique even if it is migrated to a different instance. 

Ankur Bawiskar
Tera Patron

@Chenlin 

From my experience and understanding even if there is a new sysId there won't be any impact.

SysIds are unique and generated within the platform when record is inserted.

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Chenlin
ServiceNow Employee

Thank you all!