On what basis is the Sys id generated by ServiceNow for each record ?

Snehal13
Kilo Sage

- On what basis is the Sys id generated by ServiceNow for each record ? Does it depend on instance, table or is  random 32 bit ?

- Can a record sys id on instance 1 ever be same as record sys id on instance 2 ?

 

1 ACCEPTED SOLUTION

Robbie
Kilo Patron
Kilo Patron

Hi @Snehal13,

 

You've got some pretty complete answers here already, but keeping it really simple and answering your questions directly:

 

- sys_id creation is instance specific meaning it can be present on another instance (although typically it is unique and if it does exist it normally relates to the same record).

- It is unique (to the instance it was created on at the time of creation).

- It is not table specific and yes it is generally a 32 characters long (99% of the time. Please note it can be less than 32 characters in very unique circumstances).

 

To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Helpful.

 

Thanks, Robbie

View solution in original post

4 REPLIES 4

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Snehal13 

 

- On what basis is the Sys id generated by ServiceNow for each record ? Does it depend on instance, table or is  random 32 bit ?

Atul: Sys id is generated with combination of date month year and time combination.

- Can a record sys id on instance 1 ever be same as record sys id on instance 2 ?

Atul: It must be save in case of Foundation data, to make it consistent else it can be problematic. Transactional records can be having same sys if ( but very very rare)

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Sohail Khilji
Kilo Patron
Kilo Patron

The function responsible for generating SYS_ID is  > 

gs.generateGUID()

 

its a random 32 bit hexa code genrated for any records in servicenow which is a unique identified for each record in a database.

 

When it comes to different instances there are very less chance of having identical sys_id. 


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

Maddysunil
Kilo Sage

@Snehal13 

The Sys ID generated by ServiceNow for each record is a unique identifier assigned to every record in the system. Here are some key points regarding Sys IDs:

  1. Uniqueness: Sys IDs are unique within an instance of ServiceNow. Each record in a table within a specific instance will have a unique Sys ID.

  2. Generation: Sys IDs are generated automatically by ServiceNow when a new record is created. They are generated using a combination of factors, including the instance ID, table ID, and a system-generated component. The specific algorithm used by ServiceNow to generate Sys IDs is not publicly documented, but it ensures that each Sys ID is unique within the instance.

  3. Length: Sys IDs are typically 32 characters long and are alphanumeric. They consist of letters (A-F) and numbers (0-9).

  4. Instance Independence: Sys IDs are unique within an instance, but they are not guaranteed to be unique across different instances of ServiceNow. Each instance maintains its own separate sequence for generating Sys IDs, so it's theoretically possible for the same Sys ID to be generated in different instances, but the likelihood of this happening is extremely low.

  5. System Integrity: ServiceNow's Sys ID generation algorithm is designed to ensure system integrity and prevent collisions (i.e., the same Sys ID being generated for different records). It's a critical aspect of maintaining data integrity and ensuring that records can be uniquely identified within the system.

In summary, Sys IDs are unique identifiers generated by ServiceNow for each record within an instance. While they are not guaranteed to be globally unique across different instances, they are designed to be unique within their respective instances to maintain data integrity and system reliability.

 

Please Mark Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.

 

Thanks

Robbie
Kilo Patron
Kilo Patron

Hi @Snehal13,

 

You've got some pretty complete answers here already, but keeping it really simple and answering your questions directly:

 

- sys_id creation is instance specific meaning it can be present on another instance (although typically it is unique and if it does exist it normally relates to the same record).

- It is unique (to the instance it was created on at the time of creation).

- It is not table specific and yes it is generally a 32 characters long (99% of the time. Please note it can be less than 32 characters in very unique circumstances).

 

To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Helpful.

 

Thanks, Robbie