You can do it, but I'm not sure what you want. I do not see any benefit in using sequential directives; in fact, using directives is not recommended as a primary key unless the reasons for distribution / replication are related. Do you use a clustered index?
Having said that if you continue, I recommend that you first load the table with the values from your algorithm.
You will have trouble with foreign keys. You will need to link the old and new roles in the above table, drop the foreign keys, perform a transactional update, and then reuse the foreign keys.
I don’t think it’s worth it if you don’t go away from directions to say that the system is based on integers.
James westgate
source share