-1

Is there any issue with Identity Insert. Do other concurrent operations without it goes fine or do it create slowness or deadlocks?

I want to to keep moving data with old primary keys and want to keep inserting data with new keys as well.

thanks in advance

10
  • 2
    IDENTITY and deadlocks have no relation. Commented Sep 24, 2021 at 15:21
  • 2
    I sure hope there isn't an issue with IDENTITY INSERT. I'm screwed if there is. If you're worried about PK violations on an IDENTITY column, well, when using IDENTITY INSERT you should be attentive to that and your code should be such that it accounts for that possibility. It's up to you to make sure you're not creating such an issue. In general you should be fine as long as you're not inserting values higher than the current IDENTITY seed or that already exist. Commented Sep 24, 2021 at 15:25
  • @squillman I agree and I am thinking to experiment it to make sure it works without issues Commented Sep 24, 2021 at 15:29
  • What code do you have that you are worried about? Commented Sep 24, 2021 at 15:32
  • its about concept, lot of insertions to be coming from new web app and at same time data for some old clients is moved from old app Commented Sep 24, 2021 at 15:36

1 Answer 1

0

Identity insert work independently with concurrent operations since it is not global and is session based, so other query sessions will keep working and generating same output weather its on in 1 session or off

More this is explained here

What is the scope of SET IDENTITY_INSERT xyz ON?

It also not created any slowness and deadlocks

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.