Document toolboxDocument toolbox

14.1 Sequences and Identity Columns

Many tables within the database require unique numbers to be generated for use as the Primary key within the table, or just as sequences for other purposes. In Oracle this is achieved by use of Oracle Sequences. In SQL Server, these fields are identity columns.

(grey lightbulb) In the below table all min/max values are 1 and 999999999, and cycle by 1, except where stated otherwise

Oracle Sequence Name

min/max values(grey lightbulb)

SQL Server Identity

Column Name

TableUsed to...
activity_no activity_no14.1 sp100_activities

Used in packages SPDB_TRIGGERS and SPDB_RESETSEQUENCES.

analysis_nomaxvalue 999999analysis_no14.1 sp070_activity_standards

Used in SPDB_RESETSEQUENCES and JobTypeDBImpl.cpp. DbTidy also uses this sequence.

assigned_ports_audit sequence_nosp415_assigned_ports_audit

Used in server code MonitorDBImpl.cpp and processInfo.cpp.

audit_no sequence

sp507_audit_sp100

sp508_audit_sp108

sp509_audit_sp111

sp511_audit_sp206

Used to generate unique identifiers for audit operations. Used in SPDB_AUDIT database package.
(plus)audit_sequence_no audit_seq_nosp822_smaudit 
audit_transaction_id transaction_idsp599_transaction_auditUsed in TransactionDBImpl.cpp.
(plus)break_spec_id break_spec_idsp128_break_patterns 
(plus)bru_nomaxvalue 9999bru_no/wiki/spaces/SCH141/pages/27067042 
(plus)capacity_pattern_no capacity_pattern_no14.1 sp351_capacity_patterns 
(plus)component_no component_no14.1 sp400_components 
component_states_audit sequence_nosp403_component_states_audit 
dependency_group_no dependency_group_no14.1 sp156_job_dependency_groupsUsed in JobDependencyGroupDBImpl.cpp.
(plus)dru_nomaxvalue 9999dru_no/wiki/spaces/SCH141/pages/26970293 
employee_no employee_no14.1 sp210_employees 
ganttaudit sequencesp500_gantt_audit

 

holiday_specmaxvalue 9999holiday_spec14.1 sp106_holiday_specifications

 

job_no job_no14.1 sp111_jobs 
location_nomaxvalue 9999location_no14.1 sp118_work_locations

 

mapping_nomaxvalue 9999mapping_no14.1 sp261_task_mapping

 

message_no message_no14.1 sp207_dispatch_messages

 

monitor_audit sequence_no14.1 sp408_monitor_audit

 

optimizer_run_no optimizer_run_nosp530_optimizer_runs

Used in OptimizerStatisticsDBImpl.cpp.

region_no region_no/wiki/spaces/SCH141/pages/27068047

 

resource_no resource_no14.1 sp211_resources

 

resp_unit_nomaxvalue 9999resp_unit_no/wiki/spaces/SCH141/pages/27099986 
shift_specmaxvalue 9999shift_spec14.1 sp114_shift_specifications

 

(plus)sp073_restrictions_seq restriction_nosp073_restriction_types 
(plus)sp150_category_id category_id14.1 sp150_std_act_categories 
(plus)sp263_journey_typeminvalue 256journey_type14.1 sp263_journey_types 
(plus)sp350_capacity_categories_seq capacity_category_no14.1 sp350_capacity_categories 
(plus)sp419_sequence-no sequence_nosp419_event_audit 
(plus)sp503_sequence_no sequence_nosp503_api_audit 
(plus)sp560_sequence_no sequence_no14.1 sp560_travel_status_history 
(plus)sp802_permission_id permission_id14.1 sp802_permission

Used in DB Load.

(plus)sp808_role_id role_id14.1 sp808_role_definition 
(plus)sp810_param_seq_no permission_parameter

14.1 sp810_perm_param_seq

Used to generate unique identifiers for use by both 14.1 sp803_auth_actual_parameters and 14.1 sp804_permission_parameters.

(plus)specialperiod_no period_id14.1 sp620_special_periods 
(plus)system_state_audit sequence_nosp418_system_state_audit 
team_no team_no/wiki/spaces/SCH141/pages/27001323Used to generate unique identifiers for teams (sp250).

user_category

   

Used to generate unique identifiers for user categories (sp89).

(minus) this sequence is no longer valid and will be removed from future versions of this spec.